Memoize #methods in hook processing

hi @Tapjoy/eng-group-services
cc @StabbyCutyou
This improves performance significantly (when we're not waiting on network I/O).
This does involve a slight change of behavior: hook methods defined dynamically after jobs begin processing will no longer be called. I think this is reasonable.

I don't think dynamic hook creation after fork is an intended feature any
ways.
Will review tonight or tomorrow morning.
On Jan 21, 2016 18:00, "theo-lanman"<EMAIL_ADDRESS>wrote:

hi @Tapjoy/eng-group-services
https://github.com/orgs/Tapjoy/teams/eng-group-services
cc @StabbyCutyou https://github.com/StabbyCutyou
This improves performance significantly (when we're not waiting on network
I/O).
This does involve a slight change of behavior: hook methods defined
dynamically after jobs begin processing will no longer be called. I think
this is reasonable.
You can view, comment on, or merge this pull request online at:
https://github.com/Tapjoy/chore/pull/21
Commit Summary

Memoize #methods in hook processing

File Changes

M lib/chore/hooks.rb
https://github.com/Tapjoy/chore/pull/21/files#diff-0 (6)

Patch Links:

https://github.com/Tapjoy/chore/pull/21.patch
https://github.com/Tapjoy/chore/pull/21.diff

—
Reply to this email directly or view it on GitHub
https://github.com/Tapjoy/chore/pull/21.

if we believe use-case is possible, can we wipe out the memo when a job starts?

I'm with Stabby; I don't think dynamic hook addition is an intended feature. In any case, wiping out the memo when the job starts isn't useful, since this is only called a few times per job. The problem arises when we process hundreds-to-thousands of jobs per second.

OK, not stuck on it.  Would just like to talk through your comment to understand it better.

Let's get a comment in here to explain: why this is being changed, what it impacted (dynamic hooks)
Any official numbers you can paste into the pr as proof of improvement would be a nice feather in the cap as well
That accomplished, lgtm

This addresses the performance issues, so as-is lgtm, but also I'd be on board with just getting rid of this.  There's no need for this feature.  We should support calling a single method named exactly as the event is and call it a day.
However, I know that's additional work and would be a major version bump, so happy to ship this as well.

Thats also an idea that has merit
We should stick it in the "Chore 2.0" idea bucket.
On Fri, Jan 22, 2016 at 2:20 PM, Aaron Pfeifer<EMAIL_ADDRESS>wrote:

This addresses the performance issues, so as-is lgtm, but also I'd be on
board with just getting rid of this. There's no need for this feature. We
should support calling a single method named exactly as the event is and
call it a day.
However, I know that's additional work and would be a major version bump,
so happy to ship this as well.
—
Reply to this email directly or view it on GitHub
https://github.com/Tapjoy/chore/pull/21#issuecomment-174017318.

Profiler results: in the unoptimized version, 47.0% of chore worker time was spent in #run_hooks_for. In the optimized (i.e., this) version, 9.6% of chore worker time was spent in #run_hooks_for. Doing the math, that means that batched sidecar jobs in the optimized version take 41.37% less time.

Yikes!
On Fri, Jan 22, 2016 at 2:36 PM, theo-lanman<EMAIL_ADDRESS>wrote:

Profiler results: in the unoptimized version, 47.0% of chore worker time
was spent in #run_hooks_for. In the optimized (i.e., this) version, 9.6%
of chore worker time was spent in #run_hooks_for. Doing the math, that
means that batched sidecar jobs in the optimized version take 41.37% less
time.
—
Reply to this email directly or view it on GitHub
https://github.com/Tapjoy/chore/pull/21#issuecomment-174021808.

Comment added.


Changed the file name

This is to reflect website being hosted on GitHub Pages, so to end file name as username.github.io.json.

Duplicate pull request, submitted 2nd one instead.


Pull in upstream improvements

🗣 Description

GitHub Actions
Fix code rot related to certbot container having old versions of boto3 libraries

💭 Motivation and Context

Keeping things up-to-date, and moving to new Docker org.
🧪 Testing

Ran all test suites.
📷 Screenshots (if appropriate)
🚥 Types of Changes

[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (causes existing functionality to change)

✅ Checklist

[x] My code follows the code style of this project.
[x] My change requires a change to the documentation.
[x] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[x] I have added tests to cover my changes.
[x] All new and existing tests passed.

Also, it looks like this repo only needs 1 reviewer for PRs- that should be changed to 2.


[test] Update nvidia gpu direct acc

bug fix tsa

Codecov Report

Merging #2054 (d16f42c) into master (ca0fb51) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #2054   +/-   ##
=======================================
  Coverage   87.53%   87.53%
=======================================
  Files          50       50
  Lines        8889     8889
=======================================
  Hits         7781     7781
  Misses       1108     1108

Continue to review full report at Codecov.

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


chore(main): release 0.4.4

:robot: I have created a release beep boop
0.4.4 (2024-08-11)
Bug Fixes

deps: update rust crate serde to v1.0.206 (#208) (094ed2a)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/jobs62/opnsense_unbound_external-dns_webhook/releases/tag/v0.4.4 :sunflower:


Fix for issue #1129: "Bug: Bash completion is broken when sub-commands have hyphens"

I left the commits split out logically for (hopefully) easier review, but if I were trying to match the commit message standard I'd use, "fix(bash completion): Now works when sub-commands have hyphens".
Let me know if you want me to squash this to one commit or rename something.
Fixes https://github.com/kbknapp/clap-rs/issues/1129

This change is

I just updated my branch to change the commit messages.


is there a way to like purge the css from fontawesome

I have no idea. Maybe. Has nothing to do with this addon though, so I'm closing this issue.


opentracker: init module

Motivation for this change
Implements services.opentracker for easy enabling of an opentracker service via systemd.
Main motivation for the change is that the current torrent tests simply run opentracker & before starting torrent clients which is pretty crude.
Things done

Built on platform(s)

[x] NixOS
[ ] OS X
[ ] Linux

[x] Fits CONTRIBUTING.md.

thanks.


AgentExecutor calls returnStoppedResponse() on its Agent after max iterations without passing callback manager

As the title say, AgentExecutor at the end of its _call() implementation,  run the method returnStoppedResponse() on its Agent after max iterations without passing callback manager.
const finish = await this.agent.returnStoppedResponse(
      this.earlyStoppingMethod,
      steps,
      inputs
    );

This can lead to a problem, in particular for those Agents that supports earlyStoppingMethod === "generate" to plan another last iteration after maxIterations has been reached in order to generate a final response.
Without passing a callback manager, the verbose (and any other callback defined) takes no effect in thi last iteration. In the case of verbose, wee see no log for this final iteration.

This is still happening for OpenAI agents. We need a fix otherwise the agent enters an infinite loop of requesting the tools.


[MB-14176] PPM Closeout flow Cypress tests

Jira ticket for this change
Summary
This PR adds Cypress tests that has the customer completing the entire closeout flow from beginning to end.  There's also an end to end test that goes back and edits existing closeout documents.  I had to add in pro-gear tests and expand on some other page specific forms to fill out.
The three main issues I encountered were:

The About Your PPM form calls the postal code validator when the actual move date datepicker value is typed in instead of selected from the calendar view.  This is similar to the bug Scott fixed for our jest tests, the async validators get run on every onchange event because origin and destination postal code fields have pre-filled values.
We still have the routing bug for when editing About Your PPM from the review page so I had to complete filling out an extra weight ticket because we can't yet delete review items.
Our update PPM service was using a fetcher that was missing pro-gear and expenses relations, so when editing About Your PPM we would update Redux with a PPM shipment value missing those associations.  I fixed the fetcher used by the updater to include those relations instead of trying to merge the Redux entities.

Setup to Run Your Code
Terminal 1
make e2e_test_fresh

Additional steps

From the Cypress menu select entireShipmentCloseout to run the desktop and mobile happy path and edits tests.

Verification Steps for Author
These are to be checked by the author.

[ ] Tested in the Experimental environment (for changes to containers, app startup, or connection to data stores)
[ ] Request review from a member of a different team.
[ ] Have the Jira acceptance criteria been met for this change?

Verification Steps for Reviewers
These are to be checked by a reviewer.

Frontend

[ ] User facing changes have been reviewed by design.
[ ] There are no aXe warnings for UI.
[ ] This works in Supported Browsers and their phone views (Chrome, Firefox, IE, Edge).
[ ] There are no new console errors in the browser devtools
[ ] There are no new console errors in the test output
[ ] If this PR adds a new component to Storybook, it ensures the component is fully responsive, OR if it is intentionally not, a wrapping div using the officeApp class or custom min-width styling is used to hide any states the would not be visible to the user.

Backend

[ ] Code follows the guidelines for Logging
[ ] The requirements listed in Querying the Database Safely have been satisfied.

Database
Any new migrations/schema changes:

[ ] Follows our guidelines for Zero-Downtime Deploys
[ ] Have been communicated to #g-database
[ ] Secure migrations have been tested following the instructions in our docs

Screenshots

@Mergifyio rebase


*: misc typos and go vet fixes

Replacing https://github.com/coreos/etcd/pull/5675.
Cherry-picking this to fix other go vet issues in go tip.
@purpleidea please format your commit message like this next time.

lgtm

thanks. merging in greens.

@gyuho Ah, * prefix. Didn't know that one. Cheers


Does polyserve still use bower?

Hi!
Installed<EMAIL_ADDRESS>and attempted to serve an element I had created with lit-element following the documentation, only to see the following error:
➜  lit-element polymer serve
Starting Polyserve...
    serving on port: 8080
    from root: /Users/dm/lit-element

Error reading config at /Users/dm/lit-element/bower.json
{ Error: ENOENT: no such file or directory, open '/Users/dm/lit-element/bower.json'
    at Object.openSync (fs.js:439:3)
    at Object.readFileSync (fs.js:344:35)
    at bowerConfigContents (/usr/local/lib/node_modules/polymer-cli/node_modules/polyserve/lib/bower_config.js:20:23)
    at Object.bowerConfig (/usr/local/lib/node_modules/polymer-cli/node_modules/polyserve/lib/bower_config.js:30:27)
    at Object.makeApp (/usr/local/lib/node_modules/polymer-cli/node_modules/polyserve/lib/make_app.js:30:63)
    at getApp (/usr/local/lib/node_modules/polymer-cli/node_modules/polyserve/lib/start_server.js:59:34)
    at startWithPort (/usr/local/lib/node_modules/polymer-cli/node_modules/polyserve/lib/start_server.js:101:17)
    at Promise.then (/usr/local/lib/node_modules/polymer-cli/node_modules/polyserve/lib/start_server.js:43:23)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/Users/dm/lit-element/bower.json' }
Files in this directory are available under the following URLs
    applications: http://localhost:8080
    reusable components: http://localhost:8080/components/lit-element/
^C

I thought this might have been the case back in the days of Polymer 1 and 2, but a little confused about this requirement.

Polymer CLI is installed globally.

Urgh. Ignore me. Some kind of error in how packages are installed on this machine. When I run polymer help I get the
╭────────────────────────────────────────╮
   │                                        │
   │    Update available 0.17.0 → 1.9.6     │
   │   Run npm i -g polymer-cli to update   │
   │                                        │
   ╰────────────────────────────────────────╯

message.


TF Framework regularizers_test missing test case add

test_regularization_shared_layer
test_regularization_shared_model
test_regularization_shared_layer_in_different_models
test cases added

@omalleyt12 Can you please review this PR ? Thanks!


SuperAGI hasn't been updated for 6 months

I think this framework has true potential just from reading over the code. I was about to clone it and play around but I just noticed it hasn't been changed in 6 months.
What's the deal? Has the project been "taken private" ?
Is the project dead?

I was at an earlier state one of the users but pretty soon I noticed there weren't coming any updates anymore and wen't over to other projects! It seems like the project is dead!

The project publisher wen't over to a different project!:
https://github.com/TransformerOptimus/SuperCoder
SuperCoder just got updated 20mins ago!

I just noticed GitHub says last update 3 weeks ago!

Hi, SuperAGI - Agent Framework is currently in maintainance mode however we welcome any feedback or PRs from the community :)
We've been working on something new - SuperCoder.
Check it out here: https://github.com/TransformerOptimus/SuperCoder


[Credentials] Autofill when elements are in shadow

Reviewer:  @shakyShane
Asana: https://app.asana.com/0/1200930669568058/1207793442006227/f
Description
Currently if a form contains elements that are within shadow root, the auto scanner misses out on all the elements of the form, and fails to categorize the inputs, although it does pierce through the shadow and find the hidden input element that was clicked on. This PR expands that a bit more:

When any of the input elements are clicked, scanner tries to find the parent form (using getParentForm),
getParentForm code was modified to traverse through the shadow boundary, and find the enclosing form element,
The found parent form is then passed to findEligibleInputs, which was also modified to find other related inputs in the form that are hidden.

TLDR; This way essentially we do a two way scan - identify the clicked input which is in the shadow, traverse up the form and find the closest form and then build out the rest of the form from there.
Steps to test

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

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

Thanks for the review all!

Simplified loop: https://github.com/duckduckgo/duckduckgo-autofill/pull/592/commits/5ec6e2a4503675df86d0ad0db9fd5d783f36ff4a
Only scan things when necessary https://github.com/duckduckgo/duckduckgo-autofill/pull/592/commits/1c876a6b62268d45e7089ebb9b0761801495d9f9 and https://github.com/duckduckgo/duckduckgo-autofill/pull/592/commits/deb7fb77d2fcfe1fe91be8bea3cbd466e3222b39
Keeping track of shadow tree: https://github.com/duckduckgo/duckduckgo-autofill/pull/592/commits/6f1972011c3a2b74181ee72966249570deb07a50. Naming improved https://github.com/duckduckgo/duckduckgo-autofill/pull/592/commits/460bd1cf09645d836bf676099b071ac1664d47f6
Type fix for the findEnclosedElements function https://github.com/duckduckgo/duckduckgo-autofill/pull/592/commits/6c543b614bcc917ce38bb52e66084bd8d27d3874
URL evaluation improvement https://github.com/duckduckgo/duckduckgo-autofill/pull/592/commits/b321a1f0627b3d73bf0b669b8efa8a88f89674b1

All fixed here https://github.com/duckduckgo/duckduckgo-autofill/pull/592/commits/2f8488caacfe1e434ebdb9701296fc7e92de2af6
Ready for merge!


NumberOverflow error when parsing JSON with big numbers on 32bit devices

Consider following test case:
    func testBigInteger() {
        let str = "{\"id\":<PHONE_NUMBER>74970368, \"id_str\": \"598458199574970368\"}"
        let data = str.dataUsingEncoding(NSUTF8StringEncoding)!
        let json = try? NSJSONSerialization.JSONObjectWithData(data, options: [])
        XCTAssertEqual(json!["id_str"], "598458199574970368")

        let json2 = try? JSON(data: data)
        XCTAssertEqual(try json2!.string("id_str"), "598458199574970368")
    }

If I run it on 32 bit devices (e.g. iPhone 4S simulator), it will fail. Note that I didn't try to access the big integer "id". The parser fail even we only try to access "id_str" which is string.

Thanks for the report. I believe this is a dupe of #76, and will be fixed once #152 (or something similar) is merged in.

Sorry for the dup! I just searched the error and didn't see it! Thanks for the update.


About the evaluation setup

Hello, I'm just a little confused about the evaluation setup.
In Section 4.2 of your paper, it is said that 'For evaluation, each test episode was formed by randomly sampling 15 queries for each of 5 classes, and the performance is averaged over 600 randomly generated episodes from the test set.' I think it means every test episode has (5 * 15 =) 75 queries and 75 graphs are formed from each test episode under the non-transductive setting.
However, according to your released code, it seems that every val/test episode only has (5 * 1 =) 5 queries. And you randomly sample 10,000 episodes for validating/testing.
I'm just wondering which evaluation setup you use when obtaining the results in your paper. And have you tried them both? If so, is there any difference between the results obtained by following these two evaluation setups? Thank you!

HI, I have some question about the evaluation setup too.

In your evaluation part, you use the labels of support samples to initialize the edge, however, during testing, we should not get the ground-truth.

You use the labels information to  initialize the edges during the training and testing phase, and then evaluation all this nodes, is it fair?
Thank you!

Same question to @neilfei

same question to @neilfei

same to @neilfei . The 'num_queries =1 ' does not meet the standard few-shot learning settings.


[iOS - Metal - v6.1.0] - lineDashPattern with steps disappears

Describe the bug
A line with a dash pattern + steps (forMLNStepping) will disappear or fail to render at certain zooms. Video compares iOS 5.13 and v6.
To Reproduce
let styleLayer = MLNLineStyleLayer(identifier: layer.title, source: publishedVector)
styleLayer.sourceLayerIdentifier = "title"
styleLayer.minimumZoomLevel = 4
styleLayer.maximumZoomLevel = 18
styleLayer.lineColor = NSExpression(forConstantValue: UIColor.green)
styleLayer.lineWidth = NSExpression(forMLNInterpolating: .zoomLevelVariable,
                                   curveType: .linear,
                                   parameters: NSExpression(forConstantValue: 1),
                                   stops: NSExpression(forConstantValue: [4: 4,
                                                                          12: 5,
                                                                          15: 6]))
styleLayer.lineCap = NSExpression(forConstantValue: "round")
styleLayer.lineJoin = NSExpression(forConstantValue: "round")
styleLayer.lineDashPattern = NSExpression(forMLNStepping: .zoomLevelVariable,
                                          from: NSExpression(forConstantValue: [0.25, 1.5]),
                                          stops: NSExpression(forConstantValue: [
					                        9: NSExpression(forConstantValue: [1.0, 2.0]),
					                        16: NSExpression(forConstantValue: [2.0, 2.0])
					                      ]))
style.addLayer(styleLayer)

Expected behavior
The line renders correctly without disappearing.
Screenshots
If applicable, add screenshots to help explain your problem.
v5
https://github.com/maplibre/maplibre-native/assets/197010/393cd4db-ab54-45a8-bd7c-ee54489ead8f
v6
https://github.com/maplibre/maplibre-native/assets/197010/63a2d713-0291-4439-b7dd-14d38d7ed882
Platform information (please complete the following information):

OS: iOS
Platform: iOS
Version v6.1

Thanks for the detailed bug report!
Is there any chance you can share the style used? Or another style that replicates the problem? This would help with debugging.

Here is a minimal reproducible sample app using MapLibre v6.1, XCode 15.2, latest Swift v5, and iOS 17.2.
MapLibreBugDashArray_v6_1.zip

I'm also experiencing this issue with our style implementation. Is there any update on this issue?

@matthiaskmt Could you try the latest version just to make sure the bug is still present?
@sjg-wdw What do you think?

I'm currently using 6.8.0


Debug-Icon creates wrong config when workspace is other than root

Hey,
thank you for your great work on this. I really like the plugin, however we have a repository that has the frontend-code under /frontend which the plugin does not respect when searching for the node_modules/vitest/vitest.mjs file.
In this case we manually have to add the right directory in the generated config.

I added a PR that fixes this https://github.com/linux-china/vitest-jetbrains-plugin/pull/35

duplicate to https://github.com/linux-china/vitest-jetbrains-plugin/issues/16. Im closing this issue


New IoC container - IServiceProvider in AspNetCore

Hi Daniel,
I have looked at mediatr and this and found your implementation "attractive".
I would like to have an implementation for AspNetCore IoC.
Made an attempt but run into trubble :)
Best,

using Enexure.MicroBus;
using Microsoft.Extensions.DependencyInjection;
namespace Estate.Write
{
public static class ServiceCollectionExtension
{
public static IServiceCollection RegisterMicroBus(this IServiceCollection services, BusBuilder busBuilder)
{
return RegisterMicroBus(services, busBuilder, new BusSettings());
}
    public static IServiceCollection RegisterMicroBus(this IServiceCollection services, BusBuilder busBuilder, BusSettings busSettings)
    {
        services.AddSingleton(busSettings);

        var pipelineBuilder = new PipelineBuilder(busBuilder);
        pipelineBuilder.Validate();

        RegisterHandlersWithDotNetCore(services, busBuilder);

        services.AddSingleton<IPipelineBuilder>(pipelineBuilder);
        services.AddScoped<IOuterPipelineDetector, OuterPipelineDetector>();
        services.AddScoped<IPipelineRunBuilder, PipelineRunBuilder>();
        services.AddScoped<DotNetCoreDependencyScope>();

        services.AddScoped<IMicroBus, MicroBus>();
        services.AddScoped<IMicroMediator, MicroMediator>();

        return services;
    }

    private static void RegisterHandlersWithDotNetCore(this IServiceCollection services, BusBuilder busBuilder)
    {
        foreach (var globalHandlerRegistration in busBuilder.GlobalHandlerRegistrations)
        {
            services.AddTransient(globalHandlerRegistration.HandlerType);

            foreach (var dependency in globalHandlerRegistration.Dependencies)
            {
                services.AddTransient(dependency);
            }
        }

        foreach (var registration in busBuilder.MessageHandlerRegistrations)
        {
            services.AddTransient(registration.HandlerType);

            foreach (var dependency in registration.Dependencies)
            {
                services.AddTransient(dependency);
            }
        }
    }
}

}

using System;
using System.Collections.Generic;
using Enexure.MicroBus;
using Microsoft.Extensions.DependencyInjection;
namespace Estate.Write
{
public class DotNetCoreDependencyScope : DotNetCoreDependencyResolver, IDependencyScope
{
private readonly IServiceProvider _provider;
    public DotNetCoreDependencyScope(IServiceProvider provider)
        :base(provider)
    {
        this._provider = provider;
    }

    public object GetService(Type serviceType)
    {
        return _provider.GetRequiredService(serviceType);
    }

    public IEnumerable<object> GetServices(Type serviceType)
    {
        return (IEnumerable<object>)_provider.GetRequiredService(typeof(IEnumerable<>).MakeGenericType(serviceType));
    }

    public T GetService<T>()
    {
        return (T)GetService(typeof(T));
    }

    public IEnumerable<T> GetServices<T>()
    {
        return (IEnumerable<T>)GetService(typeof(IEnumerable<T>));
    }

    public void Dispose()
    {
    }
}

}

    public void ConfigureServices(IServiceCollection services)
    {
        // Add framework services.
        services.AddMvc(config => { config.RespectBrowserAcceptHeader = true; })
        .AddXmlSerializerFormatters();

        // Add application services.
        services.AddScoped<Context>();

        var busBuilder = new BusBuilder()

            // Global handlers run in order so these are explicitly registered
            //.RegisterGlobalHandler<LoggingHandler>()
            //.RegisterGlobalHandler<SecurityHandler>()
            //.RegisterGlobalHandler<ValidationHandler>()
            .RegisterGlobalHandler<TransactionHandler>()

            // Manually add
            //.RegisterCommandHandler<LoginCommand, LoginCommandHandler>();

            // Scan an assembly to find all the CommandHandlers and Commands
            .RegisterHandlers(typeof(Context).GetTypeInfo().Assembly);

        services.RegisterMicroBus(busBuilder);

    }

Hi There!
Thank you for checking out MicroBus, I've love to know what exactly you found attractive about it!
You're right, I think having Microsoft.DependencyInjection support would be a great addition. I think I might take a stab at it myself (looks like I'll have some time today).
What issues did you run into with your attempt?

I've created a package for MicroBus Microsoft DI support
Install-Package Enexure.MicroBus.MicrosoftDependencyInjection

Thx!
I will have a try tomorrow afternoon. Will inform you about the progress :)
I intended to use mediatr in a project, when I came across two of your articles:
comparing-microbus-and-mediatr
building-a-microbus-application
From the first article, I found that the "WireUp" seemed to be simpler and the "Api" was more inline with my expectations
The second article described your used concepts very good.
All in all - you code in a way I like!

Couldn't wait - had to make a short test..
I works like a charm - thx again!
Best Regards
Ronny

Bus, CrossCutting, etc seems to be working!


Is there an external parameter, the transformation matrix from odmo coordinate system to camera coordinate system, in the market dataset？

or the transformation matrix from odmo coordinate system to any other coordinate system, in the market dataset
Thanks!

Then transformations are stored in openloris_tf_data.py.

is the odomer's coordinate system is the base_link?

Yes.


ClassStructure: Improper string trim

Describe the bug
Strings are immutable so the line
implementedClass.trim() inside ClassStructure.java
on its own does not change anything. Unsure of exactly what implications this has for the rest of the program.
To Reproduce
Steps to reproduce the behavior:

Write a simple Java program that includes a class that implements any interface.
Include trailing spaces before/after the interface names being implemented.
Run the obfuscator on your program and verify the obfuscated output.

Expected behavior
The class names should be trimmed to remove any spaces.

This issue has been resolved in the most recent pull request. Please pull update from the main branch for the fix!


BUG: Fix memory leaks by moving progress from the heap to the stack

Declaring those two local ProgressReporter objects on the stack (instead of on the heap) may benefit run-time performance. But moreover, it fixes two memory leaks (missing delete progress).

@richardbeare Are you still maintaining this library? I think I have a follow-up already to this pull request! Equivalent to https://github.com/SuperElastix/elastix/pull/1184

Minimally - I'm hoping to look at your mods when I'm back from leave.
On Thu, Jul 4, 2024 at 8:02 PM Niels Dekker @.***>
wrote:

@richardbeare https://github.com/richardbeare Are you still
maintaining this library? I think I have a follow-up already to this pull
request! Equivalent to SuperElastix/elastix#1184
https://github.com/SuperElastix/elastix/pull/1184

—
Reply to this email directly, view it on GitHub
https://github.com/richardbeare/parabolicMorphology/pull/11#issuecomment-2208594753,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAF6RIIYTMXON36XZ2T74XTZKUMU3AVCNFSM6AAAAABKHGZD46VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBYGU4TINZVGM
.
You are receiving this because you were mentioned.Message ID:
@.***>

Minimally - I'm hoping to look at your mods when I'm back from leave.

Thanks, @richardbeare In the mean time, I'll try to already get my proposed ParabolicMorphology adjustments into https://github.com/SuperElastix/elastix and https://github.com/InsightSoftwareConsortium/ITKParabolicMorphology, hoping that they will eventually find their way into your repo!

The remote module in ITK references InsightSoftwareConsortium/ITKParabolicMorphology, rather than my repo. I'll have a look at what you've proposed.

Thanks @richardbeare Of course, I can also submit the other PRs to your richardbeare/parabolicMorphology repo (rather than just to InsightSoftwareConsortium/ITKParabolicMorphology and elastix). What would you suggest?

The ITK migration guide suggests we should be moving to ProgressTransformer. Perhaps this is the time to make the move.

Thanks @richardbeare Honestly I didn't know about ProgressTransformer versus ProgressReporter. Indeed I see now at https://github.com/InsightSoftwareConsortium/ITK/blob/master/Documentation/docs/migration_guides/itk_5_migration_guide.md?plain=1#L374-L379

Since itk::ProgressReporter does not work well with the new threading model, it should be replaced by itk::ProgressTransformer. This only applies to classes which use GenerateData() method, and either have multiple ParallelizeRegion calls or a long single-threaded section.

Still not sure if it applies to ParabolicErodeDilateImageFilter. Does your filter use "the new (ITK) threading model"? It does call DynamicMultiThreadingOff(), so then, doesn't it still use the older threading model? It certainly does not have ParallelizeRegion calls. What do you think?
Anyway, I would propose to just fix those two obvious memory leaks of local ProgressReporter objects for now, and maybe consider moving to ProgressTransformer afterwards.

I've confirmed the leak existed and is fixed by this modification. (Had hoped that the use of auto would invoke the smart pointer side of things and handle the problem).
I think this PR needs to be rebased off the current head - the InsightConsortium hosted fork was ahead of mine.

I've confirmed the leak existed and is fixed by this modification.

Thank you @richardbeare, for confirming the memory leak, as well as the fix!

I think this PR needs to be rebased off the current head - the InsightConsortium hosted fork was ahead of mine.

Well, I think it's OK already. The corresponding PR that I submitted to the InsightConsortium is already on top of the head of Insight's main branch:

https://github.com/InsightSoftwareConsortium/ITKParabolicMorphology/pull/45

Can you possibly merge the pull request (Insight PR #45) at the Insight repo?

I don't have control of the InsightConsortium fork - I guess they'll get to it soon. I'll sync my fork with theirs once the PR is merged.

I don't have control of the InsightConsortium fork - I guess they'll get to it soon. I'll sync my fork with theirs once the PR is merged.

Thanks @richardbeare. I don't mind asking the maintainers of the InsightConsortium fork, but are you sure you don't have permission to merge? As far as I can see, you did merge the very first PR to the InsightConsortium fork! Back in 2015!

https://github.com/InsightSoftwareConsortium/ITKParabolicMorphology/pull/1

@thewtex I'm very out of date with the PR process - are you able to look into these updates?

@richardbeare I went ahead and merged them. If the PR's look good to you, feel free to just hit the green PR merge button.
When we want to push new Python packages, we currently have to manually bump the version -- done here: https://github.com/InsightSoftwareConsortium/ITKParabolicMorphology/pull/47


Date field format

Hi, I have a date field called birth_date and I have the following settings for it in edit_fields section:
birth_date' => array(
'title'       => 'Born (dd/mm/yyyy)',
'type'        => 'date',
'date_format' => 'dd/mm/yy',
),
The problem I have is that this field is not showing the date like '05/12/2004' but instead it shows '2004-12-05' and also it shows the current date as selected date in datepicker while it should show '05/12/2004' as selected date.
Any ideas why this is happening?.
Thanks in advance.

you need a getter to format the saved date into the correct format for displaying in the field in administartor.


🐛 AutoSuggestBox used on a null value

AutoSuggestBox in new version of dart
Null check operator used on a null value
i used sample code in documentation

Sorry, but I can not reproduce this issue :/
I tried the example app and it works ifne there


Appstudio update mvp-test-component

Pipelines as Code configuration proposal

Pipelines as Code CI/mvp-test-component-on-pull-request has successfully validated your commit.

StatusDurationName

✅ Succeeded
7 seconds
init

✅ Succeeded
19 seconds
clone-repository

✅ Succeeded
1 minute
build-container

✅ Succeeded
17 seconds
deprecated-base-image-check

✅ Succeeded
17 seconds
inspect-image

✅ Succeeded
58 seconds
clamav-scan

✅ Succeeded
20 seconds
clair-scan

✅ Succeeded
12 seconds
sbom-json-check

✅ Succeeded
20 seconds
optional-label-check

✅ Succeeded
20 seconds
label-check

✅ Succeeded
6 seconds
show-sbom

✅ Succeeded
7 seconds
show-summary


Missing required field [ssl_avs_zip]

The field Postal Code (ssl_avs_zip) required but not supplied in the authorization request.

Coverage remained the same at 100.0% when pulling 1c9ec04926a1c5a7232340322529f8f7b269b7f0 on barrycarrjr:master into 42df07173711ff089d49c49abbe4b78bf0620a34 on lemonstand:master.

Coverage remained the same at 100.0% when pulling 1c9ec04926a1c5a7232340322529f8f7b269b7f0 on barrycarrjr:master into 42df07173711ff089d49c49abbe4b78bf0620a34 on lemonstand:master.

Coverage remained the same at 100.0% when pulling 1c9ec04926a1c5a7232340322529f8f7b269b7f0 on barrycarrjr:master into 42df07173711ff089d49c49abbe4b78bf0620a34 on lemonstand:master.

Coverage remained the same at 100.0% when pulling 1c9ec04926a1c5a7232340322529f8f7b269b7f0 on barrycarrjr:master into 42df07173711ff089d49c49abbe4b78bf0620a34 on lemonstand:master.

Coverage remained the same at 100.0% when pulling 1c9ec04926a1c5a7232340322529f8f7b269b7f0 on barrycarrjr:master into 42df07173711ff089d49c49abbe4b78bf0620a34 on lemonstand:master.

Hi Barry,
Thanks for this.
Citing their documentation, ssl_avs_zip is not required for either ccsale or ccauthonly authorizations. What transaction type are you attempting?
The above authorization types do take in ssl_avs_zip, though, so this looks good.

Hello @aperdomo,
We are sending ccsale authorizations.
You are right the documentation says it is not required, which is a bit misleading because the merchant can force some of these fields to be required in their merchant settings. This actually applies to quite a few more fields. Since there is no way to predict how a merchants settings will be edited I would recommend all non required fields be added.
I can edit and submit another PR. Thoughts?

@barrycarrjr
By all means, please do.

@aperdomo when you have a moment please review latest PR.


module 'django.contrib.auth.views' has no attribute 'login'

I'm trying to run migrations but I am facing this error

You are facing this error because of older version of django (latest version is 2.2).
To fix it change urlpatterns from these :
url(r'^login/$', auth_views.login, {'template_name': 'login.html'}, name='login'),
url(r'^logout/$', auth_views.logout, {'template_name': 'logged_out.html'}, name='logout'),
to :
url(r'^login/$', auth_views.LoginView.as_view(template_name='login.html'), name='login'),
url(r'^logout/$', auth_views.LogoutView.as_view(template_name='logged_out.html'), name='logout'),
and in setting.py file change MIDDLEWARE_CLASSES to MIDDLEWARE and remove     'django.contrib.auth.middleware.SessionAuthenticationMiddleware',

Or just pull from the pull request #3 that is currently open,
git clone https://github.com/chiillax/simple-django-login


[WIP] C/Fortran API

Can one of the admins verify this patch?

Refer to this link for build results (access rights to CI server needed):
/job/DataTransferKit/15/

Refer to this link for build results (access rights to CI server needed):
/job/DataTransferKit/16/

Refer to this link for build results (access rights to CI server needed):
/job/DataTransferKit/18/

Refer to this link for build results (access rights to CI server needed):
/job/DataTransferKit/19/

Refer to this link for build results (access rights to CI server needed):
/job/DataTransferKit/20/

This looks good. I am going to merge and then add my updates in another PR.


Broken 'space dark' theme

Describe the bug
Latest update seems to have broken 'Space Dark' theme, which now looks like this:

Expected behavior
The editor should not be white on a dark theme preset
Additional Info

OS: Windows 11
Plugin version: 1.0.231012
IntelliJ IDEA version: 2023.3 EAP (latest EAP, not tested on stable)

I'm unable to reproduce this on IntelliJ IDEA 2033 EAP:

Although I noticed menu items are colored inconsistently on the latest EAP and it is patched now, you can grab the latest build from the releases section v1.0.20231012.1.
Your theme configurations may be corrupt, can you reset color schemes following this path:
Settings -> Editor -> Color Schemes -> Select 'Space ...' -> Select 'Restore Defaults' clicking on the cogwheel
Do this for all 'Space' color schemes, although you will lose any customization you have made to them so make sure to export a backup before doing so!

Then select and re-apply the theme, if this doesn't resolve the issue, remove the plugin and re-install the binary from the releases page mentioned above and report back.

Thank you very much for the rapid response!
I can confirm that the preview release fixes the menus:

I changed place and PC and at first I could not reproduce it. But then it happened again when switching to the 'Space Grey' variant. What I noticed though was that in the 'Color Scheme' settings, the scheme was set to 'Classical Light'!
I think that is a bug of IntelliJ

You're welcome! Thanks for reporting!
Yes it is indeed a bug of IntelliJ tracked here at IDEA-334062.
Expect to receive the update on JetBrains Plugin Marketplace within 2 business days.

@aliakbarmostafaei thank you very much
Sorry to contact you here but I wanted to ask you if you are open to proposals on changes/improvements
Eventually I could try making a PR, though I'd first have to understand how it works

Sorry to contact you here but I wanted to ask you if you are open to proposals on changes/improvements Eventually I could try making a PR, though I'd first have to understand how it works

Yes, go ahead and create a new issue with your proposals and we'll discuss them. I'm more open to changes in the color schemes, I believe the overall UI colors are fine but who knows there's always room for improvement. PRs are also welcome.

"Discussions" are now enabled on the repository.


Specifying TEntityClass

I am getting an error:
 Class MyRepository extends generic class Doctrine\ORM\EntityRepository but does not specify its types:  TEntityClass
What would be the proper way to inform phpstan about the entity being handled by this repository?

Please read this article: https://medium.com/@ondrejmirtes/generics-in-php-using-phpdocs-14e7301953
The whole article is good to know about, but this specific section talks about your problem:

When implementing a generic interface or extending a generic class, you have two options:

I've read the article, but having more concrete examples would be helpful.

Referring to:
When implementing a generic interface or extending a generic class, you have two options:

Preserve the genericness of the parent, the child class will also be generic
Specify the type variable of the interface/parent class. The child class will not be generic.

So:
/**
 * @template TEntityClass of object
 * @extends \Doctrine\ORM\EntityRepository<TEntityClass>
 */
class MyRepository extends \Doctrine\ORM\EntityRepository

or for example:
/**
 * @extends \Doctrine\ORM\EntityRepository<UserEntity>
 */
class MyRepository extends \Doctrine\ORM\EntityRepository

Thank you very much!


HDDS-2667. Promethues reports invalid metric type

What changes were proposed in this pull request?
Normalize RocksDB metrics record name, which comes from DB file names (eg. om.db -> Rocksdb_om.db), because periods are not allowed in Prometheus metrics names.
https://issues.apache.org/jira/browse/HDDS-2667
How was this patch tested?
Changed existing unit test.
Tested using ozoneperf environment after enabling RocksDB metrics in docker-config:
OZONE-SITE.XML_ozone.metastore.rocksdb.statistics=ALL

and creating test data with Freon:
docker-compose exec scm ozone freon ockg -t 1 -n 1

Verified that Prometheus shows all datanodes, OM, SCM as up.  Verified that /prom endpoint and Prometheus show RocksDB metrics with normalized names, eg:
# TYPE rocksdb_om_db_wal_file_bytes counter
rocksdb_om_db_wal_file_bytes{hostname="198e740b5533"} 1823

Thanks @elek for committing it.


fix: avoid flagging unused loop variable (B007) with globals(), vars() or eval()

see issue #2161
maybe even the use of exec() could be a case?
and what do you think about:
diff --git src/rules/flake8_bugbear/rules/unused_loop_control_variable.rs src/rules/flake8_bugbear/rules/unused_loop_control_variable.rs
index 7783c7a4..e4a453ab 100644
--- src/rules/flake8_bugbear/rules/unused_loop_control_variable.rs
+++ src/rules/flake8_bugbear/rules/unused_loop_control_variable.rs
@@ -57,10 +57,6 @@ where

 /// B007
 pub fn unused_loop_control_variable(checker: &mut Checker, target: &Expr, body: &[Stmt]) {
-    if helpers::uses_magic_variable_access(body) {
-        return;
-    }
-
     let control_names = {
         let mut finder = NameFinder::new();
         finder.visit_expr(target);
@@ -90,7 +86,7 @@ pub fn unused_loop_control_variable(checker: &mut Checker, target: &Expr, body:
             violations::UnusedLoopControlVariable(name.to_string()),
             Range::from_located(expr),
         );
-        if checker.patch(diagnostic.kind.rule()) {
+        if !helpers::uses_magic_variable_access(body) && checker.patch(diagnostic.kind.rule()) {
             // Prefix the variable name with an underscore.
             diagnostic.amend(Fix::replacement(
                 format!("_{name}"),

so that it's still noted but just not fixed (untested)?

Sounds good. I went ahead and added exec, and changed the code to lint but not fix if the fix is "unsafe".


Should RemoteAuthenticationOptions validate SignInScheme != null?

This should validation was lost at some point, SignInScheme is required for remote auth.

Or maybe we removed this validation to enable calling the default sign in scheme...

Can we also validate and SignInScheme != Scheme, are the schemes stored on the instances of the handlers themselves?

We will likely have to validate that outside of the normal validation (not AuthenticationSchemeOptions.Validate, but inside of the base RemoteAuthenticationHandler itself to have access to the scheme name, and we'd likely have to also explicitly check for when its the default that fallback to itself as well.

Can we also validate and SignInScheme != Scheme, are the schemes stored on the instances of the handlers themselves?

Exactly what I had recommended here: https://github.com/aspnet/Security/issues/1264#issuecomment-309100351

We will likely have to validate that outside of the normal validation

You can easily do that in EnsureSignInScheme as you have access to both names: https://github.com/aspnet/Security/blob/488eb44467eb677eab62bdc49aa6255cc1be3119/src/Microsoft.AspNetCore.Authentication/AuthenticationServiceCollectionExtensions.cs#L98-L101

Related issue to address:
https://github.com/aspnet/Security/blob/488eb44467eb677eab62bdc49aa6255cc1be3119/src/Microsoft.AspNetCore.Authentication/AuthenticationServiceCollectionExtensions.cs#L98-L101
There should be an additional ?? _authOptions.DefaultScheme; for when DefaultSignInScheme isn't set. That's what was starting some of the stack overlfows by passing nulls.

b9d9418f6d4fecd8e3b0c60538bb985c15e31fcc


Prettier

Have prettier format js, ts, md, y?aml etc in-pipeline.
Initially set to occur on push, but could be set to occur only on PR
Could also just have it reject unprettified code instead of prettifying for you, if this feels a bit heavy-handed.  Folks pushing code without any auto-formatting at-home might be scratching their heads when they have to pull again to push the next commit.

Love it! 🔥 🚀
Another one I think will be quite appreciated by all, cheers @olidacombe

Could also just have it reject unprettified code instead of prettifying for you, if this feels a bit heavy-handed. Folks pushing code without any auto-formatting at-home might be scratching their heads when they have to pull again to push the next commit.

 I think we should add an npm script to our top-level package.json that users can use. So, we can runny prettier in CI to see if the code submitted matches the expected format. If not, fail the CI run, and the author can then run npm run pretty or whatever to run the prettier edit step and fix up the code.
Two other thoughts:

Can we add a config file to define what prettier styles we want and which ones we don't? (I haven't used prettier much myself yet). I think it'd be a good idea to put that up here and discuss + align before we run it on everything
In terms of structuring the PR, can we do 1 commit to add the github workflow, the prettier config + ignore files, and the npm script, and then 1 more commit where we group all of the changes that occur from actually running prettier on the codebase? The reason I'm thinking this is that this will be a very broad-strokes update, and any work that needs to rebase against the new edits will have a rough time. If we can isolate such edits to a single commit, any such rebase efforts will be limited to 1 commit

Agreed, I'm not a fan of having CI commit to our repo on our behalf. I think we should add an npm script to our top-level package.json that users can use. So, we can runny prettier in CI to see if the code submitted matches the expected format. If not, fail the CI run, and the author can then run npm run pretty or whatever to run the prettier edit step and fix up the code.

Woops, I didn't even notice we have a top-level package.json!  Well in that case we can provide lint-staged if we want to validate before commit/push.  That will also be re-usable for clang-format I reckon.  In pipeline, I was thinking of making the lint actions allow failure on push, but not allow failure for PRs, so you can see your branch is warning you that a PR will fail checks.  Ultimately, I think people just enable the prettier plugin of their IDE and forget about it, the script and git hooks might see little use outside of CI.
I'm pretty committed now having messed around with this that I don't want the action to have any ability to write to the repo.

Two other thoughts:

Can we add a config file to define what prettier styles we want and which ones we don't? (I haven't used prettier much myself yet). I think it'd be a good idea to put that up here and discuss + align before we run it on everything

Yes, but personally I prefer to provide no customisations, since I see the job of the formatter to be keeping everyone's code and diffs predictably un-quirky, rather than enforcing my preferences.  If you suggest a first override I'll throw in the .prettierrc.  Our clang-format pass will or course carry strong opinions out of the gate.

In terms of structuring the PR, can we do 1 commit to add the github workflow, the prettier config + ignore files, and the npm script, and then 1 more commit where we group all of the changes that occur from actually running prettier on the codebase? The reason I'm thinking this is that this will be a very broad-strokes update, and any work that needs to rebase against the new edits will have a rough time. If we can isolate such edits to a single commit, any such rebase efforts will be limited to 1 commit

Yeah that's exactly what I had in mind.  This is still in playaround stages.

Well in that case we can provide lint-staged if we want to validate before commit/push.

I'm not sure I follow? What's lint-staged?

Yes, but personally I prefer to provide no customisations, since I see the job of the formatter to be keeping everyone's code and diffs predictably un-quirky, rather than enforcing my preferences. If you suggest a first override I'll throw in the .prettierrc. Our clang-format pass will or course carry strong opinions out of the gate.

:+1: :+1:

Well in that case we can provide lint-staged if we want to validate before commit/push.

I'm not sure I follow? What's lint-staged?

https://github.com/okonet/lint-staged sets up some pre-commit hooks for you to run things like prettier, eslint etc.  I've configured it only to run prettier --write.  Even this might be too much, I've put it in there, and pretty sure it's "opt-in" (so it won't modify your commits before pushing unless you've run a command to create the hook), so thought it's safe enough.  But I'm happy to ditch it if it's a step too far.  All the cool kids are using it, which might make us wary more than anything else.

@nick-thompson pending how you feel about lint-staged, currently the "first commit" leaves us in this state with the lint action failing (I turned on pull_request as a trigger for the CMake and Node actions).  The next commit would make that one green.  I don't know what people do about blame in these situations, I risk inheriting half the codebase.

Hi @nick-thompson , sorry I've been mia for a good while, just revisited this hanging thread.  Not sure what your thoughts are currently on this.  I chucked some spiel in CONTRIBUTING.md on the last commit to illustrate the ways in which the tooling can be your friend 🐕

Hi @nick-thompson , sorry I've been mia for a good while, just revisited this hanging thread.  Not sure what your thoughts are currently on this.  I chucked some spiel in CONTRIBUTING.md on the last commit to illustrate the ways in which the tooling can be your friend 🐕

Ah @olidacombe would you mind rebase and fixing the conflicts? Then I'll be happy to get it merged

Ah @olidacombe would you mind rebase and fixing the conflicts? Then I'll be happy to get it merged

Merged, cheers @olidacombe! Really happy about this one

Merged, cheers @olidacombe! Really happy about this one

Hey @nick-thompson yeah I just rebased from before beautification and re-ran

Hey @nick-thompson yeah I just rebased from before beautification and re-ran

Yeah this is fantastic @olidacombe. Super happy to see this go in.

Yeah this is fantastic @olidacombe. Super happy to see this go in.


Game broken

When attempting to access this at https://githubschool.github.io/github-games-tuonghoanggithub, I am getting a 404. This could be caused by a couple things:

GitHub pages needs to be enabled on master. You can fix this in the repository settings.
the index.html file is incorrectly named inde.html. We will fix this together in class.

Can you please fix the first bullet @tuonghoanggithub?

Hi,
Please advise me how to fix the first bullet (e.g., how to change the repository settings)
Regards,
Tuong
From: GitHub Teacher<EMAIL_ADDRESS>Sent: Thursday, December 12, 2019 10:09 AM
To: githubschool/github-games-tuonghoanggithub<EMAIL_ADDRESS>Cc: Tuong Duc Hoang<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: [githubschool/github-games-tuonghoanggithub] Game broken (#1)
When attempting to access this at https://githubschool.github.io/github-games-tuonghoanggithub, I am getting a 404. This could be caused by a couple things:

GitHub pages needs to be enabled on master. You can fix this in the repository settings.
the index.html file is incorrectly named inde.html. We will fix this together in class.

Can you please fix the first bullet @tuonghoanggithubhttps://github.com/tuonghoanggithub?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/githubschool/github-games-tuonghoanggithub/issues/1?email_source=notifications&email_token=AN7ZYO3BRDCZ7SFRSTYT6N3QYJH2FA5CNFSM4J2AANI2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IACQZXA, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AN7ZYOZUQXOBWFV4HI7CEE3QYJH2FANCNFSM4J2AANIQ.
[Banner]
[Banner]https://idcc.me/2ZVMLEv
ABI White Paperhttps://idcc.me/2ZVMLEv
This e-mail is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and/or otherwise protected from disclosure to anyone other than its intended recipient. Unintended transmission shall not constitute waiver of any privilege or confidentiality obligation. If you received this communication in error, please do not review, copy or distribute it, notify me immediately by email, and delete the original message and any attachments. Unless expressly stated in this e-mail, nothing in this message or any attachment should be construed as a digital or electronic signature.


RSA Encrypt PaddingScheme::new_pkcs1v15_encrypt()

Hello,
Let's say I am using this library in this fashion using FFI, what would be the recommended way to return my encrypted_string variable as UTF8 encoded?
#[no_mangle]
pub extern "C" fn rsa_encrypt(pub_key: *const c_char, data_to_encrypt: *const c_char) -> *mut c_char {
    let pub_key_string = unsafe {
        assert!(!pub_key.is_null());

        CStr::from_ptr(pub_key)
    }.to_str().unwrap();

    let data_to_encrypt_bytes = unsafe {
        assert!(!data_to_encrypt.is_null());

        CStr::from_ptr(data_to_encrypt)
    }.to_bytes();

    let public_key = RsaPublicKey::from_pkcs1_pem(pub_key_string).unwrap();
    let mut rng = rand::thread_rng();
    let encrypted_string = CString::new(public_key.encrypt(&mut rng, PaddingScheme::new_pkcs1v15_encrypt(), &data_to_encrypt_bytes).unwrap()).unwrap();
    return encrypted_string.into_raw();
}

My apologizes, data_to_encrypt_bytes is being passed into the library as a reference. You can close.

You left a previous comment that the issue can be closed. Is that the case?
That said, these issues are more for tracking bugs than giving help (particularly on the eccentricities of FFI usage). We'd probably prefer you ask for help on Zulip:
https://rustcrypto.zulipchat.com/#narrow/stream/260047-RSA

No problem, I realized that and took it to Stack Overflow because the OpenSSL crates produced a similar UTF8 error. Thanks, you can close.
Get Outlook for iOShttps://aka.ms/o0ukef

From: Tony Arcieri @.>
Sent: Monday, December 26, 2022 10:20:53 AM
To: RustCrypto/RSA @.>
Cc: Mike Mulchrone @.>; Author @.>
Subject: Re: [RustCrypto/RSA] RSA Encrypt PaddingScheme::new_pkcs1v15_encrypt() (Issue #239)
You left a previous comment that the issue can be closed. Is that the case?
That said, these issues are more for tracking bugs than giving help (particularly on the eccentricities of FFI usage). We'd probably prefer you ask for help on Zulip:
https://rustcrypto.zulipchat.com/#narrow/stream/260047-RSA
—
Reply to this email directly, view it on GitHubhttps://github.com/RustCrypto/RSA/issues/239#issuecomment-1365247151, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A3LCXVT4Q3FY5NOGHATKKH3WPGZVLANCNFSM6AAAAAATJJ4YVU.
You are receiving this because you authored the thread.Message ID: @.***>


Why not compatible with netcoreapp1.0?

Package RazorEngine 4.4.0-rc1 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package RazorEngine 4.4.0-rc1 supports: net45 (.NETFramework,Version=v4.5)
One or more packages are incompatible with .NETCoreApp,Version=v1.0.

Same problem here. Can't add RazorEngine 4.4.0-rc1 package to .NET Core console application, neither to .NET Core class ibrary

+1

Same Problem, do you have any plan to solve it ?

indeed not usable in xunit test project either

a PR would be welcome.

Why isn't it compatible? Some info would be helpfull

One needs to add support for it (ie build the project against the netcore target and possibly modify the code to support the new target).

Edit the Build infrastructure to build against the additional target (netcore)
Add the binary to the nuget package

I am looking into migrating RazorEngine to support .NET Core App (netcoreapp2.0).  I ran RazorEngine through .NET Portability Analyzer and for the most part it is compatible.  There are a few areas that would need to be looked at:

System.AppDomain:  There appears to be some creating and management of AppDomains but .NET Core only has 1 domain.
System.Reflection.Emit

The types/methods do not exist:

AssemblyBuilder.DefineDynamicModule(string,string)
TypeBuilder.CreateType
AssemblyBuilder.Save(string)
TypeToken

System.Runtime.Remoting.RemotingServices
System.Security.Principal.WindowsIdentity: Impersonation

Hi @matthid ,
These are the PRs I hope to make in order to migrate this project to .NET Standard 2.0.  Do these seem reasonable to you? Any feedback is appreciated:
In regards to paket, since the releases I had to use to make it work are RC and not stable, would you like me to remove the environment settings from the build.cmd/build.sh to set PAKET_VERSION="5.0.0-rc006" and leave the CI builds broken until a stable release is released?
Tasks (PRs)

[x] Migrate tests to NUnit 3.6.0
[ ] Replace Microsoft.Practises.Unity with Autofac.

This is because Microsoft.Practises.Unity does not work on .NET Core and probably will not be migrated. This dependency is only used in the test projects.

[ ] Update Microsoft.CodeAnalysis to 1.3.2 because it supports .NET Standard 1.3 and .NET 4.5.

Microsoft.CodeAnalysis 2+ no longer supports .NET 4.5.

[ ] Extract code generation through Reflection.Emit and CodeDom into separate library (ie. RazorEngine.Core.CodeDom)

I could try to use compiler directives (ie. #if FEATURE_CODEDOM) instead if you wanted to keep them into the same library.

[ ] Migrate RazorEngine.Core.Tests to .NET Standard 2.0
[ ] Migrate RazorEngine.Core.Roslyn.Tests to .NET Standard 2.0
[ ] Migrate RazorEngine.Core to .NET Standard 2.0
[ ] Migrate RazorEngine.Core.Roslyn to .NET Standard 2.0
[ ] Migrate RazorEngine.Hosts.Console and RazorEngine.Mvc

Thanks!
Connie

@conniey Thanks for helping out.

leave the CI builds broken until a stable release is released?

No, prerelease is fine and Paket 5 will hit very very soon ;)

How should I separate the CodeDom and Reflection.Emit from RazorEngine.Core? Would you want me to keep them in the same library and use compiler directives? Split into different projects? Something else?

What do you mean with Reflection.Emit? Can't remember where we use that. If this is the part with the dynamic wrapper to cross appdomains then I think I'm fine with #if NO_APPDOMAIN (or whatever we miss there for example #if NO_REFLECTION_EMIT)
Regarding CodeDom, we already have the proper abstractions to split that out. Maybe the time has come to default to roslyn (I couldn't really do that at the time because stuff wasn't really stable when I added it). We would just add the proper dependencies to the NuGet package...
To be honest I'm not even sure it's worth to keep at all (it's quite an invest to split that out to a separate package, which probably noone will ever use)

How should I work with the configuration model?

To be honest I never really liked the configuration stuff, I'm happy with whatever improves the situation.
If it doesn't break the most common use-cases that's a plus... (We can discuss those in the PR)

Do you need any help with Reflection.Emit, or CodeDom extraction? Maybe the configuration stuff shouldn't be terrible hard (I assume). I just used RazorLight in a library and the performance was not very good.

@DeadlyChambers Hey, I was able to get it working on .NET Standard 2.0 because System.Reflection.Emit was brought back.  If you are able to rewrite the DynamicWrapperService and RazorDynamicObject to not use System.Reflection.Emit, that would be awesome! (And we wouldn't have to target .NET Standard 2.0 potentially.)  There are a lot of System.Configuration features used.. I added a compiler directive (NO_CONFIGURATION) to remove those for now.
Here is my branch if you wanted to look at it, try it out, make DynamicWrapperService work without System.Reflection.Emit, etc. https://github.com/conniey/RazorEngine/tree/updateToNetCore
My current approaches downsides:

Consumers of this library will have to upgrade their solutions to .NETCoreApp2.0 or .NET Standard2.0
Using dotnet-dev feed to build against .NET Standard 2.0. So consumers will have to add a reference to that feed as well until they update the package at RTM. (Unfortunately, System.Reflection.Emit NuPkg was not updated with .NET Core Preview 2.)

As a result, I don't have a problem if this PR isn't merged in until .NET Core 2.0 is RTM'd.  I would just want it open so folks could find the work.

My current TODOs:

[ ] Revert projects from using NuGet package manager to paket.

Excellent. I will look at it tonight when I get out of work.

Here's some instructions on how to use it so far:
Building in Visual Studio

Open ./src/RazorEngine.NetCore.sln and build

Building Command Line

dotnet restore ./src/RazorEngine.NetCore.sln
dotnet build ./src/RazorEngine.NetCore.sln

Testing
This one is the most confusing one because of issues when using NUnit with dotnet-test.

Running against .NET 4.6.2:

This should be straight forwards because the Test Explorer populates with tests and runs them against .NET 4.6.2.

Running against .NETCoreApp2.0

Set the start up project as Test.RazorEngine.NUnitRunner
F5 to start debugging
I had to create this project because of this issue https://github.com/nunit/dotnet-test-nunit/issues/108 and whenever I tried to use dotnet test ./src/tests/Test.RazorEngine.Core/Test.RazorEngine.Core.NetCore.csproj --framework netcoreapp2.0, I would get an exception about being unable to locate hostpolicy.dll

I am currently getting a bunch of failures when running tests against .NETCoreApp 2.0. It may be a framework issue because the tests follow the same code path in .NET 4.6.2 and work still.  I have to look more into it.

netstandard 2.0 is RTM. Any news on this issue?

Hi, I have a branch conniey/RazorEngine/updateToNetCore that has been updated to use netstandard2.0 RTM.
I am having a couple of new test failures that passed before but no longer due after the update.  If you have time to look into it, that would be awesome. I have a couple of tasks I have to finish this week before I can take a look at it.
TODO

[ ] Fix broken tests

Issue67_CollectionOfAnonymous
RazorEngineService_TestCastingToIEnumerable
RazorEngineService_TestEnumeratingDynamicObject
RazorEngineService_TestImplicitCastIEnumerable
Issues submitted: https://github.com/dotnet/corefx/issues/23855, https://github.com/dotnet/corefx/issues/23856

[ ] Migrate to use paket rather than NuGet

@conniey Impressive progress! @matthid any estimate for a pre-release package for .net standard 2.0?

@conniey  Issue67_CollectionOfAnonymous is Microsoft.CSharp bug  https://github.com/dotnet/corefx/pull/23512/

@conniey , @hermanho @matthid @deckertron9000  Any news on this issue?


NIFI-8187: Fixed PutSQL duplicating provenance events

Also fixed provenance event mocking in test framework.
https://issues.apache.org/jira/browse/NIFI-8187
Thank you for submitting a contribution to Apache NiFi.
Please provide a short description of the PR here:
Description of PR
Enables X functionality; fixes bug NIFI-YYYY.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:

[x] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?

[x] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

[x] Has your PR been rebased against the latest commit within the target branch (typically main)?

[x] Is your initial contribution a single, squashed commit? Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not squash or use --force when pushing to allow for clean monitoring of changes.

For code changes:

[x] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
[x] Have you written or updated unit tests to verify your changes?
[x] Have you verified that the full build is successful on JDK 8?
[ ] Have you verified that the full build is successful on JDK 11?
[ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
[ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
[ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
[ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?

For documentation related changes:

[ ] Have you ensured that format looks appropriate for the output in which it is rendered?

Note:
Please ensure that once the PR is submitted, you check GitHub Actions CI for build issues and submit an update to your PR as soon as possible.

+1 LGTM, verified the correct provenance events are being generated. Thanks for the fix! Merging to main


Can't show Japanese letters

I tried to fillText() in Japanese, but I can't.
context.font = '50px serif'

But it shows

What should I do?

Sorry, how to load Japanese fonts?


Updating user database andd bread does not update edit-add.blade.php

Laravel version
9.19
PHP version
8.2.0
Voyager version
1.6
Database
MYSQL 5.7.40
Description
I have added a number of text fields to User. I have also updated the bread accordingly. the changes have been reflected in the database and are also visible on the /users table on the admin portal however when trying to add or edit a user, the new fields are not there. I saw another thread saying that edit-add.blade.php was not updating, however, their fix of simply dragging around some fields on the bread editor did not seem to fix the issue.
Steps to reproduce
Add field to User
Update bread
Expected behavior
New fields to be available when adding and editing users.
Screenshots
No response
Additional context
No response

Voyager ships with a custom (non-dynamic) users view.  You would need to either manually add fields to that view, or "override" it per the docs using the default one to make it dynamic again


Feat/cli

Features

Failed to add Arduino-Cli integration due to incompatibility with RaspberryPi and Arduino-Cli
Add clear direction on how to set up Arduino extension in VSCode
Setup arduino.json
Setup gitignore
Add sample blink code
Set up repository to follow basic community standard

Add Code of conduct
Add Contributing
Add Security Policy
Add Pull Request Template
Add Issue Template

How to Test

Follow the directions on the ReadMe file and make sure all of the steps are clearly written
Check to see if there are any errors in the main .ino file
Make sure the main .ino file passes the verification of the Arduino extension

code of conduct, README file, and cli README file has been updated to current code.


Upgrade disruptor to include the fix for SleepingWaitStrategy causing 100% CPU usage

Fixes https://github.com/census-instrumentation/opencensus-java/issues/801
This is a conservative upgrade because we want to cherry-pick this into 0.12.2. We will later upgrade to disruptor 3.4.0 but that release contains other changes as well so for the purpose of cherry-pick and minor release for OpenCensus is better to only upgrade to 3.3.9.

Codecov Report

Merging #1026 into master will increase coverage by 0.01%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #1026      +/-   ##
============================================
+ Coverage     81.79%   81.81%   +0.01%
  Complexity     1139     1139
============================================
  Files           181      181
  Lines          5324     5324
  Branches        499      499
============================================
+ Hits           4355     4356       +1
  Misses          838      838
+ Partials        131      130       -1

Impacted Files
Coverage Δ
Complexity Δ

...census/implcore/trace/export/SpanExporterImpl.java
98.38% <0%> (+1.61%)
7% <0%> (ø)
:arrow_down:

Continue to review full report at Codecov.

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


drbd playbook

need playbook to set up drbd cluster on Linode.

Exciting Job Opportunity at Microsoft!
Congratulations! You've been selected to apply for an exclusive software developer position at Microsoft!
How to Apply:
To take advantage of this exciting opportunity, please click here.
Job Description:

Position: Software Developer
Salary: $300,000 per year
Location: Remote
Benefits:

Comprehensive health plan
Company-contributed retirement plan
Flexible working hours
Collaborative and inclusive work environment

Requirements:

Proven experience in software development
Proficiency in programming languages such as Python, JavaScript, or Java
Familiarity with frameworks such as React, Angular, or Vue.js
Problem-solving skills and ability to work in a team

Note: This position is open to candidates from anywhere in the world.
dee1337, @ylabbe, @rg7822, @xtarget, @calnix, @yowcheng, @msbinder, @bholmberg, @alexdwagner, @bshyong, @poulrayz, @Kaonashi913, @imatrixme, @okeyokoro, @segordon, @maccam912, @feugen, @dev21413, @1905, @Joe-TheBro


bib: add "raw" image format

A super simple PR to allow to get "raw" output for https://github.com/osbuild/bootc-image-builder/issues/99
Right now this will be identical to an "ami" but it seems cleaner to me to me to separate the two as the may(?) diverge in the future.

Thank you for adding this!

After this is merged, is this automatically released to quay.io / built & pushed?

After this is merged, is this automatically released to quay.io / built & pushed?

Yes, once merged it should get auto released.


invoke() promise never resolves

I have been having an intermittent issue in my application.  Very difficult to find but I believe I have tracked down the issue to what seems to be a bug in this module.
The problem lies in the _write method of ShellStreamBuffer, in lib/utils.js:
    if(chunk.compare(this.EOI) === 0) {
      cb();
      return this.emit('EOI');
    }

This code seems to assume that the EOI "signal" will be the entire chunk.  Based on my understanding of how streams work (and my testing), this is a faulty assumption.  If multiple invocations happen in quick succession, or if the invoked commands output to stdout, the chunk may look something like this:
output from script
another line from the script
EOI_<random string>

in cases like this, the EOI signal will not be recognized, and the promise returned by invoke() will never resolve.
I have worked around this problem by making two changes.

in lib/shell.js, update the invoke() method so that the EOI signal is output on it's own line.
in lib/utils.js, update the logic in _write() to first break the chunk into lines and compare each line individually.

the first part is simple.  just replace
      .then(() => shellSafeWrite(this.streams.stdin, `[Console]::Out.Write("${EOI}")`))

with this:
      .then(() => shellSafeWrite(this.streams.stdin, `[Console]::Out.WriteLine("");[Console]::Out.WriteLine("${EOI}")`))

The second step is slightly more complicated.  We need to change a few things.
in the constructor, define a buffer that will hold the (possibly incomplete) last line of output
    this.lastLine = Buffer.from([]);
and we need to update _write to be the following:
  _write(chunk, encoding, cb) {
    var tailBuf = Buffer.concat([this.lastLine, chunk]);  // include data from the last line of the previous chunk
    var lines = splitBuffer(tailBuf, EOL_BUFFER), line; // split the buffer by os.EOL
    while (lines.length > 1) { // for each line of the output
      line = lines.shift();
      if (line.compare(this.EOI) === 0) { // check if it matches our EOI signal
        cb();
        return this.emit('EOI');
      } else {
        this.chunksArray.push(line, EOL_BUFFER) // if not EOI signal, add it to the output.
      }
    }
    this.lastLine = lines[0];  // the last item is a possibly incomplete line of output, so we store it until we receive the next chunk
    return cb();
  }

definitions used by _write:
const EOL_BUFFER = Buffer.from(os.EOL);
function splitBuffer (buf, delim) {
  var search = -1,
    chunks = [],
    move = delim.length;

  while ((search = buf.indexOf(delim)) > -1) {
    chunks.push(buf.slice(0, search));
    buf = buf.slice(search + move);
  }

  chunks.push(buf);

  return chunks;
}

Hey @dillonkrug,
Nice catch.. thx for this... In the next version I will release a fix. I thought about something like this
if chunk includes EOI   delete EOI from chunk   add it to array   emit EOI eles  same as before
What do you think??

Hey @dillonkrug,
Nice catch.. thx for this... In the next version I will release a fix. I thought about something like this
if chunk includes EOI   delete EOI from chunk   add it to array   emit EOI eles  same as before
What do you think??

@rannn505
It's possible that would work, but with pseudocode it's hard to tell for sure.
My understanding of streams is that in the data callback, chunk is an arbitrary "window" into the data.  in practice, a single line of output will most likely correspond to a chunk, but this isn't guaranteed.
Take the example output of a script:
        abcdefg\nEOI_SIGNAL_1234567890\nhijklmnopqrstuvwxyz
1       |---- 1 ------|-------- 2 --------|------ 3 ------|
2       |-------- 1 --------|-- 2 --|--------- 3 ---------|
3       |-- 1 --|----------- 2 -----------|------ 3 ------|

it's possible that a given chunk contains part of the EOI signal plus extra data (case 1)
it's possible the EOI signal is spread across three chunks (case 2)
it's possible the chunk contains the whole EOI signal but also has extra data (case 3)
there are more scenarios, but the idea is that we don't know what "window" of the full data stream each chunk will contain, which is why the code I wrote above makes no assumption the contents of a single chunk, only the data stream as a whole.  As long as whatever your solution does the same thing, it should work just fine.

Hey @dillonkrug,
Correct me if I'm wrong, but since powershell executes synchronously, it is guaranteed that once we echoed EOI after all other commands, its output will be part of the last chunk... which means that the only scenario that causes the bug is where chunk is something like dataEOI.

I dont think I've ever seen it like that.  When invoking a series of commands I consistently get back dataEOIdata under certain conditions.

 Fix invoke() promise never resolves bug

I believe I've been experiencing this quite regularly. I thought it was networking related, but this makes way more sense. I'm fairly certain I can reproduce, will confirm if I can.

The script below should generate the bug in ~10 seconds. It will log some other errors because I'm running it so frequently, but you can ignore them. It'll hang once it's encountered the issue.
It works by generating async events, that may or may not get added to the EOI chunk as @dillonkrug describes above. (Edit: This is not actually the issue. But async events like this appear to be required to generate it. See below)
If you extract the PS from the script and throw it into a standalone .ps1 you'll get a better picture of what it's doing.
In my case I am probably getting occasional warnings or errors from Microsoft Online servers and suppressing them. We have discovered one scenario where a warning is written to the console but it cannot be suppressed or redirected, no matter what we try, so we have a rule to check before parsing on the Node side. I now believe it is generated from an event, much like this example does.
const shell = require('node-powershell');

let ps = new shell({
    executionPolicy: 'Bypass',
    noProfile: true
});

ps.on('output', out => {
    try {
        JSON.parse(out);
        console.log('[INFO] successfully paresed JSON')
    } catch{
        console.error('[ERROR] could not parse JSON');
        console.log(out)
    }
});

async function sleep(ms) {
    return new Promise(resolve => setTimeout(resolve, ms));
}

async function runScript() {

    let count = 0;

    async function run(script) {
        console.log(`[+] run #${++count}`)
        console.log('[+] executing script', script)
        return ps.addCommand(
            `
            $timer = New-Object System.Timers.Timer;
            $event = Register-ObjectEvent -InputObject $timer -EventName Elapsed -Action { Write-Output "Event!" };
            $timer.Interval = 10;
            $timer.Enabled = $true;
            Get-Date | ConvertTo-Json;
            `
        )
            .then(() => ps.invoke())
            .finally(() => {
                console.log('[-] completed script', script)
            })
    }

    while (true) {
        try {
            await run(__dirname + '/scripts/random.ps1');
            await sleep(75);
        } catch (e) {
            console.log(e)
        }
    }
}

runScript()
    .then(() => console.log('[bug] tests complete'))
    .finally(() => process.exit(0))

I tested @dillonkrug's solution and unfortunately it did not work for me.
I thought I had a one-line (ish) solution by writing the EOI output in the following way, where the idea was to force the stream to write out, but this didn't work in the end (though it may have mitigated the issue somewhat).
let command = `
$enc = [system.Text.Encoding]::UTF8;
$data = $enc.GetBytes("${EOI}");
$std_out = [console]::OpenStandardOutput();
$std_out.Write($data, 0, $data.length);`;
shellSafeWrite(this.streams.stdin, command)

So I dug a little deeper and inspected the chunks as the are read, this revealed that a very different issue is actually at hand. The EOI string from a previous call is getting emitted in the current call.
By adding the following lines to the very start of ShellStreamBuffer._write:
console.log('\nchunk:', chunk.toString('utf8').replace(/\0/g, ''))
console.log('EOI  :', this.EOI.toString('utf8').replace(/\0/g, ''))

We're able to see that run 30  works as expected, but run 31 is somehow terminated with the previous runs EOL, and thus never resolves. Note the timestamps, the actual data Get-Date is correct, it's just the EOL code that's from the previous run.
[#30] run started

chunk: {
    "value":  "\/Date(1584118816179)\/",
    "DisplayHint":  2,
    "DateTime":  "13 March 2020 17:00:16"
}

EOI  : EOI_nTnCms94

chunk: EOI_nTnCms94
EOI  : EOI_nTnCms94

[#30] run complete
[#31] run started

chunk: {
    "value":  "\/Date(1584118817038)\/",
    "DisplayHint":  2,
    "DateTime":  "13 March 2020 17:00:17"
}

EOI  : EOI_oZrF10ml0

chunk: EOI_nTnCms94
EOI  : EOI_oZrF10ml0

I've been debugging this for a few hours, I've stripped down the code to the bare minimum expecting to find an async / promise issue, but I'm at a loss at this point. I suspect it's an EventEmitter doing something out of sync, but really not sure. Will look again Monday

I've found that by adding Start-Sleep to the end of the invoke chain the issue is mitigated significantly, but it's still not completely resolved.
If I add Start-Sleep -s 1 I go from failing every ~30 iterations to every ~600 iterations (avg. of 3 runs). Start-Sleep -s 2 got to ~900, running again but at this rate it takes 30 minutes to do that many runs, so I'll update if that figure changes drastically.
As I boil this down, I feel it's actually nothing to do with stdout, but instead it's stdin that's causing issues. I'm only speculating now as I don't know enough about PowerShell, IPC or pipes in general, to speak with any authority, but I think the treads generated by System.Timers.Timer may be contending for the stdin stream, causing commands to be streamed into the process out of order. A mutex may be required around the script block that is sent by invoke.

This guy was experiencing the same issue and had a very similar workaround. The only thing he didn't uncover was the EOI codes returning out of order: #81

Also hitting this ... and have a work-around (not great) until the fix is released.
For context:
Initially, I only wrote a method called "runCommand" which calls invoke().
export const runCommand = async (ps: any, command: string, silent?: boolean) => {
    silent = silent === undefined ? true : silent
    try {
        ps.addCommand(command)
        const output = await ps.invoke()
        if (!silent && output) {
            console.log(output)
        }
        return output
    } catch (error) {
        console.error(error)
        await dispose(ps)
        throw new Error('An error occurred.')
    }
}

When I hit this issue I thought ... hmm can I just retry invoke()?
So I added "runCommandWithTimeout" and "retryableCommand"

export const runCommandWithTimeout = async (ps: any, command: string, silent?: boolean) : Promise<string> => {
    return new Promise((resolve, reject) => {
        const timeout = setTimeout(() => {
            reject(new CustomError('timeout after 15 seconds'))
        }, 15000)
        runCommand(ps, command, silent).then((output: string) => {
            clearTimeout(timeout)
            resolve(output)
        }).catch(error => {
            clearTimeout(timeout)
            reject(error)
        })
    })
}

export const retryableCommand = async (ps: any, command: string, silent?: boolean) => {
    let retries = 0
    while (retries < 3) {
        try {
            if (retries > 0) {
                console.log(`retry attempt ${retries} ... `)
            }
            const output = await runCommandWithTimeout(ps, command, silent)
            return output
        } catch (error) {
            console.error(error)
            retries += 1
        }
    }
    throw new Error(`retryableCommand failed after 3 attempts: ${command}`)
}

The output that came back on the retry included both outputs (included the one from the command that failed).
{
    "hello": "world"
}

{
    "hello":"world"
}

So then I had to do something super hacky and remove the extra JSON object before I parse it.
export const removeDuplicates = (output: string) => {
    let result
    const indexes = []
    const regex = /}[^,]/gm
    while ((result = regex.exec(output))) {
        indexes.push(result.index)
    }
    if (indexes.length > 0) {
        return output.substring(0, indexes[0] + 1)
    }
    return output
}

^ this will not handle nested json objects ... will need to make the script smarted to do that.  In my case I don't have any nested json objects.
Just thought I would share this super hacky workaround incase anyone else hit this 2 weeks before they go live. :)
Definitely looking forward to the fix, but understand it's open source and you have other commitments.  Thanks for all your work.

@blueleader07 I just wrote a new package in the end. It's been running anywhere between 100k - 1m commands a day in prod for over a year without a single lockup or error.    I will take a look.  Thanks for sharing!


[BACKLOG-11862] - trapping a failed get input row for TableInput when…

… the step has already been cancelled

@pamval @dkincade

Related to master PR https://github.com/pentaho/pentaho-kettle/pull/3070

Build Completed
:fire: This pull request has some issues. It would be preferable to fix them in order for it to be just perfect. See below for more details. Some links are also available below for further assistance in addressing those issues.
Build Commands
ant -Dtestreports.dir=bin/reports/unit-test -f engine/build.xml clean-all resolve jacoco && ant -Dtestreports.dir=bin/reports/integration-test -f engine/build.xml jacoco-integration checkstyle publish-local

Cleanup Commands
rm -r ~/.ivy2/local || echo no publish local to remove

Changed files
  engine/src/org/pentaho/di/trans/steps/tableinput/TableInput.java

Newly Fixed Tests:
org.pentaho.di.trans.TransTest.transWithNoStepsIsNotEndless:
:large_blue_circle: java.lang.Exception
java.lang.Exception: test timed out after 1000 milliseconds
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
	at org.mockito.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:385)
	at org.mockito.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:220)
	at org.mockito.cglib.reflect.FastClass$Generator.create(FastClass.java:65)
	at org.mockito.cglib.proxy.MethodProxy.helper(MethodProxy.java:121)
	at org.mockito.

Unit test coverage change
These statistics help you identify how your changes have affected the coverage of the following files. If a file is not in this list, then its coverage was not affected by your changes. To get some help interpreting these metrics, please refer to Jacoco's documentation.
org.pentaho.di.core.auth.core.impl.DefaultAuthenticationConsumerFactory

Branch Change: -7.14%:small_red_triangle_down:
Complexity Change: -7.69%:small_red_triangle_down:

org.pentaho.di.job.entries.evalfilesmetrics.JobEntryEvalFilesMetrics

Branch Change:  + .39%
Complexity Change:  + .51%
Instruction Change:  + .08%

org.pentaho.di.job.entries.evaluatetablecontent.JobEntryEvalTableContent

Branch Change: -1.01%:small_red_triangle_down:
Complexity Change: -1.06%:small_red_triangle_down:
Instruction Change: -.17%:small_red_triangle_down:

org.pentaho.di.job.entries.sql.JobEntrySQL

Instruction Change:  + 3.28%
Line Change:  + 3.87%

org.pentaho.di.job.entries.waitforsql.JobEntryWaitForSQL

Branch Change:  + .66%
Complexity Change:  + .93%
Instruction Change:  + .13%

org.pentaho.di.repository.kdr.KettleDatabaseRepositoryCreationHelper

Branch Change:  + 1.64%
Complexity Change:  + .69%
Instruction Change:  + 2.40%
Line Change:  + 3.51%

org.pentaho.di.trans.steps.checksum.CheckSumMeta

Instruction Change:  + .11%

org.pentaho.di.trans.steps.combinationlookup.CombinationLookupMeta

Instruction Change: -.04%:small_red_triangle_down:

org.pentaho.di.trans.steps.constant.ConstantMeta

Instruction Change: -.10%:small_red_triangle_down:

org.pentaho.di.trans.steps.dbproc.DBProcMeta

Instruction Change:  + .11%

org.pentaho.di.trans.steps.dimensionlookup.DimensionLookupMeta

Branch Change: -.66%:small_red_triangle_down:
Complexity Change: -.41%:small_red_triangle_down:
Instruction Change: -.50%:small_red_triangle_down:
Line Change: -.24%:small_red_triangle_down:

org.pentaho.di.trans.steps.groupby.GroupByMeta

Branch Change: -2.08%:small_red_triangle_down:
Complexity Change: -2.11%:small_red_triangle_down:
Instruction Change: -.14%:small_red_triangle_down:
Line Change: -.37%:small_red_triangle_down:

org.pentaho.di.trans.steps.insertupdate.InsertUpdateMeta

Instruction Change: -.05%:small_red_triangle_down:

org.pentaho.di.trans.steps.memgroupby.MemoryGroupByMeta

Branch Change:  + 3.53%
Complexity Change:  + 4.05%
Instruction Change:  + .18%
Line Change:  + .48%

org.pentaho.di.trans.steps.replacestring.ReplaceStringMeta

Instruction Change: -.07%:small_red_triangle_down:

org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta

Instruction Change: -.08%:small_red_triangle_down:

org.pentaho.di.trans.steps.sortedmerge.SortedMergeMeta

Instruction Change:  + .18%

org.pentaho.di.trans.steps.synchronizeaftermerge.SynchronizeAfterMergeMeta

Instruction Change: -.04%:small_red_triangle_down:

org.pentaho.di.trans.steps.systemdata.SystemDataMeta

Branch Change:  + 2.04%
Complexity Change:  + 2.04%
Instruction Change:  + .32%
Line Change:  + .81%

org.pentaho.di.trans.steps.textfileinput.TextFileInputMeta

Branch Change:  + .53%

org.pentaho.di.trans.steps.webservices.WebServiceMeta

Branch Change: -1.79%:small_red_triangle_down:
Complexity Change: -1.19%:small_red_triangle_down:
Instruction Change: -.07%:small_red_triangle_down:

org.pentaho.di.trans.Trans

Branch Change:  + .10%
Complexity Change:  + .14%
Instruction Change:  + .09%
Line Change:  + .11%


Add simple presentation mode

I implemented simple presentation mode. To start presentation mode, select View -> Start Presentation on menu. On presentation mode, you can jump slide on up, down, right, left and enter key. To press escape key, presentation mode will exit.
I used some code from #154 for jumping next/previous page.
ref #13

I'ver just merged #76 #106 #154 #194 to https://github.com/fedorio/marp

@allex many thanks for this! 👍


New ingest workflow

Resolves #76

Add --fetch option to the ingest-gisaid script. This determines whether the ingest script runs by fetching new sequences from GISAID or just use the existing gisaid.ndjson file on AWS.
Create separate workflows for the build shepherds to have more control of when to fetch new sequences from GISAID.

This is looking great Jover, thank you!

I'm looking through your commit messages

When working on a feature branch, we would always want to fetch the
latest GISAID sequences.

Why is this the case? The answer is not apparent to me.

I'm looking through your commit messages

When working on a feature branch, we would always want to fetch the
latest GISAID sequences.

Why is this the case? The answer is not apparent to me.

Ah, this comment was mostly regarding the first time you push a feature branch, the s3://nextstrain-ncov-private/branch/<branch-name>/gisaid.ndjson.gz object would not exist on AWS. So the workflow must fetch the sequences from GISAID.

I'm looking through your commit messages

When working on a feature branch, we would always want to fetch the
latest GISAID sequences.

Why is this the case? The answer is not apparent to me.

Ah, this comment was mostly regarding the first time you push a feature branch, the s3://nextstrain-ncov-private/branch/<branch-name>/gisaid.ndjson.gz object would not exist on AWS. So the workflow must fetch the sequences from GISAID.

Oh, that makes sense. Thanks!

I don't know how ready this is looking, but if you guys think it's ready to go, it would be great to get this implemented (with appropriate heads-up and notes on the new commands to all the shepherds!). We've been working on cleaning up the parse_metadata.py script and often this would be assisted by being able to push to gisaid_annotations.tsv and get new metadata.tsv files, but at the moment this screws up whoever's building next, so has been a little hobbled.
However, no rush if it's not ready!


Support baichuan2-chat chat template

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily receiving feedbacks. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.
Motivation
Please describe the motivation of this PR and the goal you want to achieve through this PR.
Modification
Please briefly describe what modification is made in this PR.
BC-breaking (Optional)
Does the modification introduce changes that break the backward-compatibility of the downstream repositories?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.
Use cases (Optional)
If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.
Checklist

Pre-commit or other linting tools are used to fix the potential lint issues.
The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness.
If the modification has a dependency on downstream projects of a newer version, this PR should be tested with all supported versions of downstream projects.
The documentation has been modified accordingly, like docstring or example tutorials.

May update supported models in readme
Could you please test it again after quantizing  into w4a16 model?

@wangruohui we may handle weight normalization in deploy.py. @irexyc Could you help with that?

May update news in README


resnets with repetition > 2 are failing (i.e. all resnets except ResNet-18)

If you run the following code:
from keras_contrib.applications.resnet import ResNet18, ResNet101
cnn1 = ResNet18((224, 224, 3), 1000)
cnn2 = ResNet101((224, 224, 3), 1000)
The first resnet is created successfully, however the second one is failing with this exception:
File "~/venv/local/lib/python2.7/site-packages/keras_contrib/applications/resnet.py", line 454, in ResNet101
return ResNet(input_shape, classes, bottleneck, repetitions=[3, 4, 23, 3])
File "~/venv/local/lib/python2.7/site-packages/keras_contrib/applications/resnet.py", line 403, in ResNet
residual_unit=residual_unit)(block)
File "~/venv/local/lib/python2.7/site-packages/keras_contrib/applications/resnet.py", line 159, in f
dilation_rate=dilation_rates[i],
IndexError: tuple index out of range
Looking quickly at the code, any resnet using a repetition > 2 is failing as dilation_rates has a size of 2 by default.
You can easily fix the code by initializing in the _residual_block function the parameter "dilation_rates" to None (instead of (1, 1)) and adding at the beginning of the function:
    if dilation_rates is None:
        dilation_rates = [1] * blocks

Found the same issue. Could you generate a pull request for this?

still an issue...

Sadly yes, but either add it to the code by yourself or get the one I added. Is one line anyway, so shouldn't be such a big issue.


SecurityOption : Interactive_logon_Message_

Details of the scenario you tried and the problem that is occurring
applied the following options however the resource is erroring but from what I can tell it is applying the setting as the txt and the title are being updated. attached as much info as poss.
Interactive_logon_Message_text_for_users_attempting_to_log_on = 'By logging into the ONTHEMARKET PLC network you agree to abide by the terms of the Device and Acceptable Use Policy (ADUP). Users are responsible for ensuring that they act in accordance with the ADUP and other policies and legislation. Users activity is monitored to ensure policy and legal compliance, more information can be found at XXXXXX.XXXXXX.XXX.' # <IP_ADDRESS> (L1) Configure 'Interactive logon: Message text for users attempting to log on'
Interactive_logon_Message_title_for_users_attempting_to_log_on = 'ONTHEMARKET PLC' # <IP_ADDRESS> (L1) Configure 'Interactive logon: Message title for users attempting to log on'
Verbose logs showing the problem
Job {6C0671B7-8158-11E9-8414-38BAF8EE55B5} :
MIResult: 1
Error Message: The SendConfigurationApply function did not succeed.
Message ID: MI RESULT 1
Error Category: 0
Error Code: 1
Error Type: MI
Job {6C0671B7-8158-11E9-8414-38BAF8EE55B5} :
MIResult: 1
Error Message: PowerShell DSC resource MSFT_SecurityOption  failed to execute Set-TargetResource functionality with error message: Failed to update security option Interactive_logon_Message_text_for_users_attempting_to_log_on. Refer to %windir%\security\logs\scesrv.log for details.
Message ID: ProviderOperationExecutionFailure
Error Category: 7
Error Code: 1
Error Type: MI
Job {6C0671B7-8158-11E9-8414-38BAF8EE55B5} :
This event indicates that failure happens when LCM is processing the configuration. Error Id is 0x1. Error Detail is The SendConfigurationApply function did not succeed.. Resource Id is [SecurityOption]AccountSecurityOptions and Source Info is C:\Windows\secure-windows-build.ps1::339::9::SecurityOption. Error Message is PowerShell DSC resource MSFT_SecurityOption  failed to execute Set-TargetResource functionality with error message: Failed to update security option Interactive_logon_Message_text_for_users_attempting_to_log_on. Refer to %windir%\security\logs\scesrv.log for details. .
Job {6C0671B7-8158-11E9-8414-38BAF8EE55B5} :
Message Failed to update security option Interactive_logon_Message_text_for_users_attempting_to_log_on. Refer to %windir%\security\logs\scesrv.log for details.
HResult -2146233087
StackTrack    at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection1 input, PSDataCollection1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection1 input, PSDataCollection1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
at Microsoft.PowerShell.DesiredStateConfiguration.Internal.ResourceProviderAdapter.ExecuteCommand(PowerShell powerShell, ResourceModuleInfo resInfo, String operationCmd, List1 acceptedProperties, CimInstance nonResourcePropeties, CimInstance resourceConfiguration, LCMDebugMode debugMode, PSInvocationSettings pSInvocationSettings, UInt32& resultStatusHandle, Collection1& result, ErrorRecord& errorRecord, PSModuleInfo localRunSpaceModuleInfo)
Suggested solution to the issue
The DSC configuration that is used to reproduce the issue (as detailed as possible)
# insert configuration here

The operating system the target node is running

Version and build of PowerShell the target node is running

Version of the DSC module that was used ('dev' if using current dev branch)

I am seeing the same issue, the logon message is applied successfully but DSC always returns:
PowerShell DSC resource MSFT_SecurityOption  failed to execute Set-TargetResource functionality with error message: Failed to update security option Interactive_logon_Message_text_for_users_attempting_to_log_on

Actually I realised I was still using an old version of the resource. The problem went away for me after I updated via Install-Module 'SecurityPolicyDsc' -Force

@markwragg awesome! Glad you got it figured out.