Add option to select attachment path separator in the resulting xml file

When using the plugin to generate test reports of junit format to use in GitLab CI
And the tests are executed on Windows machine the tag is generated:
<system-out>[[ATTACHMENT|cypress\screenshots\myTest.spec.ts\my test suite -- my test case (failed).png]]</system-out>

But GitLab CI needs slashes / instead of back slashes \ in the attachment path to have a valid link
GitLabs applies ANSII encoding of the report content \ => %5C and as a result have this king of link with the path from the xml report file having encoded back-slashes. The link i not working:
https://gitlab.mycompany.com/myproject/-/jobs/123123/artifacts/file/cypress%5Cscreenshots%5CmyTest.spec.ts%5Cmy%20test%20suite%20--%20my%20ctest%20case%20(failed).png

But if the back slashes are changed to normal slashes, they are encoded / => %2F and the resulting link is working:
https://gitlab.mycompany.com/myproject/-/jobs/123123/artifacts/file/cypress%2Fscreenshots%2FmyTest.spec.ts%2Fmy%20test%20suite%20--%20my%20ctest%20case%20(failed).png

Please add attachment path separator to reporterOption that would be used for generating the attachment path in the report file. But for checking if the file exists in the filesystem the standard path.sep will be used still

@mikhail-g this issue has been resolved now.

Thank you @munderseth !


task524_546 Dataset 3 phase 2 creation

@swarooprm
Please find the attached report for Phase 2.
Dataset3_SaiVenkatSubramani-Phase2.pdf
Please review the pull request.
Thanks

@ssaivenkat176 1) Can you add the original tasks in this PR. 2) Can you rename the task variants as taskxxx.1_yyyy, taskxxx.2_yyyy, taskxxx.3_yyyy and so on. For e.g. task547.1_spl_translation_entk_en.json, task547.2_spl_translation_entk_en.json, task547.3_spl_translation_entk_en.json and so on. Do this for all the tasks in this PR

@ssaivenkat176 1) Can you add the original tasks in this PR. 2) Can you rename the task variants as taskxxx.1_yyyy, taskxxx.2_yyyy, taskxxx.3_yyyy and so on. For e.g. task547.1_spl_translation_entk_en.json, task547.2_spl_translation_entk_en.json, task547.3_spl_translation_entk_en.json and so on. Do this for all the tasks in this PR

@ssaivenkat176 gentle reminder on this, can you try to work on the changes and do it before Friday

@Ravsehajsinghpuri
Will complete is by Friday.

@Ravsehajsinghpuri
Done with the changes. Please review.


Wrong fanging

When trying fang "seasharpee", it generates "seashttpee"
>>> fang('seasharpee')
'seashttpee'

Thanks for reporting this @jakubclark ! I've fixed this with version 3.0.15 (https://pypi.org/project/ioc-fanger/) - which I just released to pypi.


Ambigious InitializeComponent()?

Issue Description
MainWindow.xml.cs keeps complaining about "InitializeComponent();"
"The call is ambiguous between the following methods or properties: 'MainWindow.InitializeComponent()' and 'MainWindow.InitializeComponent()' (CS0121) [ag_watch]"
It seem to look at "obj/MainWindow.g.cs" and "obj/MainWindow.g.i.cs",
which might be why it seems amiguity, but not sure.
Steps to Reproduce
Hard to tell, it just happens, but it's fairly quick.
Expected Behavior
Not complaining about it as there shouldn't be any issues as far as i can tell.
Actual Behavior
It complaining about ambiguity while there isn't any
Logs
OmniSharp log
Starting OmniSharp server at 8/30/2019, 1:30:17 AM
    Target: ....\ag_watch
OmniSharp server started.
Path: C:\Users\ZeCurator.vscode-insiders\extensions\ms-vscode.csharp-1.21.1.omnisharp\1.34.3-beta.22\OmniSharp.exe
PID: 19944
    Starting OmniSharp on Windows 6.2.9200.0 (x64)

    DotNetPath set to dotnet

    Located 2 MSBuild instance(s)
        1: Visual Studio Build Tools 2017 15.9.28307.812 - "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
        2: StandAlone 16.0 - "C:\Users\ZeCurator\.vscode-insiders\extensions\ms-vscode.csharp-1.21.1\.omnisharp\1.34.3-beta.22\.msbuild\Current\Bin"

    MSBUILD_EXE_PATH environment variable set to 'C:\Users\ZeCurator\.vscode-insiders\extensions\ms-vscode.csharp-1.21.1\.omnisharp\1.34.3-beta.22\.msbuild\Current\Bin\MSBuild.exe'

    Registered MSBuild instance: StandAlone 16.0 - "C:\Users\ZeCurator\.vscode-insiders\extensions\ms-vscode.csharp-1.21.1\.omnisharp\1.34.3-beta.22\.msbuild\Current\Bin"
        CscToolExe = csc.exe
        CscToolPath = C:\Users\ZeCurator\.vscode-insiders\extensions\ms-vscode.csharp-1.21.1\.omnisharp\1.34.3-beta.22\.msbuild\Current\Bin\Roslyn
        MSBuildExtensionsPath = C:\Users\ZeCurator\.vscode-insiders\extensions\ms-vscode.csharp-1.21.1\.omnisharp\1.34.3-beta.22\.msbuild
        MSBuildToolsPath = C:\Users\ZeCurator\.vscode-insiders\extensions\ms-vscode.csharp-1.21.1\.omnisharp\1.34.3-beta.22\.msbuild\Current\Bin

    Detecting Cake files in '....\ag_watch'.

    Could not find any Cake files

    No solution files found in '....\ag_watch'

    Queue project update for '....\ag_watch\ag_watch.csproj'

    Detecting CSX files in '....\ag_watch'.

    Could not find any CSX files

    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0

    Loading project: ....\ag_watch\ag_watch.csproj

    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100

    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.EditorConfigWorkspaceOptionsProvider, Order: 200

    Configuration finished.

    Omnisharp server running using Stdio at location '....\ag_watch' on host 19712.

    Successfully loaded project file '....\ag_watch\ag_watch.csproj'.

    Adding project '....\ag_watch\ag_watch.csproj'

    Update project: ag_watch

    Skipping code fix provider 'Microsoft.CodeAnalysis.Analyzers.MetaAnalyzers.Fixers.ApplyDiagnosticAnalyzerAttributeFix' because it's language doesn't match 'C#'.

    Queue project update for '....\ag_watch\ag_watch.csproj'

    Queue project update for '....\ag_watch\ag_watch.csproj'

    Loading project: ....\ag_watch\ag_watch.csproj

    Successfully loaded project file '....\ag_watch\ag_watch.csproj'.

    Update project: ag_watch

    Applying code action: using Microsoft.Extensions.Configuration;

C# log
Getting latest OmniSharp version information
Downloading package 'Latest OmniSharp Version Information' (1 KB).................... Done!

Environment information
VSCode version: 1.38.0-insider
C# Extension: 1.21.1
Dotnet Information
.NET Core SDK (reflecting any global.json):
 Version:   3.0.100-preview8-013656
 Commit:    8bf06ffc8d
Runtime Environment:
OS Name:     Windows
OS Version:  10.0.18362
OS Platform: Windows
RID:         win10-x64
Base Path:   C:\Program Files\dotnet\sdk\3.0.100-preview8-013656\
Host (useful for support):
Version: 3.0.0-preview8-28405-07
Commit:  d01b2fb7bc
.NET Core SDKs installed:
3.0.100-preview8-013656 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.0.0-preview8.19405.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.0.0-preview8-28405-07 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0-preview8-28405-07 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

Visual Studio Code Extensions

Extension
Author
Version

csharp
ms-vscode
1.21.1

Go
ms-vscode
0.11.4

powershell-preview
ms-vscode
2019.5.0

remote-containers
ms-vscode-remote
0.71.0

remote-ssh
ms-vscode-remote
0.45.6

remote-ssh-edit
ms-vscode-remote
0.45.6

remote-ssh-explorer
ms-vscode-remote
0.45.6

remote-wsl
ms-vscode-remote
0.39.4

shell-format
foxundermoon
6.1.1

vetur
octref
0.22.2

vscode-remote-extensionpack
ms-vscode-remote
0.16.0

vscode-xml-complete
rogalmic
0.1.9

That happens to me whenever I run a WPF application. Deleting the g.i.cs files inside obj folder seem to solve the problem temporarily. Ominisharp should ignore these files.

Deleting those doesn't do anything for me it seems.
But it does seem to be related to the files inside obj, as it seems to look at them and hence see duplicates.
Kinda odd it just complains on the InitialComponent() though.
Would love to have this solved as it's quite annoying to always have the error and you can't tell if the "red file" is an actual error or not until you open and notice it's just that InitialComponent one;P
I would gladly debug etc if that helps, i am currently running the latest beta as i think someone mentioned it being solved there, but that sadly wasn't the case.
So well if i can do anything to help out do tell,
cause i don't want to just demand a solution without providing some kind of assistance myself:)
(Great software overall btw, i don't mean to sound negative about it!)

Today I got the same issue. It seems omnisharp is not able to find settings to exclude obj and bin folders. I created omnisharp,json file in the %USERPROFILE%/.omnisharp/omnisharp.json directory,
and included below mentioned settings in omnisharp.json
{
"fileOptions": {
"systemExcludeSearchPatterns": [
"/bin//",
"/obj//"
],
"userExcludeSearchPatterns": []
}
}
Then after restarting vscode, the issue got resolved.

Trying a new wpf app with .NET Core 3.1 + latest plugin builds + runs with no IntelliSense issues. Can you reproduce this in that environment?

I believe this has something to do with this: https://github.com/OmniSharp/omnisharp-roslyn/pull/1704

The workaround from @vijay7790 worked for me.
To reproduce the bug, I have created a basic WPF app with:
dotnet new wpf
No problems until here. So I add a package like Dapper:
dotnet add package Dapper
and now this bug happens.

sdff

@karimrahimian You may be onto something there.

This could be an O# bug. If you are still seeing this problem, please open a new issue at https://github.com/OmniSharp/omnisharp-roslyn/issues


PYCO-38: Update CI API docs publishing and verify release logic

Changes

Update publish.yml to add input param that allows the git tag command to be skipped
Update verify_release.yml to make the pycbcc-test-setup unique per test PyPI and PyPI runs

Published 1.0.0 API docs w/ this change:
https://github.com/couchbaselabs/columnar-python-client/actions/runs/11298253026
While I cannot verify the verify_release.yml change by publishing, I did run the workflow and you can see the test-setup name changed to pycbcc-test-setup-test-pypi and pycbcc-test-setup-pypi

test PyPI run: https://github.com/couchbaselabs/columnar-python-client/actions/runs/11298278081
PyPI run: https://github.com/couchbaselabs/columnar-python-client/actions/runs/11298387624


Use full path for README.md

Use the full path e.g. foo/README.md

Oops. Wrong project.

Oops. Wrong project.


BinaryGUID=False needs to be detected/enforced.

It's well established that for the guid update you need to have BinaryGUID=False; in the sqlite connection string, otherwise bad things happen.
I am thinking that we need to detect/enforce this before/during the AddGuidColumn update when people start upgrading to 6.0.0, because otherwise we could end up in a world of misery if people hang on to their existing web.configs.
Either that or fix the code to work with binary guids in the sqlite code - I'm not sure what's involved in that.

:+1:
We can ask the connectionstring of the EF framework if it contains the appropriate string.


Feature Request: Allow passthrough arns for cloudwatch log groups

Currently, the terraform resource for MWAA has the capability to create cloudwatch logs using the logging_configuration block. Our organization would like to be able to output logs to an existing cloudwatch log group by specifying an arn. This would allow us to get access to all of the features available when creating a log group using the aws_cloudwatch_log_group resource (such as log retention).
Let me know if this is the wrong location for such a feature request - I'd be happy to open it in the appropriate location

Wrong project - posting in the primary terraform provider project


Fix problem with encrypted environment variables for PR from fork

PR from fork failed because encrypted environment variables are not available for this builds, see https://docs.travis-ci.com/user/environment-variables/

Interesting article about this problem: https://blog.algolia.com/travis-encrypted-variables-external-contributions/
It seems that there is no easy solution how to do it... because for our testing we need credentials with write access to WA (to deploy workspace and test it) and somebody from outside could rewrite travis.yml to steal our credentials or attack WA by multiply requests (could cause DoS) and that could cost us something (API calls).

Related: https://github.com/travis-ci/travis-ci/issues/6112

After internal discussion we realized that we cannot allow to anybody from outside to run Travis CI without our code check before because it can contain changes that break CI or delete github repository.

Certainly allowing any external pull request to access encrypted variables could open up some security holes.  But it's also useful to have CI be able to run against external pull requests before merging them, which also sometimes requires use of those encrypted variables.
Would it be reasonable to allow external PR builds to access encrypted variables after they have been approved by a project member on Github (perhaps as a per-project setting in case some don't want this)?  That would make it so that a real person can inspect the code for any potential security issues before CI runs, but still have the confidence of CI running before merging.

We decided to create lite instance of WA and provide its credential in Travis CI to be able to run PR from fork. Slack and Artifactory remain disable. We are aware of possible problems.


some refactor-love ?

I'm quite tempted to do a full code re-factor on this entire project, specifically: separate each endpoint into its own self-contained in-project-module
benefits of course are:

readability
separate tests per module
abstract some utility methods

before I attempt such a task, what's the likely hood of this being an accepted PR, or do you like to keep things as they are now?

I don’t know about @espadrine, but it sounds like a very good idea to me.

@espadrine let me know your thoughts, happy to take on this one ...

Moving code into separate modules is not a good idea. For historical reasons, quite a few of those endpoints can match the same URL, for varied URLs. The only reason they work is then the order in which they are defined. Obscuring that order would make debugging harder.
 Those can probably be factored in a different file, say, util-server.js. I don't feel like it would be of any use, but if well done, I wouldn't refuse it.
Testing is of course imperfect (as in, manual). The CLI and backend engine have tests, but the server does not. What would be helpful however isn't tests here; it would be automated error reporting. We know that a list of badges should work. Having a program that goes through them and reports what the vendor server sent back if the badge failed would be great. However, it should absolutely not complexify the existing logic of the server. That's also a nice-to-have; it wouldn't help development (copying the vendor URL and filling the incriminating values would still have to be done). That work would be useless, but you can do it if you want.
To be honest, I didn't bother doing so because contributions are not an issue. We've had loads from day 1, and they aren't too hard to review, even though some mistakes get made. The hard work and blood is in the backend, package management, puzzle work of keeping everything working together. server.js is like an amusement park, messy but fun, and it gets work done.
Something that would have helped me (and, I believe, contributors) a lot is this: https://github.com/badges/shields/pull/276 but the patch wasn't finished. If you simply finished that patch, that would help the project a lot. Anything else would be like a third wheel.

The only reason they work is then the order in which they are defined. Obscuring that order would make debugging harder.

you can keep the routing info in the main file, with the same order and abstract away the resolving function itself into a self-contained module, write tests for the function itself in isolation.
doing so would also help in writing an error reporting system much like you described.
I'll definitely take a look at 276, is certainly the starting point to clean up syntax before any type of re-factoring.
I'll pitch this:

I'll get 276 cleaned up and done.
group / abstract utility functions
then start a branch with a suggested re-structure i'm describing and showcasing the values gained with tests.

how do you feel about standard, can add to npm test that and apply coding style fixes? takes care of #276
(there's also semistandard if you prefer to keep those semi-colons)

I totally agree with @ahmadnassri. File server.js has 4 175 LOC – this is insane!

Moving code into separate modules is not a good idea. For historical reasons, quite a few of those endpoints can match the same URL, for varied URLs. The only reason they work is then the order in which they are defined.

Not a good idea? Just opposite, this is very strong reason to refactor this mess.

File server.js has 4 175 LOC – this is insane!

Does the file size make it harder for you to write patches? I am honestly asking. I tend to jump around easily by relying on my editor's regex find and on grep, and my editor is far from having trouble with that file size, but I know everyone has their own workflow.

Not a good idea? Just opposite, this is very strong reason to refactor this mess.

I'm not sure what you mean. We could complexify the regexes to ensure that they never overlap, but that sounds like a lot of work; is that what you are suggesting?

Does the file size make it harder for you to write patches? I am honestly asking.

It’s not just about the file size, but also code structure, code-quality etc. Since you’re honestly asking, then yes, it’s so bad that it really discourages me from contributing.

Could you detail what you would like to see changed in the code structure?
What would you like to contribute?

This has been picked up in #948. Please join us there!


Illegal request, responding with status '400 Bad Request'

Using latest jpro plugins available yet.
com.sandec.jpro:jpro-plugin-gradle:2022.1.8
com.sandec.jpro:jpro-routing-core:0.11.0
com.sandec.jpro:jpro-webapi:2022.1.5
com.sandec.jpro:jpro-boot:2022.1.5
one.jpro.jproutils:tree-showing:0.2.1

8080 port is hidden using Apache server listing on some domain e.g. https://somedomain.com
2022-11-22 12:13:52,112 [INFO] in scala-execution-context-global-9759 - [info] c.j.i.s.ViewInfo$ - startTime      : Tue Nov 22 12:13:52 PKT 2022
2022-11-22 12:13:52,107 [INFO] in scala-execution-context-global-9759 - [info] c.j.i.s.ViewInfo$ - Application closed:
2022-11-22 12:13:52,107 [INFO] in scala-execution-context-global-9759 - [info] c.j.i.s.ViewInfo$ -
2022-11-22 12:13:52,054 [INFO] in scala-execution-context-global-9759 - [info] c.j.i.s.ViewSerializerActor - Client closed session. Reason: tab closed
2022-11-22 12:09:36,669 [INFO] in scala-execution-context-global-9759 - [warn] a.a.ActorSystemImpl - Illegal request, responding with status '400 Bad Request': Cannot establish effective URI of request to `/`, request has a relative URI and is missing a `Host` header: consider setting `akka.http.server.default-host-header`
2022-11-22 11:14:46,139 [INFO] in scala-execution-context-global-9747 - 	at com.zaxxer.hikari.proxy.StatementProxy.executeQuery(StatementProxy.java:99)
2022-11-22 11:14:46,139 [INFO] in scala-execution-context-global-9747 - 	at org.mariadb.jdbc.Statement.executeQuery(Statement.java:114)
2022-11-22 11:14:46,139 [INFO] in scala-execution-context-global-9747 - 	at org.mariadb.jdbc.Statement.executeInternal(Statement.java:906)
2022-11-22 11:14:46,139 [INFO] in scala-execution-context-global-9759 - 	at org.mariadb.jdbc.client.impl.StandardClient.execute(StandardClient.java:616)
2022-11-22 11:14:46,139 [INFO] in scala-execution-context-global-9759 - 	at org.mariadb.jdbc.client.impl.StandardClient.readResponse(StandardClient.java:673)
2022-11-22 11:14:46,139 [INFO] in scala-execution-context-global-9760 - 	at org.mariadb.jdbc.client.impl.StandardClient.readResults(StandardClient.java:754)
2022-11-22 11:14:46,139 [INFO] in scala-execution-context-global-9760 - 	at org.mariadb.jdbc.client.impl.StandardClient.readPacket(StandardClient.java:815)
2022-11-22 11:14:46,139 [INFO] in scala-execution-context-global-9747 - 	at org.mariadb.jdbc.message.ClientMessage.readPacket(ClientMessage.java:133)
2022-11-22 11:14:46,139 [INFO] in scala-execution-context-global-9747 - 	at org.mariadb.jdbc.export.ExceptionFactory.create(ExceptionFactory.java:358)
2022-11-22 11:14:46,139 [INFO] in scala-execution-context-global-9759 - 	at org.mariadb.jdbc.export.ExceptionFactory.createException(ExceptionFactory.java:270)

You shouldn't define jpro-boot anywhere. It is always provided by the JPro plugin.
(And you have sometimes version 2022.1.5 instead of 2022.1.8)
I guess the error "a.a.ActorSystemImpl - Illegal request" just means that someone is making unreasonable http request, and is therefore not an error. If you can't reproduce it, it also might be some kind of crawler or bot which might cause this.
The exception at the bottom is probably from your codebase.

Fixed it by using 2022.1.8 version of all jpro plugins version, rather then 2022.1.5 (mistaken)


fix(pod): unable to use LabelSelector class in python (#841)

Backport
This will backport the following commits from k8s-24/main to k8s-23/main:

fix(pod): unable to use LabelSelector class in python (#841)

Questions ?
Please refer to the Backport tool documentation

⚪ Backport skipped
The pull request was not backported as there were no branches to backport to. If this is a mistake, please apply the desired version labels or run the backport tool manually.
Manual backport
To create the backport manually run:
backport --pr 889

Questions ?
Please refer to the Backport tool documentation


Auto detect dataframe formatting

The purpose is to make the flow of inserting data easier.
By making the insert method inspect the type of input then either cast if it is correctly formatted or try to figure out the formatting of the data to meet the standards of the API.
import pandas as pd
import pyclarify as pyc

times = ["2023-01-01T00:00:00Z", "2023-01-02T00:00:00Z", "2023-01-03T00:00:00Z"]
data = [ 1, 2, 3]

# Clarify df
df_1 = pyc.DataFrame(times=times, data={"input_id": data})

# Pandas dfs
df_2 = pd.DataFrame(index=times, data={"input_id": data})
df_3 = pd.DataFrame(data={"timestamps": times, "input_id":data})

# dictionary
df_4 = {"timestamps": times, "input_id":data}

client = pyc.Client("creds.json")

client.insert(df_1)
client.insert(df_2)
client.insert(df_3)
client.insert(df_4)

Added in #147


Authentication when a user is deleted

When adding multiple users on keys
> articulate:hash:UserAccount:1
> articulate:hash:UserAccount:2
> articulate:hash:UserAccount:3
> articulate:hash:UserAccount:4
> articulate:hash:UserAccount:5
> articulate:hash:UserAccount:6
> articulate:hash:UserAccount:7

if you delete the user located on articulate:hash:UserAccount:4, the users on
> articulate:hash:UserAccount:5
> articulate:hash:UserAccount:6
> articulate:hash:UserAccount:7

cannot be accessed anymore
in order to solve this issue, the search element should be switched from an incremental/existance type to an incremental from key type
it should look somehow like this (tested on .netcore test project)
            foreach (var key in server.Keys(pattern: "articulate:hash:UserAccount:*"))
            {
                db.HashGetAll(key);
            }

@Blue-Beam-com authentication isn't not in an official release yet so you are using un-tested features. Thanks for reporting this though, we'll get to it as fast as we can.

Yes obviously.
I'm trying to understand how to implement the solution on your project.

@Blue-Beam-com How are you adding/deleting the users?
On the API we are using nohm to manage the data in our redis db. If you directly remove keys from redis it could create some issues since nohm does other work to keep all indexes properly related.

i did the modification directly on the database (using a .net core app i made), but i didn't know about the nohm mapper.
I was trying to see how make a role guided user management system for articulate.

We'll be looking at adding roles/groups in the future and would be interested in collaboration on it. For the moment note that you can't modify redis directly.


Update log4cats-slf4j to 2.6.0

About this PR
📦 Updates org.typelevel:log4cats-slf4j from 2.1.1 to 2.6.0
📜 GitHub Release Notes - Version Diff
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.typelevel", artifactId = "log4cats-slf4j" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "org.typelevel", artifactId = "log4cats-slf4j" }
}]

labels: library-update, early-semver-minor, semver-spec-minor, version-scheme:early-semver, commit-count:1

Superseded by #20.


OOP school library: refactor code

Make sure YAGNI, KISS, and DRY rules and Ruby style guide are respected.

Follow SOLID principles.

main.rb is only to start code and ask the user for the initial choice of options (or to quit).

Extract some pieces of logic into separate class(es).

@julie-ify, Thanks for the time to review and approve our project


Initial Code Commit

Codecov Report

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

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@          Coverage Diff           @@
##             main      #2   +/-   ##
======================================
  Coverage        ?   0.00%
======================================
  Files           ?       3
  Lines           ?     415
  Branches        ?       0
======================================
  Hits            ?       0
  Misses          ?     415
  Partials        ?       0

Flag
Coverage Δ

unittests
0.00% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Add OPA Gatekeeper blog post

cc @timothyhinrichs @maxsmythe @tsandall @lachie83

Updated this post based on the recent Gatekeeper beta release. @sftim Can you pls provide another review? Pls LMK if there's anything else that needs to be addressed before we can merge this.

No objections from me (last review was only informal feedback anyway).

Updated the post date and reworded the intro. PTAL 🙇♀

Thank you kindly @ritazh ❤
/lgtm

/approve

/assign @kbarnard10

/approve

Thank you all for the feedback! ❤


HHH-13724 Add initial configs for testing CockroachDB

hi @rafiss , the changes are good, I could merge this but I'm concerned that it will consume other people: they might wonder why you're not using the postgresql driver / dependency / dialect.
I do understand this is because more changes are coming; could you add some comments in the code so that others can understand this too?
Thanks

@Sanne Thank you! I agree it may be confusing. I will work on adding the CockroachDB Dialect in this PR, so that all the work is captured in this PR.

hi @rafiss , I happen to have noticed you added some more commits. Let me know when you want us to have a look again? Please keep in mind we don't get notifications for further commits being added.

Thanks @Sanne! We are actually still working on adding more to the Dialect, and have moved development over to our fork in the cockroachdb org for now (https://github.com/cockroachdb/hibernate-orm/tree/HHH-13724-cockroachdb-support). It's still in progress, but we definitely will ping you when we would like you to take a look again (and we may open a separate PR using that fork, and close this one).

Closing this PR in favor of https://github.com/hibernate/hibernate-orm/pull/3137


Fix yarn expo:web

Please verify the following:

[x] yarn test jest tests pass with new tests, if relevant
[x] README.md has been updated with your changes, if relevant

Describe your PR
Running yarn expo:web was causing the following fatal error in the browser. This PR adds a babel plugin to handle the reanimated on web.
log.js:24 [HMR] Waiting for update signal from WDS...
utils.ts:24 Uncaught Error: Module build failed (from ./node_modules/@expo/webpack-config/node_modules/babel-loader/lib/index.js):
SyntaxError: /Users/joshuayoes/Code/ignite/boilerplate/node_modules/react-native-reanimated/lib/index.web.js: Export namespace should be first transformed by `@babel/plugin-proposal-export-namespace-from`.
  4 | export * from './reanimated1';
  5 | export * from './reanimated2';
> 6 | export * as default from './Animated'; // If this line fails, you probably forgot some installation steps. Check out the installation guide here: https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation/ 1) Make sure reanimated's babel plugin is installed in your babel.config.js (you should have 'react-native-reanimated/plugin' listed there - also see the above link for details) 2) Make sure you reset build cache after updating the config, run: yarn start --reset-cache
    |        ^^^^^^^^^^^^
  7 |
    at File.buildCodeFrameError (:19006/Users/joshuayoes/Code/ignite/boilerplate/node_modules/@expo/webpack-config/node_modules/@babel/core/lib/transformation/file/file.js:248:12)
    at NodePath.buildCodeFrameError (:19006/Users/joshuayoes/Code/ignite/boilerplate/node_modules/@babel/traverse/lib/path/index.js:106:21)
    at assertExportSpecifier (:19006/Users/joshuayoes/Code/ignite/boilerplate/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js:96:16)
    at :19006/Users/joshuayoes/Code/ignite/boilerplate/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js:179:9
    at Array.forEach (<anonymous>)
    at :19006/Users/joshuayoes/Code/ignite/boilerplate/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js:178:31
    at Array.forEach (<anonymous>)
    at getModuleMetadata (:19006/Users/joshuayoes/Code/ignite/boilerplate/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js:129:27)
    at normalizeModuleAndLoadMetadata (:19006/Users/joshuayoes/Code/ignite/boilerplate/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js:49:7)
    at rewriteModuleStatementsAndPrepareHeader (:19006/Users/joshuayoes/Code/ignite/boilerplate/node_modules/@babel/helper-module-transforms/lib/index.js:88:54)
    at PluginPass.exit (:19006/Users/joshuayoes/Code/ignite/boilerplate/node_modules/@babel/plugin-transform-modules-commonjs/lib/index.js:159:83)
    at newFn (:19006/Users/joshuayoes/Code/ignite/boilerplate/node_modules/@babel/traverse/lib/visitors.js:159:21)
    at NodePath._call (:19006/Users/joshuayoes/Code/ignite/boilerplate/node_modules/@babel/traverse/lib/path/context.js:46:20)
    at NodePath.call (:19006/Users/joshuayoes/Code/ignite/boilerplate/node_modules/@babel/traverse/lib/path/context.js:36:17)
    at NodePath.visit (:19006/Users/joshuayoes/Code/ignite/boilerplate/node_modules/@babel/traverse/lib/path/context.js:92:8)
    at TraversalContext.visitQueue (:19006/Users/joshuayoes/Code/ignite/boilerplate/node_modules/@babel/traverse/lib/context.js:96:16)
    at TraversalContext.visitSingle (:19006/Users/joshuayoes/Code/ignite/boilerplate/node_modules/@babel/traverse/lib/context.js:72:19)
    at TraversalContext.visit (:19006/Users/joshuayoes/Code/ignite/boilerplate/node_modules/@babel/traverse/lib/context.js:121:19)
    at traverseNode (:19006/Users/joshuayoes/Code/ignite/boilerplate/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
    at traverse (:19006/Users/joshuayoes/Code/ignite/boilerplate/node_modules/@babel/traverse/lib/index.js:50:34)
    at transformFile (:19006/Users/joshuayoes/Code/ignite/boilerplate/node_modules/@expo/webpack-config/node_modules/@babel/core/lib/transformation/index.js:107:29)
    at transformFile.next (<anonymous>)
    at run (:19006/Users/joshuayoes/Code/ignite/boilerplate/node_modules/@expo/webpack-config/node_modules/@babel/core/lib/transformation/index.js:35:12)
    at run.next (<anonymous>)
    at Function.transform (:19006/Users/joshuayoes/Code/ignite/boilerplate/node_modules/@expo/webpack-config/node_modules/@babel/core/lib/transform.js:27:41)
    at transform.next (<anonymous>)
    at step (:19006/Users/joshuayoes/Code/ignite/boilerplate/node_modules/gensync/index.js:261:32)
    at :19006/Users/joshuayoes/Code/ignite/boilerplate/node_modules/gensync/index.js:273:13
    at async.call.result.err.err (:19006/Users/joshuayoes/Code/ignite/boilerplate/node_modules/gensync/index.js:223:11)
    at ./node_modules/react-native-reanimated/lib/index.web.js (utils.ts:24:1)
    at __webpack_require__ (bootstrap:789:1)
    at fn (bootstrap:100:1)
    at ./app/components/Toggle.tsx (Toggle.tsx:15:1)
    at __webpack_require__ (bootstrap:789:1)
    at fn (bootstrap:100:1)
    at ./app/components/index.ts (index.ts:10:1)
    at __webpack_require__ (bootstrap:789:1)
    at fn (bootstrap:100:1)
    at ./app/screens/WelcomeScreen.tsx (WelcomeScreen.tsx:4:1)
    at __webpack_require__ (bootstrap:789:1)
    at fn (bootstrap:100:1)
    at ./app/screens/index.ts (index.ts:1:1)
    at __webpack_require__ (bootstrap:789:1)
    at fn (bootstrap:100:1)
    at ./app/navigators/AppNavigator.tsx (AppNavigator.tsx:20:1)
    at __webpack_require__ (bootstrap:789:1)
    at fn (bootstrap:100:1)
    at ./app/navigators/index.ts (index.ts:1:1)
    at __webpack_require__ (bootstrap:789:1)
    at fn (bootstrap:100:1)
    at ./app/app.tsx (app.tsx:19:1)
    at __webpack_require__ (bootstrap:789:1)
    at fn (bootstrap:100:1)
    at ./App.js (App.js:3:1)
    at __webpack_require__ (bootstrap:789:1)
    at fn (bootstrap:100:1)
    at ./node_modules/expo/AppEntry.js (AppEntry.js:3:1)
    at __webpack_require__ (bootstrap:789:1)
    at fn (bootstrap:100:1)
    at 1 (log.js:59:1)
    at __webpack_require__ (bootstrap:789:1)
    at bootstrap:856:1
    at bootstrap:856:1
VM11:2 Uncaught ReferenceError: process is not defined
    at 4043 (<anonymous>:2:13168)
    at r (<anonymous>:2:306599)
    at 8048 (<anonymous>:2:9496)
    at r (<anonymous>:2:306599)
    at 8641 (<anonymous>:2:1379)
    at r (<anonymous>:2:306599)
    at <anonymous>:2:315627
    at <anonymous>:2:324225
    at <anonymous>:2:324229
    at e.onload (index.js:1:1)
index.js:1 ./node_modules/react-native-reanimated/lib/index.web.js
SyntaxError: /Users/joshuayoes/Code/ignite/boilerplate/node_modules/react-native-reanimated/lib/index.web.js: Export namespace should be first transformed by `@babel/plugin-proposal-export-namespace-from`.
  4 | export * from './reanimated1';
  5 | export * from './reanimated2';
> 6 | export * as default from './Animated'; // If this line fails, you probably forgot some installation steps. Check out the installation guide here: https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation/ 1) Make sure reanimated's babel plugin is installed in your babel.config.js (you should have 'react-native-reanimated/plugin' listed there - also see the above link for details) 2) Make sure you reset build cache after updating the config, run: yarn start --reset-cache
    |        ^^^^^^^^^^^^
  7 |
    at Array.forEach (<anonymous>)
    at Array.forEach (<anonymous>)
    at transformFile.next (<anonymous>)
    at run.next (<anonymous>)
    at transform.next (<anonymous>)
console.<computed> @ index.js:1
webpackHotDevClient.js:76 The development server has disconnected.
Refresh the page if necessary.

:tada: This PR is included in version 8.6.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


fleetctl list-unit-files not fully populated for global units

I started a global unit ping.service in a three-node cluster:
$ fleetctl list-unit-files
UNIT			HASH	DSTATE		STATE	TARGET
ping.service	a5e03d5	launched	-		-

$ fleetctl list-units
UNIT			MACHINE						ACTIVE	SUB
ping.service	c5bb3cdf.../<IP_ADDRESS>	active	running
ping.service	d368d34e.../<IP_ADDRESS>	active	running
ping.service	f4b6d7de.../<IP_ADDRESS>	active	running

Note that all three machines are running ping.service, but the DSTATE and TARGET columns are empty. We clearly cannot use the same approach as non-global units, but we can make an attempt:
$ fleetctl list-unit-files
UNIT			HASH	DSTATE		STATE		TARGET
ping.service	a5e03d5	launched	launched(3)	global
other.service	d368d34	loaded		loaded		f4b6d7de.../<IP_ADDRESS>

How would this look like, when one machine has a failed state? So generally, how does this behave with mixed states on different machines?


Implementation Series.cov in new style

Hello @Rubtsowa! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file hpat/datatypes/hpat_pandas_series_functions.py:

Line 3136:1: W391 blank line at end of file

In the file hpat/tests/test_series.py:

Line 3695:40: E231 missing whitespace after ','
Line 3701:121: E501 line too long (138 > 120 characters)
Line 3706:121: E501 line too long (138 > 120 characters)


WFLY-6502, WFLY-6522 Non-tx web session cache fixes

https://issues.jboss.org/browse/WFLY-6502
https://issues.jboss.org/browse/WFLY-6522
https://issues.jboss.org/browse/WFLY-6591
Adds "concurrent" cache configuration for user convenience.

Retest this please.

Linux Build 9551 outcome was FAILURE using a merge of f9efdf5c9cc71021c3162bb1004a8869c7bbbae3
Summary: Tests failed: 2 (2 new), passed: 3338, ignored: 194 Build time: 00:56:39
Failed tests
org.jboss.as.test.integration.ejb.remote.client.api.tx.EJBClientUserTransactionTestCase.testBatchOperationsInTx: java.lang.IllegalStateException: EJBCLIENT000050: Node of the current transaction build28-el7 does not accept StatelessEJBLocator for "ejb-remote-client-api-usertx-test/ejb/BatchCreationBean", view is interface org.jboss.as.test.integration.ejb.remote.client.api.tx.RemoteBatch, affinity is None
	at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:49)
	at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:186)
	at org.jboss.ejb.client.EJBInvocationHandler.sendRequestWithPossibleRetries(EJBInvocationHandler.java:255)
	at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:200)
	at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:183)
	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:146)
	at com.sun.proxy.$Proxy88.createBatch(Unknown Source)
	at org.jboss.as.test.integration.ejb.remote.client.api.tx.EJBClientUserTransactionTestCase.testBatchOperationsInTx(EJBClientUserTransactionTestCase.java:163)
------- Stdout: -------
 [0m11:59:52,661 INFO  [org.jboss.weld.deployer] (MSC service thread 1-8) WFLYWELD0010: Stopping weld service for deployment ejb-client-interceptor-test-module.jar
 [0m [0m11:59:52,668 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0028: Stopped deployment ejb-client-interceptor-test-module.jar (runtime-name: ejb-client-interceptor-test-module.jar) in 10ms
 [0m [0m11:59:52,669 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 21) WFLYCLINF0003: Stopped client-mappings cache from ejb container
 [0m [0m11:59:52,678 INFO  [org.jboss.as.repository] (management-handler-thread - 3) WFLYDR0002: Content removed from location /opt/buildAgent/work/a31d203e70e89f90/testsuite/integration/basic/target/jbossas/standalone/data/content/41/e8976d139918ae28155396a10b88d59971cd8b/content
 [0m [0m11:59:52,678 INFO  [org.jboss.as.server] (management-handler-thread - 3) WFLYSRV0009: Undeployed "ejb-client-interceptor-test-module.jar" (runtime-name: "ejb-client-interceptor-test-module.jar")
 [0m [0m11:59:52,708 INFO  [org.jboss.as.repository] (management-handler-thread - 2) WFLYDR0001: Content added at location /opt/buildAgent/work/a31d203e70e89f90/testsuite/integration/basic/target/jbossas/standalone/data/content/3b/17da70c935c84da9e577a05d451f09b4520d4c/content
 [0m [0m11:59:52,711 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0027: Starting deployment of "ejb-remote-client-api-usertx-test.ear" (runtime-name: "ejb-remote-client-api-usertx-test.ear")
 [0m [0m11:59:52,716 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0207: Starting subdeployment (runtime-name: "ejb.jar")
 [0m [0m11:59:52,730 INFO  [org.jboss.as.jpa] (MSC service thread 1-5) WFLYJPA0002: Read persistence.xml for ejb-client-tx-pu
 [0m [33m11:59:52,737 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-5) WFLYSRV0018: Deployment "deployment.ejb-remote-client-api-usertx-test.ear.ejb.jar" is using a private module ("org.wildfly.security.manager:main") which may be changed or removed in future versions without notice.
 [0m [33m11:59:52,740 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-5) WFLYSRV0018: Deployment "deployment.ejb-remote-client-api-usertx-test.ear" is using a private module ("org.wildfly.security.manager:main") which may be changed or removed in future versions without notice.
 [0m [0m11:59:52,742 INFO  [org.jboss.weld.deployer] (MSC service thread 1-5) WFLYWELD0003: Processing weld deployment ejb-remote-client-api-usertx-test.ear
 [0m [0m11:59:52,753 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 21) WFLYJPA0010: Starting Persistence Unit (phase 1 of 2) Service 'ejb-remote-client-api-usertx-test.ear/ejb.jar#ejb-client-tx-pu'
 [0m [0m11:59:52,753 INFO  [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 21) HHH000204: Processing PersistenceUnitInfo [
	name: ejb-client-tx-pu
	...]
 [0m [0m11:59:52,754 INFO  [org.jboss.weld.deployer] (MSC service thread 1-5) WFLYWELD0003: Processing weld deployment ejb.jar
 [0m [0m11:59:52,756 INFO  [org.jboss.as.ejb3.deployment] (MSC service thread 1-5) WFLYEJB0473: JNDI bindings for session bean named 'BatchFetchingBean' in deployment unit 'subdeployment "ejb.jar" of deployment "ejb-remote-client-api-usertx-test.ear"' are as follows:

	java:global/ejb-remote-client-api-usertx-test/ejb/BatchFetchingBean!org.jboss.as.test.integration.ejb.remote.client.api.tx.BatchRetriever
	java:app/ejb/BatchFetchingBean!org.jboss.as.test.integration.ejb.remote.client.api.tx.BatchRetriever
	java:module/BatchFetchingBean!org.jboss.as.test.integration.ejb.remote.client.api.tx.BatchRetriever
	java:jboss/exported/ejb-remote-client-api-usertx-test/ejb/BatchFetchingBean!org.jboss.as.test.integration.ejb.remote.client.api.tx.BatchRetriever
	java:global/ejb-remote-client-api-usertx-test/ejb/BatchFetchingBean
	java:app/ejb/BatchFetchingBean
	java:module/BatchFetchingBean

 [0m [0m11:59:52,756 INFO  [org.jboss.as.ejb3.deployment] (MSC service thread 1-5) WFLYEJB0473: JNDI bindings for session bean named 'BatchCreationBean' in deployment unit 'subdeployment "ejb.jar" of deployment "ejb-remote-client-api-usertx-test.ear"' are as follows:

	java:global/ejb-remote-client-api-usertx-test/ejb/BatchCreationBean!org.jboss.as.test.integration.ejb.remote.client.api.tx.RemoteBatch
	java:app/ejb/BatchCreationBean!org.jboss.as.test.integration.ejb.remote.client.api.tx.RemoteBatch
	java:module/BatchCreationBean!org.jboss.as.test.integration.ejb.remote.client.api.tx.RemoteBatch
	java:jboss/exported/ejb-remote-client-api-usertx-test/ejb/BatchCreationBean!org.jboss.as.test.integration.ejb.remote.client.api.tx.RemoteBatch
	java:global/ejb-remote-client-api-usertx-test/ejb/BatchCreationBean
	java:app/ejb/BatchCreationBean
	java:module/BatchCreationBean

 [0m [0m11:59:52,756 INFO  [org.jboss.as.ejb3.deployment] (MSC service thread 1-5) WFLYEJB0473: JNDI bindings for session bean named 'CMTBean' in deployment unit 'subdeployment "ejb.jar" of deployment "ejb-remote-client-api-usertx-test.ear"' are as follows:

	java:global/ejb-remote-client-api-usertx-test/ejb/CMTBean!org.jboss.as.test.integration.ejb.remote.client.api.tx.CMTRemote
	java:app/ejb/CMTBean!org.jboss.as.test.integration.ejb.remote.client.api.tx.CMTRemote

org.jboss.as.test.clustering.cluster.web.passivation.CoarseSessionPassivationTestCase(SYNC-tcp).test: java.lang.AssertionError: response doesn't contain header 'result', all response headers = {name=Connection, value=keep-alive}, {name=cMWbi6stQpd6vu2h0F0Sds2AVawZyRxjDXmibK7d, value=PASSIVATION}, {name=X-Powered-By, value=Undertow/1}, {name=Set-Cookie, value=JSESSIONID=kN8jUtEfU3M3S7Ae8pVYmgMtLgh_bKpeW9uKG5UB.node-0; path=/passivation}, {name=Server, value=WildFly/10}, {name=Content-Length, value=0}, {name=jsessionid, value=kN8jUtEfU3M3S7Ae8pVYmgMtLgh_bKpeW9uKG5UB}, {name=Date, value=Wed, 11 May 2016 19:14:54 GMT},
	at org.jboss.as.test.clustering.cluster.web.passivation.SessionPassivationTestCase.getRequiredHeaderValue(SessionPassivationTestCase.java:207)
	at org.jboss.as.test.clustering.cluster.web.passivation.SessionPassivationTestCase.test(SessionPassivationTestCase.java:153)
------- Stdout: -------
12:14:54,676 INFO  [org.jboss.as.test.clustering.NodeUtil] (main) Starting deployment=NONE, container=container-0
12:14:54,677 INFO  [org.jboss.as.test.clustering.NodeUtil] (main) Starting deployment=NONE, container=container-1
12:14:54,677 INFO  [org.jboss.as.test.clustering.NodeUtil] (main) Deploying deployment=deployment-0
 [0m12:14:54,686 INFO  [org.jboss.as.repository] (management-handler-thread - 2) WFLYDR0001: Content added at location /opt/buildAgent/work/a31d203e70e89f90/testsuite/integration/clustering/target/wildfly-SYNC-tcp-0/standalone/data/content/f2/1295f6323924f26d34303d9ef3834799fa92e5/content
 [0m [0m12:14:54,688 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0027: Starting deployment of "passivation.war" (runtime-name: "passivation.war")
 [0m [0m12:14:54,717 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 4) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
 [0m [0m12:14:54,717 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 4) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
 [0m [0m12:14:54,719 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 2) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
 [0m [0m12:14:54,719 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 2) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
 [0m [0m12:14:54,722 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 79) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
 [0m [0m12:14:54,722 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 79) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
 [0m [0m12:14:54,754 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 2) WFLYCLINF0002: Started routing cache from web container
 [0m [0m12:14:54,766 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 79) WFLYCLINF0002: Started passivation.war cache from web container
 [0m [0m12:14:54,775 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 79) WFLYUT0021: Registered web context: /passivation
 [0m [0m12:14:54,782 INFO  [org.jboss.as.server] (management-handler-thread - 2) WFLYSRV0010: Deployed "passivation.war" (runtime-name : "passivation.war")
 [0m12:14:54,792 INFO  [org.jboss.as.test.clustering.NodeUtil] (main) Deploying deployment=deployment-1
 [0m12:14:54,804 INFO  [org.jboss.as.repository] (management-handler-thread - 3) WFLYDR0001: Content added at location /opt/buildAgent/work/a31d203e70e89f90/testsuite/integration/clustering/target/wildfly-SYNC-tcp-1/standalone/data/content/f2/1295f6323924f26d34303d9ef3834799fa92e5/content
 [0m [0m12:14:54,808 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0027: Starting deployment of "passivation.war" (runtime-name: "passivation.war")
 [0m [0m12:14:54,845 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 17) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
 [0m [0m12:14:54,845 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 17) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
 [0m [0m12:14:54,856 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 29) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
 [0m [0m12:14:54,856 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 29) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
 [0m [0m12:14:54,864 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 17) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
 [0m [0m12:14:54,865 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 17) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
 [0m [0m12:14:54,866 INFO  [org.infinispan.CLUSTER] (ServerService Thread Pool -- 29) ISPN000310: Starting cluster-wide rebalance for cache passivation.war, topology CacheTopology{id=1, rebalanceId=1, currentCH=DefaultConsistentHash{ns=80, owners = (1)[node-0: 80+0]}, pendingCH=DefaultConsistentHash{ns=80, owners = (2)[node-0: 40+40, node-1: 40+40]}, unionCH=null, actualMembers=[node-0, node-1]}
 [0m [0m12:14:54,869 INFO  [org.infinispan.CLUSTER] (ServerService Thread Pool -- 17) ISPN000310: Starting cluster-wide rebalance for cache routing, topology CacheTopology{id=1, rebalanceId=1, currentCH=DefaultConsistentHash{ns=80, owners = (1)[node-0: 80+0]}, pendingCH=DefaultConsistentHash{ns=80, owners = (2)[node-0: 40+40, node-1: 40+40]}, unionCH=null, actualMembers=[node-0, node-1]}
 [0m [0m12:14:54,897 INFO  [org.infinispan.CLUSTER] (transport-thread--p16-t2) ISPN000336: Finished cluster-wide rebalance for cache routing, topology id = 1
 [0m [0m12:14:54,902 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 17) WFLYCLINF0002: Started routing cache from web container
 [0m [0m12:14:54,904 INFO  [org.infinispan.CLUSTER] (transport-thread--p16-t4) ISPN000336: Finished cluster-wide rebalance for cache passivation.war, topology id = 1
 [0m [0m12:14:54,904 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 29) WFLYCLINF0002: Started passivation.war cache from web container
 [0m [0m12:14:54,915 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 17) WFLYUT0021: Registered web context: /passivation
 [0m [0m12:14:54,924 INFO  [org.jboss.as.server] (management-handler-thread - 3) WFLYSRV0010: Deployed "passivation.war" (runtime-name : "passivation.war")
 [0m [0m12:14:54,947 INFO  [stdout] (default task-36) http://[::1]:8080/passivation/listener?operation=set&name=a&value=1;jsessionid=cMWbi6stQpd6vu2h0F0Sds2AVawZyRxjDXmibK7d
 [0m [0m12:14:54,962 INFO  [stdout] (default task-37) http://[::1]:8080/passivation/listener?operation=set&name=a&value=2;jsessionid=wXY2ymwFfCIKZytvCAzhuUfnV9TMgPB4rDN3FyWA
 [0m [0m12:14:54,977 INFO  [stdout] (default task-38) http://[::1]:8080/passivation/listener?operation=get&name=a;jsessionid=cMWbi6stQpd6vu2h0F0Sds2AVawZyRxjDXmibK7d
 [0m [0m12:14:54,993 INFO  [stdout] (default task-39) http://[::1]:8080/passivation/listener?operation=get&name=a;jsessionid=kN8jUtEfU3M3S7Ae8pVYmgMtLgh_bKpeW9uKG5UB
 [0m12:14:54,999 INFO  [org.jboss.as.test.clustering.NodeUtil] (main) Starting deployment=NONE, container=container-0
12:14:54,999 INFO  [org.jboss.as.test.clustering.NodeUtil] (main) Starting deployment=NONE, container=container-1
12:14:54,999 INFO  [org.jboss.as.test.clustering.NodeUtil] (main) Undeploying deployment=deployment-0
 [0m12:14:55,011 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 79) WFLYUT0022: Unregistered web context: /passivation
 [0m [0m12:14:55,023 INFO  [org.infinispan.eviction.impl.PassivationManagerImpl] (ServerService Thread Pool -- 78) ISPN000029: Passivating all entries to disk
 [0m [0m12:14:55,023 INFO  [org.infinispan.eviction.impl.PassivationManagerImpl] (ServerService Thread Pool -- 78) ISPN000030: Passivated 3 entries in 0 milliseconds
 [0m [0m12:14:55,030 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 78) WFLYCLINF0003: Stopped passivation.war cache from web container
 [0m [0m12:14:55,035 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0028: Stopped deployment passivation.war (runtime-name: passivation.war) in 24ms
 [0m [0m12:14:55,037 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 79) WFLYCLINF0003: Stopped routing cache from web container
 [0m [0m12:14:55,044 INFO  [org.jboss.as.repository] (management-handler-thread - 4) WFLYDR0002: Content removed from location /opt/buildAgent/work/a31d203e70e89f90/testsuite/integration/clustering/target/wildfly-SYNC-tcp-0/standalone/data/content/f2/1295f6323924f26d34303d9ef3834799fa92e5/content
 [0m [0m12:14:55,045 INFO  [org.jboss.as.server] (management-handler-thread - 4) WFLYSRV0009: Undeployed "passivation.war" (runtime-name: "passivation.war")


Publish zipped bundle using the gradle artifact name and as a gradle artifact

The gradle zip task currently created a zipped.bundle in the build/gateway directory. Instead publish the bundle using the gradle gradle project name and as a proper gradle artifact.

Implementation in #6


Global call graph test

This PR has two commits
First, I add a dev_tool module for making one big call graph. This can be a useful starting point for querying other properties and idiosyncrasies of the bloq library; but here I use it to add a test that all bloq examples have a valid call graph.
Then, I make two minor fixes revealed by running the "all call graph" test.

I brought this up to speed. @tanujkhattar if you could PTAL I think this would be a decent slow test; and it's generally useful to have a script example for making a unified call graph


typo Add some details about AES encryption.

Proposed changes
Issue Number: close #xxx
Problem summary
Add some details about AES encryption.
Checklist(Required)

[ ] Does it affect the original behavior
[ ] Has unit tests been added
[x] Has document been added or modified
[ ] Does it need to update dependencies
[x] Is this PR support rollback (If NO, please explain WHY)

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run P0


Revert v1.17 release changes on v1.16 branch

The branch for v1.16 documentation has some v1.17 changes in it.
Revert those changes. Fixes #18124 and fixes #18119.
Reviewers: please check that the changes to config.toml and anything else release-related are correct.
This PR reverts commits:

1131f8603e6dab9032e8634aeb29d2435da93184
cf5b8b200ca5082de64a49dbb311380d9d542e9e
75de70a4319acce2f31db31ae372604991bd5b1f
dff2f7b9601470dc8383d883b23188ed450d89c2
cf925bb688f380e60836393aa80e70942eddfd5a
ffd1363c0eaef30921c2718233fcdf7f4a93ab97
87a2cafb20fe09881ecebfbb2242a6252ccf3586
ffe259d6f2c379d188b597d98bf7314ee9fabca6

/kind cleanup
/priority important-soon
/cc @daminisatya

@sftim
/lgtm
Thank you so much for the fix. It's a huge miss.

/sig release

/lgtm
/approve


RuntimeError: cuDNN error: CUDNN_STATUS_MAPPING_ERROR with INFERENCE by Unit2Speech

I am facing this kind of problem (it just happened yesterday) when I tried to turn the unit back to speech by using Unit2Speech of Fairseq.
Here is the problem:

Could someone help me for this? Thanks in advance!

Could you please? @kit1980

Could you please? @eugene-kharitonov


Singleflight check resolver

Description
The singleflight check resolver is an optimization to our check algorithm that de-duplicates simultaneous resolutions of the same subproblem. For a given check resolution tree, if two identical subproblems are evaluated simultaneously, the first will get evaluated as normal while all following will be blocked and wait for the initial check to resolve. This mechanism is different from caching which need to fully resolve before subsequent subproblem resolutions are provided a cached result but both optimizations pair together to provide a highly-efficient check resolution.
This feature faced several challenges, most noteworthy were:

Deadlocking – If a subproblem resulted in a cyclical resolution branch, the singleflight resolver would deadlock itself, the parent node would wait for the child node to resolve which would wait for the parent. This was resolved by specialized handling of cycles by considering it a falsey check resolution (#1371, #1372 )
Unintentional Context Cancelation – If an evaluated parent subproblem also had child subproblems that adjacent resolve branches were blocked by and the parent subproblem canceld via context, the adjacent resolve branches would never resolve. This is fixed by separating the singleflight resolver's context from the parent context.
Resolver Composition – Ordering of the singleflight check resolver is important, it needs to be after the cycle-detect resolver and before the cached check resolver and the local check resolver needs to be last. Being able to express the ordering in a clear way was important for navigating and extending the code. This was resolved by setting delegates via the parentResolver.setDelegate(childResolver) pattern introduced by #1375

Note: This PR is a finalization of the work started in #1335 . See discussion in that thread for more context.
References
Original PRs:

#1335
#1313

Review Checklist

[x] I have clicked on "allow edits by maintainers".
[x] I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
[x] The correct base branch is being used, if not main
[x] I have added tests to validate that the change in functionality is working as expected

@willvedd be sure and wire up the SingleflightCheckResolver at the top-most layer of the server.
See https://github.com/openfga/openfga/blob/main/pkg/server/server.go#L300-L323
Namely,
CycleDetectionCheckResolver --> SingleflightCheckResolver --> CachedCheckResolver (if enabled) --> LocalChecker --> CycleDetectionCheckResolver.

Despite the great work and discussion here, I'm going to close this one out, at least temporarily. We've overcome so many challenges but there still remained some mind-boggling scenarios where deadlocks would occur. All attempts to address the deadlocks resulted in a major neutering of the singleflight resolver's efficacy; it didn't do a good enough job anymore.
We've learned a lot here but might need to pivot and look at this one from a different angle. Or potentially revive this with a twist in the future.


Detect UWP environment and use its APIs instead of kernel32.dll

Fixes #700

I think it's great. I would just add a new UWP project to more easily test that platform, if possible. Thank you. I hope it will please both @migueldeicaza and @tig.

This is indeed great and I agree with @bdisp is there any simple way to test and use that scenario?   Should we have documentation for the users on how to use this?

@migueldeicaza There is no extra effort required to use this. We pick the preferred bindings based on the environment. Win 10 and above use Win 10 SDK bindings, older versions use Win32 bindings.
A way to test this would be to have a copy of UICatalog defined as UWP app and built with .NET Native tool chain.
It would also be nice to test this on Win 8 but I can't find a VM anymore. Microsoft seems to have removed their IE test VMs and left only Win 10 here.

I think that just adding a solution with a UWP Console project that you already have at https://github.com/InvictusMB/TerminalGuiUwpInputBug and adding a reference to the Terminal.Gui project would be enough for users using this platform. Like the FSharpExample solution that exposes another type of language.

I am not very good at Windows.
So how does a console app determine that it can use the UWP APIs vs the Win32 ones?

So how does a console app determine that it can use the UWP APIs vs the Win32 ones?

Based on Environment.OSVersion.Major. If we are in Win 10 environment we use UWP APIs from Win10 SDK otherwise we stick to Win32.
However, as I've mentioned in #700 I'm not able to validate if using UWP APIs has any impact at all. So the real fix here seems to be only ReadConsoleInput marshaling.
I have no way to verify if there are any Win 10 environments where kernel32.dll is not available.
I also ran Windows App Certification Kit and got a successful report with both Win32 and UWP bindings.
@migueldeicaza Could you ask one of Microsoft gurus to enlighten us on this topic and benefits (if any) of using UWP bindings over kernel32.dll?

@clairernovotny points out that her https://www.nuget.org/packages/OSVersionHelper library provides the properties you need to check. The source is at https://github.com/novotnyllc/OSVersionHelper

The environment variables lie depending on the manifest for compat.

@KirillOsenkov @clairernovotny Thank you very much!
Could you elaborate if using this APIs has any benefits over consuming kernel32.dll directly or if it affects the certification for MS Store in any way?
So far I'm not convinced it does and therefore the version check itself might not be necessary.
Is it safe to depend on kernel32.dll directly and only verify that a given API is listed as available for UWP apps?

I think the store will block use of the kernel32... I had to do similar for SkiaSharp just to LoadLibrary.
https://github.com/mono/SkiaSharp/blob/master/binding/Binding/GRGlInterface.cs#L183
I cheated with UWP and created a uap dll, but this should just be a matter of checking the major version. Although, I believe it will still fail if that import makes it to the final package. Not sure if the linker knows to remove the extern.


[FLINK-30619][tests] Add retry

What speaks against replacing the Thread.sleep(10L) with a waiting condition in the test?
CommonTestUtils.waitUtil(
                () -> upTimeGauge.getValue() > 0L,
                TestingUtils.infiniteDuration(),
                "No non-zero uptime was measured.");

We don't know the root cause, but know that the test is quick and the failure rate is low.
A retry should guarantee that this test will no longer fail; not sure if the same can be said about the loop? LMKWYT.

Waiting for the upTimeGauge value feels to me like the better approach because we might get the chance of analyzing the thread dump if it really times out forever. :thinking:
On another note: Did you consider that taskManagerGateway.waitForSubmissions is just exceeding its timeout of 5 seconds? waitForSubmissions uses poll internally which just returns null rather than failing in case of reaching the timeout.

I doubt that a thread dump is gonna help us much since we know that the job state was changed from the existing logs.
But in the end waiting for it is a de-facto retry so why not.


Error booting T265

Required Info

Camera Model
T265

Firmware Version
<IP_ADDRESS>1

Operating System & Version
Ubuntu 18.04.4 LTS bionic

Kernel Version (Linux Only)
5.3.0-62-generic

Platform
Intel nuc8i3beh

SDK Version
2.36.0

Language
C /  python

Segment
Robot

realsense-ros
2.2.15

ROS
Melodic Morenia 1.14.6

Issue Description
After turn on NUC Intel (hard reboot) or rebooting (soft reboot) the T265 cannot work properly until unplug and replug usb cable.
I use T265 connected directly in NUC USB Port. Also on this NUC a D435i is connected but it works without this problem.
This problem also occurs with t265 fw <IP_ADDRESS>6.
After run rs-enumerate-devices, the following message appears:
Error booting T265
The SDK was installed by source. The Patch was executed completely with success.
BIOS Changes:

After Power Failure to Power On.
Disabled Secure Boot

Is there a solution for this without the need to remove the cable from the nuc usb port?

This problem happens when I try to run services automatically when the NUC is booted. These services execute ROS nodes with Realsense nodes (T265 node). Probably Realsense nodes are executed before the T265 boot is completed.
After I disabled the services and executed realsense nodes after T265 boot, it worked.


Data validation tool

@jeromekelleher has some ideas about this.

Is this the same as the compliance suite?  Or is this something else?

The idea here is to provide a way to verify that the input provided to the server makes sense. The intention is similar to apachectl configtest: provide the server admin a way to check that their configuration makes sense before they try to deploy it. This is helpful because (a) it can be hard to pull error messages from web server logs (especially with the way htslib does things); and (b) we want to find out if things are going to fail before a client starts making requests.
We can do simple things like make sure that the config file is well formed and all the arguments make sense. However, I think it would be valuable to look at things a bit more deeply too. It would be good to go through all of the variant sets, readgroup sets and reference sets, and make sure that they are well formed. Do we have the right types of files in the directories? Can we open them successfully? A lot of these checks are performed automatically when we load up the server, so we should be able to reuse this code quite easily. Once we have checked over all the input data, we can then present a summary of this information on stdout, where the admin can take a look. I think this would be very helpful for people arranging their data into the required hierarchies.
I think it would also be useful to perform more indepth analysis of the data files. For example, are the reads and the variants in a dataset against the correct reference? Do we have this reference in the repository? Do (a sample of) the REF values in the VCFs correspond to the bases at this position in the reference sequence? One of the principle benefits of GA4GH for me could be that users won't need to worry about this sort of thing any more: a GA4GH repository should be self consistent and have integrity. We just need to provide the tools to make sure that this is true on the server side.

Cool, sounds like a good idea, and also something we can iterate on (it's probably not essential to get all of the advanced checks in from the get-go).

GA4GH will badly need a data validation tool.  This should eventually be a stand alone set of  tools that can do some level validation against the data. This is different  than conformance checking against an API implementation.

I'm very carefully working on this, which means it will take some time to implement it properly together my other activities that are also taking up my time.  Basically I'm trying to allow for flexibility in the types of tests we want to run.  So please keep implementing your version to satisfy any immediate needs.

I suppose we need to define what the immediate needs are, and probably some sort of framework so @pgrosu and I can pull in the same direction. Paul, what have you done so far? @jeromekelleher, do you have a simple immediate 'story' we could start with?

Perhaps the right framework is just extending the test code? As Jerome says, a start might be to just test that the right data files are in the right places, and the config file makes sense.

@jbu, here's the outline of what I'd like to see:

Create a new first class CLI program ga4gh_configtest, following the pattern of the ga4gh_server and ga4gh_client examples. This means adding a main function to ga4gh/cli.py, updating setup.py to have an extra entry point, and creating a new file configtest_dev.py to simplify development.
Create a new module, ga4gh.configtest which contains the code to do all the real work.
The first thing to do I guess is to parse the config file, and examine the variables in there. These should be checked for how sensible they are.

I think this much would be good for an initial PR. Once we have this much, the framework for adding more things in should become clearer. Does this make sense?

Hi James (@jbu),
I would be happy to help here, but my implementation that I'm working on takes a different direction.  Currently it is still being developed and I'm trying out different concepts that I want to simplify and tie together.  Once I feel they work optimally and have a clear level of lucidity, I will be happy to release them.
So the tests here would probably need to ensure the reference server is properly in data-compliance with the schema, as well as what it is storing.  Usually signature files are associated at different levels of granularity with the data that is stored on the server, so that it does not need to validate but rather sync just for any possibly corrupted stored data.
In any case, let me know what you would like me to do.
Thanks,
Paul

Hi @jeromekelleher ,
#423 is a starting point. I've stolen functionality from unittest and thoroughly abused it, but the general idea of suites of tests seems to fit the problem well.


Provision an CDS instance using a service account with P2 license

@WaelHamze Does your Provision Instance Task work with creating a CDS environment? I got
"Operation returned an invalid status code 'Forbidden'" error. Thanks a lot.

@lheng18 do you have "Dynamics 365 Service Admin" role?

@WaelHamze I don't have but we can use a service account to do so but we don't want the credentials to be stored in the pipeline in masked variable as other project members could clone the pipeline and reuse the variable to do other things as  the user has very high permission and it can reset production. Is there anyway we can prevent user from reusing the service account credentials? If not  we would have to either put provision environment build task in a centralize project pipeline or create a flow to Rest API to wrap the MS admin API with stored credentials then have the pipeline to call it and we would need to think about how to secure the Rest API and Flow to only allow certain pipelines to invoke it.
Any suggestions?
Thanks!
Henry Luo

@lheng18
There are permissions you can apply to libraries and pipelines to either grant/deny access to users as required. You could also store credentials in the Azure KeyVault.
Please check this but as far as I know cloning doesn't clone secrets.


Calc Block Subsidy and Funding Streams

Motivation
When validating blocks and transactions, we need to calculate the block subsidy.
Existing Work
Block Subsidy and Funding Streams Design RFC PR: #1129
Founders Reward Implementation PR: #1170
Remaining Work
Semantic Validation RFC

[ ] Since Zebra has a mandatory checkpoint at Canopy, we can ignore the founders reward

[ ] Delete the founders reward parts of the RFC and implementation

[ ] Review the funding streams parts of the RFC

Semantic Validation Implementation

[ ] Implement funding streams
[ ] Implement other semantic validation from the RFC

Contextual Validation

[ ] transaction fees: needs UTXOs
[ ] coinbase source: needs UTXOs tagged with coinbase provenance #1342

this is a database version change

Requirements

https://zips.z.cash/protocol/protocol.pdf#subsidyconcepts
https://zips.z.cash/protocol/protocol.pdf#blockchain
https://zips.z.cash/protocol/protocol.pdf#subsidies
https://zips.z.cash/protocol/protocol.pdf#foundersreward

We've chosen to delay work on miner rewards and block subsidy until later, so I'm removing this from the sprint.


Boundary conditions

I would like to define boundary conditions in pieces:
from 0 to 0.1: 0
from 0.1 to 0.2: vl
from 0.2 to 0.3: 0
from 0.3 to 0.4: vm
from 0.4 to 0.5: 0
from 0.5 to 0.9: vr
from 0.9 to 1: 0
Is there a way to do this?

Hi @troyrock,
Yes, it can be easily implemented using neurodiffeq. But keep in mind that this is not a well-defined problem as the boundary condition is discontinuous, and you'll probably get a bad solution.
Here is an example of a [0,1] x [0,1] region where the left, right, and lower Dirichlet BC is identically 0, and the upper boundary is the function you provided.
from neurodiffeq.conditions import DirichletBVP2D

def f0(y):
    return 0.0

def f1(y):
    return 0.0

def g0(x):
    return 0.0

def g1(x):
    vl, vm, vr = 1.0, 2.0, 3.0
    if x <= 0.1:
        return 0.0
    elif 0.1 < x <= 0.2:
        return vl
    elif 0.2 < x <= 0.3:
        return 0.0
    elif 0.3 < x <= 0.4:
        return vm
    elif 0.4 < x <= 0.5:
        return 0.0
    elif 0.5 < x <= 0.9:
        return vr
    elif 0.9 < x:
        return 0.0

condition = DirichletBVP2D(0.0, f0, 1.0, f1, 0.0, g0, 1.0, g1)

Thank you very much.  I can see what I was doing wrong (passing g1(x) which is a value rather than g1 which is a function.)  I have additional questions such as:
How to include parameters in the network (vl, vm, vr) so that after the network converges, I can call solver.getsolution with any values of x, y, vl, vm, and vr to get an answer (there is no DirchletBVP6D).
How to modify the pde (Poisson's equation for this test) at different y values to give a different dielectric material and sigma: epsilon(y)*(diff(u, x, order=2) + diff(u, y, order=2)) - sigma(y)
Should I post such questions here or in the discussion section.  I know that they aren't bugs.

Sorry, I forgot that the input to g1 is a Tensor, not a number. Try this:
from neurodiffeq.conditions import DirichletBVP2D

def f0(y):
    return 0.0

def f1(y):
    return 0.0

def g0(x):
    return 0.0

def g1(x):
    vl, vm, vr = 1.0, 2.0, 3.0
    ret = torch.zeros_like(x)

    ret[(0.1 < x) & (x <= 0.2)] = vl
    ret[(0.3 < x) & (x <= 0.4)] = vm
    ret[(0.5 < x) & (x <= 0.9)] = vr

    return ret

condition = DirichletBVP2D(0.0, f0, 1.0, f1, 0.0, g0, 1.0, g1)

import torch
from neurodiffeq.networks import FCNN
net = FCNN(2, 1)

x = torch.linspace(0, 1, requires_grad=True).reshape(-1, 1)
y = torch.ones_like(x, requires_grad=True)

u = condition.enforce(net, x, y)

# u will be [0 ... 1 ... 0 ... 2 ... 0... 3 ... 0]

As for your second question, I guess you are training your networks to solve for what we call a bundle of solutions.
At the moment, it is not nicely encapsulated in neurodiffeq yet, but there's a workaround.
Before we get into that, may I ask why you want to change your PDE for different y values? The way I understand it, you are training a neural network for the same PDE but under different boundary conditions parameterized by vl, vm, and vr. Do I understand that part correctly?
Feel free to continue the discussion in this thread so future users with the same questions can see. The discussion tab is not frequently visited.

Thanks again Shuheng-liu for your help.  I really appreciate it.  I'm still getting an error when I try to run, it looks like it's a simple syntax problem but I'm still stuck.
As for my second question, I am hoping to have a complete solution where I can visualize the results, maybe with sliders for the values of vl, vm, vr to show how the results change with those variables.  Eventually I would like to visualize the wavefunction of an electron trapped in the "quantum" layer (see the next paragraph).
For my third question, I want to change the PDE because in my problem, there are three different dielectric layers and a line of charge at y = sheet_z.  The value of epsilon changes depending on the layer that I'm in.  The formula for sigma changes depending on whether I'm above or below the line of charge.  I hope eventually to couple the solutions of the Poisson equation with the Schrodinger equation to show how different voltages affect the energy level of an electron trapped in the "quantum" layer.  I'm not yet to the point to include the Schrodinger equation but that's the final goal.

poisson2d.py:71: UserWarning: Not providing a value for linspace's steps is deprecated and will throw a runtime error in a future release. This warning will appear only once per process. (Triggered internally at  /pytorch/aten/src/ATen/native/RangeFactories.cpp:23.)
x = torch.linspace(min_x, max_x, requires_grad=True).reshape(-1,1)
Traceback (most recent call last):
File "poisson2d.py", line 73, in
u = condition.enforce(net, x, y)
File "/home/troyrock/anaconda3/lib/python3.7/site-packages/neurodiffeq/conditions.py", line 52, in enforce
network_output = net(torch.cat(coordinates, dim=1))
TypeError: 'list' object is not callable

import numpy as np
from neurodiffeq.networks import FCNN
from neurodiffeq import diff
from neurodiffeq.conditions import DirichletBVP2D
from neurodiffeq.solvers import Solver2D
from neurodiffeq.monitors import Monitor2D
from neurodiffeq.generators import Generator2D
import torch
import matplotlib.pyplot as plt

# geometry constants:
ldotx = -0.45
ldotl = 0.50
min_l = -0.1
vl=-0.1
max_l = 0.1

rectx = 0
rectl = 0.30
min_m = -0.1
vm=0.0
max_m = 0.1

rdotx = 0.45
rdotl = 0.50
min_r = -0.1
vr = -0.1
max_r = 0.1

min_y = -2
max_y = 2
min_x = -2
max_x = 2
sheet_y = 200 - 40  # sheet of charge 40 nm from the top
quantum_top = 200 - 134.3  # z coordinate for the top of the quantum layer
quantum_bottom = 200 - 156.8  # z coordinate for the bottom of the quantum layer

# material constants
sigma0 = 0.0036
epsilon_above = 0.769
epsilon_quantum = 0.697
epsilon_below = 0.769

# Define the PDE system
poisson = lambda u, x, y: [
    epsilon_above*(diff(u, x, order=2) + diff(u, y, order=2)) - sigma0*y
]

def top_edge_bc(x):
    ret = torch.zeros_like(x)

    ret[(abs(x-ldotx) < ldotl/2.0)] = vl
    ret[abs(x-rectx) < rectl/2.0] = vm
    ret[abs(x-rdotx) < rdotl/2.0] = vr
    return ret

# Define the boundary condition
condition = DirichletBVP2D(
        x_min=min_x, x_min_val=lambda y: 0,
        x_max=max_x, x_max_val=lambda y: 0,
        y_min=min_y, y_min_val=lambda x: 0,
        y_max=max_y, y_max_val=top_edge_bc,
    )

# Define the neural network to be used
net = [
    FCNN(n_input_units=2, n_output_units=1, hidden_units=(50,50,50))
]

x = torch.linspace(min_x, max_x, requires_grad=True).reshape(-1,1)
y = torch.ones_like(x, requires_grad=True)
u = condition.enforce(net, x, y)

# Define the monitor callback
monitor=Monitor2D(check_every=10, xy_min=(min_x, min_y), xy_max=(max_x, max_y))
monitor_callback = monitor.to_callback()

# Instantiate the solver
solver = Solver2D(
    pde_system=poisson,
    conditions=condition,
    xy_min=(min_x, min_y),  # We can omit xy_min when both train_generator and valid_generator are specified
    xy_max=(max_x, max_y),  # We can omit xy_max when both train_generator and valid_generator are specified
    nets=net,
    train_generator=Generator2D((600, 600), (min_x, min_y), (max_x, max_y), method='equally-spaced-noisy'),
    valid_generator=Generator2D((600, 600), (min_x, min_y), (max_x, max_y), method='equally-spaced'),
)

# Fit the neural network
solver.fit(max_epochs=2000, callbacks=[monitor_callback])

# Obtain the solution
solution_neural_net_poisson = solver.get_solution()

from mpl_toolkits.mplot3d  import Axes3D
def plt_surf(xx, yy, zz, z_label='u', x_label='x', y_label='y', title=''):
    fig  = plt.figure(figsize=(16, 8))
    ax   = Axes3D(fig)
    surf = ax.plot_surface(xx, yy, zz, rstride=2, cstride=1, alpha=0.8, cmap='hot')
    ax.set_xlabel(x_label)
    ax.set_ylabel(y_label)
    ax.set_zlabel(z_label)
    fig.suptitle(title)
    ax.set_proj_type('ortho')
    plt.show()

xs, ys = np.linspace(min_x, max_x, 101), np.linspace(min_y, max_y, 101)
xx, yy = np.meshgrid(xs, ys)
sol_net = solution_neural_net_poisson(xx, yy, to_numpy=True)
plt_surf(xx, yy, sol_net, title='$u(x, y)$ as solved by neural network')

I'm not an expert in quantum physics, but if you want to change the PDE based on location of points, consider the following example
def pde_system(u, x, y):
    first_part = diff(u, x) - u
    second_part = diff(u, y) - u * 2

    selector = x > y
    ret = torch.clone(second_part)
    ret[selector] = second_part[selector]
    return [ret] # must return a list, even if there's a single entry

The PDE is ∂u/∂y=2u for points where x>y and ∂u/∂x=u for points elsewhere.

Very nice.  You mentioned that there was a way to bundle solutions together.  How is this done?

Right. As you pointed out, we don't have a DirichletBVP5D and it's infeasible to implement conditions of all dimensions. Even if we do, the condition is fixed; i.e., parameters like vl, vm, vr cannot take on different values.
Understanding Conditions
The first thing is to understand how a condition aka reparameterization works. Take neurodiffeq.conditions.IVP for example.
from neurodiffeq.conditions import IVP
cond = IVP(t_0=0, u_0=1, u_0_prime=2)

Under the hood, the condition is used together with a network to ensure u(t=0)=1 and u'(t=0)=2.
condition.enforce(net, t)

If you checkout the implementation of IVP.enforce in neurodiffeq/conditions.py, you'll see it actually does something like
...
    network_output = net(torch.cat([t]), dim=1)
    return self.u_0 + (t - self.t_0) * self.u_0_prime + ((1 - torch.exp(-t + self.t_0)) ** 2) * network_output

Note that the network only accepts one input t. the last line is what we call reparameterization, it's a trick to ensure the final output honors the initial condition.
Merging Conditions Into Networks
Let's say we want to fix t_0=0 and u_0_prime=2 and change u_0. To learn different solutions based on different u_0 we write a new network that takes in an additional argument u_0.
import torch
import torch.nn as nn

class NetWithIC(nn.Module):
    def __init__(self, net):
        self.net = net

    def forward(self, t, t_0, u_0, u_0_prime):
        network_output = net(torch.cat([t]), dim=1)
        return u_0 + (t - t_0) * u_0_prime + ((1 - torch.exp(-t + t_0)) ** 2) * network_output

This is the standard way of defining a custom Module (PyTorch's terminology for neural network) in PyTorch. If you are not familiar with this process, there's plenty of resources online to get started. By defining NetWithIC this way, the IVP is already enforced. So, we simply pass a NoCondition to ensure that the same condition is not enforced twice.
from neurodiffeq.conditions import NoCondition
raw_net = FCNN(1,1)
net_with_condition = NetWithIC(raw_net)

def pde_system(u, t, u0):
    return diff(u, t, order=2) + u

# note that we use Solver2D instead of Solver1D because u0 is also considered an input.
solver = Solver2D(
    pde_system=pde_system,
    conditions=[NoCondition()],
    nets=[net_with_condition],
    xy_min=(0., 0.),
    xy_min=(1., 1.),
    ...
)

Higher-Dimensional Generators
Under the hood, Generators are used to generate training and validation sample points.
For 2D scenario, we already have a Generator2D in neurodiffeq.generators. And Solver2D takes care of creating two such generator (for training and validation resp.) using xy_min and xy_max. However, if you have more changeable parameters (in your case, it's 3 — vl, vm, vr), we need a 5D generator for x, y, vl, vm, vr.
There's a simple way to do it.
from neurodiffeq.generators import Generator1D

BATCH_SIZE = 128

g_x = Generator1D(BATCH_SIZE, 0.0, 1.0, method='equally-spaced-noisy')
g_y = Generator1D(BATCH_SIZE, 1.0, 2.0, method='uniform')
g_vl = Generator1D(BATCH_SIZE, 0, 0.1, method='equally-spaced-noisy')
g_vm = Generator1D(BATCH_SIZE, 0.1, 0.2, method='uniform')
g_vr = Generator1D(BATCH_SIZE, 0.2, 0.3, method='equally-spaced-noisy')
# don't mess up the order, it must be consistent with arguments in your `pde_system(...)` and `NetWithIC.forward(...)`
# I use the same generator for training and validation, you can use different ones
g_train = g_x * g_y * g_vl * g_vm * g_vr
g_valid = g_x * g_y * g_vl * g_vm * g_vr

Higher-Dimensional Solvers
As you might have noticed, we use Solver2D when there's one coordinate (t) and one initial/boudnary parameter u0. If you check the neurodiffeq/solver.py file, you'll notice, there isn't a Solver5D. We'll add support for arbitrary-dimensional solvers in near future. But for now, you have to write your own.
from neurodiffeq.solvers import BaseSolver, BaseSolution

class PolymorphicSolution(BaseSolution):
    """A polymorphic solution class that accepst arbitrarily many inputs"""
    def _compute_u(self, net, condition, *coords):
        return condition.enforce(net, *coords)

class PolymorphicSolver(BaseSolver):
    """A polymorphic solver class that solves PDE in arbitrary dimensions"""
    def get_solution(self, copy=True, best=True):
        nets = self.best_nets if best else self.nets
        conditions = self.conditions
        if copy:
            nets = deepcopy(nets)
            conditions = deepcopy(conditions)

        return PolymorphicSolution(nets, conditions)

Finally, we can put everything together (note that you still have to define your own net_with_bc). If you are not sure how to paramterize the network for 2D Dirichlet problem, check out DirichletBVP2D in neurodiffeq/conditions.py.
class NetWithBC(nn.Module):
    def __init__(self, net):
        self.net = net

    def forward(self, x, y, vl, vm, vr):
        network_output = net(torch.cat([x, y]), dim=1)
        parameterized_output = ...
        return parameterized_output

net = FCNN(2, 1)
net_with_bc = NetWithBC(net)

solver = PolymorphicSolver(
    pde_system=...
    nets=[net_with_bc],
    conditions=[NoCondition()],
    train_generator=g_train,
    valid_generator=g_valid,
    n_input_units=5,
    n_output_units=1, # I assume you only have one function `u(x, y)` to solve for
    ...
)

solver.fit(max_epochs=...)
solution_5d = solver.get_solution(best=True, copy=True)

hi!
Initial/boundary condition of my problem are:
u(0,t)=0, u'(0,t)=0, u(1,t)=0, u'(1,t)=0 and
u(x,0)=cos(pi*x), u'(x,0)=0, but when I write like this:
init_cond = IVP(t_0=0.0,u_0_prime=0)
conditions = [
IBVP1D(
t_min=0, t_min_val=lambda x:torch.cos(np.pi*x),
x_min=0, x_min_val=0,x_min_prime=0,
x_max=1, x_max_val=0,x_max_prime=0)]
I received: NotImplementedError: Sorry, this boundary condition is not implemented.
Can you help me solve this?

hi, Initial/boundary conditions of my problem are:
u(0,t)=0,u'(0,t)=0,u(1,t)=0,u'(1,t)=0 and u(x,0)=cos(pi*x),u'(x,0)=0
I have use combined between IBVP1D and IVP or IVP and DoubleEndedBVP1D, but its bug.
Can you help me solve it?
Thanks!

I assume the first and second u' are ∂u/∂x, and the third u' is ∂u/∂t. In this case, we have to bring out the big gun.
First, install the neurodiffeq-conditions extension.
pip install -U git+https://github.com/NeuroDiffGym/neurodiffeq-conditions

The extension allows defining more complex conditions, including the one you are working on
import numpy as np
import torch
from neurodiffeq_conditions.conditions import ConditionComponent as Component

# dirichlet and neumann condition at x=0
comp_x0 = Component(0.0, f_dirichlet=lambda x, t: 0.0, f_neumann=lambda x, t: 0.0, coord_index=0)
# dirichlet and neumann condition at x=1
comp_x1 = Component(1.0, f_dirichlet=lambda x, t: 0.0, f_neumann=lambda x, t: 0.0, coord_index=0)
# initial condition (u and du/dt) at t=0; we don't call them dirichlet or nuemann in mathematics;
# but they are analogous to dirichlet and nuemann BCs in x-t domain
comp_t0 = Component(0.0, f_dirichlet=lambda x, t: torch.cos(np.pi * x), f_neumann=lambda x, t: 0.0, coord_index=1)

from neurodiffeq_conditions.conditions import ComposedCondition as Condition
ibvp = Condition(components=[comp_x0, comp_x1, comp_t0])

There's a caveat to this condition (aka reparameterization). The condition depends on limits when evaluating on points exactly on the boudary. Since PyTorch is a numerical package and cannot take limits, you need to make sure that points on the boundary are never sampled. Use points close to boundaries instead. Say, add an EPS=10^-6 to points exactly on the boundary.

Thank you,
But when I run a neuron network like this:

and the results:

How do I fix it?

Thank you,
But when I run a neuron network like this:

and the results:

How do I fix it?

You need to put the ibvp in a single-entry list: conditions=[ibvp]

I am sorry to waste your time,
But when I add conditions=[ibvp], I received another mistake:

Can you help me?
Thank you so much.

It looks like you are using an older version of neurodiffeq-conditions where it's a known bug. Did you install it some time ago?
You can try pip uninstall neurodiffeq-conditions and reinstall it again. This should fix it.

I have fixed it, and run it. my pde has diff(u,t,order=2) + diff(u,x,order=4) and this is my model:

and when I run, I received:

I don't understand when I use slover.fit(max_epochs=500) then it's no problem, but when I use solver.fit(max_epochs=500, callbacks=[monitor_callback]) i received the bug above.
How can I use the Monitor?

I have fixed it, and run it. my pde has diff(u,t,order=2) + diff(u,x,order=4) and this is my model:

and when I run, I received:

I don't understand when I use slover.fit(max_epochs=500) then it's no problem, but when I use solver.fit(max_epochs=500, callbacks=[monitor_callback]) i received the bug above.
How can I use the Monitor in .fit()?

The Monitor2D computes function values on  grid points from xy_min to xy_max, which include the points on the boundaries. As I explained earlier the condition we constructed cannot be enforced on points that lie on the boundary. (Mathematically, the limit exists but PyTorch cannot take limits). Instead, You can try something like
EPS = 1e-6
monitor = Monitor2D(xy_min=(0+EPS, 0+EPS), xy_max=(1-EPS, 0.28-EPS), check_every=10)

Actually, you don't need to minus EPS from t_max=0.28, because the initial condition is only enforced at t=0 and there is no condition enforced on t=0.28.

Well, after running the neural network and getting the model. How do I predict values from input and output? Because I cannot find a predictable solution from the library.
For example, my problem has 2 inputs x and t. I want to generate x and t, then use the model to predict the value u (x, t).
Thanks for your help!

Just create two numpy arrays or pytorch tensors, each with shape (N_SAMPLES, 1), and pass them to the solution. For example, to compute u at 10x10 meshgrids in [0, 1] x [0, 0.28]

solution = solver.get_solution(best=True, copy=True)
N_X, N_T = 10, 10
x = torch.linspace(0+EPS, 1-EPS, N_X, requires_grad=True)
t = torch.linspace(0+EPS, 0.28-EPS, N_T, requires_grad=True)

x, t = torch.meshgrid(x, t)
x = x.reshape(-1, 1)  # torch.Tensor with shape(100, 1)
t = t.reshape(-1, 1)  # torch.Tensor with shape(100, 1)

u = solution(x, t)  # u is also a torch.Tensor with shape (100, 1)

You can also supply x and t as numpy arrays. If you want the returned  u to also be a numpy array, you need pass as_numpy=True
u = solution(x, t, as_numpy=True)

So, now!
1.I want to add a condition for the result like this - (diff (u, x) at t = 0) = - f (x) to my problem, I just set it as it was in the beginning. are not?
2. I don't understand why the resulting loss I got is too high, as shown in the picture. And how can I change parameters like optimizer (sgd, L-BFGS, BFGS....), learning rate ... Maybe PyTorch is quite new to me. And for the same problem, I use another code that only takes about 1-2 minutes. So, how do I fix it?

Because, I couldn't solve complex problems, so I tried with a basic pde equation with a time-independent variable x.  this is my problem.

I searched the API and found the following command.

I tried to edit it, but failed, but I just received:

hope you help me.

It looks like you can just use Solver1D instead of BaseSolver. I may have missed it, but is there any particular reason you want to use BaseSolver?

As for your previous questions

If you want to impose diff(u, x) at t=0, it could contradict u at t=0, which you set earlier. Mathematically it's not quite right.
A high loss can be caused by many reasons, I need to see your PDE to make an informed guess. Right now I suspect it could be caused by a small batch size. You can increase the batch size (faster) or increase the number of batches per epoch (memory efficient). Both are equivalent as long as you don't use L-BFGS for training.

To answer the previous question, since I think my pde is time-independent, that's why I chose BaseSolver.

For the previous problem, my pde in addition to the boundary condition, there is one more condition I will send you to see.

This is my problem:

I think the second condition is w.r.t. to w instead of u, right? So let's summarize it

at x=0, there's a Dirichlet w and a Neumann ∂w/∂x boundary condition
at x=1, there's a Dirichlet w and a Neumann ∂w/∂x boundary condition
at t=0, there's an initial condition both on the w and its first order derivative ∂w/∂t

Notice that, while (1) and (2) are boundary conditions and (3) is an initial condition, the mathematical expressions are analogous. So, in a sense, we can think of this 1-D spatiotemporal problem as a 2-D spatial problem. The domain is bounded on three sides, left (1), right(2), and bottom(3). On each piece of boundary, we have a Dirichlet and Neumann condition.
So, you can simply use Solver2D from neurodiffeq.solvers. It won't cause any problems.

What I don't understand is the last equation. In (3), we already have
w(x, 0) = f(x)

This implicitly guarantees
∂w/∂x (x, 0) = f'(x)

Why do you want to impose
-∂w/∂x (x, 0) = f'(x)

again?


I've added some unit tests and used them to improve a couple of the events

Thanks for contributing! I'll test these changes then push out a new version to Maven Central.


S2 repeatedly called when running S2 and S3 sequentially

I just switched to using my new Macbook Pro to run Eureka and I have encountered a very strange issue. Stage 2 runs well to completion, and then when Stage 3 is called it runs as expected until multiprocessing.Pool is called here at which point Stage 2 starts running again in as many threads as was provided in the Stage 3 ncpu ecf parameter... I've not encountered this before on Ubuntu and I don't think anything has changed with these relevant files since I last successfully ran S2->S4. I'm not sure how this could possibly be happening, but I'll look into it more later.
After Stage 3 starts and I get the "  Performing background subtraction" print statement, I get ncpu copies of this error message:

2022-01-19 15:49:22,337 - stpipe - WARNING - /Users/tjbell1/miniconda3/envs/ers/lib/python3.9/site-packages/photutils/detection/findstars.py:33: AstropyDeprecationWarning: _StarFinderKernel was moved to the photutils.detection._utils module. Please update your import statement.
warnings.warn(f'{name} was moved to the {deprecated[name]} module. '

followed by ncpu copies of this error message:

WARNING (only important for Stage 5): The $EXOCTK_DATA environment variable is not set.  Please set the value of this variable to point to the location of the exoctk_data download folder.  Users may retreive this folder by clicking the "ExoCTK Data Download" button on the ExoCTK website, or by using the exoctk.utils.download_exoctk_data() function.

which then is followed by "Starting Stage 2 Reduction" which should definitely not happen in Stage 3. Things then get chaotic as ncpu threads all start running Stage 2 and simultaneously logging text to the terminal.
For reference, I have attached a file (eureka_environment.txt) which exactly reproduces my conda environment on Macbooks. Relatedly, the current requirements.txt file was not sufficient to create a new environment on MacOS, so that's something we'll need to solve as well.

I tried running Stage 3 alone on previously output Stage 2 files, and the program still breaks for me but now instead of many processes restarting Stage 2 they all instead restart at Stage 3. It seems that each of the children spawned by multiprocessing.Pool start from the beginning of the entire run_eureka.py command for some reason

@kevin218, @AarynnCarter, or @meganmansfield, if any of you are using conda environments on an apple computer and have run Eureka! Stage 3 successfully, can you send me the output file (spec-file.txt) created by the following command so that I can see if my issues are related to package versions? I don't understand how things can work fine on Ubuntu but not on MacOS unless I am experiencing some very non-intuitive package issues.
Command (run within the conda environment you use for Eureka!):
conda list --explicit > spec-file.txt

Hmmm, I seem to have found a way to overcome the issue by inserting the following line before the S2-5 calls in run_eureka.py (and indenting the S2-5 calls)
if __name__ == '__main__':
I don't know why I only encounter this on my Mac especially if anyone else has been using a Mac and run S3 successfully before, but at least this avoids the issue for me at this time

Hey, I've been running it on a Mac but not within a specific conda environment - will that command still work? If so, I'll send you the output file if you're still having issues with that.

Well if you've just been running it in a mega conda environment with tonnes of other packages then you'll have a lot of other packages that'll make it hard for me to figure out what differences are the relevant ones. Might still be able to make it work, but if anyone else has a cleaner conda environment then that'll be easier