Bot sends old, incorrect data on successful purchase.

I'm not really sure if it's an issue with grammY or with my code but i'm currently adding a payment system to my bot and i've run into an issue where (I don't really know how to put it into words) data would be "overwritten" with the old data. For example:

In the screenshot you can see how I have first selected the "100 Credits" option (and have not bought it), then I selected the "50 Credits" option (and have bought it). After the purchase, the bot has responded with the UUID of the "100 Credits" option when it should've been the UUID of the "50 Credits" option (504b2ac...).
Here's the code that handles these purchases:
export async function sendPaymentInvoice(
    ctx: Context,
    composer: Composer<Context>,
    currency: string,
    product_id: AvailableProducts,
    payment_provider: AvailableProviders,
    additional_opts?: Omit<
        Other<'sendInvoice', 'chat_id' | 'title' | 'description' | 'payload' | 'currency' | 'prices'>,
        'provider_token'
    >,
    onSuccessfulPurchase?: (ctx: Context, purchase: Purchase) => void,
    onFailedPurchase?: (ctx: Context, error: Error) => void,
): Promise<void> {
    const product = getProductInfo(product_id); // Returns a JSON product.
    const random = randomUUID(); // A random UUID (just for debugging).

    if (!product) {
        if (onFailedPurchase) return onFailedPurchase(ctx, Error('This product does not exist.'));
        log.error({
            msg: `Specified product ${product_id} was not found.`,
        });
        return;
    }

    /**
     * Sends the user an invoice using the provided configurations, this
     * does not actually handle any payment data itself.
     */
    await ctx
        .replyWithInvoice(
            ctx.t('payments.invoiceTitle', {
                amount: product.reward.toString(),
                price: formatAmount(product.amount),
            }),
            ctx.t('payments.invoiceDescription', {
                amount: product.reward.toString(),
            }),
            product_id,
            currency,
            [
                {
                    label: ctx.t('payments.productLabel', {
                        amount: product.reward,
                    }),
                    amount: product.amount,
                },
            ],
            {
                ...additional_opts,
                provider_token: getProviderToken(payment_provider),
            },
        )
        .catch((err) => {
            log.error({
                msg: `Failed to send payment invoice to ${ctx.from?.id}.`,
                stack: err,
            });
            if (onFailedPurchase) return onFailedPurchase(ctx, err);
        });

    /**
     * Answers the checkout query which is required to continue with the payment.
     * @see https://core.telegram.org/bots/api#answerprecheckoutquery
     */
    composer.on('pre_checkout_query', async (ctx) => ctx.answerPreCheckoutQuery(true));

    ctx.reply(`Pre-success: ${JSON.stringify(product)}`); // This would correctly respond with the selected credits option.
    ctx.reply(`Pre-success: ${random}`);

    /**
     * Responds to a successful payment and updates the user's balance.
     */
    composer.on(':successful_payment', async (ctx: Context, _next) => {
        const payment = getUpdateInfo(ctx).message?.successful_payment!;
        const purchase: Purchase = {
            amount: payment.total_amount, // how much?
            reward: product.reward, // how much in return?
            successful: true, // how did it go?
            purchaseId: payment.telegram_payment_charge_id, // by who?
            date: new Date(), // when?
        };

        ctx.reply(`Post-success: ${JSON.stringify(product)}`); // This would respond with the option picked PRIOR to this one.
        ctx.reply(`Post-success: ${random}`);

        // Update the user balance.
        updateUserBalance(ctx, purchase.reward, purchase, true)
            .then(() => {
                ctx.reply(
                    ctx.t('payments.onPurchaseCompleted', {
                        amount: purchase.reward,
                        price: formatAmount(purchase.amount),
                        balance: getCachedBalance(ctx)
                    }),
                );

                // If a successful callback was provided, run it.
                if (onSuccessfulPurchase) return onSuccessfulPurchase(ctx, purchase);
            })
            .catch((err) => {
                ctx.reply(ctx.t('payments.onPurchaseFailed'));

                // If a failed callback was provided, run it.
                if (onFailedPurchase) return onFailedPurchase(ctx, err);
            });
    });
}

All products are simply stored in an array:
export const products: PurchaseOptionProduct[] = [
    {
        id: 'credits_10',
        amount: 100,
        reward: 10,
    },
    {
        id: 'credits_25',
        amount: 249,
        reward: 25,
    },
    {
        id: 'credits_50',
        amount: 499,
        reward: 50,
    },
    {
        id: 'credits_75',
        amount: 749,
        reward: 75,
    },
    {
        id: 'credits_100',
        amount: 999,
        reward: 100,
    },
];

These products (which are loaded into a custom keyboard) are then hooked up to the invoice function (hearsFull is just a slightly modified version of the hears function which allows me to listen for messages with custom variables).
products.map((product) => {
    feature.filter(hearsFull('payments.productLabel', { amount: product.reward }), async (ctx: Context) => { // If bot hears `X Credits!`.
        sendPaymentInvoice(ctx, composer, 'USD', product.id as AvailableProducts, 'stripe', {}); // Sends an invoice for the matching product.
    });
});

Any help would be greatly appreciated as I honestly have no clue where the issue could be coming from.

I am not sure that this will fix all of your code, but there is one mistake that stands out: you register further handlers on your composer inside an existing handler by calling composer.on a few times. This means that you alter the behaviour of your entire bot whenever an update is handled. Basically, whenever you run the code above, a new handler is added, so if you handle 5000 payments, then your bot now has 5000 handlers for ':successful_payment'. That surely is not what you meant, is it?

Yeah, that is definitely not the intended behaviour. Is there a way to see which handlers are added so I can perhaps try and see what's going on? Or do they not provide any useful information?

There is no way to see this, but in general, you should never add more handlers after your bot has started. You may want to use something like https://grammy.dev/plugins/conversations for this.

Got it working by moving all of the handlers to my createBot function within the index.ts file (which runs prior to the bot start) and the :successful_payment to its own function. It's quite messy but it works like expected. Big thanks for the help!
/**
 * Answers the checkout query which is required to continue with the payment.
 * @see https://core.telegram.org/bots/api#answerprecheckoutquery
 */
protectedInstance.on('pre_checkout_query', async (ctx) => ctx.answerPreCheckoutQuery(true));

/**
 * Responds to a successful payment and updates the user's balance.
 */
protectedInstance.on(':successful_payment', async (ctx) => processSuccessfulPayment(ctx, getProductInfo(getUpdateInfo(ctx).message?.successful_payment!.invoice_payload as AvailableProducts)!));

You can improve your code structure by defining things in modules, but registering things centrally. That is better than passing around composer instances to register middleware in many places. https//grammy.dev/advanced/structure elaborates on this.

Thanks for the suggestion, I believe i'm already doing this with most of my modules but i'll check out the docs to make sure.


[BUG] [GameTest] TypeError for createExplosion

Trying to spawn an explosion gets a type error
Version: Version <IP_ADDRESS>
Error: TypeError: Unexpected type passed to Native function argument [0]
Replication:
    let dim = World.getDimension("overworld");

    let eo = new ExplosionOptions();

    try {
      dim.createExplosion(new BlockLocation(0, 4, 0), 10, eo);
    } catch (error) {
      console.log(error);
    }

Nevermind, compiler never threw an error, tried BlockLocation instead of Location


Incomplete/missing ALT text when using Ctrl+Enter to post instead of clicking/tapping

Describe the bug
A clear and concise description of what the bug is.

Which site: phanpy.social

To Reproduce
Steps to reproduce the behavior:

Click on the "new post" (feather icon) button
Paste an image
Click into alt-text area, fill out some text
Hit ctrl-enter

Expected behavior
Post is posted with alt text
Screenshots

The alt text is not "updated" into the model until "onblur" in the textarea, I'm guessing. This is probably not a problem when clicking/tapping the "Post" button, but it is when using Ctrl-Enter.
Desktop:

OS: Windows
Browser: Edge
Version: 114.0.1823.43 (Official build) (64-bit)

Additional context
I've noticed that in the past with incomplete alt text, and just recently with the "missing alt text" warning and it clicked in my head

@fasterthanlime Can you try wait for a second after stop typing, then hit ctrl-enter?
I can't seem to replicate this on my side. There is debounce of 500ms for the text fields, so you probably hit ctrl-enter within that split second 🤔

There is debounce of 500ms for the text fields, so you probably hit ctrl-enter within that split second 🤔

That checks out - if I press Ctrl-Enter before the 500ms I get the warning / partial ALT text, but if I wait, then everything behaves as expected.
I'm curious what's the reasoning behind the debounce!

Okay, wow you typed really fast 😮
The debounce was more technical, trying to fix an old performance issue and prevent React re-renders 😅. I've done a bunch of refactors since then, so I could probably revisit this, maybe either reduce the debounce or remove it 🙏
Thanks for reporting!

Okay, wow you typed really fast 😮

I am terminally online, yes (also writing is kind of my job). Glad there's a reasonable explanation and no big hurry on the fix!

@fasterthanlime I've (temporarily) reduced the debounce to 250ms, on production (probably need to reload, or check the menu to see if there's an update). Maybe can give it a whirl 🙈


Run each app as a separate Docker container

Includes Elasticsearch!

Merging this into #23 . docker-compose will run separate container together anyway.


Show only pods from matching namespace in Grafana.

In "pods.json" dashboard there is a list of pods to select from.
This change filters the list, to contain only pods from previously selected namespace.
Fixes: #1396.

This change is

Thank you @jgoclawski, this is great!
LGTM (and extra plus for the gpg-signed commit! :smile:)
@piosz Please merge into the release

@jgoclawski thanks for the contribution. @luxas thanks for the review.

Thanks for a quick merge!


New Google symptoms signals - omicron related

Description
Alterations in Google symptoms signals.
Removed: anosmia, ageusia, sum_anosmia_ageusia
Added: S01, S02, S03, S05, S06, S08, SControl
New signals are averages of symptom trends, while old sum_anosmia_ageusia signal was a sum. None of our signals are related to only one symptom, as was the case with anosmia and ageusia signals.
Replaced old smoothers (form smooth.py) for new smoothers (Smooth class from delphi_utils).
Adapted unit tests for multiple combinations of symptoms and new smoothers.

Hmm that test shouldn't be failing, but it looks like this branch is behind main. Would you try this:
$ git checkout google_symptoms_omicron
$ git merge main
$ git push origin google_symptoms_omicron

@nmdefries thank you, code is updated! I also added the new names to the json template file, so it just needs the API key.
There is one failing check that it doesn't seem to be related to our code; it's a unit test from the hhs pipeline. Do you know what that could be?

Okay, the hhs tests are fixed on main, you can merge that in now.

@korlaxxalrok This is ready to merge and release.


Authentication Error Message Not Descriptive

Storage Explorer Version: 1.3.1
Platform/OS Version: Windows 10 1803
Architecture: x64
Regression From: Unknown
Steps to Reproduce:

Set your clock to be at least 15 minutes behind the current time.
Try to navigate to a table on a storage account.

Expected Experience:
I expect the dialog box to be consistent between the storage types and be descriptive (whether it be a credential issue or otherwise).
Actual Experience:
When you expand the table listing you'll get a dialog box that said:

"Authentication error"

This message was not very descriptive, so I tried troubleshooting the issue. Some of the things I tried were removing the Azure account, adding the storage account directly, none of these things worked. It wasn't until I tried to expand the Blob storage list that I got a new message that solved my problem. This one said:

"Authentication Error. Request date header too old:

That's, unfortunately, an issue with the Azure API. We're just forwarding the errors returned by Azure to the dialog. We decided a while back we weren't going to try and interpret errors, because it's easy to get them wrong, and it makes diagnosing different problems harder.


No selectize theme multiple selection templates.

Hey.  This is critical!

:+1:

selectize is the most beautiful theme!

+1

+1. Would prefer to use the Selectize theme for multiple select with the ui-select directive!

+1

+1

+1

Please don't +1, use git hub reactions if you must. Better yet, consider submitting a PR! :smiley:
Thanks


Updated S2 Action bar tokens

Description
Updated S2 action bar (non-color) in respective desktop and mobile layout sets:
New:

action-bar-top-to-content-area
action-bar-bottom-to-content-area
action-bar-edge-to-content-area
action-bar-close-button-to-counter
action-bar-counter-font-size
text-to-control-50

Changed:

action-bar-height
action-bar-top-to-item-counter

Motivation and context
Action bar component is being formalized as a Spectrum 2 component. These net-new tokens define the design data needed for implementation.
For more information, view Jira ticket.

Related issue

Types of changes

 [ ] Patch (bug fixes, typos, mistakes; non-breaking change which fixes an issue)
 [X] Minor (add a new token, changing a value, deprecating a token; non-breaking change which adds functionality)
 [ ] Major (deleting a token, changing token value type, renaming a token by deprecating the old one; fix or feature that would cause existing functionality to change)
Checklist:

 [X] I have signed the [Adobe Open Source CLA](https://opensource.adobe.com/cla.html).
 [X] I updated the token in all applicable sets. This applies if updating, adding, or deleting a token that has data across different sets (for example, if the value differs across color themes.)

TESTING spectrum2
READING spectrum-tokens: /spectrum-tokens/packages/tokens/src/
READING   tokens studio: /spectrum-tokens-studio-data/src/tokens-studio/spectrum2-colors/
READING   tokens studio: /spectrum-tokens-studio-data/src/tokens-studio/spectrum2-non-colors/

WARNING - STUDIO INCLUDES DEPRECATED TOKEN: overlay-opacity/dark [31d5b502-6266-4309-8f8a-3892e6e158da]
WARNING - STUDIO INCLUDES DEPRECATED TOKEN: overlay-opacity/light [26b9803c-577f-4a29-badd-dfc459e8b73e]

STUDIO SYNC SUMMARY
UPDATED METADATA - SPECTRUM UUID: spectrum2/layout/desktop.text-to-control-50
UPDATED METADATA - SPECTRUM UUID: spectrum2/layout/mobile.text-to-control-50
UPDATED METADATA - SPECTRUM UUID: spectrum2/layout.component.action-bar-top-to-content-area
UPDATED METADATA - SPECTRUM UUID: spectrum2/layout.component.action-bar-bottom-to-content-area
UPDATED METADATA - SPECTRUM UUID: spectrum2/layout.component.action-bar-edge-to-content-area
UPDATED METADATA - SPECTRUM UUID: spectrum2/layout.component/desktop.action-bar-close-button-to-counter
UPDATED METADATA - SPECTRUM UUID: spectrum2/layout.component/mobile.action-bar-close-button-to-counter
UPDATED METADATA - SPECTRUM UUID: spectrum2/layout.component.action-bar-counter-font-size

SPECTRUM SYNC SUMMARY
NEW TOKENS: (36) accordion-content-area-edge-to-content-small/desktop, accordion-content-area-edge-to-content-medium/desktop, accordion-content-area-edge-to-content-large/desktop, accordion-content-area-edge-to-content-extra-large/desktop, accordion-disclosure-indicator-to-text-small/desktop, accordion-disclosure-indicator-to-text-medium/desktop, accordion-disclosure-indicator-to-text-large/desktop, accordion-disclosure-indicator-to-text-extra-large/desktop, meter-thickness-medium/desktop, meter-thickness-extra-large/desktop, accordion-content-area-edge-to-content-small/mobile, accordion-content-area-edge-to-content-medium/mobile, accordion-content-area-edge-to-content-large/mobile, accordion-content-area-edge-to-content-extra-large/mobile, accordion-disclosure-indicator-to-text-small/mobile, accordion-disclosure-indicator-to-text-medium/mobile, accordion-disclosure-indicator-to-text-large/mobile, accordion-disclosure-indicator-to-text-extra-large/mobile, meter-thickness-medium/mobile, meter-thickness-extra-large/mobile, static-black-text-color, static-white-text-color, track-color, static-black-track-color, static-white-track-color, static-black-track-indicator-color, static-white-track-indicator-color, accordion-item-to-divider, text-to-control-50/desktop, text-to-control-50/mobile, action-bar-top-to-content-area, action-bar-bottom-to-content-area, action-bar-edge-to-content-area, action-bar-close-button-to-counter/desktop, action-bar-close-button-to-counter/mobile, action-bar-counter-font-size
DEPRECATED TOKENS: (2) accordion-disclosure-indicator-to-text, accordion-edge-to-disclosure-indicator
CHANGED VALUES: (6) action-bar-height/desktop, action-bar-top-to-item-counter/desktop, meter-thickness-large/desktop, action-bar-height/mobile, action-bar-top-to-item-counter/mobile, meter-thickness-large/mobile impacting 3 tokens

TEST COMPLETE

view Jira ticket

We've discussed this over Slack but want to make sure it's also captured here. I don't think we have consistently linked to other alias tokens in the past. So I looked up the individual value of each token and linked to it. Will fix that and moving forward will link to alias tokens especially if they have been noted by the designer in the token file.

Thank you for this update Nadeen! I noticed that some of the tokens are pointing to pixel values directly instead of to other tokens. I noted a few of them in the comments but not all, could you double-check the changelog here?

We've discussed this over Slack but want to make sure it's also captured here. I don't think we have consistently linked to other alias tokens in the past. So I looked up the individual value of each token and linked to it. Will fix that and moving forward will link to alias tokens especially if they have been noted by the designer in the token file.

TESTING spectrum2
READING spectrum-tokens: /spectrum-tokens/packages/tokens/src/
READING   tokens studio: /spectrum-tokens-studio-data/src/tokens-studio/spectrum2-colors/
READING   tokens studio: /spectrum-tokens-studio-data/src/tokens-studio/spectrum2-non-colors/

WARNING - STUDIO INCLUDES DEPRECATED TOKEN: overlay-opacity/dark [31d5b502-6266-4309-8f8a-3892e6e158da]
WARNING - STUDIO INCLUDES DEPRECATED TOKEN: overlay-opacity/light [26b9803c-577f-4a29-badd-dfc459e8b73e]

STUDIO SYNC SUMMARY
UPDATED METADATA - SPECTRUM UUID: spectrum2/layout.component.action-bar-height
UPDATED METADATA - SPECTRUM UUID: spectrum2/layout.component.action-bar-top-to-item-counter
UPDATED METADATA - SPECTRUM UUID: spectrum2/layout/desktop.text-to-control-50
UPDATED METADATA - SPECTRUM UUID: spectrum2/layout/mobile.text-to-control-50
UPDATED METADATA - SPECTRUM UUID: spectrum2/layout.component.action-bar-top-to-content-area
UPDATED METADATA - SPECTRUM UUID: spectrum2/layout.component.action-bar-bottom-to-content-area
UPDATED METADATA - SPECTRUM UUID: spectrum2/layout.component.action-bar-edge-to-content-area
UPDATED METADATA - SPECTRUM UUID: spectrum2/layout.component.action-bar-close-button-to-counter
UPDATED METADATA - SPECTRUM UUID: spectrum2/layout.component.action-bar-counter-font-size

SPECTRUM SYNC SUMMARY
NEW TOKENS: (9) thumbnail-opacity-checkerboard-square-size, thumbnail-corner-radius, text-to-control-50/desktop, text-to-control-50/mobile, action-bar-top-to-content-area, action-bar-bottom-to-content-area, action-bar-edge-to-content-area, action-bar-close-button-to-counter, action-bar-counter-font-size
MODIFIED TOKENS: (2) action-bar-height, action-bar-top-to-item-counter
DEPRECATED TOKENS: (2) action-bar-height/mobile, action-bar-top-to-item-counter/mobile
CHANGED VALUES: (24) thumbnail-size-75/desktop, thumbnail-size-100/desktop, thumbnail-size-200/desktop, thumbnail-size-300/desktop, thumbnail-size-400/desktop, thumbnail-size-500/desktop, thumbnail-size-600/desktop, thumbnail-size-700/desktop, thumbnail-size-800/desktop, thumbnail-size-900/desktop, thumbnail-size-1000/desktop, thumbnail-size-75/mobile, thumbnail-size-100/mobile, thumbnail-size-200/mobile, thumbnail-size-300/mobile, thumbnail-size-400/mobile, thumbnail-size-500/mobile, thumbnail-size-600/mobile, thumbnail-size-700/mobile, thumbnail-size-800/mobile, thumbnail-size-900/mobile, thumbnail-size-1000/mobile, action-bar-height/desktop, action-bar-top-to-item-counter/desktop impacting 13 tokens
CHANGED SCHEMAS: (2) action-bar-height, action-bar-top-to-item-counter

TEST COMPLETE


'NSInternalInconsistencyException', reason: 'Key "title" has no data.  Call fetchIfNeeded before getting its value.'

SDK throws this error while accessing data from parse. 'NSInternalInconsistencyException', reason: 'Key "title" has no data.  Call fetchIfNeeded before getting its value.' . Can anyone help me to solve this issue?

Hey @duraiganesh0, this is a valid error - if trying to read data for a given key that was never set from an object that was never fetched - it will throw this exception.
To fix it, per suggestion of the exception message - add fetchIfNeeded() call on this object before reading any values.


VideoSource for use with ImageLayer

Is your feature request related to a problem? Please describe.
I'd like to (ab)use OpenLayers for video playback with layered geometry and pan/zoom controls.  I want something like This mapboxgl demo
I've read through the related code, and the ImageLayer is clearly intended to support this, but falls short by not providing the mechanisms (like looping) and firing the change() event.
Describe the solution you'd like
I'd like to see 2 new modules: ol/source/VideoStatic extends ImageSource and ol/Video extends BaseImage.
VideoStatic
Will look just like ImageStatic except with this.video_ = VideoWrapper(...) instead of ImageWrapper.
Again, I want OL to handle the nuance of re-rendering while the video plays.
I'm also concerned about createCanvasContext2D(targetWidth, imageHeight) in ImageStatic because handleImageChange will be called at 30-60Hz, totally unnecessary between frames.
I could certainly hack it using the image rendering, but calling setImage right after initializing Static seems wonky, and the solution here is also kinda gross.
I'd like to have the loop maintained internally with requestAnimationFrame and listen to the video's onplayed and onpaused (among others) events to only run the loop while the video is actively playing, controlling the broadcast of change events through the HTMLVideoElement api.  All I should have to do from my own code is videoStatic.getVideo().currentTime = 10 to cause a re-render of the map.
Who will do it?
I'm already engaged in this work myself.  It's not a terribly large amount of work, but I'll need the maintainers help making sure it follows style and the API works nicely.
If this is deemed out-of-scope for the ol core, I'll maintain these classes as third-party (definitely not preferred) but would appreciate maybe a link on the third-party page?
Thanks developers!

Wrote an initial implementation, and the performance is pretty unacceptable.  30-60FPS video as a map layer boils down to drawImage being too expensive.
It's certainly doable, and I'll leave some code samples later for future discussion, but this seems like an overall bad idea.

Hey,
This definitely sounded good at first! Now that we have a composite renderer that can take any html element as a map layer, maybe we can drop the idea of using a <canvas> altogether and simply put a native video element in the map?

@jahow could you point me in the direction of that layer/source?  I've checked both the docs and the code and I don't see anything about using native elements as layers.  I only see overlay, which doesn't scale with the map and cannot be put under another layer

If you look at the base layer renderer class you'll see that the mechanic now revolves mainly around prepareFrame (which decides if a render is required or not) and renderFrame (which returns an HTML element to be added to the map).
All the renderers implement this to some degree, although I think all of them use canvas elements. But considering you have the frame state in the renderFrame method, you could theoretically output a video element and transform it (translate/scale/rotation) to match the map context.
Hope that is clear enough!

@subdavis Did you ever figure this out and gain more insight around this ?


puppeteer can't launch chromium, missing shared library libgbm.so

Describe the bug
My build actions involve running puppeteer tests with chromium. Today (April 16th, 2020) I started to get the following message:
Starting Chrome Headless
/opt/hostedtoolcache/Python/3.7.6/x64/share/jupyter/lab/browser_test/chrome-test.js:51
  throw up;
  ^

Error: Failed to launch the browser process!
/opt/hostedtoolcache/Python/3.7.6/x64/share/jupyter/lab/browser_test/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: error while loading shared libraries: libgbm.so.1: cannot open shared object file: No such file or directory

Area for Triage:

Question, Bug, or Feature?:
Bug
Virtual environments affected

[ ] macOS 10.15
[ ] Ubuntu 16.04 LTS
[x] Ubuntu 18.04 LTS
[ ] Windows Server 2016 R2
[ ] Windows Server 2019

Expected behavior
The file should not be missing and chrome should be able to launch.
How to reproduce:
make an Jupyterlab extension with cookiecutter:  https://github.com/jupyterlab/extension-cookiecutter-ts
upload it to github into a new repo, make a vanilla commit to trigger build.
Complete build log from my repo from 16.04.2020:
https://github.com/nandor-poka/ebml-tools-jl/runs/592321981?check_suite_focus=true
Log to successful build from 14.04.2020:
https://github.com/nandor-poka/ebml-tools-jl/actions/runs/78143605

@nandor-poka could you please provide a link to successful build?

Looks like it's all about puppeteer 3.0.0
https://github.com/puppeteer/puppeteer/issues/5661

@nandor-poka could you please provide a link to successful build?

Edited issue with link to successful build from 2 days ago (there were no builds yesterday)

Both builds run on the same image version, the only difference is the puppeteer version puppeteer@2.1.1(success) vs puppeteer@3.0.0(fail) and it seems the new version requires additional libraries.
I've tried to install libgdm in runtime and it helps. Could you please add these lines to your yml file?
        sudo apt-get update
        sudo apt-get install -y libgbm-dev

sudo apt-get update
sudo apt-get install -y libgbm-dev

That did the trick, thank you. I modified my build.yml to have this
- name: Install dependencies
      run: |
        python -m pip install jupyterlab
        sudo apt-get update
        sudo apt-get install -y libgbm-dev

and now it works again.

@nandor-poka glad to hear! We're going to add libgbm library to the Ubuntu images, so let's leave this issue open until that if you don't mind.

@nandor-poka glad to hear! We're going to add libgbm library to the Ubuntu images, so let's leave this issue open until that if you don't mind.

I don't mind at all, I was merely looking at the issue from my perspective :)

@miketimofeev FYI the dependency to fix this is actually libgbm1. The development version libgbm-dev is not mandatory.
See https://github.com/puppeteer/puppeteer/pull/5693.

The image with libgbm has been deployed.
@nandor-poka feel free to ping me if you have any concerns.
Thank you!

libgbm1

Thank you. I had libgbm-dev and chromium was really slow. Replacing it for libgbm1 fixed it.

libgbm1

Thank you. I had libgbm-dev and chromium was really slow. Replacing it for libgbm1 fixed it.

@nandor-poka glad to hear! We're going to add libgbm library to the Ubuntu images, so let's leave this issue open until that if you don't mind.

I don't mind at all, I was merely looking at the issue from my perspective :)

Thank you. I had libgbm-dev and chromium was really slow. Replacing it for libgbm1 fixed it.

@nandor-poka glad to hear! We're going to add libgbm library to the Ubuntu images, so let's leave this issue open until that if you don't mind.

I don't mind at all, I was merely looking at the issue from my perspective :)

Thank you. I had libgbm-dev and chromium was really slow. Replacing it for libgbm1 fixed it.

@miketimofeev FYI the dependency to fix this is actually libgbm1. The development version libgbm-dev is not mandatory.
See puppeteer/puppeteer#5693.

Thank you. I had libgbm-dev and chromium was really slow. Replacing it for libgbm1 fixed it.

@miketimofeev FYI the dependency to fix this is actually libgbm1. The development version libgbm-dev is not mandatory.
See puppeteer/puppeteer#5693.

Thank you. I had libgbm-dev and chromium was really slow. Replacing it for libgbm1 fixed it.

Thank you very much.
It works
sudo apt-get update
sudo apt-get install -y libgbm-dev

Thank you very much.
It works
sudo apt-get update
sudo apt-get install -y libgbm-dev

Finally issue fixed by
https://github.com/actions/virtual-environments/issues/732

Thanks it worked like a charm :)

Thank you very much.
It works
sudo apt-get update
sudo apt-get install -y libgbm-dev


I would like to work on dark mode

I'm working on a similar project (still in private) and the first problem I approached was dark mode.
I would like to contribute what I've already done to this project.
Do you already have something in mind? Could we talk on the kivy discord? I use the same username there.

Thank you for your interest in this project! I do not yet have an idea of how to go about dark mode, so if you would like to fork the repository and commit your changes, go ahead!


Allow event streams to prevent default behavior

Cycle allows turning virtually any DOM event into a stream to be consumed by intents. However, for some events this proves pointless as the event's default handling is disruptive.
For example, suppose I have a form and would like to receive a stream of submissions on it, I could do something such as:
Cycle.h('form#search', {onsubmit: 'searchSubmits$'}, [
  Cycle.h('input#q', {autocomplete: 'off', name: 'query', type: 'text', placeholder: 'Add term'})
])

While this would indeed create a stream, the form would still actually navigate to its target upon submission, thus denying me the ability to make sensible use of the stream.
What I would like to have (and will gladly make a reality) is something like this:
Cycle.h('form#search', {onsubmit: 'searchSubmits$!'}, [
  Cycle.h('input#q', {autocomplete: 'off', name: 'query', type: 'text', placeholder: 'Add term'})
])

Which will basically retain the same behavior, except it will also call preventDefault for the submit event, allowing use of the stream.
I am, of course, entirely open to suggestions on how to actually signify this behavior. Being a Ruby buff I am all for adding bangs to the end of things to signify anything drastic, but this is not necessarily the best way.

Yes this should be fixed. The default Cycle behavior should be to preventDefault when using onsubmit: 'searchSubmits$' (without bang).
I am curious if there is any case at all where we want to allow the event's default instead of preventing it.
Hence, I'll fix this soon.

Actually, the very first example here seems to fit the bill. People may still want their checkboxes to toggle even if the clicks are turned into a stream, no?

Good point. Can you experiment whether the following approach solves your problem?
var View = Cycle.createView(function () {
  return {vtree$: h('form#search', {onsubmit: 'searchSubmits$'})};
});

var Intent = Cycle.createIntent(function (view) {
  return {submitForm$: view.get('searchSubmits$')
    .map(function (ev) { ev.preventDefault(); return ev; })
  };
});

In order words, manually putting preventDefault in the Intent.

@grozen I'm getting confident that you can just put the ev.preventDefault() in your Intents. Here is an example I put together: http://jsfiddle.net/staltz/wdxs67x9/2/

Yup, that hits the mark. Thanks!
Still, this feels a little "wrong", if you ask me. Maybe what's bothering me is that it's odd for the intent to do anything with the events other than extract data from them

Yes you're right, it feels wrong because this is a side effect: we are mutating the event instead of mapping it.
In the end of the day, the DOM and its events was made as a mutable data structure, and as much as we want to hide it, it will stay mutable and "dirty". I can see these alternatives:

Put ev.preventDefault() in Intents, as we did above
Build a framework feature to apply preventDefault() when the event carrier is suffixed with bang (or some other convention)
Call the preventDefault() in a .doOnNext() operator in the Intent (essentially the same as first alternative)
Make a custom element that wraps the native checkbox, with preventDefault() always applied

I prefer either alternatives 3 or 4. In 3, we use a side effect, but at least we make it explicit, because that is what doOnNext() is made for. Another way of hiding side effects is alternative 4, which I think is quite elegant.
@grozen

Sounds sound. Thanks for taking the time to help me sort this out!

Using doOnNext seems reasonable if you're using rxjs but if you're using xstream the analogue would a debug but in this case it's not a debugging activity so that doesn't seem right either.

Why don't we make it an optional argument to events? DOM.select('.add').events('click', {preventDefault: true})

So @staltz explained to me on gitter that snapdom has hooks you can use for this. There's an example on the readme:
h('div.row', {
  key: movie.rank,
  hook: {
    insert: (vnode) => { movie.elmHeight = vnode.elm.offsetHeight; }
  }
});

Seems like that's the way to go for something like preventDefault. I have already written a driver but I'll probably move over to this.

@Widdershin Your proposal looks convenient and readable, but is it in accordance to cycle's principles? Wouldn't it violate the rule that side-effects are only allowed in drivers? I'm really asking this, it's not a rethorical question.
So my question is: is your {preventDefault: true} a side-effect? I think one may argue that it is or that it isn't, with equal merit. I'd say it's not a side effect. It's true that ev.preventDefault() will be called at some point, and that's technically a side effect, but so is el.addEventListener('click', ...), and .events('click') may or may not call it, but that's just an implementation detail. The semantics of .events('click') is not to cause a side effect, and I believe that's also the case of {preventDefault: true}.  What if a new browser API was added, something like el.addEventListener('click', {preventDefault: true})? In that case cycle wouldn't need to mutate the event, nor to cause any side-effect. But, would that implementation detail change the semantics of .events('click', {preventDefault: true}). I believe it wouldn't.
In short, I believe your proposal should be accepted if there's a general agreement that it doesn't involve a side-effect, from the point of view of the semantics of the API (not of the low-level implementation).

I actually like the .events('click', {preventDefault: true}) idea. The fact that a preventDefault driver works now is barely possible. It works just because the scheduler in xstream is recursive/synchronous only, so the preventDefault is called synchronously. However, if we would change the scheduling in xstream, or if the user is using Cycle with another stream library, this driver solution would be fragile in regard to the scheduling used.
When it comes to "is it an effect", I think we can give it semantics like "I want to listen for prevented click events, so I call .events('click', {preventDefault: true}). Of course we have to consider effects from the declarative perspective since the virtual DOM itself is a declarative abstraction that hides away operations like element.appendChild().
So 👍 for this idea from my side.

What if one wants to preventDefault conditionally? Then there's no other option than using a driver - or is there?
Besides preventDefault there are other mutations of events that don't seem to fit in this nice  API, like those of ev.dataTransfer. What shall we do with them? Will there ever be a safe way to perform such side-effects?

@abaco if the condition is solely based on the event, you could pass a function instead. .events('keydown', {preventDefault: ev => ev.code === 'space'})
If the conditional is based on other parts of your application state, you would need to use the driver approach.
I think we should consider dataTransfer as a separate issue, as it seems like a different and more complex abstraction would be needed.

@Widdershin, don't get me wrong, I think your proposal solves 90% of the cases that currently require event mutation, so let's do it. For the remaining 10% I'd be happy to use a driver.
But @staltz has raised a new issue, namely that drivers that mutate DOM events are basically working by chance. That means we should never use the driver approach, doesn't it? So how are we going to deal with complex conditional event mutations?

This issue is super old, but quite easy to do. If anyone wants to do a first PR for Cycle.js, this would be a great starting point, we can guide you in the PR review.

Hmm, seems I'm late to the party.
If you're still up for volunteers I'll gladly give this a jab, though to be completely honest I couldn't TypeScript myself out of a wet paper bag.

Sure thing @grozen, have a go. I will review your pull request and help you get it merged. 🙂 👍

This is still coming along if anyone was concerned. I feed it what scraps of time I can and will hopefully be done (or rather, done enough to submit a pull request) soon.

Lol, I did not know about this issue, but came to the same conclusion: https://github.com/cyclejs/cyclejs/pull/603
Should I add the ability to pass a function?

@jvanbruegge since that is part of what's been discussed here, I'm allowing either a boolean or a function so that should be taken care of. I'll do my best to wrap this up in the coming days.

Also @Widdershin, I just noticed that I actually forgot that I was supposed to "make commit" instead of just committing while I work. How do I go about rectifying that? Everything is currently in a fork so I could essentially "start fresh" and copy everything over.

I'll merge #603 because it's useful by itself as a small "atomic" PR. We can improve the preventDefault features later on too. @grozen try a git rebase -i. The make commit is not important if you commit following the convention correctly.

This is done in cycle/dom 17.2 thanks to @jvanbruegge :)

@jvanbruegge the reason the tests keep looping over is that the when the default event handling for form submission is not prevented the page that runs the tests is reloaded and everything starts over.
I know because I tackled this as part of #610, which we can mix and match with this if it's deemed important enough.


Enhancement to enable running harmonic commands from subfolders

This pull request enables running the "build", "new_post", "new_page" and "run" commands from anywhere inside an harmonic site.
It works by creating a new findHarmonicRoot() helper function that will look into the current folder for harmonic.json and if not found it will start climbing to the parent folders until it finds it. Once the config file is found it returns it. If the config file is not found anywhere it displays a friendly error message and throws an error.
This leads to a better user experience because they don't need to return to the folder where harmonic.json is located before running any command.

Very nice!
I'll test and merge tonight.
Merging this will close #111

Good job @soapdog !

@soapdog currently, your PR only calls findHarmonicRoot in the default parameter value, that is, only when the user does not supply a path.
I believe it would make more to sense to call findHarmonicRoot(path) inside the function so that it works for both supplied and default parameters.
Also, going the extra mile, it would be really nice to call findHarmonicRoot() inside the actual functions that handle the command's logic (e.g., core's build function, util's config function) so that it would work for both CLI and API usage. As this part is rather unorganized, I can handle that personally later if anything.
And I'd like to avoid throwing errors inside of helper functions if possible, as that is mostly an anti-pattern. I believe the current Harmonic core already shows this anti-pattern, and I believe it will be hard to fix this without increasing code duplication a bit, so you can leave that for me to clean up later as well.

I will update this PR and get back to you shortly.

damn... broke half the tests with the new implementation. This will take a while rsrsrsrs...

@soapdog many of tests cascade, make sure you've removed the findHarmonicRoot from the harmonic init. Apart from that, your logic seems fine.

Created new MissingFileError custom error type.
build, newFile and run retrieve sitePath using findHarmonicRoot().
findHarmonicRoot() now returns false if harmonic.json is not found in path.
If sitePath is false, then all the functions above will display a friendly message and throw MissingFileError. The function findHarmonicRoot() has no side-effects, it returns path or false.

PS: Also increased timeout in build.js because it was failing on my machine because my machine is slow. :-P

@soapdog Fantastic work!
Your "solving conflicts" merge seemed to have some issues, so I've rebased and squashed your commits into 90bc5390907034e07fadaadd6ced26dfb4e98c10. I've also fixed some styling issues (removed trailing whitespace, collapsed multiple newlines, prefer single quotes over double quotes, etc.)

@UltCombo thanks a lot for the rework. I did that all sleepy and I think I did something wrong that triggered some conflicts. I will take more care of the styling guide for future work.

@soapdog no problem. ;) I've worked a bit on your MissingFileError, now it uses class syntax. I think we can use that error for missing theme files as well.

@UltCombo thanks a lot for that. My mind tends to be in old JS ways and I keep forgetting to try to use the new stuff.


Changing scroll speed or scroll behaviour in some apps

I use Karabiner Elements to make my Mac behave the same way as Windows in Parallels Desktop and Remote Desktops. And it works almost like I want to. I use Parallels Desktop to run CorelDraw, mostly.
The only thing that drives me crazy is Magiс Mouse scrolling behaviour in CorelDraw. A small movement of a finger could end up in 1000x zoom out. Such small finger movement in Safari, would work in such crazy way in CorelDraw. Sometimes it's even worse. Just clicking a button would end up to maximum zoom. Sometimes it happens when my left finger is even not on the mouse. And it happens dozens times a day.
I have to iMaсs: one old with Magic Mouse, and one new with Magic Mouse 2. They both have the same problem.
I tried to change Parallels' mouse modes, Virtual Machine's (disabled momentum scrolling), Windows' settings (minimum number of lines to scroll), but nothing changes - looks like CorelDraw works with the mouse directly - in its own way. I could switch from zooming to panning in CorelDraw, it's a bit better, but not great anyway - accidental scrolls still ruin normal workflow.
Maybe there's a way to:
a) disable mouse scrolling momentum in PD or in CorelDraw;
b) change scrolling speed in these apps;
c) disable mouse scrolling completely in these apps;
I tried, but I could't figure out 'From event' to use. Neither «mouse_key - ScrollWheel», nor «pointing_button - ScrollWheel» worked.
Please, help

Unfortunately, Karabiner-Elements cannot modify Apple's pointing device events.
Please use another app for this purpose.

@pablomedok It looks like your issue was addressed. If you agree, would you mind taking a moment to close it?


v1.0.0-alpha.8: Clicking the check box next to a system and Action items disappear.

Describe the bug
In the devices menu, putting a check in the box causes the Action items to disappear. Seeing this behavior on console version 1.0.0-alpha.8
Screenshots
If applicable, add screenshots to help explain your problem.

This is by design. When selecting multiple devices, use the row of a single device to affect multiple does not makes sense. The actions move above and are hidden for this reason.


IGNITE-10555 Set 'TcpDiscoveryVmIpFinder' as default IP finder for tests instead of 'TcpDiscoveryMulticastIpFinder'

https://github.com/apache/ignite/commit/83abf89237986185d0b20c40f5bd3aac3f0ec403


What is the corresponding 'format' value for native json?

JSON_TOLGEE is  Structured JSON
What is the corresponding 'format' value for native json?

Hey, what do you mean by native json?

嘿，你说的原生json是什么意思？

Tolgee Native JSON
Flatten JSON
{
  "user-settings.password.save.button": "Save",
  "interpolated_key": "Hello, {name}!",
  "plural_key": "You have {count, plural, one {one message} other {# messages}}."
}

Ah, yeah the format is JSON_TOLGEE (the default one). You just need to set structure delimiter to empty string
tolgee pull --delimiter ""

That way it won't structure the json in any way.


Refactor schema init and fix a crash

Pull more of the schema version checking and updating stuff into one place to hopefully make it easier to follow and make explicit and implicit migrations do the exact same thing. Fixes a crash due to RLMRealmCreateMetadataTables not being called when implicitly migrating an existing realm file from being we unconditionally created the primary key table.
This also makes creating a brand new Realm file with a custom schema not set the schema version to the static schema version, since doing so didn't really make any sense.
@alazier

Test PASSed.

Superseded/included in #1355


CI changes

resolve #45, resolve #38, resolve #34

Use public VM for public repo
Test more OS and Julia versions e.g. 1.7-RC1 because nightly is probably 1.8-DEV now.

Thanks @sosiristseng


Add time created/user who created to various things

This will be useful at some point in the future. Closes #86

Checked!
I was wondering about timezones, but that is taken care of by browser. Easy!


[c++] Refactor metadata and create to respect timestamps

Tracks #2180 -- see detailed description there

[sc-42296]


feat: extend detect non literal fs filename

I think the changes are now in a state where a PR can be created.
I've done the following things:

Added "@typescript-eslint/parser" so that TypeScript syntax (in this case: import) can be used in tests
Rewritten the detect-literal-fs-filename to check from where the inspected method / function is imported
Added "fs/promises" and "fs-extra" as  packages to check
Also check for node: prefix in package names
Added many tests to cover the implemented logic
Created utils functions for getting the import or require of a method / function

I'm not sure if the last bullet point makes the code clearer or more complex. It's in an extra commit, so i can revert this part.
Additionally i'm pretty sure there are more useful test-cases, especially valid ones, to prevent false positives.
I appreciate comments and hints for improvement and i hope i'll have the time to implement them fast!
P.S.: This covers #26, #54, #65 and #88

Good job!

Any idea when these changes will be merged?

Hi @sakirma ! Looks like i still need a reviewer + approval for this. I'm not aware of the review process (if there is one ;) ) in this repository, maybe @nzakas may step in here?

So sorry, for some reason I didn’t get a notification about this! I’m buried under notifications at the moment but I’ll plan on looking at this next week.
Question: do any of the tests actually use TypeScript syntax? I just looked quickly and didn’t see any.

No worries! Thanks for your help!

Question: do any of the tests actually use TypeScript syntax? I just looked quickly and didn’t see any.

I only used the import statement. Is there an eslint-parser that supports that? Then i wouldn't need the typescript-parser.

The default parser will work with import statements. You just need to set parserOptions.ecmaVersion to 6 or higher and then set parserOptions.sourceType to “module”. See https://eslint.org/docs/latest/developer-guide/nodejs-api#ruletester

The default parser will work with import statements. You just need to set parserOptions.ecmaVersion to 6 or higher and then set parserOptions.sourceType to “module”. See https://eslint.org/docs/latest/developer-guide/nodejs-api#ruletester

Ah great. I changed it accordingly.
Thanks for your review! I tried to include all your comments.
I also need to resolve the merge conflicts. Do you prefer merging main in the feature branch or rebasing? I can do both.

@BuZZ-T just checking back -- do you have time to update this?

@nzakas: Oh sorry, i missed the notification. I'll fix the conflict

@nzakas: Done. Sorry that it took so long for me to respond!

It also looks like we have failing tests in Node.js 12 due to using ?..

It also looks like we have failing tests in Node.js 12 due to using ?..

Ah, i didn't know node 12 should also be supported. I hope they are running now.


Is there a way to run on an offline image?

Is there a way to run on an offline image? I want to debloat a windows 10 install image. I have the image mounted, but there is no option to select the image I want to debloat.
I tried adding      -Path "c:\1 Mount"   in the script, but no luck

Look at https://github.com/DrEmpiricism/Optimize-Offline.

Thanks for the tip. Just finished and I am going to test it. You wouldnt happen to know how I can remove upgrade option and remove files that are not in the ESD? I desperatly want to get the install to fit on a 1.4 gb mini DVD.


A/C recognised as thermostat

Home Assistant version
all version, now @ 2021.9.1
SmartIR version
1.17.0
SmartIR configuration
  - platform: smartir
    name: Condizionatore Salotto
    unique_id: ac_salotto
    device_code: 1126
    controller_data: remote.ac_salotto_remote
    temperature_sensor: sensor.sensore_salotto_temperature
    humidity_sensor: sensor.sensore_salotto_humidity

Describe the bug
Integrating Alexa via Haaska, makes the A/C (climate domain in HA) entity to be seen as a thermostat.
This means that you can only change temperature and not all the A/C properties ( like mode, speed, etc. )
Mike is convinced this is a HA code issue: https://github.com/mike-grant/haaska/issues/223
Simone
Debug log
-

Additional context
Add any other context about the problem here.

I'm curious why you think this is an issue with smartIR and not with home assistant then? Just a random passer-by confused by your logic.

I'm curious why you think this is an issue with smartIR and not with home assistant then? Just a random passer-by confused by your logic.

Ignorance probably, as I never investigated how Alexa display categories work.
Simone


Rock,Paper,Scissor

@TusharAMD ,I want to create a rock,paper,scissor  game using ,mediapipe and open cv.
Can you please assign this issue to me for gssoc 2022

@Punyashreeag Assigned


using the latest update on voyager

Laravel Version: 5.5
Voyager Version: 1
PHP Version:7
Database Driver & Version:

Description:
how can I have the latest version on voyager in github on my project?
because there is plenty bugs like the image required with is resolved in the github but not updated the version of it in composer
Steps To Reproduce:

You can set your version in composer.json to dev-master, however I don't recommend doing this.  We're releasing much more frequently than before, so any bugfixes you may be missing will usually be released within a week or so of being merged in.


Preserve tint outside the lens while shouldUsePositiveSpaceLens is applied

Hi, hanks for great component!
I have the case when it is necessary to apply black border to the lens, but preserve the tint effect over small image outside the lens. For border to be applied to the lens, it is necessary to set shouldUsePositiveSpaceLens to true. But in this case, the tint effect disappears. Is there any way to preserve it? Thanks in advance

Hi @chapran-leobit-acc, unfortunately the effect you inquire about is not supported by react-image-magnify. Sorry about that. It is possible to provide a custom lense component to react-cursor-position, but you would need to create the lens component yourself.


Custom CSS and JS options

Do we have custom CSS and custom js configuration available to add any custom CSS or js in the theme?

Added.


Committing local bootstrap fix

This change should make developing with local bootstrap work.

This should fix #53


[Request/Question]: CoffeeScript 2 Beta Support?

I'm curious if there are any plans to offer a beta branch/release anytime soon with CS2 support?

Pretty please.

This issue should probably be closed since CoffeeScript2 is no longer in beta. 🎉

I think you're mis-reading the title, but it looks like the change was made 14 days ago for ruby-coffee-script. 🎉
https://github.com/rails/ruby-coffee-script/tree/master/script
No need for a beta package, as ruby-coffee-script now supports 1 and 2, without the need for a new version it seems.


Styled Components

I don't know how much work it would be, but I'd love to see something like https://github.com/styled-components/jest-styled-components integrated into snapguidist, so I can actually review the diffs to class names, rather than just having to trust that they're correct.

This is another very good point, thanks @ForbesLindesay.
At the moment we are rendering the components on the client and passing the rendered tree to an endpoint which takes the snapshots, therefore we don't have access to the Stylesheet.
But it's definitely something worth experimenting.


Add Fingerprint commands

Add set Fingerprint command as a step and util

Add fingerprint and audio injection sup[port


Added a useful link

Have added a useful link about SQL from the scaler topics.
Description & motivation

To-do before merge

Prerelease docs
If this change is related to functionality in a prerelease version of dbt (delete if not applicable):

[ ] I've added versioning components, as described in "Versioning Docs"
[ ] I've added a note to the prerelease version's Migration Guide

Checklist
If you added new pages (delete if not applicable):

[ ] The page has been added to website/sidebars.js
[ ] The new page has a unique filename

If you removed existing pages (delete if not applicable):

[ ] The page has been removed from website/sidebars.js
[ ] An entry has been added to _redirects
[ ] Run link testing to update the links that point to the deleted page

@coapacetic is there any other SQL learning course you'd prefer we linked to or does this suggestion work?

SQL

our go to internally is the Mode SQL course, I imagine when we release our own SQL course we would link to that: Mode SQL Tutorial


Node 7/8 for Async & Await

Since this web server is a backend application and using Docker you can use any Node version, you should build it with one of the latest versions of Node to have async & await support and all the bells & whistle of ES6 instead of the LTS version (Node 6).
Switching back and forth between NodeJS version is pretty easy using nvm.
$ nvm install 7
$ nvm use 7
$ nvm use 8

Switched to node:8. Is nvm necessary to run the container or is it just for local dev?

Nvm is only for local dev purposes, the recent Dockerfile simply just needs to use the recent node image.
We could also specify the engine version in the package.json


Using a ReadWriteLock instead of synchronized in ChannelPool.

This could potentially improve performance for buffered mutator and the like.

This actually slowed things down.  Closing.


Sonos integration randomly picks one (of two) Sonos devices

Home Assistant release with the issue:

0.86.2
Last working Home Assistant release (if known):
Operating environment (Hass.io/Docker/Windows/etc.):

Docker running image homeassistant/home-assistant:0.86.2 on Linux host
Component/platform:

Sonos integration
Description of problem:
Wanted to move from Sonos component configuration in configuration.yaml to Sonos integration with 0.86.2. When setting up integration, only one Sonos device is assigned (see first image below). Going into integration details however exposes both devices in my house (see second image).
With every restart and obviously by random, one of the two devices is selected, while the other become unavailable. For the missing device, in Lovelace the following is printed:
No state available for media_player.felix_zimmer

{
  "type": "media-control",
  "entity": "media_player.felix_zimmer"
}

Using manual configuration like below however works perfectly.
sonos:
  media_player:
    hosts:
      - 192.168.xx.yy
      - 192.168.xx.zz

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

Traceback (if applicable):

Additional information:
Sonos Integration Summary:

Sonos Integration Details:

Are both players part of the same "household", i.e. can you group them in the Sonos smartphone app?

No. They are assigned to two different Sonos accounts.
Christoph

Am 06.02.2019 um 18:28 schrieb Anders Melchiorsen<EMAIL_ADDRESS>Are both players part of the same "household", i.e. can you group them in the Sonos smartphone app?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

All right, so that's why. We current ask the first discovered speaker about the inventory and it will not know about the speaker in the other account.
I never tested multiple households but if manual configuration works well, it should be possible to adjust the discovery. I will test and get back but it will be some days before I have the time.

I had a look at this, it seems possible to make Sonos discovery find several households. However, it is not trivial to implement so it will take some more time.


Add Markdown support

Resolves #251
Resolves #86

Added the markdown support using markdown-it

https://github.com/user-attachments/assets/09fc2978-a1e7-467a-a651-5499c32225c7


is it possible setup a whole site mirror for remote backup?

Feature Description
gitea is lightful and effective,
May often run on some lightweight environments,  which even lacking storeage RAID.
I don't want Data reliability based on storage RAID.
If we can setup a remote server for whole site mirror (incremental backup/sync),
it'll safer.

some similar but not identical topics:
https://github.com/go-gitea/gitea/issues/2959
https://github.com/go-gitea/gitea/issues/22240
Screenshots
No response

zfs and zrepl works really well for me.
You can mirror anything without downtime.

I known I can daily backup / restore,
but that operation seems not lightweight and efficient.
https://docs.gitea.io/en-us/backup-and-restore/
is it possble some kind of stream sync (like binlog in database)

zfs and zrepl backup is very lightweight and efficient. They does incremental sync.

zfs and zrepl works really well for me.
You can mirror anything without downtime.

Thanks for such quick reply,
I will try it


Feature discussion: update preview

What I like about the AWS Web Console is the preview of changes before finally updating the stack. To get something similar using qaz, I have currently defined an alias function (zsh):
qaz-preview() {
  stack=$1
  answer=
  qaz change create update -s $stack && \
    qaz change desc update -s $stack && \
    vared -p "Apply changes? " answer
  case "$answer" in
    [Yy])
      qaz change execute update -s $stack
      ;;
    *)
      echo "Aborting."
      qaz change rm update -s $stack
      ;;
  esac
}

It creates a change set called "update", describes it and finally asks whether to proceed or not without leaving any artifacts.
I could try to implement this in qaz, as this seems a pretty convenient workflow for me, but there might also be advantages keeping the logic "outside" like this. Options might be to grep the description for replacement: "True" or to count the number of resources to be changed to print a summary before asking to proceed to emphasize on the complexity of the change. Of course this could also easily be implemented internally, but the question is what makes more sense.
For the internal implementation I would see at least two different ways:
a) extending the existing change command with a new subcommand, like qaz change workflow -s <stack>
b) adding an option to the update command, like qaz update -i <stack> with -i for "interactive" update (-p for "preview" might overlap with existing profile option)

Hey @thorstenhuhn
So I believe the feature you're looking for is implemented in the qaz shell mode. It's not documented but, the qaz update command functions differently when called in shell mode. In shell mode a change-set is created, the changes are presented and the user has the option to proceed or cancel.
We should then be able to take the shell mode implementation and replicate it in the update command. Option (b) feels like a good fit. I think that one fits the paradigm more closely.
Shell-Mode Updata command example:
Qaz Shell Mode
--
Try "help" for a list of commands

@ qaz:(state-machine-testing) ✗ ls
example
@ qaz:(state-machine-testing) ✗ update example
info: creating change-set: [state-machine-testing-example-change-5577006791947779410] - state-machine-testing-example
info: created change-set: [state-machine-testing-example-change-5577006791947779410] - create_complete - state-machine-testing-example
- resourcechange:
    action: Modify
    details:
    - causingentity: null
      changesource: DirectModification
      evaluation: Static
      target:
        attribute: Properties
        name: Timeout
        requiresrecreation: Never
    logicalresourceid: LambdaFunction
    physicalresourceid: state-machine-testing-example-LambdaFunction-1P3TK0WWM83Q5
    replacement: "False"
    resourcetype: AWS::Lambda::Function
    scope:
    - Properties
  type: Resource
- resourcechange:
    action: Modify
    details:
    - causingentity: LambdaFunction.Arn
      changesource: ResourceAttribute
      evaluation: Dynamic
      target:
        attribute: Properties
        name: DefinitionString
        requiresrecreation: Conditionally
    logicalresourceid: StateMachine
    physicalresourceid: arn:aws:states:eu-west-1:091066890486:stateMachine:StateMachine-iePWxwWG0FZn
    replacement: Conditional
    resourcetype: AWS::StepFunctions::StateMachine
    scope:
    - Properties
  type: Resource
--
The above will be updated, do you want to proceed? [Y/N]:

Let me know what you think.

That sounds reasonable. Shall I give it a try or would you prefer fixing it in personal?

If you're up for it, happy to review a pull request, won't have the chance to look at this personally this weekend.
You should be able to copy over the logic from the shell update command and make some minor changes.
Alternatively, I can work on it, some time next week.


Hardcoded configuration values / configuration file

Currently, experiment configuration is hardcoded in (and duplicated across) training scripts. This is undesirable, as user-specific parameters can end up in them like so, which will generate errors when run by others.
It would be useful to separate these. I propose a .ini file plus a module that pushes the necessary configuration flags into tf.app.flags.FLAGS.

Hey, I think this is great! If you'd like to add this, we would love it.


[ci skip] [cf admin skip] NO_CI adding bot automerge

Hi! This is the friendly automated conda-forge-webservice.
I've added bot automerge as instructed in #15.
Merge this PR to enable bot automerging.

@marcelotrevisani adding this to help cut down on the maintenance here. Let me know if you want help maintaining, and I can add myself as a maintainer.

@conda-forge-admin, please rerender

This seems to be passing now. @marcelotrevisani are you able to merge it?

Going to close and re-create this without the merge conflicts.


GDrive spreadsheets with \n in cells won't import

If you create a native Google Spreadsheet with carriage returns in a header file (probably as well in other rows) import fails. There's a workaround if you need the spreadsheet to display the whole text: instead of using carriage return you can shrink column width to the desired size and use Format --> Wrap text.

There has been no activity on this issue for more several months. We are closing it. If you think this still needs to be addressed please open a new issue.


adding set dirty function for sync list

Sync list doesnt sync item if a they are changed.
will not sync
_playerGear[index].Armour.weight = newWeight;

adding SetItemDirty function will allow the user to tell the list that an item needs syncing
_playerGear[index].Armour.weight = newWeight;
_playerGear.SetItemDirty(index);

@James-Frowen this is because structs are immutable.
you need to reassign the list[index] like this:
mystruct = list[i];
mystruct.level++;
list[i] = mystruct.

If a struct has a field that is a class, fields of that class can be changed.
For example
serverList[0].armor.weight = 15;

or
var armor = serverList[0].armor;
armor.weight = 15;

Either will change the value of serverList[0].armor.weight on the server, but synclist will not sync the weight value to client.

This problem is more with SyncLists for classes than structs, I have Simplified the tests so they are more for that case.

I see.
we actually had this discussion in discord a week ago: there is no good reason why we should be able to sync classes. UNET did that for some reason, but it's very inconsistent.
for one, we have to call 'new' for each class and cause extra allocations.
secondly, class objects are pointers. there is no way to sync those, even though UNET makes it seem like they would be synced.
if I have a Player class and it has a '.guild' object that it belongs to, setting the same guild object for two players on the server will not sync it the same way to the client.
in other words, what we really should do here is remove the ability to sync classes. nothing good can ever come from that.
@James-Frowen would you be interested in trying to do that with the weaver?

"secondly, class objects are pointers. there is no way to sync those, even though UNET makes it seem like they would be synced."

The same exact thing can be said about strings and arrays.   Are you against synchronizing strings and arrays?
This functionality has worked fine for years,  there is no need to complicate the weaver to remove this.
I don't want to have to have non consistent restrictions such as "synclists cannot synchronize reference ty,  except if they are strings or arrays,  but only in synclists,  syncvars are fine and commands are fine"
keep it simple please.

also,  structs are not immutable @vis2k  this PR applies equally to classes and structs.

It is c# properties that are immutable in this case. Same as trying to call this tranform.position.x = 5

If we want to nonAlloc versions for classes we would have to add something like this
protected override void DeserializeItem(NetworkReader reader, TestArmor item)
{
    item.weight = reader.ReadSingle();
}

@James-Frowen
This does not allocate if TestArmor is a struct:
protected override TestArmor DeserializeItem(NetworkReader reader)
{
     // don't let the new fool you,  this does not allocate if TestArmor is a struct
     TestArmor item = new TestArmor();
     item.weight = reader.ReadSingle();
     return item;
}

I am not convinced guys.
with Mirror/UNET, anything that syncs needs to be reassigned after it was changed.
it's the same with [SyncVar] structs, where changing struct.someStruct/Class wouldn't set the dirty bit unless we reassign it.
this PR works for synclists, but it's not consistent with SyncVars which still have to be reassigned.
I think it's better if there is one common way to do it. it's less confusing.

I am fine just adding something in the documentation


Add exception message into the failure response of schema upload/validation

E.g. Field spec already exists for column: foobar (through reference chain: com.linkedin.pinot.common.data.Schema["dimensionFieldSpecs"])

Codecov Report

Merging #2671 into master will increase coverage by 0.02%.
The diff coverage is 60%.

@@            Coverage Diff             @@
##           master    #2671      +/-   ##
==========================================
+ Coverage   69.35%   69.37%   +0.02%
==========================================
  Files         860      860
  Lines       39897    39889       -8
  Branches     5364     5366       +2
==========================================
+ Hits        27669    27672       +3
+ Misses      10424    10414      -10
+ Partials     1804     1803       -1

Impacted Files
Coverage Δ

...ller/api/resources/PinotSchemaRestletResource.java
39.06% <60%> (-5.39%)
:arrow_down:

.../impl/dictionary/LongOffHeapMutableDictionary.java
81.81% <0%> (-5.46%)
:arrow_down:

...nsport/netty/PooledNettyClientResourceManager.java
85.1% <0%> (-4.26%)
:arrow_down:

...e/operator/dociditerators/MVScanDocIdIterator.java
63.63% <0%> (-3.04%)
:arrow_down:

.../impl/dictionary/BaseOffHeapMutableDictionary.java
81.14% <0%> (-2.86%)
:arrow_down:

.../pinot/core/common/datatable/DataTableBuilder.java
91.06% <0%> (-1.12%)
:arrow_down:

...pby/NoDictionarySingleColumnGroupKeyGenerator.java
91.91% <0%> (-1.02%)
:arrow_down:

...impl/dictionary/FloatOffHeapMutableDictionary.java
87.27% <0%> (ø)
:arrow_up:

...inot/core/operator/docidsets/AndBlockDocIdSet.java
57.93% <0%> (+2.06%)
:arrow_up:

.../broker/routing/HelixExternalViewBasedRouting.java
92.93% <0%> (+2.82%)
:arrow_up:

... and 4 more

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 3c084ab...5dc722f. Read the comment docs.


feat: Add serializations

This serialize derivation adds a toJSON method to the instance prototype and a static fromJSON function to the ADT constructor.
fromJSON does not use the variant constructors but rather it assumes the listed fields are correct and just copies them.
The methods work recursively: toJSON looks for toJSON method on each value and leaves it as it is if it does not have one.  fromJSON acceps as a second argument an object containing ADT definitions that applies them if the types match.
Looking forward to hearing your thoughts on this.

Okay, sorry for taking too long to review this. It looks great :+1:
I like the idea of passing a parsers object to .fromJSON. We might want to provide a simpler way for people to construct these objects for the things they use in their applications, but right now I don't really have anything in mind (tracking these globally is easy, but not modular, and doesn't play too well with Node modules' semantics).
Maybe as a separate discussion, do we want to support Transit as a serialisation format? It's a specification for an extensible serialisation format which can use JSON as an encoding.

I am glad you like it.
I added the missing checks (weird that that jsverify does not test w/ nulls).
The cool think is that the format is not something fancy. So even this can work:
type.fromJSON(value, require('folktale/data')).
The other think I thought was cool was that by passing the 'contents' of the value you are making an assumption about what types do you expect (that is why I am not automatically adding the root type to the pool).  Related to that, what do you think we should do in case a value of unknown type arrives? Currently we just return it as is.

However in order for the current functionality nicely with the built-ins the 'type' string of the ADT must be the same as the name under which it is exported, so:
const Either = data('folktale:Data.Either', { should be const Either = data('Either', {.
Or maybe I should rework it so it uses the type provided...

We could have a makeParsers([adt1, adt2, adt3, ...]) function that converts the list of things to a map of them.

TL;DR Looks good but cannot imagine how exactly it would look.
Yes I like that idea. The only issue I see is where to put this function. It does not make sense for it to be part of the derivation as people shouldn't need to import the derivation function (or know that it exists at all) in order to use from/toJSON.
The funny thing is that the function looks almost like something generic that could be placed in the Object module:
fromArray: Array(a) => ( a => String ) => Map(a)
but not exactly.
Also the fact that you need a helper for the default use case bugs me a little (if we consider the toJSON  => fromJSON pipeline as the default use case that is).

True.
I'm assuming that what you meant by "Or maybe I should rework it so it uses the type provided..." was having an object that provides the parsers look like:
{
  Either: { [typeName]: String, fromJson: Function },
  Maybe: { ... },
  ...
}

Then we can pass require('folktale/data') directly, and we can combine parser providers with the ... object spread, so const parsers = { ...require('folktale/data'), ...require('my-types') }.
This is a much simpler API, and uses built-in language features, which is nice.

OK, I think this is a good compromise:
The fromJSON method rebuilds the dictionary by setting the types of the objects as keys.
This process can be turned off by the keysIndicateType flag.
This is also helpful because, after being performed initially, the rebuilding can be turned off during subsequent recursive calls to fromJSON.


AirLeaf with simil serial no.

Hi,
I have two AirLeafs with "Serial No." similar.
When I configure the second one the first one disconnects.
To be precise the two "Serial No." end with the same 6 digits.
This is very strange because in the configuration I don't enter the serial number but only the IP address.

Unfortunately, this is not the first time this happens, the way they set the serial number is not optimal. The way to fix it would be to use the MAC address as a unique id instead, but I need to find a way to do that without breaking existing installation.
You can see this comment to where there is a way to fix it.
https://github.com/danielrivard/homeassistant-innova/issues/187#issuecomment-2040065106
I should probably at this in the README documentation.


REST tutorial revisions

Revisions made based on test drive feedback from members of the PM team.

No changes needing a change description found.

You can try these changes here

🛝 Playground
🌐 Website
📚 Next docs

@timotheeguerin can you please review/approve this PR?


Add warning when net.ipv4.ip_forwarding = 0

Added warnings to api.go, container.go, commands.go, and runtime.go
Also updated APIInfo to return whether IPv4Forwarding is enabled
Fixes Issue #490 (As much as it can be)

This issue is specific to the bridge network driver, right?  Other network drivers may or may not need ip_forward set in the main network namespace, depending on how they work.  Have I got this right?

@MikeSpreitzer you set it on the host namespace and specific to nat'ing
FYI, this is a 3 yr old merged PR, questions are better asked via IRC or a new issue ;)


Refactor ProtocolStaking smart contract

Refactor the OracleNodeStaking contract to achieve better code organization, reusability, and maintainability, rename it to ProtocolStaking to reflect our updated code and vision.
Reference: https://github.com/masa-finance/masa-oracle/issues/317

@miquelcabot can you pls put into the ticket the solution you used for this contract?

@miquelcabot @H34D can you update the descriptoon to include a summary of what was implemented and create a list of any outstanding tasks that require new tickets. I am reopening the issue and moving this back to QA until the description has been added to the ticket and any next steps have been ticketed out.
cc @Luka-Loncar @mudler


Remove name in package.json

Removed name because it's a monorepo and it conflicts with https://www.npmjs.com/package/term

@allcontributors add @NieLeben for code


#1005 - HKT restructuring

(kinda) Getting close, I still have to:

Migrate the transformers (<- that's not a useful link)
Adress some todos
Compare with zio prelude and see what differences there are/what could be interesting
I'd love to add some snippets for each typeclass, I feel like people often miss how much type classes like Contravariant/Ord/Const/... are amazing

The whole MixVariance/InitialVariance thing should be removed

Variance is now fixed per parameter and doesn't take into account a fixed type (at least for now)
Parameters like S that are considered invariant should not mix at all, meaning in a signature you should not have S1 and S2 at all

Also ideally every parameter has a meaning, it almost feel like we could get away with:
S = State (Invariant)
I = Category Input (Contravariant)
R = Requirements (Contravariant)
E = Error (Covariant)
A = Output (Covariant)

Any fixed type can be supported by transformers by having parametric URIs like:
interface KeyValueT<Key, Value, F extends HKT> {
  type: KeyValue<Key, Value, Kind<F, this[...]>
}

I am not even too sure we want to keep the invariant S around, you could always have a:
interface StateT<S, F> {
   type: (s: S) => Kind<F, this["I"], this["R"], this["E"], [S, this["A"]]>
}

and would even allow mixing multiple different states

Oh, that would be cool, the simpler the Kind signature the better!
And If we go down this road, should we keep the I parameter then?  The parameters would kind of lose their "usage" meaning (requirements/error/output) but we still expose a  Contravariant input, and a covariant output (+ error Covariant output for convenience even though it kind of goes against the idea).

I am not even too sure we want to keep the invariant S around, you could always have a:
interface StateT<S, F> {
   type: (s: S) => Kind<F, this["I"], this["R"], this["E"], [S, this["A"]]>
}

and would even allow mixing multiple different states

I gave it a try but it seems that would force us to fix the S type no?
import { pipe, tuple } from "../../Function/index.js"
import * as PV2 from "../../PreludeV2"

interface StateT<S, F> extends PV2.HKT {
  readonly type: (
    s: S
  ) => PV2.Kind<F, this["X"], this["I"], this["R"], this["E"], readonly [this["A"], S]>
}

export function monad<F extends PV2.HKT>(M: PV2.Monad<F>) {
  return <S>() =>
    PV2.instance<PV2.Monad<StateT<S, F>>>({
      any: () => (s) =>
        pipe(
          M.any(),
          M.map((m) => tuple(m, s))
        ),
      flatten: (ffa) => (x) =>
        pipe(
          x,
          ffa,
          PV2.DSL.chainF(M)(([f, us]) => f(us))
        ),
      map: (f) => (fa) => (x) =>
        pipe(
          x,
          fa,
          M.map(([a, s]) => tuple(f(a), s))
        )
    })
}

(Also, If Sgoes away, it should probably take X with it, now that I'm re-reading this)

I gave it a try but it seems that would force us to fix the S type no?

That is the objective, S needs to be invariant anyway and given the lack of generics in constants it end up being forced to appear in every signature even things like unit that are then forced to be functions like unit<S>()
Even with S invariant you can't have a computation that has both state A and state B because you have a single S, "fixing" the param allows you to have many StateT<A, StateT<B, Bla>> they won't conflict and usually when you use state you really want to use a fixed state

Oh, that would be cool, the simpler the Kind signature the better!
And If we go down this road, should we keep the I parameter then? The parameters would kind of lose their "usage" meaning (requirements/error/output) but we still expose a Contravariant input, and a covariant output (+ error Covariant output for convenience even though it kind of goes against the idea).
 I'll give it a go on xpure this should make me sweat enough to fix that :D

Thought of I to model the input type of the category typeclass, that basically encodes I => A and A => B enables I => B

Notable changes:

Removed IndexFor and used params for all {...}WithIndex
Removed all implementXWithIndex functions

is anything blocking this? I'm really looking forward to #1055

Not really I am planning it for when system next is ready given it is a breaking change

@isthatcentered merge commits are problematic can you please use rebase?

@isthatcentered merge commits are problematic can you please use rebase?

Sorry about that. I'll rework the history to have something cleaner.

I was thinking about what kind of docs could be added to help the discovery of the various type classes, I know that when I started (and still sometimes), the main pain point I have is understanding "What's that thing for"/not knowing that there's already a data type for my use case.
Maybe something like creating a custom HKT and seeing how you can leverage the various type classes to implement the various features could be very nice to take a tour of everything.
Ex: decoder/tiny cli dsl/schedule/retry/tiny jenkins/...
We would probably need three different examples since
a. It's hard to cover everything in a single example,
b. You need 3 examples to spot a pattern and,
c. You can increase complexity/go further with each example
Other random docs ideas:

It would also be nice to demonstrate the different ways to use the data types (pipe & flow/do/gen)
Having a full scaffold example of an app with Effect (including Layer, Managed, Ref, tests).
FP-TS has a "find out what you need by use case" recipes doc that's very nice for newcomers

Most of those are already in the tests examples but they are a little hidden and some are probably a bit hardcore for newcomers.
(I know there's an ongoing docs effort, I haven't had the time to check It yet so I very well might be repeating something already said/discarder)

@isthatcentered I did find the jsdoc @example helpful
https://gcanti.github.io/fp-ts/modules/Apply.ts.html#apply-overview
https://github.com/gcanti/fp-ts/blob/master/src/Apply.ts#L13
The real problem was that the most interesting modules (or use cases) didn't provide those examples.
I'd vote (If I was asked) for the next-to-code jsdoc @examples.

Currently updating all the examples in core/tests (I used a different test file while moving the instances) and, while I'm at It I'm also adding explicit types and expectations (It's always nice when you're reading the code on github and can't execute the code). Renaming/categorizing the examples would be cool too.
Few issues I'll have to investigate tomorrow:

P.anyDSLMethod() fails with TypeError in tests (no clue why)
Ex:

// effect/instances.ts
import * as P from "../../src/PreludeV2/index.js

export const { match, matchIn, matchMorph, matchTag, matchTagIn } =
  DSL.matchers<EffectF>()

// test.spect.ts
someMethodImportingEffectFiles() // 💥 TypeError

Can be fixed by accessing it via DSL root rather than prelude root
// effect/instances.ts
import * as DSL from "../../src/PreludeV2/DSL/index.js

export const { match, matchIn, matchMorph, matchTag, matchTagIn } =
  DSL.matchers<EffectF>()

// test.spect.ts
someMethodImportingEffectFiles() // 👌 All fine

Transformers instance factory names (Ex: fail(F): Fail<EitherT<F>> can clash with the already exported function with that same name. I renamed Uppercased them (applicative(F) -> Applicative(F)). If anyone has a better idea please don't hesitat^^

Transformers provide types don't match implementation. After provide, the nested HKT Rparam has a type of
unknown (aka, provided too), but we only provide the transformer. I'm assuming that's fine since this is the current implementation but I wanted to point It out just in case.

I'll have to go back to XPure tomorrow, usage feels weird now that every dsl method has to take a State parameter be struct<S>()(record).

Currently updating all the examples in core/tests (I used a different test file while moving the instances) and, while I'm at It I'm also adding explicit types and expectations (It's always nice when you're reading the code on github and can't execute the code). Renaming/categorizing the examples would be cool too.
Few issues I'll have to investigate tomorrow:

P.anyDSLMethod() fails with TypeError in tests (no clue why)
Ex:

// effect/instances.ts
import * as P from "../../src/PreludeV2/index.js

export const { match, matchIn, matchMorph, matchTag, matchTagIn } =
  DSL.matchers<EffectF>()

// test.spect.ts
someMethodImportingEffectFiles() // 💥 TypeError

Can be fixed by accessing it via DSL root rather than prelude root
// effect/instances.ts
import * as DSL from "../../src/PreludeV2/DSL/index.js

export const { match, matchIn, matchMorph, matchTag, matchTagIn } =
  DSL.matchers<EffectF>()

// test.spect.ts
someMethodImportingEffectFiles() // 👌 All fine

Transformers instance factory names (Ex: fail(F): Fail<EitherT<F>> can clash with the already exported function with that same name. I renamed Uppercased them (applicative(F) -> Applicative(F)). If anyone has a better idea please don't hesitat^^
Transformers provide types don't match implementation. After provide, the nested HKT Rparam has a type of
unknown (aka, provided too), but we only provide the transformer. I'm assuming that's fine since this is the current implementation but I wanted to point It out just in case.
I'll have to go back to XPure tomorrow, usage feels weird now that every dsl method has to take a State parameter be struct<S>()(record).

Sounds really strange but it would be a blocker if not solved.

I don't understand this, what are the functions already exported with the same name, can you point to the code of 2 things that would conflict? function names only make sense in a single module not in general so "fail" in the context of Effect or on the context of OptionT may mean different things, I don't like the uppercase naming for functions and it would conflict with type names. The convention could be something like getApplicative but I do prefer simply applicative.

please provide a code example I don't understand what you are referring to.

Just remove the param S from the HKT and drop support for XPure. If someone wants to use State you can only use the parametric one with a fixed state

True, as an added bonus I think the full example appears when you hover over the method!

I have the opposite opinion here, the reason there are no inline examples in jsdoc is because I truly don't like to see them in the on-hover. I think we will find a middle ground with paka where @schickling is planning embeddable code in docs

Sounds really strange but it would be a blocker if not solved.
I don't understand this, what are the functions already exported with the same name, can you point to the code of 2 things that would conflict? function names only make sense in a single module not in general so "fail" in the context of Effect or on the context of OptionT may mean different things, I don't like the uppercase naming for functions and it would conflict with type names. The convention could be something like getApplicative but I do prefer simply applicative.
please provide a code example I don't understand what you are referring to.
Just remove the param S from the HKT and drop support for XPure. If someone wants to use State you can only use the parametric one with a fixed state

I'll investigate and report, this is suspicious, If this is really an issue how come no one has surfaced It before.

Actually after thinking a bit more about this the only time this can happen is with XPure, now that It accepts an S parameter, we have the original fail method + the fail method for making an instance of Fail. Can't happen with other transformers since they only expose instances. This is solved by your 4th point so back to the original naming which felt much better!

One example would be XReader

export function Provide<F extends P.HKT>(_: P.Monad<F>) {
  return HKT.instance<FX.Provide<XReaderTF<F>>>({
    provide:
      <R>(r: R) =>
      <X, I, E, A>(fa: XR.XReader<R, HKT.Kind<F, X, I, R, E, A>>) => {
        return pipe(
          fa,
          XR.provideSome(() => r)
        ) as XR.XReader<unknown, HKT.Kind<F, X, I, unknown, E, A>> // <- Cast required, the result is typed XR.XReader<unknown, HKT.Kind<F, X, I, unknown, E, A>>
      }
  })
}

I'll rephrase just to be sure, do you mean:
a. Remove the instances in XPure/index.ts, If someone wants to use S they can default to XState.
b. Modify XPure to drop state handling, people can use StateT if needed.

So, the DSL import issue definitely comes from something I've done. Not sure what yet but I'll find it

Annnd It's fixed, my IDE was drunk, I had imports of @effect-ts/core inside core.

@mikearnaldi I think we're there, I'll have to take at everything again for the peace of mind but everything compiles, and all tests are passing (Ill update the PR with all the notable changes).


[DFJR-1323] Remove choice validator from topics and authors for view more link

View More links contain tags that are not valid for the Activity Log that it links to, breaking the results of the filterable list. That prevents Django from invalidating the form for these topics and/or authors. So, this PR changes the fields used for topics and authors with fields that validate the selection based off the list of any topics or author on the site. This prevents erroneous and potentially dangerous parameters from being passed in, while letting us keep our logic to generate a view more url simple.
Additions

MultipleChoiceField that validated against the list of all tags/authors instead of just the ones listed

Testing

Go to http://www.consumerfinance.gov/activity-log/?filter0_topics=Regulation+V&filter0_topics=Credit+report&filter0_topics=Regulations and see the error and no results
Pull down branch code
Go to http://localhost:8000/activity-log/?filter0_topics=Regulation+V&filter0_topics=Credit+Reporting&filter0_topics=Regulations and see results returned but only Regulations selected for topics
Go to http://localhost:8000/activity-log/?filter0_topics=Regulation+V&filter0_topics=Credit+Reporting&filter0_topics=Regulations&filter0_topics=blahblahblah and see the error.

Review

@richaagarwal
@rosskarchner
@kave

Todos

This probably isn't the best way of handling this, so later we should pull the logic in the form to set all of the topics/authors, queries, page set, etc into a helper file.

so is Regulation V valid or not?

So, Regulation V isn't actually valid for Activity log but we don't show an error for it because it doesn't affect the output of what is valid. The reason we're doing this is because View more links are generated with the current page's tags, regardless of it any particular tag is available in the Activity log.
Before you mention it, yes it makes more sense to how the View more link is generated. And we will! Just not now. There's code that already does this but it's embedded in the form logic, so that's why there's a TODO to make sure something is done about it.

Actually, I'm moving forward with testing the filter which will give us the opportunity to do this in the right way. Closing for future PR on testing and refactoring filters.


refactor foundry-evm

The foundry-evm crate is massive. Compiling it takes more than 4 seconds on simple incremental cargo check builds (which goes to 7 or 8 seconds including rust-analyzer), and over 30 seconds on optimized builds.
Roughly 2 to 3 seconds are spent on each new build on just the abigen! macro invocations, which is most of the time spent in debug checking. Separating these into their own crate would mean they would only need to get expanded once, and much earlier in the build since they only require basic ethers types.
Some other ideas:

further split off from the crate foundry-cheatcodes or foundry-inspector. Also provides a clearer way to contribute to cheatcodes, and could help with tests.

Maybe derive the cheatcodes bindings by compiling the Solidity interface in a build script? Less maintenance burden.

use ethers-* sub-crates instead of ethers
merge utils.rs, decode.rs, error.rs into foundry-utils
remove hashbrown dependency and just use std::collections, because they're the same, minus the hasher. This can be imported separately.

As we add more crates, we should also consider to flatten the project structure into a "crates/" directory.

yes!!!

further split off from the crate foundry-cheatcodes or foundry-inspector. Also provides a clearer way to contribute to cheatcodes, and could help with tests.

100%

As we add more crates, we should also consider to flatten the project structure into a "crates/" directory.

supportive

Closeable? @DaniPopes


First call channelReadComplete(...) before flush(...) for better perf…

…ormance
Motivation:
In Http2ConnectionHandler we call flush(...) in channelReadComplete(...) to ensure we update the flow-controller and write stuff to the remote peer. We should better flip the order and so may be able to pick up more bytes.
Modifications:
Change order of calls.
Result:
Better performance

also @buchgr @ejona86 @carl-mastrangelo ... I noticed this when working on the child channel pr and tried to optimise flushing.

LGTM.
Seems safe enough.  gRPC doesn't actually do writes within read callbacks, (or at least code search doesn't think we do).  All gRPC writes take a thread hop anyways to respond to a write.

Cherry-picked into 4.1 (d56f403c69)


Freshness MS date change

Freshness MS date change

Learn Build status updates of commit e64ab81:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error: GitBranchDeletedOrForcePushed]

Cannot sync git repo to specified commit because ref +refs/pull/103209/merge has been deleted or has been force pushed.
 If this is pull request, please ensure it is mergeable (no merge conflict) and open (not closed).

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Learn Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel


Freeze when navigating and quitting with unfinished auto-analysis

If you load up larger binary (again, xnu kernel), let the auto-analysis run for a while, then start clicking around, some functions will fail to display ('Loading...' forever). I notice that before this happens the cpu usage dips, then spikes back up, and it usually seems to be more time related than activity related. Once you get 'Loading...', even navigating back to functions you've previously view wont work (you still get 'Loading...', but the xrefs do update/change).
Once you're in the dreaded 'Loading...' state, quitting the application will just hang, requiring you to kill the process.

blocking on #272

Fixed in dev


What are the benefits of IgnoreMaxNamespace?

Context
https://github.com/celestiaorg/nmt/blob/4276d172f18c87ebdd18da0cc4b758f0dd164118/nmt.go#L33-L40
Candidates
It appears to reduce the range of an NMT root. Does the reduction in range of an NMT root benefit light clients? Since celestia light clients download the data availability header which contains all row roots, it knows the range of namespaces for each row so it can determine an upper bound for the range of row 2 by looking at the minimum namespace ID of row 3 (even if IgnoreMaxNamespace=false).
One other benefit: does IgnoreMaxNamespace=true reduce the size of an NMT proof by one node?
Questions
Is it necessary to support this feature?

We also discussed of putting this feature into the wrapper as it is kinda confusing without the use-case/Celestia context. That said, it would make the wrapper probably even more complex and confusing too though.

@staheri14 mentioned that the Proofs returned by the NMT assume this feature is enabled so if we remove the IgnoreMaxNamespace feature, we need to confirm that proofs still work.

FWIW this feature appears to have been added in https://github.com/celestiaorg/nmt/commit/8a5e16765dfe09539738aa62a813f70c7dced901 which doesn't list a rationale or motivating issue.

Issues that become obsolete if we remove this feature:

https://github.com/celestiaorg/nmt/issues/148
https://github.com/celestiaorg/nmt/issues/159

No longer a candidate because celestia-node assumes the EDS row roots are constructed with IgnoreMaxNamespace=true so that it can efficiently find which row roots that correspond to a set of namespaced rows.