Feature Request : Optimize Kittens assignment

Original issue https://github.com/oliversalzburg/cbc-kitten-scientists/issues/129 by @wilfriedwoivre

Optimize job assignments of kittens and add more smart method to produce ressources
Prevent Kittens starving
Remove farmer when you have enough catnip
...

IIUC the problem of kitten assignment is actually two problems:

Identify when an assignment is (un)necessary
Identify which assignments are liquid

To give an example:

Science is at its maximum; reassign scholars (1). But, where do they move to? (2)
Science is lacking; we need more scholars (1). But, where do we take scholars from? (2)

These feel like orthogonal problems. I'll try to propose one possible concrete solution for each.
Necessity: Capped vs. uncapped jobs
Most jobs don't really have a cap on their assignments, or have one which is difficult to analyse. For example, woodcutters are always nice to have. Even if wood is ever at its max, workshop automation (with or without scientists) means wood can always be used for something. However, there is such a thing as too few woodcutters: A point where wood production is negative (because of e.g. smelters).
We can identify several jobs which do have a clearer cutoff point:

Farmers: Too few farmers means kittens die, too many and we're moving production away from more profitable jobs
Scholars: No scholars means no science, but once science is sitting at max, they're on the toilet playing Kittens themselves
Woodcutters, miners: Too few is negative production, too many and no special harm done

Therefore, I propose a fairly simple heuristic for when a reassignment is needed:

Farmers are needed when catnip production is negative; unnecessary when it's positive
Scholars are needed when science is not at capacity; unnecessary when it's at capacity
Woodcutters and miners when production is negative; unnecessary when it's positive
Hunters, priests, engineers, and geologists are never "required"

This is something which can be both explained and understood without many "but what if"s.
A job that I feel is left behind are the hunters. Their heuristic could be when furs/ivory hit 0, but that might happen due to deliberate player intervention. So maybe when both furs/ivory are 0 for a portion of time? Considering some edge cases, I thought it better be left off for future iteration.
It can also be argued that geologists are neglected. I haven't personally seen where they're necessary, but they're definitely incredible when in large quantities.
Liquidity: Use the settings
We've identified when a certain job is required, and when it is no longer so. Now we have to answer: When we need a farmer, who do we take it from? And when the farmer is no longer needed, where do we move it to?
Once we've established that pretty much every non-essential job is nice to have, let's try to establish a few base assumptions:

We only ever touch jobs which are enabled in the settings
A poor assignment is better than having a free kitten
The "max" value is not a hard limit on either end; ok to go over, ok to go under
We should never make things worse than they currently are

3 feels like the biggest leap, but we'll get there.
What's our algorithm then? I propose something like the following:
function takeFrom(allJobs, destJob) {
    // We do not take from jobs that are:
    // a. The same as the destination job
    // b. Disabled
    // c. Currently necessary (see Necessary section above)
    const candidates = allJobs.filter(
        (j) => j !== destJob && j.disabled && isCurrentlyNecessary(j)
    );

    // We freely take from jobs with no defined max
    const infinities = candidates.filter((j) => j.max === Infinity);
    if (infinities.length) {
        return randomFrom(infinities);
    }

    // We take from jobs that are above their maximum
    const overflowing = candidates.filter((j) => j.current > j.max);
    if (overflowing.length) {
        return randomFrom(overflowing);
    }

    // As a last resort, take from any ol' job
    return randomFrom(candidates);
}

This hits assumptions 1, 3, and 4 of the above. We never touch disabled or necessary jobs, so we don't leave things off worse than they were.
Note that this doesn't solve when such a reassignment is impossible. For example, the only enabled job is the farmer. During a catnip crisis, only farmers are managed, so nothing can be done. That is up to the caller to detect and handle. There's also a priority problem, discussed in "Why this is bad".
We've only solved half the problem. We figured out how to get another farmer, but what do we do when that farmer is no longer necessary?
I think we can employ a similar algorithm, sort of in reverse:
function whereTo(allJobs, sourceJob) {
    // We only give to jobs which are:
    // a. Different from the source job
    // b. Enabled
    const candidates = allJobs.filter(
        (j) => j !== sourceJob && j.enabled
    );

    // Give to jobs which haven't yet hit maximum
    const underflowing = candidates.filter((j) => j.current < j.max);
    if (underflowing.length) {
        // Sort underflowing by just how much they're missing
        const byMissing = underflowing.sort(
            (j0, j1) => (j1.max - j1.current) - (j0.max - j0.current)
        );
        // Return the most missed one
        return byMissing[0];
    }

    // Distribute to any ol' job
    return randomFrom(candidates);
}

This hits points 1-4 above. We only touch enabled jobs, we respect the max value, and we do whatever when we don't have a stronger heuristic.
Note that we don't need to check for necessary jobs, since we assume those are filled by the core loop (described just below). That may be something that could be done in addition to the existing logic.
Also note that if multiple jobs are uncapped (i.e. max === Infinity) we may not do the smart thing, either always assigning to one job, or assigning at random (which is kinda ok).
Core loop
The core loop for this decision making might look roughly like the following:
function loop(jobs) {
    let direNeed = jobs.find(isCurrentlyMissing);
    if (direNeed) {
        const to = direNeed;
        const from = takeFrom(jobs, to);
        if (from) {
            reassign(from, to);
        }
    }

    let extra = jobs.find(canDoWithout);
    if (extra) {
        const from = extra;
        const to = whereTo(jobs, from);
        if (to) {
            reassign(from, to);
        }
    }
}

This gives us a heuristic that, I think, isn't too difficult to follow. At least I think so at first glance. Over several loops, all necessary jobs will be filled, and all extraneous jobs will be voided. We have to be careful that isCurrentlyMissing and canDoWithout won't ever cancel each other out, creating a cycle like assigning poor Cassie Silk from Farmer -> Miner -> Farmer -> Miner endlessly, or something to that end.
I feel like there are some devils in the details of isCurrentlyMissing and canDoWithout, but this comment is already long enough and I didn't want to make it book-length.
Why this is bad
There are two big things that I feel are lacking in this proposal, but I didn't want to visit before getting feedback first. These are:

There's no priority, and kittens will die. At times of negative catnip production, farmers are clearly more important than anything else. This is not represented in the above algorithm. Given that only farmers and scholars are enabled, and science is not yet at its max, kittens will die.
Scholars are over-allocated. The heuristic of "science isn't at max" is relatively dumb, and it might lead to too many scholars. This feels either like something that needs tuning (e.g. "will reach cap in reasonable time", whatever that is), or that it's fine and will even out over time.

Neither is a hard problem to solve, and I think the rest lays the groundwork for the rest. 1 is adding a priority to jobs and filtering based on that, 2 is seeing how things go and benchmarking. Something to that end.
This suggestion also assumes no changes to scientist settings. There's always the possibility of adding a user-set priority; e.g. prefer assigning to geologists over priests over woodcutters, however that might work. Or maybe ratios. Or cutoff points. It's possible to workshop many improvements.
Sssooo uuuhhhh whadya think?

Those are definitely some good ideas, but I still feel like this is doomed to never result in a solution without edge cases.
In general, to implement more ideal kitten assignment, we need:

The ability to assign more than 1 kitten per tick
Removal of kittens from jobs (those over the max would be good candidates)

If we have those two components implemented, that would gives us room to experiment.


ERROR???

ERROR: Manifest merger failed : uses-sdk:minSdkVersion 21 cannot be smaller than version 24 declared in library [com.journeyapps:zxing-android-embedded:4.0.2] C:\Users\LYD.gradle\caches\transforms-2\files-2.1\8ba3c39e41e98bfcfa34b8df293232d6\zxing-android-embedded-4.0.2\AndroidManifest.xml as the library might be using APIs not available in 21
Suggestion: use a compatible library with a minSdk of at most 21,
or increase this project's minSdk version to at least 24,
or use tools:overrideLibrary="com.google.zxing.client.android" to force usage (may lead to runtime failures)

The error message says it all. The library supports minSdk of 24 by default, so you'll have to use this in your project. If you want to support older versions, follow the instructions in the readme.


[extractor/booyah]  removed

IMPORTANT: PRs without the template will be CLOSED
Description of your pull request and other information

This PR removed booyah.live as the site has been closed.
Fixes #6425
Template

Before submitting a pull request make sure you have:

[x] At least skimmed through contributing guidelines including yt-dlp coding conventions
[x] Searched the bugtracker for similar pull requests
[ ] Checked the code with flake8 and ran relevant tests

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:

[x] I am the original author of this code and I am willing to release it under Unlicense
[ ] I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

[x] Fix or improvement to an extractor (Make sure to add/update tests)
[ ] New extractor (Piracy websites will not be accepted)
[ ] Core bug fix/improvement
[ ] New feature (It is strongly recommended to open an issue first)

https://github.com/yt-dlp/yt-dlp/commit/f7f7a877bf8e87fd4eb0ad2494ad948ca7691114


Shape frontend

Display available shape datasets and render available shape datasets and numbers of shapes within the geo location in response to a query.

All in all looking good. A few nitpicks and then I can pull this in.


F# compiler internal error when try to compile an inherited padded generic class with inline members

Maybe it's a known (compiler) limitation but it seems that an inherited padded generic class with inline members will result compiler internal errors. Please note I already have a struct based field padding implementation - but I would like to also make this work with this object inheritance based padding mechanism. Unfortunately a single class and padding fields will not work, because the JIT free to reorder the fields within a clas but it will not reorder the fields across "inheritance borders".
The non-full example code looks like this:
[<NoEquality; NoComparison>]
[<Class>]
type PaddedReferenceRightPad<'T when 'T : not struct> =
    inherit PaddedReferenceBase<'T>
    val mutable Right: PaddedReferenceRightPadding
    new() = { inherit PaddedReferenceBase<'T>(); Right = PaddedReferenceRightPadding() }
    new(v: 'T) = { inherit PaddedReferenceBase<'T>(v); Right = PaddedReferenceRightPadding() }

[<NoEquality; NoComparison>]
[<Class>]
type PaddedReference<'T when 'T : not struct> =
    inherit PaddedReferenceRightPad<'T>
    new(value) = { inherit PaddedReferenceRightPad<'T>(value) }

    member inline x.Read() =
        GenericOperations.read x.Value

    member inline x.ReadByRef() =
        GenericOperations.readByRef &x.Value

The full example code are available here:
https://gist.github.com/zpodlovics/aa333619a39facdeba90
Compilation will result the following errors
/tmp/fsharpgenericpaddedinlinemember.fs(84,21): error FS0073: internal error: the mustinline value 'Read' was not inferred to have a known value
/tmp/fsharpgenericpaddedinlinemember.fs(87,21): error FS0073: internal error: the mustinline value 'ReadByRef' was not inferred to have a known value
/tmp/fsharpgenericpaddedinlinemember.fs(84,21): error FS1113: The value 'Read' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible
/tmp/fsharpgenericpaddedinlinemember.fs(87,21): error FS1113: The value 'ReadByRef' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible
/tmp/fsharpgenericpaddedinlinemember.fs(84,21): error FS0073: internal error: the mustinline value 'Read' was not inferred to have a known value
/tmp/fsharpgenericpaddedinlinemember.fs(87,21): error FS0073: internal error: the mustinline value 'ReadByRef' was not inferred to have a known value
/tmp/fsharpgenericpaddedinlinemember.fs(84,21): error FS1113: The value 'Read' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible
/tmp/fsharpgenericpaddedinlinemember.fs(87,21): error FS1113: The value 'ReadByRef' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible

Is there any workaround available to use this object inheritance based padding mechanism?
Thanks for your help,
Zoltan

Note, for one of those errors, the error:

error FS0073: internal error: the mustinline value 'Read' was not inferred to have a known value

you do not need to have a padded, or even generic class, it simply happens "always", as soon as you inherit a class and it has any inline method in the derived class. I reported that earlier here, and there's a StackOverflow question that shows this bug has been around since F# 2.0.

Started to investigate this bug, here's my current progress:

When trying to compile the module below the internal error is reported and assertion failures are triggered in line 3058 of Optimizer.fs

let inline foo x = x

type Base<'T>() = class end

type Class<'T>() =
    inherit Base<'T>()

    member inline __.Bar x = foo x

After removing the line inherit Base<'T>() the module is compiled successfully.
Debugging the Optimizer revealed that this expression in the OptimizeLambdas function sets the Info field to UnknownValue, which will cause the IsPartialExprVal function to return true.
There's a comment "can't inline any values with semi-recursive object references to self or base" at the problematic expression, which suggests the fix for this bug might not be trivial.

I think PR #763 contains the fix for this bug.

Have you also seen #763? It contains a fix for my earlier bug #740, which I think is the same issue (though I'm not 100% sure). Would be a pity if you'd be doing the work twice... ;)

Oops, sorry, should've refreshed my window... you found it already ;

Hi, tested the changes in PR #763 on .Net 4.5, it seems that it solves this issue (both the original and the simplified code) compilation succeeds.

Glad to hear it fixes the issue! The PR is in need of test cases, I haven't gotten around to looking into it yet (I'm not that accustomed to the whole process flow yet), but if you have test cases and you want to / can add them for #763, please do.

@KevinRansom ,
Just FYI, if this issue is fixed, (according to previous conversations) we should close this issue. I also think this issue doesn't need to be tracked anymore.
cc @dsyme


Fix issue #52

This fixes issue #52.

Codecov Report

Merging #77 (20230f8) into master (ced94f2) will decrease coverage by 0.42%.
The diff coverage is 97.05%.

@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
- Coverage   80.42%   80.00%   -0.43%
==========================================
  Files           5        5
  Lines         475      485      +10
  Branches       52       55       +3
==========================================
+ Hits          382      388       +6
- Misses         67       70       +3
- Partials       26       27       +1

Impacted Files
Coverage Δ

WinPath/src/Backup.cs
91.14% <97.05%> (+0.48%)
:arrow_up:

WinPath/src/Program.cs
90.83% <0.00%> (-3.34%)
:arrow_down:

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 ced94f2...20230f8. Read the comment docs.

Since you didn't work on any changes I requested and on top it doesn't work, I will be closing this pull request.


[SPARK-50035] Add support for explicit handleExpiredTimer function part of the stateful processor

What changes were proposed in this pull request?
Add support for explicit handleExpiredTimer function part of the stateful processor
Why are the changes needed?
Separate function will provide for cleaner UX and eliminates need for special handling of empty input rows and expired timer validity
Does this PR introduce any user-facing change?
Yes
How was this patch tested?
Existing unit tests
Was this patch authored or co-authored using generative AI tooling?
No

cc - @ericm-db @HeartSaVioR - PTAL, thx !


Try for C++20 constexpr-ness

Try to implement as much C++20 constexpr-ness as possible.

See also #284 adding constexpr algorithms (also down to C++14).

See also #285 which adds significantly more (but not yet all) constexpr-ness.

Basic constexpr-ness is available, but not yet on all functions. These can be handled per-function in future issues.


Add allowBlank to Dropdown

Since @nickw was having issues with the dropdown not defaulting to the
first entry if the value was null (even though the options had a null value in it)
this seems like a good time to add an option to default to the first element of the supplied options
(the prop is called allowBlank) in case the value is not found in the options.
The handling of null/undefined values has been fixed too and if there actually is a value of null
in the options it is correctly selected now.

Alright! Thanks for the PR. I'm just missing here to add this new prop to the documentation. Once it's done we can merge!

Done

Merged manually!


adding adder and hover effect

fixing issue #5

There have a conflict issue. Check it once and recreate the PR. OK


Scrolling not smooth after content height reduced

I've built a chatbot style app and as the content is added scrolling is smooth. However there are certain actions you take can in the chatbot which reduces the height of the content before more content is added, after doing the the scrolling is no longer smooth. It does tend to sort itself after a while.
Is there anything you can think of that would fix this?
This is what I'm using to preform the scroll
    scroll.scrollToBottom({
        duration: AUTO_SCROLL_DURATION,
        smooth: 'easeOutQuint',
        delay: 200,
        containerId: 'scroll-container',
    });

Here an example of the scroll data from the proceedOptions function after the change to the ui which would explain why the animation is no longer smooth, start and target position are the same and the duration hasn't been set.
{
        duration: 1000,
        smooth: 'easeOutQuint',
        containerId: 'scroll-container',
        data: {
            currentPositionY: 0,
            startPositionY: 13786,
            targetPositionY: 13786,
            progress: 0,
            duration: 0,
            cancel: false,
            target: null,
            containerElement: 'div#scroll-container.ChatBot__Scroll',
            to: null,
            start: null,
            deltaTop: null,
            percent: null,
            delayTimeout: null,
        },
        absolute: true,
    }


Commenting platform

Implement a commenting system or integrate with a third-party commenting platform to enable users to leave comments and engage in discussions.

its not currently needed for website


raftstore: attach peer tag to box errors (#6068)

Cherry-pick #6068

@gengliqi tikv3.0 does not support follower read so those condition checks are not necessary.

/run-integration-tests


ERROR in ** is not an NgModule

Please provide us with the following information:

OS?

Windows 7.

Versions.
angular-cli: 1.0.0-beta.28.3
node: 6.9.2
os: win32 x64
@angular/common: 2.4.2
@angular/compiler: 2.4.2
@angular/core: 2.4.2
@angular/forms: 2.4.2
@angular/http: 2.4.2
@angular/material: 2.0.0-beta.1
@angular/platform-browser: 2.4.2
@angular/platform-browser-dynamic: 2.4.2
@angular/router: 3.4.2
@angular/compiler-cli: 2.4.2

### Repro steps.
I'm trying to create a custom component. I've created a HelloWorld simple component based on the follow example:
[]([https://www.npmjs.com/package/angular-sample-module])

**It works successfully when using "angular-cli": "1.0.0-beta.21".**
I don't like using this CLI version due I have problems including css files on angular-cli.json -> styles:[].
And also the import:@import <EMAIL_ADDRESS>it is not recognized.
Maybe, these are a matters of another issue.

**The current one that I'm reporting is using the "angular-cli": "1.0.0-beta.28.3".**

### The log given by the failure.
After compiling in terminal appears `"ERROR in HelloModule is not an  NgModule"`. I cannot load my app on web browser.

### Mention any other details that might be useful.
The dependencies in my package.json are:

  "dependencies": {     "@angular/common": "2.4.2",     "@angular/compiler": "2.4.2",     "@angular/core": "2.4.2",     "@angular/forms": "2.4.2",     "@angular/http": "2.4.2",     "@angular/material": "^2.0.0-beta.0",     "@angular/platform-browser": "2.4.2",     "@angular/platform-browser-dynamic": "2.4.2",     "@angular/router": "3.4.2",     "@angular2-material/button": "^2.0.0-alpha.8-2",     "@angular2-material/card": "^2.0.0-alpha.8-2",     "@angular2-material/checkbox": "^2.0.0-alpha.8-2",     "@angular2-material/core": "^2.0.0-alpha.8-2",     "@angular2-material/icon": "^2.0.0-alpha.8-2",     "@angular2-material/radio": "^2.0.0-alpha.8-2",     "@angular2-material/slider": "^2.0.0-alpha.8-2",     "@angular2-material/tooltip": "^2.0.0-alpha.8-2",     "@types/google-maps": "3.1.28",     "angular-sample-module": "^0.1.2",     "core-js": "^2.4.1",     "rxjs": "^5.0.1",     "ts-helpers": "^1.1.1",     "zone.js": "^0.7.2"   },   "devDependencies": {     "@angular/compiler-cli": "2.4.2",     "@types/hammerjs": "^2.0.33",     "@types/jasmine": "2.5.38",     "@types/jszip": "0.0.31",     "@types/node": "^6.0.42",     "@types/pako": "^0.2.31",     "@types/xml2js": "0.0.32",     "angular-cli": "1.0.0-beta.28.3",     "angular-ide": "^0.9.10",     "codelyzer": "~2.0.0-beta.1",     "jasmine-core": "2.5.2",     "jasmine-spec-reporter": "2.5.0",     "karma": "1.2.0",     "karma-chrome-launcher": "^2.0.0",     "karma-cli": "^1.0.1",     "karma-jasmine": "^1.0.2",     "karma-remap-istanbul": "^0.2.1",     "protractor": "~4.0.13",     "ts-node": "1.2.1",     "tslint": "^4.0.2",     "typescript": "2.0.10"   }
> ---------------------------------------------------------------
> Thanks! We'll be in touch soon.

Please upgrade the CLI version to beta 29, and delete your node_modules folder and run npm install again. See if that helps.

Is the 'HelloModule' in the app itself or in a library?
Also,  you're using an ancient version of angular material.  The package name was changed to @angular/material

The latest version on npm registry is 1.0.0-beta.28.3. I'd upgrade once 29 It'll be avalaible. Many thanks.
The HelloModule is on a library. Thanks for the info about material.

Is the library installed or linked?
Can you list the package.json for the library?

@Pilukina Please update your angular-cli with the following commands:
npm uninstall -g angular-cli
npm clear cache
npm install -g @angular/cli

Navigate to your project directory and do the following command:
ng init

Updated the Angular CLI version and re-init the project (basically I've taken the relevant info from angular-cli and package.json created by ng init).
Still same problem.
My HelloWorld library is linked due It is still not doing any feature new. Just to be sure I've tested with SampleModule provided here:
https://www.npmjs.com/package/angular-sample-module
I'm sure It works with version 21 ("angular-cli": "1.0.0-beta.21"). It could help you to find the bug which happens in all versions after this one.
My package.json dependencies (the full version):
 "dependencies": {
    "@angular/common": "^2.3.1",
    "@angular/compiler": "^2.3.1",
    "@angular/core": "^2.3.1",
    "@angular/forms": "^2.3.1",
    "@angular/http": "^2.3.1",
    "@angular/platform-browser": "^2.3.1",
    "@angular/platform-browser-dynamic": "^2.3.1",
    "@angular/router": "^3.3.1",
    "@angular/material": "^2.0.0-beta.0",
    "@types/google-maps": "3.1.28",
    "angular-sample-module": "^0.1.2",
    "angular2-highcharts": "^0.3.3",
    "atob": "^2.0.3",
    "bootstrap": "^3.3.7",
    "btoa": "^1.1.2",
    "hammerjs": "^2.0.8",
    "highcharts": "^5.0.0",
    "jszip": "^3.1.3",
    "ng2-bootstrap": "^1.1.16-9",
    "primeng": "^1.0.1",
    "xml2js": "0.4.17",
    "xml2js-es6-promise": "1.1.1",
    "core-js": "^2.4.1",
    "rxjs": "^5.0.1",
    "ts-helpers": "^1.1.1",
    "zone.js": "^0.7.2"
  },
  "devDependencies": {
    "@angular/cli": "1.0.0-beta.29",
    "@angular/compiler-cli": "^2.3.1",
    "@types/jasmine": "2.5.38",
    "@types/node": "^6.0.42",
    "@types/hammerjs": "^2.0.33",
    "@types/jszip": "0.0.31",
    "@types/pako": "^0.2.31",
    "@types/xml2js": "0.0.32",
    "codelyzer": "~2.0.0-beta.1",
    "jasmine-core": "2.5.2",
    "jasmine-spec-reporter": "2.5.0",
    "karma": "1.2.0",
    "karma-chrome-launcher": "^2.0.0",
    "karma-cli": "^1.0.1",
    "karma-jasmine": "^1.0.2",
    "karma-remap-istanbul": "^0.2.1",
    "protractor": "~4.0.13",
    "ts-node": "1.2.1",
    "tslint": "^4.3.0",
    "typescript": "~2.0.3"
  }

The package.json of the HelloModule library and the SampleModule library is the same:
>   "dependencies": {},
>   "devDependencies": {
>     "@angular/core": "^2.0.0",
>     "@angular/common": "^2.0.0",
>     "codelyzer": "^0.0.20",
>     "rxjs": "5.0.0-beta.12",
>     "tslint": "^3.15.1",
>     "typescript": "2.0.2",
>     "typings": "^1.0.4",
>     "zone.js": "0.6.23"
>   }

The simple solution is to delete the node_modules directory inside the linked library.
What is happening is that when the library is linked, the angular libraries originating from the dev dependencies are being used.  This results in two different set angular libraries within one application and generally manifests as the error you are seeing.

It works, Thank you so much!

Closing as answered by @clydin. Cheers!


Fix: Redundant context menu on error report action item

Details

Mini context menu and regular context menu still shows on hover/long press/right click even when the report action item has errors. This PR fixes that.
Fixed Issues

$ https://github.com/Expensify/App/issues/16527
PROPOSAL: https://github.com/Expensify/App/issues/16527#issuecomment-1501861820
Tests

Login with any account
Turn off your internet connection
Click FAB icon >> New Chat
Type in an invalid email
Send any message to that chat
Turn on your internet connection
Verify that you cannot send any new message to the chat (i.e. the composer is hidden) and the message shows error
(Web, Desktop only) Hover over the message
Verify that mini context menu won't show
Long press (Native, mWeb) / Right click (Web, Desktop) the message
Verify that the Expensify app custom context menu won't show
(Web, Desktop only) Verify that browser's default context shows instead

<EMAIL_ADDRESS>

[x] Verify that no errors appear in the JS console

Offline tests

Same above
QA Steps

Login with any account
Turn off your internet connection
Click FAB icon >> New Chat
Type in an invalid email
Send any message to that chat
Turn on your internet connection
Verify that you cannot send any new message to the chat (i.e. the composer is hidden) and the message shows error
(Web, Desktop only) Hover over the message
Verify that mini context menu won't show
Long press (Native, mWeb) / Right click (Web, Desktop) the message
Verify that the Expensify app custom context menu won't show
(Web, Desktop only) Verify that browser's default context shows instead

<EMAIL_ADDRESS>

[ ] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android / native
[x] Android / Chrome
[x] iOS / native
[x] iOS / Safari
[x] MacOS / Chrome / Safari
[x] MacOS / Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web

Screencast from 20-04-2023 11:44:12.webm

Mobile Web - Chrome

https://user-images.githubusercontent.com/113963320/233262421-f7eddcdb-6630-4ca6-88f2-9b0dfebd9291.mp4

Mobile Web - Safari

https://user-images.githubusercontent.com/113963320/233284772-9c843e70-889f-4dc9-945c-823f732a8420.mp4

Desktop

https://user-images.githubusercontent.com/113963320/233284755-219ca9c3-74a9-410f-8268-37be873693aa.mp4

iOS

https://user-images.githubusercontent.com/113963320/233535649-bbd7d403-9d75-4e24-948f-34eb18ee173b.mp4

Android

https://user-images.githubusercontent.com/113963320/233340714-e938f788-0591-4df2-971a-dded64722753.mp4

@deetergp Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@maddylewis My bad! Could you please assign the C+ of the issue to this PR? I forgot to attach the issue link before marking it as ready so Melvin might misunderstand it and assigned the wrong reviewer 😅

sure, @tienifr!
who is the C+ assigned to https://github.com/Expensify/App/issues/16527? is that you?

@chiragsalian assigned me and @s77rt was the other C+. Thanks a lot!

I cleaned up the assignee/reviewer list. Also it looks like you've got some merge conflicts.

Reviewer Checklist

[ ] I have verified the author checklist is complete (all boxes are checked off).
[X] I verified the correct issue is linked in the ### Fixed Issues section above
[X] I verified testing steps are clear and they cover the changes made in this PR

[X] I verified the steps for local testing are in the Tests section
[X] I verified the steps for Staging and/or Production testing are in the QA steps section
[X] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[X] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[X] I checked that screenshots or videos are included for tests on all platforms
[X] I included screenshots or videos for tests on all platforms
[X] I verified tests pass on all platforms & I tested again on:

[X] Android / native
[X] Android / Chrome
[X] iOS / native
[X] iOS / Safari
[X] MacOS / Chrome / Safari
[X] MacOS / Desktop

[X] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
[X] I verified proper code patterns were followed (see Reviewing the code)

[X] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[X] I verified that comments were added to code that is not self explanatory
[X] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[X] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[X] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[X] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[X] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[X] I verified the JSDocs style guidelines (in STYLE.md) were followed

[X] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[X] I verified that this PR follows the guidelines as stated in the Review Guidelines
[X] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[X] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[X] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[X] If a new component is created I verified that:

[X] A similar component doesn't exist in the codebase
[X] All props are defined accurately and each prop has a /** comment above it */
[X] The file is named correctly
[X] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[X] The only data being stored in the state is data necessary for rendering and nothing else
[X] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[X] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[X] All JSX used for rendering exists in the render method
[X] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[X] If any new file was added I verified that:

[X] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[X] If a new CSS style is added I verified that:

[X] A similar style doesn't already exist
[X] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[X] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[X] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[X] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[X] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[X] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[X] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Web

https://user-images.githubusercontent.com/16493223/233504810-a59c9c7e-5865-4756-8ad5-eb50126dc6e2.mp4

Mobile Web - Chrome

https://user-images.githubusercontent.com/16493223/233504802-cead8c3d-76d0-4ef5-9d36-95c981c1c406.mp4

Mobile Web - Safari

https://user-images.githubusercontent.com/16493223/233504792-f134e335-d4c2-4209-a125-2fa0b30f8667.mp4

Desktop

https://user-images.githubusercontent.com/16493223/233504417-a8012ca0-5f12-414e-9312-449145d442de.mp4

iOS

https://user-images.githubusercontent.com/16493223/233504409-ade4eaf2-bb1c-4607-b341-1635d173b02c.mp4

Android

https://user-images.githubusercontent.com/16493223/233504396-44f2fd4a-1ff8-47cc-b6b2-cf580961b359.mp4

@tienifr Please fix the Details section, I don't think it's correct, if mini context menu is shown so will the regular context menu. This PR is not about a consistency bug but a general improvement (do not show context menu if we have errors). Also please add test video for iOS.

@s77rt @chiragsalian The conflict has been resolved. Also the PR details & screenshots were updated.

cc @chiragsalian ^

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by https://github.com/chiragsalian in version: 1.3.4-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.4-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


fix: ignore stdin in execa

This stops execa from waiting for stdin, so we no longer just hang forever if someone writes a function that does something cool like cat with no input.
This also moves the execaOptions out of siExec because letting people configure this inside of functions seems rife for mischief.

bors merge


defaultSplits Flag is not Working Anymore

Hi.
We noticed that since version 0.9.0 (commit faa86d02192f17e159e53838c9539a519bb81e34 )
The flag for default filters stoped working.
Fast tracking showed that the change of the options object to null (https://github.com/implydata/pivot/blob/master/src/common/models/data-source/data-source.ts:661) caused this bug.
Commenting it out fixed the problem, but I could not understand what was the reason of nulling the options at this stage.
Can you confirm? Also, why is the null there, if you care to explain.
Thanks!
Lior.

That was an oversight and a mistake.
The point of nulling the options is that it is all server crap and there is no need to send it to the client.
Why would the client want to know about the exact nature of the custom attributes (which can be huge).
I forgot that defaultSplits lived in also I thought they moved to be on dataSource itself.
Will fix and add a test. Thank for spotting the issue.

This should be fixed now (sorry forgot to update the issue)

We already saw and can confirm.
Thank's guys! Great job.


Handle data issue about missing polynomials and polygons for a burst

This PR, in association with the PR in s1-reader here, takes care of some data issues found on Sentinel-1 SAFE frame processed by IPF 002.36

FM rate / Doppler centroid polynomials: When the polynomial list is "out of range" for the burst's sensing start / stop, it extrapolates the polynomials by extending the numbers at the border.

s1-reader has an option to turn on / off the azimuth FM rate correction in that case. In case of CSLC, we decide to do extrapolation.

Missing polygon: In some cases of historical data, the very last burst in a subswath does not have a polygon to approximate its coverage. The new fix on s1-reader fills Sentinel1Burst.border member as an empty shapely polygon. When that happens, COMPASS skips loading that burst

@seongsujeong I believe that PR #212 takes care of the issue in this PR. Do you mind closing this PR if not needed?

Closing this PR as #212 will take care of the issue.


Multi-page variable use doesn't work when parsed to PDF

Here i describe two variable bugs reported by @TheDungeonMathster in the Discord Of Many Things:
1. ~Variables with definition lists defined inside them break html comments~ see #3436
2. Multi-page variable use doesn't work when parsed to PDF
This code works fine in the brew but fails in the PDF render
[foo]:bar

$[foo]

\page

$[foo]

On 2... dammit. I just looked at PrintPage and realized that it effectively uses a copy/paste of the BrewRenderer code, so all of the changes and updates that were made to make variables work across pages just did not get applied to the Print output.
I suspect the best way to fix it will be to extract those functions from the BrewRenderer to a separate component that can then also be accessed from PrintPage, so that the functions only exist in one place and any future changes effect both renders.

This issue needs to be split into two unrelated issues, because the first thing has nothing to do with variables.

Print page does not exist anymore, so... issue fixed!


New package: MultivariateCreativeTelescoping v1.0.0

Registering package: MultivariateCreativeTelescoping
Repository: https://github.com/HBrochet/MultivariateCreativeTelescoping.jl
Created by: @HBrochet
Version: v1.0.0
Commit: a3c8a7bd46aa036b633587f10a8cdffb7a68ddef
Reviewed by: @HBrochet
Reference: https://github.com/HBrochet/MultivariateCreativeTelescoping.jl/commit/a3c8a7bd46aa036b633587f10a8cdffb7a68ddef#commitcomment-147800470
Release notes:

Registration to Julia's general registry.

[noblock] I would recommend putting the introductory paragraph from your documentation also into your README. It's always good to give people an idea of what the package does without having to click through to the documentation.
Also: Are you sure you want to tag this as v1.0? That would be contradictory to the statement in your README "This package is still in development". A package tagged at v1.0 should have a stable API that is fully documented, a test suite with reasonably good coverage (on the order of 80%, maybe), and it should be relatively complete, with respect to the scope that it defines for itself. Releasing an "early version" would typically be v0.1. Note that you can always switch from any v0.x version to v1.0 as soon as the package is stable. Tagging v1.0 is not a "breaking change".

[noblock] Thank you for your recommendation. I applied both of them.
I made a new call to the registrator bot
but it created a new pull request at https://github.com/JuliaRegistries/General/pull/116987.


Focus events getting lost?

Hey, I need something to update when a widget looses focus and I can do that with something simple like
class CustomRangeSlider(QtWidgets.QSlider):
    def focusOutEvent(self, event):
        # Call the base class focusOutEvent method
        super().focusOutEvent(event)
        # Handle the focus loss here
        print("lost focus")

But if I try that with any superqt slider it looks like this signal is never sent? Or is superseded or intercepted by something?
I tried setting the Focus Policy using
rangeSlider.setFocusPolicy(Qt.FocusPolicy.ClickFocus)
and tried looking at events by using
class QLabeledRangeSlider_(QLabeledRangeSlider):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
    def event(self, ev: QEvent) -> bool:
        print("_"*20)
        print(f"{ev.type()}")
        print("_"*20)
        if ev.type() in [QEvent.Type.FocusIn, QEvent.Type.FocusOut]:
            print("Focused in/out")
        if ev.type() == QEvent.Type.WindowActivate:
            self.update()
        elif ev.type() in (QEvent.Type.HoverEnter, QEvent.Type.HoverMove):
            self._updateHoverControl(self._event_position(ev))
        elif ev.type() == QEvent.Type.HoverLeave:
            self._hoverControl = QtWidgets.QStyle.SubControl.SC_None
            lastHoverRect, self._hoverRect = self._hoverRect, QRect()
            self.update(lastHoverRect)
        return super().event(ev)

But I just don't understand what is going on or why the focus event wouldnt be showing up anywhere.
I'm really lost here if anyone could point me in the right direction I would really appreciate it.

hi and thanks for the clear issue.
Interestingly, your first example also doesn't work if you subclass from QAbstractSlider (which is what we subclass for our sliders):
class CustomRangeSlider(QtWidgets.QAbstractSlider):
    def focusOutEvent(self, event):
        # Call the base class focusOutEvent method
        super().focusOutEvent(event)
        # Handle the focus loss here
        print("lost focus")

so I need to look into the C code to see why it's different.

aha, it's this line right here:
https://github.com/qt/qtbase/blob/568ab62185bfa7876db4d8804101a8f946b04898/src/widgets/widgets/qslider.cpp#L46
will add it to our own labeled sliders.

#175 should fix it for you, but in the meantime, and until the next release, you should be able to fix it locally by calling:
slider.setFocusPolicy(QtCore.Qt.FocusPolicy.TabFocus)

on your slider instance


[Bug Fix] include correct files, and improve gemspec

This PR includes the correct files in the gemspec -- the previous 'fix' didn't work.
It also adds license information, and deals with a number of other warnings that occurred when building the gem.

LGTM


Send post webhook even if backup dir does not exist

Summary
Fixes https://github.com/vshn/wrestic/issues/106

Checklist

[x] Keep pull requests small so they can be easily reviewed.
[x] Categorize the PR by setting a good title and adding one of the labels:
bug, enhancement, documentation, change, breaking,
as they show up in the changelog
[ ] Update the documentation.
[ ] Update tests.
[x] Link this PR to related issues.

@Kidswiss I have NOT tested or reproduced this due to lack of test environment. I think you would know best if that is potentially a hotfix or not :smile:

Yeah that should send a webhook.
As the webhook contains all the snapshots in a given repository it should also contain the snapshots from the pre-backup command.


Linux fixes

https://github.com/Cyberbeni/TypedNotificationCenter/runs/323701075
package tool version update is needed for if swift 5 to work
fixed failed/passed/measured regexes for linux
compile/link/etc. messages still don't work on linux

#20

Will also delete the swift 4 regexes, they should be kept up to date on a different branch if necessary.

All right, I'm done with the most important regexes, for the rest I think it's best to update the tests first to run xcode/swift builds and expect formatted output to be correct.

@Cyberbeni Could you update the changelog?


Use meta key + wheel to zoom in/out

Borrowed the idea from figma (:

Nice 👌

Looks good to me 👍

On my mouse which doesn't have high-precision wheel, the step is 100.

@dwelle we shall try this https://www.npmjs.com/package/normalize-wheel to fix wheel issues

That won't help, that's just a cross-browser normalization (I tried it just to be sure). We'll need to multiply the deltaY by some factor (for really high precision wheels), and clamp it from bottom and top.

I'll make a PR.


Feature/embed video blocks

Please always provide the GitHub issue(s) your PR is for, as well as test URLs where your change can be observed (before and after):
Fix #
Test URLs:

Before: https://main--24petwatch--hlxsites.hlx.page/testpage
After: https://feature-embed-video-blocks--24petwatch--hlxsites.hlx.page/testpage

merging the branch despite a low PSI score as this embed script loads differently from each service.


ERROR  Warning: bound renderChildren: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.

 ERROR  Warning: bound renderChildren: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
    in bound renderChildren (created by ListElement)
    in RCTView (created by View)
    in View (created by TDefaultBlockRenderer)
    in TDefaultBlockRenderer (created by ListElement)
    in ListElement (created by ULElement)
    in ULElement (created by ULRenderer)
    in ULRenderer (created by MemoizedTNodeRenderer)
    in MemoizedTNodeRenderer
    in TNodeChildrenRenderer (created by MemoizedTNodeRenderer)
    in RCTView (created by View)
    in View (created by MemoizedTNodeRenderer)
    in MemoizedTNodeRenderer
    in TNodeChildrenRenderer (created by MemoizedTNodeRenderer)
    in RCTView (created by View)
    in View (created by MemoizedTNodeRenderer)
    in MemoizedTNodeRenderer
    in Unknown (created by RenderTTree)
    in RenderTTree (created by SourceLoaderInline)
    in SourceLoaderInline (created by RawSourceLoader)
    in RawSourceLoader (created by RenderHtmlSource)
    in RenderHtmlSource
    in RCTView (created by View)
    in View (created by Animated(View))
    in Animated(View) (created by TouchableOpacity)
    in TouchableOpacity (created by TouchableOpacity)
    in TouchableOpacity (created by HTML)
    in HTML (created by AvalancheTab)
    in RCTView (created by View)
    in View (created by AvyViewWrapper)
    in _c (created by VStack)
    in _c (created by CollapsibleCard)
    in RCTView (created by View)
    in View (created by Animated(View))
    in Animated(View) (created by Collapsible)
    in RCTView (created by View)
    in View (created by Animated(View))
    in Animated(View) (created by Collapsible)
    in Collapsible (created by CollapsibleCard)
    in RCTView (created by View)
    in View (created by AvyViewWrapper)
    in _c (created by VStack)
    in _c (created by Card)
    in RCTView (created by View)
    in View (created by AvyViewWrapper)
    in _c (created by Card)
    in RCTView (created by View)
    in View (created by Animated(View))
    in Animated(View) (created by TouchableOpacity)
    in TouchableOpacity (created by TouchableOpacity)
    in TouchableOpacity (created by Card)
    in RCTView (created by View)
    in View (created by AvyViewWrapper)
    in _c (created by Card)
    in Card (created by CollapsibleCard)
    in CollapsibleCard (created by AvalancheTab)
    in RCTView (created by View)
    in View (created by AvyViewWrapper)
    in _c (created by VStack)
    in _c (created by AvalancheTab)
    in RCTView (created by View)
    in View (created by ScrollView)
    in RCTScrollView (created by ScrollView)
    in AndroidSwipeRefreshLayout (created by RefreshControl)
    in RefreshControl (created by AvalancheTab)
    in ScrollView (created by ScrollView)
    in ScrollView (created by AvalancheTab)
    in AvalancheTab (created by AvalancheForecast)
    in Tab (created by AvalancheForecast)
    in RCTView (created by View)
    in View (created by AvyViewWrapper)
    in _c (created by VStack)
    in _c (created by TabControl)
    in TabControl (created by AvalancheForecast)
    in RCTView (created by View)
    in View (created by AvyViewWrapper)
    in _c (created by VStack)
    in _c (created by AvalancheForecast)
    in AvalancheForecast (created by ForecastScreen)
    in RNCSafeAreaView
    in Unknown (created by ForecastScreen)
    in ForecastScreen (created by SceneView)
    in StaticContainer
    in EnsureSingleNavigator (created by SceneView)
    in SceneView (created by SceneView)
    in RCTView (created by View)
    in View (created by DebugContainer)
    in DebugContainer (created by MaybeNestedStack)
    in MaybeNestedStack (created by SceneView)
    in RCTView (created by View)
    in View (created by SceneView)
    in RNSScreen (created by Animated(Anonymous))
    in Animated(Anonymous) (created by InnerScreen)
    in Suspender (created by Freeze)
    in Suspense (created by Freeze)
    in Freeze (created by DelayedFreeze)
    in DelayedFreeze (created by InnerScreen)
    in InnerScreen (created by Screen)
    in Screen (created by SceneView)
    in SceneView (created by NativeStackViewInner)
    in Suspender (created by Freeze)
    in Suspense (created by Freeze)
    in Freeze (created by DelayedFreeze)
    in DelayedFreeze (created by ScreenStack)
    in RNSScreenStack (created by ScreenStack)
    in ScreenStack (created by NativeStackViewInner)
    in NativeStackViewInner (created by NativeStackView)
    in RCTView (created by View)
    in View (created by SafeAreaProviderCompat)
    in SafeAreaProviderCompat (created by NativeStackView)
    in NativeStackView (created by NativeStackNavigator)
    in PreventRemoveProvider (created by NavigationContent)
    in NavigationContent
    in Unknown (created by NativeStackNavigator)
    in NativeStackNavigator (created by SceneView)
    in StaticContainer
    in EnsureSingleNavigator (created by SceneView)
    in SceneView (created by BottomTabView)
    in RCTView (created by View)
    in View (created by Screen)
    in RCTView (created by View)
    in View (created by Background)
    in Background (created by Screen)
    in Screen (created by BottomTabView)
    in RNSScreen (created by Animated(Anonymous))
    in Animated(Anonymous) (created by InnerScreen)
    in Suspender (created by Freeze)
    in Suspense (created by Freeze)
    in Freeze (created by DelayedFreeze)
    in DelayedFreeze (created by InnerScreen)
    in InnerScreen (created by Screen)
    in Screen (created by MaybeScreen)
    in MaybeScreen (created by BottomTabView)
    in RNSScreenContainer (created by ScreenContainer)
    in ScreenContainer (created by MaybeScreenContainer)
    in MaybeScreenContainer (created by BottomTabView)
    in RCTView (created by View)
    in View (created by SafeAreaProviderCompat)
    in SafeAreaProviderCompat (created by BottomTabView)
    in BottomTabView (created by BottomTabNavigator)
    in PreventRemoveProvider (created by NavigationContent)
    in NavigationContent
    in Unknown (created by BottomTabNavigator)
    in BottomTabNavigator (created by BaseApp)
    in RCTView (created by View)
    in View (created by BaseApp)
    in PortalProviderComponent (created by SelectProvider)
    in SelectProvider (created by BaseApp)
    in KillSwitchMonitor (created by BaseApp)
    in FeatureFlagsProvider (created by BaseApp)
    in RCTView (created by View)
    in View (created by PostHogProvider)
    in PostHogProvider (created by BaseApp)
    in EnsureSingleNavigator
    in BaseNavigationContainer
    in ThemeProvider
    in NavigationContainerInner (created by BaseApp)
    in RNCSafeAreaProvider (created by SafeAreaProvider)
    in SafeAreaProvider (created by BaseApp)
    in RenderersPropsProvider (created by RenderHTMLConfigProvider)
    in ListStyleSpecsProvider (created by RenderHTMLConfigProvider)
    in SharedPropsProvider (created by RenderHTMLConfigProvider)
    in RenderRegistryProvider (created by RenderHTMLConfigProvider)
    in RenderHTMLConfigProvider (created by HTMLRendererConfig)
    in TRenderEngineProvider (created by HTMLRendererConfig)
    in HTMLRendererConfig (created by BaseApp)
    in BaseApp (created by AppWithClientContext)
    in PreferencesProvider (created by AppWithClientContext)
    in AppWithClientContext (created by App)
    in IntlProvider (created by App)
    in QueryClientProvider (created by PersistQueryClientProvider)
    in PersistQueryClientProvider (created by App)
    in App (created by RootApp)
    in ReactNativeProfiler (created by RootApp)
    in RCTView (created by View)
    in View (created by __Sentry.TouchEventBoundary)
    in __Sentry.TouchEventBoundary (created by RootApp)
    in RootApp (created by withDevTools(RootApp))
    in withDevTools(RootApp)
    in RCTView (created by View)
    in View (created by AppContainer)
    in RCTView (created by View)
    in View (created by AppContainer)
    in AppContainer
    in main(RootComponent)

This is caused by https://github.com/meliorence/react-native-render-html/issues/661 and requires a new release of the package, it's already fixed there.


[IOTDB-6100] Pipe: Fix running in hybrid mode will cause wal cannot be deleted & some pipe data lost due to wrong ProducerType of Disruptor

Fix: Running in hybrid mode will cause wal cannot be deleted
Fix: some pipe data is lost due to wrong ProducerType of Disruptor

coverage: 47.904% (-0.03%) from 47.936% when pulling cf5737fcf3d451e317dcfa4d797c32e42020c961 on fix-pipe-ref-issue into 09f9bcfedf68d619f5bd6250b4603e3126b6d855 on master.


How to make new line from flutter autocomplete textfield

Hi, i have very long text when i input back to autocomplete text field it is on the same line and do not wrap new line.  How to make text auto-wrap when it's too long. Thanks all

Hi!
You can use "\n" for new lines. Try this:
itemBuilder: (context, item){
	return ListTile(
		title: Text("This is a title"),
		subtitle: Text("Lorem ipsum dolor sit amet,\nconsectetur adipiscing elit,\nsed do eiusmod tempor\n incididunt ut labore et\n dolore magna aliqua"),
	);
},

Check the "\n" in subtitle property.


Add Nix flake feature support

you can find the PR here. https://github.com/GTrunSec/vast/blob/nix-flake/flake.nix
@tobim  but the   echo -n $(git describe --tags --long --dirty) > $out would not be passed in hydra.
nix flake build with git info : nix build path:<path/vast> (passing way without hydra CI)
copying path '/nix/store/xz5hq6y8raz288ya0lwxpz3gbaadgyra-git-2.30.0' from 'https://cache.nixos.org'...
error: "\u001b[31;1merror:\u001b[0m\u001b[34;1m --- Error --- hydra-eval-jobs\u001b[0m\na '\u001b[33;1maarch64-linux\u001b[0m' with features {\u001b[33;1m\u001b[0m} is required to build '\u001b[33;1m/nix/store/v08h0wgdsmb2x7r88f50k2i0a9pnai52-gitDescribe.out.drv\u001b[0m', but I am a '\u001b[33;1mx86_64-linux\u001b[0m' with features {\u001b[33;1mbenchmark, big-parallel, nixos-test, recursive-nix\u001b[0m}"
error: --- EndOfFile --- hydra-eval-jobs
unexpected EOF reading a line

flake feature commands:

nix build github:GTrunSec/vast/nix-flake
nix run github:GTrunSec/vast/nix-flake
nix develop github:GTrunSec/vast/nix-flake

or run native nix-build and nix-shell under repo of vast.
Second, add multi-arch CI test with Hydra:

WIP: rewrite vast module for deploy service on NixOS

the Systemd of vast  based on  https://github.com/tenzir/vast/blob/master/systemd/vast.service and https://github.com/GTrunSec/simple-service-flake/blob/master/flake.nix
simple enable vast as following:
  services.vast = {
    enable = true;
    settings = {
      log-file = "/var/lib/vast/server.log";
       ## with custom settings
    };
  };

That is really nice. I refrained from adding flakes support so far because the feature is not included in stable nix yet. I think it's best to wait for that release, let's hope it won't be much longer :). I'm looking forward to playing with your flake!

Thanks for your reply. It does matter PR or Not. It just a try to integrated Zeek with vast via NixOS's module(flakes). Furthermore, I'm going to add a flake feature to the threabus. Doing incident-response(all process) in NixOps.


[TextAnalytics] Default authentication to Token Credential

Contributing to the Azure SDK
Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.
For specific information about pull request etiquette and best practices, see this section.

API change check
API changes are not detected in this pull request.


add new keytype test for EVP_PKEY_Q_keygen

Fixes https://github.com/openssl/project/issues/842

Ping @t8m

This pull request is ready to merge

Pushed. Thanks.

Many 10x @baentsch, good to know that EVP_PKEY_Q_keygen is useless in all OpenSSL 3+ releases.

Many 10x @baentsch, good to know that EVP_PKEY_Q_keygen is useless in all OpenSSL 3+ releases.

It's not useless; it's just supporting exclusively those key types mentioned in the documentation and none other. You have a point, though, in that the documentation could be more clear about this: Created https://github.com/openssl/openssl/pull/26040 to fix that.


Gates are not strong enough

The main Gates are not strong enough

Yes, agree - it has some weak points to consider as a wholes

The issue is still valid - Gates remain weak and cannot save people from machines


Any models that we need to add?

@x-tabdeveloping  and @Muennighoff, are there any representative models that we need to add before a publication?
I could see mBERT and XLM-R as naive multilingual encoder baselines (xlm-r would probably be enough).

I suggest adding LaBSE, especially for the Bitext Mining tasks as it's No 1 for English-X but we don't have it for Danish Bitext Mining. It's also not bad on other multilingual tasks

Yea LaBSE is a solid model to add (#80)

I have a couple of suggestions:

Voyage, because they perform very well on MTEB and they also have some of their own benchmarking datasets, on which they outperform a lot of models that do fine on MTEB
Jina because it has 8000 context length.

Both sound like great candidates. Feel free to add those as well.

I think we need to get an API key from Voyage, maybe we could ask them to give us a free one as we're using it for research purposes. I can do that if that sounds good to you.

Sounds perfect. Send a mail. It is an English model as I understand so it is not the most important model (though it seems like it performs quite well)

Email sent. Waiting for the response :)

We might also consider adding the AngLE model due to its high performance on MTEB.

We can def. add an embedding model
I believe we should at least add a few baseline model for the dataset (simcse, angleIE). We already have the simcse.
@Muennighoff You mentioned that you had some ideas as well?

Do you mean ideas regarding more models besides labse etc?

Ahh sorry misunderstood @x-tabdeveloping. Thought he wanted to train an embedding model.

Will close this for now. @x-tabdeveloping feel free to open a PR/issue for the angIE models


Fix permissions to make sure os-selector and other config files are editable by admin user

Previously only directories had right permission and the file
permissions were set by some other internal playbook - but this playbook
is the right place for perms on ztp related files..

Coverage remained the same at 71.037% when pulling 3779d167fcd408ac913c71ffac4128db5ee02f5b on rags-fix-perms into 996dab49648e8d0f8df7e67a06fa5850ea0d6ba2 on master.


Update default History_Limit to 50

The default 100 is causing error when loading the wallet transactions history.
[error] Error: Error querying the blockchain
[Error: Error querying the blockchain]
This is BWS log showing the error:
WARN REQUEST FAIL: https://insight.bitpay.com:443/api/addrs/txs?from=0&to=100 STATUS CODE: 503
WARN Insight https://insight.bitpay.com:443/api/addrs/txs?from=0&to=100 Returned Status: 503
ERR! /v1/txhistory/?r=69638 :500:Error querying the blockchain

Coverage remained the same at 82.125% when pulling 48cc135185be685d534ae3f6780c3fa652d29c13 on got3nks:patch-1 into 61ffe309f8e0c59aec8568c40303f5428e2f88be on bitpay:master.

ACK


Test code versioning for CI use

Hi!
When an application under test is deployed to the selected environment all tests, test artifacts, and test data required for the run need to be used in the corresponding version to reassure there are no false negatives test results. When development break automated tests correction actions need to be performed and saved in the context of this app version, so if this application is deployed to another environment correct version of tests is used.
Can think about a couple of different strategies here some related to test naming/authoring and some based on git. Currently, I have one repository with all test without branches.
What is the best practice related to test code versioning with open test and switching it in relation to the environment?

If I understood your question correctly, you need the ability to execute tests selectively, based on the environment you are running against.  None of the teams I worked with needed this ability so far, and this seems like something that should be avoided, if possible, but it sounds like you don't have that luxury.
There are some ways to accomplish this, some of which you probably know already. One way to do this that might give you some more flexibility is to use test tags - not sure if you're aware of this feature. If you have certain tests that should only run in certain environments, you can tag those tests using the tags property in the test file, like this:
description: A test to run selectively
tags: [env1, env3]
actors:
  - actor: WEB
    segments:
      - segment: 1
        actions:

You can create test session templates that run the tests based on their tags. This is currently not so well documented, but go to the  test session templates page on the project's website and look for includeTestsWithTags. Let me know if you need more information.
For example, a session template that runs just the tests compatible with environment env1 would look like this:
sessionLabel: Tests for env1
includeTestsWithTags: env1

Alternatively, you could also run all tests except those intended for env1, but putting a ! in front of the env1 tag:
sessionLabel: All tests except the ones for env1
includeTestsWithTags: !env1

Hope I understood your question right and that the information is helpful.

I was not aware of 'includeTestsWithTags' functionality in OpenTest, looks very useful and for sure will give it a go. It could be helpful to organize templates from outside.
But still this is not a solution for my challenge. I'll use an example to illustrate this better.
Background.
Let's say we have a story we are testing as a part of regression:
As a flyer, I should be able to search flights.,
and to test this we have an automatic test:
Log in and search for flights.
This test is added to the regression template and is executed after each build. Test uses env specific configuration with 'url' parameter and locators valid for each environment. Deployment of every story normally is done in below sequence for both automatic and manual checks:
INT (story level)
TEST (develop level)
STAGING (release candidate)
PROD  (release)
In this simple example, let's have 2 releases at the same time on deck.

First 'R1' is already on staging almost ready for deployment, all regression related tests are green.
Second 'R2' release is just starting with only 2 changes.
One of the stories 'R2S1' is just reaching INT for the first time. Storie requires a test change. It is not just locator (stored in data file related to the environment), a test flow needs to be changed - the search field now needs to be initiated to be visible.
 This story also needs to be tested several times on INT as a  part of regression using 'old version' of test scenario on the same environment.

Questions.
How to implement changes in Log in and search for flights test to meet below requirements:
Q1 from 'R2S1' point of view, results will be green on INT, at the same time having regression on staging untouched?
Q2  from 'R2S1' point of view, opentest repo will include the correct version of the test after each deployment to any env.?
Q3 from 'R2S2' point of view, during the first deployment of this story, regression test results will be green on INT (before code merge with R2S1)?
Q4 on INT 'R2S2' /'R2S1' will be deployed several times during bug change, how to support that?
Comments
New test flow = new test name rule seems to be the obvious choice. But this means we need to use a dynamic suite per env, changed as a part of CI process.
Alternatively, test name could be the same. For each env we could have a tests-env as we have now for data. Each folder in tests-env could have own story related repo. When deployment triggered as one of the steps repo could be pulled from GIT from the chosen branch.
Please let me know if I'm missing/overcomplicating something here and this can be done otherwise. :)

I think what you are describing here is a very common scenario - a change that is introduced in the application under test, that breaks one or more existing tests. There are multiple ways to deal with this, but I will only list the ones that I think you might want to consider. The best choice depends on your particular use case:

If you find that the changes required to your tests to make them pass with R2 are fairly minor, you could actually make them compatible with both releases. For example, if R2 requires that you first click on the search field before typing into it, you could add a "Click" action just before the "SendKeys" and it will most likely not have any impact on R1. If you have a scenario where such a change would impact R1, you could use the $if global argument to make the action only run for R2, or use the $optional argument to avoid failing the test if one particular action fails. More information here.

If your team is fairly comfortable with Git concepts and workflows, you could use Git branching and treat your test code the same way as the application code. Basically, you would create an r2 branch in your test repo and you would keep all the changes needed for R2 in that branch. In your CI pipeline, you can then git checkout the r2 branch whenever running tests against the R2 release.

One other option would be to use different test names for R1 and R2, as you suggested. For example Log in and search fights R1.yaml and Log in and search fights R2.yaml. You can then create separate test session templates for R1 and R2 and start test session by using the right session template in CI, depending of the application version you are testing against. This is probably the simplest solution of all and the downside of it is that it requires some work for maintaining the session templates. However, if your naming convention is simple enough, this is just a simple "find and replace" job.

Introducing a tests-env directory might confuse a lot of people and it might also introduce some problems like code duplication (e.g. when you have two environments both running R2, you'd need to copy & paste the R2 tests in two different directories in tests-env). However I'll start asking around to see what other people have to say about this proposal. In the meantime, does any one of the three options I enumerated seem like a good fit for your problem?

I think I'll use an approach based on naming convention, the simplest solution is always the best, although this one is not perfect. My plan was to prepare a template for each pipeline and not change the name of it. I'll give it a go. Thanks!


Change hostname pattern

related with https://github.com/PeculiarVentures/csrhelp/issues/35 and https://github.com/PeculiarVentures/csrhelp/issues/42

@donskov thanks :)


Improvements to stage strike app

Api side: export player names and receive match score
App side:

start set with 2 options: starting player (p1/p2), or "random"
show player names instead of P1/P2
send current game count to the api

The app should probably display an option to choose the first player to ban since in most offline tournaments, this is decided via a round of Rock-Paper-Scissors

Done!


V2.0 Candidate - Modular Implementation

This PR consolidates a few changes made in order to make the library
A) JDK 11 Compatible, and
B) Modular
The following changes are in this extremely large PR

Remove sealed and non-sealed declarations in classes to make JDK 11 Compatible

Convert records back to final classes for JDK 11 Compatibility

Don't use custom/vendor-specific validation annotations for fields

@NotNull moved to jakarta.validations packages
@Nullable removed entirely as Java default is Nullable. No annotation should be specified, and it doesn't override any inherited @NotNull validation

Tyrus web socket support changed for modular jakarta.websockets, removed non-modular glassfish dependency

@Beta annotation removed, take a look at

Reflections updated to Duke-choice winner ClassGraph

Reflections has no support for the JRT filesystem, which is the base for any JDK 9 and up distribution
Reflections is no longer maintained, javassist and the type are undergoing major refactoring for support

Modular with JMod/JLink support for JDK 9^ distributions

I believe I've kept your architecture and style, and haven't changed the operation of any method (maybe the reflections piece a little)
Please give some consideration, Will post the maven co-ordinates for the release in a bit

WhatsappTest.zip

Superseded by #14


Add codeowners for transceiver

Pull Request Functional Test Report for #3651 / 8ad5fa76531a79e288c35958758248539880a133
No tests identified for validation.
Help

Pull Request Test Coverage Report for Build<PHONE_NUMBER>4
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 55.268%

Totals

Change from base Build<PHONE_NUMBER>0:
0.0%

Covered Lines:
1983

Relevant Lines:
3588

💛  - Coveralls


Add files via upload

Figured just uploading everything was the easiest way to include dependencies.
Learned how to do this from the Week 3 JavaFx vids on canvas.
Weird setup regarding JavaFx you have to do that crucial "VM" step.

Request Closed, Merge to Dev Branch please.


Extension can no longer be found in the azure extension list

Previously, the steps to enable this extension on an azure web app would be to go to the extensions blade, click add, and then find this extension in the list.
The extension can no longer be found in the list, what happened?

Encountering the same issue as above


update copyrightoverlay license header

Update license of file according to https://github.com/osmdroid/osmdroid/issues/1693#issuecomment-995530625

cc @billthefarmer


argocd version

Hi
I can't seem to find info about which version of argocd  this operator builds on.  Which version is it today? And, if  not version 1.8 already, when do you plan to release that version with the gitops operator?

@fredcb it is 1.8.7 currently and we have a GA planned this month which is planned for argo-cd 2.0.

Very good! Thanks for quick answer!


Gradle build failing

It seems after the merge of #947 buils are failing with the following error:
Execution failed for task ':app:transformClassesWithMultidexlistForObfDebug'.
> java.io.IOException: Can't write [/home/travis/build/openfoodfacts/openfoodfacts-androidapp/app/build/intermediates/multi-dex/obf/debug/componentClasses.jar] (Can't read [/home/travis/build/openfoodfacts/openfoodfacts-androidapp/app/build/intermediates/transforms/desugar/obf/debug/27.jar(;;;;;;**.class)] (Duplicate zip entry [27.jar:android/support/design/widget/CoordinatorLayout$Behavior.class]))

I'll work on this one


fix: renables and fixes DetectIntentTextsTest

Changes DetectIntentTextsTest so that it checks for snippet string literals rather than API output.
Note: This PR partially re-enables tests for the Dialogflow project (see #947). It filters the tests to select only the DetectIntentTextsTest.  I will adjust the filter as I re-enable more of the DF tests.
Fixes #935

It looks like some unrelated tests are failing (IAM) :(.

I will force merge. IAM failures are because we have blown quota.

Yay! Thank you.


Test that apache_beam is installed in the forge image

conda-lock doesn't actually install any pip packages I
believe.

/condalock

Something super funky is going on here.
$ mamba install -c conda-forge apache-beam-with-gcp
$ mamba list | grep beam
apache-beam               2.40.0           py39hb9d737c_0    conda-forge
apache-beam-with-gcp      2.40.0           py39hf3d152e_0    conda-forge
$ python3
Python 3.9.13 | packaged by conda-forge | (main, May 27 2022, 16:56:21)
[GCC 10.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import apache_beam
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'apache_beam'
>>>

/condalock

As expected, https://github.com/pangeo-data/pangeo-docker-images/runs/7547348518?check_suite_focus=true fails - https://github.com/conda-forge/apache-beam-feedstock/pull/52 should fix it!

/condalock

https://github.com/pangeo-data/pangeo-docker-images/pull/362/commits/2542609d25955c3f371485da71a29a77246fa610 made it pass, yay! So I think https://github.com/conda-forge/apache-beam-feedstock/pull/52 will definitely fix it I think.

conda-lock doesn't actually install any pip packages I believe.

In theory after v1.0 it does https://conda-incubator.github.io/conda-lock/pip/ ! But support for all the pip syntax isn't fully supported. This appears to work though:
Use new conda-lock.yml format to deal with both conda and pip packages:
conda-lock lock -p linux-64
conda-lock install -n test
# Note also you can render conda-compatible lockfiles `conda-lock render -k env`, but there is a warning about how these don't necessarily preserve identical environments

I think it could be worth supporting conda-lock.yml files here:
https://github.com/pangeo-data/pangeo-docker-images/blob/3d0d6eeae9e6ded756bc5f6137aace43151524c8/base-image/Dockerfile#L156
see also #306
But also it's great to fix the conda-forge version not mix with pip, so thanks for doing that!

/condalock

Thanks a lot, @scottyhq! I removed the explicit dependency as my conda-forge PR was merged, and the tests pass now! \o/

Agree that switching to the yaml format is probably better!


Vulnerability : Server-Generated ACAO Header From Client-Specified Origin header

https://github.com/fjykTec/ModernWMS/blob/62e17273fc96095e9e2210b73e5f1de7a37b9260/backend/ModernWMS.Core/Middleware/CorsMiddleware.cs#L38-L51
The client's Origin header is reflected in the Access-Control-Allow-Origin header from the server, granting any domain access to CORS resources. There should be a white-list in the configuration that lists allowed Origin headers.
The issue is made worse with "Access-Control-Allow-Credentials: true". Now that any domain can access the endpoints, they also can also authenticate as another user. This can be done by sending a crafted link to a user who is logged in (presumably, unless session token is persistent) - once clicked, the script would send a CORS request to sensitive endpoints and the browser would send along their cookies since "Access-Control-Allow-Credentials: true" is set.
More info on vulnerability - https://portswigger.net/web-security/cors#server-generated-acao-header-from-client-specified-origin-header

The situations you mentioned exist, but users need to limit them according to their actual needs


introduce managed namespaces

CRI clients are containerd clients. containerd supports multi-tenancy
via containerd namespaces. Clients interact with resources in non-default
namespaces by specifying a namespace name in the client invocation that
is curried to the server via gRPC. This means that the basic building
blocks for a client-directed (aka honor-system) multi-tenancy are ready
to be leveraged.
Introducing "managed namespaces" for containerd/cri. This change-set is
largely concerned with allowing for multi-tenant CRI to coexist and
enabling interactions with CRI resources in non-default (aka not
"k8s.io") namespaces by NOT overriding the client-provided namespace.
This means that the default CRI namespace, "k8s.io", is only enforced
for clients that have not specified a namespace. A CRI namespace is one
that is labeled with "io.cri-containerd=managed". Invoking the CRI with
a namespace that either does not exist or isn't properly labeled will
return an "unmanaged namespace" error.
How was this implemented?

the plugin initialization aspect of criService and the check/logging of instrumentedService have been merged into criServiceManager
the criServiceManager maintains an event exchange that is subscribed to containerd events (filtering on task and image events, as before)
the criServiceManager manages criService instances in a sync.Map keyed by namespace name
all criService instances are subscribed to the criServiceManager event exchange filtering on their namespace name
all criService instances are currently created and started on NamespaceCreate/NamespaceUpdate having the label "io.cri-containerd == managed"

managed criService instances are stopped on NamespaceDelete or NamespaceUpdate when "io.cri-containerd != managed"

the DeferContext and NamespacedContext in ./pkg/containerd/util have been changed to accept a namespace name
the default CRI namespace, k8s.io, is configured, as before, by the CRI plugin TOML
all other namespaces are configured by TOML that is the standard, aka "version 1", emitted by serializing a config.PluginConfig

located at ${containerd.root_dir}/io.containerd.grpc.v1.cri/namespaces/${namespace.name}/config.toml
this config is serialized for all namespaces, including k8s.io, at the same (parameterized) location
non-default namespaces lacking a config file will be started with a "default" having:

cni.conf_dir = /opt/cri/${namespace.name}/etc/cni/net.d instead of the usual default /etc/cni/net.d

/cc @mikebrow @Random-Liu @ibuildthecloud
Signed-off-by: Jacob Blain Christen<EMAIL_ADDRESS>

Is this for non-kubelet clients? Especially k3c?

Is this for non-kubelet clients? Especially k3c?

@AkihiroSuda yes, I need this specifically for k3c as it would enable running the k3c daemon (repackaged containerd) underneath k3s. As things stand currently, k3c and k3s sharing the same container runtime namespace results in each daemon reaping sandboxes that the other owns. My choices are to fork the kubelet or enhance the underlying container runtime to allow for a permeable multi-tenancy (which opens up a number of features we want for k3c).

@mikebrow I think I have the configuration changes worked out locally but I am also thinking of changing up this PR a bit to limit the number of files changes. It will mean that the new criNamespace type reverts back to criService and that the old criService type will be replaced with a criPlugin (or criDispatch) type. This will limit the number of files touched and this make it easier to merge without conflict. It will also re-instate the CRIAPI interface contracts being implemented by the containerd/cri service returned via the introspection service. Thoughts?

@mikebrow I think I have the configuration changes worked out locally but I am also thinking of changing up this PR a bit to limit the number of files changes. It will mean that the new criNamespace type reverts back to criService and that the old criService type will be replaced with a criPlugin (or criDispatch) type. This will limit the number of files touched and thus make it easier to merge without conflict re: other outstanding changes. It will also re-instate the CRIAPI interface contracts being implemented by the containerd/cri service returned via the introspection service. Thoughts?

I went ahead and refactored. Down to 48 changed files from the original 69, nice.

needs rebase

This ended up being a bigger can of worms than I wanted to open. While this change-set worked and I wrote it to be as maintainable as possible (assuming I had to maintain a fork) it simply touched on too many areas in this codebase. I've moved on to an easier-to-maintain gRPC header trick to hide CRI containers from the kubelet by default but expose them to savvy clients such as k3c.

ok.. will keep the proposal in mind then on future changes.. and maybe take a peek at your header trick. I like to keep abreast of the components sitting between containerd/cri and kubelet.. crictl for example.


Improve use of tempfile in tests

I have larger changes coming in this area, but I'd like to start by merging these two commits.
They're self-contained and valuable in themselves.

There is a problem on Windows with your branch:
======================================================================
ERROR: test_deleted_removed (utils_tests.test_autoreload.TestFilenameGenerator)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Tim\code\django\tests\utils_tests\test_autoreload.py", line 97,
 in test_deleted_removed
    import_module(modulename)
  File "c:\Users\Tim\.envs\django342\lib\importlib\__init__.py", line 109, in im
port_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1467, in exec_module
  File "<frozen importlib._bootstrap>", line 1571, in get_code
  File "<frozen importlib._bootstrap>", line 1623, in get_data
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\Tim\\AppData\\Local\\
Temp\\tmp7zfh1vtt.py'

----------------------------------------------------------------------

It seems this change results in leftover temporary directories that 5de31cb8 was added to prevent. I see four tmpXXXX directories and test_project in my /tmp after the test suite completes with your branch.

The commit I just pushed fixes the problem with leftover temporary directories. I'll squash it into the first one before merging.

And I pushed another commit which should take care of the test failure on Windows. It's the usual "NamedTemporaryFile returns a file name but you can't reopen the file". I could have used the version in django.core.files.temp but it's just as simple to skip the problem entirely.

Looks good and works on Linux & Windows.

Actually, there are some problems on Python 2 on Windows:
======================================================================
ERROR: test_staticfiles_dirs_subdir (staticfiles_tests.tests.TestFindStatic)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python27\Lib\shutil.py", line 247, in rmtree
    rmtree(fullname, ignore_errors, onerror)
  File "C:\Python27\Lib\shutil.py", line 252, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "C:\Python27\Lib\shutil.py", line 250, in rmtree
    os.remove(fullname)
WindowsError: [Error 123] The filename, directory name, or volume label syntax i
s incorrect: 'c:\\users\\tim\\appdata\\local\\temp\\django_ub0amb\\tmpjgqlvp\\te
st\\?.txt'

I believe I introduced this failure when I removed ignore_errors=True at the same time as I dropped rmtree_errorhandler. Using the same workaround as in runtests.teardown should probably fix it:
# Removing the temporary TEMP_DIR. Ensure we pass in unicode
# so that it will successfully remove temp trees containing
# non-ASCII filenames on Windows. (We're assuming the temp dir
# name itself does not contain non-ASCII characters.)
shutil.rmtree(six.text_type(TEMP_DIR))

However, if we embrace the idea that runtests takes care of creating and disposing of the temporary directory, we can simply remove the cleanup code.
What do you think?

For now just fixing the test failure will allow me to move on. My test parallelization project is already taking me way too far...

It works. Being lax with cleanup and relying on runtests seems okay.

Phew. Thanks a lot for testing.


Can not build image for <IP_ADDRESS>

I met errors as followings, as building images for <IP_ADDRESS> in centos7
sysctl: setting key "kernel.sem": Read-only file system
/var/tmp/rpm-tmp.2c2oCv: line 257: [:<PHONE_NUMBER>3692774399: integer expression expected
/var/tmp/rpm-tmp.2c2oCv: line 271: [:<PHONE_NUMBER>3692774399: integer expression expected
sysctl: setting key "fs.file-max": Read-only file system
Executing post-install steps...
You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database.

docker version:  1.10.3
Can you help me to solve it ? Thanks #

None of those are actually errors that will break the image build. As you can see, the install goes happily on to Executing post-install steps.... Can you please share the entire output of the build so that I can see where the actual error is?

Thanks for your reply.
Currently, the ORACLE image is not used, so you can close the problem.
Thank you very much.


Oracle batch insert

It fails, because oracle uses different syntax

Please, be more specific: what is expected syntax in your opinion and what is actual syntax, generated by Yii?
For the "oci" batchInsert() method is overridden respecting Oracle dialect.

well it currently does insert into x values () () (), but that does not works on oracle ? It should contain attributes to insert before every value ?

Here is a specification for Oracle bacth insert:
http://www.techonthenet.com/oracle/questions/insert_rows.php
Current Yii implementation matches it, as far as I see.
What is your problem?

Exception (Database Exception) 'yii\db\Exception' with message 'SQLSTATE[HY000]: General error: 933 OCIStmtExecute: ORA-00933: SQL command not properly ended
(ext\pdo_oci\oci_statement.c:148)
As I said before its generating: "Insert into X ("ATTR1", "ATTR2") VALUES () () () () () () ...

Please provide exact generated SQL content.

INSERT INTO "X" ("ATTR1", "ATTR2") VALUES (1, 'daniella'), (2, 'benas')

@BenasPaulikas please provide the code that generates this query and check your framework version. Oracle batchInsert is properly supported since latest 2.0.4

INSERT INTO "X"

This is can not be, according to
https://github.com/yiisoft/yii2/blob/master/framework/db/oci/QueryBuilder.php#L218
Generated SQL should start with INSERT ALL

All god with 2.0.4 Mark as fixed :) Ty for help (y)


Route53 GetHostedZoneLimit

Discussed in https://github.com/awslabs/aws-sdk-kotlin/discussions/1312

Originally posted by Fruan-Atlassian May 16, 2024
Just wondering whether the Route53 GetHostedZoneLimit request is working for anyone? For me, I can't use getHostedZoneLimitRequest's type parameter as I get an error saying that it's not of enum MAX_RRSETS_BY_ZONE when I use HostedZoneLimitType.MaxRrsetsByZone.
Is anyone able to do this on their end?
Repro code
Route53Client.fromEnvironment().use { r53 ->
    r53.getHostedZoneLimit {
        hostedZoneId = "<my_zone_id>"
        type = HostedZoneLimitType.MaxRrsetsByZone
    }
}

Result
InvalidInput(message=1 validation error detected: Value 'MaxRrsetsByZone' at 'type' failed to satisfy constraint: Member must satisfy enum value set: [MAX_RRSETS_BY_ZONE, MAX_VPCS_ASSOCIATED_BY_ZONE])

Invocations of this API seem to be serializing the request parameter into the URI path incorrectly. As noted by the GetHostedZoneLimit documentation and above error message, the expected serialization is MAX_RRSETS_BY_ZONE but instead it's using the name of the enum element MaxRrsetsByZone. Sample request preamble:
GET /2013-04-01/hostedzonelimit/<my_zone_id>/MaxRrsetsByZone


Lint also typescript files

This configures eslint with ts so that ts files also get linted.
@ssthouse Please check if your build/publish works as expected.
Would be awesome if you could elaborate/codify on how you generate your library folder.
Maybe a github action that runs when pushing a new tag?

this MR didn't affect my build/publish job.
Currently, I publish a new version by running npm publish on my own computer.
Release by git tag sounds like a good idea, I'll try to fix that.


Create fails for accounts with two-factor auth

I've tried scaffolding a typing using the generator and it's failed on the auth stage because I have two-factor enabled (or so I believe is the issue). As well, I can't get past it using --skip-install.
Any ideas?

Nevermind, I had gotten the repo name wrong and it was failing as a result.


Zone API returning empty 'name' column while 'id' is expected

I am using this package for reference.
Currently trying to get the Zones through this package, which works but I am not getting the 'id' column, I am getting an empty/null 'name' column. (See image below)
Your documentation @ https://www.upcloud.com/api/5-zones/#zones states that it should return an ID and description.
What is going wrong?

My code:
        $upCloud = new \Upcloud\ApiClient\Upcloud\ZoneApi();
        $config = $upCloud->getConfig();
        $config->setUsername('***');
        $config->setPassword('***');

        dd($upCloud->listZones());

For now hardcoded in our console command job, but really want to make this dynamic through api:
        $plans = [
            [
                'name' => 'Frankfurt #1',
                'id' => 'de-fra1'
            ],
            [
                'name' => 'Helsinki #1',
                'id' => 'fi-hel1'
            ],
            [
                'name' => 'Amsterdam #1',
                'id' => 'nl-ams1'
            ],
            [
                'name' => 'Singapore #1',
                'id' => 'sg-sin1'
            ],
            [
                'name' => 'London #1',
                'id' => 'uk-lon1'
            ],
            [
                'name' => 'Chicago #1',
                'id' => 'us-chi1'
            ],
        ];

Oh, sorry about that! Glad that you found a workaround 👍 Yeah the "name" field should be "id" in the result, seems like it was mis-named in the Zone model. We'll have a look at that!

PR at https://github.com/UpCloudLtd/upcloud-php-api/pull/15