Errors

I realized it's not so ideal to only have English error messages, some were not well translated
So I took back your intial Japanese error messages https://github.com/pepabo/gmopg/blob/42a59c709e9dbbaee724edd2cd00930a069ba988/src/errors.ts#L30 and the current translations, and it's in src/error-codes.json now
it's a breaking change because badRequest.errors is an array of {ja: string, en: string} instead of array of string
maybe we could have badRequest.errors or badRequest.errorsJa and badRequest.errorsEn?
@linyows

npm run ci succeeds for me locally, Idk why it fails in travis

@caub I agree that it's not the client's job to translate on their own. I think that it is okay to return what is in the API specification document or return the response as it is.

The error instructions are often generic and not so useful, so I used the error message (in Japanese and English) when the table has it

I think so too. It is strange that returns instructions instead of an error message.

@caub I agree that it's not the client's job to translate on their own. I think that it is okay to return what is in the API specification document or return the response as it is.

I was given the Japanese and English messages for 269 error codes (E00000000,E01010001, E01010008, E01010010, E01020001, E01020008, ... 42G990000)

and src/error-codes.json has 1713 items, I remember I gogole-translated the remaining ones
What do you think we should do? I know GMOPG operates mostly (only?) in Japan, but as a developer I'm quite happy if I've an error message in English :))

What do you think we should do? I know GMOPG operates mostly (only?) in Japan, but as a developer I'm quite happy if I've an error message in English :))

If so, leave English translations. 👍 However, it is good to put a comment in src/errors.ts that it may not be correct because it is a Google Translate.

Yes, good point, I added a comment

npm run ci succeeds for me locally, Idk why it fails in travis

Fixed at #21, so merge master please.

Pull Request Test Coverage Report for Build 265

3 of 3 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.005%) to 98.755%

Totals

Change from base Build 263:
0.005%

Covered Lines:
203

Relevant Lines:
204

💛  - Coveralls

Thanks!

@caub Why is error-codes defined by JSON instead of TS?

@caub Why is error-codes defined by JSON instead of TS?

because it's just data, .json is portable so that seems interesting (it's also more efficient to use json than object literals but that was absolutely not a concern when choosing)

I didn't know that object literals would be parsed twice if the data was large. I was not realize in this review. Sorry.


Why I need to set Id to 0?

I figured out that when I am inserting and Id is set it will work until there is no same Id already in the database. It is strange because I thought that Id is ignored and database generate it especially when this settings are used: ( I am using this settings)
:
 var bulkConfig = new BulkConfig { SetOutputIdentity = true, PreserveInsertOrder = true };`
`:

This is from documentation
PreserveInsertOrder makes sure that entites are inserted to Db as they are ordered in entitiesList.
However for this to work Id column needs to be set for the proper order.
For example if table already has rows, let's say it has 1000 rows with Id-s (1:1000), and we now want to add 300 more.
Since Id-s are generated in Db we could not set them, they would all be 0 (int default) in list.
But if we want to keep the order as they are ordered in list then those Id-s should be set say 1 to 300 (for BulkInsert).
Here single Id value itself doesn't matter, db will change it to (1001:1300), what matters is their mutual relationship for sorting.
And this is my code:
 ```
   var bulkConfig = new BulkConfig { SetOutputIdentity = true, PreserveInsertOrder = true };
        var didDataObjectValues = new List<ECUDIDDataObjectValue>();
        try
        {
            using (var transaction = await _databaseContext.Database.BeginTransactionAsync())
            {
                await _databaseContext.BulkInsertAsync(eCUIdentificationReports, bulkConfig);

                eCUIdentificationReports.ForEach(eCUIdentificationReport =>
                {
                    eCUIdentificationReport.DIDDataObjectValues.ToList().ForEach(didDataObjectValue => didDataObjectValue.ECUIdentificationReportId = eCUIdentificationReport.Id);
                    didDataObjectValues.AddRange(eCUIdentificationReport.DIDDataObjectValues);
                });
                await _databaseContext.BulkInsertAsync(didDataObjectValues, bulkConfig);

                await transaction.CommitAsync();
            }
        }

There should be no big deal here,but with Id set to zero I am getting complex data (multiple child entities have multiple child entities) inserted wrongly (wrong connections, although I manually made connections). I need to figure out this

If you set PreserveInsertOrder then there you should also set IDs for sorting.
PreserveInsertOrder will not work if all IDs are left to defualt 0.
Good practice is to use negative values, more info in ReadMe.


refactor(proto): Misc cleanup on protos

fix(proto): Don't delete all generated code if protoc fails
We currently delete all the generated code before running protoc so that we can start with an empty directory (avoiding cases where we miss deleting an old generated file).
This means that if protoc fails, we delete all the generated code, which can be annoying. Let's instead generate the code into the staging directory and only move it into the final directory if protoc exits successfully.

refactor(proto): Move providers to cloudprovider package

refactor(proto): Make Spinnaker nested under front50
This message is called 'Spinnaker' but the only thing that unifies what is in it is that it contains the things under 'spinnaker' in the front50 config, which makes it seem reasonable to nest it under front50.

refactor(proto): Misc cleanup on protos
Add a few missing comments and alphabetize imports.
In protos that only contain other non-primitive types, I didn't add a comment on each field. (Ex: Given that the Clouddriver proto has a KubernetesProvider field that is itself commented, it seemed redundant to also add a comment inside the clouddriver proto.)

That was close, had a poorly-formatted PR name, good think @spinnakerbot doesn't know about this repo!


SwiftUI View Tests

This adds UIImage tests for SwiftUI Views through UIHostingController.

@stephencelis, thanks for the feedback. I made the necessary changes. A few things to note:

It looks like iOS 13 has some subtle font changes. This caused quite a few tests to fail. I updated the tests. I can take these updates out if you would like the PR to be smaller.
I am currently not running macOS 10.15, so I am not able to add extensions for SwiftUI.View and test them for NSImage, so this PR only covers iOS and tvOS.

I wonder if there's a way to have the snapshot sized to the "intrinsic" size of the view. It's strange to have all snapshots sized to the size of the screen or to have to always provide an explicit size.

This is what I came up with after some hacking, @natemann. Maybe it will be useful:
        .pullback { view in
          guard size == nil && config.size == nil else {
            return UIHostingController(rootView: view)
          }
          // If size is not set explicitly use the ideal size.
          let hostingController = UIHostingController(rootView: view.fixedSize())

          let idealSize = hostingController.sizeThatFits(in: .init(width: 0, height: 0))
          hostingController.view.frame = CGRect(origin: .zero, size: idealSize)

          return hostingController
        }

This is what I came up with after some experiments, @natemann. Maybe it will be useful:

This is very interesting, thanks for doing some research to figure out how to make it nicer!
We think we'll leave this out of the base snapshot strategy for the time being. User of the library that want this functionality can do assertSnapshot(matching: view.fixedSize(), as: ...). In the future we may be able to improve this more, but for now we want to try to keep the strategy as simple as possible as we try to figure out the best way forward.
Thanks again!

@mbrandonw, no problem. I figured it would not be pulled in until Xcode was out of beta and iOS 13 was out.

Hi all. With everything public now I was wondering what the status of this was and if I could help move it along in anyway.
Thanks!

@natemann @mbrandonw @stephencelis hey all. I was just wondering if there's anything I can do to help get this over the line. We've started heavily using SwiftUI in our project and want to continue using snapshot testing. Thank you!!

Any updates on getting this merged? Looks like it's been approved just has some conflicts now @natemann

Can anyone fix the conflicts for this PR? This would be great since we are using SwiftUI now for the UI project. Thanks.

Sorry about the delay! We've been quite busy with other things. If anyone can take the time to fix the conflicts we'd love to get this merged.

Thanks for rebasing, and sorry for the delay! This PR is a long time coming :smile:

@stephencelis no problem. I realize you have been very busy with other projects.

This PR as merged will always render at full device size, afaict, unless one provides a fixed desired size. Most of the time I would want to snapshot a view at its the ideal size though.
As such I ended up using a slight modification which takes layout: PreviewLayout instead of
size: CGSize (where the latter can be expressed as an instance of the former and thus is more expressive).
This also mirrors the API of PreviewProvider much nicer, I think.
extension Snapshotting where Value: View, Format == UIImage {
    public static func image(
        on config: ViewImageConfig,
        precision: Float = 1,
        layout: PreviewLayout = .sizeThatFits,
        traits: UITraitCollection = .init()
    ) -> Snapshotting {
        var config = config
        let size: CGSize?

        switch layout {
        case .device:
            size = nil
        case .sizeThatFits:
            config.size = nil
            size = nil
        case let .fixed(width: width, height: height):
            config.size = nil
            size = CGSize(width: width, height: height)
        @unknown default:
            fatalError("Unknown layout \(layout).")
        }

        return Snapshotting<UIViewController, UIImage>.image(
            on: config,
            precision: precision,
            size: size,
            traits: traits
        ).pullback { view in
            let controller = UIHostingController.init(
                rootView: view
            )
            if size == nil && config.size == nil {
                let maxSize = CGSize(width: 0.0, height: 0.0)
                let size = controller.sizeThatFits(in: maxSize)
                controller.view.frame = CGRect(origin: .zero, size: size)
            }
            return controller
        }
    }

    public static var image: Snapshotting {
        self.image(on: .init())
    }
}

cc @stephencelis

@regexident I'm still wading through the backlog but did you open a PR for this? Definitely looks like a good improvement!

Not yet, but gimme a sec … 😅

Here you go, @stephencelis: https://github.com/pointfreeco/swift-snapshot-testing/pull/331


Fixing use of Timeout

Still trying to fix timeouts occurring in CI from this plugin.
docker ps -aq | xargs docker rm -f
docker image ls --format {{.Repository}}:{{.Tag}} | egrep 'ssh-agent|testcontainers|ubuntu' | xargs docker image rm
docker image prune --force
mvn test -Dtest='hudson.plugins.sshslaves.agents.**.*Test'

shows the first test, AgentCurve25519Sha256ConnectionTest, taking >4m (top shows some docker, a lot of dpkg). Subsequent tests mostly run in <10s, so layer caching is effective.

From a @cloudbees CI run of AgentECConnectionTest (total time 127s):
…
Dec 19, 2023 2:07:56 AM org.testcontainers.images.builder.ImageFromDockerfile resolve
INFO: Transferred 2 KB to Docker daemon
Dec 19, 2023 2:09:53 AM org.testcontainers.containers.GenericContainer tryStart
INFO: Creating container for image: ssh-agent-ec:latest
…


New resource xHostFileEntry

This is a new resource for managing host file entries on the local server (something we find ourselves doing a bit with SharePoint servers). Pretty straight forward resource in terms of properties and logic, just matching text in the host file.
I've included updates to the readme, examples, unit tests and added new integration tests for this component also.
Let me know if it needs anything else before it can be merged in.

This change is

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

@BrianFarnhill - Doh!


The rerun demo flag handling is inconsistent between --cube and --colmap

Running the demo with --cube executes a python script, but running with --colmap shells through to a viewer.
The reason we need to do this is that python scripts don't have a way of sending an rrd file to a viewer instance.
However, there is also a core inconsistency here between "--serve" as the flag used on python vs "--web-viewer" as the flag used on the viewer.

No longer relevant with the removal of rerun_demo.


Tensorflow serving pages missing on deploy page

From the TensorFlow Deploy page, the links for TensorFlow serving all give 404 page not found errors.
For example, try the Installation page
For example, try the Serving a TensorFlow Model

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
TensorFlow version
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce

It has been 21 days with no activity and the awaiting response label was assigned. Is this still an issue?

Looks like the links have been updated.  They work now.
Thanks.


Login disclaimer is invisible with this theme

Describe the bug
The login disclaimer text is invisible with this theme enabled
To Reproduce

Apply this theme with any configuration
Set the login disclaimer from settings

Screenshots

I had the same issue and thought the theme was at fault. Turned out a firefox addon was the cause. Probably detected the "disclaimer" element as an "annoyance".

I had the same issue and thought the theme was at fault. Turned out a firefox addon was the cause. Probably detected the "disclaimer" element as an "annoyance".

Tested with chrome, turns out it's visible there. The Firefox addon 'Ghostery' hides the disclaimer for some reason. I'll see if there's anything we can do to evade this and open a PR if I come up with something.

Maybe this has something to do with the files being server from jsdelivr.net, seems like ghostery doesn't like that. I'll try hosting the CSS files locally and see if that fixes it.


Refresh feed

Please implement a swipe down to refresh feature for Feed tab like in a browser
Like this

Closing as a duplicate of #100. This will be in the next version (v2.14.0)


Add .NET Core Test Explorer extension

Name of an extension you are adding
.NET Core Test Explorer
Why do you think this extension is awesome?
It lets you view/run your tests much like you would in any other full IDE!
Make sure that:
[x] Screenshot/GIF included (to demonstrate the plugin functionality)
[ ] ToC updated

Still have to update the table of contents, I'll do that now 👍

Thanks for this one!


pa doesn't work with Brave Browser

Setup info

Workflow name: pa
Workflow version: 1.6.0
Alfred version: 4.0.4
macOS version: 10.14.6

Description of issue
When running the pa workflow with the Brave Browser open the URL isn't prefilled into the PinPlus.app window. It works fine with other browsers like Vivaldi.
Debugger output
[18:25:11.781] Logging Started...
[18:25:17.022] PinPlus[Keyword] Processing complete
[18:25:17.025] PinPlus[Keyword] Passing output '' to Run Script

Brave Browser seems to have changed their AppleScript / JXA interpreter. When we ask the system for the app’s name, it returns Brave Browser, but when we want to send it JXA commands, it only responds to Brave.
I’ll consider this a bug on their side. You may wish to report it to them.

Ah, interesting. Thanks for checking so quickly! Will forward this to them.

I've opened an issue for this over at the brave project: https://github.com/brave/brave-browser/issues/6330


Publish Docker image for Windows version 20H2

There are Datadog Agent Docker images available for Windows versions 1809, 1909, 2004, but not 20H2.
When the process isolation is used, the container Windows version must match the Windows version on the host. So the lack of a 20H2 image means hosts running Windows 20H2 cannot currently run the Datadog Agent in a container.

To clarify status, we're depending on https://github.com/PowerShell/PowerShell-Docker/pull/523

The 20H2 Docker images are now available: https://hub.docker.com/_/microsoft-powershell

Indeed, I already did the change, it's going to be in 7.33


Rules per type of file

Hey,
I am accustomed to the boundaries and rules of Nx, and I really like your approach, which is more centralized and customizable!
I opened an issue on the Nx GitHub concerning the fact that I would like to set boundaries based on file extensions because I believe that a package can serve multiple goals such as components, specs, stories, etc...
You can find more information with the schema on https://github.com/nrwl/nx/issues/18151 .
Do you think your library can help with that?
What do you think about the idea of setting tags per file extension? If you like the idea, I can make a proposition and a PR ;)

We could have different configuration files per extension like, wdyt?

Hi, that sounds very interesting. That could prevent somebody from mistakenly adding a story or spec file to production code. Additionally, we sometimes might need more "tolerant" dependency rules for test files.
That would mean that an index.ts or module can have different tags based on the extension, right?
What about removing the module encapsulation feature for file-based tagging? So we could say everything with *.spec, regardless of its directory, is tagged with test. Can you think of some use cases that might benefit more from that approach?
@manfredsteyer, @mikezks, anything to add here?

That could prevent somebody from mistakenly adding a story or spec file to production code.

It is exactly with one of the dev on my previous project -> fake library in prod :s

That would mean that an index.ts or module can have different tags based on the extension, right?

Could be index.ts by default but with the possibility of specializing it

What about removing the module encapsulation feature for file-based tagging? So we could say everything with *.spec, regardless of its directory, is tagged with test. Can you think of some use cases that might benefit more from that approach?

I still like considering the module/folder idea to scope multiple files and be able to specify scope tags more related to the domain/business/team/...
But a module/folder can serve multiple goals and I want to ensure that each goal is restricted to some shared library for example.
This is the other use cases I see

ensure .spec file only imports test utilities + global utilities
ensure .component only import global utilities
ensure .stories only import stories utilities + global utilities
ensure .cy only import e2e utilities + global utilities
...

Related to that:

I like the idea of grouping multiple types of files in one library because it is related to the same context.
I don't like having one dumb graph that creates dependencies at the library level
So I need to ensure linting helps me on that :)

Yeah, so all of that makes complete sense to me. I don't see any reason why Sheriff should support it. After #15 and #17 are done, this would be the next one.

Great idea.
@rainerhahnekamp: as discussed, the Sheriff config could use the glob syntax and RexEx for advanced configs.

I hope that glob syntax will be enough. Regex is already possible, but when you cannot use a RegEx object as key in an object literal. And that is required for the config object. Glob can be a string as well.
So the first step would be to widen the definition of a module. In most cases, it will be the index.ts but we have to internally add the glob/regex expression as well...

@jogelin no progress yet on this feature, but it will eventually land. If you want (and have time), you can of course also come up with a PR

@jogelin, what about?
export const sheriffConfig: SheriffConfig = {
  tagging: {
    'src/app/<domain>/<type>': {tags: ['domain:<domain>', 'type:<type>-test'], selector: '**/*spec.ts},
    'src/app/<domain>/<type>': ['domain:<domain>', 'type:<type>'],
  },
  depRules: {
    // ...
  },
};

I would like that the keys stay as they are, and provide specialised configuration via the values. The same is true for the depRules.
Do you see something that speaks against this?

@rainerhahnekamp it will work indeed!
When I saw that issue #36 and also your comment https://github.com/softarc-consulting/sheriff/issues/19#issuecomment-1665472745, I was thinking that maybe it could be solved by making the definition of the module more flexible.

For the moment it is related to/path/to/folder/index.ts right?

But on #36 you are proposing to have something configurable and provide any file name like/path/to/folder/public-api.ts right?

I was thinking about having module definition more transversal and less focused on barrel files. Anything could be a module if it matches the pattern:

src/app/<domain>/<type>/index.ts
src/app/**/index.ts
src/app/<domain>/<type>/public-api.ts
src/app/<domain>/<type>/**/*.spec.ts
src/app/<domain>/<type>/**/*-internal.ts

but could be solved in the same way like:

export const sheriffConfig: SheriffConfig = {
  tagging: {
    'src/app/<domain>/<type>': {tags: ['domain:<domain>', 'type:<type>-test'], selector: '**/*spec.ts'},
    'src/app/<domain>/<type>': {tags: ['domain:<domain>', 'type:<type>'], selector: 'public-api.ts'},
    'src/app/<domain>/<type>': {tags: ['domain:<domain>', 'type:<type>'], selector: '**/*-internal.ts'},
  },
  depRules: {
    // ...
  },
};

I just don't see the added value of splitting the path and the selectors.
I would see that more like Nx project inference, everything that matches a path could be considered as an Nx Project.
wdyt?

Well, the question is always who defines which elements the module exposes. That's why we have a barrel file.
In nx that works because a project can be used for many reasons. Sheriff shouldn't be Nx. It should focus on the module part.
Depending in which direction (barrel file a problem because of tree-shaking) we go:
with barrel.file
export const sheriffConfig: SheriffConfig = {
  tagging: {
    'src/app/<domain>/<type>': {tags: ['domain:<domain>', 'type:<type>-test'], selector: '**/*spec.ts', barrel: 'index.ts'},
    'src/app/<domain>/<type>': {tags: ['domain:<domain>', 'type:<type>'], selector: '**/*-internal.ts', barrel: 'internal.index.ts'},
  },
  depRules: {
    // ...
  },
};

If barrel is index.ts we could actually skip it and use it as default.
without barrel
export const sheriffConfig: SheriffConfig = {
  tagging: {
    'src/app/<domain>/<type>': {tags: ['domain:<domain>', 'type:<type>-test'], selector: '**/*spec.ts', barrel: false},
    'src/app/<domain>/<type>': {tags: ['domain:<domain>', 'type:<type>'], selector: '**/*-internal.ts', barrel: false},
  },
  depRules: {
    // ...
  },
};

Here, we have a problem. Without barrel, we could say all files in the directory are exposed and all within subfolders are hidden. But now we have one directory hosting two modules.

@chwoerz: maybe you want to add something to this discussion

@rainerhahnekamp I think I understand where I am wrong.
Actually, I am not considering that boundaries should be applied only on files exposed by a public API, a barrel file.
I was considering a module as a group of files without any public entry point.
My reflexion is more oriented by "Can this file or list of files can access to this file or list of files".
And then adding a layer on top to recognize barrel files as a way to get list of files.

I understand. So you have a module without encapsulation but with dependency rules.
I would see this as a special case which is something that can be supported. We have to ensure that necessary changes to the config format has no negative effects (more boilerplaty) for the default use cases.
In a way, we could go with the configuration posted above and barrel: false just means that it is a module without encapsulation.
export const sheriffConfig: SheriffConfig = {
  tagging: {
    'src/app/<domain>/<type>': {tags: ['domain:<domain>', 'type:<type>-test'], selector: '**/*spec.ts', barrel: false},
    'src/app/<domain>/<type>': {tags: ['domain:<domain>', 'type:<type>'], selector: '**/*-internal.ts', barrel: false},
  },
  depRules: {
    // ...
  },
};

Does this look reasonable?
In the meantime, let me think about potential side effects if a module has no barrel file or _private directory (#47 )


feat(icons): added image-upscale icon

What is the purpose of this pull request?

[x] New Icon

Description
Added new image-upscale icon.
Icon use case

upscaling images
resizing images

Alternative icon designs

Icon Design Checklist
Concept

[x] I have provided valid use cases for each icon.
[x] I have not added any a brand or logo icon.
[x] I have not used any hate symbols.
[x] I have not included any religious or political imagery.

Author, credits & license

[ ] The icons are solely my own creation.
[x] The icons were originally created in # by @llaenowyd
[x] I've based them on the following Lucide icons: box-select
[ ] I've based them on the following design:

Naming

[x] I've read and followed the naming conventions
[x] I've named icons by what they are rather than their use case.
[x] I've provided meta JSON files in icons/[iconName].json.

Design

[x] I've read and followed the icon design guidelines
[ ] I've made sure that the icons look sharp on low DPI displays.
[ ] I've made sure that the icons look consistent with the icon set in size, optical volume and density.
[ ] I've made sure that the icons are visually centered.
[ ] I've correctly optimized all icons to three points of precision.

Before Submitting

[x] I've read the Contribution Guidelines.
[ ] I've checked if there was an existing PR that solves the same issue.

Can we look at this with the lucide/12 img variant?


Sub improvements

Started some attempts to clean up and document substitution. Others welcome to contribute as well.
Related:

[ ] #267
[ ] #268
[ ] #279

Would like to merge current changes into master, since they resolve #279 . @bqpd

I'm not seeing where this fixes #279. It seems to assume that every varkey has a .units, but that's not true, is it?

In fact, every VarKey does have a units! This is due to the line self.units = self.descr.get("units", None) in the VarKey __init__.
Note that I'm also proposing a simplified VarKey constructor, along with making units an @property, in #280.
By the way, the merge conflict on this is just in a docstring -- I will take the master version when merging (once @bqpd agrees this should be merged).

Can we merge this? I want to make sure it doesn't get lost or become unmergable due to the GP refactor...

Yes! Merge it on in.


Running simultaneous canary deployment tests

Hi All, hope you're well?
I've just implemented fairly simple Flagger canary configs which use the k6 webhook for a pre-rollout test and standard test during the rollout.
It works perfectly when I trigger a deployment of one of the apps, however when 2 or more are running simultaneously, they all start to fail with "failed to run: signal: killed" showing in the k6-loadtester pod logs.
I've tried various things to make sure they are unique and not conflicting such as ensuring the webhook names are unique and I've also just tried using scenarios to ensure they have unique names too but still no joy.
Example canary config:
    - name: k6-load-test-hello-world-nodejs
      timeout: 5m
      url: http://k6-loadtester.ingress-nginx:8000/launch-test
      metadata:
        script: |
            import http from 'k6/http';
            import { sleep } from 'k6';
            export const options = {
              scenarios: {
                hello_world_nodejs_load_test: {
                  executor: "constant-vus",
                  vus: 5,
                  duration: '30s',
                },
              },
              thresholds: {
                http_req_duration: ['p(95)<50']
              }
            };

            export default function () {
              http.get('https://hello-nodejs.my-internal-domain.com/');
              sleep(0.10);
            }

Any suggestions or pointers would be gratefully received! Thank you!
Paul.

Figured out the issue.... the resource limits were too low in the k6 pod - no errors to suggest it was issue, just trial and error - by looking at kubectl top pod when running and spotting it was peaking so increased and all good now! :)


Select with data-icon attribute gets compiled only once.

I have the following code in my view:
<select name="community" id="community" material-select watch ng-model="vm.feed.community">
    <option value="" disabled selected>Choose your community</option>
    <option ng-repeat="group in vm.groups" data-icon="{{ group.image }}" value="{{ group.id }}">{{ group.name }}</option>
</select>

On the initial page load it compiles it with the icons, no problem. However, once I change a page and go back, the icons don't display anymore and the developer console shows src="{{ group.image }}". So it means that it look to the model, it just takes the value and jams it into src.

The issue should be resolved, I've submitted a pull-request with the fix.
It was initializing the material select before Angular was done with it's digest cycle, causing it to pass the un-evaluated expression to the data-image attribute on the <li> materialize constructed.
It now waits until the digest cycle is done before initializing the select.


Consider standardjs instead of jshint

http://standardjs.com/
I've been using the JS standard style in my packages for a while now. It's a no-semicolon style (hah!), but I've found that it brings quite some amount of sanity. If it's good enough for npm it's good enough for me :)
This may just be a matter of personal style, but I just thought I'd ask for your thoughts.

Sorry, I'm not a fan. Semicolons are part of the language, and the only reason they can be skipped in many circumstances was because when the language was being created, Marc Andreessen suggested it should be as forgiving as HTML to help out new users. To my eyes, skipping ; is like miss-spelling words on purpose to be cool.
I'm using ESLint via XO in npm-check, I'd be happy to add that.
Here's the settings I use, which I should probably move to another module to make it easier to re-use.
https://github.com/dylang/npm-check/blob/master/package.json#L7-L19

this isn't part of the discussion but damn, npm-check is pretty cool.

also, +1 on XO which is pretty much standard with semicolons.


JSON error when run command

Package version
<EMAIL_ADDRESS>Describe the bug

I had this bug when try to update the version.
Node version used: v20.9.0
I tried installing the package with pnpm, npm and yarn. With yarn I get a node version error... and the others I get the error above when execute the command.
Reproduction repo
No response

Yep. Same here. SyntaxError: Unexpected token } in JSON at position 497.

Hey! I'm trying to run on thisdatedoesnotexist-server. It's still using AdonisJS v5. I'm trying to update it to v6.

sorry I missed that issue. i will take a look

@samuel-s-marques can you give more information? I just tried to run upgrade-kit on your repo and it seems to works fine. Can you give your node version and also the command/patch you ran?
I'm using Node 21.6

I had the same problem and found this code in https://github.com/adonisjs/upgrade-kit/blob/eecb8e1d56430900f9bf1d0c62647527c5d2635d/src/runner.ts#L41
loader.update('Loading config files')
    this.#patchers = this.#options.patchers.map((factory) => factory(this))
    this.rcFile = new RcFile(join(this.#options.projectPath, '.adonisrc.json'))
    this.tsConfigFile = new Tsconfig(join(this.#options.projectPath, 'tsconfig.json'))
    this.pkgJsonFile = new PkgJson(join(this.#options.projectPath, 'package.json'))

For me the problem was that in my tsconfig.json a line was commeted out:
{
    "extends": "adonis-preset-ts/tsconfig.json",
    "include": ["**/*"],
    "exclude": ["node_modules", "build"],
    "compilerOptions": {
        "outDir": "build",
        "rootDir": "./",
        "sourceMap": true,
        "paths": {
            "App/*": ["./app/*"],
            "Config/*": ["./config/*"],
            "Contracts/*": ["./contracts/*"],
            "Database/*": ["./database/*"]
            // "@ioc:/*": ["./contracts/*"]  <------ remove this line
        },
        "types": [
            "@adonisjs/core",
            "@adonisjs/repl",
            "@japa/preset-adonis/build/adonis-typings",
            "@adonisjs/lucid",
            "@adonisjs/auth",
            "adonis5-jwt",
            "@adonisjs/session",
            "@adonisjs/mail",
            "@adonisjs/drive-s3"
        ]
    }
}

This was the error for me. I also had another error message but it resolved after I upgraded to node v21.

Same problem here.
@royvanderzon's solution didn't work. I had no comments in any of my json files.

i need a repro or there's nothing I can do to help

I had a similar issue and it wasn't a comment that was causing the problem, but the last element of an object in my tsconfig.json had a comma (,)...so it was expecting a new line.  VSCode wasn't complaining so it went unnoticed.


Why different log format

Hello,
I just wanted to ask, since kong already has a log format in it's other plugins why does this one has a different format ? Could we log the same info ?

@PFadel Hello, our logging plugin was built for our needs to be compact and small as well as minimizing any PHI data with only the most relevant metadata due to Splunks charge-back model based on consumption/file sizes. If you would like to leverage Kong's default format which has  feel free to fork the repo and tweak it to your needs. All you would need to do is take Kong's github repo basic.lua and drop it into our plugin overwriting our basic.lua and be sure to add our splunk variables back into the file:
local splunkHost= os.getenv("SPLUNK_HOST")
host=splunkHost,


[RFC] Custom Cache Support

Goal
Enable SWR users to control the cache.
This is based on the Cache collection PR and other issues such as #4, #16, #158, #161.
Background
Right now there is no way to control the cache used by SWR, this means:

We can't use another cache implementation (#16), maybe a project needs time based LRU, another could use size based LRU, another could use a completely different cache mechanism which could range from cache everything to cache nothing and request again every time, even use a SSR-friendly cache for Next.js usage or change where we keep the cached data (e.g. use localStorage to keep an offline cache)
Data fetched on tests it's shared between tests (#161) and could not be easily cleared.
There is not way to clear the cache or delete cache items individually (#4), this could be useful if we deleted a cached item and want to clear the cache, mutating to undefined will not work

Proposal
I propose an API to support changing the cache through the SWRConfig component.
const customConfig = {
  cache: CustomCacheImplementation
};

<SWRConfig value={customConfig}>
  <App />
</SWRConfig>;

With this, App and any component inside it calling useSWR will use this cache implementation.
The custom cache should only be customized with SWRConfig and not in a per useSWR instance, if you want to use a custom cache in a certain instance the parent should wrap the component in SWRConfig, this way the components are not aware of the cache mechanism used.
Using multiple caches
This could also allow using multiple cache implementations in different parts of the app, you could render another SWRConfig deep inside the component tree of App to change the cache in that branch of the tree.
When this could be useful? Maybe we now certain parts should be cached offline (e.g with localStorage or IndexedDB) and others should be cached in-memory, we will be able to customize it.
Default Cache
By default SWR will come with a cache implementation, e.g. it could use the one implemented in #92, this will allow most projects to don't care about the cache implementation.
Testing
If we are testing components calling useSWR we could wrap the render of the component in SWRConfig with their own cache instance.
// app.test.js
import React from "react";
import { SWRConfig } from "swr";
import { render, screen } from "@testing-library/react";
import { CacheInMemory } from "in-memory-cache-implementation";
import App from "./app";

test("should render with data", async () => {
  jest.once(JSON.stringify({ user: { username: "evilrabbit" } }));
  render(
    <SWRConfig value={{ cache: new CacheInMemory() }}>
      <App />
    </SWRConfig>
  );
  expect(await screen.findByText("evilrabbit")).toBeInTheDocument();
});

Now every test will use their on in-memory cache and will not share previously fetched data between them.
Using a new cache instance per test will simplify running tests in parallel without causing any issue because we clear the shared cache before another test finished first.
Controlling the Cached Data
Since we could create the cache instance in their own module we should be able to import it anywhere and control it.
// cache.js
class CustomCache {
  // implementation here
}

export default new CustomCache();

// random-component.js
import cache from "./cache";

function RandomComponent() {
  // code here
  React.useEffect(() => {
    // clear cache key once the component unmounted
    return () => cache.del("cache-key");
  }, []);
  // code here
}

Cache Interface
The cache should be an object, similar to a JS Map, including events to let instances of SWR subscribe to it. The exposed interface could be something like this:
type Key = string;
type Event = "set" | "delete";

interface Cache {
  set<Data>(key: Key, value: Data): Data; // save data to a key, create or update
  get<Data>(key: Key): Data | null; // return the data stored in the key or null
  delete(key: Key): void; // delete a single key
  has(key: Key): boolean; // check if a key is in cache
  clear(): void; // delete all key
  on(event: Event, callback: (key: Key) => void);
  off(event: Event, callback: (key: Key) => void);
}

Any custom cache should implement that interface, internally they could use any caching mechanism, e.g. a localStorage based cache which will store everything there forever.
// CacheEmitter could provide the on/off/emit methods
// it could be EventEmitter or something custom provided by SWR itself
class LocalStorageCache extends CacheEmitter implements Cache {
  set<Data>(key: Key, value: Data): Data {
    let stringifiedValue = value;
    if (typeof value !== "string") {
      stringifiedValue = JSON.stringify(value);
    }
    localStorage.set(key, value);
    this.emit("set", key);
  }

  get<Data>(key: Key): Data | null; {
    const stored = localStorage.getItem(key);
    if (!stored) return null;
    return JSON.parse(stored);
  }

  delete(key: Key): void {
    localStorage.removeItem(key);
    this.emit("delete", key);
  }

  has(key: Key): boolean {
    const value = this.get(key);
    return value !== null;
  }

  clear(): void {
    const keys: Key[] = Object.keys(localStorage);
    localStorage.clear();
    keys.forEach(key => this.emit("delete", key));
  }
}

Do you think it's possible to support for async cache (maybe multilayer cache as well)?
I've been thinking for a while and have some ideas to extend those with the same API.
First we can make all async cache 2 layers, a (sync) memcache + (async) cache.
So for async (multlayer) cache, get(key) does 2 things:

always returns the latest value v0 (from the memcache layer, edge cache) synchronously
(async) get the value v1 from the source cache (e.g.: IndexedDB), and compare it with v0,
if they're different:

update the value in memcache with v1
mutate(key, v1) to notify all the hooks with the latest value

I like your idea for async cache, I think having a sync way to read cache it's always better to avoid running an effect to get the currently cached data, and since we know the cache key it could be possible to run mutate and fill the cache correctly.

compare it with v0

I'm not sure about that, since the result it's probably going to be an object or array in most APIs the check will always return false since the object/array will be a new one.

@sergiodxa I think we have to rely on deep comparison.

Add the option to specify your own comparator?

@aequasi if you implement your own cache you could use your own comparator, this way a cache could be faster because it doesn't use deep comparison or could be more correct because it does it, so you could pick between two similar options based on that, depending on your requirements.

@shuding Are there docs anywhere for using the cache? Thanks!

@nandorojo  there is no doc yet, but you can read the code https://github.com/zeit/swr/blob/master/src/cache.ts, it’s short

@sergiodxa Looks like the cache isn't async, is there a way to use it with something like React Native's AsyncStorage? Or did you end up deciding against that?


Multiple client request parameters as a record

I need to work with an API which has multiple request header parameters. The client methods were generated as
    member this.PostMyMethod
        (
            prm1: string,
            prm2: string,
...
            ?prmN: someType,
        )

I have nearly 10 parameters. While this could be done I really do not like passing 10 parameters if I could pass a single record object. I did not find in any options if I could specify wrapping all of them into a record type. Can I do this?
Why I need this?
If I have 5 optional parameters, if I create a record with all of them manually then to perform the correct calls with optional parameters and their permutations it is quite a lot of calls need to be written. I can not pass an Option as a value as I need to pass T.

I can not pass an Option as a value as I need to pass T.

@Alex2357 You can pass an option as a value like this: ?prmN=Some 1 see example below:
type Client() =
    member this.Post(?hello: string) = hello

let client = Client()
let result = client.Post(?hello=Some "world")

I hope this helps! Closing as by design


Service Worker not Registered

Hello, I am getting this error all the time, related to the sw.js. I´m not sure what else I can do:
tello-asd.github.io/:1 Uncaught (in promise) TypeError: Failed to register a ServiceWorker for scope ('https://tello-asd.github.io/') with script ('https://tello-asd.github.io/sw.js'): ServiceWorker script evaluation failed
Here is my web:
https://tello-asd.github.io/

I'm assuming you fixed this now? The examples gives me messages to say the SW registered, then the SW registration succeeded?

@chrisdavidmills I have this same error. Any change of file location don't fix the problem.


Validation messages more human readable

One suggestion with the error output could be to make it a little more readable? i.e. instead of outputting the row index then the column that needs attention, it could output something like
The value field in row 5 is required
Currently this would be output as;
The 3.value field is required
With the heading row ignored then 0 index for the first data row, A user may not understand that 3 is in fact row 5 in their import file.
Originally posted by @kombimedia in https://github.com/Sparclex/nova-import-card/issues/1#issuecomment-424488409

Implemented since laravel-excel does validation now and already has human readable messages
436c87f86bc94e17bac35f5c4119aa2d022d3d22


New version: Hugo.Hugo version 0.139.0

Created by 🥟 Dumplings in workflow run #9643.

Log
Updated: 0.138.0 → 0.139.0
Submitting WinGet manifests
Creating manifests
Uploading manifests and making commits
Creating a pull request

Microsoft Reviewers: Open in CodeFlow

@wingetbot run


feat: command to start functions server

Problem
I am always frustarted when I want to prerender routes that use netlify function endpoints to fetch the data.
Each time I create or update a function,  I have to run the pipeline twice, the first time only to get the functions deployed, the second to prerender the static pages using the data fetched from the deployed functions.
Proposed solution(s)
The ideal solution would be to deploy the netlify functions first at build time (not sure whether it could fail the entire build if it times out)
Otherwise, I would like to be able to start the netlify functions server before prerendering the application that uses those served functions to fetch the data.
The command could be:
netlify functions:start
I would use start-server-and-test to start the functions server, prerender the app that would target the functions server endpoints and kill the server when the prerendering is done.
[build]
command = "NODE_ENV=production npm run prerender"
functions = "./server/functions"
publish = "dist"

"prerender:app": "...", // Gatsby / Angular Universal build command
"prerender:serve": "netlify functions:start"
"prerender": "start-server-and-test prerender:serve http://localhost:9999/.netlify/functions/catalog prerender:app",

Alternatives
I've considered two alternatives:
Using netlify-cli internal startFunctionsServer method.
const path = require("path");
const {
  startFunctionsServer,
} = require("netlify-cli/src/utils/serve-functions");
startFunctionsServer({
  config: {},
  settings: {
    functions: path.resolve(__dirname, "../server/functions"),
    functionsPort: 9999,
  },
  site: {},
  log: console.log,
  warn: console.warn,
  errorExit: console.error,
  capabilities: {},
});

Using an express app that imports the functions and call their handlers
const express = require('express');
const app = express();
const cors = require('cors');

app.use(cors());

app.use('**/.netlify/functions/:endpoint', async (req, res) => {
  const endpoint = require(`./functions/${req.params.endpoint};
  const response = await endpoint.handler({ path: req.path }); // full mapping to be done (opposite of serverless-http)
  res.status(response.statusCode).send(response.body);
});

app.listen(9999);

Can you submit a pull request?
I can try.

Thanks for opening the issue @chihab,
I'm a bit confused about your use case.
You're using Netlify Functions to pre-render pages, and you'd like the functions to be deployed before the site is built in the same build? If that's the case, have you considered having a separate site just for the functions?
If I understand correctly - the other solution you proposed is to run the functions locally in a server using the CLI, and using that server to pre-render? If that's the case, any reason those needs to be Netlify Functions?
What am I missing here? Can you share a public repo with your setup? That might help be understand your use case

Netlify functions only act as an api to server data, product catalog...
In my application I use the netlify functions to get the data on some page. For example, when a component is mounted we might call fetch('/.netlify/functions/catalog get the product catalog.
To pre-render the application pages, the functions need to be available at build time because in the process of pre-rendering the component are mounted and the api calls are actually made to get the data to put statically in the html outputs.
Once deployed, the static pages still need the apis because the call is made a second time to get fresher data eventually.
If we consider having a separate site only for the functions, since the functions and the application are part of the same repo, pushing to that repo will trigger the build on both sites and we don't guarantee that the functions will be deployed before building the app so we can end up with 404 on some api calls because the functions haven't been deployed yet.
You can find an example using the second alternative here: https://github.com/ngMorocco/ngx-darija and here is the pipeline https://app.netlify.com/sites/ngx-darija/deploys/60599788d589670007b8f8d8

If we consider having a separate site only for the functions, since the functions and the application are part of the same repo, pushing to that repo will trigger the build on both sites and we don't guarantee that the functions will be deployed before building the app so we can end up with 404 on some calls (to new apis since the last deploy) because the new functions haven't been deployed yet.

Hi @chihab, you should be able to use ignore to manage that.
That configuration is useful in a monorepo setup, where you have backend and frontend logic in the same repo.
See more here

I don't think that fixes the issue. Let's say I update the web app and the netlify function at the same time the build should be triggered for both.
Unless there is a way to say that, for the same commit, this build should wait for another build to finish before starting, the only solutions I see are:

Deploying the functions before building the app
Starting the functions from the pipeline before building the app


Intermittent 400 result code while fetching token https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/token

Core Library
MSAL.js v2 (@azure/msal-browser)
Core Library Version
2.16.0
Wrapper Library
MSAL Angular (@azure/msal-angular)
Wrapper Library Version
1.1.0
Public or Confidential Client?
Public
Description
Facing strange issue of getting 400 result code for POST https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/token intermittently which we are not able to repro but we have few instances in our App Insights having 400 as result code

Error Message
it just gives 400  result code
Msal Logs
No response
MSAL Configuration
authentication: {
		msalConfig: {
		  auth: {
			clientId: "b12ca5c0-ea9d-4d0f-9eec-8e5463be5c82",
			authority:
			  "https://login.microsoftonline.com/microsoft.onmicrosoft.com",
			redirectUri: window.location.origin,
			knownAuthorities: ["login.microsoftonline.com"],
		  },
		  cache: {
			cacheLocation: "sessionStorage",
			storeAuthStateInCookie: false,
		  },
		},
		scopes: [
			"api://060093e8-aa23-4eba-9208-5e14e5a75854/TemplateService.Crud",
		],
	  }

Relevant Code Snippets
export const getAuthenticationToken = async (
  scope: string[]
): Promise<string> => {

  const account = publicClientApplication().getAllAccounts()[0];
  // to avoid warning in unit tests
  if (!account) {
    return "";
  }
  const silentTokenRequest = { scopes: scope, account };
  const authenticationResponse =
    await publicClientApplication().acquireTokenSilent(silentTokenRequest);
  return authenticationResponse.accessToken;
};

Reproduction Steps
We are not able to repro it. we don't know what is causing this issue intermittently.
Expected Behavior
Since we are using acquireTokensilent we should not get 400.
Identity Provider
Azure AD / MSA
Browsers Affected (Select all that apply)
Chrome, Firefox, Edge, Safari, Internet Explorer
Regression
NA
Source
Internal (Microsoft)

we are having the same issue.

I'm facing same issue. Any solution for this?


Backport 289022 to release 23.11

Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] 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

[ ] 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
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 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.

Require rustc 1.74 :(

@emilylange Can you quickly help me on this? I would like to backport this to release-23.11 but it requires rust >= 1.74, how am I supposed to use it in 23.11 ?

@drupol sure :)
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index a58502126fbe..0f35c07c2acf 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -14248,6 +14248,11 @@ with pkgs;

   typos = callPackage ../development/tools/typos { };

+  # Requires rustc 1.75 or newer
+  typos-lsp = callPackage ../by-name/ty/typos-lsp/package.nix {
+    inherit (rustPackages_1_76) rustPlatform;
+  };
+
   typst = callPackage ../tools/typesetting/typst { };

   typstfmt = callPackage ../tools/typesetting/typstfmt { };

# nix-build -A typos-lsp
/nix/store/fyh87av1gc3wispwb5sv0zr4292cl5r3-typos-lsp-0.1.18

# file result/bin/typos-lsp
result/bin/typos-lsp: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /nix/store/anlf335xlh41yjhm114swi87406mq5pw-glibc-2.38-44/lib/ld-linux-x86-64.so.2, for GNU/Linux 3.10.0, not stripped

Thanks!


[$500] Android – Attachment – Corrupted PDF file is not upload in the app.

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number:  v1.4.20-2
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause-Internal Team
Slack conversation: @
Action Performed:

Go to https://staging.new.expensify.com/
Log in with any account.
On a conversation, click on the + button in the compose box
Click on add attachment
Upload the following corrupted PDF
Verify that Failed to load PDF file. message appears when previewing a corrupt PDF file
Click send

Expected Result:
Failed to load PDF file message appears in chat after sending a corrupt PDF file
Actual Result:
Nothing happens
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[x] Android: Native
[ ] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[ ] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos
https://github.com/Expensify/App/assets/115492554/50bbf980-74c5-4dab-8411-8ca6650ef93c

View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01a329fc804a097631
Upwork Job ID:<PHONE_NUMBER>567841792
Last Price Increase: 2023-12-30

.

I didn't find the attached corrupted file. Could anyone provide the file mentioned in the problem?

Edge case that doesn't fit into a wave, closing


Add a DropEmpty flag to tabular_learner

Problem Description
I am currently working with tables that may contain columns that contain only null/missing values. I also need to perform imputation (with sklearn's SimpleImputer) over all the columns to fill nulls there.
A simplified version of my pipeline is this:
import polars as pl
from sklearn.pipeline import Pipeline
from sklearn.impute import SimpleImputer
from sklearn.preprocessing import StandardScaler
from skrub import TableVectorizer

df_ = pl.DataFrame({"a": [1,2,3], "empty":[None, None, None]})

num_transformer = Pipeline(
    steps=[
        ("imputer", SimpleImputer(strategy="mean", keep_empty_features=False)),
        ("scaler", StandardScaler()),
    ]
)

# Transformer for high cardinality categorical features
high_card_transformer = Pipeline(
    steps=[
        (
            "imputer",
            SimpleImputer(strategy="most_frequent", keep_empty_features=False),
        ),
        ("onehot_encoder", OneHotEncoder(handle_unknown="ignore", sparse_output=False)),
    ],
)

low_card_transformer = Pipeline(
    steps=[
        (
            "imputer",
            SimpleImputer(strategy="most_frequent", keep_empty_features=False),
        ),
        (
            "onehot_encoder",
            OneHotEncoder(handle_unknown="ignore", sparse_output=False),
        ),
    ],
)
preprocessor = TableVectorizer(
    low_cardinality=low_card_transformer,
    high_cardinality=high_card_transformer,
    numeric=num_transformer,
)

preprocessor.fit_transform(df_)

This raises an exception on column empty because no values are found.
Feature Description
Rather than raising an exception at the end of the pipeline, which makes debugging more complex (the error messages were less than helpful), it would be nice to have an automated check of all columns before any operation is done to screen for empty columns.
Some possible improvements could be:

A warning to the user ("Column something something is empty")
Dropping the column immediately
Dropping the column if the fraction of null values is larger than a given threshold

This should also be added to the tabular_learner so that if such a situation occurs, it doesn't fail for some weird reason.
Alternative Solutions
Setting the SimpleImputer parameter keep_empty_features=True seems to fix the problem (or at least, the code does not fail anymore). Null values are replaced by 0.
Additional Context
No response

thanks @rcap107 ! I think it is a good idea to drop completely empty features by default in tablevectorizer and tabular_learner
should we also drop constant features?

I think constant features should be kept, because even if they may not be useful for learning, they might still be useful for the user in some way.
I am thinking of a situation in which the user has multiple tables that are distinguished by a specific constant column, and that once they are concatenated the feature becomes meaningful. I don't know if that's something that should pass through TableVectorizer, but it's a possible case where I can see constant features being useful.
There could definitely be a flag for dropping them if needed, but it should be False by default imo

I am thinking of a situation in which the user has multiple tables that are distinguished by a specific constant column, and that once they are concatenated the feature becomes meaningful. I don't know if that's something that should pass through TableVectorizer, but it's a possible case where I can see constant features being useful.

Could the same argument be made for empty features? If some tables had an empty column while others had values, you wouldn't want to drop that column.
So, we could display a warning by default, as you suggested, and optionally removing empty columns. This behavior could be controlled with a single argument only_nan_columns='warn', 'drop' or 'raise' for instance.


Ctrl + Win + Alt + NUMBER

Provide a description of requested docs changes
Where is Ctrl + Win + Alt + NUMBER in the PowerToys program?
I spent an hour looking for it but only found it online.

@SequentialDesign
Can you please describe more detailed what you mean.

Ctrl + Win + Alt + NUMBER
How would I learn that this is the way to change window setups in powertoys if I did not know it?


fix: Handle list/tuple equally on dynamic values

Okay for me. However, my suggestion would be to introduce a translation format (eg. kindname-bonename-%i) for theses format-strings so translations could be more specific (especially on numeric values in that list)

@tsteinruecken this PR is an improvement for #390. As I've stated there already in this comment, please make a separate proposal of your idea in form of a pull request.


<IP_ADDRESS>

https://ci.appveyor.com/project/jpboyce/cb-cis-windows-2016#L1426

Resolved by 9cc4dbe


deploymentcontroller: add support for ProxyConfig CRD

Please provide a description of this PR:
Related issue: #44878

@hzxuzhonghu no, pods must be restarted manually. This is the same behavior as in previous versions where gateways are handled by injection webhook.

Hmm.. pod restart actually wouldn't do it, since the Deployment is unchanged and there is no injection

Taking a step back here: do we actually want ProxyConfig to become part of the new Gateway API surface ?
If yes - all of it ? Some ? Should it have a parentRef as seems to be the common practice ? Do we document and
make guarantees on the labels we'll generate on the gateways ? Would it prevent or make it difficult to run the
gateways outside of the cluster ( which the spec allows and is likely best practice for security and management ) ?

@costinm I think your questions are reasonable, but attaching ProxyConfig to a Gateway works in 1.17, so if this will be removed in 1.18 there will be a functionality gap without a workaround. Isn't that better to support istio.io/gateway-name for now and once parentRef is implemented, remove label matching? Actually, I didn't know that attaching resources to gateways was documented as experimental and only for single label, and I implemented it, because I noticed this regression, so other users may also be surprised and disappointed if that will disappear.

@jewertow: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

release-notes_istio
7355b995084e0c9a67d18148624941ffc379e539
link
true
/test release-notes

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

I added a release note to help users who were using service.istio.io/canonical-name or a custom label to match proxy configs with gateways.

Not sure if ProxyConfig is 'gateway class' specific - that would be the
default proxy config maybe ?
The spec generally allows attaching policies at different points -
GatewayClass is certainly valid, and it may be a good idea
to allow users to define their own GatewayClass-es with different default
proxy configs and specify istiod revisions as controllers.
But probably overkill at this point - the other direction of simplified
APIs and less complexity/options seems better.
On Wed, May 17, 2023 at 6:23 PM Zhonghu Xu @.***> wrote:

Kind of agree with @costinm https://github.com/costinm If we want to
make proxyconfig per gateway, i think the recommended way is to set it as
GatewayClassSpec.ParametersRef. gateway itself is used to configure usage,
while gatewayclass is used to configure deploying
—
Reply to this email directly, view it on GitHub
https://github.com/istio/istio/pull/44916#issuecomment-1552280619, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAUR2Q4EMFPEAW4E65AMIDXGV2Y7ANCNFSM6AAAAAAYCKBMZU
.
You are receiving this because you were mentioned.Message ID:
@.***>

as we discuss a more consistent way ( like adding parentRef in all APIs, etc) we may want to revisit this

Yes, sure. If I can suggest something, it would be nice to keep support for istio.io/gateway-name together with parentRef at least in one release to allow users safely upgrade and migrate configurations to new semantics.

Maybe we should just support the CR and drop the annotation, so we don't have 2 ways to do something in the new world ?

It make sense and @howardjohn also mentioned in the issue that we can consider removing support for the annotation, so I removed it.

This is not about breaking compatibility of a beta API. Its about the interaction between two beta APIs, which is explicitly called out as experimental in https://istio.io/latest/docs/tasks/traffic-management/ingress/gateway-api/#resource-attachment-and-scaling

In response to a cherrypick label: new pull request created: #44982


[204] Website Documentation Not Loading

Title:
Website Documentation Not Loading
Description:
https://docs.near.org/develop/integrate/frontend
not loading
Summary:
Customer is experiencing issues with the website documentation not loading. Investigate the link provided and troubleshoot the loading issue.
Info
Reported by: Guest<EMAIL_ADDRESS>- Open in Gleap
Location: AE
Type: 🚨 BUG
Screenrecording link
🔗 Open share link
🌍 Open ticket in Gleap
Metadata
browserName: Chrome(<IP_ADDRESS>)
userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36
browser: Chrome
systemName: Windows
sessionDuration: 66
devicePixelRatio: 0.8999999761581421
screenWidth: 1920
screenHeight: 1080
innerWidth: 2133
innerHeight: 1012
currentUrl: https://docs.near.org/develop/integrate/frontend
language: en-US
sdkVersion: 10.1.0
sdkType: javascript
environment: prod

Internal note 📝: Customer is experiencing issues with the website documentation not loading. Investigate the link provided and troubleshoot the loading issue.


tern_lint support

Hi, I think implementing tern_lint will be great, there isn't implementation of this in neo/vim right now and it will really help for me and I'm sure a lot others. Sadly I don't know vimscript to add this myself.

I just tried defining this as a maker following syntastic's approach -- tern-lint appears to only run on a project-basis (based on .ternproject's location, and this is how tern works since it checks all modules). It is also incredibly slow.
Will highly recommend integrating this as part of yout continuous integration process (or manually) instead of a neomake maker linter since the job will rarely finish fast enough to be useful.
see also: https://github.com/scrooloose/syntastic/commit/e8a06ea247905024870aa9ba9241be1992845477

tern lint has problems right now -- the line numbers don't work correctly
I have an open PR at tern-lint https://github.com/angelozerr/tern-lint/pull/74 that formats its JSON output into something easily usable by Neomake.
The maker config is https://github.com/davidosomething/dotfiles/blob/master/vim/plugin/plug-neomake.vim#L98-L105
POC test screenshot, you can see the line number doesn't match up:
http://screencast.com/t/txrtOniIF

Looking at syntastic's implementation, I'll try it with byte2line later https://github.com/scrooloose/syntastic/blob/master/autoload/syntastic/preprocess.vim#L369-L374

latest update: my updates for tern-lint support were merged https://github.com/angelozerr/tern-lint/pull/74 -- waiting on an npm publish

@yotamN see #686 for more info, but like @bounceme I don't think it's worth moving forward


Error:(23, 14) Failed to resolve: com.vincentbrison.openlibraries.android:foldablelayout:0.0.1-SNAPSHOT

Not enough information provided


[@azure/eventgrid-namespaces] Include EventGridDeserializer with namespaces

Packages impacted by this PR
@azure/eventgrid-namespaces
Issues associated with this PR
No
Describe the problem that is addressed by this PR
The requirement is to add the EventGridDeserializer with the namespaces SDK.
What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?
No special design considerations.
Are there test cases added in this PR? (If not, why?)
Yes
Provide a list of related PRs (if any)
https://github.com/Azure/azure-sdk-for-js/pull/29245
Command used to generate this PR:**(Applicable only to SDK release request PRs)
Checklists

[X] Added impacted package name to the issue description
[ ] Does this PR needs any fixes in the SDK Generator?** (If so, create an Issue in the Autorest/typescript repository and link it here)
[X] Added a changelog (if necessary)

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


Feat: overhaul / refactor sdk

Use Axios Instance
Add Unit Testing
Add Additional Methods for NCE
Update dependencies

To see the specific tasks where the Asana app for GitHub is being used, see below:

https://app.asana.com/0/0/1204016520987481

https://linear.app/pliancyinc/issue/ENG-45/microsoft-365-license-handling


[AArch64] Fix sign extending

Implemented via the extendValue functions found in Instruction.cc and AuxiliaryFunctions.hh, the current implementation of sign extension is incorrect.
PR #352 includes hardware verified test outcomes for all extendTypes. All tests for signed extensions (i.e. SXT{B,H,W,X}) fail.
Furthermore, instructions which utilise this function (i.e. add xd, xn, rm, extend #imm) all use unsigned integer for the operands, but this is not specified in the ISA explicitly and the pseudo code points towards signed integers being used.
Instructions which should have their implementation looked at:

[ ] AArch64_ADDSWrx
[ ] AArch64_ADDSXrx
[ ] AArch64_ADDSXrx64
[ ] AArch64_ADDWrx
[ ] AArch64_ADDXrx
[ ] AArch64_ADDXrx64
[ ] AArch64_SUBSWrx
[ ] AArch64_SUBSXrx
[ ] AArch64_SUBSXrx64
[ ] AArch64_SUBXrx
[ ] AArch64_SUBXrx64

Closing due to issue being incorrect


Ad 53 explore alice donation contracts

Please update the amount of gas because after update of OpenZeppelin the base contract is more expensive and the deployment is broken:
in app.js change to:
TokenContract = await AliceToken.new({from: aliceAccount, gas: 3000000});


Adding FTP prediction models with power curve as input.

this looks good,
would like a bit more discussion on the results (in terms of what this accuracy means in the context of the prediction)

Thanks for the feedback. Given below is the explanation for the above question:
The accuracy metrics that we used - Mean Squared Error (MSE) and R² Score indicate how well our models predict the Functional Threshold Power (FTP) from the cycling data using power curves as input. In the context of FTP prediction, the results can be explained in the following way
Mean Squared Error (MSE)

HistGradientBoostingRegressor: 6.6573
Decision Tree: 0.0113
Random Forest: 2.7128

MSE measures the average of the squares of the errors, i.e., the average squared difference between the predicted and actual FTP values. A lower MSE indicates that the predicted values are close to the actual values.
R² Score

HistGradientBoostingRegressor: 0.9618
Decision Tree: 0.9999
Random Forest: 0.9844

R² Score, or the coefficient of determination, measures the proportion of variance in the dependent variable (FTP) that is predictable from the independent variable (power curve). An R² score close to 1 indicates that a large proportion of the variance in FTP is explained by the model.
Contextual Implications

Decision Tree Model: Despite its high R² score and low MSE, the extremely high accuracy might indicate overfitting, where the model fits the training data very well but may not generalize as well to unseen data.
HistGradientBoostingRegressor and Random Forest Models: Both models show strong predictive performance with high R² scores and relatively low MSEs, suggesting they are robust and likely generalize well to new data.

(the submission)


Appetite for common Fortran parsing library?

Along with the original developer @cmacmackin, I'm one of the maintainers on FORD, a Fortran documentation generator, and our parsing module is starting to get a bit old and creaky.
Is there any appetite among the fortls developers to work on a common parsing library that both our tools could use? There are a few other tools such as fprettify that might also benefit from having such a library.

I'm planning to apply for a grant that would fund the work to refactor
FORD's parser, preferably using the flang parser as a backend. If I could
get some collaborators for turning that into an external library then that
would be great. If I use flang then that also has the advantage of being in
C++ and thus faster than Python. It's not a huge issue for FORD but is
beneficial for a language server.
On Fri, 3 Sep 2021, 12:11 Peter Hill, @.***> wrote:

Along with the original developer @cmacmackin
https://github.com/cmacmackin, I'm one of the maintainers on FORD
https://github.com/Fortran-FOSS-Programmers/ford, a Fortran
documentation generator, and our parsing module is starting to get a bit
old and creaky.
Is there any appetite among the fortls developers to work on a common
parsing library that both our tools could use? There are a few other tools
such as fprettify that might also benefit from having such a library.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/hansec/fortran-language-server/issues/205, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AB6ESPMSOEXDJQQ4IE4A7MDUACUOHANCNFSM5DLQ3GMQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Are you guys aware of LFortran?
It says it can now parse any Fortran 2018 syntax to an Abstract Syntax Tree and format it back.
Maybe it could be useful somehow.
I didn't have a chance to test it yet, but I'm a big fan of the author's (Ondřej Čertík's) efforts (also fortran-lang.org).

I've examined the source code for both LFortran and Flang. My conclusion is that, while LFortran is quicker and easier to build the code looks much harder to understand and develop. Parts of it appear to be written more like C than C++. Flang has some slightly unintuitive bits but is very much written according to modern C++ conventions, making it much easier to follow. It also already seems to have quite a good ability to extract information on all of the symbols defined in the code. Another advantage of Flang is that it provides much better information about locations in source files, properly accounting for included files, line continuations, etc (whereas Lfortran just normalises everything to be like a single file without line continuations and gives line numbers based on this). The main downside of Flang is that the contribution process looks more difficult, should any modification to the main library be required (discussion occurs via mailing lists, contributors send in patches, etc.). The biggest thing that would need changing would be pulling out comments from source code (Flang doesn't do this but there is an approach we could borrow from Clang) and to do this efficiently I'm pretty sure would require modifying Flang itself (or else doing some sort of monkey-patching by hacking include and link paths at build-time).


Incorrect behavior from tf.layers.batch_normalization() when training=0

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 16
TensorFlow installed from (source or binary): pip
TensorFlow version (use command below): ('v1.1.0-rc0-61-g1ec6ed5', '1.1.0')
Bazel version (if compiling from source): N/A
CUDA/cuDNN version: 8/5
GPU model and memory: Nvidia Titan X
Exact command to reproduce: gist

Describe the problem
I've noticed that tf.layers.batch_normalization doesn't seem to give reasonable results when training=0 (i.e. use distribution statistics instead of just the batch), especially if you apply BN before activations (e.g. ResNet-like architectures).
Using the Gist above, if you try to fit a model to noise with SGD (lr=0.01) using repeated applications of dense matrix multiplication -> batch normalization -> ReLU activations, you get this loss for the same inputs over time: (blue: training=1, green: training=0)

Using an Adam (lr=0.001) optimizer instead gets even weirder results:

However, if I use my own implementation of batch norm (included in gist) I get reasonable results, with the loss for each being similar to each other: (Adam has similar behavior)

(Interestingly this doesn't seem to be as much of a problem if you have ReLU before BN, I haven't thought too deeply about why.)
Am I seeing things and just have some misunderstanding about what that function is doing, or is this actually a bug?

The document of tf.layers.batch_norm said this:
Note: the operations which update the moving_mean and moving_variance variables will not be added as dependencies of your training operation and so must be run separately. For example:
extra_update_ops = tf.get_collection(tf.GraphKeys.UPDATE_OPS)
sess.run([train_op, extra_update_ops], ...)

But you didn't use it in your code.

Where did you find that? The API reference says nothing about needing to run extra operations or adding extra operations to UPDATE_OPS.
The entire description:

Defined in tensorflow/python/layers/normalization.py.
Functional interface for the batch normalization layer.
Reference: http://arxiv.org/abs/1502.03167
"Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift"
Sergey Ioffe, Christian Szegedy

Sorry I was reading an old version of the doc. The way to run the update may have changed.

No. I was actually reading a newer version of doc. See here https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/layers/normalization.py#L338

Oh wow, surprised that's not on the website... I'll close this then, since it looks like the change to the doc has already been made.

Just for the sake of completeness, here is the recommended code from the docs:
      update_ops = tf.get_collection(tf.GraphKeys.UPDATE_OPS)
      with tf.control_dependencies(update_ops):
        train_op = optimizer.minimize(loss)

I am using
update_ops = tf.get_collection(tf.GraphKeys.UPDATE_OPS)
then..
sess.run(train_step,update_ops,feed_dict={x: batch[0], y_: batch[1],istrain:True})
but it is showing error as
TypeError: run() got multiple values for argument 'feed_dict'.
Could anyone tell that what's wrong:

@akssieg 1. You should make update_ops a dependency as mentioned above, and 2. you're not calling sess.run() correctly – all of your fetches/ops should be a single list/dict, not multiple arguments.
Try using:
sess.run([train_step, update_ops], feed_dict={...})

(notice the square brackets)


sentry_sdk.init() >= 1.5.9 breaks if theres a folder named redis

How do you use Sentry?
Sentry Saas (sentry.io)
Version
1.5.9
Steps to Reproduce
I have found that my app doesn't run because Sentry doesn't like there being a folder called redis. Same in 1.5.10 . This error doesn't happen using 1.5.8
This test works fine in an empty directory:
$ pip install sentry_sdk==1.5.9 && python -c "import sentry_sdk;sentry_sdk.init()"
Expected Result
nothing
Actual Result
Running the same command after mkdir redis, I get:
Requirement already satisfied: sentry_sdk==1.5.9 in /home/cioos/ceda/virtualenv/lib/python3.9/site-packages (1.5.9)
Requirement already satisfied: urllib3>=1.10.0 in /home/cioos/ceda/virtualenv/lib/python3.9/site-packages (from sentry_sdk==1.5.9) (1.26.8)
Requirement already satisfied: certifi in /home/cioos/ceda/virtualenv/lib/python3.9/site-packages (from sentry_sdk==1.5.9) (2021.10.8)
WARNING: You are using pip version 21.2.3; however, version 22.0.4 is available.
You should consider upgrading via the '/home/cioos/ceda/virtualenv/bin/python -m pip install --upgrade pip' command.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/cioos/ceda/virtualenv/lib/python3.9/site-packages/sentry_sdk/hub.py", line 105, in _init
    client = Client(*args, **kwargs)  # type: ignore
  File "/home/cioos/ceda/virtualenv/lib/python3.9/site-packages/sentry_sdk/client.py", line 86, in __init__
    self._init_impl()
  File "/home/cioos/ceda/virtualenv/lib/python3.9/site-packages/sentry_sdk/client.py", line 120, in _init_impl
    self.integrations = setup_integrations(
  File "/home/cioos/ceda/virtualenv/lib/python3.9/site-packages/sentry_sdk/integrations/__init__.py", line 122, in setup_integrations
    type(integration).setup_once()
  File "/home/cioos/ceda/virtualenv/lib/python3.9/site-packages/sentry_sdk/integrations/redis.py", line 48, in setup_once
    patch_redis_client(redis.StrictRedis)
AttributeError: module 'redis' has no attribute 'StrictRedis'

Hey @n-a-t-e !
Thanks for the bug report. With release 1.5.9 we released auto enabling of the redis integration: https://github.com/getsentry/sentry-python/pull/737/files
It seems this broke your code.
So the quick fix for you would be to downgrade to 1.5.8.
As this is a regression we put it on high priority.

Any news on this one ?
Thanks.

As a workaround you can include this in your redis module:

class RedisTemp:
    def execute_command(self):
        pass

StrictRedis = RedisTemp()


Unable to install Opensearch RAG Engine

If Opensearch is the only enabled RAG Engine in the config during deployment, then the whole deployment fails
It can only be installed together with Aurora and Kendra.
Has anyone hit it as well ?

Hi @alexeyshishkin01
just pushed a fix that should address the OpenSearch deployment issues.
You might want to re-clone and deploy from scratch.

thanks, let me check if it works after the fix

it looks like the issue is gone after applying the fix, pls. close the issue, thanks !


some questions

Hello, author.
I encountered the following problems while looking at your code:

optimizer.zero_grad location should not be placed with loss.back
When calculating accuracy, the return should be np.array(), not tensor type
The understanding is wrong, please point out, thank you.

@gengyanlei Hi. Thanks for suggestions.

I suppose this would not affect our training because gradients for this batch were calculated in the next step. The forward process would not calculate gradients.
The return type of accuray is np.array(), and our metrics are np.array().


Radial chart data point with '0' value flickers on hover (chart or data point)

Description
The data point with the "0" value is flickering when mouse is hovered in the chart area or on other data points.
Reproduce link
https://codesandbox.io/p/sandbox/vibrant-breeze-fpy4nt?file=%2Fsrc%2FRadialChart.tsx%3A26%2C14
Expected Behavior
The data point with the "0" value is should behave same as other data points.
Actual Behavior
https://github.com/user-attachments/assets/7fa0fe29-9c55-4ea7-9ae1-2e696a2934ea
Reproduction Link
https://codesandbox.io/p/sandbox/vibrant-breeze-fpy4nt?file=%2Fsrc%2FRadialChart.tsx%3A26%2C14

After some tests I got to know that setHoverIndex is causing the issue. @junedchhipa, can you please guide on how to update a state from the chart events?


Typo - GO:0120008

There's a superfluous space in the label of GO:0120008:
"positive  regulation of glutamatergic neuron differentiation"
Should be:
"positive regulation of glutamatergic neuron differentiation"

Fixed. Thanks @tonysawfordebi

Huh, the latest checks we added should be flagging these. Need to investigate.
On 28 Mar 2017, at 2:45, Tony Sawford wrote:

There's a superfluous space in the label of GO:0120008:
"positive  regulation of glutamatergic neuron differentiation"
Should be:
"positive regulation of glutamatergic neuron differentiation"
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geneontology/go-ontology/issues/13238


feat: deprecate HttpAgent constructor in favor of new create

Description
Following the pattern used by other interfaces in the library, this function switches to an async create method, that will be able to make the syncTime and fetchRootKey calls before completing. This will also support future async setup calls if needed in the future. createSync initializes the agent but skips any async steps, and is useful for testing or more sophisticated applications
The agent also has a from method, and will support either the v1 or v2 agent interfaces.
The HttpAgent also switches to true es6 private class fields, and will formally reveal its config and its host as fields. This supports the from method, but the _-prefixed methods from older HttpAgents will be supported.

Note: the constructor is marked deprecated in this PR. Existing code will not break yet, but will inform the developer that they should switch to create or createSync`.

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
Checklist:

[ ] My changes follow the guidelines in CONTRIBUTING.md.
[ ] The title of this PR complies with Conventional Commits.
[ ] I have edited the CHANGELOG accordingly.
[ ] I have made corresponding changes to the documentation.

@roelstorms


2.2.0 minified: Uncaught SyntaxError: Unexpected strict mode reserved word

Hi there,
when I load the 2.2.0 minified javascript file in a browser, I get the following error:
Uncaught SyntaxError: Unexpected strict mode reserved word

The problem appears to be exactly here:
https://github.com/Semantic-Org/Semantic-UI/blob/next/dist/semantic.js#L11966-L11968
It only occurs when I use the minified version.
To reproduce this problem, all you gotta do is create an HTML file that loads semantic.min.js in its head.

Cheers
Chris

I'll check into it

This appears to be fixed with the latest update of https://github.com/Semantic-Org/Semantic-UI/blob/next/dist/semantic.min.js
So, I'd consider this a closed matter.


Add max_retries param to cellranger

Add max_retries parameter to the CellRanger task so that it retries if the task fails. This will add robustness against intermittent google cloud failures, such as the VM quitting unexpectedly.

The portability test does not run the Cellranger WDL at the moment, so I think the failure is related to the minor service outage that just occurred


Build fixes

The Problem

The Solution

Checklist

[ ] Test manually on test-ui using remote chains.
[ ] Run load tests.
[ ] Update documentation if needed.
[ ] Update CHANGELOG.md.

OK, fine to keep the conditional forge install.


get_bedrock_anthropic_callback does not return token values correctly

Checked other resources

[X] I added a very descriptive title to this issue.
[X] I searched the LangChain documentation with the integrated search.
[X] I used the GitHub search to find a similar question and didn't find it.
[X] I am sure that this is a bug in LangChain rather than my code.
[X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

Example Code
from langchain_aws import ChatBedrock
from langchain_community.callbacks.manager import get_bedrock_anthropic_callback

llm = ChatBedrock(model_id="anthropic.claude-3-haiku-20240307-v1:0")
# llm = ChatBedrock(model_id="anthropic.claude-v2")

with get_bedrock_anthropic_callback() as cb:
    result = llm.invoke("Tell me a joke")
    result2 = llm.invoke("Tell me a joke")
    print(cb)

Error Message and Stack Trace (if applicable)
This is not an error, but rather the actual behavior.
As shown on the referenced page -> Tracking token usage.
Tokens Used: 0
	Prompt Tokens: 0
	Completion Tokens: 0
Successful Requests: 2
Total Cost (USD): $0.0

Description
Description:
I encountered an issue with the get_bedrock_anthropic_callback function in Langchain. According to the documentation, the function should provide token usage details, but it returns all token values as 0.
Steps to Reproduce:
Use get_bedrock_anthropic_callback as described in the documentation.
Observe that token values are returned as 0.
Expected Behavior:
The function should return the correct token usage values.
Actual Behavior:
The function returns all token values as 0.
Considering the use of Claude 3 Opus, it would be beneficial to include Opus (anthropic.claude-3-opus-20240229-v1:0) in the model cost mapping. Here are the current values for reference:
langchain_community.callbacks.bedrock_anthropic_callback
MODEL_COST_PER_1K_INPUT_TOKENS = {
    "anthropic.claude-instant-v1": 0.0008,
    "anthropic.claude-v2": 0.008,
    "anthropic.claude-v2:1": 0.008,
    "anthropic.claude-3-opus-20240229-v1:0": 0.015,
    "anthropic.claude-3-sonnet-20240229-v1:0": 0.003,
    "anthropic.claude-3-haiku-20240307-v1:0": 0.00025,
}

MODEL_COST_PER_1K_OUTPUT_TOKENS = {
    "anthropic.claude-instant-v1": 0.0024,
    "anthropic.claude-v2": 0.024,
    "anthropic.claude-v2:1": 0.024,
    "anthropic.claude-3-opus-20240229-v1:0": 0.075,
    "anthropic.claude-3-sonnet-20240229-v1:0": 0.015,
    "anthropic.claude-3-haiku-20240307-v1:0": 0.00125,
}

System Info
Langchain:
langchain==0.2.0rc2
langchain-anthropic==0.1.12
langchain-aws==0.1.3
langchain-chroma==0.1.0
langchain-community==0.2.0rc1
langchain-core==0.1.52
langchain-openai==0.1.6
langchain-text-splitters==0.0.1
OS:
windows10
Python:
3.10.4

I am facing the same issue. All token and cost values are returned as 0. Only value that displays something is the successful requests line.

Thank you for fixing the token counting logic! This is a great improvement.
I'd like to suggest an additional update that would make this even more useful. Specifically, updating the model cost mappings in langchain_community.callbacks.bedrock_anthropic_callback to include the latest Claude 3 models would allow for accurate token counting for Claude 3.0 Opus and Claude 3.5 Sonnet.
Here are the current values:
MODEL_COST_PER_1K_INPUT_TOKENS = {
    "anthropic.claude-instant-v1": 0.0008,
    "anthropic.claude-v2": 0.008,
    "anthropic.claude-v2:1": 0.008,
    "anthropic.claude-3-sonnet-20240229-v1:0": 0.003,
    "anthropic.claude-3-haiku-20240307-v1:0": 0.00025,
}

MODEL_COST_PER_1K_OUTPUT_TOKENS = {
    "anthropic.claude-instant-v1": 0.0024,
    "anthropic.claude-v2": 0.024,
    "anthropic.claude-v2:1": 0.024,
    "anthropic.claude-3-sonnet-20240229-v1:0": 0.015,
    "anthropic.claude-3-haiku-20240307-v1:0": 0.00125,
}

And here are the proposed updated values:
MODEL_COST_PER_1K_INPUT_TOKENS = {
    "anthropic.claude-instant-v1": 0.0008,
    "anthropic.claude-v2": 0.008,
    "anthropic.claude-v2:1": 0.008,
    "anthropic.claude-3-sonnet-20240229-v1:0": 0.003,
    "anthropic.claude-3-haiku-20240307-v1:0": 0.00025,
    "anthropic.claude-3-opus-20240229-v1:0": 0.015,
    "anthropic.claude-3-5-sonnet-20240620-v1:0": 0.003,
}

MODEL_COST_PER_1K_OUTPUT_TOKENS = {
    "anthropic.claude-instant-v1": 0.0024,
    "anthropic.claude-v2": 0.024,
    "anthropic.claude-v2:1": 0.024,
    "anthropic.claude-3-sonnet-20240229-v1:0": 0.015,
    "anthropic.claude-3-haiku-20240307-v1:0": 0.00125,
    "anthropic.claude-3-opus-20240229-v1:0": 0.075,
    "anthropic.claude-3-5-sonnet-20240620-v1:0": 0.015,
}

This update would enable accurate token counting for Claude 3.0 Opus and Claude 3.5 Sonnet models. Would it be possible to incorporate these changes in a future update?


Investigate adding an API to support random subtypes

Given the following classes:
interface Animal {}
class Lion implements Animal {}
class Tiger implements Animal {}

class Zoo {
    List<Animal> animals;
}

Created a Zoo containing random types of animals.
See: https://github.com/instancio/instancio/discussions/457

After looking into it, this feature won't be implemented at this time. The main issue is that subtype mapping is performed before generation. At generation time, the node hierarchy is already fixed and subtype mapping is no longer possible.
To support this feature:
a) the node hierarchy would have to incorporate random subtypes
b) the engine would need to be aware of the different subtypes and randomly pick from the available choices
which would result in a lot of added complexity.
For now, random subtypes can be generated by defining a custom generator, for example:
@Test
void randomElementTypes() {
    Class<?>[] subtypes = {Lion.class, Tiger.class};

    Generator<Animal> animalGenerator = random -> Instancio.of(Animal.class)
            .subtype(all(Animal.class), random.oneOf(subtypes))
            .create();

    Zoo zoo = Instancio.of(Zoo.class)
            .supply(all(Animal.class), animalGenerator)
            .create();
}


Angular support

Overview
I'm trying to replicate the react library in Angular, I'm getting to a point where things start to make sense. I was wondering if this is something you'd like to include in the library set.
I think the pain point of doing this would be the UI part, from the top of my head I can think of two alternatives:

Make UI libs framework agnostic (hard to code IMO)
Create different sets of UI libs per framework (easier to code, harder to maintain)

Given the React-ish approach of everything Solana-related, I'm thinking of doing this on my own in a different monorepo. Not having Angular-support held me back for a while, would love to make it easy for other Angular fellas like me.

I think an Angular package for this would be great and could definitely be part of the core in this repo. I haven't used Angular personally in many years, so I'd rely on you to establish some idiomatic conventions, but I would definitely review and accept a PR for this.

What I would suggest first is a PR for a package analogous to the react package that has no UI components. We can decide on good conventions there and then expand to UI components.

Right on friend, you got it.
I'm atm wrapping up the signTransaction/signAllTransactions methods. I'm basing my design heavily on the react package, we won't need any design documents for that (I'd expect). The UI part, well, different story, and we'll address it then lol.
I'll be raising the PR this week and reference this issue for tracking purposes.

Sounds great, looking forward to it.


Unable to re-use name of computer deleted from settings sync

Issue Type: Bug
If I remove a computer from the list of machines that have settings sync enabled, I cannot rename another computer to the name of the computer that was just removed. This issue also occurs on the latest insiders build.
Steps to Reproduce (The placeholder names of my-computer and my-work-computer can be substituted with any names):

Enable settings sync on multiple computers with VSCode
From one of the computers, open the panel shown by the Settings Sync: Show Synced Data command (or by clicking the "settings sync is on" message in the account menu in the sidebar) and rename the current computer to my-work-computer or some other friendly name.
From the same panel, rename the other computer to my-computer or a different name.
Switch to the other computer (the one named my-computer in this example). Make sure settings sync has pulled the lastest data and the friendly names for both computers show up in the Show Synced Data panel.
Delete the computer named my-work-computer (The computer that is not marked as current/the one we were last using)
Attempt to rename the current computer from my-computer to the same name that the computer we just deleted had (in this example, my-work-computer)
VSCode displays a message stating that machine names must be unique, even though a computer with the name my-work-computer no longer exists in the list of computers that have settings sync enabled.

VS Code version: Code 1.63.2 (899d46d82c4c95423fb7e10e68eba52050e30ba3, 2021-12-15T09:40:02.816Z)
OS version: Windows_NT x64 10.0.22000
Restricted Mode: No

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz (16 x 2904)

GPU Status
2d_canvas: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: enabledopengl: enabled_onrasterization: enabledskia_renderer: enabled_onvideo_decode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
15.92GB (7.47GB free)

Process Argv
--disable-extensions --crash-reporter-id bd59afe9-92b3-4cc3-aa1f-8080f56363f7

Screen Reader
no

VM
0%

Extensions disabled

Screenshot of issue:
In this case, the name of the computer I previously deleted was called Kytech-Surface. It does not show in the list of machines with settings sync enabled as it has been deleted. Attempting to rename any of the computers with settings sync to the old name produces the same issue:

And there's no tool to delete this phantom machine.
And there's no tool to even show the currently occupied names (even though the VSCode client obviously knows them).
I wonder if by this issue's one year anniversary we'd get any kind of acknowledgement from Microsoft, never mind a fix...

And there's no tool to delete this phantom machine.
And there's no tool to even show the currently occupied names (even though the VSCode client obviously knows them).
I wonder if by this issue's one year anniversary we'd get any kind of acknowledgement from Microsoft, never mind a fix...

Yeah, it would be nice to have this acknowledged. If I ever reinstall my OS without de-registering the computer from settings sync first, I'll run into this issue again and have to get creative with how I rename computers in VSCode since I always keep the same device/hostname whenever I do a clean install (or replace the device with another).

Happy late anniversary!

I recently had the same issue. I was able to remove the phantom machine by deactivating settings sync, which prompts "do you also want to delete all cloud data?", which I approved. Then, I reenabled settings sync, and no more machines were shown in the Show Synced Data panel. Finally, I renamed my machine to the previously occupied phantom name, and that now worked flawlessly.

Another year has passed.

Yep, and the bug is still floating around. Tried to re-use a name affected by this near the end of 2023 and still am experiencing the same problem - that name is still giving me the same error it did when I first opened this issue.
I can re-confirm as of about a week ago that the problem does not occur if you turn off settings sync on a machine. Looks like that process cleanly de-registers the machine name, in contrast to how deleting a machine from another computer does not cleanly de-register that machine name, resulting in this bug.
This doesn't seem like it would be too difficult of a fix, and I'd be happy to contribute towards a solution, but since settings sync is largely a server-driven feature, I wouldn't be surprised if the cause of the issue is on the server-side and wouldn't be something that could be fixed with a PR to this repo.

+1 still an issue

me too, current is 2024 year 10 month

still waiting...