enable inlining of functions with try/catch

Currently it is disabled but I don't see a reason why it can't be relatively easily enabled.
Famous last words - there is some complexity around properly wiring up blocks after inlining because of how we represent catch-blocks. Inlining a function with try-catch completely breaks the dominator tree. We have attempted it but it requires more work than anticipated.

Inlining a function with try-catch completely breaks the dominator tree.

Just to add a little more details here: once function with try-catch is inlined, its(callee) CatchBlockEntry instruction becomes a sibling of all other FunctionEntry/OsrEntry/CatchBlockEntry instructions that caller might have. So what used to be a local change to caller's graph https://github.com/dart-lang/sdk/blob/8637cbe26c322e11282d965c4941b01e4a0c3a3a/runtime/vm/compiler/frontend/flow_graph_builder.cc#L242, no longer is localized to caller's call site.
Callee's environments update https://github.com/dart-lang/sdk/blob/8637cbe26c322e11282d965c4941b01e4a0c3a3a/runtime/vm/compiler/frontend/flow_graph_builder.cc#L67 have to adjusted to ensure it doesn't just add call's environment to CatchBlockEntry block instructions.
Caller's own Parameters(specified in its existing Function/Osr/CatchBlock entries) have to be added to the CatchBlockEntry coming from the callee, and those have to be added to the environments, probably to the outer environment scope indicating that their correspond to the caller's frame. Appropriate Join phi instructions need to be added to merge caller's parameter after callee catch block.

We have attempted it but it requires more work than anticipated.

@mraleph curious, do you have any artifacts left from previous attempts?

CatchBlockEntry is considered to be another entry point. That means all variables that were part of Call inlined instruction environment(meaning they are used downstream from the Call) need to be coming as Parameters defined in this CatchBlockEntry.
In the join block where catch-block flow joins normal non-throwing flow, CatchBlockEntry Parameters need to be merged with normal flow environment variables via phi instructions. Merging phi instructions introduce new variables. Use of original environment variables need to be replaced with use of those new variables.
Straight replacement of uses can only be done in blocks that are dominated by the Call instruction. For the uses that are not dominated by the Call instruction, new join phis need to be added joining new CatchBlockEntry-originated variable with original variable at join blocks(presence of such join blocks is the reason why the Call does not dominate the use). This has to be done sequentially at all join blocks along the path propagating newly introduced phi variables all the way down to the use of the variable duplicated as CatchBlockEntry parameter.

Unfortunately I don't think we retained any code from previous attempts. I have been thinking more about this and I have the following idea: we should consider changing our representation of try-catch by introducing a separate TryEntryBlock and hang corresponding CatchBlockEntry from this block, rather than hanging all of catches as successors of GraphEntryInstr. This would make dominator tree match closer the original source and will also mean that inlining does not have to do strange non-local rewiring of blocks. This also unlocks some redundancy elimination optimizations which are currently suppressed by the fact that catch-block messes up the dominance. We might need some changes in the register allocator (to make sure that values live on entry to the catch are correctly spilled / restored).

/cc @alexmarkov @mkustermann see the comment above.

by introducing a separate TryEntryBlock and hang corresponding CatchBlockEntry from this block, rather than hanging all of catches as successors of GraphEntryInstr.  This would make dominator tree match closer the original source and will also mean that inlining does not have to do strange non-local rewiring of blocks.

When inlining we still will have to add call-environment variables coming from the caller to caller's entry block as Parameters and properly join them as control flow from caller and callee merges, right?

When inlining we still will have to add call-environment variables coming from the caller to caller's entry block as Parameters and properly join them as control flow from caller and callee merges, right?

This should not be necessary because we no longer break graph dominance by inlining a function with try catch and no new merge points for variable values appear. The catch block also will only have Parameters which correspond to local variables of the function which introduced that catch block (more specifically it should only have Parameters for variables assigned inside the try).
Let me try to illustrate it by an example. Consider Dart code like this:
void foo() {
  var v = f();
  var u = f();
  try {
    f();
    v = f();
  } catch (e) {
  }
  print(v);
  print(u);
}

This function will have the following graph:
B0:
  v1 <- f()
  v2 <- f()
  Goto B1

B1[TryEntry]:
  Goto B2 Catches [B3]

B2:
  f() env = { v: v1, u: v2 }
  v3 <- f() env = { v: v1, u: v2 }
  Goto B4

B3[Catch]:
  v4 <- Parameter(v)
  Goto B4

B4[Join]:
  v5 <- Phi(v3, v4) // Phi for variable v
  print(v5) // print(v)
  print(v2) // print(u)

We can take this graph and inline it into another function which calls foo without breaking control flow in the way the current representation requires us to break it.
One thing we, of course, would need to change is how catch entry moves work: if you catch in the inlined code you need to use appropriate environment (not necessarily a top level one) to populate Parameter scratch space.

@aam jus wanted to follow up on this. I have been basically looking through code generation inside Flutter framework and I can see occasionally places where changing try/catch representation in our CFG would improve code quality (and reduce code size), irrespective of actual inlining, so I wanted to check if you are working on this or we decided to pant on it?
I am happy to VC if you need you want to discuss this more.

Looks like compilation to OSR should be updated to include try-catch blocks that enclose target osr instruction - currently all catch blocks are hanging off the graph-entry, so implicitly remain reachable https://github.com/dart-lang/sdk/blob/main/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc#L888.

With new representation of catch blocks, we might need to update all graph traversals through predecessors/successors to make sure catch blocks are properly reachable when at least one basic block in the try body is reachable.
So might need to update at least:

FlowGraph::DiscoverBlocks
FlowGraph::ComputeDominators
BlockEntryInstr::FindOsrEntryAndRelink (as @aam mentioned above)
ConstantPropagator::VisitGraphEntry and visitors for try block entries such as VisitJoinEntry / VisitTargetEntry.
Maybe WriteBarrierElimination, LivenessAnalysis, DelayAllocations, etc.

Maybe it makes sense to create a separate TryBlockEntry IL instruction to better reflect try-catch structure in the CFG, and put both try body and CatchBlockEntry as successors of TryBlockEntry. This way most CFG traversals through successors/predecessors should still work without additional changes.

catch blocks used to be independent of surrounding data-flow. All data into them flown via parameters, so those blocks could just be always-present successors of graph entry. That meant that exception handlers were always generated regardless of where OSR graph jumped into, how much of original graph remained in OSR-version. The challenge now is how to include those catch-blocks with their try-blocks since those are woven in into normal flow graph with phi-instructions.
try-catch structure in my prototype looks like this
B1[function entry]:2 <-1:-1>
    ...
    goto:60 B3
B3[try_entry]:58 try_block:[B4] catches:[B9]
B4[target try_idx 0]:62
    ...
    goto:96 B5
B9[catch] <-1:-1>
    t0 <- LoadLocal(:saved_try_context_var0 @-1)
    StoreLocal(:current_context_var @0, t0)
    t0 <- LoadLocal(:exception0 @-2)
    ...
    goto:108 B5
B5[join]:64 pred(B8, B9)
    ...

I see, you already added TryEntry instruction.
If catch block is listed among successors of TryEntry, then BlockEntryInstr::FindOsrEntryAndRelink should be able to traverse the whole CFG and find suitable place to add OsrEntry. OSR doesn't really prune flow graph, it just replaces normal entry with OSR entry which points into the middle of a graph. The rest of the cleanup happens by discovering only reachable blocks during CFG traversal in FlowGraph::DiscoverBlocks. Note that we're not guaranteed to discover original TryEntry block (it may be unreachable), so we should probably insert new TryEntry instruction(s) between OSR entry and OSR target instruction in BlockEntryInstr::FindOsrEntryAndRelink to make sure we properly enter try blocks during OSR entry. As an additional complication, both original TryEntry and new OSR TryEntry may be reachable, so we might need to support try blocks with multiple TryEntry blocks - CatchBlockEntry might have multiple corresponding TryEntry predecessors.


Enable build validation for each push on main branch

Enable build validation for each push on main branch - merge CI_dev

Remove unnecessary commit and merge with 1


Fix analyse redirect

In this PR I had fixed issue #1792
Due to we don't have access to FTP server, I inserted again 'analyse' page which redirects to Analysis page. Without access to the FTP server, I think this is the only one solution.

@Ein-Tim
For me the prod workflow shows as finished now. 👍🏻
It was retriggered was successful the second time.


fix: Update DownloadDirectoryCommand to handle non existent directories gracefully

Description
Update DownloadDirectoryCommand to handle non existent directories gracefully
With the V4 change of no initializing the collections by default, DownloadDirectoryCommand throws null reference exception when trying to download a non existent directory since listResponse.S3Objects collection is set to null.
This PR fixes that by checking if listResponse.S3Objects is not null before enumeration.

Motivation and Context
#DOTNET-7682

Testing

Ran S3 unit and integration tests locally.
Added DownloadNonExistentS3Directory test to validate this fix.

Screenshots (if appropriate)
Types of changes

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

Checklist

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

License

[x] I confirm that this pull request can be released under the Apache 2 license

I don't think we have unit tests, but doesn't this also impact the S3.IO classes (https://github.com/aws/aws-sdk-net/tree/main/sdk/src/Services/S3/Custom/_bcl/IO)? There are calls to ListObjects and ListBuckets there too.

I don't think we have unit tests, but doesn't this also impact the S3.IO classes (https://github.com/aws/aws-sdk-net/tree/main/sdk/src/Services/S3/Custom/_bcl/IO)? There are calls to ListObjects and ListBuckets there too.

Looked at S3.IO classes and it looks like they handle null lists properly, however I've found an issue in GetAllObjectKeys which I fixed in  https://github.com/aws/aws-sdk-net/pull/3427/commits/6b55776827d392602a5e82879166f8cb8c4e727f.

What about the PaginatedResourceFactory (e.g. in https://github.com/aws/aws-sdk-net/blob/main/sdk/src/Services/S3/Custom/_bcl/IO/S3DirectoryInfo.cs#L277)? Does it handle null collections in the response properly?

What about the PaginatedResourceFactory (e.g. in https://github.com/aws/aws-sdk-net/blob/main/sdk/src/Services/S3/Custom/_bcl/IO/S3DirectoryInfo.cs#L277)? Does it handle null collections in the response properly?

Nope it didn't, I had make this change to fix it https://github.com/aws/aws-sdk-net/compare/6b55776827d392602a5e82879166f8cb8c4e727f..f289bbbd39a792ab73f03717d04accf3ae1be7f5
I'm not sure if this is the right approach though since we are trying to eliminate the empty lists creation, but the problem here is that by default we return an enumerator that isn't null but the underline list is null, which will require many changes in the PaginatedResource to fix and I might miss some corner cases, also the PaginatedResource isn't widely used in the SDK anyway.

Nope it didn't, I had make this change to fix it https://github.com/aws/aws-sdk-net/compare/6b55776827d392602a5e82879166f8cb8c4e727f..f289bbbd39a792ab73f03717d04accf3ae1be7f5 I'm not sure if this is the right approach though since we are trying to eliminate the empty lists creation, but the problem here is that by default we return an enumerator that isn't null but the underline list is null, which will require many changes in the PaginatedResource to fix and I might miss some corner cases, also the PaginatedResource isn't widely used in the SDK anyway.

I think your change makes sense. It is only in creating the empty collection as part of creating the paginator. I expect users of paginators to be wanting to simple iterate through the response not use paginators to check for existence or lack of any existence of resources.


Wait for service availability at the ingress before running tests

This commit makes the RestateDeployer wait for the availability of registered
services at the ingress. The deployer checks whether the ingress is serving
the registered services via calling grpc.health.v1.Health/Check and checking
that the response contains status = SERVING.
This fixes https://github.com/restatedev/e2e/issues/266.

ping @slinkydeveloper

Is this still relevant?

I think technically yes once we go distributed. Right now it just happens to not be needed because of the single process setup. I guess we no longer have the health service which we can call to check for the registered services. Is there another way at the Ingress to figure out whether a service is known with the new ingress?

I guess we no longer have the health service which we can call to check for the registered services. Is there another way at the Ingress to figure out whether a service is known with the new ingress?

GET /restate/health returns back the list of available components

Closing since the PR is currently not needed and quite out of sync with the current code base.


Can't load Mod

[Error  : Unity Log] BadImageFormatException: Could not resolve field token 0x040000e7, due to: Could not load type of field 'MysticsItems.Main+<>c:<>9__6_0' (1) due to: Could not resolve type with token 0100006d (from typeref, class/assembly On.RoR2.ContentManager, MMHOOK_Assembly-CSharp, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null) assembly:MMHOOK_Assembly-CSharp, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null type:On.RoR2.ContentManager member:(null) signature: assembly:C:\Users\Jaccoon\AppData\Roaming\Thunderstore Mod Manager\DataFolder\RiskOfRain2\profiles\Default\BepInEx\plugins\TheMysticSword-MysticsItems\MysticsItemsPlugin.dll type:<>c member:(null) signature:
Stack trace:
MysticsItems.MysticsItemsPlugin.Awake () (at <3aa45e2e023e4aa28b9cf60d4dc75531>:IL_0017)
UnityEngine.GameObject:AddComponent(Type)
BepInEx.Bootstrap.Chainloader:Start()
UnityEngine.Application:.cctor()
RoR2.Console:RegisterLogHandler()

+1
seems like most item mods are not working rn. (Classic items, Mysticsitems, and Sivsitems all aren't working currently)
[Info   :   BepInEx] Loading [MysticsItems 1.1.7]
[Error  : Unity Log] BadImageFormatException: Could not resolve field token 0x040000e7, due to: Could not load type of field 'MysticsItems.Main+<>c:<>9__6_0' (1) due to: Could not resolve type with token 0100006d (from typeref, class/assembly On.RoR2.ContentManager, MMHOOK_Assembly-CSharp, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null) assembly:MMHOOK_Assembly-CSharp, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null type:On.RoR2.ContentManager member:(null) signature: assembly:C:\Users\redsc\AppData\Roaming\r2modmanPlus-local\RiskOfRain2\profiles\Default\BepInEx\plugins\TheMysticSword-MysticsItems\MysticsItemsPlugin.dll type:<>c member:(null) signature:
Stack trace:
MysticsItems.MysticsItemsPlugin.Awake () (at <3aa45e2e023e4aa28b9cf60d4dc75531>:IL_0017)
UnityEngine.GameObject:AddComponent(Type)
BepInEx.Bootstrap.Chainloader:Start()
UnityEngine.Application:.cctor()
RoR2.Console:RegisterLogHandler()
[Message:   BepInEx] Chainloader startup complete


Add documentation for k8s RBAC configuration

This PR add documentation and manifest example to use Traefik with k8s 1.6+ and RBAC enabled

Tests green, merging!

Refs #1379.


drawer overlaps table

Steps to Reproduce

Visit, for example, https://ocw-draft-qa.global.ssl.fastly.net/courses/6-006-introduction-to-algorithms-spring-2020/pages/resource-index/

Expected Behavior

The table header shouldn't overlap the drawer
The "Hide Course Info" button should line up with the edge of the drawer

Actual Behavior

the table header overlaps the edge of the drawer
the "Hide Course Info" button extends above the top edge of the drawer.

Screenshot or Screencast

I'm only seeing this behavior now in Safari.
https://ocw-draft-qa.global.ssl.fastly.net/courses/6-006-introduction-to-algorithms-spring-2020/pages/resource-index/

We removed the vertical drawer button in the course-v2 theme


yii\web\User::loginRequired() should use UnauthorizedHttpException instead of ForbiddenHttpException

What steps will reproduce the problem?
ajax request call yii\web\User::loginRequired() to throw a ForbiddenHttpException
What is the expected result?
throw a UnauthorizedHttpException
What do you get instead?
let the client handle the non logged in interaction better
Additional info

Q
A

Yii version
2.0.14

PHP version
7.1.12

Operating system
Centos 7.0

The exception is not raised if there is no Accept header or if the header contains text/html or application/xhtml+xml in it. This behavior could be altered via yii\web\User::$acceptableRedirectTypes and via $checkAcceptHeader argument in yii\web\User::loginRequired() calls.
> await fetch('/loginRequired', {headers: {Accept: 'text/html'}})
Response {url: "http://localhost/site/login", redirected: true, status: 200, statusText: "OK"}

> await fetch('/loginRequired', {headers: {Accept: 'application/json'}})
Response {redirected: false, status: 500, statusText: "Internal Server Error"}

I don't think, that Unauthorized exception is suitable here. RFC 7235 stands that Unauthorized status should be coupled with WWW-Authenticate header.

See https://github.com/yiisoft/yii2/pull/13829, https://github.com/yiisoft/yii2/issues/9846 and https://github.com/yiisoft/yii2/pull/7818.


Wagtailuserbar. Warning window position

There are problems with the positioning of the wagtailuserbar. The warning window is statically bound to one place. If when positioning right top or right bottom it can still be used, then when positioning userbar on the left side of the screen the warning appears in the middle of the screen on the right edge looks strange.
Steps to Reproduce

Start a bakerydemo project with docker-compose
Edit base.html: change {% wagtailuserbar %} to {% wagtailuserbar 'bottom-left' %}

I have confirmed that this issue can be reproduced as described on a fresh Wagtail project: yes (6.0rc1)

@BkPankaj step by step:

Copy repo https://github.com/wagtail/bakerydemo
Open project folder
Open base.html change {% wagtailuserbar %} to {% wagtailuserbar 'bottom-left' %}
In terminal run: docker compose up --build -d
If you have docker desktop, run in app-1 tab exec: python manage.py migrate if haven't, in project terminal: docker exec bakerydemo-app-1 python manage.py migrate
If you have docker desktop, run in app-1 tab exec: python manage.py load_initial_data if haven't, in project terminal: docker exec bakerydemo-app-1 python manage.py load_initial_data
Open in browser http://<IP_ADDRESS>:8000/admin login: admin password: changeme
Open in browser http://<IP_ADDRESS>:8000/
Done

@ACK1D Thank you for replying quickly.
I was able to recreate the issue after following all the steps you mentioned above.

If I'm not mistaken, your issue is related to the warning box appearing in the right and middle of the screen instead of being positioned according to the wagtailuserbar at the left top and left bottom. Am I correct?

May I work on this issue?

@noobCoderVP Yes, anyone is free to work on any issue, no need to ask.

Hi, I would like to work on this issue.
Is there a simple way to trigger a warning in the bakery demo project?

@anees-asghar if you go to http://localhost:8000/breads you should be able to see one error about skipping heading levels.

@laymonage Although that warning does not appear for me in the "breads" endpoint, I realised I can open the warning box manually from the user bar, which is what I wanted. Thank you for the help.
I was able to reproduce the issue following @ACK1D's instructions.

Hello, just to update on the progress and on my approach to fixing the issue.
The wagtailuserbar tag supports a parameter position (valid values for which are top-right, top-left, bottom-right and bottom-left). Based on the value of this parameter, I pass a parameter dialog_position ("left" or "right") when instantiating AccessbilityItem. The AccessbilityItem then uses this to render the accessibility dialog on the left or right edge of the screen.
I ran into a hurdle because AccessbilityItem class can be overridden by wagtail users (bakerydemo does this) and users can replace the AccessbilityItem by their custom version, which doesn't have access to the dialog_position inherited from the user bar.
My solution to this is to make dialog_position attribute behave like a static attribute of AccessbilityItem and allowing instantiation of AccessbilityItem with or without dialog_position. If dialog_position is provided when instantiating, the static attribute is modified with the new value.
This ensures that the accessibility dialog follows the position of the user bar, as well as allows users to instantiate their custom overridden accessibility item like they would normally.
I was able to implement this solution locally and I get the expected behaviour. All tests still pass. I am working on adding tests to complement this fix.
Any input is appreciated :)


Enable code coverage

Resolves #14427 by limiting reports to a single service directory (CIs) or per test project (dev environments). For CIs, full coverage reports of everything build will be uploaded. For dev environments, a summary HTML file will be output to test projects' TestResults directories.

The current set of changes LGTM. I'll keep an eye on the incoming changes.

Once done, it will show code coverage stats for the service directory (i.e. netcoreapp2.1 test run):

Is there any guidance or doc that talks about what the accepted  code coverage x% should be for a library? or what we are aiming for?

I'd prefer not to rename the EventProcessor<TPartition> file for Event Hubs, as it could easily be confused with the EventProcessorClient since both are often referred to as just "the event processor."   The current name is following a standard convention for disambiguating generic types in .NET.   Can you help me understand why the change is being proposed?

It there a way we can exclude shared code files like Azure.Core.Argument from the coverage for non-core projects?

I'd prefer not to rename the EventProcessor<TPartition> file for Event Hubs, as it could easily be confused with the EventProcessorClient since both are often referred to colloquially as "the event processor." The current name is following a standard convention for disambiguating generic types in .NET. Can you help me understand why the change is being proposed?

Pavel's response answers this; while it's unfortunate, the selected rename seems like the best choice given the constraints.

Once done, it will show code coverage stats for the service directory (i.e. netcoreapp2.1 test run):

Any chance that we can break this down by pipeline or individual library?   My concern is trying to remove the stats for T1 and management libraries which we don't own.   If we're already scoped to pipeline, than the forthcoming work to split out the T1 libraries into their own pipeline will take care of this.

@jsquire T1 is not covered - only T2. You can get individual package coverage in 1 of 2 ways:

From browsing to the assembly in the PR report from the Code Coverage tab.
From running dotnet test /p:CollectCoverage=true locally for your project or solution. In that case, you get 1 report per assembly - still only T2. That is covered in the CONTRIBUTING.md file changes so I encourage everyone to read that and let me know if it needs clarification.

@maririos 70% or better is what @AlexGhiondea would like. Eventually, I will enable build breaks for anything less and file exceptions, but this PR alone took way longer than expected due to lots of significant problems in third-party and even first-party (often causing issues with third-party) packages. This PR is only focused on reporting. I'll be working on support for exceptions and build breaks (with temporary exceptions)  subsequently.
@pakrym et. al. you can use the [ExcludeFromCodeCoverage] attribute on a method or class to exclude it. [Obsolete] is also ignored by default. See eng/CodeCoverage.runsettings for details.

@jsquire T1 is not covered - only T2. You can get individual package coverage in 1 of 2 ways:

So long as the T1 libraries hanging out in the service directory don't throw off results, I'm good.   Thanks for the clarification.

@jsquire take a look at eng/CodeCoverage.targets right at the top for what's coverable by default. As long as your T1s don't purport to be T2s you'll be fine. That said, looking at your reports, something is wrong: https://dev.azure.com/azure-sdk/public/_build/results?buildId=632467&view=codecoverage-tab. I see T1 in there but a cursory glance hasn't yielded why. Storage, Search, and Key Vault are only covering T2s. I don't see any Directory.Build.* files that would explain why either. Thoughts?


Added ability to avoid an additional '$()' call in 'setElement' method if current 'element' is already wrapped with '$()'

Here is a good examples:

(function($) {
	var popup = $.sub();

	popup.fn.extend({
		show: function() {
			console.log('show');

			return this;
		},

		hide: function() {
			console.log('hide');

			this.addClass('hide');

			return this;
		}
	});

	$.fn.popup = function() {
		this.addClass('popup');

		return popup(this);
	};
})(jQuery);

var AddUserView = Backbone.View.extend({
	el: $('#addUser-popup').popup(),

	show: function() {
		this.$el.show();
	}
});

var addUserView = new AddUserView({ model: user });

addUserView.show();

var AddUserView = Backbone.View.extend({
	show: function() {
		this.$el.show();
	}
});

var popup = $('#addUser-popup').popup();
var addUserView = new AddUserView({ model: user });

addUserView.setElement(popup, false);

addUserView.show();

If we try to call 'addUser.show', then 'view' will call '$.show' instead of '$.popup.show', because 'el' is wrapped twice.
It would be nice to pass to 'setElement' method already wrapped 'element' and this patch helps to solve this problem.

Cute -- but a micro-optimization like this needs to be accompanied with a benchmark (say, on JSPerf.com) proving that it actually is faster to add the instanceof. Mind cooking one up?

Here is performance test

Huh. How is it possible that the patched version is faster, when setting a direct DOM element?
http://jsperf.com/backbone-pull-request-1048/3

I don't know, it was just magic :)
"regular el" and "patched el" have got the same result for Safari 5.1.2/Safari 5.1.3/Chrome 17.0.963/IE8/Firefox 10.0.2 on my workstation.
Could you please run benchmark again?

Obviously because instanceof is faster than passing thru $ constructor.
http://jsperf.com/instanceof-vs-jquery-constructor
Therefore, using instanceof will increase performance and fix the issue.

I think the main issue here isn't performance, but rather that $.fn methods created on an $.sub version of jQuery are lost when wrapped in $().
>> var foo = $.sub(); foo.fn.extend({bar:1}); var qux = foo('<div>'); [qux.bar, $(qux).bar]
[1, undefined]

In our application we are using a lot of views and the main goal of using this fix is to avoid an additional "$()" call to increase performance and cover this case:
var AddUserView = Backbone.View.extend({
    el: $('#el').ourPlugin(), // already wrapped with "$" as jQuery plugin
    //  or $('#el') // already wrapped with "$" as jQuery object

    show: function() {
        this.$el.show();
    }
});

I just don't understand what can be a reason to wrap jQuery object twice? Especially taking into account bunch of logic performed by "init" method of jQuery in this particular case.
Using "$.sub" was one of examples how we could use "views" and thanks that you point me that "$.sub" would be deprecated :)
At the same time deprecated status for "$.sub" will not affect products, which use jQuery < 1.8.


CD for deployment to prod

For WIC MT, we aren't taking the project into production, so we aren't setting up a CD pipeline for prod. This ticket is to capture any work for creating a CD pipeline for the prod environment.

@rocketnova sorry it's been taking me long to get to this. Do we have CD for a dev or stage environment, if not prod?

This has been completed.


[Unity Catalog] - Document potential automation pieces (for future) for Unity Catalog

Task for #765
Nice to Have - automation of the creation of Unity Catalog/Metastore as opposed to having it done manually via the readme (interactive)

@thesqlpro, please do add a DoD and fill in the metadata.


Android App not running because of error: "Could not determine the dependencies of task ':compileReleaseAidl'."

I have been developing my App for some time now and have mostly been testing it on an iOS device and iOS emulator and the agora_rtc package has given me no issues up untill now when I tried to run my app on a real android device.
Flutter is throwing the error below related to the package as:
"
Could not determine the dependencies of task ':compileReleaseAidl'.

SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at '/Users/apple/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/agora_rtc_engine-1.0.13/android/local.properties'.
"

I don't understand what could be the issue?

the solution is as you comment.

the solution is as you comment.

Btw there is no local.properties in agora_rtc_engine-1.0.13/android/ . i only found gradles.properties

@SaoGoKu what file path you have opened in the android studio?

If you still face issues, please try upgrading to the new version to see if it works for you.


STORM-1630 Add guide page for Windows users

starting at 1.0.0, Windows users should take care of privilege on account

"create symbolic link"

@hustfxj
I made this page before seeing your comment.
While technet pages cover how to set up privilege, we could be more kind to providing tl;dr. by pasting your comment on JIRA issue.
1) Launch secpol.msc via Start or Start → Run.
2) Open Security Settings → Local Policies → User Rights Assignment.
3) In the list, find the "Create symbolic links" item, which represents SeCreateSymbolicLinkPrivilege.
4) Double-click on the item and add yourself (or the whole Users group) to the list.

If you think it would be better to add it, I'll take care of it.

Btw, I don't see the reason why we keep _site directory.
Since it can be built anytime, and we don't serve website from that directory, I guess it could be removed.

@HeartSaVioR  sorry I think we shouldn't add it now. It is superfluous, so that's more better to a official guide from MS, linking that page, as you do.

@hustfxj Good. Thanks for the comment. :)

+1

After STORM-1617, this PR should be rebased to master and 1.x-branch respectively.
I'll create new two pull requests, and ping again.
Thanks for reviewing!

@hustfxj @ptgoetz
Please review #1247 and #1248 to continue. Thanks!


Cypress get long time after run on CI

I have 2 file test and script below
// API
describe('Group of test', function() {
  it('api test', function() {
    cy.getTodos()
  })
})

// frontend
describe('Group of test', function() {
  before(function() {
    cy.log('run me on 1 time at all test start')
  })
  after(function() {
    cy.log('run me on 1 time at all test end')
  })
  beforeEach(function() {
    cy.log('run me always time at it is run')
  })
  afterEach(function() {
    cy.log('run me always time at it is run end')
  })
  context('Sub group of test', function() {
    it('test case 1', function() {
      cy.visit('/')
    })
    it('test case 2', function() {
      cy.visit('/')
    })
  })
})

The first file is passed but the second file isn't run. Can you help me ?
Can see my repo at repo

This repo is only for issues relating to Cypress GitHub actions. If you want to open an issue on our main project, you can open it here with a completely reproducible example. This issue will be closed in this repository.
Also, check out our community chat, it can be helpful for debugging issues or just answering questions you have about Cypress.

@jennifer-shehane Yes, this issue relating to Cypress Github Action. You can see my action in here Github action


Problem: can't run docker compose anymore

Issue
Hi,
I'm not longer able to run my docker-compose.yml. It's still complaining about:

ERROR: The Compose file './docker-compose.yml' is invalid because:
services.mysql.environment.MYSQL_RANDOM_ROOT_PASSWORD contains true, which is an invalid type, it should be a string, number, or a null
services.semaphore.environment.SEMAPHORE_LDAP_ENABLE contains true, which is an invalid type, it should be a string, number, or a null

Ubuntu: 24.04.1 LTS
Docker:  27.4.1-1
Docker-compose: 29.2-6
I tried to set the values into quotation marks, without any luck. Only when I uncomment the entries it will work.
It was working before and I only stopped the container due to the new version that I'ld like to install.
Regards,
_shorty
Impact
Docker
Installation method
Docker
Database
MySQL
Browser
No response
Semaphore Version
latest docker container, also tried versions before still the same.
Ansible Version
No response
Logs & errors
No response
Manual installation - system information
No response
Configuration

services:
mysql:
image: mysql:8
environment:
MYSQL_USER: semaphore
MYSQL_PASSWORD: safepa$$word!
MYSQL_DATABASE: semaphore_db
MYSQL_RANDOM_ROOT_PASSWORD: yes
volumes:
- semaphore_mysql:/var/lib/mysql
networks:
- semaphore_network
semaphore:
ports:
- 80:3000
image: semaphoreui/semaphore:latest
environment:
SEMAPHORE_DB_DIALECT: mysql
SEMAPHORE_DB_HOST: mysql
SEMAPHORE_DB_NAME: semaphore_db
SEMAPHORE_DB_USER: semaphore
SEMAPHORE_DB_PASS: safepa$$word!
SEMAPHORE_ADMIN: ansible-user
SEMAPHORE_ADMIN_PASSWORD: Pa$$w0rd!
SEMAPHORE_ADMIN_NAME: Administrator
SEMAPHORE_ADMIN_EMAIL<EMAIL_ADDRESS>SEMAPHORE_LDAP_ENABLE: True
SEMAPHORE_LDAP_BIND_DN: CN=Technical User 0040,OU=Service Accounts,OU=IT,DC=domain,DC=local
SEMAPHORE_LDAP_BIND_PASSWORD: Itsmeasa4epa$$word!
SEMAPHORE_LDAP_SERVER: DC.domain.local:636
SEMAPHORE_LDAP_SEARCH_DN: OU=User,DC=domain,DC=local
SEMAPHORE_LDAP_SEARCH_FILTER: (&(userPrincipalName=%s)(memberOf=CN=Semaphore_admin,OU=Semaphore,OU=Permissions,DC=domain,DC=local))
SEMAPHORE_LDAP_NEEDTLS: yes
SEMAPHORE_LDAP_MAPPING_DN: dn
SEMAPHORE_LDAP_MAPPING_MAIL: userPrincipalName
SEMAPHORE_LDAP_MAPPING_UID: userPrincipalName
SEMAPHORE_LDAP_MAPPING_CN: cn
volumes:
- semaphore_data:/var/lib/semaphore
- semaphore_config:/etc/semaphore
- semaphore_tmp:/tmp/semaphore
networks:
- semaphore_network
volumes:
semaphore_data:
semaphore_config:
semaphore_tmp:
semaphore_mysql:
networks:
semaphore_network: {driver: "bridge"}

Additional information
No response

It is Docker compose issue, not Semaphore issue.


pls provide the server specifications for the shmipc-go benchmark on front page. thx

pls provide the server specifications for the shmipc-go benchmark on front page. thx

emm maybe you could run example/best_pratise's cases or contribute the code :)

@goodbye-babyer
looking forward to shmipc c++ version which is compatible with shmipc-go.
thx!


Support Retina Displays

Extension
https://www.raycast.com/mooxl/coffee
Description
The taskbar icons are blurry due to being low-res. I was wondering if you can swap the PNG files for SVG ones so macOS will take care of scaling?
Here's what it looks like right now.

vs. icons that can scale.

I found a couple of alternatives if you would like to use them. I think they're more informative and are easier to distinguish in different modes vs. the current ones, where the hot steam is the only discerning factor.
This one for when decaffeinated https://thenounproject.com/icon/coffee-pot-47716/
And this one for when caffeinated https://thenounproject.com/icon/coffee-pot-47772/
There's also this one https://thenounproject.com/icon/coffee-pot-47717/
Who will benefit from this feature?
I hope every one who uses a high resolution monitor or simply uses a MacBook :)
Anything else?
I tried to look in the code where the images are being used but couldn't find it.

Closing as fixed 🔥 Thanks again @oasaleh


Remove ancient workaround in migration tests

Before we checked that the schema and accessors actually matched we had to ensure that accessor classes wouldn't get created for modified schemas in the migration tests (or other tests would end up using those classes), but that's long fixed.

:+1:

:+1:


Web component: Link List - The link text "Learn more" is not descriptive.

Detailed description
Issue:
The link text "Learn more" is not descriptive. Hence the user does not know the purpose of these links.
Note: Same issue on react version
Expected: Provide a descriptive link text. for example: "learn more about XYZ". or some dummy text.
Additional information

@Praveen-sr Storybook text links are, for the most part, dummy links and placeholders. Unless there is a specific reason highlighting functionality or best practices, this is not real content. I'm going to fix but I don't think issues such as this need to be reported.


Building my project with this in Cloudflare Pages fails

I'm getting this:
16:34:45.328 | > vite build
-- | --
16:34:45.328 |
16:34:45.686 | vite v5.3.5 building for production...
16:34:45.739 | transforming...
16:34:45.776 | ✓ 4 modules transformed.
16:34:45.779 | x Build failed in 68ms
16:34:45.779 | error during build:
16:34:45.780 | [elm-watch] Could not load /opt/buildhome/repo/src/elm/Main.elm (imported by src/index.js): Elm could not be found... please try running this command:
16:34:45.780 |
16:34:45.780 | npm install -D elm
16:34:45.780 |
16:34:45.780 |
16:34:45.780 | More installation options here: https://guide.elm-lang.org/install/elm
16:34:45.780 | at Object.load (file:///opt/buildhome/repo/node_modules/vite-plugin-elm-watch/src/index.js:207:19)

Relevant portion of my package.json dependencies:
"devDependencies": {
   "vite": "^5.3.5",
   "vite-plugin-elm-watch": "^1.3.4"
},
"optionalDependencies": {
   "@lydell/elm_linux_x64": "^0.19.1-1",
   "@rollup/rollup-linux-x64-gnu": "^4.19.1"
}

I've also tried the suggestion here https://github.com/ryan-haskell/vite-plugin-elm-watch/issues/3#issuecomment-2229318720 but with that get this error:
16:18:48.923 | npm ERR! code 1
-- | --
16:18:48.929 | npm ERR! path /opt/buildhome/repo/node_modules/vite-plugin-elm-watch/node_modules/elm
16:18:48.935 | npm ERR! command failed
16:18:48.940 | npm ERR! command sh -c node install.js
16:18:48.946 | npm ERR! -- ERROR -----------------------------------------------------------------------
16:18:48.952 | npm ERR!
16:18:48.957 | npm ERR! I support your platform, but I could not find the binary package (@lydell/elm_linux_x64) for it!
16:18:48.966 | npm ERR!
16:18:48.972 | npm ERR! This can happen if you use the "--omit=optional" (or "--no-optional") npm flag.
16:18:48.977 | npm ERR! The "optionalDependencies" package.json feature is used by Elm to install the correct
16:18:48.981 | npm ERR! binary executable for your current platform. Remove that flag to use Elm.
16:18:48.987 | npm ERR!
16:18:48.992 | npm ERR! This can also happen if the "node_modules" folder was copied between two operating systems
16:18:48.994 | npm ERR! that need different binaries - including "virtual" operating systems like Docker and WSL.
16:18:48.995 | npm ERR! If so, try installing with npm rather than copying "node_modules".
16:18:49.001 | npm ERR!
16:18:49.006 | npm ERR! NOTE: You can avoid npm entirely by downloading directly from:
16:18:49.010 | npm ERR! https://github.com/lydell/compiler/releases/tag/0.19.1
16:18:49.016 | npm ERR! All this package does is distribute a file from there.
16:18:49.021 | npm ERR!
16:18:49.026 | npm ERR! --------------------------------------------------------------------------------

Any ideas?

Adding npm as a dev dependency solved the issue.


Decoupling Flyway Migrations from Application Deployment in Azure DevOps Pipelines

Current Issue
The CI/CD process tightly couples Flyway database migrations with application startup. This approach can lead to:

Increased application startup time.
Deployment failures due to migration errors.
Difficulty in debugging migration issues independently of the application.

Proposed Solution
Decouple Flyway migrations from application startup by adding a separate step in the CI/CD pipeline to run migrations before deploying the application.
Steps to Implement

Add a Flyway Migration Step in the Pipeline
Introduce a dedicated task in the Azure DevOps pipeline to run Flyway migrations using the Docker image.

- task: Bash@3
  displayName: "Run Flyway migrations"
  inputs:
    targetType: "inline"
    script: |
      docker run --rm \
        -e FLYWAY_URL=jdbc:<db-url> \
        -e FLYWAY_USER=<db-user> \
        -e FLYWAY_PASSWORD=<db-password> \
        <acr-name>.azurecr.io/<image-name>:<tag> \
        flyway migrate

Tag Images for Migration Purposes

Use specific tags to differentiate between the migration image and the application image.
CMD ["java", "-Dspring.profiles.active=migration", "-jar", "app.jar"]

Adjust Application Health Check Logic
During migrations, configure a lightweight health check response to prevent deployment retries or failures.

@RestController
public class HealthCheckController {
    @GetMapping("/health")
    public ResponseEntity<String> health() {
        if (migrationInProgress) {
            return ResponseEntity.ok("Migration in progress");
        }
        return ResponseEntity.ok("Healthy");
    }
}

Run Migrations in Azure Container Instance (Optional)

If the CI/CD pipeline cannot accommodate the migration step, run migrations in an Azure Container Instance.

az container create \
    --resource-group <resource-group> \
    --name db-migration \
    --image <acr-name>.azurecr.io/<image-name>:<tag> \
    --registry-login-server <acr-name>.azurecr.io \
    --registry-username <acr-username> \
    --registry-password <acr-password> \
    --command-line "java -Dspring.profiles.active=migration -jar app.jar"

Corrected Example for CI/CD Pipeline
Pipeline Structure:

steps:
  - name: Build
    script: |
      mvn clean install

  - name: Run Flyway Migrations
    script: |
      docker run --rm \
        -e FLYWAY_URL=jdbc:postgresql://<db-host>:<port>/<db-name> \
        -e FLYWAY_USER=<db-user> \
        -e FLYWAY_PASSWORD=<db-password> \
        <acr-name>.azurecr.io/<image-name>:<tag> \
        flyway migrate

  - name: Deploy Application
    uses: azure/webapps-deploy@v2
    with:
      app-name: sp-az-webapp
      publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}

Justification for Changes
1. Improved Deployment Stability
By separating migrations, failures during this step do not impact application startup.
2. Ease of Debugging
Independent migration logs simplify troubleshooting.
3. Better Resource Utilization
The application image does not require migration dependencies during runtime.
Conclusion
Decoupling Flyway migrations from application startup improves deployment reliability, simplifies debugging, and optimizes resource usage. The proposed changes ensure a robust CI/CD pipeline and facilitate efficient application delivery.

@SureshChikkam-MT
It would be great if you could add a link to the documentation you are following for these steps? This would help us redirect the issue to the appropriate team. Thanks!!

@SureshChikkam-MT
We are going to close this thread but if there are any further questions regarding the documentation, please tag me in your reply and we will be happy to continue the conversation.


Any way I can make Micro detect GTK?

Description of the problem or steps to reproduce
I use micro over vim because of the C error highlighting, but when I code in GTK, it does not recognize the header file like POSIX or curl. To reproduce, Try to open a GTK C file (I would recommend GTK's examples here) and saving, and it will say "No such file or directory" on the GTK header file. Because it can't recognize GTK, it voids all other errors.
Specifications
Commit hash: 6bc498e6
OS: Arch Linux x86_64
Terminal: gnome-terminal

What is the name of the file you are trying to open? Is there something specific about GTK files that make them different from ordinary C files?

I would guess it has to to with two things:

GTK is pretty massive
GTK has include files
when compiling GTK apps, you usually do the command
pkg-config --libs gtk+-3.0, which outputs
-lgtk-3 -lgdk-3 -lz -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0  , and pkg-config --cflags gtk+-3.0, which adds
-I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/lzo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cloudproviders -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/at-spi-2.0 -pthread
to the compilation also. when compiling with curl, you just do -lcurl.

Closing this issue for now:
you can do
#include <gtk-3.0/gtk/gtk.h>

However, there is no issues showing when i changed the headers, so i have decided to keep this open for the time being.


Line2 RuntimeError due to LineSegmentGeometry

three version: 0.126.0
three-stdlib version: 1.0.1

Problem description:
Line2 causes runtime error:
TypeError: _LineSegmentsGeometry_js__WEBPACK_IMPORTED_MODULE_1__.LineSegmentsGeometry.prototype.setPositions is undefined

This is because the constructor tries to instantiate a LineGeometry, which tries to call parent method setPositions here.
LineSegmentsGeometry does not end up having this property because we use arrow functions to define setPositions in LineGeometry here. Arrow functions in classes compile to properties on the instance of a class, instead of on the prototype itself.
Suggested solution:
Move all methods in LineSegmentsGeometry to use function syntax. This will solve this initial bug, but part of me thinks this issue will crop up again and there's a more sophisticated approach to avoiding it in the future.

resolved by #42


Extra file in docs/examples/YOCP

The folder docs/examples/YOCP contains the extra file Quickstart.ipynb, which is a duplicate of docs/documentation/Tutorial_NB/Quickstart.ipynb.
This causes a WARNING of missing from any toctree when building.

this has been addressed in #50


Fck Text (Rich Text Editor) toolbar isn't loading.

We've recently noticed the toolbar for the Fck Text web part isn't loading.  We're still able to copy/paste text into the web part from Word and styling is retained, just the toolbar won't load.
I've ensured the latest version of SPfx 40 is loaded on the site, but no joy.  Here's what it looks like for us:

Thank you for this awesome pack of web parts! It makes SP Online 1000x better.
Just installed the package today and wanted to report also that the rich text editor/toolbar isn't appearing for Tabs and Accordion for us. Maybe it's something on our end, please let me know if there's anything I can check on to help troubleshoot and I'll grab a screen cap?
Thanks again for getting ahead of the game with this package!

We have the same issue. I tried on different O365 tenant and different browser (IE, Edge & Chrome). The toolbar doesn't appear, also in "inline" mode. It doesn't work with v 1.0.3 or v1.0.4.

Same issue here for the Tabs and Accordion web parts

Regarding this outstanding issue, I had one of our developers look at this a bit closer and here's what he found in case it helps you:

i found that all the html elements used for the pop-up toolbar exist in the DOM, but when you click on the textbox the div removes the attribute "display:none". therefore the div should display, but it does not. I am assuming that there are other style sheets causing problems. i noticed that the height and width were set to "auto" instead of fixed size. that might cause problems.

So here is the scenario, When you do a gulp serve and load the webpart in the local workbench it works fantastic. But when we add the webpart in SharePoint site it displays only text and toolbar for rich bar editing is not loaded as @Seanny37  mentioned.

Ok, I might have figured out the temporary workaround for this.
We will have to set the display property to block back for the 'cke_top' element.
I am using the instanceReady event of the component which will wait till the instance is ready and will set the display property to block.
Replace the following snippet of the code in FckTextWebPart.ts file
          CKEDITOR.instances[i].on('change', (elm?, val?) => {
            //CKEDITOR.instances[i].updateElement();
            elm.sender.updateElement();
            var value = ((document.getElementById(this.guid + '-editor')) as any).value;
            if (this.onPropertyPaneFieldChanged && value != null) {
              this.properties.text = value;
            }
          });
          CKEDITOR.instances[i].on('instanceReady', function () {
            //console.log("instance ready ");
            let ckElments = document.getElementsByClassName("cke_top") as HTMLCollectionOf<HTMLElement>;
            ckElments[0].style.display = "block"

          })
        }

Hi,
Toolbar is not visible when we have multiple editors on the same page.
How to have it visible for all editors on the page.
Please let me know if you need more information

Same issue here.

Note, I applied dhavalshah01 fix above, but now I don't see the toolbar images.  Looks like it's looking in the local file deployment for the CDN files which don't exist

Some more troubleshooting:
I identified a file named 2.sp-canvas-sp-ckeditor_aba5107588a0d5e7bb48.js which seems to be a copy of ckeditor.js (version 4.8.0) and is calling the missing files from the MS CDN.
The odd thing is I overrode the location in FckTextWebPart.ts to my own hosted version of ckeditor.js yet it still loads the MS CDN version.
var ckEditorCdn: string = 'https://myname.sharepoint.com/sites/TESTSITE/SiteAssets/apps/ckeditor/ckeditor.js';
Maybe CKEDITOR is being loaded elsewhere for some reason (even though it's broken)?
Here is the MS CDN url to the broken 4.8.0 version.
https://spoprod-a.akamaihd.net/files/sp-client-prod_2018-05-04.015/2.sp-canvas-sp-ckeditor_aba5107588a0d5e7bb48.js

So, since it looks like Microsoft broke this, I have opened a support ticket with Microsoft.
Ticket 10276876
Please feel free to open your own Office 365 Support tickets and reference my ticket until they fix this.

I have found a workaround by renaming the references to CKEDITOR.  I don't have time to track down which reference is the right one so I renamed them all.  I then deployed a local copy of CKEditor script library, renamed all references within those source files and voila it's all working again.
Microsoft deployed a broken release of the CKEditor to the entire O365 deployment, breaking this package everywhere it's referenced as CKEditor.  Please open additional support tickets with Microsoft because their support team won't even recognize this as an issue they caused.

@rrfreeman, thank you for submitting the UserVoice post. Any chance you can provide a link to a sppkg file that includes your workarounds?

Here is the adapted CKEditor CDN that you must deploy to your SharePoint instance:
You must replace the CompanyName and CompanySiteName instances in the CKEDITORspfxFORTY.js file
All files should then be copied here: https://CompanyName.sharepoint.com/sites/CompanySiteName/SiteAssets/apps/ckeditorspfxforty/
ckeditorspfx40.zip

Next you'll need to Edit the SPFX 40 library, rebuild, and deploy the files as follows:
First:
Replace the CompanyName and CompanySiteName instances in all files.
I used Visual Studio 2017 to do this since the VS Code Replace in Files feature is broken (only looks in open files).
Second:
Package the project using VS Code.
gulp bundle --ship
gulp package-solution --ship
Third:
Copy the \sharepoint\solution\spfx-fantastic-40.sppkg file to the app catalog.
Fourth:
Copy the 333 files from temp\deploy* to SiteAssets\apps\SPFX40
Package Download:
https://votematrix-my.sharepoint.com/:u:/p/rfreeman/EYrTr7B3G6JKh0R6hoKLOo4B28x5Pxobtm9BY_BADhkOiA?e=NmaND7

Note that I'm not sure if the renames in the CKEditor package or in the SPFX libraries were the solution.  If someone wants to deploy the CKEditor package above to a public CDN, then they could update the main spfx-40-fantastics code with the public CDN urls and generate a standard sppkg file for everyone.

any updates on this?
The only workaround i have is to use a different text editor to create the content then copy and past it into the current fck editor.
anyone have a better way to do this?

Ok, I might have figured out the temporary workaround for this.
We will have to set the display property to block back for the 'cke_top' element.
I am using the instanceReady event of the component which will wait till the instance is ready and will set the display property to block.
Replace the following snippet of the code in FckTextWebPart.ts file
          CKEDITOR.instances[i].on('change', (elm?, val?) => {
            //CKEDITOR.instances[i].updateElement();
            elm.sender.updateElement();
            var value = ((document.getElementById(this.guid + '-editor')) as any).value;
            if (this.onPropertyPaneFieldChanged && value != null) {
              this.properties.text = value;
            }
          });
          CKEDITOR.instances[i].on('instanceReady', function () {
            //console.log("instance ready ");
            let ckElments = document.getElementsByClassName("cke_top") as HTMLCollectionOf<HTMLElement>;
            ckElments[0].style.display = "block"

          })
        }

Hi dhavalshah01,
After applying your change still I am getting following error.
Failed to load resource: the server responded with a status of 404 () in filecdn.ckeditor.com/4.4.3/full-all/skins/moono-lisa/editor.css?t=H0CGeditor.css:1.
Any feedback.
I guess some css file is missing or renamed in the CDN.
If anyone has any solution for this editor or can we use some other editor in the solution?

Here is error which I am getting in the stand web part.
GET https://cdn.ckeditor.com/4.4.3/full-all/skins/moono-lisa/editor.css?t=H0CG net::ERR_ABORTED 404
in VM2365 ckeditor.js:94 file.
Any suggestion?

Here is the code which worked for me. Please note that I have changed the skin type to moono because for moono-lisa skin some file is missing.
for (var i in CKEDITORspfxFORTY.instances) {
CKEDITORspfxFORTY.instances[i].on("change", (elm?, val?) => {
elm.sender.updateElement();
var value = (document.getElementById(elm.sender.name) as any)
.value;
var id = elm.sender.name.split("-editor-")[1];
this.properties.tabs[id].Content = value;
});
}
      CKEDITORspfxFORTY.instances[i].on("instanceReady", function() {
        let ckElments = document.getElementsByClassName(
          "cke_top"
        ) as HTMLCollectionOf<HTMLElement>;
        //ckElments[0].style.display = "block";
        //debugger;
        for (let k = 0; k < ckElments.length; k++) {
          //ckElments[0].style.display = "block";
          ckElments[k].style.display = "block";
        }
      });

Here is the code which worked for me. Please note that I have changed the skin type to moono because for moono-lisa skin some file is missing.
for (var i in CKEDITORspfxFORTY.instances) {
CKEDITORspfxFORTY.instances[i].on("change", (elm?, val?) => {
elm.sender.updateElement();
var value = (document.getElementById(elm.sender.name) as any)
.value;
var id = elm.sender.name.split("-editor-")[1];
this.properties.tabs[id].Content = value;
});
}
      CKEDITORspfxFORTY.instances[i].on("instanceReady", function() {
        let ckElments = document.getElementsByClassName(
          "cke_top"
        ) as HTMLCollectionOf<HTMLElement>;
        //ckElments[0].style.display = "block";
        //debugger;
        for (let k = 0; k < ckElments.length; k++) {
          //ckElments[0].style.display = "block";
          ckElments[k].style.display = "block";
        }
      });

I am stuck...do I need to change this using visual studios. Where do I get to the  FckTextWebPart.ts?

Here is the code which worked for me. Please note that I have changed the skin type to moono because for moono-lisa skin some file is missing.
for (var i in CKEDITORspfxFORTY.instances) {
CKEDITORspfxFORTY.instances[i].on("change", (elm?, val?) => {
elm.sender.updateElement();
var value = (document.getElementById(elm.sender.name) as any)
.value;
var id = elm.sender.name.split("-editor-")[1];
this.properties.tabs[id].Content = value;
});
}
      CKEDITORspfxFORTY.instances[i].on("instanceReady", function() {
        let ckElments = document.getElementsByClassName(
          "cke_top"
        ) as HTMLCollectionOf<HTMLElement>;
        //ckElments[0].style.display = "block";
        //debugger;
        for (let k = 0; k < ckElments.length; k++) {
          //ckElments[0].style.display = "block";
          ckElments[k].style.display = "block";
        }
      });

I am stuck...do I need to change this using visual studios. Where do I get to the FckTextWebPart.ts?

Yes you have to  download the source file and then you will find FckTextWebPart.ts file in the this path /src/webparts/fckText/FckTextWebPart.ts. Here you have to change the code.

Here is the code which worked for me. Please note that I have changed the skin type to moono because for moono-lisa skin some file is missing.
for (var i in CKEDITORspfxFORTY.instances) {
CKEDITORspfxFORTY.instances[i].on("change", (elm?, val?) => {
elm.sender.updateElement();
var value = (document.getElementById(elm.sender.name) as any)
.value;
var id = elm.sender.name.split("-editor-")[1];
this.properties.tabs[id].Content = value;
});
}
      CKEDITORspfxFORTY.instances[i].on("instanceReady", function() {
        let ckElments = document.getElementsByClassName(
          "cke_top"
        ) as HTMLCollectionOf<HTMLElement>;
        //ckElments[0].style.display = "block";
        //debugger;
        for (let k = 0; k < ckElments.length; k++) {
          //ckElments[0].style.display = "block";
          ckElments[k].style.display = "block";
        }
      });

I am stuck...do I need to change this using visual studios. Where do I get to the FckTextWebPart.ts?

Yes you have to download the source file and then you will find FckTextWebPart.ts file in the this path /src/webparts/fckText/FckTextWebPart.ts. Here you have to change the code.

Is there anyway you can provide the updated spfx.sppkg file?

Hi all, I would also love to have the updated spfx.sppkg file. I really need a proper accordion and tab Webpart for my communication site. I'm afraid I'm not experienced enough to compile it myself (if compiling is the right term). Hopefully someone can help..

Here is the code which worked for me. Please note that I have changed the skin type to moono because for moono-lisa skin some file is missing.
for (var i in CKEDITORspfxFORTY.instances) {
CKEDITORspfxFORTY.instances[i].on("change", (elm?, val?) => {
elm.sender.updateElement();
var value = (document.getElementById(elm.sender.name) as any)
.value;
var id = elm.sender.name.split("-editor-")[1];
this.properties.tabs[id].Content = value;
});
}
      CKEDITORspfxFORTY.instances[i].on("instanceReady", function() {
        let ckElments = document.getElementsByClassName(
          "cke_top"
        ) as HTMLCollectionOf<HTMLElement>;
        //ckElments[0].style.display = "block";
        //debugger;
        for (let k = 0; k < ckElments.length; k++) {
          //ckElments[0].style.display = "block";
          ckElments[k].style.display = "block";
        }
      });

I am stuck...do I need to change this using visual studios. Where do I get to the FckTextWebPart.ts?

Yes you have to download the source file and then you will find FckTextWebPart.ts file in the this path /src/webparts/fckText/FckTextWebPart.ts. Here you have to change the code.

Do I modify rrfreeman code or the orginial one provided.

Here is the code which worked for me. Please note that I have changed the skin type to moono because for moono-lisa skin some file is missing.
for (var i in CKEDITORspfxFORTY.instances) {
CKEDITORspfxFORTY.instances[i].on("change", (elm?, val?) => {
elm.sender.updateElement();
var value = (document.getElementById(elm.sender.name) as any)
.value;
var id = elm.sender.name.split("-editor-")[1];
this.properties.tabs[id].Content = value;
});
}
      CKEDITORspfxFORTY.instances[i].on("instanceReady", function() {
        let ckElments = document.getElementsByClassName(
          "cke_top"
        ) as HTMLCollectionOf<HTMLElement>;
        //ckElments[0].style.display = "block";
        //debugger;
        for (let k = 0; k < ckElments.length; k++) {
          //ckElments[0].style.display = "block";
          ckElments[k].style.display = "block";
        }
      });

I am stuck...do I need to change this using visual studios. Where do I get to the FckTextWebPart.ts?

Yes you have to download the source file and then you will find FckTextWebPart.ts file in the this path /src/webparts/fckText/FckTextWebPart.ts. Here you have to change the code.

Do I modify rrfreeman code or the orginial one provided.

My solution is working on rrfreeman code and you have to upload the CKEditor resource files in your own CDN path i.e. your company O365 CDN.

Hi Everyone.
I'm a not a developer and I wanted to know if someone could propose his .sppkg file package fixed.
I'm really interesting on using those WPs. Thanks very much for all of you for your help on that matter

guys, i have fixed it myself using my own jsdelivr cdn.
Package with working editors can be found here:
spfx-fantastic-40-fckeditor fixed.zip
Could somebody validate that it is indeed working for them?

guys, i have fixed it myself using my own jsdelivr cdn.
Package with working editors can be found here:
spfx-fantastic-40-fckeditor fixed.zip
Could somebody validate that it is indeed working for them?

WORKED!! Both on test and production!
For the accordion web part to work I just had to add the RichText Editor web part to the page the accordion web part was on:

For the color palette to work, I had to turn off the "Inline" option:

Thank you so much!

guys, i have fixed it myself using my own jsdelivr cdn.
Package with working editors can be found here:
spfx-fantastic-40-fckeditor fixed.zip
Could somebody validate that it is indeed working for them?

WORKED!! Both on test and production!
For the accordion web part to work I just had to add the RichText Editor web part to the page the accordion web part was on:

For the color palette to work, I had to turn off the "Inline" option:

Thank you so much!

Oh yeah, I only fixed the rich text editor. I will upload a new package with the fix for accordion tomorrow.

@mmartain
Could you tell us what changes you made and for which files?

Hi rrfreeman .. Thanks for the fixes.. But still there are bugs .. like.. image buttons and table buttons are not working.. Still it is calling the external references like and getting logged.. for example. if you click on table icon .. getting error like "Uncaught Error: [CKEDITOR.dialog.openDialog] Dialog "table" failed when loading definition." and failed to load "https://spoprod-a.akamaihd.net/files/sp-client-prod_2018-06-22.004/sp-ckeditor/plugins/table/dialogs/table.js?t=HBDF" .

Hi, Do you find any solution for the image button, table?

Hi, uploaded the zip file to the app catalog, but it give me a error


[GHSA-qf8x-vqjv-92gr] Authentication bypass and denial of service (DoS) vulnerabilities in Apple Game Center auth adapter

Updates

References

Hi there @mtrezza! A community member has suggested an improvement to your security advisory. If approved, this change will affect the global advisory listed at github.com/advisories. It will not affect the version listed in your project repository.
This change will be reviewed by our highly-trained Security Curation Team. If you have thoughts or feedback, please share them in a comment here! If this PR has already been closed, you can start a new community contribution for this advisory


TypeScript Migration

Co-ordination
As discussed in the last contributors meeting we're looking to migrate our client to TypeScript.
No files will be assigned
PRs will be prioritised by quality, then by date opened
Guidelines
Take a look at the Codebase Best Practices - kebab-case file names
Small is beautiful
If a file can be migrated on its own, that's perfect.  That makes the PR incredibly easy to review and minimises the chance we break anything.
PropTypes can go
None of the components in the client directories are intended to be consumed by JavaScript components - eventually everything will be tsx.  With that in mind static type checking should be enough.
React Guidelines
So, we're all on the same page: https://github.com/typescript-cheatsheets/react#readme has some useful advice.  Mostly the linters will warn us, but this is definitely worth a look.
un-typed packages
If the package does not come with types attached, then please npm i the definitions (if they exist) from DefinitelyTyped.  Usually they're just published as @types/name-of-package.
Do Not Ignore Linting, Unless Absolutely Necessary
We hope to leverage the type-safety that comes with TypeScript. So, do not ignore the compiler's warnings/errors. If you are stuck, feel free to reach out for help.
Keeping Git History
Sometimes changing the file from <filename>.js -> <filename>.tsx? causes the original file to be deleted, and a new one created, and other times the filename just changes - in terms of Git. Ideally, we want the file history to be preserved.
The best bet at achieving this is to:

Rename the file
Commit with the flag --no-verify to prevent husky from complaining about the errors
Refactor to TS for migration, in a separate commit.

Note: Editors like VSCode are still likely to show you the file has been deleted and a new one created. If you use the CLI to git add ., then VSCode will show the file as renamed in stage
Tests are running
We will not be merging any PRs with failing tests.
Files that should not be migrated (yet)

gatsby-node.js
gatsby-config.js and related
redux/*

To finish migrating the client, we would need additional tooling to handle gatsby-config, gatsby-node and files they import. This could either be an extra tsc compilation step or potentially via ts-node. However, I'm not sure if ts-node would integrate nicely with gatsby develop or gatsby build, so the compilation approach is probably easier.
Before going ahead with this, we should profile gatsby develop and gatsby build to make sure that the time to develop and build the site do not increase too much.
More guidelines may get added
As we do this, chances are we'll revise the approach.  Any thoughts/comments/critiques are welcome, but I wanted to keep this straightforward for now.
List of Files To Migrate

[ ] /client/src/templates/Challenges/utils/worker-executor.js
[ ] /client/src/templates/Challenges/utils/worker-executor.test.js
[ ] /client/src/templates/Challenges/rechallenge/transformers.js
[ ] /client/src/__mocks__/react-i18next.js

I'll also like to help with this. I can see a couple of PRs already. How do I know which unassigned files are still pending?

@mendaomn files are not assigned anymore, just go for it
An issue with the help wanted or first timers only label is open for contribution. The first comprehensive PR created will be reviewed and merged. We typically do not assign issues to anyone other than long-time contributors.
If you would like to contribute, and have not read the contributors docs, please do so here: https://contribute.freecodecamp.org/#/
If you have any issues with contributing, be sure to join us on the contributors channel, or on the contributors sub-forum
P.S. Abbiamo anche un canale italiano, e sitamo lavorando a tradurre freeCodeCamp in italiano! Ci piacerebbe avere anche te!

Ill take on: /client/src/components/landing/index.js

@StanleyDharan I suggest you put it in a draft, if you want precedence on it, a closed PR is not counted

@oakj Whilst TypeScript is not all that different compared to JavaScript, I would not easily recommend using a migration as your first experience into TypeScript, unless you are already familiar with another strongly typed language.
There is nothing stopping you from trying, and you are more than welcome to get help from the freeCodeCamp community in your learning process. So, I will leave you with some available resources:

freeCodeCamp forum
Contributor Docs
freeCodeCamp Chat
TypeScript Docs

@ShaunSHamilton Thanks the reply! Appreciate the resources also. Will definitely go through the contributor docs and typescript docs!

@ShaunSHamilton I would like to work on migrating client>utils>challenge-types.js to TS, but I noticed that 2 variable has the same value in this file :
const zipline = 3;
const frontEndProject = 3;
is this intentional or a mistake?

Hey @ShaunSHamilton, Can I take on these files migration?
/client/src/client/frame-runner.js
/client/src/templates/Challenges/classic/MultifileEditor.js
/client/src/components/landing/index.js

@ashiskumar-1999 please check that there are not already PRs open for those, but otherwise you are free to go with them, files are not assigned and are always up for grabs in a first come first serve basis

Thanks, @ieahleen, Let me check then.

Hey @ieahleen, There are no PR open on the /client/src/client/frame-runner.js and
/client/src/templates/Challenges/classic/MultifileEditor.js files right now. Can I work on this?

Hi @ashiskumar-1999 ,
just go ahead, there is no need to ask for permission

Hi, please let me know if I have to correct something. I would like to contribute more.

@Ismailtlem @moT01  Hi there! I was wondering if we can think on a better way to check if there is an open PR for a certain file.
When I created this PR, and used the method suggested above (or somewhere else, I don't remember xD) to check for that, and there were none listed.
It was a fairly small contribution and I have no issue with it not being merged, that's fine!
Still, maybe some sync is needed. No need for permissions, but some coordination to see which files need to be migrated yet? :)
Cheers, keep the hard work! I really appreciate it since I got my first dev job thanks to FCC :)

Hi @kamatheuska
You can use this tool https://tools.freecodecamp.org/ to check if some file is included in a PR or not

Yeah, I used that one, and no PR's were created at that time for the files migrated in my PR. I could have used wrongly, since I cannot find any docs on how to write a query for it.

@kamatheuska The two PRs which migrated the same components were

https://github.com/freeCodeCamp/freeCodeCamp/pull/43966 landing/index.tsx (opened 22/10)
https://github.com/freeCodeCamp/freeCodeCamp/pull/43889 landing/landing.test.tsx (opened 15/10)

The important thing to remember about using the above mentioned tool is to use the original name of the file to search (not the migrated name):

I hope this was not too inconvenient for you. We do try to respect all contributor's time and effort.

That's awesome  feedback, thanks! @ShaunSHamilton

Why shouldn't we migrate format.js to .ts ?

@Ismailtlem I think this includes the format.js file:
https://github.com/freeCodeCamp/freeCodeCamp/issues/42256#issuecomment-882546081

I'll work on migrating these files.
/client/src/templates/Challenges/utils/frame.js
/client/src/tests/integration/handled-error.test.js

has anyone run in to this issue while working on migrations?
"Cannot use import outside of module"
When I try to use commonjs, the linter complains about the types I've created. I have a feeling it's some sort of config issue but googling hasn't yielded much.
PR for reference: https://github.com/freeCodeCamp/freeCodeCamp/pull/45456

That happens when the js file gets used by node. Unless the file has the .mjs extension or the package is declared as a module, you have to use require.
Typescript can be configured to emit require though: https://www.typescriptlang.org/tsconfig#module

Hello, I would love to help contribute to this and would like to work on migrating these files now:
/client/i18n/configForTests.js
/client/i18n/locales.test.js

@Sembauke I can see a few more files from the description haven't been migrated. Are you sure you want to close this issue?

It was done automatically :)
If you want to migrate more files, please do!

I'd like to migrate the worker-executor, if I knew what underlying libraries were used.

Hi @a2937 worker-executor has no dependencies - it's a standalone module for managing workers.

Thank you very much. I didn't have prior experience using Web Workers before in JavaScript. Also now I have another slight hiccup. What exactly is eventify? I believe it's some sort of EventListener/Dispatcher but don't know the exact class name at the minute.
TS tries to shitbade dicks like js. Dickora !!!!!!!!!!!!!!!!!!
Simple test?  Till this day ( almost full year later ) it isnt done? Jesus! Any newbie developer with not so great knowledge would have finished migration long ago. Its plain simple.
And before you say things like: "there are countless files to migrate". True, but what? There are tools that automates migrstion. These tools works.

@wojtekxtx Fun fact: If you read through, this was started on the 26th of May 2021.
We welcome contribution from yourself. Also I would be interested in seeing an example of these tools.

Also I would be interested in seeing an example of these tools.

Dont be lazy. Use Google.

this was started on the 26th of May 2021.

I took date from header section of this issue........ if this was started earlier, than its even worse than I previously wrote.

I do not touch projects that are of questionable reputation

???
Then why comment on this issue?🤔

@bradtaniguchi By touching I meant: developing code for this wannabe serious project.

@bradtaniguchi By touching I meant: developing code for this wannabe serious project. Nothing did I say about comments.

Do you have any examples of where freeCodeCamp is a "wannabe serious" project in regards to the current TypeScript migration?
I think having some clear code examples and advice on how to improve the TS migration wouldn't be too difficult for a pro such as yourself :)

@bradtaniguchi

Do you have any examples of where freeCodeCamp is a "wannabe serious" project in regards to the current TypeScript migration?

Oh hell yeah; todays date - this issue creation date = (almost) a year. Year spent on what? Exactly thats my point. You ( project as a whole ) need one year for something that could easily be done in........ 2 weeks max!
Irony is that this is project that aims in helping people learning to code properly ( according tol standards etc ) and its members needs close to a year just to finish WPM-type task.

I believe all tasks have been accomplished by unpaid volunteers that devote their time and expertise. The fact it's getting done at all is really awesome IMO. It's not exactly easy to migrate over to a large and expansive codebase such as freeCodeCamp to TS, when there's "multiple hands in the pot" all at once. Getting it done in any form or fashion will be a big win.

I will reiterate: Im NOT going to show where code could be improved as Im not going to devote my time to project(s) of such low quality as freecodecamp.

I thought it was just code contributions you don't have time/effort for? Any feedback or "code reviews" would be appreciated. Even a basic code critique would be useful, especially if the product is of such "low quality". Such efforts shouldn't take any more time it takes than to respond, however such a response would positively help the platform moving forward.
Otherwise anyone can see the date this issue has been created, but very few actually contribute to the platform.

@bradtaniguchi

It's not exactly easy to migrate

Once you get proper toolset, Its a breeze. Im not saying that this is obstacle-free, ofc one or two can popup out-of-the-blue (normal thing), but overall its rather smooth.
Have done many migrations of even larger codebases in my life. All succesful.  From my experience, codebase of size of freecodecamp takes about 2 months from planning to completion. Some 75% of this 2 month's is taken by designing WFP. Once you get it done right, migrating code is a breeze.

I believe all tasks have been accomplished by unpaid volunteers that devote their time and expertise.

Does not matter; this only confirms that this migration has no WFP, and/or plan drawn in WFP is not being strictly followed. For project of this size, especially expansive one (your words), is clear path to disaster. Sorry but thats what it is.

when there's "multiple hands in the pot" all at once.

Exactly. Thats what well-thought WFP solves.

While talking to Oliver about nav-link.tsx theme and how the connect function in it expect Action<any> result.
Here is a picture for clearance.

So I am wondering if it's okay to add action.js to the list of migration and for me to add generic types to it, or is there a reason for it to not be in the list currently?

I am going ahead and close this as completed. These workers and transformers are not worth migrated due to the TypeScript gymnastics.


[HANDS-ON BUG] Package to hub submission with a2c-PandaReachDense-v3 taking too log

Describe the bug
A clear and concise description of what the bug is.
Please share your notebook link so that we can reproduce the error
I have a model trained for the Actor Critic model in Colab but when I try to use the package to hub command it has taken over one hour to be uploaded. Please find the link to the notebook in my google drive, here : https://colab.research.google.com/drive/1cNckWMiP3DCejQuw7zJ01B1hYAcw8K_c?usp=sharing . Kindly help
Material

Did you use Google Colab?
Yes

Hey there 👋 the procress to upload with Panda Gym is approximately 10min (not because of the Hub but because of the Panda Gym lib).
From what I see the upload speed is super slow it might comes from either your internet connection or it was during a downtime of the hub.

In any case I saw you succeed to upload it: https://huggingface.co/Dotunnorth/a2c-PandaReachDense-v5


XGBoost continue train

Refer to How can I implement incremental training for xgboost?, I have a try, and I get loss.
Dataset: sklearn.datasets.load_boston
Problem type: Regression
%%time
import pandas as pd
import xgboost as xgb
from sklearn.model_selection import ShuffleSplit
from sklearn.datasets import load_boston
from sklearn.metrics import mean_squared_error as mse

boston = load_boston()
features = boston.feature_names
X = boston.data
y = boston.target

X = pd.DataFrame(X, columns=features)
y = pd.Series(y, index=X.index)

# split data into training and testing sets
rs = ShuffleSplit(test_size=0.3, n_splits=1, random_state=0)
for train_idx,test_idx in rs.split(X):  # this looks silly
    pass

train_split = round(len(train_idx) / 2)
train1_idx = train_idx[:train_split]
train2_idx = train_idx[train_split:]
X_train = X.loc[train_idx]
X_train_1 = X.loc[train1_idx]
X_train_2 = X.loc[train2_idx]
X_test = X.loc[test_idx]
y_train = y.loc[train_idx]
y_train_1 = y.loc[train1_idx]
y_train_2 = y.loc[train2_idx]
y_test = y.loc[test_idx]

xg_train_0 = xgb.DMatrix(X_train, label=y_train)
xg_train_1 = xgb.DMatrix(X_train_1, label=y_train_1)
xg_train_2 = xgb.DMatrix(X_train_2, label=y_train_2)
xg_test = xgb.DMatrix(X_test, label=y_test)

num_round = 15
verbose_eval = 5
watch_list = [(xg_test, 'xg_test')]

params = {'objective': 'reg:linear', 'verbose': False}
print('full train\t');
model_0 = xgb.train(params, xg_train_0, num_round, watch_list, verbose_eval=verbose_eval)
print('model 1 \t');
model_1 = xgb.train(params, xg_train_1, num_round, watch_list, verbose_eval=verbose_eval)
model_1.save_model('model_1.model')
print('model 2 \t');
model_2_v1 = xgb.train(params, xg_train_2, num_round, watch_list, verbose_eval=verbose_eval)
print('model 1+2\t, this logs show continue train, but got a test score same to model 1?');
model_2_v2 = xgb.train(params, xg_train_2, num_round, watch_list, verbose_eval=verbose_eval, xgb_model=model_1)

params.update({
    'process_type': 'update',
    'updater': 'refresh',
    'refresh_leaf': True,
})
print('model 1+update2\t, this logs do not show continue train, but got a best test score?');
model_2_v2_update = xgb.train(params, xg_train_2, num_round, watch_list, verbose_eval=verbose_eval, xgb_model=model_1)

print('full train\t', mse(model_0.predict(xg_test), y_test)) # benchmark
print('model 1 \t', mse(model_1.predict(xg_test), y_test))
print('model 2 \t', mse(model_2_v1.predict(xg_test), y_test))  # "before"
print('model 1+2\t', mse(model_2_v2.predict(xg_test), y_test))  # "after"
print('model 1+update2\t', mse(model_2_v2_update.predict(xg_test), y_test))  # "after"

Output:
full train
[0]	xg_test-rmse:16.9311
[5]	xg_test-rmse:5.36819
[10]	xg_test-rmse:4.41758
[14]	xg_test-rmse:4.28357
model 1
[0]	xg_test-rmse:17.078
[5]	xg_test-rmse:6.0592
[10]	xg_test-rmse:5.04216
[14]	xg_test-rmse:4.94968
model 2
[0]	xg_test-rmse:16.9631
[5]	xg_test-rmse:6.08084
[10]	xg_test-rmse:5.18633
[14]	xg_test-rmse:5.12085
model 1+2	, this logs show continue train, but got a test score same to model 1?
[0]	xg_test-rmse:4.72028
[5]	xg_test-rmse:4.79626
[10]	xg_test-rmse:4.96232
[14]	xg_test-rmse:4.96374
model 1+update2	, this logs do not show continue train, but got a best test score?
[0]	xg_test-rmse:17.0353
[5]	xg_test-rmse:5.0438
[10]	xg_test-rmse:3.9661
[14]	xg_test-rmse:3.91295
full train	 18.348929164523298
model 1 	 24.499370663166886
model 2 	 26.223108502105553
model 1+2	 24.63867891225536
model 1+update2	 15.311159054248336
CPU times: user 16.8 s, sys: 5.22 s, total: 22 s
Wall time: 2.67 s

Another try.
Dataset: sklearn.datasets.load_breast_cancer
Problem type: Classification(imbalanced dataset)
import pandas as pd
import xgboost as xgb
from sklearn.model_selection import ShuffleSplit
from sklearn.datasets import load_breast_cancer
from sklearn.metrics import accuracy_score, log_loss, roc_auc_score, precision_score, recall_score

cancer = load_breast_cancer()
features = cancer.feature_names
X = cancer.data
y = cancer.target
print(X.shape)

X = pd.DataFrame(X,columns=features)
y = pd.Series(y,index=X.index)

# split data into training and testing sets
rs = ShuffleSplit(test_size=0.3, n_splits=1, random_state=0)
for train_idx,test_idx in rs.split(X):  # this looks silly
    pass

train_split = round(len(train_idx) / 2)
train1_idx = train_idx[:train_split]
train2_idx = train_idx[train_split:]
X_train = X.loc[train_idx]
X_train_1 = X.loc[train1_idx]
X_train_2 = X.loc[train2_idx]
X_test = X.loc[test_idx]
y_train = y.loc[train_idx]
y_train_1 = y.loc[train1_idx]
y_train_2 = y.loc[train2_idx]
y_test = y.loc[test_idx]

xg_train_0 = xgb.DMatrix(X_train, label=y_train)
xg_train_1 = xgb.DMatrix(X_train_1, label=y_train_1)
xg_train_2 = xgb.DMatrix(X_train_2, label=y_train_2)
xg_test = xgb.DMatrix(X_test, label=y_test)

num_round = 15
verbose_eval = 5
watch_list = [(xg_test, 'xg_test')]

params = {'objective': 'binary:logistic', 'verbose': False, 'eval_metric': ['auc']}
print('full train\t');
model_0 = xgb.train(params, xg_train_0, num_round, watch_list, verbose_eval=verbose_eval)
print('model 1 \t');
model_1 = xgb.train(params, xg_train_1, num_round, watch_list, verbose_eval=verbose_eval)
model_1.save_model('model_1.model')
print('model 2 \t');
model_2_v1 = xgb.train(params, xg_train_2, num_round, watch_list, verbose_eval=verbose_eval)
print('model 1+2\t, this logs show continue train, but got a test score same to model 1?');
model_2_v2 = xgb.train(params, xg_train_2, num_round, watch_list, verbose_eval=verbose_eval, xgb_model=model_1)

params.update({
    'process_type': 'update',
    'updater': 'refresh',
    'refresh_leaf': True,
})
print('model 1+update2\t, this logs either do not show continue train, nor do not get a better score?'); model_2_v2_update = xgb.train(params, xg_train_2, num_round, watch_list, verbose_eval=verbose_eval, xgb_model=model_1)

print(model_0.predict(xg_test).shape)

def validation(model, x_data, y_data):
    y_data_proba = model.predict(xg_test)
    y_data_pred = (y_data_proba>=0.5).astype(int)

    acc = accuracy_score(y_test, y_data_pred)
    prec = precision_score(y_test, y_data_pred)
    recall = recall_score(y_test, y_data_pred)
    roc = roc_auc_score(y_test, y_data_proba)
    return acc, prec, recall, roc

print('full train\t acc: %.3f, prec: %.3f, recall: %.3f, roc: %.3f' % validation(model_0, xg_test, y_test)) # benchmark
print('model 1 \t acc: %.3f, prec: %.3f, recall: %.3f, roc: %.3f' % validation(model_1, xg_test, y_test))
print('model 2 \t acc: %.3f, prec: %.3f, recall: %.3f, roc: %.3f' % validation(model_2_v1, xg_test, y_test))  # "before"
print('model 1+2\t acc: %.3f, prec: %.3f, recall: %.3f, roc: %.3f' % validation(model_2_v2, xg_test, y_test))  # "after"
print('model 1+update2\t acc: %.3f, prec: %.3f, recall: %.3f, roc: %.3f' % validation(model_2_v2_update, xg_test, y_test))  # "after"

Output:
(569, 30)
full train
[0]	xg_test-auc:0.972443
[5]	xg_test-auc:0.993974
[10]	xg_test-auc:0.996987
[14]	xg_test-auc:0.997648
model 1
[0]	xg_test-auc:0.919165
[5]	xg_test-auc:0.970973
[10]	xg_test-auc:0.983686
[14]	xg_test-auc:0.985891
model 2
[0]	xg_test-auc:0.944591
[5]	xg_test-auc:0.99199
[10]	xg_test-auc:0.993974
[14]	xg_test-auc:0.993974
model 1+2	, this logs show continue train, but got a test score same to model 1?
[0]	xg_test-auc:0.987507
[5]	xg_test-auc:0.988977
[10]	xg_test-auc:0.98883
[14]	xg_test-auc:0.992504
model 1+update2	, this logs either do not show continue train, nor do not get a better score?
[0]	xg_test-auc:0.919165
[5]	xg_test-auc:0.969209
[10]	xg_test-auc:0.982951
[14]	xg_test-auc:0.984715
(171,)
full train	 acc: 0.971, prec: 0.981, recall: 0.972, roc: 0.998
model 1 	 acc: 0.924, prec: 0.952, recall: 0.926, roc: 0.986
model 2 	 acc: 0.942, prec: 0.945, recall: 0.963, roc: 0.994
model 1+2	 acc: 0.947, prec: 0.946, recall: 0.972, roc: 0.993
model 1+update2	 acc: 0.930, prec: 0.944, recall: 0.944, roc: 0.985

New discussions are welcomed at https://discuss.xgboost.ai/


getting a nnp_status_unsupported_hardware with nnp_initialize() on OSX 10.11.4

Hi,
I am getting a status nnp_status_unsupported_hardware  when i call nnp_initialize(). Was wondering if you have any idea if I am doing anything stupid?
I am on OSX 10.11.4
$ clang --version
Apple LLVM version 7.3.0 (clang-703.0.29)
Target: x86_64-apple-darwin15.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Thanks!

Most likely, you are trying to use NNPACK with unsupported processor. NNPACK requires a CPU with AVX2 (Intel Haswell, Broadwell, or Skylake).  I thought my 2.3 GHz Intel Core i7 was a skylake... ok l will test on another...


To Reproduce
Not sure how to reproduce.
Screenshots

Desktop (please complete the following information):

OS: macOS Ventura 13.1
Browser: Chrome
Version: 110.0.5481.100

I just did a hard reload and it fixed it, but probably still worth looking into why this happens.

Now this is happening on mobile.

The new issue of the app not loading on mobile is a different issue. PR is up to fix that. https://github.com/v0l/snort/pull/350


throw new TypeError(ErrorCodes.ClientMissingIntents);

$ node index.js
Output:
/home/node_modules/discord.js/src/client/Client.js:480
throw new TypeError(ErrorCodes.ClientMissingIntents);
^
TypeError [ClientMissingIntents]: Valid intents must be provided for the Client.
at Client._validateOptions (/home/node_modules/discord.js/src/client/Client.js:480:13)
at new Client (/home/node_modules/discord.js/src/client/Client.js:78:10)
at Object. (/home/pi/APGDB/index.js:7:13)
at Module._compile (node:internal/modules/cjs/loader:1149:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1203:10)
at Module.load (node:internal/modules/cjs/loader:1027:32)
at Module._load (node:internal/modules/cjs/loader:868:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47 {
code: 'ClientMissingIntents'
}
Node.js v18.10.0
whats wrong?

Hello @Aqtic0l, Most of my repositories used the old version of Discord which is v12 so to fix this problem you just have to downgrade your discord.js to v12
npm uninstall discord.js && npm i<EMAIL_ADDRESS>
I hope this fixes your problem.

Thx its Works!!


Wrong lines folding in sql when -- any comment line interfaring

VSCode Version: 1.24.1
OS Version: Linux Mint 18.3 64bit

Steps to Reproduce:

Write any code with brackets and comments

    WITH
        sample AS (
            WITH
                matrix_1 AS (
                    SELECT
                          ...
--                        ORDER BY ...
                )
              , matrix_2 AS (
                    SELECT
                          ...
--                        ORDER BY ...
                )
--            SELECT
--                   ...
--                   ...
            SELECT
                  ...
--                ORDER BY ...
        )

Try to fold sample, -- interfares in wrong way.

Does this issue occur when all extensions are disabled?: Yes
Tia

Do you have any extensions installed? Does it reproduce when launching with --disable-extensions?


Update Ukraine CTA in the contextual sidebar

What

Bring more focus to the ‘Invasion of Ukraine’ contextual sidebar by adding a flag-coloured border. Trello
Add new links for 4 key user journeys Trello

Why
There are now four clear entry points for user journeys, which need to be reflected in the links available in the sidebar. These entry points are:

people fleeing Ukraine applying for a visa to come to the UK
people fleeing Ukraine arriving in the UK
UK residents wanting to sponsor someone coming to the UK from Ukraine
people interested in the government’s response

To make it clear that this component is specifically for Ukraine, the border is changed to resemble the Ukraine flag.
Visual Changes
Before

After

I think the CSS and HTML looks good but have noticed we do have a test in spec/features/contextual_navigation_spec.rb that checks the links in the Ukraine call to action. Perhaps the three new links should be added to the then_i_see_the_ukraine_call_to_action helper function.

Thanks for the input. The test is now updated to look for at least one valid link. This is more flexible as the test won't need to be updated if/when the links change.


Undeclared name 'Auto_Cast' for type 'Field_Flag'

I'm getting a compilation error when trying to build from source:
/home/ptrschneider/distrobox/odin/.src/ols/src/server/analysis.odin(711:7) Error: Undeclared name 'Auto_Cast' for type 'Field_Flag'
        if .Auto_Cast in flags {
            ^~~~~~~~^
/home/ptrschneider/distrobox/odin/.src/ols/src/odin/printer/visit.odin(2606:6) Error: Undeclared name 'Auto_Cast' for type 'Field_Flag'
        if .Auto_Cast in flags {
            ^~~~~~~~^

Environment:

OS: Archlinux distrobox inside WSL (Ubuntu 22.04). I know it's an unusual setup, but the error message doesn't seem to be related to the setup.
odin version dev-2023-09:2aa3cabd8, from AUR package odin-git

Tried to install the language server both from source, and from the AUR package odinls, both gave the same error as a result.

There was a new odin change recently. It should now work with source.


fixes #107 -add a tag list legend

This adds a details section for explaining the tags in the proposals

@ljharb  your thoughts would be appreciated !

Is there a way to view this PR rendered?

yes, via netlify: https://deploy-preview-121--tc39-beta.netlify.com/
you can find the link here:


Multiple Y-Axis demo is not working anymore

Description
The chart is not drawn in full. The actual graph section is missing.
Steps to Reproduce

Go to the webpage

Expected Behavior
A visible chart
Actual Behavior
A chart with only the title and legend drawn
Screenshots

Reproduction Link
https://codepen.io/Guurco/pen/ExJovRa
I hope this is helpful.
You guys have been doing a great job on this library, many thanks :)

This is fixed in the next release.


Allow customizing LOCKEDBY value

Search first

[x] I searched and no similar issues were found

Description
Hi,
It will be really usefull if we are able to customise locked by value so that it can be set to GHA jobid etc.
Currently it is just the system name which can be meaningless in CI world.
Steps To Reproduce
NA
Expected/Desired Behavior
When we give a custom value for LOCKEDBY as an input to liquibase runtime, the databasechangeloglock row has the same LOCKEDBY value.
Liquibase Version
4.29.2
Database Vendor & Version
No response
Liquibase Integration
No response
Liquibase Extensions
No response
OS and/or Infrastructure Type/Provider
No response
Additional Context
No response
Are you willing to submit a PR?

[ ] I'm willing to submit a PR (Thank you!)

@bharathcp thanks for submitting this idea. How would customizing this value help you? Can you tell me how are you using the LOCKEDBY column in your workflow?


[MTB] Add Kyverno Policy - Require CAP_DROP_ALL

/assign @evalsocet

/assign @evalsocket

As a best practice, containers should drop all unnecessary capabilities:
        securityContext:
          capabilities:
            drop:
              - all

See: https://kubesec.io/basics/containers-securitycontext-capabilities-drop-index-all/
We need to add:

A benchmark
Validation tests
Kyverno and Gatekeeper/OPA policies that block workloads without a capabilities drop all.

@JimBugwadia I would be adding the benchmarks and gatekeeper policy, also if @evalsocket has not started working on writing Kyverno policy for this, can I write the Kyverno policy as well?

/remove-lifecycle stale

/remove-lifecycle stale

@Divya063 - there is an existing Kyverno sample policy for this at: https://github.com/kyverno/policies.
One concern is if this requirement may be too strict for tenant workloads. We need to further discuss that.

@Divya063 - there is an existing Kyverno sample policy for this at: https://github.com/kyverno/policies.
One concern is if this requirement may be too strict for tenant workloads. We need to further discuss that.

The policy is defined here: https://kyverno.io/policies/best-practices/require_drop_all/

The policy is defined here: https://kyverno.io/policies/best-practices/require_drop_all/


Expose misc ops at package level

cc @datumbox  @NicolasHug

We were going to expose using torchvision.nn ? #4333 Or is it decided with ops.misc.py ?

@oke-aditya The reason we are not doing it at the moment is because there is no consensus for renaming/moving stuff to nn. This PR is just addressing the fact that the classes are public but not exposed directly via ops. Though the RFC you send is still valid, I would recommend not to link the two so that we don't block fixing outstanding issues.

Can understand it :) thanks for the clarification.

Thanks for the PR @jdsgomes ,
If we're going to expose these in the torchvision.ops namespace, I think we should also expose them in the docs in ops.rst. These ops seem to lack docstring though, so maybe we should write some

Do you suggest adding the docstrings in this PR as well or that is out of scope and we should create a ticket for it?


Problems with installation instructions

After setting up my environment with conda, I ran into problems with
$ git checkout https://github.com/openai/human-eval
$ pip install -e human-eval

First, git checkout should be a git clone.
Then, when I run the pip command, I get
ERROR: human-eval is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with bzr+http, bzr+https, bzr+ssh, bzr+sftp, bzr+ftp, bzr+lp, bzr+file, git+http, git+https, git+ssh, git+git, git+file, hg+file, hg+http, hg+https, hg+ssh, hg+static-http, svn+ssh, svn+http, svn+https, svn+svn, svn+file).

Thanks for catching git checkout. It's fixed now.
Hm.. I haven't seen that before. What python/pip version are you using? Could you try again with python 3.7 and the latest pip? I'm using
$ pip --version
pypip 21.1.3 ...

I keep getting this error:
ModuleNotFoundError: No module named 'human_eval.data'; 'human_eval' is not a package

@jonpincus , you can simply run pip install -e . from the human-eval directory after cloning.

I think the human-eval here is the root path of this repo
@mtisz human_eval is a sub dir


Add GCC 11.1.0 and update GCC 10.2.0 to 10.3.0 on macOS

Tool information

Tool name: GCC
Tool license: GPL-3.0-or-later with GCC-exception-3.1
Add or update? update
Desired version: 11.1.0 and 10.3.0 (now only GCC 10.2.0)

Area for Triage:
C/C++
Question, Bug, or Feature?:
Feature
Virtual environments affected

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

Can this tool be installed during the build?
GCC 11.1.0 and 10.3.0 have been added to the homebrew
Are you willing to submit a PR?
Yes, if I have time

@PragmaTwice we have added gcc 11.1.0 to all the macOS images. They will be delivered next week.

@PragmaTwice the new image was deployed yesterday.
I'm going to close the issue. Please feel free to contact us if you have any concerns.
Thank you!