Rename target K64F to FRDM_K64F

All exporters updated, targets.py fixed for targets based on K64F. K64F wont be valid target anymore.
Reference #939

K64F is a massive dependency in many systems we have.
I think we will discuss naming policies with James, Dan, Bogdan, Mihail next week.

Yes ,definitely. This is a good start

This should be on a branch here so we can make complete MCU definitions and work on this for all chips

I added legacy handling - K64F is now valid target, internally switched to FRDM_K64F.
Sam, this one is a branch for one target, once we agree with going forward with this proposal, we can create a branch where we all can contribute. But until then,lets sort out how to achieve this

Reverted changes in build/project, export updated to use target_map to get mcu name (same as in the other scripts), which is used for exporting+zipping the project

I was rather thinking about this kind of wrapper:

class TargetMap:

    TARGET_MAP = {}

    TARGET_LEGACY_NAMES = {
        'K64F' : 'FRDM_K64F',
    }

    def __init()__(self, TARGETS):
        # Populate
        for t in TARGETS:
            self.TARGET_MAP[t.name] = t

    def __getitem__(self, target_name):
        """ Usage: TARGET_MAP[target_name]
        """
        if target_name in TARGET_MAP.keys():
            return self.TARGET_MAP[target_name]
        elif target_name in TARGET_LEGACY_NAMES:
            # We will alias legacy name with proper name
            target_name = self.TARGET_LEGACY_NAMES[target_name]
            return self.TARGET_MAP[target_name]
        else:
            return None

    def keys(self):
        """ Dict like behaviour
        """
        #keys = TARGET_MAP.keys() + TARGET_LEGACY_NAMES.keys()
        keys = TARGET_MAP.keys()
        return keys

Rationale
We are only using TARGET_MAP like this:
TARGET_MAP[target_name]    # To get string

or (this can be refactored to use some method or just overloaded __cmp(self, ...)__) because used only once in test_api.py:
if target_name not in TARGET_MAP:   # To know if target name is valid

WIll update it tomorrow with the class TargetMap proposal

Updated according to Przemek's suggestion

Martin,
You forgot to implement behavior target_name in TARGET_MAP:

You can just extract current __getitem__() to separate function and
override __contains__()

    def get_target_name(self, target_name):
        """ Usage: TARGET_MAP[target_name]
        """
        if target_name in self.TARGET_MAP.keys():
            return self.TARGET_MAP[target_name]
        elif target_name in self.TARGET_LEGACY_NAMES:
            # We will alias legacy name with proper name
            target_name = self.TARGET_LEGACY_NAMES[target_name]
            return self.TARGET_MAP[target_name]
        else:
            return None

    def __getitem__(self, target_name):
        return self.get_target_name(target_name)

    def __contains__(self, target_name):
        """ Usage: target_name in TARGET_MAP
        """
        return self.get_target_name(target_name)

Note: I need to update singletest.py so it shows only one target or target with all aliases when someone calls singletest.py -S. Example for now:
singletest.py -S -f K64F
+-----------+---------+------+-----------+-----------+--------+--------+------------+---------------+
| Platform  |   ARM   | uARM |  GCC_ARM  |    IAR    | GCC_CR | GCC_CS | GCC_CW_EWL | GCC_CW_NEWLIB |
+-----------+---------+------+-----------+-----------+--------+--------+------------+---------------+
| FRDM_K64F | Default |  -   | Supported | Supported |   -    |   -    |     -      |       -       |
| K64F      | Default |  -   | Supported | Supported |   -    |   -    |     -      |       -       |
+-----------+---------+------+-----------+-----------+--------+--------+------------+---------------+
*Default - default on-line compiler
*Supported - supported off-line compiler

Total platforms: 2
Total permutations: 6

Should be:
singletest.py -S -f K64F
+-----------+---------+------+-----------+-----------+--------+--------+------------+---------------+
| Platform  |   ARM   | uARM |  GCC_ARM  |    IAR    | GCC_CR | GCC_CS | GCC_CW_EWL | GCC_CW_NEWLIB |
+-----------+---------+------+-----------+-----------+--------+--------+------------+---------------+
| FRDM_K64F | Default |  -   | Supported | Supported |   -    |   -    |     -      |       -       |
+-----------+---------+------+-----------+-----------+--------+--------+------------+---------------+
*Default - default on-line compiler
*Supported - supported off-line compiler

Total platforms: 2
Total permutations: 6

or
+-----------------+---------+------+-----------+-----------+--------+--------+------------+---------------+
| FRDM_K64F, K64F | Default |  -   | Supported | Supported |   -    |   -    |     -      |       -       |
+-----------------+---------+------+-----------+-----------+--------+--------+------------+---------------+

@screamerbg Please review

Any update on this, what we should do with names, there is still some time to start using proper platform names ? :neutral_face:

Let's go ahead with this after the next SDK release. This would require some complementary changes to the platform database that are not as simple as renaming the platform.

Can we also change the directory KPSDK to KSDK?


service:extract_usage() does not work when credentials are sent in the headers

The reason is that the get_auth_params method in configuration.lua checks uri params and POST bodies, but not the headers: https://github.com/3scale/apicast/blob/6065ac35fe23fb53a240a91832db7b2938d8ebac/apicast/src/configuration.lua#L77

But extract_usage should not extract usage from headers. Only from GET/POST params.

Sorry @mikz I was confused. This is not an issue.
The get_auth_params method name confused me. The name made me think that the method returned auth credentials (app_id, app_key), but that is not what it does or should do.

@davidor actually has a good point.
This method probably should be called just get_params to avoid confusion.

That whole getting usage is begging for refactoring which will come :)


missing What de rights are

What are the ricghts you get wen
AvailabilityOnly
LimitedDetails
Reviewer
Editor

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

ID: e177c731-d40e-699e-1f27-a760cb9265c7
Version Independent ID: 20849f6f-f601-59cd-dd66-3c028c615847
Content: Set-MailboxFolderPermission (exchange)
Content Source: exchange/exchange-ps/exchange/mailboxes/Set-MailboxFolderPermission.md
Service: exchange-powershell
GitHub Login: @chrisda
Microsoft Alias: chrisda

@officedocsbot assign @yogkumgit

@pear7777 Thank you for the feedback. The details that you are looking for is added to the parameters section of the document here;-  https://docs.microsoft.com/en-us/powershell/module/exchange/mailboxes/set-mailboxfolderpermission?view=exchange-ps#parameters
Hope this helps!
Thanks
Sri

@msbemba  Thank you very much for the contribution and sharing this explanation. @pear7777
Hope this comment is helpful for you. If you see a documentation update is required, please feel free to open an issue for the same. We proceed here to close it. Thanks for taking out some time to open the issue. Appreciate and encourage you to do the same in future also.

Still missing some.
Like Owner, and a few others.


duplicated entries in toc not functioning properly

When I have a toc like the following:

HEAD_A
1. a
2. b
HEAD_B

a
c
If I press  'a' under HEAD_B, it can only jumps to the place where the 'a' under HEAD_A points to.   Of course one could distinguish the two 'a'  by giving them different names, but this makes the string longer and not clear.

:+1:


Why is currentItem nil when playlist played to the end?

Can your answer be found elsewhere?

[x] I have searched existing issues and found no similar question.

[x] I have browsed the available documentation and found no answer to my question.

Detailed question
When we play a playlist to its end it seems the players currentItem is nil.
But anyway canReplay() returns true and we can restart that item.
Shouldn't currentItem still be set to the last item or maybe to the first item? This way we could easily display to the user which item was just played or which will be played once we call replay()?

As discussed with you this is a tricky behavior. Some apps might want to display nothing, some apps might want to stick with the last content being played or, as in your case, some apps might want to display the first item in this case.
The behavior is tricky and introducing a behavioral parameter to govern the player behavior for something that is more UI-related in the end would probably lead to a lot of complexity. On the app side, though, the code required is mostly:
var displayedItem: PlayerItem? {
    currentItem ?? items.first
}

or
var displayedItem: PlayerItem? {
    currentItem ?? items.last
}

since item / current item changes are automatically observed by Player and lead to view bodies being recalculated.
TL;DR Better do nothing and let the app decide. Flexible and much simpler / safer for everyone.


Is the type checking can be disabled for the default argument with type hint?

Cython Version: 0.29.14
class Test:
   pass
def test(q:str = Test()):
   pass

After this code is cythonize and running.
The error
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "test.py", line 24, in init test
TypeError: Expected unicode, got Test

appeared.
I have tries the compiler directive but no one can resolve this.
Since it's the usage of the FastAPI to declare the type and produces OpenAPI information.
We cannot ignore the type information.
@app.get("/items/")
async def read_items(q: str = Query(None, max_length=50)):
    results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
    if q:
        results.update({"q": q})
    return results

Thanks.

https://github.com/cython/cython/issues/1672

I have tries the compiler directive but no one can resolve this.

I assume you mean #cython: annotation_typing=False? Because it works for me.

With that said, annotation_typing wasn't documented so I created a tiny pull request to fix this: https://github.com/cython/cython/pull/3232

Your code example does not comply with PEP-484, unless you use something like # type: ignore. However, Cython does not currently understand this. We should honour the normal PEP-484 mechanisms here for disregarding type annotations.


Right-pointing red triangles doesn't display anything

Have "rust-analyzer.diagnostics.useRustcErrorCode" set to true but right-clicking (or any related commands) doesn't do anything. Doesn't show any viz like what is shown in the PDF. Also, in the readme of this repo, some pictures of how the viz looks like will be great as I have no idea what to expect. Even the picture in the PDF is vague, like is that what actually shows in vscode or is that just some "modified/edited" version of the visualization?
BTW, I used the same example in the PDF to get the lifetime error.

Maybe the term in the readme is confusing. By "Right-pointing red triangles" I really mean "triangles that point to the right", not clicking the triangles. You need to first move the text cursor to the line with the triangle and use ctrl+shift+v to get the visualization. vscode doesn't support clickable gutters at the moment so we couldn't add clicking functionality on the triangles.
Adding pictures in readme sounds good; I'll try to add them. The figures in the PDF are actual screenshots of vscode.

Yeah, I tried placing the cursor on the offending line and triggering the Toggle Viz command but I don't see any viz :) I used the same code example in the PDF and I did see the red triangle. The Toggle command seems to just change the direction of the red triangle - it appears it supposedly expand/collapse a div (I'm guessing here).

That might be a different issue, but when triggering revis on a lifetime error, all I get is:

That might be a different issue, but when triggering revis on a lifetime error, all I get is:

What Rust code are you testing with and what's your compiler version? There may be an error format that we missed.

I don't recall what code it was. It's always latest compiler version.
It may have been a complex lifetime error.
It would probably be useful if the error gave information about what it got and what it expected when it says it can't parse. That would likely make it easier to debug.


Make non-mandatory plugin descriptor fields optional

According to clap/plugin.h only id and name are mandatory, but "otherwise the fields can be null or blank". However, setting e.g. the description field to null crashes the clap-info tool, so this patch fixes this by not including null fields in the JSON output.

Thank you! I just kicked off CI and if that runs I'll merge this. Appreciated!


Rename App/World::observe to add_observer, EntityWorldMut::observe_entity to observe.

Objective

Closes #15752

Calling the functions App::observe and World::observe doesn't make sense because you're not "observing" the App or World, you're adding an observer that listens for an event that occurs within the World. We should rename them to better fit this.
Solution
Renames:

App::observe -> App::add_observer
World::observe -> World::add_observer
Commands::observe -> Commands::add_observer
EntityWorldMut::observe_entity -> EntityWorldMut::observe

(Note this isn't a breaking change as the original rename was introduced earlier this cycle.)
Testing
Reusing current tests.

The PR is missing the migration section, which prevents it from appearing in the migration guide.


Un-paired cover - how??

How to remove a paired cover from a given channel ?

See manual of your master remote. There is a way to remove all remotes (including the Becker USB stick) except the master remote.

Works :-)


Joined to the list of Friends

added a html

Your pull request seems good, but must be checked by a human maintainer for the following reason(s):

Your file is not in a project folder ("Friends", "Games"). This may be intentional, but most likely not.

Please be patient until a maintainer has time to look over your contribution.
This is an automated response, beep boop.
if you think there is a mistake, contact a maintainer

b357c5f3ca68c49afb6c756234482daafeb95f0a

#358


[JPMS] javaModuleVersion does not work when project has no dependencies

Gradle adds --module-version when javaModuleVersion is set and the project has modular dependencies:
https://github.com/gradle/gradle/blob/37911bb86d02d26a5d2ce3f23e01c0d767e3bb91/subprojects/language-java/src/main/java/org/gradle/api/internal/tasks/compile/JavaCompilerArgumentsBuilder.java#L277-L284
However, when the project has no dependencies, there is no module path, so --module-version is not added, and the module version is not recorded.
Expected Behavior
The module version is recorded in the descriptor when javaModuleVersion is set.
Current Behavior
The module version is not recorded when the project has no dependencies.
Context
JPMS offers a module version attribute for compiled module descriptors. The Gradle DSL allows setting the module version as described in the documentation:
https://docs.gradle.org/current/userguide/java_library_plugin.html#declaring_module_versions
Steps to Reproduce
Create a project without any dependencies which has a module descriptor. Follow the documentation to add the module version using the javaModuleVersion property.
Reproducer project:
https://github.com/A248/Gradle-Module-Version

Run gradle build
Run javap -v build/classes/java/main/module-info.class. Observe that the module is "module com.example". If a version was recorded, it would be "module<EMAIL_ADDRESS>
Javap output:
module com.example
  minor version: 0
  major version: 55
  flags: (0x8000) ACC_MODULE
  this_class: #1                          // "module-info"
  super_class: #0
  interfaces: 0, fields: 0, methods: 0, attributes: 2

Now, edit the build.gradle and uncomment the dependency on Gson. Rebuild using gradle clean build. It has to be a clean build.
Observe that the module version is now recorded.

New javap output:
module<EMAIL_ADDRESS>  minor version: 0
  major version: 55
  flags: (0x8000) ACC_MODULE
  this_class: #1                          // "module-info"
  super_class: #0
  interfaces: 0, fields: 0, methods: 0, attributes: 2

Your Environment
Gradle 7.0.2
Mac OS X 10.14.6
Build scan URL: https://scans.gradle.com/s/ctfzkwuleq7tk

For those who struggle with the same problem, an unsatisfactory yet working workaround is
jar {
  doLast {
    exec {
    executable 'jar'
    args "--update", "--file=${archivePath}", "--module-version=${project.version}", "--main-class=package.ClassName"
  }
}

I'm assuming here you want to set the project's version as the module's version as well. Please note that unfortunately you have to specify a main class, even if there is none. Otherwise jar will fail.
Is there anything I can do to support the resolution of this issue? A pull request? Anything else?

A better workaround is to add the command-line argument during compilation:
compileJava {
    options.compilerArgs.addAll(['--module-version', project.version]);
}

Is there anything I can do to support the resolution of this issue? A pull request? Anything else?

A PR wouldn't be hard to cook up - You'd have to move 4 lines of code. Besides that, I think the maintainers would like an integration test: maintainers like tests, for good reason.

That's indeed much smoother. Thanks for the hint!


Unexpected v-if behaviour in slot/template

Version
2.6.13
Reproduction link
https://codepen.io/mrkwdwrd/pen/YzZedOe
Steps to reproduce
Use the button to toggle the value of 'foo'.
What is expected?
The elements in the 'content' slot with the v-if directive should display based on whether the value of 'foo' is true/false.
The elements with no v-if directive should display regardless of the value of 'foo'.
What is actually happening?
When the elements are direct children of the slot template, neither are visible when 'foo' is false, both are visible when 'foo' is false if the element with the v-if directive is the first.
If the element without the v-if directive is the first, it is always displayed while the the the element with the v-if directive displays according to the value of 'foo'.
When the elements are wrapped and not direct children of the slot template, the element with the v-if directive displays according to the value of 'foo'. The element with no v-if directive always displays.

The behaviour was as expected before upgrading to<EMAIL_ADDRESS>Rolled back to<EMAIL_ADDRESS>and the expected behaviour was restored.

I have the same problem

Issue also not present on v2.6.11 - though there's no release notes for this version

Already fixed. Search existing issues first, please


glab: 1.49.0 -> 1.50.0

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[x] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 359935

x86_64-linux

:white_check_mark: 1 package built:

glab

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-already-reviewed/2617/2135

What's the policy on backporting recently updated packages to recently released NixOS versions?
IOW: Any objections to backport glab 1.50.0 to release-24.11?
/cc @luftmensch-luftmensch, @SuperSandro2000


Lingering failures after file deletions in diagnostics / problems pane

Environment

node -v: v8.4.0
npm -v: v3.7.3
Operating system: macOS 10.12.6

Steps to Reproduce

Start a Jest watcher session in VSCode. The initial run completes and passes.
Add a new test file that has a failure
The failure shows up in the status bar and problems pane as expected
Delete the new failing file

Expected Behavior
One should expect the failure to go away when it is no longer relevant, such as when files are removed.
Actual Behavior
The failing file remains in the status bar and problems pane.

Fix
I have created a patch that fixes this issue locally. It is pretty simple. All it does is go through the existing diagnostics, and removes the ones that correspond to files that no longer exist. I would be happy to submit a PR for this.

Sure, that sounds 👍


[SECURITY] Use HTTPS to resolve dependencies in Maven Build

Want to take over the Java ecosystem? All you need is a MITM!
Update: Want to take over the Java ecosystem? All you need is a MITM!

This is a security fix for a  vulnerability in your Apache Maven pom.xml file(s).
The build files indicate that this project is resolving dependencies over HTTP instead of HTTPS.
This leaves your build vulnerable to allowing a Man in the Middle (MITM) attackers to execute arbitrary code on your or your computer or CI/CD system.
This vulnerability has a CVSS v3.0 Base Score of 8.1/10.
POC code has existed since 2014 to maliciously compromise a JAR file in-flight.
MITM attacks against HTTP are increasingly common, for example Comcast is known to have done it to their own users.
This contribution is a part of a submission to the GitHub Security Lab Bug Bounty program.
Detecting this and Future Vulnerabilities
This vulnerability was automatically detected by LGTM.com using this CodeQL Query.
As of September 2019 LGTM.com and Semmle are officially a part of GitHub.
You can automatically detect future vulnerabilities like this by enabling the free (for open-source) LGTM App.
I'm not an employee of GitHub nor of Semmle, I'm simply a user of LGTM.com and an open-source security researcher.
Source
Yes, this contribution was automatically generated, however, the code to generate this PR was lovingly hand crafted to bring this security fix to your repository.
The source code that generated and submitted this PR can be found here:
JLLeitschuh/bulk-security-pr-generator
Opting-Out
If you'd like to opt-out of future automated security vulnerability fixes like this, please consider adding a file called
.github/GH-ROBOTS.txt to your repository with the line:
User-agent: JLLeitschuh/bulk-security-pr-generator
Disallow: *

This bot will respect the ROBOTS.txt format for future contributions.
Alternatively, if this project is no longer actively maintained, consider archiving the repository.
CLA Requirements
This section is only relevant if your project requires contributors to sign a Contributor License Agreement (CLA) for external contributions.
It is unlikely that I'll be able to directly sign CLAs. However, all contributed commits are already automatically signed-off.

The meaning of a signoff depends on the project, but it typically certifies that committer has the rights to submit this work under the same license and agrees to a Developer Certificate of Origin
(see https://developercertificate.org/ for more information).
- Git Commit Signoff documentation

If signing your organization's CLA is a strict-requirement for merging this contribution, please feel free to close this PR.
Tracking
All PR's generated as part of this fix are tracked here:
https://github.com/JLLeitschuh/bulk-security-pr-generator/issues/2

??

Please don't autofile PRs against repos you don't follow and code you don't understand. It wastes everyone's time.

@JLLeitschuh  It's good to employ HTTPS to prevent MITM on normal scenes such as developing / building / packaging during maven dependency resolving, but it make NO sense when we retrieve dependencies from localhost.
For short, maven-enforcer-maven itself hosts repository during integration test, no dependencies are retrieved from internet, thus it is not vulnerable as you described.

Please don't autofile PRs against repos you don't follow and code you don't understand. It wastes everyone's time.

This project was part of the GitHub Security Lab Bug Bounty program and I was awarded a $4k bounty for the automatic creation of 1,596 PRs. Many of these PRs have just been merged with maintainers thanking me.
Looking at the code here, I agree that this change makes no sense. I'm sory for wasting your time on this one.
Thanks for the explanation.

@JLLeitschuh good to hear you earn $4k to waste people time.... 😳

😂
Most people are appreciative. But most of the time, it actually fixes a vulnerability. This time wasn't th case.


Change from wifi0

I cannot change my default setting to "eth0".

How do I change standard and default option "wifi0" to "eth0"?

Hi there. KickThemOut uses your default wireless card and there's no current feature to allow you to change it. However, this is a feature that we should implement; thank you for your suggestion.


Terms

I opened a bug report in tantivy-cli because it the benchmark command printed 4 header columns but only 3 values.
The missing column was num_terms.
Which lead me to add code to print the Terms (which I was told on gutter is different to the original meaning).
I as surprised to see 4 Terms with my test query "foobar" to print identical "foobar".
I either expected only 1 term or for different ones like "Foobar", "FooBar".
      for _ in 0..num_repeat {
          for query_txt in &queries {
              let query = query_parser.parse_query(&query_txt).unwrap();
              let mut timing = TimerTree::default();
              let (_top_docs, count) = {
                  let _search = timing.open("search");
                  searcher LeasedItem<Searcher>
                      .search(&query, &(TopDocs::with_limit(10), Count)) Result<(Vec<(f32, DocAddress)>, usize), TantivyError>
                      .map_err(|e| {
                          format!("Failed while searching query {:?}.\n\n{:?}", query_txt, e)
                      })?
              };
              **use std::collections::BTreeSet;
              let mut terms_set: BTreeSet<_> = BTreeSet::new();
              query.query_terms(&mut terms_set);
              use tantivy::Term;
              let terms: Vec<&Term> = terms_set.iter().collect();
              for term in terms {println!("{:?}", String::from_utf8_lossy(term.value_bytes()))}
              println!("{}\t{}\t{}\t{}", query_txt, terms_set.len(), count, timing.total_time());**
          }
      }

Term is a value of a token targetting a specific field.
By default the query parser targets all of indexed fields. (this is configurable)
You probably have 4 fields that are indexed.

Thanks!
That gives me indeed one term per field:
uri:foobar
title:foobar
body:foobar
date:foobar
A query of uri or date with uri:foobar or date:foobar gives no matches though.
Why do they still turn up in the Terms list for these fields?

They should show up yes. Can you share your schema?

So if I want to get all Terms that are present in a field,
do I have to iterate over the Terms checking for a match in that field?
"schema": [
{
"name": "uri",
"type": "text",
"options": {
"indexing": {
"record": "basic",
"tokenizer": "raw"
},
"stored": true
}
},
{
"name": "title",
"type": "text",
"options": {
"indexing": {
"record": "position",
"tokenizer": "en_stem"
},
"stored": true
}
},
{
"name": "body",
"type": "text",
"options": {
"indexing": {
"record": "position",
"tokenizer": "en_stem"
},
"stored": true
}
},
{
"name": "date",
"type": "text",
"options": {
"indexing": {
"record": "basic",
"tokenizer": "raw"
},
"stored": true
}
}
],


Add JSON response options

I found a case that I need to use JSON_UNESCAPED_UNICODE (integrating a system that the other end isn't mine and I can't fix the encoding).
I can't use Flight functions to do so since it doesn't provide a way to pass options to the json encoder.
Any possibilities to add this options, or even setting a "default options"?
Maybe something like:
Flight::set('flight.json.options', JSON_UNESCAPED_UNICODE);

Oh, and for anyone with similar problems, I solved this by mapping (and using) a custom response method.
Flight::map('jsonc', function($obj, $status = 200) {
    Flight::response()
        ->status($status)
        ->header('Content-Type', 'application/javascript')
        ->write(utf8_decode(json_encode($obj, JSON_UNESCAPED_UNICODE)))
        ->send();
});

But I'd love to see this option on Flight ;)

@WoLfulus since the merging of https://github.com/mikecao/flight/pull/294, this feature is now available in dev-master. If you're happy with the fix, please close the issue - thanks for flagging it. 👍


Adding Dev Accounts to config and fix windows line break bug

2 commits:
First just adds dev accounts to accounts_config.py. The second adds to some javascript to fix a formatting error in the dev stacks' front-end.

LGTM. Nice conventional commits!


Ft login page 161075138

What Does This PR do?
Creates a login user interface
Description of Tasks to be completed?

Designing and Creating a login page for the app which is also a landing page

How should this be manually tested?
steps for testing :

Create a working folder on your desktop or preferred location.
Navigate to your working folder and open a new terminal
Type the following git clone https://github.com/jonathanmusila/store-manager.git
Navigate to the UI and open index.html in a preferred browser.

What are the relevant pivotal tracker stories?
Story-ID  #161075138
Screenshot

Good work: Nice UI
Recommendations

Check the naming of the PR

Awesome work, rename your title according to the naming conventions given #ID LogIn

Good work

Hello, Jonathan,
Nice choice of background image. You might one to give prominence to the login area to make it stand out and not be swallowed. For example by putting a thin border around the login area. Looks very good.
Regards
Steven Ennis


Template should not reinclude itself on update

Thank you @antoin-m!

This modification has introduce a bug.
The replacement of the html tag is removing the blockcart from the dom.
After has been removed the next time we called the modal add-to-cart the app fail because refreshURL couldn't retrieve the url from the dom.
I have done a PR to revert the modifications
https://github.com/PrestaShop/ps_shoppingcart/pull/9
Thanks


Issue reproducing evaluation metric for FocalNet+DINO+O365pretrain

Thank you for your great work!
However, I am having difficulty reproducing the evaluation metric for the model open-sourced in link. Specifically, my evaluation results is 0.3 AP lower than that you reported in the README.

My command used to run the evaluation is:
python -m torch.distributed.launch --nproc_per_node=4 main.py \
  --output_dir output/path \
	-c config/DINO/DINO_5scale_focalnet_large_fl4.py --coco_path coco/path  \
	--eval --resume checkpoint/path

Could you please help me with this issue? I would be grateful if you could provide some guidance on what I might be doing wrong, or if you could share any additional details about the exact process that you used to compute the evaluation metric.
Thank you very much!

Hi, @RockeyCoss , thanks for your interest!
I think you are using the default 800x1333 image resolution for your evaluation. Can you change your base in DINO_5scale_focalnet_large_fl4.py with https://github.com/FocalNet/FocalNet-DINO/blob/main/config/DINO/coco_transformer_hres.py?

Hi, @jwyang, would you consider merging FocalNet/FocalNet-DINO into this repo?


about imagenet training

Hi, @bearpaw ,
According imagenet training,  you mention --data option is ~/dataset/ILSVRC2012/. However, after I download the ILSVRC17 dataset ILSVRC2017_CLS-LOC.tgz from current year challenge.

The *.JPEG are located inside train/val/test at the following folder structures:
~/dataset/ILSVRC/
------------------------Data/
-------------------------------CLS-LOC/
--------------------------------------------train/
--------------------------------------------------n01440764/.JPEG
--------------------------------------------------n01443537/.JPEG
...
------------------------------------------- val/
------------------------------------------- test/
Any suggestions to modify --data option in imagenet training?
THX!

Hi @amiltonwong ,
I only test the code on ILSVRC12 dataset. I follow this instruction to preprocess the data. It might also work for ILSVRC17 data.


Add optimal rank finding for PDEs

I think the current structure with iskronop/dekron/etc. should allow for recasting PDEs in low rank form of a four-variate function, as in Towsend & Olver

The plan now is to eventually move low rank PDE solving outside ApproxFun in favour of always using adaptive QR


[AutoRelease] t2-datafactory-2024-05-07-35865(can only be merged by SDK owner)

https://github.com/Azure/sdk-release-request/issues/5183
Live test fail, detailed info is in pipeline log(search keyword FAILED)!!!
https://dev.azure.com/azure-sdk/internal/_build?definitionId=987

issue link:https://github.com/Azure/sdk-release-request/issues/5183


log4j Vulnerability

Due to the recently discovered log4j vulnerability I think we need to restrict log4j versions to 2.15.0.  I think this done in the pom.xml file
xref https://www.cisa.gov/uscert/ncas/current-activity/2021/12/13/cisa-creates-webpage-apache-log4j-vulnerability-cve-2021-44228
@jdye64 is this something you're familiar with ?

Yes, I can take care of this. We also need to update out version of Calcite which also uses log4j. I have been follow their dev mailing list and they started their builds yesterday evening EDT. Once those are published to maven central I will make a PR updating both.

Can/should we backport this restriction to older dask-sql PyPI packages as well?

I am not too worried about the previous releases because we actually were using a version of log4j that was older than the vulnerability was in (we use 1.2.17 and vulnerability doesn't start till 2.0.X) However I think it is just best to update to the latest just to be safe.

It is looking like Calcite 1.29.0 might not be released until possibly next Monday. Just wanted to keep everyone updated.

Can/should we backport this restriction to older dask-sql PyPI packages as well?

Another lower effort approach could be to have an open issue for users to comment if they need/want a re-release of older versions. Dask-SQL is new enough there's probably low resistance to just taking the latest packages.


community[patch]: Add support for exists filter in the elasticsearch vector store.

This PR adds support for filtering with "exists" for the elasticsearch vector store.

LGTM, thanks!

Hey @joachimvandenabeele, could you run yarn format to get CI passing? I can't push to your branch.

Thank you!

My pleasure!


typo: iothub/resource-manager/Microsoft.Devices

Double word "the"
Thehub -> The hub
Double word "state"
avrodeflate -> avroDeflate

Automation for azure-sdk-for-js

Automation for azure-sdk-for-python

Automation for azure-sdk-for-ruby

Automation for azure-sdk-for-go

Can one of the admins verify this patch?

Automation for azure-sdk-for-java

Don't get the Go failure
INFO:swaggertosdk.autorest_tools:FATAL: System.InvalidOperationException: codegen for preview swagger Microsoft.Devices/preview/2018-12-01-preview/iothub.json must be under a preview subdirectory

It's saying it's not under a preview folder, but it is

Automation for azure-sdk-for-node


Diagrams

Hello,
Thanks for the very useful content. I am a big fan.
what is the tool that you're using for diagrams found in the google slides deck?
Many thanks,

Thanks for checking it out!
Most of the diagrams were created by an in-house designer who used InDesign (and perhaps other tools). The Pods diagram was lifted from the K8s official docs (not sure what they used). The Services diagrams were done directly in Google Slides. Most of the diagrams were lifted from the Kubernetes White Paper.
Hope this was helpful!

Many thanks, @hjet. would you be open to share an inDesign sample?  Cheers

Sorry, I no longer work for DigitalOcean and don't have access to those. Unlikely that you will be able to get access to those files.


Problem: code wasn't adhering to the eslintrc

Solution: fix (most of) the warnings

:+1: Sehr gut!


Including doc for personal newbie error case.

I got an error leading me to this doc via the link below from the log exception
https://docs.angularjs.org/error/$injector/unpr?p0=$scopeProvider <- $scope <- NoteService
and it was still difficult to figure out the cause.
I later(it took me hours) discovered that i mistakenly registered my controller as a service.

@ahmedalejo could you please sign the CLA?

Also, I've changed the wording slightly in https://github.com/pkozlowski-opensource/angular.js/commit/a9e02de5e28c6789c6539358e90610ee8027e0da, could you please have a look at those proposed changes?

Great mate! glad i could help.
On Sat, Feb 21, 2015 at 10:07 AM, Pawel Kozlowski<EMAIL_ADDRESS>wrote:

Closed #11030 https://github.com/angular/angular.js/pull/11030 via
a9e02de
https://github.com/angular/angular.js/commit/a9e02de5e28c6789c6539358e90610ee8027e0da
.
—
Reply to this email directly or view it on GitHub
https://github.com/angular/angular.js/pull/11030#event-239587799.


Add app rules for rest of MS Office Suite

I found that the entire MS Office Suite needs this workaround.

Excellent, thank you!


Allow maven parallel build

Description
The goal of this PR is to allow parallel build with maven to improve build time.
Two problems prevented us to do this:

For an unknown reason, parallel build fails if we use json-smart dependency to manipulate JsonNode
The openapigenerator-maven-plugin is not thread safe

This PR:

replaces json-smart usage with jackson
bump openapi-generatpr-maven-plugin to 4.3.1 (higher versions produce classes that don't compile 😢 )

For an unknown reason, parallel build fails if we use json-smart dependency to manipulate JsonNode
We are using this deps directly in our code without declaring it anywhere so it doesn't help 🙈


Extend lock inside @Scheduled method

Is your feature request related to a problem? Please describe.
I have a @Scheduled method, which processes data in a loop. I can assume how long a single loop will take, but I don't know how many loops need to be done. It depends on the amount of data to be processed.
So the @Scheduled method can be done in basically no time, when no data needs to be processed. Or it will take multiple hours, if there's much data to process.
Describe the solution you'd like
I would like to use the extend() method of SimpleLock on every loop inside my @Scheduled method to keep the lock up for long runs.
Currently I have found no API of Shedlock which returns the current SimpleLock instance to me. It's kept inside DefaultLockingTaskExecutor.executeWithLock().
Since the taskname is already stored in a ThreadLocal variable inside LockAssert, I thought about storing the lock there too.
It seems quite simple and easy to access for all ways of usage.
Some other way I could think of, would be to inject the lock as argument into the @Scheduled method. But this is quite special and would require some tinkering.

Hi, thanks for feedback. It's not likely that I will implement such feature. As I see it, there are two categories of users.

Basic - users that are using ShedLock as intended - scheduler lock. I expect them to use the annotations.
Advanced - users with various use-cases and various needs. I expect them to use the programatic configuration like this. The extend method has been added for such users.

It seems that your use-case fails somewhere between the two groups, but I would recommend you to use the programmatic approach anyway (see DefaultLockingTaskExecutor for inspiration).
The reason why I hesitate to add more stuff to the Basic API is the maintenence cost, I am afraid of API bloat.

Hi, thanks for feedback. It's not likely that I will implement such feature. As I see it, there are two categories of users.

Basic - users that are using ShedLock as intended - scheduler lock. I expect them to use the annotations.
Advanced - users with various use-cases and various needs. I expect them to use the programatic configuration like this. The extend method has been added for such users.

It seems that your use-case fails somewhere between the two groups, but I would recommend you to use the programmatic approach anyway (see DefaultLockingTaskExecutor for inspiration).
The reason why I hesitate to add more stuff to the Basic API is the maintenence cost, I am afraid of API bloat.

Thanks for your answers and I can fully understand your point.
I'll go with providing my own LockingTaskExecutor implementation.

Thanks for your answers and I can fully understand your point.
I'll go with providing my own LockingTaskExecutor implementation.


Connector fails : JsonConverter with schemas.enable requires "schema" and "payload" fields and may not contain additional fields.

Hello @avelanarius  @mailmahee
Following the procedure mentioned on the blog and hit with the bellow error.
Initially, the log was complaining about the JSON line which has syntax issue and after correcting the JSON we are hit with another error.
Issue 1 :
Caused by: org.apache.kafka.common.errors.SerializationException: com.fasterxml.jackson.core.JsonParseException: Unexpected character (':' (code 58)): was expecting comma to separate Array entries
at [Source: (byte[])"{"schema":{"type":"struct","fields":[{"type":"int32","optional":false,"field":"id"},{"type":"string","optional":false,"field":"name"},{"type":"string","optional":true,"field":"department"},"payload":{"id":10,"name":"John Doe10","department":"engineering"}}"; line: 1, column: 200]
Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected character (':' (code 58)): was expecting comma to separate Array entries
at [Source: (byte[])"{"schema":{"type":"struct","fields":[{"type":"int32","optional":false,"field":"id"},{"type":"string","optional":false,"field":"name"},{"type":"string","optional":true,"field":"department"},"payload":{"id":10,"name":"John Doe10","department":"engineering"}}"; line: 1, column: 200]
{"schema":{"type":"struct","fields":[{"type":"int32","optional":false,"field":"id"},{"type":"string","optional":false,"field":"name"},{"type":"string","optional":true,"field":"department"},"payload":{"id":10,"name":"John Doe10","department":"engineering"}}
After solving the Json on issue 1 then issue 2 occurred.
[2021-05-28 02:31:08,684] INFO [Consumer clientId=connector-consumer-scylladb-sink-connector-0, groupId=connect-scylladb-sink-connector] Resetting offset for partition rndnewsix-0 to position FetchPosition{offset=0, offsetEpoch=Optional.empty, currentLeader=LeaderAndEpoch{leader=Optional[<IP_ADDRESS>:9092 (id: 0 rack: null)], epoch=0}}. (org.apache.kafka.clients.consumer.internals.SubscriptionState:396)
[2021-05-28 02:31:08,756] ERROR WorkerSinkTask{id=scylladb-sink-connector-0} Error converting message value in topic 'rndnewsix' partition 0 at offset 0 and timestamp<PHONE_NUMBER>395: JsonConverter with schemas.enable requires "schema" and "payload" fields and may not contain additional fields. If you are trying to deserialize plain JSON data, set schemas.enable=false in your converter configuration. (org.apache.kafka.connect.runtime.WorkerSinkTask:547)
org.apache.kafka.connect.errors.DataException: JsonConverter with schemas.enable requires "schema" and "payload" fields and may not contain additional fields. If you are trying to deserialize plain JSON data, set schemas.enable=false in your converter configuration.
at org.apache.kafka.connect.json.JsonConverter.toConnectData(JsonConverter.java:370)
at org.apache.kafka.connect.storage.Converter.toConnectData(Converter.java:87)
at org.apache.kafka.connect.runtime.WorkerSinkTask.convertValue(WorkerSinkTask.java:545)
at org.apache.kafka.connect.runtime.WorkerSinkTask.lambda$convertAndTransformRecord$1(WorkerSinkTask.java:501)
at org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execAndRetry(RetryWithToleranceOperator.java:156)
at org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execAndHandleError(RetryWithToleranceOperator.java:190)
at org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execute(RetryWithToleranceOperator.java:132)
at org.apache.kafka.connect.runtime.WorkerSinkTask.convertAndTransformRecord(WorkerSinkTask.java:501)
at org.apache.kafka.connect.runtime.WorkerSinkTask.convertMessages(WorkerSinkTask.java:478)
at org.apache.kafka.connect.runtime.WorkerSinkTask.poll(WorkerSinkTask.java:328)
at org.apache.kafka.connect.runtime.WorkerSinkTask.iteration(WorkerSinkTask.java:232)
at org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:201)
at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:189)
at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:238)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
[2021-05-28 02:31:08,818] INFO Using data-center name 'DC1' for DCAwareRoundRobinPolicy (if this is incorrect, please provide the correct datacenter name with DCAwareRoundRobinPolicy constructor) (com.datastax.driver.core.policies.DCAwareRoundRobinPolicy:110)
[2021-05-28 02:31:08,819] INFO New Cassandra host /<IP_ADDRESS>:9042 added (com.datastax.driver.core.Cluster:1650)
configs:
[centos7 kafka]$ cat  scylladb-sink-connector.properties
name=scylladb-sink-connector
connector.class=io.connect.scylladb.ScyllaDbSinkConnector
tasks.max=1
topics=rndnewsix
scylladb.contact.points=<IP_ADDRESS>
scylladb.keyspace=scylladb
key.converter=org.apache.kafka.connect.json.JsonConverter
value.converter=org.apache.kafka.connect.json.JsonConverter
key.converter.schemas.enable=true
value.converter.schemas.enable=true
transforms=createKey
transforms.createKey.fields=id
transforms.createKey.type=org.apache.kafka.connect.transforms.ValueToKey
confluent kafka :  @confluent-6.1.1

Hi Team,
Even in Avro mode also we are getting the below error.
./kafka-avro-console-producer --broker-list <IP_ADDRESS>:9092 --topic rnd --property parse.key=true --property key.schema='{"type":"record",name":"key_schema","fields":[{"name":"id","type":"int"}]}' --property "key.separator=$" --property value.schema='{"type":"record","name":"value_schema","fields":[{"name":"id","type":"int"},{"name":"firstName","type":"string"},{"name":"lastName","type":"string"}]}'{"id":1}${"id":1,"firstName":"first","lastName":"last"}
-bash: value.schema='{"type":"record","name":"value_schema","fields":[{"name":"id","type":"int"},{"name":"firstName","type":"string"},{"name":"lastName","type":"string"}]}'{"id":1}${"id":1,"firstName":"first","lastName":"last"}: bad substitution
[elasticsearch@centos7 bin]$

With Confluent 6.0.0 and the connector (configuration below), I can correctly insert the data.
Console producer (first line is the command, second line is an input):
bin/kafka-avro-console-producer --broker-list <IP_ADDRESS>:9092 --topic rnd --property parse.key=true --property key.schema='{"type":"record","name":"key_schema","fields":[{"name":"id","type":"int"}]}' --property "key.separator=$" --property value.schema='{"type":"record","name":"value_schema","fields":[{"name":"id","type":"int"},{"name":"firstName","type":"string"},{"name":"lastName","type":"string"}]}'

{"id":1}${"id":1,"firstName":"first","lastName":"last"}

Connector configuration:
name = rndconn
connector.class = io.connect.scylladb.ScyllaDbSinkConnector
key.converter = io.confluent.connect.avro.AvroConverter
value.converter = io.confluent.connect.avro.AvroConverter
topics = rnd
scylladb.contact.points = <IP_ADDRESS>
scylladb.port = 9042
scylladb.keyspace = ks
value.converter.schema.registry.url = http://localhost:8081
key.converter.schema.registry.url = http://localhost:8081

Before running, I created a keyspace in Scylla: CREATE KEYSPACE ks WITH REPLICATION = {'class': 'SimpleStrategy', 'replication_factor': 1}.

Closing as non reproducible and old.


No matches found, but es_trace_debug query returns results

Hi all,
I'm at a loss to explain this. In a nutshell, we have a specific rule that is refusing to return any matches - but the query that it's running is returning results.
Here's the relevant parts of the rule definition:
---
num_events: 1
timeframe:
  minutes: 1
filter:
  - query:
      query_string:
        query: >-
          test_result:"FAIL"
index: airflow-test-index-*
name: Data Validation Test Error
aggregation:
  minutes: 1
timestamp_field: timestamp
type: any

I can see a document in that index with a timestamp of 2020-08-17T23:14:48.000Z. The --es_trace_debug output shows the following query being made:
curl -H 'Content-Type: application/json' -XGET 'http://localhost:9200/airflow-test-index-*/_search?pretty&_source_includes=timestamp%2C%2A&ignore_unavailable=true&scroll=30s&size=10000' -d '{
  "query": {
    "bool": {
      "filter": {
        "bool": {
          "must": [
            {
              "range": {
                "timestamp": {
                  "gt": "2020-08-17T23:13:49.004857Z",
                  "lte": "2020-08-17T23:14:49.004857Z"
                }
              }
            },
            {
              "query_string": {
                "query": "test_result:\"FAIL\""
              }
            }
          ]
        }
      }
    }
  },
  "sort": [
    {
      "timestamp": {
        "order": "asc"
      }
    }
  ]
}'

If I run that curl command, then it returns the document I'm expecting... but for whatever reason, Elastalert doesn't see any matches:
INFO:elastalert:Queried rule Data Validation Test Error from 2020-08-17 23:13 UTC to 2020-08-17 23:14 UTC: 0 / 0 hits
INFO:elastalert:Skipping writing to ES: {'rule_name': 'Data Validation Test Error', 'endtime': '2020-08-17T23:14:49.004857Z', 'starttime': '2020-08-17T23:13:49.004857Z', 'matches': 0, 'hits': 0, '@timestamp': '2020-08-17T23:14:49.034853Z', 'time_taken': 0.029972314834594727}
INFO:elastalert:Ran Data Validation Test Error from 2020-08-17 23:13 UTC to 2020-08-17 23:14 UTC: 0 query hits (0 already seen), 0 matches, 0 alerts sent
INFO:elastalert:Background configuration change check run at 2020-08-17 23:14 UTC
INFO:elastalert:Background alerts thread 0 pending alerts sent at 2020-08-17 23:14 UTC
INFO:elastalert:Disabled rules are: []
INFO:elastalert:Sleeping for 4.999847 seconds

Any idea?

do you have buffer_time modified? It looks like you make a query too soon after the document is added to Elasticsearch. It doesn't show up in results in queries for several seconds.
Try adding
query_delay:
  minutes: 1

Thanks, @Qmando, that put us on the right track to solving it!
We're routing those logs through AWS Firehose, which has a 5-10 minute delay between log generation and delivery to Elasticsearch. Our rule never saw the messages because they were already 5-10 minutes old by the time they were indexed.


Caravan POC v2 feedback

Overall

I am updating this feedback to separate out workflow issues that may be out of scope from more direct feedback on the delivered POC v2
I am also updating this document with additional feedback on the POC v2

People

The search functionality is a little unclear to me.
Search function seems to work if I enter text into the Name or Aliases or alternative spellings or select a date on Death Date
Search function does not seem to work if select a Membership or with the Radius
The Membership drop-down menu should be renamed to Role since it is capturing that data
In the People search function, the Membership drop-down menu there is currently an option to "Choose or Create..." - this is unclear as there is no option to create and there shouldn't be on this screen. I suggest renaming to "Choose..."

Workflow/nice to have

Role should be attached to a Person’s relationship with an Organization - eg they could be a Commander for the 1 Brigade, whereas they were previously Chief of Staff for the 2 Battalion. Currently it seems that a Person only has one Role.
Part of the Membership section, which is currently separate, should be merged into the People section. It makes sense from a workflow perspective for a user to enter in the Person’s name and other details, along with their membership in an organization, all in one place. Sources always have information about a Person’s membership in an Organization.

Membership

The system is quick/responsive when entering in a Person Member and an Organization
Date field, currently none functioning - appears "cut off"
Role is a free text entry in this section, but is a drop down menu in the previous People section - it should be a drop-down menu
I'm confused why I enter a Membership (which is actually a Role) when adding a new Person and then again enter a Role when adding a Membership Person.
As currently envisioned - it makes sense to enter a Role in the Membership section, but not in the People section
When entering a new Membership person - when I finish and hit save the screen stays up - which makes it unclear if it saved or not and making it easy to hit save multiple times creating duplicate entries
I'm confused about adding an Organization Member* - I can select an Organization Member but then the other fields of Role, Title and Rank do not apply to an Organization's membership with another Organization.

Workflow/nice to have

I think this section should be merged with People and Organization

Organization

When add new Organization and hit Save - screen remains the same - making it unclear if saved or not
The fields named Real Creation and Real Dissolution are confusing - are they trying to capture if the date is the first/last citation?
Results do not display in search - everything is blank

Could not test editing an Organization as no results displayed in search
When entering a new Organization and hitting cancel, nothing happens

For Discussion with API

The understanding of the Date of Creation and Date of Dissolution has slightly changed - those dates are now only attached to a Site rather than to the Organization as a whole - so an Organization can have multiple Sites with different Dates of Creation and Date of Dissolution
Adding a new Organization only allows me to enter a single Classification - Organizations can have multiple classifications
Classification should be controlled vocab
Could not test but POC v2 could allow for Organizations to have names in multiple languages

Composition

When entering a new Composition the Parent organization, Child organization and Classification fields are free text entry - it should be a text entry/drop down controlled vocab field like when entering a Person Member and an Organization in the Membership section
The date fields when entering a new Composition are free text entry versus the drop downs in the other sections - this is confusing
When entering a new Composition and hitting cancel, nothing happens
When entering a new Composition and hitting save, nothing happens - unclear if it saved or not

Workflow/nice to have
This should be merged into the Organization section

Association

When entering a new Association the Organization and Area fields are free text entry - it should be a text entry/drop down controlled vocab field like when entering a Person Member and an Organization in the Membership section

Workflow/nice to have

This should be merged into the Organization section

Area

Search does not appear to function
Unable to add new Areas
If Classification is based on GeoName standard then this should be a controlled vocab when entering a new Area or when searching for an Area
This section refers to an Organization’s Area of Operations, correct? If so, I think it would be clearer for users if the section was named Area of Operations
This field used to be called the Area of Responsibility (Area of Operations, Jurisdiction) - I’ve renamed it to Area of Operations (Area of Responsibility, Jurisdiction) as Area of Operations is the lowest common denominator for creating a relationship between an Organization and an Area, an Area of Responsibility or Jurisdiction implies a more formal/legal relationship that may not be justified by the sourcing and would be too complicated to separate out into their own fields
When entering a new Area and hitting cancel, nothing happens
When entering a new Area and hitting save, nothing happens

For Discussion with API

POC v2 appears to allow free text entry for a Name of an area - not using the GeoName

Emplacement

Unable to add Emplacement, and no data to test

Workflow/nice to have

This should be merged into the Organization section

Site

Get Error when attempting to add a Site and no data to test

Questions/guesses as unable to test

Name this field is tied to the “Headquarters (Barracks, Base, Physical Asset)” field in the current data model, correct? I think we should rename it to “Headquarters or Base” - I think this would make it clearer to users what this field is capturing and lessen it getting confused with the GeoName for the Site

For Discussion with API

Admin Level 1 and Admin Level 2 interact with current data model and how they interact with the new location entry for UI - may not be an issue at all - but wanted to flag.

Violation

Get Error when attempting to add a Violation and no data to test

For Discussion with API

There does not appear to be a field for Perpetrator Classification
This field means a SFM staffer can enter a Classification or multiple Classifications and that the system can find the nearby (within 20km) Organizations with that Classification and tag their dossiers with Nearby Events

@jpmckinney I've tagged several points where I think there are potential issues to be resolved between the backend and the API. They may not be an issue or there may be others I haven't flagged.

I've copied them to #19 so that this issue can be just about backend.

Organization

The current data model dropped the Date of Creation and Date of Dissolution for Organizations as a whole --- we can re-introduce it as long as dates for Sites can have different date ranges. I just need to know how to introduce Date of Creation and Date of Dissolution into the Google Sheet which I'm working off currently and where the data will be imported from starting out.

If there's no use case or need for Organization creation/dissolution date, then we shouldn't add it in.

Adding a new Organization only allows me to enter a single Classification - Organizations can have multiple classifications

Not an API issue. Backend should allow multiple classifications.

Classification should be controlled vocab

Not an API issue. Backend should enforce controlled vocabulary.
Area

POC v2 appears to allow free text entry for a Name of an area - not using the GeoName

Not an API issue. Backend should constrain to GeoNames.
Event (Violation)

There does not appear to be a field for Perpetrator Classification

Not an API issue. Backend should add this field.

It's important that the backend allows for relationships between Organizations, Areas, Emplacements/Sites to be displayed in the Map and Chart functions of the UI. Because some functionalities could not be tested, I'm not sure if this is the case right now - so I want to flag it.

It's important that the backend allows for relationships between Organizations, Areas, Emplacements/Sites to be displayed up to the current date in the Map and Chart functions of the UI when a user logs on to the Security Force Monitor site. Because some functionalities could not be tested, I'm not sure if this is the case right now - so I want to flag it.


Restore RunLastSpec()

RunLastSpec() was removed in 6a39ba7 because I didn't realize it was a
feature that was exposed to the end user. This brings it back and
incorporates the changes to track last file and line separately.

Should we add a test for this?

Looks good otherwise.

RunCurrentSpecFile() and RunNearestSpec() only set the s:last_spec variable when they're inside a spec file, and I'm not sure how to stub out s:InSpecFile() in vspec in order to properly test that.  Suggestions?

How about either setting the s:last_spec or testing the case of calling RunAllSpecs first then RunLastSpec?

Added some tests in 8e36d5e3fbe5a164b48390f335e85a9092130d63

:+1:


only show properties divider if there are properties

highlighted is what is changed

Thank you for the contribution!

No, Thank you! 🤝


Google.Cloud.Firestore Listener instances limited to 100

Hello !
I am using Firestore with C# SDK
After running this simple code :
int callsCount = 0;
int resultCount = 0;

var stores = FirestoreManager.Instance.Collection("stores");

stores.Listen((QuerySnapshot querySnapshot) =>
{
    foreach (var sn in querySnapshot)
    {
        var storeTask = FirestoreManager.Instance.Collection($"stores/{sn.Id}/task_configurations");

        callsCount++;
        storeTask.Listen((QuerySnapshot querySnapshot) =>
        {
            resultCount++;
        });
    }
});

Thread.Sleep(6000);

Logger.Write("Calls : " + callsCount + " Results : " + resultCount);

callsCount is equal to the size of my 'stores' collection, but resultCount is always equal to 100 (my collection is bigger).
The same code in javascript on the same collections is working (resultCount == callsCount == 300).
var listenersCount = 1;
var resultsCount = 1;

admin.firestore().collection('foo').onSnapshot((snapshot) => {
        resultsCount++;
        snapshot.docChanges().forEach((change) => {
listenersCount++;
  change.doc.ref.collection('foo_foo').onSnapshot((foo_snapshot) => {
                    configurationsSnapshot.docChanges().forEach((configurationChange) => {
  resultsCount++;
                    });
});

await sleep(10000);
console.log(listenersCount);
console.log(resultsCount);

I was wondering if it could be related to GRPC settings, like 'Max concurrent stream' do you have any clue?

I'll look into this tomorrow. Thanks for the minimal repro - that'll really help. I don't have any initial ideas about what might be going on, but I'll let you if when I've uncover anything.

I can't reproduce the problem, but I've fixed one bug in your code - I doubt that it's causing the problem here, but it's worth knowing about: you're modifying resultCount from potentially multiple threads without any sort of memory barrier. With your original code and 300 documents, I ended up getting results of about 286. Using Interlocked.Increment fixed that.
Here's the code I've used to try to reproduce the problem:
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License"):
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using Google.Cloud.Firestore;

if (args.Length != 2)
{
    Console.WriteLine("Arguments: <project-id> <collection-id>");
    return;
}

string projectId = args[0];
string collectionId = args[1];

var db = FirestoreDb.Create(projectId);

var collection = db.Collection(collectionId);

int callCount = 0;
int resultCount = 0;
collection.Listen((QuerySnapshot querySnapshot) =>
{
    foreach (var sn in querySnapshot)
    {
        var subcollection = sn.Reference.Collection("subcollection");

        Interlocked.Increment(ref callCount);
        subcollection.Listen((QuerySnapshot querySnapshot) =>
        {
            Interlocked.Increment(ref resultCount);
        });
    }
});

Thread.Sleep(10000);

Console.WriteLine($"Calls: {callCount}; Results: {resultCount}");

Now, it's possible that this depends on the gRPC implementation you're using. I was testing with a .NET 6 console app, on Windows - it would be using Grpc.Net.Client. Please could you provide as much information as you can about the context you're running the code in?
I'd also note that with your current code, you're adding new listeners every time the stores collection changes. That means you could end up having multiple listeners for the same store. That may not be an issue in your particular use case, but it's worth considering. If you really only want to set up the listeners for "the documents present at the time of starting" then I'd suggest using CollectionReference.GetSnapshotAsync() instead of Listen().

I can't reproduce the problem, but I've fixed one bug in your code - I doubt that it's causing the problem here, but it's worth knowing about: you're modifying resultCount from potentially multiple threads without any sort of memory barrier. With your original code and 300 documents, I ended up getting results of about 286. Using Interlocked.Increment fixed that.
Here's the code I've used to try to reproduce the problem:
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License"):
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using Google.Cloud.Firestore;

if (args.Length != 2)
{
    Console.WriteLine("Arguments: <project-id> <collection-id>");
    return;
}

string projectId = args[0];
string collectionId = args[1];

var db = FirestoreDb.Create(projectId);

var collection = db.Collection(collectionId);

int callCount = 0;
int resultCount = 0;
collection.Listen((QuerySnapshot querySnapshot) =>
{
    foreach (var sn in querySnapshot)
    {
        var subcollection = sn.Reference.Collection("subcollection");

        Interlocked.Increment(ref callCount);
        subcollection.Listen((QuerySnapshot querySnapshot) =>
        {
            Interlocked.Increment(ref resultCount);
        });
    }
});

Thread.Sleep(10000);

Console.WriteLine($"Calls: {callCount}; Results: {resultCount}");

Now, it's possible that this depends on the gRPC implementation you're using. I was testing with a .NET 6 console app, on Windows - it would be using Grpc.Net.Client. Please could you provide as much information as you can about the context you're running the code in?
I'd also note that with your current code, you're adding new listeners every time the stores collection changes. That means you could end up having multiple listeners for the same store. That may not be an issue in your particular use case, but it's worth considering. If you really only want to set up the listeners for "the documents present at the time of starting" then I'd suggest using CollectionReference.GetSnapshotAsync() instead of Listen().

Thanks for for your fast reply.
This code is running over windows 11 environnent.
The project use .NET 8.
The behavior is the same after running the code you provided.
Google.Cloud.Firestore 3.5.1
I can understand that using so many listeners could lead to significant resource consumption, and a lot of parallelism, but we need it in our use case.

I can understand that using so many listeners could lead to significant resource consumption, and a lot of parallelism, but we need it in our use case.

My comment wasn't about using lots of listeners, so much as ending up with duplicate listeners. (If one of the store documents changes, your "outer" listener will create a new "inner" one.)
It's interesting that you're now seeing Calls: 275 instead of 300. Does your collection have fewer documents now?
I'll try this on .NET 8 myself - running on Windows 11 would be trickier, but I can do it if necessary.
I assume this is running on your local dev machine? Is there a firewall or proxy which might be limiting things?
Currently this code is ignoring the value returned by Listen - if that's reporting errors, that could be useful. When I get time, I'll post a new version with more error reporting.
It would also be interesting to try a version which only used a single query snapshot (so no "outer" listener) just to see if that makes any difference. I know it might not be suitable for your application code, but it could help with diagnostics. I'll report back when I've done a bit more testing - it should be in the next couple of hours.

Hello, i found the solution.
I downgraded my project from .NET 8 to .NET 6, and i dont have the problem anymore.
I'm very curious to know where the problem could come from.

Okay, that's really good to know, thanks. I'll investigate further - hopefully we can provide a way of getting it working with .NET 8. (I wonder whether they have different defaults for maximum concurrent streams.)

I was wondering if it could be related to that configuration  : https://learn.microsoft.com/en-us/dotnet/core/runtime-config/threading "System.Threading.ThreadPool.MaxThreads": 20.
Do you think it could be?

No, I don't think it's a threading aspect at all. We should have very few threads running. I strongly suspect that it's a difference in terms of which HttpClientHandler is used, or how it's configured. But I'll look into it.

Darn - I still can't reproduce, even with .NET 8. I'm going to try on my Windows 11 machine though to see whether that makes a difference.
In the meantime, here's an updated sample which is slightly simpler (no outer listener) but which will report failures in listener tasks. If you could try this and see whether you get any exceptions reported in .NET 8.0, that would be really helpful.
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License"):
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using Google.Cloud.Firestore;

if (args.Length != 2)
{
    Console.WriteLine("Arguments: <project-id> <collection-id>");
    return;
}

string projectId = args[0];
string collectionId = args[1];

var db = FirestoreDb.Create(projectId);

var collection = db.Collection(collectionId);

int callbackCount = 0;

var snapshot = await collection.GetSnapshotAsync();
foreach (var doc in snapshot)
{
    var subcollection = doc.Reference.Collection("subcollection");

    var listener = subcollection.Listen(snapshot => Interlocked.Increment(ref callbackCount));
    _ = listener.ListenerTask.ContinueWith(task => Console.WriteLine(task.Exception), TaskContinuationOptions.OnlyOnFaulted);
}

Thread.Sleep(10000);

Console.WriteLine($"Docs: {snapshot.Count}; Callbacks to listener: {callbackCount}");

Ooh - on Windows 11 I can reproduce it. That's going to make it a pain to work on, but it's huge progress.

Have tried and failed to reproduce it with a local gRPC server + client. Will try to at least get our Firestore wrapper library out of the equation next. (That'll be tomorrow.)

Ooh - on Windows 11 I can reproduce it. That's going to make it a pain to work on, but it's huge progress. (I don't see any exceptions on the listener tasks though.)
Having done a little debugging, I'm getting a SocketsHttpHandler with EnableMultipleHttp2Connections set to true in all cases, so I'm not sure what the difference is yet. Still working on it...

Same for me, no exception on the listeners.
Thanks for the investigations

Still diagnosing things - and have new code ready to test after lunch - but one thing I've found already is that calling Listen on the document references reproduces the problem, so we don't need to worry about subcollections (which I consider more complex).
Next test will be making the calls directly with the "raw" gRPC stub instead of via the client library. (But a stub set up by the client library, to start with...)

Okay, using the same stub as the client library uses, I can reproduce the problem - only 100 clients ever get to send a request.
When creating a stub manually (using the same credentials, but otherwise-empty channel options) it looks like everything is working.
So now I "just" need to check very carefully what channel options we're providing (and any other relevant metadata, potentially). Progress!

A bit more progress: if you use the same channel that was originally used to list documents, you see the problem. If you use a different channel for listening than for listing the documents, all is well.
So the next question is why...
I won't be working again until Tuesday (Friday and Morning are UK public holidays) but I'll pick it up after that.

Next bit of information - using CollectionReference.ListDocumentsAsync still demonstrates the problem (and is a much simpler call).

Okay, trying this with just the "raw" code, and with more targets, I can see that it still works in .NET 6, but it's still broken in .NET 7, 8 and 9.
I'm going to do a little more investigation, but I'm getting very close to "I can't dig any further, I need to file a bug in https://github.com/grpc/grpc-dotnet".

Okay, using the same stub as the client library uses, I can reproduce the problem - only 100 clients ever get to send a request.

This appears to be different when using the "raw" stub. Everything sends a request, but most only 100 of the clients get a response. I'm going to try to reproduce the earlier "blocked while sending" in case that's relevant.

I'm going to try to reproduce the earlier "blocked while sending" in case that's relevant.

I can't reproduce that at the moment - I suspect it was a diagnostic failure on my part. For the moment, I'll go with "I reckon it's not getting any responses."

I've created a new issue linked above, as I think I've got to the end of what I can do at the moment. We'll see what additional diagnostics are suggested.

Marking as external as we're basically blocked on feedback on the gRPC client.

@Skinz3: We now understand what's going on, and there's a workaround on the issue - although it's really not terribly pleasant. I'm going to keep thinking how we can fix this in the Cloud client libraries - for the moment, a simpler workaround would be to use the Grpc.Core implementation, if you're happy to do that. (See the transport selection docs for details.)


My OB2 is saving bad hits as NONE on the hits tab

Hello Folks !
I would like to know how to avoid getting bad hits saved on the HITS tab ?
Thank you !

Easy fix: go to config settings and put the ban loop evasion to 0.
Explanation for the behaviour:
Those are the lines that were banned more than 100 times and hence were marked as TO CHECK. You should look into them because you're probably missing some keys in your keycheck, that's the purpose of ban loop evasion. Turn on the bot log in RL Settings and look at their full log after you get them in a job, so you can spot what went wrong (100 BANs means it's not a proxy issue but most definitely some missing keys in the keycheck).


Support for lazy evaluation of large/infinite lists

🚀 Feature request
Support for working with generators and iterators without casting them to array to force evaluation.
Current Behavior
Currently fp-ts only supports fully evaluated arrays which means limits it's use to small arrays. It is often desirable to defined huge structures, while not all the results of that structure are needed.
Desired Behavior
import { pipe } from 'fp-ts/lib/pipeable'
import { map, take } from 'fp-ts/lib/Iterator'
import { enumFrom } from 'fp-ts/lib/Enumeration'

const evenNumbers = pipe(
  enumFrom(0),
  map((x) => 2 * x),
);
expect(pipe(
  evenNumbers,
  take(4),
), [0, 2, 4, 6])

Suggested Solution
Implement new Enumeration and Iterator modules.
Who does this impact? Who is this for?
For everyone. Using iterators makes defining things easier.
Describe alternatives you've considered
It is possible to work around this by sacrificing generality. For example one could create a function that specifically calculates the first 4 even numbers without relaying on a general definition of even numbers.
Additional context
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators
https://docs.python.org/3/library/itertools.html
https://www.futurelearn.com/courses/functional-programming-haskell/0/steps/27237
http://zvon.org/other/haskell/Outputprelude/enumFromThenTo_f.html
Your environment
I tend to use latest versions of fp-ts and TypeScript where possible.

TypeScript 3.6 release notes have. some explanation about related native types https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-6.html

IMO generators/iterators (pull observables essentially) seem to be out of scope of fp-ts for me.

IMO generators/iterators seem a bit out of scope of fp-ts, they are just too specific.

To clarify, this issue is not about adding general support for all possible iterator and generator combinations. It is about using iterators to implement type LazyArray = Iterator and type NonEmptyLazyArray = Iterator.

I think the proper way for fp-ts would be to support generic IterableIterator and to supply appropriate typeclass instances (Functor etc.).
Like the following:
import { Functor1 } from 'fp-ts/lib/Functor';

export const URI = 'IterableIterator';
export type URI = typeof URI;

declare module 'fp-ts/lib/HKT' {
    interface URItoKind {
        [URI]: IterableIterator;
    }
}

export const iterableIterator: Functor1<URI> = {
    URI,
    map: (fa, f) => new MapIterator(fa, f),
};

const DONE = {
    value: null,
    done: true as const,
};

class MapIterator implements IterableIterator {
    constructor(readonly fa: IterableIterator, readonly f: (a: A) => B) {}

    [Symbol.iterator]() {
        return this;
    }

    next() {
        const result = this.fa.next();
        return result.done
            ? DONE
            : {
                  value: this.f(result.value),
                  done: false as const,
              };
    }
}

Note that there's also AsyncIterableIterator - should we also support this?

There's also https://github.com/ReactiveX/IxJS (and perhaps any other implementation of pull-observables) - should it be added to the core or to something like fp-ts-ixjs?

Or it could be even simpler with generators with downlevelIteration: true in tscong.json:
import { Functor1 } from 'fp-ts/lib/Functor';

interface SimpleGenerator extends Generator {}
interface SimpleAsyncGenerator extends AsyncGenerator {}
interface SimpleGeneratorFunction {
    readonly prototype: SimpleGenerator;
    (): SimpleGenerator;
}

declare module 'fp-ts/lib/HKT' {
    interface URItoKind {
        SimpleGenerator: SimpleGenerator;
        SimpleAsyncGenerator: SimpleAsyncGenerator;
        SimpleGeneratorFunction: SimpleGeneratorFunction;
    }
}

export const simpleGenerator: Functor1<'SimpleGenerator'> = {
    URI: 'SimpleGenerator',
    *map(fa, f) {
        for (const a of fa) {
            yield f(a);
        }
    },
};

export const simpleAsyncGenerator: Functor1<'SimpleAsyncGenerator'> = {
    URI: 'SimpleAsyncGenerator',
    async *map(fa, f) {
        for await (const a of fa) {
            yield f(a);
        }
    },
};

export const simpleGeneratorFunction: Functor1<'SimpleGeneratorFunction'> = {
    URI: 'SimpleGeneratorFunction',
    map: (fa, f) =>
        function*() {
            for (const a of fa()) {
                yield f(a);
            }
        },
};

const r = simpleGenerator.map(
    (function*() {
        yield 1;
    })(),
    n => `${n * 2}`,
);
const ar = simpleAsyncGenerator.map(
    (async function*() {
        yield 1;
    })(),
    n => `${n * 2}`,
);
const gf = simpleGeneratorFunction.map(
    function*() {
        yield 1;
    },
    n => `${n * 2}`,
);

@raveclassic I think that generators should go in a library in its own

@gcanti Yeah, this is what I thought first. But on the other hand they are part of the language, not some foreign abstraction like Observable (although it's on its way to ECMA spec). It's the same as Array, Map or Set. Even more we can iterate over them as well.

I ended up implementing some helpers for type NonEmptyGeneratorFunction = () => Generator. The quality is not great but they let me experiment with the model. https://github.com/maasglobal/scrapql/blob/master/src/tests/negf.ts

I love the idea of this, and would like to see this in a library somewhere or in here.
Are there any updates on if someone has been working on this?

I still use the code I linked but it has moved to
https://github.com/maasglobal/scrapql/blob/master/src/utils/negf.ts
https://github.com/maasglobal/scrapql/blob/master/src/utils/__tests__/negf.ts
However, it still more of a temporary hack/experiment and I don't have intention to develop it much further. I think it would be useful to have separate types for Nonempty generator. generator and infinite generator. Also there is need for utilities for converting between arrays and generators.

I imagine the type signature would look as follows.
export type GenFResult = IteratorResult;
export type GenF = () => Generator;
export type NEGenFResult = IteratorResult;
export type NEGenF = () => Generator;
export type InfGenFResult = IteratorResult;
export type InfGenF = () => Generator;

JavaScript is perhaps soon getting some standard tools for working with iterators. They should at least solve some simple cases and will perhaps make implementing this kind of library easier. https://github.com/tc39/proposal-iterator-helpers

@cyberixae I have something similar here: https://gist.github.com/mtavkhelidze/a6191a85670bcff9e1472840add4b5a6

JavaScript standard library functions seem to discard the iterator return value. Below are the latest versions of the type signatures I was studying. Unfortunately these are incompatible with the way JavaScript standard library functions deal with iterators. Because these signatures are incompatible to begin with, it might be a good idea to create some 100% incompatible way that suits the use cases of the lazy lists better than standard iterators or generators.
type AbstractList<Y, R> = () => Generator<Y, R, never>
type InfiniteList = AbstractList
type NonEmptyList = AbstractList
type EmptyList = AbstractList<never, void>
type List = InfiniteList|NonEmptyList|EmptyList

I wrote some alternative type signatures for lazy lists. Maybe I end up writing a library. Let me know whether or not you think these signatures would do the job.
import { ReadonlyNonEmptyArray } from './ReadonlyNonEmptyArray'

/* nodes */

export type StaticHead = {
  readonly _tag: 'StaticHead'
  readonly head: ReadonlyNonEmptyArray
  readonly tail: List
}
export type FiniteHead = StaticHead & {
  readonly tail: FiniteList
}

export type LazyHead = {
  readonly _tag: 'LazyHead'
  readonly head: () => Generator
  readonly tail: List
}
export type InfiniteHead = LazyHead & {
  readonly tail: InfiniteList
}

/* terminators */

export type EmptyTail = {
  readonly _tag: 'EmptyTail'
  readonly tail: ReadonlyArray & []
}

export type InfiniteTail = {
  readonly _tag: 'InfiniteTail'
  readonly tail: () => Generator
}

/* possibly infinite */

export type List = LazyHead|StaticHead|EmptyTail|InfiniteTail
export type EmptyList = EmptyTail
export type NonemptyList = StaticHead

/* provably infinite */

export type InfiniteList = InfiniteHead|InfiniteTail
export type EmptyInfiniteList<_A> = never
export type NonEmptyInfiniteList = InfiniteList

/* provably finite */

export type FiniteList = FiniteHead|EmptyTail
export type EmptyFiniteList = EmptyTail
export type NonemptyFiniteList = FiniteHead


Added description field to kek bundle

Context
We are starting to get more and more keys and we start losing track of what they are for. Adding free-text description would make things easier for operators.
Changes
Added Description field to Bundle. Intended to be used by the vault plugins
Checklist

[ ] I have considered the impact of this change and added a Change Classification Label (change:standard, change:impactful, change:emergency)
[ ] Change meets or does not compromise the Baseline Security Requirements

As discussed online, storing the description of the keys in a confluence page is preferred over changing the storage and code.


Get Order Details doesn't provide price value (price comes back equal to 0)

When I try to get the order details after purchasing the price that shows there is 0. I'm wondering if this could be an API issue.
The code I used is:
from kucoin.client import Market
import keysKucoin
from kucoin.client import Trade
import json

client = Market(url='https://api.kucoin.com')

api_key = keysKucoin.APIkey
api_secret = keysKucoin.Secretkey
api_passphrase = keysKucoin.Passphrase

client = Trade(key=api_key, secret=api_secret, passphrase=api_passphrase, is_sandbox=False, url='')

order_id = client.create_market_order('NEO-USDT', 'buy', size='0.01')

order = client.get_order_details(order_id["orderId"])
print(json.dumps(order, indent=4, sort_keys=True))

and the print I get is
{
    "cancelAfter": 0,
    "cancelExist": false,
    "channel": "API",
    "clientOid": clientOid,
    "createdAt":<PHONE_NUMBER>000,
    "dealFunds": "1.047733",
    "dealSize": "0.01",
    "fee": "0.001047733",
    "feeCurrency": "USDT",
    "funds": "0",
    "hidden": false,
    "iceberg": false,
    "id": id,
    "isActive": false,
    "opType": "DEAL",
    "postOnly": false,
    "price": "0",
    "remark": null,
    "side": "buy",
    "size": "0.01",
    "stop": "",
    "stopPrice": "0",
    "stopTriggered": false,
    "stp": "",
    "symbol": "NEO-USDT",
    "tags": null,
    "timeInForce": "GTC",
    "tradeType": "TRADE",
    "type": "market",
    "visibleSize": "0"
}

(The id and ClientOid fields are changed, I don't know if this information is dangerous to have public)
As you can see, the price in the response is 0, when it should be 104.7733

Due to many changes in the SDK, please refer to our latest documentation: https://www.kucoin.com/docs/beginners/introduction
Please try updating to the latest version of the SDK and modify your code to try again. If you encounter any issues, feel free to provide feedback.


add cmake support

cmake

Closing this since there'a an easier workaround: https://github.com/Pithikos/C-Thread-Pool/pull/50


[npm version] Won't Install on io.js

I see in #4811 that you added support for io.js, and I see that it's added to the package.json, but if I try and install<EMAIL_ADDRESS>I get an error:
☃ [ghost@cameronspear] ~/blog/ [master] node -v
v1.6.4
☃ [ghost@cameronspear] ~/blog/ [master] rm -Rf node_modules
☃ [ghost@cameronspear] ~/blog/ [master] npm install
npm ERR! Linux 3.2.0-24-virtual
npm ERR! argv "/usr/local/bin/iojs" "/usr/local/bin/npm" "install"
npm ERR! node v1.6.4
npm ERR! npm  v2.7.5
npm ERR! code ETARGET

npm ERR! notarget No compatible version found<EMAIL_ADDRESS><0.6.0'
npm ERR! notarget No valid targets found.
npm ERR! notarget Perhaps not compatible with your version of node?
npm ERR! notarget This is most likely not a problem with npm itself.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'cameronspear.com'
npm ERR! notarget

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ghost/blog/npm-debug.log

Full npm-debug.log contents
I tried npm install -g npm as per npm/npm#4984, but it didn't make a different.
I should note that if I use Node 0.10.x or 0.12.x, it works.

I should note that if I use Node 0.10.x or 0.12.x, it works.

Hi @CWSpear, our support for io.js extends to v1.2.0 only (this is mentioned in the README and package.json).
Unfortunately, io.js moves too quickly for most of our dependencies to keep up, and the amount of testing and fiddling around with our build that is needed for each release is not something the core team can commit to doing.
If you want to do the testing work to figure out if we can now support more versions of io.js, that would be welcomed, but this needs to be community driven.

Ah yes, I got ~ and ^ confused again.
That does seem to be a common issue for io.js at this time, and there doesn't seem to be any really great solutions other than just adding it and letting people go wild (i.e., I thought had misinterpreted the package.json as "iojs": "^1.2.0"). So I was just gonna try and install and see what happens.
I think ultimately, io.js will hopefully plateau and minor patches will be a lot farther and few in between.


Add a ROOT path constant for match

Continuation of work on concerns raised in #5770
Replace use of Helper.gem_path with Match::ROOT

🎄


AMQP encoder does not handle large integers

I would like to update RbFly performance tests for AMQP codecs (https://wrobell.dcmod.org/rbfly/performance.html), but it seems the encoder you are using does not support large integers, so the bug report
The following
from rstream.amqp import AMQPMessage
bytes(AMQPMessage(body={'large-int': 2 ** 32 + 1}))

results in
File ~/projects/rbfly/.venv/lib/python3.12/site-packages/rstream/_pyamqp/_encode.py:262, in encode_int(output, value, with_constructor, use_smallest)
    260     output.extend(struct.pack(">i", value))
    261 except struct.error as exc:
--> 262     raise ValueError("Value supplied for int invalid: {}".format(value)) from exc

ValueError: Value supplied for int invalid:<PHONE_NUMBER>

Thank you @wrobell we will have a look as soon as poosible


feat: start adding socket tests

@ospencer this is the start of adding tests for sock_accept. I've commented out the part that does the actual sock_accept call since that is not implemented yet but it did already find one issue on the pre-open side of things.
Looking at the method a bit more since our discussion I think that possibly the on_new_connection method can simply call uv_cond_signal on a condition associated with the socket.  Inside of sock_accept if the flags indicated that the call should be blocking then if an initial call to  uv_accept returns UV_EAGAIN then it would call uv_cond_wait on that same condition associated with the sock.
I think that implementation for on_new_connection would mean that if previous blocking call to sock_accept had been made before the connection came in it would be woken up when a new accept is made, otherwise if no connection has been made when the sock_accept is called it will either return with UV_EAGAIN if the flags indicated it should be non-blocking or block waiting until the connection later came in.  We'd also have to have some clean to be able to break out of the wait I think for shutdown.

@ospencer I experimented a bit based on the discussion with @cjihrig  in https://github.com/nodejs/uvwasi/issues/211#issuecomment-1601615580 and added an initial implementation for uvwasi_sock_accept.  Based on the uvwasi documentation I'm not sure we can depend on how calls to uv_accept are being used but it seems to pass initial test test when the connection is made before the call. Next thing will be to test when the connection comes in after the uv_accept call. The test needs an extra thread to do and I ran out of time before being able to add that.

:( CI seems to fail on mac os. I wonder if it might be because I've already closed the connection and I'm just getting lucky on linux. @ospencer any change you have a mac and can try/debug a bit there?

I pushed all of the tests so the client runs off thread and so that there is a delay after the connectionis made before the connection close, earlier tests passed on macos as well :). New tests were added to check the cases where the connection comes in after a blocking call and that's looking good a well. No tests actually test that we can send/receive on the socket we get from uvwasi_sock_accept but so far looking good.

@ospencer just so you are in the loop. Have also added initial implementations of uvwasi_sock_send and uvwasi_sock_receive.  Right now using global vars etc. so not what we'll want in the end but shows how using the async libuv calls looks like.

@mhdawson is this ready for review?

@cjihrig it still needs some work before it might be ready to land.  I've just found an issue that I'm current investigating while adding code in the test to close sockets, not sure if its a timing issue in the tests or a problem doing uv_accept. A few more things I think should happen before it is ready to land include:

look through other calls that accept fds and see if any are required for minimal functionality (for example closing sockets). Implement socket support for minimal set, and for the others possibly add code to return a reasonable error value.
cleanup pass

Having said that a top level scan by yourself to see it's heading in the right direction/using reasonable approaches would be useful to avoid too much more work if the work so far is going in the wrong direction.

@cjihrig good news is that the accept issue was a problem in the uvwasi_sock_accept versus something in how uv_accept works :).
One question, the libuv APIs don't seem to support closing the Read (versus write) part of the socket. Do you think we should throw a non-implemented error or simply add a flag to fd structure to mark that the socket has been closed for read and then return a non-writable error if reads are attempted on the socket later on.

@cjihrig accepted changes/pushed a commit to fix the 'easy' review comments. Now looking at the rest.

The tests look like they are likely still timing out on Windows and MacOS.
I had created a Windows machine and they run fine on my local machine so not sure what is going on since the action does not seem to show any output until they actually time out.

@cjihrig I think this is now ready for another review with the goal of getting it to lond.
The tests now run and pass on all of the CI platforms.
I believe I've addressed the comments except for using port 0. I'm not sure how we'd get the port that was used based on the available APIs.
I've also added validation so that we indicate when a requested option is not supported as well as the standard debugging which was missing before.


Encountered (N) file(s) that may not have been copied correctly on Windows

During base prepare
git clone https://huggingface.co/runwayml/stable-diffusion-v1-5 ckpts/Base_Model
Encountered (N) file(s) that may not have been copied correctly on Windows
Related issue discussed.
https://github.com/git-lfs/git-lfs/issues/4744
I think this can be treated as a warning.

Thanks for your interest. It seems that changing git to git-lfs can solve the problem on Windows.

Actually this happened on Linux, however, the error is reported related to Windows.  I am not convinced it's more than a warning, and the error mentions something about git smudge .

Will close.  Warning seems to be implied and the system will work properly.


Expose TransactionOptions when beginning a transaction from DatastoreDb

This is covered by #1447.

... which is now merged.


Object Graph Handlers:  Wrap a primitive in the membrane

Major pieces:

[ ] Transforming a primitive into another primitive
[ ] Transforming a primitive into an object, so the Membrane can store references to it
[ ] Tracking method calls across parallel object graphs of the stored primitive, so we can get the impact of the changes in one graph from the other
[ ] Membrane-aware code to set up the initial conversion

Prerequisite for #24


Pre-parser?

Consider adding a layer between the lexer and the parser. It would generate a flat list of items (not a parse tree) but a bit richer than the ones the lexer generates.
Example items:

Comment(String)
Operand(LessOrEqual)

Won't do, sticking to parser combinators.


pi: allow user to provide IP from UI

run selenium-tests

rerun tests

rerun tests

run cdd-overview


Safer filtration of cases with _seg suffix

Quick fix for situation when "_seg" is part of the case path.
I've resolved my issue mentioned in https://github.com/MIC-DKFZ/nnDetection/issues/134 and renamed the experiment to an unfortunate name of "_trim_seg_to_brain". All studies were filtered out on the start of the training.

Thanks for the PR 👍


 Clean works differently on 1…

 Clean works differently on 120. Use path.Clean instead.

Codecov Report
Base: 92.80% // Head: 92.84% // Increases project coverage by +0.03% :tada:

Coverage data is based on head (702d74b) compared to base (b888a30).
Patch coverage: 63.63% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master       #2      +/-   ##
==========================================
+ Coverage   92.80%   92.84%   +0.03%
==========================================
  Files          38       39       +1
  Lines        4506     4503       -3
==========================================
- Hits         4182     4181       -1
+ Misses        236      234       -2
  Partials       88       88

Impacted Files
Coverage Δ

middleware/static.go
69.23% <55.55%> (+0.42%)
:arrow_up:

middleware/static_other.go
100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


feat: Remove @react-email/render from required dependencies list

this is an attempt to improve DX by quite a lot, basically making react-email as a peerDependency and only dynamically imported if the methods are called with the react property
closes #405, closes #381, closes #325, closes #309, closes #243

@vcapretz Can you release an alpha version of it?

@bukinoshita<EMAIL_ADDRESS>is now available to test