[DSIP][k8s] Support User-customized K8s YAML Task

Search before asking

[X] I had searched in the DSIP and found no similar DSIP.

Motivation
Supporting user-customized K8s YAML tasks has the following benefits:

Flexibility: Unlike the existing K8s low-code job with limited functionality, YAML tasks provide users with the flexibility to define sophisticated task instances in DolphinScheduler, similar to how custom JSON does in DataX.

Workflow Customization: Users can integrate operational and maintenance processes into DolphinScheduler using YAML for complex workflows.

Configuration Requirements: The current K8s low-code job does not meet users' in-depth needs, particularly for tasks involving multiple pods or specific configurations like environment variables and tolerations; in contrast, K8s YAML tasks do.

In short, by enabling user-customized YAML tasks, DolphinScheduler can better support a wide range of Kubernetes-based workflows and operational requirements.
Design Detail
2.1 Design Overview
The following is a Swimlane Diagram showing how this k8s YAML task is embedded into Apache DolphinScheduler:

Figure 2-1(1). Design Overview

User starts a Web page to edit and save K8s YAML Workflow.
UI provides an editor for user to input YAML in Custom Template mode.
API Server encapsulates command and hands it over to Master.
Master splits the workflow DAG and dispatches tasks to Worker.
Worker picks the appropriate task executor and operation. E.g., for k8s Pod YAML, Worker picks YAML Task Executor, and then picks Pod Operation.
Worker reports status to Master.
User reviews k8s YAML task log in the Task Instance Window.

2.2 Frontend Design
The frontend adds support for user-customized k8s YAML tasks while remaining compatible with the original k8s low-code jobs.

Figure 2-2(1). Design Overview

The Web UI layouts
When the user switches on the Custom Template, the Low-code k8s Job fields should hide and YAML editor should appear (or vice versa), similar to the JSON Custom Template in the DataX plugin.
This feature, as shown in Figure 2-2(1), is implemented using the Vue component span, which is controlled by reactive variables (such as yamlEditorSpan) in the file dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-k8s.ts.

The Request body
When the user switches to Custom Template mode, the request body should include only YAML-related fields (customConfig and yamlContent), and all previously hidden fields should not be sent.
This feature is implemented using the taskParams in the file dolphinscheduler-ui/src/views/projects/task/components/node/format-data.ts

i18n/locales
Apache DolphinScheduler is an international software and should support multiple languages.
The text on the Web UI are retrieved from variables defined in the file dolphinscheduler-ui/src/locales/{en_US, zh_CN}/project.ts. And for user-customized k8s YAML tasks, there are three key variables to consider:

k8s_custom_template: the label for the switch to enable user-customized k8s YAML tasks.
k8s_yaml_template: the label for the text editor used to input user YAML.
k8s_yaml_empty_tips: the warning message displayed when a user tries to submit empty YAML

This feature is implemented by invoking t('project.node.${variable_name}') (such as t('project.node.k8s_yaml_template')) in the file dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-k8s.ts.

2.3 Backend Design
The backend design describes the process of how the worker executes user-customized k8s YAML tasks. As shown in Figure 2-3(1), we can see how user-customized k8s YAML Pod tasks are related to the original k8s low-code jobs.

Figure 2-3(1). Backend Design Overview
After the worker checks the parameters, K8sYamlTaskExecutor is loaded for the current user-customized k8s YAML Pod task. Once the YAML is parsed into HasMetadata, its kind field is used to assign abstractK8sOperation as K8sPodOperation for executing the YAML Pod task.

K8s Task Executors

Figure 2-3(2). K8s Task Executors
Three k8s task executor are involved, as shown in Figure 2-3(2):

AbstractK8sTaskExecutor is an abstract class that represents a k8s task executor.
K8sTaskExecutor is a concrete class that extends AbstractK8sTaskExecutor to represent a low-code executor
K8sYamlTaskExecutor is a concrete class that extends AbstractK8sTaskExecutor to represent a user-customized k8s YAML task executor.

K8s Operation handler

Figure 2-3(3). K8s Operation Handlers
Two operation handlers are involved, as shown in Figure 2-3(3):

AbstractK8sOperation is an interface representing all k8s resource operations.
K8sPodOperation is a concrete class that implements AbstractK8sOperation to handle Pod operations

2.4 Usecase Design
A typical use case for a k8s YAML task includes uploading YAML, online workflows, and starting workflows, similar to k8s low-code jobs, unless users switch to the Custom Template option to fill in YAML.

Figure 2-4(1). Usecase Design

The user edits a k8s YAML node in a workflow
If the Custom Template is activated and YAML content is not blank, the user may online this whole workflow
If the workflow is online, the user may start the workflow and review the logs generated during the execution of the workflow.

Compatibility, Deprecation, and Migration Plan
3.1 Compatibility Plan
The user-customized k8s YAML feature requires only customConfig to be activated, By default, the value is 0, which applies to the existing k8s low-code jobs.
Action List: Extension of operations for the k8s YAML task:

[x] Pod  #15301
[ ] ConfigMaps
[ ] ...

The remainder of this section will demonstrate the flexibility and compatibility of this design by using the example of introducing Configmaps:
    this.k8sYamlType = K8sYamlType.valueOf(this.metadata.getKind());
    generateOperation();

After parsing with YamlUtils::load, the kind field acquired by this.metadata.getKind() will be ConfigMaps. Then, this.k8sYamlType is determined and used to generate the corresponding operations:
    private void generateOperation() {
        switch (k8sYamlType) {
            case Pod:
                abstractK8sOperation = new K8sPodOperation(k8sUtils.getClient());
                break;
            case ConfigMaps:
                abstractK8sOperation = new K8sConfigmapsOperation(k8sUtils.getClient());
                break;
            default:
                throw new TaskException(
                        String.format("K8sYamlTaskExecutor do not support type %s", k8sYamlType.name()));
        }
    }

Consequently, generateOperation() will set this.abstractK8sOperation to a new instance of K8sConfigmapsOperation. Next, we can implement K8sConfigmapsOperation to handle the ConfigMaps operations.
3.2 Deprecation Plan
N/A for now, waiting for community opinions.
3.3 Migration Plan
N/A for now, waiting for community opinions.
Test Plan
4.1 Overview
The User-customized k8s YAML task feature allows users to submit YAML task to k8s, including Pod, ConfigMaps, and other resources.
This test plan aims to ensure that the feature functions as expected and meets user requirements.
4.2 Scope

YAML Pod

Test Case #
Name
Action
Expectation

1
UI Display
Edit YAML, save and reopen
The YAML content stays up-to-date.

2
UI Validation
try to submit empty YAML
The UI modal dialog intercepts empty YAML.

3
Online Workflow
Save workflow, and online
The User successfully brings the workflow online.

4
Dryrun Workflow
Run workflow as dryrun mode
The Master successfully dry runs this task.

5
Test Workflow
Run workflow as test mode
The Worker successfully tests this task.

6
Run Workflow
Run workflow
The Worker successfully runs this task.

Code of Conduct

[X] I agree to follow this project's Code of Conduct

cc @Gallardot @ruanwenjun

@caishunfeng pls help to add this issue to #14102

@caishunfeng pls help to add this issue to #14102

Done. You're also DS Committer and have permission to add to it.

Before discussing this DSIP, I hope everyone can reach a basic consensus.  Supporting customization can indeed meet more demand scenarios, but excessive customization can bring more problems.
I see in the design that it supports users to directly create pod and configmap, and even supports creating multiple POD.
Regarding the support for configmap, I have some questions:

Why support configmap?  For the same workflow, does it create a configmap for each task instance?  Is the content in the configmap different each time?
If it is the same, why create it each time?  As a configuration resource in k8s, shouldn't configmap be static?  As a way to obtain configuration, besides configmap, should secret also be supported?
Should the configmap be mounted to the pod as a file?  If so, should PV and PVC be supported?
If it is just to reference the configuration in the configmap, can it be directly referenced through env?

Regarding the support for pod, I have some questions:

How is the name of the pod defined?
How is the lifecycle of the pod managed?  Will DS delete it after the task ends?  How to ensure that DS can definitely delete it?
If the execution strategy of the workflow is parallel, how should the pod be handled?
If multiple pods are created at the same time, are these pods related?  Or is it just to run multiple pods concurrently?  If it is concurrent, does it support deployments?  Does it support StatefulSet?  Should DS manage it as a controller of k8s resources?  I am afraid this is not what DS should do.
Or more broadly, do you want to support the task of creating helm charts?

If the issues are not adequately addressed, I am afraid I will vote -1 on this DSIP.

For each type, we can set a strategy. The first strategy is to ignore if it exists, and the second strategy is to delete first and then add to meet various scenarios.
Add two labels to the pod according to the strategy type. If it is an ignore if it exists strategy, use taskCode as the label. If it is a delete first and then add strategy, use taskInstanceId.
Delete the pod according to the label

ObjectMeta.setLabel

We can also use taskInstance to replace the user-defined pod name

ObjectMeta.setName

5.Perhaps this issue can be targeted at a single pod, without considering multiple pods. In fact, if there are multiple pods in a node, we can give multiple pods a label with the value of processInstance, and obtain multiple pods through processInstance and obtain logs separately.
@Gallardot  cc @EricGao888 @Mighten @SbloodyS  WDYT?

@Mighten I suggest that this issue only consider pods, and other types can be expanded and discussed in other issues later.

Totally agreed with @Gallardot
From my persional perspective, since DS is a scheduling system. The current k8s task is mainly used to replace the cron-job of k8s. And we have no plans to support k8s deployment scheduling management since this maintenance will involve a huge amount of work. So we need to reach a basic consensus.

This is indeed too big. At present, the most commonly used in our company are configMap and pod types. Deployments are only used when using flink. ConfigMap is usually initiated by users or when users modify their own configurations. In most cases, pod type is the most commonly used type. We can open an issue only for pods and first discuss how to complete type of  pods.
cc @Gallardot @SbloodyS

For the scenario of a pod with multiple containers, I think it is necessary to divide the logs by container. When querying the logs, the front end needs to pass the container name to check the logs of the specific container. The front end needs to make a table to switch containers to view the logs. This transformation is a bit much. I hope that this issue will only consider a single pod and a single container.

From the current low-code functions of k8s Task, it is to put a pod in a job type task, which is not much different from a single pod task.

I agree with @Gallardot  thinking. And for @fuchanghai  said support pod level. Few questions:

How to limit users just create pod jobs. And if the user wants to create like a deployment, we need to parse the user's yaml and check?

I agree it's not just a pod creation. It's more like a pod managent. For now, If user start a spark job or other k8s job. We can add some limit for this pods. But user can defined yaml can avoid this policy, can occur lots of chain questions.

Which scenario needs user defined a pods? We have a k8s pod now, If our k8s job can't support some function like specific configurations like environment variables and tolerations. We can enhance and support them.

Overall, vote -1 for this DSIP.

My suggestion is that using a single pod with a single container, this scenario is suitable for rapid testing and development.
And to concern, my response are as follows,
1. How is the name of the Pod defined? How can different workflows in the same namespace ensure that Pod names do not duplicate?
Pod names must be unique within the same namespace in Kubernetes. DS can generate unique names programmatically using Kubernetes Java Client API by appending identifiers like workflow name, task ID, and timestamp or uuid, this is not difficult.
2. How is the Pod lifecycle managed? Will DS delete it after the task ends? How to ensure that DS can definitely delete it?
DS can control the creation and deletion of Pods. After task completion through API, DS can use the deleteNamespacedPod method to delete the pods,  retry mechanisms or manual cleanup calls can be used.
3. How are Pods handled if the workflow execution strategy is parallel?
For parallel execution, DS can create multiple Pods simultaneously. Each Pod runs independently, managed by unique configurations and labels. Each task can create its own Pod, ensuring resource separation and independent execution.
4. If multiple Pods are created simultaneously, are these Pods related, or do they just run concurrently? Does it support Deployments and StatefulSets? Should DS manage it as a controller of Kubernetes resources?
Multiple Pods created for parallel tasks are independent of each other. DS manages these Pods individually using the Kubernetes API rather than as a controller. For more complex scenarios like continuously running services (Deployments) StatefulSets, it is recommended to let Kubernetes native controllers manage these resources instead of DS, DS focuses on task scheduling.
5. Does DS support tasks for creating Helm Charts?
DS doesn’t natively include task types for directly deploying Helm Charts.
6. How to retrieve the logs of a Pod? How to retrieve logs of multiple Pods? If a Pod contains multiple containers, how to retrieve the logs of multiple containers?
DS can retrieve logs by calling the API of K8s.

Closing for no plans to do this.


Add Support for Greeting Messages via greeting.yaml

Describe your chaotic idea
Implement a greeting.yaml configuration file to handle customizable greeting messages for users. This file will allow project maintainers or contributors to easily define and update greeting messages for various use cases such as:
Welcoming new contributors.
Providing project-specific instructions.
Offering guidance for first-time users or visitors.
Add Screenshots or Sketches
none
Confirm

[X] I understand that my idea will add to the chaos and I'm okay with it
[X] I agree to follow this project's Code of Conduct
[X] I want to work on this feature
[X] I'm GSSOC'24 Extd registered Contributor
[X] I'm Hacktoberfest registered Contributor

Go ahead!


[ZEPPELIN-3656] Fix for completion with Livy interpreter

What is this PR for?
Fix for NullPointerException when using code completion in the Livy Interpreter when Shared Interpreter is enabled.
What type of PR is it?
Bug Fix
What is the Jira issue?
ZEPPELIN-3656
How should this be tested?
Run Livy Interpreter in an environment where Shared Interpreter is enabled and attempt to trigger code completions.
A unit test has been added to test the completion API when using a shared interpreter. Before applying the fix this test was failing with the same NPE.
Screenshots (if appropriate)
Questions:

Does the licenses files need update? No
Is there breaking changes for older versions? No
Does this needs documentation? No

Please add unit test

@zjffdu I've added a test and it builds in Travis: https://travis-ci.org/alexjbush/zeppelin/builds/407942421
Seems like it's failing to check out the code in Jenkins. Is there some reason for this?
Also, how can this be applied to master and 0.8.1? Will you do the merge to 0.8.1 after this is merged to master?

@alexjbush Not sure what's wrong with jenkins. Maybe you can try it later.
Regarding 0.8.1, I plan to release it round one month later. Because there's other issues needs to be fixed.

@zjffdu Yes, but can this fix go into both master and branch-0.8 branches? Who will do this cherry picking for branch-0.8?

Don't worry, I will do the cherry-pick


Dashboard does not load sometimes

Dashboard does not load sometimes (Almost 50% times it gives error). Chunk loading failed error in browser console
Checklist:

[ ] I've searched in the docs and FAQ for my answer
[ ] I've included steps to reproduce the bug.

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
[ordered list the process to finding and recreating the issue, example below]

User goes to Create an application (to save space or whatever)
User selects clone option
Configmap in environment override is not cloned

Expected behavior
A clear and concise description of what you expected to happen.
Current behavior
describe what you currently experienced from this process, and thereby explain the bug
Screenshots
If applicable, add screenshots to help explain your problem.
Logs
Paste any relevant application logs here.

This is resolved


(feat): platform abstraction

First, thank you for sharing this amazing project with Open Source community.
The purpose of this PR is to allow to use ngx-dyanamic-hooks with non-browser platforms; for example Angular Universal and Angular for NativeScript.
This PR introduces a new PlatformService that is responsible for platform specific operations (e.g. DOM manipulation).
The default implementation of PlatformService is called PlatformBrowserService that deals native HTML DOM.
With this abstraction layer, a developer will be able to implement its own PlatformService. I've added a section (8.2) to the README.md for more details.
Thank you!

Hey there!
thanks for the great contribution. I've looked through your changes and they seem to expand the library quite seamlessly. You may have noticed that I tried to use the Angular Renderer2 where I could, but sometimes had some trouble with it working reliably so I kind of gave up on cross-platform support and just made it work for now. So your PR is a meaningful improvement.
Given that users can now create their own PlatformServices, I wonder if we could make the return types of the get-methods they would implement more explicit for them - specifically for failure? For example, I saw that most methods would return null when the operation fails in some way (as specified in your tests). However, this isn't mentioned in the method documentation of the abstract PlatformService class, so users wouldn't necessarily know how to handle errors without looking at the tests. Maybe this could be added to the method comments? E.g.

getTagName() should return the tag name or null on error
getAngularVersion() should return the angular version or 0 on error
getChildNodes() should return the child nodes if they exist, and empty array if not and null on error

Being super-specific about it would future-proof the library a bit.
Also, it seems that PlatformBrowserService.getAttribute() is supposed to return null on error, but actually would return undefined right now. From what I read, the test doesn't fail because it seems expect().toBeNull() also evaluates as true for undefined, weirdly enough.

Thank you very much for your feedback. I've added more comments to the abstract class as well as more details in README.md. Please let me know if more changes required.
Cheers!

Hey there,
everything looks good from what I can tell so I've merged your changes for v1.7.0 of the library, which is already published and ready for download :-]
I wonder if perhaps for the future, it would be a nice idea to add more out-of-the-box PlatformServices much like PlatformBrowserService, just for the other common platforms you mentioned (server, mobile). Users could then comfortably import these PlatformServices from the library and hand them to forRoot() without having to write a line of code about it. Going the extra mile would then having the library "guess" the platform it is currently running on and loading an appropriate default PlatformService (which can still be manually overwritten via forRoot()).
But that's a task for another day. I'm not really experienced with Angular Universal or NativeScript and it works well enough for now.
Thank you again for this neat contribution!


Adding vmin and vmax to gplt.choropleth

Hi,
I've just started using geoplot and I wanted to plot several maps in one figure with one shared colorscale. When I plot the maps individually in the figure the value ranges of the colorscales differ depending on the data and then the maps are not well comparable. How do you feel about adding a vmin and vmax parameters to gplt.choropleth to control the value range of the colorscale of each map? In this way one could make sure that all maps use the same colorscale. I experimented a bit with the code yesterday and it seems like it only takes a small change in geoplot.py.
https://github.com/redfrexx/geoplot/blob/2bf00a289938821b57ef8c88dc7667a0278592bc/geoplot/geoplot.py#L68-L69
Or is there another way of plotting several maps in one figure with just one shared colorscale?

Thanks for submitting this issue! Looks like there's a bit of work that needs to be done here to support this feature request.
geoplot actually did use to have vmin and vmax parameters for all of the plot types that supported a colormap. This feature was removed in the 0.3.0 release in order to reduce the top-level complexity of the API. vmin and vmax were not great top-level parameters because:

Colorbar manipulation is an advanced use-case.
vmin and vmax are defined parameters in a small handful of the plot types in matplotlib—mainly imshow and contour. Most other plot types in matplotlib have you normalize the colormap yourself, and pass the resulting RGBA values directly to the plot. For example, here is the answer provided for this question on StackOverflow:

cmap= plt.cm.bone_r
# create normalization instance
norm = matplotlib.colors.Normalize(vmin=0, vmax=1000)
# create a scalarmappable from the colormap
sm = matplotlib.cm.ScalarMappable(cmap=cmap, norm=norm)
sm.set_array([])
barHeight = 3
ticklist = []
def drawLoadDuration(period, starty, voltage):
    ax3.broken_barh((period), (starty, barHeight), alpha=1,
                    facecolors=cmap(norm(voltage)), lw=0.5, zorder=2)

This hints at the correct way to normalize your colormap in geoplot, which would be using the following recipe:
import matplotlib as mpl
import matplotlib.pyplot as plt
import geoplot as gplt

norm = mpl.colors.Normalize(vmin=1, vmax=5)
cmap = mpl.cm.ScalarMappable(norm=norm, cmap='viridis').cmap

fig, axarr = plt.subplots(1, 2, figsize=(16, 6))

gplt.pointplot(
    injurious_collisions[injurious_collisions['NUMBER OF PERSONS INJURED'] <= 5],
    hue='NUMBER OF PERSONS INJURED',
    legend=True,
    cmap=lambda v: cmap(norm(v)),
    ax=axarr[0]
)

gplt.pointplot(
    injurious_collisions[injurious_collisions['NUMBER OF PERSONS INJURED'] >= 3],
    hue='NUMBER OF PERSONS INJURED',
    legend=True,
    cmap=lambda v: cmap(norm(v)),
    ax=axarr[1]
)

Unforunately cmap currently only supports input in the form of a matplotlib.colors.Colormap instance or a predefined string name for such a colormap. geoplot does not currently support passing a custom function such as this. I will backlog adding this feature to the API.
So the TLDR is that no, this isn't possible yet, but will be "soon"™.

Thank you very much for your answer! I'll stick to this solution then for now.

Any chance you'd consider letting the user pass in a norm object and under the hood do lambda v: cmap(norm(v)) mostly because I think cmap=cmap, norm=norm is a common enough usage pattern that users would expect it (I did), whereas honestly lambda v: cmap(norm(v)) is a bit harder to explain (and frankly not even intuitive to me).

I like the idea of having a norm parameter, yeah. That covers all of the colormap uses cases. Perhaps both the ability to pass a function and the norm should be added.

Colormap normalization has now been added to geoplot as of #168.
The changeset that I pushed was ultimately very small, but I experimented with and ultimately abandoned a couple of more advanced and technically intricate changes that I ultimately abandoned, but nevertheless want to document here for posterity:

Allowing an arbitrary function as input to norm.
This turned out to not work so well because it prevented the use of a legend (e.g. setting legend=True) when a continuous colormap is used (e.g. k=None). That's because a function is a discrete representation of a color scale, whereas the colorbar used for the legend when the colormap is continuous requires a continuous representation. matplotlib would barf.
The combination of colorbar manipulation and colormap normalization should cover most of the use cases, although it may be a bit heavy-handed code-wise.

Allowing an arbitrary function as input to cmap.
This this has the same colorbar-breaking problem as abritrary norms. This also breaks convention with the matplotlib API, which has a different way of specifying custom colors (see the next bullet point).

Allowing a list of colors as input to color.
Many matplotlib plotters allow you to specify custom colors per feature by passing a list or iterable to the color parameter. This does not work in geoplot: currently you can only set a single static color (e.g. steelblue or (0.5, 0.5, 0.5, 0.5)) via the color parameter.
color is in many cases not specific enough, however, and has overlapping jurisdiction with much better defined variables like facecolor and edgecolor. geoplot supports color as best it can, but prefers the latter two both in the implementation and in the documentation.
However neither facecolor nor edgecolor is a plot property; these are instead individual properties of the plot markers (e.g. descartes.Polygon or descartes.Point objects), and don't make sense as listlike inputs, and are not typically specified as listlike inputs, so the user wouldn't expect to be able to specify them as such. It would also be surprising if these properties could be specified as lists whilst other keyword properties passed to the markers could not could not...
All in all this would create a lot of code complexity for a very small and not very discoverable feature benefit.

@redfrexx [Assuming you are OK with installing from master 😛] you can now do what you wanted to do by using the norm parameter:
import matplotlib as mpl
import matplotlib.pyplot as plt
import geoplot as gplt

norm = mpl.colors.Normalize(vmin=1, vmax=5)
cmap = mpl.cm.ScalarMappable(norm=norm, cmap='viridis').cmap

fig, axarr = plt.subplots(1, 2, figsize=(16, 6))

gplt.pointplot(
    injurious_collisions[injurious_collisions['NUMBER OF PERSONS INJURED'] <= 5],
    hue='NUMBER OF PERSONS INJURED',
    legend=True,
    cmap=cmap,
    norm=norm,
    ax=axarr[0]
)

gplt.pointplot(
    injurious_collisions[injurious_collisions['NUMBER OF PERSONS INJURED'] >= 3],
    hue='NUMBER OF PERSONS INJURED',
    legend=True,
    cmap=cmap,
    norm=norm,
    ax=axarr[1]
)

One thing to be careful about: normalization will be applied to the colormap after quantization is applied to it. So if you are using a categorical colormap, e.g. k != None, your normalization should expect input in the form 0...N, where N is the number of categories your data has been bucketed into (presumably, N == k). Depending on your needs, you may want to use a continuous colormap (e.g. set k=None) to avoid this road bump entirely.

@story645 The norm parameter is now implemented. Thanks for your help in thinking this feature through!


Fix issue where holding down the space/enter key invokes item rapidly

Description

Only handle space/enter key in key up, not when key is pressed down to prevent item being invoked multiple times.
Motivation and Context

Fixes #1785
How Has This Been Tested?

Tested manually, since we currently have no way to test holding down a key for an extended period of time.
Screenshots (if appropriate):

/azp run

Will this PR create (merge) issues with #2271 @ojhad ?

Will this PR create (merge) issues with #2271 @ojhad ?

It will in the current state because I remove KeyUp handling in that PR. However, lets see where the discussion above takes us, we might not want to do handling in the KeyUp.

It will in the current state because I remove KeyUp handling in that PR. However, lets see where the discussion above takes us, we might not want to do handling in the KeyUp.

Oh, okay I see, Worst case is that one has to merge those few lines, so it's not that bad.

/azp run

/azp run

Looks like there were some test failures in this run:
InteractionTests.NavigationViewTests.VerifyHoldingKeyOnlyInvokesOnce
InteractionTests.NavigationViewTests.SettingsItemGamepadTest
Please take a look.

Taking a look now, thanks for the ping!

So I've fixed the SettingsItemGamepadTest test. Regarding the other test, I think it best to wait until we know whether we want to handle a button on keydown or keyup, since in either way there will be a "lot" changes.

Updated the behavior now, unfortunately I had to readd the KeyUp handlers you removed in #2271

/azp run

/azp run

Why reinvent the wheel instead of using KeyRoutedEventArgs.KeyStatus.RepeatCount ?
https://github.com/microsoft/microsoft-ui-xaml/issues/2471

Tbh I wasn't aware that that existed. But looking at the doc history for that property it seems that it was unreliable in some windows version, so maybe it is good not to rely on that since we might be running on an old windows version that has not yet received a fix for that.
Also "reinventing the wheel" might be a stretch here, it's not that complex of a fix after all.

I exaggerated a bit regarding "reinventing a wheel" :)
But seems that a CorePhysicalKeyStatus is as reliable as an wParam of WM_KEYDOWN. And actually CorePhysicalKeyStatus.WasKeyDown should be used instead of CorePhysicalKeyStatus.RepeatCount

Yes we could use WasKeyDown here.
Regarding reliability, I was referring to this comment/issue: https://github.com/MicrosoftDocs/winrt-api/issues/833
But since WasKeyDown would work, that doesn't matter anymore.

From documentation of WM_KEYDOWN it seems that RepeatCount is used when several key downs are coalesced, it is explicitly specified that it is not cumulative when several key down events are sent. And probably for application that pump messages fast enough - each event is delivered separately with RepeatCount == 1
https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-keydown
0-15 | The repeat count for the current message. The value is the number of times the keystroke is autorepeated as a result of the user holding down the key. If the keystroke is held long enough, multiple messages are sent. However, the repeat count is not cumulative.
Because of the autorepeat feature, more than one WM_KEYDOWN message may be posted before a WM_KEYUP message is posted. The previous key state (bit 30) can be used to determine whether the WM_KEYDOWN message indicates the first down transition or a repeated down transition.
I did input handling subsystem for Live Home 3D on WinRT, macOS and iOS, and used to fill voids in WinRT documentation by using Win32 docs for underlying technology.


[build-script] By default provide preset substitutions for the build_…

…root/source_root.
This will enable us to eliminate in many presets the substitutions for symroot,
destdir. We are already just using a standard directory with respect to the
build_root. The source_root just seemed like goodness to add as well.

I still need to add tests for this, but I wanted to show @Rostepher and @shahmishal since this seems really useful in terms of slimming down our presets.

Can one of the admins verify this patch?


Incorrect documentation for ngMock/function/angular.mock.inject

The documentation says that angular.mock.inject takes (...Function).
In reality, it takes (...(Function|!Array<string|Function>)).
In addition, the documentation should be updated to include an example like this:
beforeEach( inject( ['@q', function($q) {
  ...
}]));

This is needed when tests are minified and is supported correctly when specifying the params in string form before the function.

I think angular.mock.module may also be missing a parameter.

This is a common problem with functions that are injectable, see https://github.com/angular/angular.js/issues/11399. Why do you minify your tests?

I don't minify my tests.  I work for Google and was working on improving the externs for angular.mock.inject and angular.mock.module and while building dependencies of this externs file, I came across build breaks resulting because they passed an array into inject.  This particular case ran their tests as is and compiled (which obfuscates function params).

So this breaks because the code was minified, not when the tests are minified.


unable to read memory

i have some eror when i memory dump the eror is unable to read memory
please for solutions

Can you share the output from AVML here?

Pada tanggal Sab, 19 Mar 2022 00.58, bmc-msft @.***>
menulis:

Can you share the output from AVML here?
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/avml/issues/73#issuecomment-1072657421, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AQJNFX7D2GP5G5PYW4M4AITVAS74NANCNFSM5RB3YCHQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID:
@.***>

Can you share the output from AVML here?

Can you share the output from AVML here?

ubuntu@UbuntuNet:~/Desktop$ sudo ./avml memory.dmp
Error: error: unable to read memory
caused by:
0: unable to create memory snapshot:
error: unable to create memory snapshot from source: /dev/crash
caused by:
0: unable to create memory snapshot
1: unable to read memory
2: No such file or directory (os error 2)
    error: unable to create memory snapshot from source: /proc/kcore
    caused by:
        0: unable to find memory range:<PHONE_NUMBER>..1793750615

    error: unable to create memory snapshot from source: /dev/mem
    caused by:
        0: unable to create memory snapshot
        1: write block failed: 1048576..1793703959


Purge data when deleting block-level rules. Fix naming of tape RSEs t…

Purge data when deleting block-level rules. Fix naming of tape RSEs taken from database
Status
ready
Description
Tier0 needs data to be deleted as soon as possible. Because of this, the purge_replicas option is now used when deleting block-level rules.
On the other hand,I added a naming fix, in case database uses _MSS as suffix for tape sites. The suffix will be replaced by _Tape.
Is it backward compatible (if not, which system it affects?)
YES
Related PRs
This fixes an issue #9959
External dependencies / deployment changes
This does not require deployment changes

@germanfgv I guess you need it to be backported to the wmagent branch too, right?

@germanfgv I guess you need it to be backported to the wmagent branch too, right?

This would be nice, but is not necessary. We can patch our agents.


introduce sticky class and style for figure caption

The corresponding PR in https://github.com/music-encoding/guidelines/pull/112 has been merged already. @kepper?

addresses https://github.com/music-encoding/guidelines/issues/154
@bwbohl have a look and merge.

but we should keep 8d5aa0fd6e9ed24766e3822270c565149c94755f, shouldn't we?

@kepper thanks for reminding me! now as 9abaa2f included in #126


Add to_dict in DataFrame and Series

This PR adds to_dict in DataFrame and Series.
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_dict.html#pandas.DataFrame.to_dict
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.to_dict.html#pandas.Series.to_dict

Codecov Report

Merging #228 into master will increase coverage by 0.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #228      +/-   ##
==========================================
+ Coverage   90.83%   90.84%   +0.01%
==========================================
  Files          33       33
  Lines        2901     2907       +6
==========================================
+ Hits         2635     2641       +6
  Misses        266      266

Impacted Files
Coverage Δ

databricks/koalas/missing/frame.py
100% <ø> (ø)
:arrow_up:

databricks/koalas/missing/series.py
100% <ø> (ø)
:arrow_up:

databricks/koalas/series.py
90.37% <100%> (+0.16%)
:arrow_up:

databricks/koalas/frame.py
88.2% <100%> (+0.12%)
:arrow_up:

Continue to review full report at Codecov.

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

LGTM other than another note for series.py

Sorry that I rushed to address the comments. Will address them closely next time.
Merged.


Reload Widget

Add button to reload widget

@Leonavichus it's been a long time man

@Leonavichus it's been a long time man

@saltsoftdrink
Sounds pretty demanding from someone who hasn't contributed anything and got an app for free. People do open source projects in their spare time and they're not your personal code monkeys. Feel free to contribute to the code and add a fix instead of jumping on everyone's code repos to basically demand features.


fallback reply

Hi,
if I'm defining a Question object and set a fallback like ->fallback('Unable to create a new database') do I have to call something during $this->ask(... to "fire" the fallback? I'm using the example askForDatabase() from the docs and the fallback reply is not visible (facebook driver)
Thank you.

The fallback is currently only available for Slack messages. See https://api.slack.com/docs/message-attachments
I'm not sure if Facebook supports fallback messages.

ok, I see, thank you. Maybe you could update the documentation (if this has not occurred already).


feat: 移除 PopConfirm 导出

Codecov Report

:exclamation: No coverage uploaded for pull request base (develop@3b82c6d). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             develop     #614   +/-   ##
==========================================
  Coverage           ?   64.36%
==========================================
  Files              ?      725
  Lines              ?    12621
  Branches           ?     3021
==========================================
  Hits               ?     8124
  Misses             ?     4497
  Partials           ?        0

Continue to review full report at Codecov.

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


Added deprecation warning to Array.groupByKey(keyForValue:) method

Checklist

[x] I checked the Contributing Guidelines before creating this request.
[ ] New extensions are written in Swift 4.
[ ] New extensions support iOS 8.0+ / tvOS 9.0+ / macOS 10.10+ / watchOS 2.0+.
[ ] I have added tests for new extensions, and they passed.
[ ] All extensions have a clear comments explaining their functionality, all parameters and return type in English.
[ ] All extensions are declared as public.
[x] I have added a changelog entry describing my changes.

          1 Warning

:warning:
Consider adding tests for new extensions or updating existing tests for a modified SwifterSwift extension

          1 Message

:book:
Thank you for submitting a pull request to SwifterSwift. The team will review your submission as soon as possible.

  Generated by :no_entry_sign: Danger

@LucianoPAlmeida Fixed.

Why did you deprecate this method? I try to find any info about this, but find nothing.

@comm1x We deprecated it right after swift standard library introduced init(grouping: )


feat(java): add getHistory() to ChatFutures

This PR adds a ChatFutures.getChatHistory() helper method for Java developers to be able to obtain the chat history. This new method should be equivalent to Kotlin's Chat.history.

could you also run the change tool here since its a user visible change?


Conservatively process control commands

Processing control command comments on every single node in a file (Linter#visit), for every single linter, seems heavy. I've changed the workflow to only search for control commands if the file has any at all (presumably, most files don't).
Linting Bootstrap 4 Alpha took ~11 seconds before this fix, and ~9 seconds after this fix.

Nice find, @srawlins. Thanks again for your efforts on improving the tool's performance.
Merged in 33cf2bcd615d37d1797ea3fc4dff4a50a0506576.


fix: SplashScreen is closable by pressing ESC key

🐛 Bug Report
SplashScreen is closable by pressing ESC key.
💻 Repro or Code Sample
The behaviour is reproducable in demo site: https://www.fluentui-blazor.net/SplashScreen
or in the sample at https://github.com/emetrix/Samples.BlazorFluentUI-Splashscreen
🤔 Expected Behavior
A splashscreen for e.g. indicating long running tasks should not be closable by the user.
😯 Current Behavior

The SplashScreen closes when the Escape key is pressed by the user.
💁 Possible Solution

ignoring ESC or all key presses while a splashscreen is displayed ?
🔦 Context
I try to use a custom splashscreen during calculations and data access operations.
Therefore the dialog should not be closable by the users.
🌍 Your Environment

OS & Device: Windows 11 on PC
Browser: Microsoft Edge
.NET and Fluent UI Blazor library Version: 8.0.3 and 4.6.0

Hi Tobi,
See the example at https://www.fluentui-blazor.net/Dialog#customizeddialog for a dialog that cannot be closed/dismissed by using the 'Esc' key. I'm assuming this works for a Splash Screen as well (but not 100% sure).
Please test and let us know.
Danke!

Hi Vincent, thank you for your feedback.
All dialog samples except Customized Dialog and Editable Dialog closes when the Esc key is pressed.
But I can't see why the behaviour differs in the samples - or how to modiy it ?

My first guess would be it is because of PreventDismissOnOverlayClick being set. I would need to look at the code to be sure. But not doing that now. Enjoying the ☀ for a bit!

Just tried PreventDismissOnOverlayClick: For the SplashScreen I can see no difference at setting this to true or false ?
private async Task ShowLoadScreenAsync()
{
        parameters = new()
            {
                DialogType = DialogType.SplashScreen,
                PreventDismissOnOverlayClick = true,

                Content = new()
                {
                    DisplayTime = 0,
                    LoadingText = "Loading data..."
                },

                Width  = "300px",
                Height = "110px"
            };

        _dialog = await DialogService.ShowSplashScreenAsync<CustomLoadScreen>(parameters);
}

We could add an option to prevent the user from closing the SplashScreen, but I don't find it disturbing that, by default, the ESC key can do this. This is also available in Office applications.

I would be thankful if you could implement such an option/feature.
In case of a splashscreen indicating a (long) running task closing the screen would lead to a white/blank screen until the task is finished - which I think would irritate users.

I agree. That could be an interesting feature.

#1811 will fix this issue.

I would be thankful if you could implement such an option/feature. In case of a splashscreen indicating a (long) running task closing the screen would lead to a white/blank screen until the task is finished - which I think would irritate users.

So there is a switch for it already: PreventDismissOnOverlayClick
It just wasn't used in the actual ialog calling function yet. With the fix from Denis this works now as expected.


Error when deleting a digit from PinInput

I have a simple PinInput component from native-base which I can input digit with it. An error occur when I try to delete a digit from it. And the error is shown in below.
my simple PinInput component:
const TestScreenTwo = () => {
    return (
        <PinInput inputSize="md">
            <PinInput.Field />
            <PinInput.Field />
            <PinInput.Field />
            <PinInput.Field />
        </PinInput>
    );
};

Environment:

platform: Andriod( on both real and virtual devices) with API 29
npm with node: v14.16.1
package:
"native-base": "^3.0.6",
"react": "17.0.1",
"react-native": "0.64.2",

i had the same issue, is there any update?

Sorry for the trouble but Accordion is not released and supported right now. It's on the roadmap and will be supported in future release. The components present in the sidebar in the docs are the only ones that are released till now.


manjaro option --size not work

hello when i run x11docker with example
x11docker --desktop --size 320x240 x11docker/lxde
lxde start in fullscreen
in ubuntu i have not this problem, but in manjaro lxde start in fullscreen mode (no window with size 320x240
why ?
thanks for advance for your help

thank you it's work !


Post-consolidation updates to selfmedicate docs

Sibling PR to https://github.com/nre-learning/antidote-selfmedicate/pull/28

/cc @smk4664


Allow other geocoding sources

Configure geocoding sources other than Mapit so the app is useful outside the UK

I think this can be closed now we're using EE for postcodes?


187376318 ticket purchases curr conversion

Pivotal Tracker Link

What this PR does:

This pull request fixes the currency conversion issues(correct number and symbol) in the conference_registrations view and the payment summary view. Now all views dealing with tickets should correctly implement the currency conversion logic.
Include screenshots, videos, etc.

Who authored this PR?

@tiffanylamm
How should this PR be tested?
Most of the changes were changes to the view so they should be viewable at deployment. I also added testing for the changes to show in the conference_registration_controller.
Are there any complications to deploying this?

I made two migrations.

db/migrate/20240422200831_add_amount_paid_cents_to_ticket_purchases.rb

I added a new attribute called amount_paid_cents to the ticket_purchase model. Before the code was delegating :price to the ticket model which returned a money object with the original ticket's price and currency. By adding amount_paid_cents I was able to monetize it so that there's a way to access the purchase's amount paid and currency.

db/migrate/20240417212948_set_currency_for_null_ticket_purchase_currency.rb

This migration makes it so that each ticket_purchase whose currency field is null to be 'USD' instead. I was running into issues because of records that were in the ticket_purchase model before currency was added as a field being NULL when they all should be 'USD'

Checklist:

[x] Has this been deployed to a staging environment or reviewed by a customer?
[x] Tag someone for code review (either a coach / team member)
[x] I have renamed the branch to match PivotTracker's suggested one (necessary for BlueJay)

Tests seem fine, should be good


refactor(examples): small changes to kvstore app

Renaming some variables to make them clearer

PR checklist

[ ] Tests written/updated
[ ] Changelog entry added in .changelog (we use unclog to manage our changelog)
[ ] Updated relevant documentation (docs/ or spec/) and code comments
[ ] Title follows the Conventional Commits spec

🙏 @melekes


Relax the rule on the compiler side that all declarations have the same constraint

Originally reported in https://github.com/Microsoft/TypeScript/issues/14840
Consider WeakSet for instance.. today it is defined as interface WeakSet <T> {...}. This is incorrect, as it allows for patterns like const s = new WeakSet<string>(); s.add("foo"); which throws at runtime; the correct definition for WeakSet is interface WeakSet<T extends object> { .. }.
Changing this definition will cause errors in files that redefine WeakSet to add additional members to it.

Error: All declarations of WeakSet must have identical type paramters

The proposal here is to allow type parameter declarations to skip constraints. conflicting constraints should still be reported as errors.

Big fan 👋 👋 👋

Does that mean that, when a constraint is not specified, that it should "inherit" the most specific constraint found elsewhere? Or does that only apply on instantiation?

this has nothign to do with instantiations.. it is about declarations..
interface A<T> {}
interface A<T extends number> {}

today this is an error. this issue is to relax the check and treat it as:
interface A<T extends number> {}
interface A<T extends number> {}

Also note that mismatched constraints is still an error:
interface B<T extends number> {}
interface B<T extends string> {}

Easy PR for anyone who wants to take it, or we can pick it up in a bit

Where would one look to start tackling this?

@RichiCoder1 there's a function areTypeParametersIdentical in src/compiler/checker.ts:22351
That looks like a good place to start.

I noticed the behavior is order dependent: it's an error if the first declaration skips the constraint.  In fact, mhegazy's example doesn't work.  I don't think this is intentional, so I filed a new issue: #23909.


Minor nit: Chocolatey no longer installed at C:\Chocolatey

There's a comment in chocopacks.bat that the script needs to assure that C:\Chocolatey is in the path. Some recent time ago, the installer changed to installing chocolatey into c:\ProgramData\chocolatey.
The old comment is now just confusing.
Also, loading the path from some cruft file named "PATH" in C:\Windows\TEMP left behind by a peer script that might not have run is a pretty unreliable bit of code.

Closing, this batch file no longer exists.


Delete all tables in one shot

I have 20+ tables, when user press log out, is there a way I can delete all tables in one shot?
Thanks

I get Undefined name 'allTables' error
Repo
dao.deleteEverything();
Dao
 Future<void> deleteEverything() async {
    await transaction(() async {
      // Deleting tables in reverse topological order to avoid foreign-key conflicts
      final tables = allTables.toList().reversed;

      for (final table in table) await delete(table).go();
    });
  }

You need to call allTables on the database (use attachedDatabase.allTables if you're in a DAO)

Thanks


Disable action if minor move

Would like to see an optional feature to disable block deletes if the drag/release action is minimal. I'm finding that when clicking a block I often move it by a few pixels and cause it to be deleted (Likely because my mouse sensitive is set to super high and I'm using a trackball =)). Would be nice to see some error tolerance here.

This may help you:
https://github.com/alyssaxuu/flowy/issues/48

Would like to see an optional feature to disable block deletes if the drag/release action is minimal. I'm finding that when clicking a block I often move it by a few pixels and cause it to be deleted (Likely because my mouse sensitive is set to super high and I'm using a trackball =)). Would be nice to see some error tolerance here.

You can use the on rearrange method to prevent the block from being deleted & instead re-attach to the previous parent. Does that help?

I believe, per the comments in #48 if I were to disable deletes by drag all together and add a trash can icon it would flow a little better. What would the method be for deleting a block (and its children) by its id?

I believe, per the comments in #48 if I were to disable deletes by drag all together and add a trash can icon it would flow a little better. What would the method be for deleting a block (and its children) by its id?

Yeah, you can certainly do that with the on rearrange method, just return false to delete the blocks currently being dragged.
As per deleting blocks by ID, I'm still working on a method! It shouldn't be hard to implement at all, I just want to make sure it's clean and it makes sense.

I added a new method:
        flowy.getBlocks = function() {
        	return blocks;
        };

Using that in combination with Lodash I'm accessing different blocks.
                        const BLOCKS = flowy.getBlocks();
                        const BLOCK_OBJECT = _.find(BLOCKS, {'id': parseInt(BLOCK_ID)});

Food for thought, provides an easy way to access blocks and I could see a similar delete method being used in combination with getBlocks where you pass in the block object or the ID

I added a new method:
        flowy.getBlocks = function() {
        	return blocks;
        };

Using that in combination with Lodash I'm accessing different blocks.
    const BLOCKS = flowy.getBlocks();
    const BLOCK_OBJECT = _.find(BLOCKS, {'id': parseInt(BLOCK_ID)});

Food for thought, provides an easy way to access blocks and I could see a similar delete method being used in combination with getBlocks where you pass in the block object or the ID

Hmm, I'm just thinking though, not sure if it's necessary when there's the flowy.output method which returns all the blocks data, including the entire block array. Unless you think it would be better to have a dedicated method only for the array?

Different use case based on my understanding. Output is great for import/export (i.e., JSON). I'm using it to access attributes in the array and to manipulate the attributes, this way my custom attributes live in the import/export data. My plan was to add a sister method to update the attributes (e.g., setBlock).

This should work to remove a block and its children, I would error check me =)
Would be nice to add some easing, as it seems jumpy and may need a bit more error handling, I think that's covered though.
flowy.deleteBlock = function(id) {
	if (!Number.isInteger(id)) {
		id = parseInt(id);
	}
	for (var i=0; i < blocks.length; i++) {
		if (blocks[i].id === id) {
			console.log(blocks[i])
			removeBlockEl(blocks[i].id);
		    blocks.splice(i, 1);
		    removeChildren(id);
		    break;
		}
	}
    if (blocks.length > 1) {
        rearrangeMe();
    }

	function removeChildren(parentId) {
		let children = [];
		for (var i = blocks.length - 1; i >= 0; i--) {
			if (blocks[i].parent === parentId) {
			    children.push(blocks[i].id);
			    removeBlockEl(blocks[i].id);
			    blocks.splice(i, 1);
			}
		}
		for (var i=0; i < children.length; i++) {
			removeChildren(children[i]);
		}
	}
	function removeBlockEl(id) {
		document.querySelector(".blockid[value='" + id + "']").parentNode.remove();
		document.querySelector(".arrowid[value='" + id + "']").parentNode.remove();
	}
};

This should work to remove a block and its children, I would error check me =)
Would be nice to add some easing, as it seems jumpy and may need a bit more error handling, I think that's covered though.
flowy.deleteBlock = function(id) {
	if (!Number.isInteger(id)) {
		id = parseInt(id);
	}
	for (var i=0; i < blocks.length; i++) {
		if (blocks[i].id === id) {
			console.log(blocks[i])
			removeBlockEl(blocks[i].id);
		    blocks.splice(i, 1);
		    removeChildren(id);
		    break;
		}
	}

        if (blocks.length > 1) {
            rearrangeMe();
        }

	function removeChildren(parentId) {
		let children = [];
		for (var i = blocks.length - 1; i >= 0; i--) {
			if (blocks[i].parent === parentId) {
			    children.push(blocks[i].id);
			    removeBlockEl(blocks[i].id);
			    blocks.splice(i, 1);
			}
		}
		for (var i=0; i < children.length; i++) {
			removeChildren(children[i]);
		}
	}
	function removeBlockEl(id) {
		document.querySelector(".blockid[value='" + id + "']").parentNode.remove();
		document.querySelector(".arrowid[value='" + id + "']").parentNode.remove();
	}
};

Yeah that's good. I am currently trying to make a method to individually remove blocks (so not just a block + children, also just a block inside the tree) so I might focus on that and then use that same method to allow for removing trees as well. The idea would be for the children of the block you want to delete to be attached to the parent of said block, it might not make the most sense, but I guess it may be good to have as an option.

I see, that would be good to have as well. You could use this method and pass in an optional second param that would perform that action and knock both out
If false just skip the el remove and splice and rewrite the block attributes to point to the new parent.

Not quite working, close though, doesn't seem to redraw correctly and causing some class errors. Alyssaxuu, you maybe able to spot the error quickly:
flowy.deleteBlock = function(id, removeChildren) {
	//Track orginal parent
	let newParentId;

	if (!Number.isInteger(id)) {
		id = parseInt(id);
	}

	for (var i=0; i < blocks.length; i++) {
		if (blocks[i].id === id) {
	            newParentId = blocks[i].parent;
		    removeBlockEls(blocks[i].id);
		    blocks.splice(i, 1);
		    modifyChildBlocks(id);
		    break;
		}
	}
        if (blocks.length > 1 && removeChildren === true) {
            rearrangeMe();
        }

	function modifyChildBlocks(parentId) {
		let children = [];
		for (var i = blocks.length - 1; i >= 0; i--) {
			if (blocks[i].parent === parentId) {
			    if (removeChildren === true) {
                                    children.push(blocks[i].id);
				    removeBlockEls(blocks[i].id);
				    blocks.splice(i, 1);
			    } else {
			    	blocks[i].parent = newParentId;
			    	snap(document.querySelector(".blockid[value='" + blocks[i].id + "']").parentNode, newParentId, blocks.map(a => a.id));
			    }
			}
		}

		//Only call repeat of function if removing children
		if (removeChildren === true) {
			for (var i=0; i < children.length; i++) {
				modifyChildBlocks(children[i]);
			}
		}
	}
	function removeBlockEls(id) {
		document.querySelector(".blockid[value='" + id + "']").parentNode.remove();
		document.querySelector(".arrowid[value='" + id + "']").parentNode.remove();
	}
};

Updated correcting several errors. Still does not rearrange correctly.
flowy.deleteBlock = function(id, removeChildren) {
	//Track orginal parent
	let newParentId;

	if (!Number.isInteger(id)) {
		id = parseInt(id);
	}

	for (var i=0; i < blocks.length; i++) {
		if (blocks[i].id === id) {
		    newParentId = blocks[i].parent;
		    removeBlockEls(blocks[i].id);
		    blocks.splice(i, 1);
		    modifyChildBlocks(id);
		    break;
		}
	}

       rearrangeMe();

	function modifyChildBlocks(parentId) {
		let children = [];
		for (var i = blocks.length - 1; i >= 0; i--) {
			if (blocks[i].parent === parentId) {
			    children.push(blocks[i].id);
			    if (removeChildren === true) {
				    removeBlockEl(blocks[i].id);
				    blocks.splice(i, 1);
			    } else {
			    	blocks[i].parent = newParentId;
			    	rearrange = true;
			    	document.querySelector(".arrowid[value='" + blocks[i].id + "']").parentNode.remove();
			    	blockstemp = [];
                                blockstemp.push(blocks.filter(a => a.id == blocks[i].id)[0]);
			    	snap(document.querySelector(".blockid[value='" + blocks[i].id + "']").parentNode, newParentId, blocks.map(a => a.id));
			    	rearrange = false;
			    }
			}
		}

		//Only call repeat of function if removing children
		if (removeChildren === true) {
			for (var i=0; i < children.length; i++) {
				modifyChildBlocks(children[i]);
			}
		}
	}
	function removeBlockEls(id) {
		document.querySelector(".blockid[value='" + id + "']").parentNode.remove();
		document.querySelector(".arrowid[value='" + id + "']").parentNode.remove();
	}
};

Hello, did you find why this is not reaarranging? I am quite struggling but would really love to have this feature as well,
Btw @alyssaxuu when you say " It shouldn't be hard to implement at all,", do you think of a simple piece of code that would allow at least to delete a block and all of its children? Sorry to ask, but I am quite in an hurry on my project ;)

Updated correcting several errors. Still does not rearrange correctly.
flowy.deleteBlock = function(id, removeChildren) {
	//Track orginal parent
	let newParentId;

	if (!Number.isInteger(id)) {
		id = parseInt(id);
	}

	for (var i=0; i < blocks.length; i++) {
		if (blocks[i].id === id) {
		    newParentId = blocks[i].parent;
		    removeBlockEls(blocks[i].id);
		    blocks.splice(i, 1);
		    modifyChildBlocks(id);
		    break;
		}
	}

       rearrangeMe();

	function modifyChildBlocks(parentId) {
		let children = [];
		for (var i = blocks.length - 1; i >= 0; i--) {
			if (blocks[i].parent === parentId) {
			    children.push(blocks[i].id);
			    if (removeChildren === true) {
				    removeBlockEl(blocks[i].id);
				    blocks.splice(i, 1);
			    } else {
			    	blocks[i].parent = newParentId;
			    	rearrange = true;
			    	document.querySelector(".arrowid[value='" + blocks[i].id + "']").parentNode.remove();
			    	blockstemp = [];
                                blockstemp.push(blocks.filter(a => a.id == blocks[i].id)[0]);
			    	snap(document.querySelector(".blockid[value='" + blocks[i].id + "']").parentNode, newParentId, blocks.map(a => a.id));
			    	rearrange = false;
			    }
			}
		}

		//Only call repeat of function if removing children
		if (removeChildren === true) {
			for (var i=0; i < children.length; i++) {
				modifyChildBlocks(children[i]);
			}
		}
	}
	function removeBlockEls(id) {
		document.querySelector(".blockid[value='" + id + "']").parentNode.remove();
		document.querySelector(".arrowid[value='" + id + "']").parentNode.remove();
	}
};

Hello, did you find why this is not reaarranging? I am quite struggling but would really love to have this feature as well,

Unfortunately it's hard to say - I would have to create the method myself to be able to see why your code isn't working. It could be due to the childwidth property in the blocks array not being reset, the fact that the "i" argument in snap(drag, i, blocko) is not in fact an ID, but rather a position in the "blocko" array (so I know this may be a bit counterintuitive, but the way I originally approached it was to have blocko be an array of all the block IDs, so blocko = blocks.map(a => a.id);), and then using that array, with a for loop, I would iterate for each value of said array. The reason for that is that the IDs won't go from 0-n consistently, as blocks can be removed (so there are "gaps" in terms of the IDs, so maybe only blocks with ID 0, 2, 3, 5 exist). It is still not the most intuitive approach and I might rewrite that in a future release, but anyway the way you would go about it is to do the following:
1 - Create blocko array with blocko = blocks.map(a => a.id);
2 - For loop (so the one inside modifyChildBlocks(parentId)) iterating for each value of the blocko array, so  instead of using blocks[i], you would use, for example, blocks.filter(a => a.id == blocko[i])[0] (again, this is super counterintuitive and I should definitely revisit it in the future to greatly optimize it)
3 - Call snap(drag, i, blocko) when ready to snap using the same parameters
Aside from that, another possible issue you might encounter is that you might accidentally remove the "blue pulse" that indicates that a block can be attached, since it automatically becomes a children of whichever block is about to become a parent. To avoid that you can just use canvas_div.appendChild(document.querySelector(".indicator")); before you remove the block div.
Hope that helps. I am currently working on somewhat of an "overhaul" for the library but I am not going to release new features & enhancements progressively, I would rather wait until everything is polished and release everything at once.

Btw @alyssaxuu when you say " It shouldn't be hard to implement at all,", do you think of a simple piece of code that would allow at least to delete a block and all of its children? Sorry to ask, but I am quite in an hurry on my project ;)

I don't currently have something ready in that regard, but the way I would approach it would be to look at how the code works for when you rearrange blocks (so, under flowy.moveBlock, look for if (dragblock) { }). The idea, if you wanted to implement this quickly (albeit in a "dirty" way), would be to do the following:
1 - Make the drag variable equal to the parent block div you want to delete
2 - Reuse the code under if (dragblock) { } within flowy.moveBlock
3 - Delete the tree using the following (note that the indicator is moved to the canvas div before the tree is deleted):
blockstemp = [];
canvas_div.appendChild(document.querySelector(".indicator"));
drag.parentNode.removeChild(drag);

In theory that should work as it would act the same way as if you were manually moving a block. Let me know if it works!

Could you detail why is childwith property needed?

Could you detail why is childwith property needed?

All right!
The childwidth property is simply used to calculate the total width of the children under a parent, combined (including the offset between siblings). I use this in order to make sure, when building the tree, that it is both centered and also spaced out properly.

Basically to understand it better, here's an image. The space between the blue lines is the "childwidth" amount. Thanks to that, I can quickly arrange the sibling of that tree on the right with the correct spacing (red line).
If the childwidth isn't reset it might just cause problems for that reason in terms of alignment and whatnot.

Thank you  very much.
I got it working for a DeleteBlock WITH children only using the following piece of code :
`    flowy.deleteBlocks = function () {
blocks = [];
canvas_div.innerHTML = "";
};
flowy.deleteBlock = function (id) {
  let newParentId;

  if (!Number.isInteger(id)) {
    id = parseInt(id);
  }

  for (var i = 0; i < blocks.length; i++) {
    if (blocks[i].id === id) {
      newParentId = blocks[i].parent;
      canvas_div.appendChild(document.querySelector(".indicator"));
      removeBlockEls(blocks[i].id);
      blocks.splice(i, 1);
      modifyChildBlocks(id);
      break;
    }
  }

  if (blocks.length > 1) {
    rearrangeMe();
  }

  function modifyChildBlocks(parentId) {
    let children = [];
    let blocko = blocks.map((a) => a.id);
    for (var i = blocko.length - 1; i >= 0; i--) {
      let currentBlock = blocks.filter((a) => a.id == blocko[i])[0];
      if (currentBlock.parent === parentId) {
        children.push(currentBlock.id);
        removeBlockEls(currentBlock.id);
        blocks.splice(i, 1);
      }
    }

    for (var i = 0; i < children.length; i++) {
      modifyChildBlocks(children[i]);
    }
  }
  function removeBlockEls(id) {
    document
      .querySelector(".blockid[value='" + id + "']")
      .parentNode.remove();
    document
      .querySelector(".arrowid[value='" + id + "']")
      .parentNode.remove();
  }
};`

I started having a look for not removing children, but couldnt get it to work so far.

Well, I got this to work. I've been slowly going through and updating/refactoring the code. In this case I used some of the above logic for deleteBlock.
However, I've bypassed the snap function in flowy and have implemented my own draw() method. This method redraws (or moves) block, arrows, etc. Trying to get this to also support zoom in/out using style.transform, but it's slow going. The plan right now is to get insert working and then move on to zoom in/out.
Unfortunately my version of flowy is likely impossible to merge back in. If there is any interest, I may consider publishing this fork but only if there are some other people interested in helping maintain it.

Well, I got this to work. I've been slowly going through and updating/refactoring the code. In this case I used some of the above logic for deleteBlock.
However, I've bypassed the snap function in flowy and have implemented my own draw() method. This method redraws (or moves) block, arrows, etc. Trying to get this to also support zoom in/out using style.transform, but it's slow going. The plan right now is to get insert working and then move on to zoom in/out.
Unfortunately my version of flowy is likely impossible to merge back in. If there is any interest, I may consider publishing this fork but only if there are some other people interested in helping maintain it.

I'm interested, but I'd like to see how you did it before committing my time. I've accepted at this point that I too have gone too far off the beaten path to ever cleanly merge back with the main branch, but I'd like us to not all reinvent the wheel when we have the same needs.

I'm happy to share what I've done. I also now have zoom in/out working
along with insert/remove for single blocks.
The Yes/No is specific to my use case where the only conditional splitting
we do is on a logic check, e.g. "Has replied to SMS".
Flowy is also pretty de-coupled from the UX. I marry the two up separately
along with an abstraction for supporting auto-loading blocks. But I'm
likely going to start folding the UX/flowy more tightly together as there
is just about no way for me to merge back in at this point.
    //

┌────────────────────────────────────────────────────────────────────
// │ Delete a block by id
//
└────────────────────────────────────────────────────────────────────
flowy.deleteBlock = function (id, removeChildren = true) {
let newParentId;
        if (!Number.isInteger(id)) {
            id = parseInt(id);
        }

        // how many children?
        if (directChildrenCount(id) > 1)
            removeChildren = true;

        // Loop through blocks and remove the selected block
        for (var i = 0; i < blocks.length; i++) {

            // found the block to remove
            if (blocks[i].id === id) {

                // hold a reference to the blocks parent id
                newParentId = blocks[i].parent;

                // Set the indicator

canvas_div.appendChild(document.querySelector(".indicator"));
                // Remove the block
                removeBlockEls(blocks[i].id);

                // Remove from blocks array
                blocks.splice(i, 1);

                // update child blocks
                modifyChildBlocks(id, newParentId);

                break;
            }
        }

        // Ensure there are no yes/no blocks hanging around
        checkForTrailingYesNo(newParentId);

        if (blocks.length > 1) {
            flowy.draw();
        }

        // Updates the child block of the block getting removed
        function modifyChildBlocks(parentId, newParentId) {
            let children = [];
            let blocko = blocks.map((a) => a.id);
            for (var i = blocko.length - 1; i >= 0; i--) {
                let currentBlock = blocks.filter((a) => a.id ==

blocko[i])[0];
if (currentBlock.parent === parentId) {
children.push(currentBlock.id);
                    // update parent id?
                    if (newParentId != undefined)
                        currentBlock.parent = newParentId;

                    if (removeChildren) {
                        removeBlockEls(currentBlock.id);
                        blocks.splice(i, 1);
                    }
                }
            }

            // Remove all children blocks?
            if (removeChildren) {
                for (var i = 0; i < children.length; i++) {
                    modifyChildBlocks(children[i]);
                }
            }
        }

        function removeBlockEls(id) {

document.querySelector(.blockid[value='${id}']).parentNode.remove();
document.querySelector(.arrowid[value ='${id}']).parentNode.remove();
}
        // Check that we didn't leave a trailing yes/no block
        function checkForTrailingYesNo(id) {

            for (var i = 0; i < blocks.length; i++) {

                if (blocks[i].parent === id) {
                    let blockElem =

document.querySelector(.blockid[value='${blocks[i].id}']);
let val =
blockElem.parentElement.querySelector('.blockelemtype').value;
                    if (val == "Yes" || val == "No") {
                        flowy.deleteBlock(blocks[i].id, false);
                    }
                }
            }
        }
    };

Founder, DailyStory
DailyStory Marketing Automationdailystory.com | +1-833-914-1105
On Thu, Apr 1, 2021 at 12:32 AM Christopher Boyd @.***>
wrote:

Well, I got this to work. I've been slowly going through and
updating/refactoring the code. In this case I used some of the above logic
for deleteBlock.
However, I've bypassed the snap function in flowy and have implemented my
own draw() method. This method redraws (or moves) block, arrows, etc.
Trying to get this to also support zoom in/out using style.transform, but
it's slow going. The plan right now is to get insert working and then move
on to zoom in/out.
Unfortunately my version of flowy is likely impossible to merge back in.
If there is any interest, I may consider publishing this fork but only if
there are some other people interested in helping maintain it.
I'm interested, but I'd like to see how you did it before committing my
time. I've accepted at this point that I too have gone too far off the
beaten path to ever cleanly merge back with the main branch, but I'd like
us to not all reinvent the wheel when we have the same needs.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/alyssaxuu/flowy/issues/50#issuecomment-811652855, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAHHFGADARQ2IL6K5Y3XJDLTGQAQRANCNFSM4MKNZAAA
.

@robhoward @pilootchoum
Probably a dumb question but how to get the id on the fly (not through output)? Is there an event to get the id when clicking a block that I missed?

This should work -- I've changed the code so much as this point from the original source that I'm not 100% sure though:
document.querySelector('.selectedblock').querySelector('.blockid').value

Hello, I've tried with the code from @robhoward, but I have an error at directChildrenCount(id). Can you help me with that?

All that function does is determine how many children the current block has.
Here is the function if it helps at all:
`
// ┌────────────────────────────────────────────────────────────────────
// │ Returns the count of children for the block id
// │
// │ @id - id of block to get children count
// └────────────────────────────────────────────────────────────────────
directChildrenCount: function(id) {
    let children = 0;

    // count how many blocks are a child
    for (var i = 0; i < this.blocks.length; i++) {

        if (this.blocks[i].parent === id)
            children++
    }

    return children;
},`

Hello, can you please share the draw() code.


Remove empty .resx, Part 1

Nothing to do.

##[error]MSBUILD : error MSB4025: The project file could not be loaded. Root element is missing.
##[error]MSBUILD : error MSB4025: The project file could not be loaded. Root element is missing.
##[error]MSBUILD : error MSB4025: The project file could not be loaded. Root element is missing.

I didn't find anything wrong with these three project files.

##[error]D:\a\docs\docs\samples\snippets\visualbasic\VS_Snippets_CFX\cfx_wf_gettingstarted\vb\ExtraSnippets.vb(10,36): error BC30002: Type 'Workflow1' is not defined. [D:\a\docs\docs\samples\snippets\visualbasic\VS_Snippets_CFX\cfx_wf_gettingstarted\vb\WorkflowConsoleApplication1\WorkflowConsoleApplication1.vbproj]
##[error]D:\a\docs\docs\samples\snippets\visualbasic\VS_Snippets_CFX\cfx_wf_gettingstarted\vb\ExtraSnippets.vb(18,50): error BC30002: Type 'Workflow1' is not defined. [D:\a\docs\docs\samples\snippets\visualbasic\VS_Snippets_CFX\cfx_wf_gettingstarted\vb\WorkflowConsoleApplication1\WorkflowConsoleApplication1.vbproj]
##[error]D:\a\docs\docs\samples\snippets\visualbasic\VS_Snippets_CFX\cfx_wf_gettingstarted\vb\ExtraSnippets.vb(56,50): error BC30002: Type 'Workflow1' is not defined. [D:\a\docs\docs\samples\snippets\visualbasic\VS_Snippets_CFX\cfx_wf_gettingstarted\vb\WorkflowConsoleApplication1\WorkflowConsoleApplication1.vbproj]
##[error]D:\a\docs\docs\samples\snippets\visualbasic\VS_Snippets_CFX\cfx_wf_gettingstarted\vb\Module1.vb(24,50): error BC30002: Type 'Workflow1' is not defined. [D:\a\docs\docs\samples\snippets\visualbasic\VS_Snippets_CFX\cfx_wf_gettingstarted\vb\WorkflowConsoleApplication1\WorkflowConsoleApplication1.vbproj]

I've no idea how to fix this. Workflow1 should be generated based on Workflow1.xaml.

assigning to @adegeo for review.
I looked at the VBProj files as well, and I don't see anything invalid in the project files either.

The items from Workflow1 error are .NET Framework projects. The need to be converted or the snippets.5000.json settings file needs to be added to the project directory to have Visual Studio compile the project.
{
    "host": "visualstudio"
}

The MSB4025 error is from the SLN file it found in a parent directory is referencing a csharp project that doesn't exist. I would delete the SLN file.

##[error]C:\Program Files\dotnet\sdk\5.0.100-preview.6.20325.9\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v3.5 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks [D:\a\docs\docs\samples\snippets\visualbasic\VS_Snippets_ADO.NET\DP LINQ to DataSet Examples\VB\LINQtoDataSetExamplesVB.vbproj]

@adegeo I've added snippets.5000.json in an earlier commit.

I've excluded the Workflow1 project from this PR.

@BillWagner Hrmmm the sln files deleted here are triggering the validation.

I'm going to propose that we call this case (deleting an sln) a known false positive and merge on a case-by-case basis.
In this PR, the deleted SLN isn't needed because these were single project solutions. Fixing this would introduce an issue where deleting an SLN with multiple projects won't trigger a build.
Thoughts @NextTurn @adegeo

I'm fine with merging SLN deletion for now. We should add to the todo list for the projects tool these two new scenarios:

A deleted SLN file isn't reported.
When a SLN file is deleted, all projects under that folder structure are automatically reported for testing.

closing and reopening for a new CI build.

@adegeo We're still getting some build errors on the Visual Basic Workflow samples.
I'll let you investigate.

@NextTurn Can you fix the merge conflict? I'm going to accept this PR as is. After looking at it, the error is due to the lack of the snippets json file to force visual studio to build the projects. However, those folders aren't in good shape and need to be restructured (there are code files in the same folder as the sln) so I don't want these passing validation until that is addressed ina future PR.


update prefetcher/dispatcher to move large globals to stack, increase stack size

This is pending more data on kernel stack usage
Prefetcher/dispatcher put a table in global memory (copied to local) that chews up a lot of global space.  For this, we shrunk the stack size.  However, there are kernels that put large tables on the stack.  Having some kernels to A and others B leads to out-of-local-memory errors, we need consistent guidelines.
Plan is to make the guidelines to be to put these items on the stack.  That is more clear and, for trisc* necessary.

This is now POR.  The large tmp buffers in prefetch/dispatch need to go on the stack, stack size should be increased as needed (based on watcher).  Then stack size needs to bump up to match the data @tt-dma collected

@tt-asaigal is this done?

@tt-asaigal is this done?

Yes, changes for this were merged to main here: https://github.com/tenstorrent/tt-metal/commit/df4d0131f9f4b455c92b63d40c113eff2d658e02.
I can close the issue.


Heroku Issue

As Heroku has closed its free tiers the API is down. Please host it on sites like railway or porter so that the API can be up again. Thank you for the amazing API.

You can also deploy on render. I have been using that since Heroku went paid. Thanks for amazing work.

The thing is I just tried to get heroku's paid plans but it keeps declining my debit/credit cards, I do not understand why, anyway I will be shifting to digital ocean as soon as I get some time to work on this.

@arpit-mathur-132001 @GunjanRajTiwari
The API is back live, check out this release
https://github.com/Jaagrav/CodeX-API/releases/tag/v1-alpha


Error: ENOENT: no such file or directory, rename 'path/file.js~' -> 'path/file.js' (while using nodemon)

Now, I don't know if it's nodemon or nedb's fault, but sometimes I have to restart nodemon a couple times because this error comes up... Not a huge deal, but still annoying. Please note that I'm also using the --ignore flag so the file.js~ automatic refresh doesn't infinitely loop with nodemon's own automatic refresh, idk if this has something to do with my issue.

What's the file path expected when is compiled into an executable file. For instance, in macOS my project works fine when running it with npm start
But, after packaging it with electron-package and attempting to execute it, the error is appears stating that Uncaught Error: ENOENT: no such file or directory, open filename - datastore.js:77
Where is supposed to be located the db file after application is packaged? Have been tested the NeDB on compiled apps? If so, what's the path to use?

i have the same problem, when the error is happen, the content of the data file is clear, how to deal it？

up, i have the same problem when electron app is in an ASAR package

I met the same problem, but i found that error appears when creating multiple instances of datastore with same filename. You have to instantialize datastore only once and keep reference across whole app. May be developers should provide singleton/factory (for example var db = require('nedb').open({filename: 'path/to/file'})  ) instead of creating instances

when i use var db = require('nedb').open({filename: 'path/to/file'}) ) ,
i get an error: require(...).open is not a function

I have the same issue in tests... .open is not defined. I can't find any workaround so far.

We don’t need a new API to have singletons, just abstract it with a local module of your own, e.g.
db.js:
const Datastore = require('nedb');

const db = {
  tableName: new Datastore({ filename: '...' })
};
module.exports = db;

Check if you are trying to open two or more connections at once. In my case I'm opening two connections and get the error.

I am using next.js api routes, and in development mode there a lot of HMR reloads, so extracting db to a module does not help, nothing helps so far.


Associations

Created Book, Rental, and Classroom classes.
Created the many-to-many and has-many-through relationships.

Hi @karayamanemre,
While you made a great effort in this project, unfortunately, I cannot proceed to review your code.
Invalid Code Review Request
You have submitted a project, that doesn't have a complete README, please know that all main headers from the README template should be present, the only optional section is FAQ, also, make sure to add the section Future Features, including 1-3 potential features to be added.
Your Code Review Request will be marked as invalid in your Dashboard, so please submit a new one once you are ready 🙏
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.


Cannot set a section to false to disable it

Description
Whenever I open Neovim I'm getting this error:
.../neogit/lua/neogit/config.lua:392: attempt to index local 'section' (a boolean value)

Which stems from this configuration:
require('neogit').setup({
  -- other config
  sections = {
    recent = false,
  },
})

When I remove above configuration the error disappears.
This configuration is documented in the project README.md.
Neogit does still function but the highlighting also breaks because of this.
Neovim version
NVIM v0.10.0-dev-4791+gef44e5972-Homebrew
Build type: Release
LuaJIT 2.1.0-beta3
Operating system and version
MacOS Ventura 13.4.1 (c)
Steps to reproduce

Navigate to a git repo and copy minimal.lua to this directory
nvim -nu minimal.lua
Observe error in status bar

Expected behavior
No error message and working highlighting
Actual behavior
Receiving error message mentioned in description, Neogit shows no highlighting but does still function.
Minimal config
vim.cmd([[set runtimepath=$VIMRUNTIME]])
vim.cmd([[set packpath=/tmp/nvim/site]])
local package_root = "/tmp/nvim/site/pack"
local install_path = package_root .. "/packer/start/packer.nvim"
local function load_plugins()
  require("packer").startup({
    {
      "wbthomason/packer.nvim",
      {
        "TimUntersberger/neogit",
        requires = {
          { "nvim-lua/plenary.nvim" },
          { "sindrets/diffview.nvim" },
        },
        config = function()
          print("loaded neogit")
          require("neogit").setup({
            sections = { recent = false }
          })
        end,
      },
    },
    config = {
      package_root = package_root,
      compile_path = install_path .. "/plugin/packer_compiled.lua",
      display = { non_interactive = true },
    },
  })
end
if vim.fn.isdirectory(install_path) == 0 then
  print("Installing neogit and dependencies.")
  vim.fn.system({ "git", "clone", "--depth=1", "https://github.com/wbthomason/packer.nvim", install_path })
end
load_plugins()
require("packer").sync()

Yup, sorry about that. You can now set { hidden = true } for the section to hide it.

No problem, I always see a big commit log so a lot of work is being done, love the effort and Neogit (I really liked Magit but it didn't receive much maintenance). After updating the plugin and my configuration it's working like a charm once again.
Thank you for the quick fix, have a good one!


[Feature][agent] Add agent metric statistics

Description
Add Agent metric statistics
https://inlong.apache.org/docs/next/modules/agent/overview#monitor-metrics-configuration
Use case
No response
Are you willing to submit PR?

[ ] Yes, I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

@shink, can you claim this issue? so that I can assign it to you

@gosonzhang Yes, I can.


WANT TO SEE HOT PICS WITH ME? 💋 💋 💋

WANT TO SEE HOT PICS WITH ME? 💋 💋 💋
👇 👇 👇
https://is.gd/ms4xm3

Reported as spam 👎


Deprecated code removal

What is this?

Still need to remove references to obstacle.

Fixed in #126.


Translate /tasks/run-application/run-single-instance-stateful-application in Korean

This is a Feature Request

What would you like to be added

Translate tasks/run-application/run-single-instance-stateful-application view in Korean.
Why is this needed
There is no documents with tasks/run-application/run-single-instance-stateful-application in Korean.
Comments

https://kubernetes.io/docs/tasks/run-application/run-single-instance-stateful-application/

/language ko
/assign


ERROR: Please rebuild the executable with an appropriate setting of the -march option.

my project config:
springboot 3.1.1
jdk17
I made the image mvn spring-boot:build-image -pnative with the following command, and then it ran fine locally and failed to boot on a machine in a corporate environment and threw the following exception:

The current machine does not support all of the following CPU features that are required by the image: [CX8, CMOV, FXSR, MMX, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, POPCNT, LZCNT, AVX, AVX2, BMI1, BMI2, FMA].
Please rebuild the executable with an appropriate setting of the -march option.

Closing as duplicate of https://github.com/paketo-buildpacks/spring-boot/issues/387


✨ Change switch-domain to take output pathname

Summary
This PR changes the switch-domain and wait-and-switch-domain commands to simply take an output pathname rather than compute it from other parts.  This one usage we have does not want to use the output path that was being computed.
Related issue(s)
Fixes #

/cc @francostellari
/cc @dumb0002
@waltforme

/lgtm


10249: Separating the v1beta1 & v1 ingress objects.

This PR will separate the v1beta1 & v1 ingress objects into two different files as per the bug
cc @Jackie-Jiang @xiangfu0

Thanks for the contribution! Will this cause backward incompatible from the file name change?

Thanks for the contribution! Will this cause backward incompatible from the file name change?

Let me verify that. I'll update this ticket.

Thanks for the contribution! Will this cause backward incompatible from the file name change?

Let me verify that. I'll update this ticket.

It should be good. The name change fo the file results in change in the comment like below
# Source: pinot/templates/controller/ingress-v1beta1.yaml


Doesn't recognize include paths in sub-folders in a workspace

Issue Type
Bug
Description
Opening a razzle project (with sources file) works fine only for the top-most directory. For all subfolders, vs code doesn't recognize the folder's c_cpp_properties.json file (even if it has all the correct include paths). It instead only looks for the json from the top-most folder in the workspace.
 Thereby I will close this issue and kindly ask you to report this issue against the extension repository.
Most extensions are on GitHub as well so it should be easy to file it against the extension. If you open an extension on the market place, click on the Support link to find out more.

Thanks again for your feedback!


CARP issues after upgrade to 23.1

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:

[x] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
[x] I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue

Describe the bug
After upgrade from Opnsense 22.7 to 23.1 the CARP ip network/address and VHID group ids are required to be globally unique when using the gui to create/edit them.
Before 23.1 it was possible to use the same CARP ip on different interfaces (eg. link local ip for services that exist in multiple networks). It was also possible to use the same VHID group id on different interfaces.
The error messages that are displayed when changing/creating a carp ip are these:
Previously created CARP ips that use per interface unique VHID group and ip/network addresses still work as expected but the issue is introduced when editing it.
To Reproduce
Steps to reproduce the behavior:

Go to Virtual IPs: Settings
Edit existing virtual ip of CARP type or click on plus sign to add new virtual ip and select mode CARP and an interface
Enter an ip/network address that does not yet exist for the selected network or enter VHID group id that is not yet assigned for the selected interface
Click save
Error messages are shown:

Address already assigned.  or
VHID 4 is already in use on interface wan. Pick a unique number on this interface.

Expected behavior
The ip/network address and VHID group should only be required to be unique per interface
Describe alternatives you considered
The VHID group could be required to be globally unique. But this only works if less then 255 CARP addresses are used on a system in total due to requirements of the
Additional context
Issue is probably introduced by PR #6105
Environment
OPNsense 23.1_6 (amd64, OpenSSL).

Overlapping IP's didn't appear to be allowed earlier either:
https://github.com/opnsense/core/blob/stable/22.7/src/www/firewall_virtual_ip_edit.php#L123
vhid's might be spawned over interfaces, although I'm not sure why one would want to broadcast the same id over multiple interfaces (attaching addresses can be done using aliases). It did seem to be possible earlier indeed
https://github.com/opnsense/core/blob/stable/22.7/src/www/firewall_virtual_ip_edit.php#L151

Previously it checked if the same IP is already assigned to the same interface:
https://github.com/opnsense/core/blob/1e28d5b352e3aeb9a4e94720595e5e82bf83503b/src/etc/inc/interfaces.inc#L4180
That vhid are required to be globally unique is only an inconvenience right now as we had an assignment template for CARP ips that provide the same link local service. Eg. for Router Advertisements we use a link local fe80::1 carp ip as source so that the client always use the active firewall as a gateway. Using ip aliases is not an option as we require the failover function of CARP ips for the service that uses it.
Still the restriction to global unique VHIDs could be an issue for larger organizations with more than >255 entries (does currently not apply for my use case).
Also my understanding was that the carp traffic is only send on the interface that they are actually assigned to.

Well, the intend was not to change behavior, but is_ipaddr_configured() seems to return "unused" if the address is not found at all or bound to the requested interface. the vhid check is different indeed.

https://github.com/opnsense/core/commit/9a0bc2e79b30eb51f3b0d2a464b12039fd567c92 should fix the vhid issue, if you do want to discuss about the address further, can you install an older version and test locally first?
If I'm misreading and there is a valid use-case to support 100% overlaps, I don't mind to discuss further, the code just seems to suggest otherwise.

I seem to have remembered it wrong. The previous behavior was was only working for link-local addresses (which also makes sense).
Here is is the corresponding code that triggered it as it appended an interface scope to the actual ip address: https://github.com/opnsense/core/blob/9ece6788df20e99f39d42b84013688620f0d4ded/src/etc/inc/util.inc#L856
We are currently defining fe80::1/64 as a carp address and use this in the router advertisements daemon as source address. We used to set a static carp address in the interfaces subnet range eg. 2001:a:b:c:d::1/64 but some change in 2021/2022 disabled this option and only allowed link local addresses and automatic.
The reason behind this is to prevent a backup opnsense to announce its own ip as default gateway to the clients via the router advertisements. This would result in the reply packet being send via the active master opnsense and then rejected as the master firewall weren't able to associate the traffic with an existing connection.
By using a carp ip for RA the traffic would always go through the currently active opnsense.

9a0bc2e should fix the vhid issue, if you do want to discuss about the address further, can you install an older version and test locally first?
If I'm misreading and there is a valid use-case to support 100% overlaps, I don't mind to discuss further, the code just seems to suggest otherwise.

That commit seems to fix the vhid issue

Here is is the corresponding code that triggered it as it appended an interface scope to the actual ip address

Not sure what is wrong here appending the scope to link-local?

We used to set a static carp address in the interfaces subnet range eg. 2001:a:b:c:d::1/64

RA always uses link-local, that's why you need a CARP link-local configured for RA to actually make use of it. This has been working for a while and I think a number of people working on this feature would complain loudly if it broke.
Cheers,
Franco


Add configuration options for Server Info section

Description
Added the ability to configure additional entries of the Info section:

termsOfService
license
contact

Motivation and context
It wasn't possible to do so before this PR and was in the TODO list.
We need it for our current project
How has this been tested?
Generation has been tested with and without the changes enabled, all works as intended. This is a very simple change.
Screenshots (if appropriate)
Types of changes
What types of changes does your code introduce? Put an x in all the boxes that apply:

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

Checklist:
Go over all the following points, and put an x in all the boxes that apply.
Please, please, please, don't send your pull request until all of the boxes are ticked. Once your pull request is created, it will trigger a build on our continuous integration server to make sure your tests and code style pass.

[x] I have read the CONTRIBUTING document.
[x] My pull request addresses exactly one patch/feature.
[x] I have created a branch for this patch/feature.
[x] Each individual commit in the pull request is meaningful.
[x] I have added tests to cover my changes.
[x] If my change requires a change to the documentation, I have updated it accordingly.

If you're unsure about any of these, don't hesitate to ask. We're here to help!

No problem, all done :)


Add to PyPI?

I'm looking to add this to the emacs hy-mode.
To simplify installation, I'd love for hyrepl to be available from PyPI and to be able to start it with
$ hyreplserver

This way you do not have to set the Pythonpath manually, nor install the requirements manually.
I think all you have to do is add a script that starts the hyreplserver file and a scripts = ["bin/hyreplserver"] line to setup.py.
Interested?
I can create a PR, but you need to register the project with pypi yourself to update it everytime a new semi-stable version is out.

https://github.com/Foxboron/HyREPL/issues/24

I'll fix it during the day \o/

If it is installed with pypi you do not need a script btw, just using hy -m HyREPL.server is plenty simple.

I'm considering just throwing up a bin folder with hyrepl and those lines added for the simplicity

-m and no .py can be confusing to newbs, but I guess they aren't the target audience. With a script you can easily add CLI options later though.

Minimal steps needed to upload project (in case you or anyone else don't know how):
Register user and pw at https://pypi.python.org/pypi
Minimal: .pypirc
[distutils] # this tells distutils what package indexes you can push to
index-servers =
  pypi
  pypitest

[pypi]
repository: https://pypi.python.org/pypi
username: karlpilkington
password: harry_the_housefly

Afterwards you just need to
python setup.py register; py; python sdist upload # unsafe
If you have trouble with getting your setup.py to work and find no answers online I can create a working version for you. Packaging is easily the worst part of Python.

I believe i managed to push too pypi now. Please feel free to tell me if you spot any errors