jellyfin: add openFirewall option

Motivation for this change
Plex has this, and it seems like a reasonable way of documenting these ports.
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

@ofborg test jellyfin

Hey, I can control ofborg now! :tada:

Update?

/marvin opt-in

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-already-reviewed/2617/364


Fix forking npe

What is the purpose of the change
fix #9582
When the cluster uses the forking mode and the provider side all times out ,consumer side will npe
Brief changelog
org.apache.dubbo.rpc.cluster.support.ForkingClusterInvoker
org.apache.dubbo.rpc.cluster.support.ForkingClusterInvokerTest
Verifying this change

Checklist

[x] Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
[x] Each commit in the pull request should have a meaningful subject line and body.
[x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
[x] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
[ ] Add some description to dubbo-website project if you are requesting to add a feature.
[ ] GitHub Actions works fine on your own branch.
[ ] If this contribution is large, please follow the Software Donation Guide.

When the cluster uses the forking mode and the provider side all times out, the poll method used in forkingClusterInvoker will time out earlier than the provider side, so it will get null from the queue and throw NPE in the subsequent process. The poll method here should not set the timeout time, but wait for the provider to timeout. When the provider times out, the poll method will correctly obtain an RpcException

Codecov Report

Merging #9613 (1b22d0c) into master (8240ea2) will decrease coverage by 0.79%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master    #9613      +/-   ##
============================================
- Coverage     60.89%   60.09%   -0.80%
+ Complexity      448      447       -1
============================================
  Files          1100     1100
  Lines         44520    44473      -47
  Branches       6478     6447      -31
============================================
- Hits          27111    26727     -384
- Misses        14441    14790     +349
+ Partials       2968     2956      -12

Impacted Files
Coverage Δ

...bbo/rpc/cluster/support/ForkingClusterInvoker.java
85.71% <100.00%> (-0.40%)
:arrow_down:

...ookeeper/ZookeeperDynamicConfigurationFactory.java
0.00% <0.00%> (-66.67%)
:arrow_down:

...gcenter/wrapper/CompositeDynamicConfiguration.java
0.00% <0.00%> (-63.34%)
:arrow_down:

...fig/configcenter/TreePathDynamicConfiguration.java
25.71% <0.00%> (-60.01%)
:arrow_down:

...pport/zookeeper/ZookeeperDynamicConfiguration.java
0.00% <0.00%> (-60.00%)
:arrow_down:

.../dubbo/metadata/report/MetadataReportInstance.java
12.50% <0.00%> (-40.63%)
:arrow_down:

.../configcenter/support/zookeeper/CacheListener.java
0.00% <0.00%> (-32.44%)
:arrow_down:

...ng/transport/dispatcher/all/AllChannelHandler.java
62.06% <0.00%> (-27.59%)
:arrow_down:

...gistry/client/migration/MigrationRuleListener.java
55.88% <0.00%> (-23.53%)
:arrow_down:

...mmon/config/configcenter/DynamicConfiguration.java
68.18% <0.00%> (-18.19%)
:arrow_down:

... and 74 more

Continue to review full report at Codecov.

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

Let focus on https://github.com/apache/dubbo/pull/9612


Text is not vertically centered in rows with fixed rowHeight

I'm submitting a ...  (check one with "x")
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here

Current behavior

Set a smaller rowHeight, for example rowHeight="30"
Decrease row font with CSS font-size: 0.9rem
Text is not vertically centered and cutoff at the bottom of the row depending on the font (and browser)
Expected behavior

Users should be able to decrease the size of rows with just rowHeight and a font-size change.
Reproduction of the problem

Using ngx-datatable project, npm start
Edit demo/basic/basic-fixed.ts and set rowHeight="30"
What is the motivation / use case for changing the behavior?

Developers may want to display more rows on the screen than the default rowHeight and font-size.
Note: rowHeight="auto" is centered. However fixed rowHeight is required when using scrollbarV.
Please tell us about your environment:

Ubuntu Linux

Table version: 6.0.2

Angular version: 2.4.6

Browser: Chrome Version 56.0.2924.87 (64-bit)  Firefox 45.7.0

Text is slightly smaller and more vertically centered in Firefox than Chrome on my computer, probably due to different fonts.

Hmmm, its kinda up to the implementer if they are changing this to correct the CSS. We can't really make assertions about center alignment since you could put a really tall height and have multiple lines of text. Open to feedback though.

Just apply flex on content...with css I achieve this

@kaangoksal adding following CSS works for me :
.datatable-body-cell {     display: flex;     margin: auto; }


fixed Responsive Error in login page

I have solved the issue #3250
Before :

After :

@fredvd @stevepiercy

@SayanDeveloper you need to sign the Plone Contributor Agreement to merge this pull request.
Learn about the Plone Contributor Agreement: https://plone.org/foundation/contributors-agreement

@SayanDeveloper this comment is not about the contents of your PR but a workflow change we're at the moment discussing and impelenting  in the community. :-)
@sneridagh @mauritsvanrees @davisagli @stevepiercy
In this case, since the contributors agreement has not been signed, an authorised volto dev IMHO shouldn't approve and run the workflows. fix the 'legal' blocker first before we others spend more time on fixing code etc. I have seen 2 PR's recently where everything was fixed and then someone didn't understand and/or didn't want to sign the CA and it's hangimg now.
On the other hand, when the developer is onboard and added to the contributors team and the Plone organisation on GitHub, how do we pick up and continue from here?
Suggestion:  we could add that in the mr.roboto text and make the author/owner responsable?  "when you receivd confirmation that your CA has been processed, ping a developee to check this PR again?
another nice to have: can we block the worklows while the CA hasn't been signed? wishfull thinking maybe.

But sir I have already sent the signed agreement document to the mentioned email ID. If possible pls verify my agreement.
Thank you.

But sir I have already sent the signed agreement document to the mentioned email ID. If possible pls verify my agreement.

Ah, that's great. :-) The community member processing your contributors agreement is not the same person as the people who will be assisting you in getting your contribution reviewed and merged. So that will take some time, for which you will have to have some patience.
And that is what's my comment about, how to make sure that you as a first time contributor are not waiting too long, once you have been added to our Contributors Team, so you can continue working on your contribution.

okay got it :-)

@fredvd let's take the workflow discussion to a new issue https://github.com/plone/volto/issues/4632, and leave this PR for just the content.


⚠ Bofrost.lu has degraded performance

In 46a6faf, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1528 ms

Resolved: Bofrost.lu performance has improved in 529a3a1 after 6 minutes.


Missing Greek (EL) Translation

Missing Greek (EL) Translation #6909

assign this enhancement to me


Encountered a 'null' in 'list', this is illegal in Besom

Hello there 👋  we are stuck with the confluent provider due to the following trace.
It could be that the provider is mibehaving. However, in our case, we are not interested in this particular list value which can't be decoded but some other properties from the result type.
Would there be anything you can propose as a workaround? This is blocking for us atm.
error] 	at besom.internal.ResourceOps.decodeResponse$1$$anonfun$1(ResourceOps.scala:91)
[error] 	at besom.internal.Result.flatMap$$anonfun$1(Result.scala:166)
[error] 	at besom.internal.Result.runM$$anonfun$7(Result.scala:273)
[error] 	at besom.internal.Runtime.flatMapBothM$$anonfun$1$$anonfun$1(Result.scala:118)
[error] 	at besom.internal.FutureRuntime.flatMapBoth$$anonfun$1(Result.scala:404)
[error] 	at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:477)
[error] 	at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395)
[error] 	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
[error] 	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
[error] 	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
[error] 	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:[162](https://gitlab.transics-cicd.aws.zf.com/core/orchestration/infra-common/-/jobs/6931083#L162)2)
[error] 	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
[error] Caused by: besom.internal.DecodingError: [confluentcloud:index/getKafkaCluster:getKafkaCluster().standards] confluentcloud:index/getKafkaCluster:getKafkaCluster().standards: Encountered an error when deserializing an option
[error] 	at besom.internal.DecodingError$.apply(codecs.scala:80)
[error] 	at besom.internal.Decoder$.besom$internal$Decoder$$anon$7$$_$decode$$anonfun$3$$anonfun$3(codecs.scala:265)
[error] 	at besom.util.NonEmptyVector.map(Validated.scala:[167](https://gitlab.transics-cicd.aws.zf.com/core/orchestration/infra-common/-/jobs/6931083#L167))
[error] 	at besom.util.Validated.lmap(Validated.scala:47)
[error] 	at besom.util.Validated$.lmap$$anonfun$1(Validated.scala:137)
[error] 	at besom.internal.Result.map$$anonfun$1(Result.scala:205)
[error] 	... 11 more
[error] Caused by: besom.internal.DecodingError: [confluentcloud:index/getKafkaCluster:getKafkaCluster().standards] confluentcloud:index/getKafkaCluster:getKafkaCluster().standards: Encountered an error when deserializing a list
[error] 	at besom.internal.DecodingError$.apply(codecs.scala:80)
[error] 	at besom.internal.Decoder$.besom$internal$Decoder$$anon$8$$_$decode$$anonfun$4$$anonfun$3(codecs.scala:296)
[error] 	... 15 more
[error] Caused by: besom.internal.DecodingError: [confluentcloud:index/getKafkaCluster:getKafkaCluster().standards] Encountered a 'null' in 'list', this is illegal in Besom, please file an issue on GitHub
[error] 	at besom.internal.DecodingError$.apply(codecs.scala:81)
[error] 	at besom.internal.DecoderHelpers.accumulatedOutputDataOrErrors(codecs.scala:791)
[error] 	at besom.internal.DecoderHelpers.accumulatedOutputDataOrErrors$(codecs.scala:588)
[error] 	at besom.internal.Decoder$.accumulatedOutputDataOrErrors(codecs.scala:193)
[error] 	at besom.internal.Decoder$.besom$internal$Decoder$$anon$8$$_$decode$$anonfun$4$$anonfun$1$$anonfun$2(codecs.scala:289)
[error] 	at scala.collection.IterableOnceOps.foldLeft(IterableOnce.scala:644)
[error] 	at scala.collection.IterableOnceOps.foldLeft$(IterableOnce.scala:670)
[error] 	at scala.collection.AbstractIterable.foldLeft(Iterable.scala:933)
[error] 	at besom.internal.Decoder$$anon$8.decode$$anonfun$4$$anonfun$1(codecs.scala:289)
[error] 	at besom.internal.OutputData.traverseValidatedResult(OutputData.scala:99)
[error] 	at besom.internal.Decoder$$anon$8.decode$$anonfun$4(codecs.scala:293)
[error] 	at besom.util.Validated$.flatMap$$anonfun$1(Validated.scala:112)

The value that trips besom is the following:
      "standards" -> Value(kind = ListValue(value = ListValue(values = Vector(Value(kind = NullValue(value = NULL_VALUE))))))
The full structure (edited for privacy):
invokeResponse(
  return = Some(
    value = Struct(
      fields = HashMap(
        "networks" -> Value(
          kind = ListValue(
            value = ListValue(
              values = Vector(Value(kind = StructValue(value = Struct(fields = Map("id" -> Value(kind = StringValue(value = "")))))))
            )
          )
        ),
        "availability" -> Value(kind = StringValue(value = "SINGLE_ZONE")),
        "region" -> Value(kind = StringValue(value = "eu-west-1")),
        "restEndpoint" -> Value(kind = StringValue(value = "[...:443](...)")),
        "freights" -> Value(kind = ListValue(value = ListValue(values = Vector()))),
        "displayName" -> Value(kind = StringValue(value = "shared")),
        "byokKeys" -> Value(
          kind = ListValue(
            value = ListValue(
              values = Vector(Value(kind = StructValue(value = Struct(fields = Map("id" -> Value(kind = StringValue(value = "")))))))
            )
          )
        ),
        "basics" -> Value(kind = ListValue(value = ListValue(values = Vector()))),
        "standards" -> Value(kind = ListValue(value = ListValue(values = Vector(Value(kind = NullValue(value = NULL_VALUE)))))),
        "id" -> Value(kind = StringValue(value = "...")),
        "enterprises" -> Value(kind = ListValue(value = ListValue(values = Vector()))),
        "bootstrapEndpoint" -> Value(kind = StringValue(value = "...")),
        "cloud" -> Value(kind = StringValue(value = "AWS")),
        "environment" -> Value(kind = StructValue(value = Struct(fields = Map("id" -> Value(kind = StringValue(value = "...")))))),
        "dedicated" -> Value(kind = NullValue(value = NULL_VALUE)),
        "kind" -> Value(kind = StringValue(value = "Cluster")),
        "apiVersion" -> Value(kind = StringValue(value = "cmk/v2")),
        "rbacCrn" -> Value(
          kind = StringValue(
            value = "..."
          )
        )
      )
    )
  ),
  failures = Vector()

Hi @jchapuis, yeah, this is, in fact, provider misbehaving (or just schema being borked). I just checked and 1.47.0 is the latest version so there was an update of the provider itself (latest released for Besom is 1.42.0-core.0.3). I can publish 1.47.0-core.0.3 for you but I don't think it will solve the issue, really. Problem here is that for output type of classes (usually datatypes that are inside of Output-typed fields of resources but also return values from pulumi function calls) we do all-or-nothing deserialization so even if one of the subfields is broken, it affects the whole deserialization logic - it's just Either[Exception, A] so you get A or an error. This turns out to be a huge problem in the end and the scope for 0.4 contains a planned change where each field would be a separate Output[A] as this would allow granular failures on per-field level. Unfortunately until this is done I don't really have a way to overcome this that is not a huge hack.
I do have a hack, however.
If you are interested in solving this quick and dirty, you could clone our repo and publish locally a hotfixed artifact of confluentcloud package (you will need tooling mentioned in CONTRIBUTING.md!). First thing you need to do is to run just publish-local-all. Next step is to generate the package locally. The command to do that is just cli packages local confluent - this will pull stuff from github metadata (hence the need to set up GITHUB_TOKEN env var) and use our codegen to generate the codebase. After that you will have to go to .out/codegen/confluentcloud/1.47.0/ and modify the file src/index/GetKafkaClusterResult.scala - just comment out the lines that contain standards so one field and two extension methods. Then you need to publish the modified package locally (or even publicly if you have an org on maven central and want the hotfixed package to be available on CI and such). If you would like to preserve our package naming scheme, you just have to run scala-cli publish local . --organization org.virtuslab --name besom-confluentcloud --project-version=1.47.0-core.0.3-HOTFIX, I think. For anything public it would be necessary to adjust the values in project.scala.

@lbialy excellent, thanks a lot for the quick answer, makes sense, and good idea on the granular field access. Thanks also for the procedure for custom packages, great to know, I might follow that or just hardcode the values I'm missing for the moment, let's see


001 design document on how to manage organizations

Description

A design document on how to manage organizations, teams and users through a CRD.
Relevant issues/tickets

https://github.com/grafana-operator/grafana-operator/issues/408
Type of change

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

Checklist

[ ] This change requires a documentation update
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have added a test case that will be used to verify my changes
[ ] Verified independently on a cluster by reviewer

Verification steps

I have documented a few curl commands to play with the grafana API and after using them I actually understood how the API works.
Part of these commands could potentially be a part of future e2e tests but I didn't feel that they had a place directly in the design spec. Try your self against your own grafana instance.
Grafana API testing
HEADER='content-type:application/json'
NAMESPACE="grafana-operator-system"
PASSWORD=$(kubectl -n $NAMESPACE get secrets grafana-admin-credentials --template={{.data.GF_SECURITY_ADMIN_PASSWORD}} | base64 -d)

List org in a base setup, as we can see the name of the default org is Main Org.
$ curl -H $HEADER "http://admin:$PASSWORD@localhost:3000/api/org/"
{"id":1,"name":"Main Org.","address":{"address1":"","address2":"","city":"","zipCode":"","state":"","country":""}}

All users in current org
$ curl -H $HEADER "http://admin:$PASSWORD@localhost:3000/api/org/users/lookup"
[{"userId":1,"login":"admin","avatarUrl":"/avatar/46d229b033af06a191ff2267bca9ae56"}]

Create org
DATA='{"name":"org2"}'
curl -H $HEADER -d $DATA -X POST "http://admin:$PASSWORD@localhost:3000/api/orgs"

Create global user
DATA='{"name":"User2","email":"user2@graf.com","login":"user2","password":"userpassword","OrgId":3}'
curl -H $HEADER -X POST -d $DATA "http://admin:$PASSWORD@localhost:3000/api/admin/users"

Add the same user to the org that we created earlier to another organiaztion.
DATA='{"loginOrEmail":"user2","role":"Viewer"}'
curl -H $HEADER -d $DATA -X POST "http://admin:$PASSWORD@localhost:3000/api/orgs/2/users"

So if in the crd you define the same username in multiple organiaztions we would have to do the following

verify if that users exists
If not create the user to the specefied org
If the crd defines it in a second org
check if the user exists
check if that organiaztion already is defined. If not add access to that specific organiaztion

We cant allow a CR to define stuff like theme and isDisabled in multiple organiaztions since the API would start to fight against eachother.
The only thing they would be allowed to define in multiple organiaztions are role because that can differ between the orgs.

So incredibly sorry for not getting back to this topic earlier.
I really like the ideas, and am still unsure, which of the two alternatives would be the better one.
In my mind I don't have a clear view, where the linkage between Dashboard and Organization should be situated. Should the Organization "search" it's Dashboards, or should the Dasbhoards search their corresponding Organization.
Right now I'm leaning to the side of Organization searching it's Dashboards via labels, but this changes kinda hourly.
What I think needs special attention is the fact, that the controllers for the new CR(s) needs to have an eye on the Grafana instance, where Orgs, Teams and Users have been deployed to, so that the CRs can be reconciled. So there is a dependency that maybe needs to be targeted in the status in the object, for example:
apiVersion: integreatly.org/v1alpha1
kind: GrafanaOrganization # Not a good name, need a better one.
metadata:
  name: organization-example
spec:
  orgniaztions:
    - name: "Main Org."
      grafanaLabelSelector: # Required
      dashboardNamespaceSelector: # Will assume same ns unless specefied
      teamsLabel: <my-team-label>
      userLabel: <my-user-label>
status:
     reconciledSuccessfully: false
     grafanaInstances:
       - name: instance-a
         applied: true
       - name: instance-b
         applied: false

So if instance-a is restarted, it needs to find be set to 'applied: false', so the controller for the GrafanaOrganization reapplies it after the instance is finished restarting. Or needs to start the reconciliation cycle for the GrafanaOrganization.
Another question is: Shall there be the possibility to add a URL or service instead of a grafanaLabelSelector, to add Organizations to non "operator-managed" instances.

can this be re-opened? or is there further work happening elsewhere?

@padrepitufo i reopend it. Please feel free to come with any feedback.

Thanks for bringing this up @Voigtus. I didn't think of how dashboards (or any other resource for that matter) should be applied in a multi org solution.
To be honest the more I think about this I think it's a bad idea. To complexity this would bring to our CRD:s and the operator it self is huge compared to the current solution.
I have started to write multiple designs on how this could be solved but I don't find a way where I think that it will be easy to use.
I think we should go back to the base question which we haven't really discussed. Why do grafana need multiple organizations in a kubernetes environment?
Currently I understand it since we don't have multiple namespace-support https://github.com/grafana-operator/grafana-operator/pull/599 but when that is implemented what is the need?
From a really big organization point of view when it was painful to spin up new grafana servers I fully understand that you want this feature. But in a gitops world where the only thing you need to do to spin up a new grafana instance is to update your repo and you can get a grafana per team/service I don't see the need.
Switching organiaztions vs login in to multiple endpoints is about as painful from a end user point of view.
If you or someone else is able to prove me wrong I'm more then happy to look at that design proposal.
On the other side I don't see a big problem to create team/user managment from a CRD within the main organiaztion.
At the same time why do we need teams?
So finally users, this something I think is useful since I think multiple organizations wants to be able to create a service account so they can visualize there dashboards on a TV.
But at the same time it's just one curl command and there is possible workarounds for this. https://github.com/grafana-operator/grafana-operator/issues/575
So please share your thoughts on why we have or haven't need for these sets of features.
We would love to get both negative and positive feedback on this.
And if you do think it's needed please create a design that will scale and still be easy to use. We are happy to talk about different solutions around this area.

In my opinion a multi-organization is still valid, as long as there is no multi-namespace and mutli-instance support.
One other part could be the "ressource saturation" part. Why spin up 10 mostly idling instances, if you can have one that has a good usage? (Playing devils advocate here. I'm right on your thought train, but can already feel the discussion and arguments.)
Thinking about users. Don't lean towards "User-management", let this be done by something that does it better, like AD, Keycloak and what else there is in the world.
What I would see as a "necessity" is the creation of a serviceaccount with read-rights either in instances or orgs.
My thoughts are currently for a prototype with incremental "feature creation"

This should be as "small" as possible. I.e. only creating an Org
Create a serviceaccount with read and/or write rights (depending on CR)
Then create the addition of Dashboards.

My thinking here is let the Dashboard be created by the current process, grab the .json by the Organization controller and let it be applied to the Organization.
Every Org must state in the CR which dashboards it wants to use. So no interference with the other CR, just plain API calls going all over the place.

Add inline Dashboards, so you can add a Dashboard to an Organization inline. This has no fancy features like subfolder. Just a plain Dashboard.
Add Dashboards via CM to an Organization. Just reference the configmap in the Organization and "poof" there is a dashboard. This would even allow multiple Orgs to get a set of shared dashboards. Might be the chance as well to add and test the creation of dashboards via API and not by using config files.
Add Dashboards via CR to an Organization.

Reference the Organization which it should be applied to in the GrafanaDatasource. Kind of an opt-in solution (you want a dashboard, make the concious decision and talk to the owner of the dashboard)
Add a field "applyToAllOrganizations" to GrafanaDatasource => default set of Dashboards for everyone (kinda like Oprah: you get a Dashboard, and you get a Dashboard...)

Add Datasources to Organization (kind of like step 3-6 but with Datasources)
Teams: scrap it. That is waaaay to "fine granular" and currently there is only the wish for Orgs to be supported. And why implement and hassle with a jack of all trades if not necessary.

Just my 2 cents. Step 3-5 can be scrapped if there is the wish to keep everything relating Dashboards in the Dashboard Controller. But I guess the best alternative is an opt-in solution for Dashboards and Datasources. Less work for us, more "clear" view in a git, where a Dashboard is coming from and who uses it.
What might be challenging in Step 6 is that the Dashboards should be reconcilable but don't create the necessity to restart the instance if these are only applied by API to the Organizations. Next step could be to switch up the whole process of Dashboard creation to API, but I don't know, wether this should be a part of this story.

@Voigtus we are currently working on multi-namespace and mutli-instance support and it will most likely be merged before anyone starts to work on implementing this feature.
Do you think this is worth it assuming that multi-namespace and mutli-instance support is available?
About you ideas if you or someone else can come with concrete example how the CRD:s would be managed to solve this we will definitely look at it. But I won't personally take any more of my time in trying to design this in a foreseeable future. But I'm happy to discuss this feature if someone else drives the question.

I was just having a thought.
Does the problem "how do I manage the CR" not also apply to Datasources and Dashboards in a Multi-Instance Architecture?
How do you want to "marry" Dashboards with specific instances? Shall the instance have the lead, or should the CR know where it should be applied to?
Since this is the same question but with another CR my guess would be: The core mechanism could be the same for Organizations.
The by far most simplistic way to implement Organizations would be to add the following to the Grafana CRD:
spec:
  organization:
    - name: orgA
      createViewer: true
      dashboards:
        - dashboardA
        - dashboardC
      datasources:
        - datasourceA
        - datasourceB
    - name: orgB
      createViewer: false

Then after the current reconciliation cycle, the organizations are created by getting all ressources via HTTP-API of the grafana instance and then are applied to organizations.
What are the drawbacks:

All Datasources and Dashboards need to be created first in the main-org.
API calls to Instance to get already present information in other resources (duplication)

I have a general question regarding the way multi-instance-namespace support will be supported. Can I hit you up on slack @NissesSenap , or is there a discussion going on anywhere where I can read the current state?

In grafana.spec we have
dashboardLabelSelector	<[]Object>
dashboardNamespaceSelector	<Object>

so we should be able to support Multi-Instance Architecture without any issues.
You can follow along with Multi-Instance work at: https://github.com/grafana-operator/grafana-operator/pull/599
Sure you can hit me up at slack DM or in the grafana-operator channel. But if it's a specific question about multi-namespace I would recommend to post it in the PR or in the issue: https://github.com/grafana-operator/grafana-operator/issues/174


[Question] - Should the header have consistent vertical alignment?

Hi folks,
I've been reading through the website and noticed the text beside the logo in the header looks a bit low. I've added a red horizontal line to show the baseline:

Did you want "MinimumCD.org" to be aligned like it used to be about a year ago in June 2022 (below), and would you want a PR if you don't fix it yourself quickly? I had a look on the Wayback Machine on archive.org to see what was intended.

All the best,
Sean

I don't think any of us are fantastic with CSS, so it'd be awesome if you were open to helping out. If so, please add your name to the contributor's list as part of the PR.


[4.0] Performance greatly decrease if characters are animated

Godot version
4.0
System information
Windows 10, i7, nvidia 840m 8gb, forward+, mobile and compatibility
Issue description
Since I was interested to shift to 4.0 from 3.5.1 I made a test scene to test 4.0 performances and well the results were bad.
My characters are made of multiple poligons with puppet-like animations, now if an enemy is not animated I can populate the test scene with more than 500 enemies, if it's animated only 31.
EDIT:
in comparison in 3.5.1 a mostly complete test level with environment, functioning player, various functioning enemies with ai, attack, physics etc can handle more than 60 enemies on screen.
Steps to reproduce
-If you want to start from zero:
Make a character made of multiple sprites or polygons, animate it and make a test scene that adds as many copies of characters until the fps go lower than 60fps, try one time with the character animated and another time with the character not animated and you will see a big difference in performance(or at least it's what happens to me).
-if you want to start from my minimal project:
there are only 2 scenes, test and enemy_pol, enemy_pol has only the "walk" animation in the AnimationPlayer, check or uncheck the autoplay button depending if you want test enemy_pol animated or not and then run the main scene(test).
In the bottom left corner of the test scene you will see how many enemies are on screen and the fps.
PS:
Don't judge the blank character, i wasn't ready to share the still unfinished version lol!
Minimal reproduction project
issue.zip

This comes from a change that was made early in the 4.0 rendering rewrite. To make skeletons with Polygon2Ds faster we moved to internally creating meshes out of Polygon2Ds. So everytime you make a change to the polygon properties (i.e. polygon, uv, offset, the mesh is regenerated and sent to the RenderingServer. In the typical use case ( the Polygon2D is created once and then bones are used to animate it) this works very well and avoids a lot of the overhead of the old approach.
However, your use-case is not what we expected when this was rewritten. You are using an AnimationPlayer to manually make changes to the polygons instead of using bones to edit them. Accordingly all the changes are happening on the CPU-side and then the meshes need to be recreated every frame. This wastes a lot of performance.
In the MRP, just disabling the changes to uv, offset and polygon in the AnimationPlayer make it so I can render many more characters (normally at 90 characters I hit 30fps, but after unchecking, uv, offset, and polygon I get 55 FPS with 360 chracters)
I have discussed this with other users and this change has been a problem for anyone who is doing custom animation stuff on Polygon2Ds directly. So we need to improve performance. The main question is how?
One option is to add back a codepath when not using skeletons to stream polygon data every frame. In other words, instead of creating a mesh each time the polygon changes, always use polygon and pass all polygon data to the GPU each frame (this is how it worked on 3.x).
Another option (that may only be a partial fix) is to automatically batch polygons and meshes. They share a format, so it should be possible to batch them. That being said, I think the lack of batching is only part of the performance issue.

One option is to add back a codepath when not using skeletons to stream polygon data every frame. In other words, instead of creating a mesh each time the polygon changes, always use polygon and pass all polygon data to the GPU each frame (this is how it worked on 3.x).

I'd suggest going with this approach, considering how common manually animating Polygon2Ds is. It's probably more common than using skeletons in fact…


(Stuck Step 3/3) Whoops, looks like we got a problem: invalid_client.

what should i do?

just a miss type sorry


Pending talk claim acceptance sometimes errors out after finishing at least the association part of claim acceptance

Will figure out a more detailed repro scenario later, but just now noticed when claiming my own uncon talk at Sunshine. Maybe that shouldn't be a thing, but the system errored out after succeeding in accepting the pending talk claim, so something's amiss with current behavior.

This appears to be a broader, intermittent issue with talk claim approvals. Will look at logs to figure out what's going on.

This should be fixed by now. AFAIK it was the Email-Subsystem. It it is not fixed, feel free to open this again.


Feature: maintain a CHANGELOG based from GitHub Issues labels

Component
Other (please describe)
Describe the feature you would like
Useful CHANGELOG
Maintain a CHANGELOG based from GitHub Issues labels
Additionally, do something like a forge completions bash > forge_bash_$COMMIT && diff forge_bash_$COMMIT forge_bash_$COMMIT showing changes to the CLI's easily.
Additional context
The nightly summaries are not sufficient. Labels bypass the contents of parsing the git commit because those commit messages may not be very helpful.

Closing as stale for now, we'll have a more stable changelog with versioned releases


Don't repeat set_url_path logic

Classes that extend and override logic for set_url_path need to be respected by this command.
set_url_path is lot more useful when you can namespace a whole lot of pages with this command.
Use case:
We want to namespace our blog urls with the publish date. We would love to go to old posts and change all the url_paths for 1000+ posts.
Also this is a more DRY approach.

Hi @garykrige - thanks for the PR!
The set_url_path method is not designed to be overridden, and I'd strongly advise against doing so - various bits of code rely on url_path matching the tree structure (for example: https://github.com/torchbox/wagtail/blob/2442416e93a9cec4325a41894279157cee4e3327/wagtail/wagtailcore/models.py#L600), and depending on the nature of the customisations, it could result in the tree becoming corrupted on moving/renaming pages.
The recommended way of customising URL patterns is through a custom route() method: http://docs.wagtail.io/en/v1.7/reference/pages/model_recipes.html#adding-endpoints-with-custom-route-methods

@gasman thanks for the recommendation.
I am using wagtail as an api. My reason for overriding set_url_path was to simplify generating a sitemap. I am currently overriding url, but the sitemap app gets urls with full_url. So instead of overriding both I went this route (dammit english).
Pages.routes is not considered at all in building a sitemap. I will make a PR for that I guess.
Thanks for a brilliant framework.

I still think this PR has value simply for DRY's sake. I will update to make it a safe.


Dismantling doesn't put items in the chest

When I dismantle the turret, it just places the chest and spreads the ammo and upgrade items everywhere.
Forge: <IP_ADDRESS>0
Bookshelf: 1.10-<IP_ADDRESS>0
Turret Mod Rebirth: 4.0.0-alpha.5

I'll fix this with a custom container which can hold everything (a chest would be too small given a turret with full ammo and all 36 upgrade slots used)


Ticking is still sometimes laggy

I thought I had fixed it but it sometimes still happens.

I'm being very careful in the #79 UI redesign to make sure performance is good with every feature added and change made.


Avichal1234 patch 1

Description of the Change

Possible Drawbacks

Hello @Avichal1234, you are sending PR to the project with your own setup. Instead you should send PR or merge directly to your own repository. Closing PR


onPaginationChange does not include  column filter mode

material-react-table version
1.2.10
Describe the bug and the steps to reproduce it
When calling the onColumnFiltersChange event,  the data you get back includes only the id and value.
In case the enableColumnFilterModes is enabled, the onColumnFiltersChange should also include the selected mode.
Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets
Sandbox example
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
No response
Terms

[X] I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

No actually there is a separate columnFilterFns state just for that. Also see onFilterFnsChange, though I'm probably going to rename that to onColumnFilterFnsChange in v1.3 soon


Custom seek bar slider control is causing the video to stutter

Bug
As soon as the slider moves [seeks] the video becomes laggy
Platform
Android
Which player are you experiencing the problem on:

Android

Environment info

React native info output:
System:
    OS: macOS 12.6
    CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
    Memory: 517.08 MB / 8.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
    Watchman: 2<IP_ADDRESS> - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0
    Android SDK:
      API Levels: 28, 31, 33
      Build Tools: 30.0.2, 30.0.3, 31.0.0, 32.1.0, 33.0.0
      System Images: android-30 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 2021.3 AI-213.7172.25.2113.9014738
    Xcode: 14.0/14A309 - /usr/bin/xcodebuild
  Languages:
    Java: <IP_ADDRESS> - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.1.0 => 18.1.0
    react-native: 0.70.1 => 0.70.1
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Library version: x.x.x
Steps To Reproduce

I have provided a sample code below to use
create a fresh react-native app
install react video player and @react-native-community/slider
run the application [i used a physical device]

Expected behaviour
The seeking should be seamless without stuttering
Reproducible sample code
import Slider from '@react-native-community/slider';
import React from 'react';
import { View } from 'react-native';
import Video from 'react-native-video';

const VideoPlayer = (props: any) => {
    const { url } = props;
    const videoRef = React.useRef<any>(null);
    const [player, setPlayer] = React.useState({
        paused: false,
        muted: false,
        seeking: false,
        duration: 0,
        currentTime: 0,
        fullscreen: false,
    });

    const onLoad = (data: any) => {
        setPlayer({ ...player, duration: data.duration, currentTime: data.currentTime });
    };

    const onProgress = (data: any) => {
        setPlayer({ ...player, currentTime: data.currentTime });
    };

    const onSeek = (data: any) => {
        videoRef.current.seek(data);
        setPlayer({ ...player, currentTime: data });
    };

    console.log(player.currentTime);
    return (
        <View style={{ flex: 1 }}>
            <Video
                ref={videoRef}
                onLoad={onLoad}
                paused={player.paused}
                onProgress={onProgress}
                style={{ aspectRatio: 16 / 9 }}
                source={{
                    uri: 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4',
                }}
            />

            <Slider
                style={{ width: '100%', height: 40 }}
                value={player.currentTime}
                step={1}
                onSlidingStart={() => setPlayer({ ...player, seeking: true, paused: true })}
                onSlidingComplete={() => setPlayer({ ...player, paused: false })}
                onValueChange={onSeek}
                minimumValue={0}
                maximumValue={player.duration}
                minimumTrackTintColor='#FFFFFF'
                maximumTrackTintColor='#000000'
            />
        </View>
    );
};

export default VideoPlayer;

Video sample
If possible, include a link to the video that has the problem that can be streamed or downloaded from.
link to the video

Your slider runs the onSeek function every time the value changes so an onProgress event fires, slider is re-rendered with new value, onSeek is fired, video is set to seek to current frame.
change
onSlidingComplete={() => setPlayer({ ...player, paused: true })}

to
onSlidingComplete={() => setPlayer({ ...player, seeking: false, paused: false })}

and update your onSeek function to return early if not seeking
const onSeek = (data: any) => {
  if (!player.seeking) return;
  videoRef.current.seek(data);
  setPlayer({ ...player, currentTime: data });
};

You should see performance improve dramatically.
I would advise looking at https://github.com/criszz77/react-native-media-console as an example of implementing custom controls.

const onSeek = (data: any) => {
  if (!player.seeking) return;
  videoRef.current.seek(data);
  setPlayer({ ...player, currentTime: data });
};

thanks a bunch this solved my issue ill definitely look at the https://github.com/criszz77/react-native-media-console library

const onSeek = (data: any) => {
  if (!player.seeking) return;
  videoRef.current.seek(data);
  setPlayer({ ...player, currentTime: data });
};

thanks a bunch this solved my issue ill definitely look at the https://github.com/criszz77/react-native-media-console library

btw this caused a new issue the tap to seek doesn’t work anymore the slider doesn’t move when taped on the time line but works perfectly when scrubbed


Smarter delete key behavior

Some displayed characters are actually composed of 2+ unicode characters.
If user deletes this kind of compound-character, the delete operation should be smart enough to know how many chars to remove (not always 1).

Study this example that uses a StringBuilder to hold state:
https://android.googlesource.com/platform/development/+/master/samples/SoftKeyboard/src/com/example/android/softkeyboard/SoftKeyboard.java

𝕀 𝕙𝕒𝕧𝕖 𝕥𝕠 𝕙𝕚𝕥 𝕓𝕒𝕔𝕜𝕤𝕡𝕒𝕔𝕖 𝕥𝕨𝕚𝕔𝕖 𝕗𝕠𝕣 𝕖𝕒𝕔𝕙 𝕔𝕙𝕒𝕣𝕒𝕔𝕥𝕖𝕣, 𝕒𝕟𝕕 𝕀 𝕒𝕞 𝕠𝕗𝕥𝕖𝕟 𝕞𝕚𝕤-𝕥𝕠𝕦𝕔𝕙𝕚𝕟𝕘 𝕝𝕖𝕥𝕥𝕖𝕣𝕤.

Received this from user. First issue has to do with this backspace; second is with key size.

Is there any way that the backspace key could perform a 'double backspace' when the character to be deleted requires it?

want the text to be deleted letter by letter so I don't end up with the weird question mark things.

ᴡʜᴇɴ ɪ ᴘʀᴇss ʙᴀᴄᴋsᴘᴀᴄᴇ... ɪɴ sᴏᴍᴇ ᴀᴘᴘs𝕟𝕛� < --- 𝕚 𝕘𝕦𝕖𝕤𝕤 𝚏𝚘𝚗𝚝𝚜. 𝚝𝚑𝚎 𝚋𝚕𝚊𝚌𝚔 ? 𝚍𝚒𝚊𝚖𝚘𝚗𝚍 𝚊𝚙𝚙𝚎𝚊𝚛𝚜 𝚏𝚒𝚛𝚜𝚝, 𝚝𝚑𝚎𝚗 𝚒 𝚌𝚊𝚗 𝚋𝚊𝚌𝚔𝚜𝚙𝚊𝚌𝚎 𝚝𝚑𝚎 𝚍𝚒𝚊𝚖𝚘𝚗𝚍.

ᴡʜᴇɴ ɪ ᴘʀᴇss ʙᴀᴄᴋsᴘᴀᴄᴇ... ɪɴ sᴏᴍᴇ ᴀᴘᴘs𝕟𝕛� < --- 𝕚 𝕘𝕦𝕖𝕤𝕤 𝚏𝚘𝚗𝚝𝚜. 𝚝𝚑𝚎 𝚋𝚕𝚊𝚌𝚔 ? 𝚍𝚒𝚊𝚖𝚘𝚗𝚍 𝚊𝚙𝚙𝚎𝚊𝚛𝚜 𝚏𝚒𝚛𝚜𝚝, 𝚝𝚑𝚎𝚗 𝚒 𝚌𝚊𝚗 𝚋𝚊𝚌𝚔𝚜𝚙𝚊𝚌𝚎 𝚝𝚑𝚎 𝚍𝚒𝚊𝚖𝚘𝚗𝚍.

moving this along again to next

Issue #122 is a duplicate with a more precise title.
I suggest adding (deletion bug) to this issue and closing #122.


[KONG] Skywalking agent plugin for Kong throw an exception

Please answer these questions before submitting your issue.

Why do you submit this issue?
[x] Question or discussion
[x] Bug
[ ] Requirement
[ ] Feature or performance improvement

Question
I installed a skywalking plugin on my service in kong. I would like to use it to monitor my ES cluster.
The skywalking configuraion like this.
 "config": {
    "service_name": "Kong Service",
    "sample_ratio": 1,
    "namespace": null,
    "max_callback_time_spent": 5000,
    "service_instance_name": "Kong Service Instance",
    "backend_http_uri": "http://<IP_ADDRESS>:12800"
  }

I sure about that back end URL is accessible.
But when I switch on this plugin, the kong gateway will throw a error message like this:
{
    "message": "An unexpected error occurred"
}

I checked  the proxy error log. follow this
2021/04/26 08:15:13 [error] 24#0: *254687 [kong] init.lua:271 [skywalking] ...uarocks/share/lua/5.1/kong/plugins/skywalking/tracer.lua:72: attempt to concatenate local 'namespace' (a nil value), client: <IP_ADDRESS>, server: kong, request: "POST /myindex/_search HTTP/1.1", host: "<IP_ADDRESS>:9200"

Which codes are you using? I don't think SkyWalking has a Kong plugin release.

I am sure Skywalking-Kong agent does not have these two configurations, namespace or max_callback_time_spent.

I follow this document README.md to install the plugin.
I repackaged the image based on kong:2.4.0. This is my dockerfile:
FROM kong:2.4.0

RUN luarocks install kong-plugin-skywalking --local

ENV KONG_NGINX_HTTP_LUA_SHARED_DICT="tracing_buffer 128m"

ENTRYPOINT ["/docker-entrypoint.sh"]

EXPOSE 8000 8001 8443

STOPSIGNAL SIGQUIT

CMD ["kong", "docker-start"]

Then I can see the Skywalking-Kong plugins in konga.  Did I install a wrong plugin?

Hi @kasimLZ
I found two unnecessary items in the configurations you provided. You need to remove namespace and max_callback_time_spent.
 "config": {
    "service_name": "Kong Service",
    "sample_ratio": 1,
    "service_instance_name": "Kong Service Instance",
    "backend_http_uri": "http://<IP_ADDRESS>:12800"
  }


Clarify the order of pushing the release branch and deploying in RELEASING.md.

Codecov Report

Merging #1169 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master    #1169   +/-   ##
=========================================
  Coverage     81.93%   81.93%
  Complexity     1219     1219
=========================================
  Files           192      192
  Lines          5906     5906
  Branches        546      546
=========================================
  Hits           4839     4839
  Misses          920      920
  Partials        147      147

Continue to review full report at Codecov.

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


Question about padding the image in submission.py

pad to (384, 1248)
top_pad = 384-imgL.shape[2]
left_pad = 1248-imgL.shape[3]
imgL = np.lib.pad(imgL,((0,0),(0,0),(top_pad,0),(0,left_pad)),mode='constant',constant_values=0)
imgR = np.lib.pad(imgR,((0,0),(0,0),(top_pad,0),(0,left_pad)),mode='constant',constant_values=0)
Here, in submission.py, I wanna to ask why  padding the image to (384,1248). Is it related to the KITTI Stereo 2015 dataset? If so, how could I use this network to calculate the disprity map of the other stereo pairs? Waiting for your answer, thanks!!

@Yebubu
Hi, you can replace those line to pad your own images to the multiple of 32.

@Yebubu
We used deconvolution  to  upsample the cost volume.
If the image size is not the multiple of 32, the volume size will not consist.

@Yebubu
The maxdisp should be the multiple of 8.

@JiaRenChang
I have tested the submisson.py in my win7 cpu envs, the datasets is stereo 2015 and I take the maxdisp as 96. As a result, it takes about 45s to predict disparity map for one image; I want to ask if the time cost is  reasonable in such a setting?
Waiting for your reply , thanks!

@Yebubu
I think that it's acceptable time cost in cpu envs.

您好，我现在有一个问题哈，您之前提到输入到这个网络的图像必须是大小必须是32的倍数，但是我发现一个问题。就是在scene上训练的时候，您是保证了这一原则，（544,960）。但是我发现在kitti2015上训练的时候，你的大小已经为（1232,368）是16的倍数，而不是32的倍数，这个时候也同样work,这是不是告诉我们只要满足是16的倍数，不一定是32，就行，麻烦您告知，谢谢了？

@zyfsa Hi, 其實是可以的


Handle Hyper 0.11's Headers implementation

In Hyper 0.11, the following code will panic:
use hyper::header::{Authorization, Basic, Bearer, Headers};
fn main() {
    let mut headers = Headers::default();
    let basic = Basic { username: "richard".to_string(), password: None };
    headers.set::<Authorization<Basic>>(Authorization(basic));
    println!("Auth: {:?}", headers.get::<Authorization<Bearer>>());
}

This is because std::any::TypeId::of<Authorization<Basic>> and
std::any::TypeId::of<Authorization<Bearer>> don't match, but the header
name, Authorization does.
We provide a .safe_get::<Authorization<Bearer>> to workaround this issue.

bors r+

bors r+


Potential Null Pointer Dereference in Function RecodeBeamSearch::ContinueContext

Current Behavior
In the Function RecodeBeamSearch::ContinueContext, If the condition on line 906 is false, then the previous=previous->prev statement at the end of each iteration of the for loop will lead to a null pointer dereference.
https://github.com/tesseract-ocr/tesseract/blob/5d5a633a5d7abfb155a605be90f8033f82e9744f/src/lstm/recodebeam.cpp#L901-L910
Suggested Fix
If previous could be nullptr, an error handling branch should be added, as shown below:
if (previous != nullptr) {
    ...
} else {
    // Add error handling code here
}

If previous cannot be nullptr, maybe can remove the check for previous, as shown below:
while (previous->duplicate || previous->code == null_char_) {
  previous = previous->prev;
}
prefix.Set(p, previous->code);
full_code.Set(p, previous->code);

I never had a NULL pointer deference in this function and never saw a bug report which reported one. Therefore I think the checks should be removed.
Do you want to send a pull request?

I never had a NULL pointer deference in this function and never saw a bug report which reported one. Therefore I think the checks should be removed.
Do you want to send a pull request?

Yeah, I have send a pull request.

From the name previous it can be nullptr.

From the name previous it can be nullptr.

But if the for loop is entered and previous is nullptr, it will inevitably cause a null pointer dereference. Currently, it seems there is no path where previous would be nullptr when entering the for loop. Or do you think an error handling branch should be added?

From the name previous it can be nullptr.

Yes, but obviously the loop always terminates before the nullptr is reached. Otherwise we'd have lots of Tesseract crashes.

From
for (int p = length - 1; p >= 0; --p, previous = previous->prev) {
to
for (int p = length - 1; p >= 0 && previous ; --p, previous = previous->prev) {

@egorpugin, would you prefer the nullptr check in the for statement although that case never occurred up to now?

I updated the PR. Please review.


Feature/Add new automatic submission run property to programming exercises

Checklist

[x] I tested the changes and all related features on the test server https://artemistest.ase.in.tum.de.
[x] I documented my source code using the JavaDoc / JSDoc style.
[x] ~I added integration test cases for the server (Spring) related to the features~
[x] I added integration test cases for the client (Jest) related to the features
[x] I added screenshots/screencast of my UI changes
[x] I translated all the newly inserted strings

Motivation and Context

For https://github.com/ls1intum/Artemis/issues/770: Trigger a submission run when the due date of a programming exercise expires.
This PR provides an updated model for storing the submission run date and integrates the configuration in the client. The LifecycleHook itself will be integrated in another PR.
Description

Introduces the new property automatic_submission_run_date, but not directly in the exercise table. Instead the new entity programming_exercise_details table is linked to the entity ProgrammingExercise with the @SecondaryTable annotation. This feature could be used in future for more properties that are exercise type specific.
The new property is a date, but it can currently only be enabled through the client to 1 hour after the due date. This might change in future.
:information_source: When e.g. removing the due date, the view jumps a bit because the checkbox is removed. I did not find an easy fix.
Steps for Testing

Log in to Artemis
Create a new Programming Exercise / Link new Programming Exercise / View Programming Exercise / Edit Programming Exercise
Enable/Disable the new property and check if it is reflected in the network calls / database

Screenshots

How does it look like when the option is selected in the UI? I guess another date picker appears which is pre-filled with the same date as the exercise due date. The instructor should be able to change this date, but it has to after the exercise due date (or exactly the same)

I fixed the requested items, I'll test this tomorrow and bring it back into review.

@krusche @ungaralex @jpbernius Thanks for your reviews.
I think there was a misunderstand from my side about the desired implementation. The new date is now a date picker that is validated to be set >= due date.


Fix synctriggers for functions

This commit added code to make sure that synctriggers is always called
after a function app has finished deploying. Additionally, this change
also adds an empty settriggers call that is required by the front end to
notify the zip cache that changes were made.
Fixes https://github.com/projectkudu/kudu/issues/3238

This PR was waiting on successful ANT92 deployment (platform). That's almost completed, and I will now update this PR to get it ready to be completed.

Merged here -- https://github.com/projectkudu/kudu/commit/86918e0c0f1098afefcd5e1a03e1d7281cb850c8


Link to demo page

[x] Update README

[x] Merge into gh-pages

[x] Fix for NPM formatting

Fixed in 4.0.5


Abstract factory pattern page not found

http://tmrts.com/go-patterns/creational/abstract_factory.md
https://github.com/tmrts/go-patterns/blob/master/creational/abstract_factory.md

@eaglewu abstract factory pattern is not implemented yet (see the patterns with '✘' in their status)

Got it! tks


NixOS manual (documentation): some configuration options are missing

Issue description
I've noticed that fonts.enableCoreFonts configuration option is missing from the NixOS manual.
I was trying to enable some "standard" fonts, like Andale Mono, and couldn't find any relevant NIxOS package or configuration option.  With a search engine i've found that some people were using fonts.enableCoreFonts, but it was not listed in the Options section of the NixOS manual.  I've spent some time trying to figure out if it was replaced by a different option, then i just tried it and it worked.
Technical details
This is about the online manual for NixOS 17.09.

This is on purpose as the comment in the linked file explains.

Yes, indeed, i didn't noticed that. However i tried this option in the first place because i didn't find corefonts or anything similar with NixOS package search.

Packages that are unfree like corefonts are explicitly hidden from the package search. For more discussion on this topic see #17126.

Thanks, i'll follow that issue.


added enums for direction

added enums to the directions

https://github.com/hexadeciman/Snake/issues/16


Issue with ESP32 Analog Motor Control (using ledcwrite)

I've been trying to get my M5StickC-Plus working with various motor controllers including TB6612FNG / MX1508 and have come across an issue.  They work fine on the M5Stick-C Plus without the M5StickCPlus.h library (and related features) included, but it fails when enabling the M5 library.  In both examples below, the code compiles/downloads fine, but the motor fails to drive in the latter example. I also did some testing using the MX1508 motor driver board and the same issue happened and can re-create this issue using other similar libraries.  Also verified  both motor controller boards are working.  I suspect there is some conflict with setting up ledcwrite related features (e.g. channels? etc)? As there are no errors thrown during compile time, I can't debug the issue.
I've included 2 samples below using the TB6612FNG controller:
Sample 1 WORKS:  No M5 library included and works fine and the motor drives per instruction:
#include <Arduino.h>
#include <TB6612_ESP32.h>
#define AIN1 26
#define AIN2 25
#define PWMA 0
#define STBY NULL   //note STBY connected directly to 5V pulled high (to save a pin)

int counter =0;
const int offsetA = 1;

Motor motor1 = Motor(AIN1, AIN2, PWMA, offsetA, STBY,5000 ,8,1 );
// Initializing motors.  The library will allow you to initialize as many
// motors as you have memory for.  If you are using functions like forward
// that take 2 motors as arguements you can either write new functions or
// call the function more than once.

void setup()
{
  Serial.begin(115200);
  gpio_pulldown_dis(GPIO_NUM_36);  //G36/25 share the same port, so set 36 as floating - https://github.com/m5stack/M5StickC-Plus/blob/master/README.md
  gpio_pullup_dis(GPIO_NUM_36);    // above

}

void loop()
{
  for(int i=0; i<200; i++)
  {
    motor1.drive(-200,5);   //speed + or -, duration in ms
    motor1.brake();
    delay(10);
    counter++;
    Serial.println(counter);
  }
  for(int i=0; i<200; i++)
  {
    motor1.drive(200,5);   //speed + or -, duration in ms
    motor1.brake();
    delay(10);
    counter--;
    Serial.println(counter);
  }
}

Sample 2 DOES NOT WORK: M5 library and a few features enabled.  It compiles and downloads fine, but the motor does not drive.
#include <Arduino.h>
#include <TB6612_ESP32.h>
#include <M5StickCPlus.h>
#define AIN1 26
#define AIN2 25
#define PWMA 0
#define STBY NULL    //note STBY connected directly to 5V pulled high (to save a pin)

int counter =0;
const int offsetA = 1;

Motor motor1 = Motor(AIN1, AIN2, PWMA, offsetA, STBY,5000 ,8,1 );

// Initializing motors.  The library will allow you to initialize as many
// motors as you have memory for.  If you are using functions like forward
// that take 2 motors as arguements you can either write new functions or
// call the function more than once.

void setup()
{
  Serial.begin(115200);
 M5.begin();
  gpio_pulldown_dis(GPIO_NUM_36);  //G36/25 share the same port, so set 36 as floating - https://github.com/m5stack/M5StickC-Plus/blob/master/README.md
  gpio_pullup_dis(GPIO_NUM_36);    // above

}

void loop()
{
  M5.update();

     //Use of the drive function which takes as arguements the speed
     //and optional duration.  A negative speed will cause it to go
     //backwards.  Speed can be from -255 to 255.  Also use of the
     //brake function which takes no arguements.

 if (M5.BtnA.wasPressed())
 {
  for(int i=0; i<200; i++)
  {
    motor1.drive(-200,5);   //speed + or -, duration in ms
    motor1.brake();
    delay(10);
    counter++;
    Serial.println(counter);
  }
  for(int i=0; i<200; i++)
  {
    motor1.drive(200,5);   //speed + or -, duration in ms
    motor1.brake();
    delay(10);
    counter--;
    Serial.println(counter);
  }

 }
}

After some testing, I figured it out.  It seems that the M5StickC Plus library is making use of Channel 0 and 1.  Once the motor is set on Channel 2, it works fine.
Motor motor1 = Motor(AIN1, AIN2, PWMA, offsetA, STBY, 5000 , 8, 2);

After some testing, I figured it out.  It seems that the M5StickC Plus library is making use of Channel 0 and 1.  Once the motor is set on Channel 2, it works fine.
Motor motor1 = Motor(AIN1, AIN2, PWMA, offsetA, STBY, 5000 , 8, 2);


Intro window resize bug

Description
Resizing the window during the game intro causes red background.
How To Reproduce
Steps to reproduce the behaviour:

Start the game by running DesktopLauncher
Click settings, and untick full screen.
Click exit, then click start.
During the intro, resize the game window and observe the bug.

Expected Behaviour
The intro should resize with the window.
Screenshots

Temporary Fix
Start and run the game only in fullscreen.

Fixed and pushed to story team's branch.

I did fix it, it was working on story team's branch story1, but they've merged a different branch to main.


[BUG] Dataset doesn't tell the user that it's downloading an MLCube

During dataset submission, we need to download the data preparation MLCube to make sure it can be executed correctly. While this is happening, we're not letting the user know, and instead we're leaving a blank stdout which might worry the user and make him think the command stalled.
Printing some useful information to the user using the interactive display could be useful

https://github.com/mlcommons/medperf/pull/524

Another approach with printing via UI instead of writing mlcube logs directly to stdout:
https://github.com/mlcommons/medperf/pull/541

An improvement to hide exaustive docker cli hints from docker output: https://github.com/mlcommons/medperf/pull/546


Preparation for transaction sequence testing. (Part 2)

Issue Number
ADP-1538
Summary
This PR adds some more elementary building blocks for generating sequences of transactions, including:

selectUTxOEntries :: UTxO -> Int -> Gen ([(TxIn, TxOut)], UTxO)

Behaviour:
Selects up to a given number of entries at random from the given UTxO set.
Purpose:
When generating a transaction, selecting UTxO entries to act as inputs.

genTokenBundlePartition :: TokenBundle -> Int -> Gen (NonEmpty TokenBundle)

Behaviour:
Partitions a token bundle randomly into a given number of parts.
Purpose:
When generating a transaction, redistributing the value of selected inputs (UTxO entries) to one or more outputs.

bors r+


playgroundxyz adapter documentation update

This change informs users of the playgroundxyz adapter to use the aliased name pxyz, avoiding complications with DFP character limits

@monofonik - Unfortunately this isn't going to work the way you want it to.
The Download system assumes that the biddercode maps to the actual module filename. So setting bidderCode=pxyz, it will try to find a module called pxyzBidAdapter. We can use an aliasCode to do the right thing, but would like to confirm the desired outcome here
What do you want to appear in http://prebid.org/dev-docs/bidders.html#playgroundxyz ?  I'm guessing you want to have Playground XYZ, but show the biddercode pxyz.
We don't currently allow a bidder code 'override' - the standard way to do this is to create a new file pxyz. While it's not unreasonable to support an override so you can have the best of both worlds, there is a drawback, and that's the installed base.
If we change to the shorter biddercode, anyone who has the longer biddercode will no longer have the DFP targeting variables. If that's ok, I'll go ahead and add a 'bidderCodeDisplay' override.

@monofonik - is this still of interest?

Hi @bretg sorry I missed your reply back in March... so if I understand you correctly, implementing the "bidder code override" you've suggested would potentially disrupt existing publishers who've correctly implemented the truncated "playgroundxyz" targeting variables (when they eventually update their Prebid adapter version)?
If this is the case then I think we'll just stick with the status quo. Let me know if I've misunderstood.
Cheers

I've added a feature to the doc site to make it possible to prefer a shorter bidder code like this. However, because this PR is so old, I'm going to close it, will open another and provide a screenshot of what the page will look like so you can approve.


[Game Crash] Crash occurs every time a song is opened in the Editor

Describe the crash
I'm not quite sure why this crash is happening, but every time I try to open a song to edit in the Editor, the game pauses for a little bit and then instantly crashes. It doesn't matter what mode or what style the game is in, or what kind of chart you edit, or whether it's new or already existing: it just CRASHES.
I have no certain idea WHY this might be happening, but I did see something weird consistently happen across ALL the crash info reports:

Sound "/Appearance/Themes/_fallback/Sounds/_missing.ogg" has a start time 0.000002 seconds in the past

Perhaps the crash could be related to a sound starting 2 microseconds in the past, but honestly, I don't really know if this is even the case. All I know is that it's baffling me and that it's preventing me from editing ANY songs in the Editor.
crashinfo.txt
log.txt
How can you reproduce the error?

Start the game
Go to Edit Charts
Select the first menu option
Pick a song. Any song.
Choose to edit an already-existing chart OR make a new one. It doesn't matter what mode you use here.
The game waits for a second and then suddenly crashes. (I know this sounds generic, and I don't know whether this has to do with a sound playing in the past or not, but this is how I got the game to crash every time after I updated to the hotfix.)

Screenshots/Videos
No response
Game Mode
No response
Additional Information
No response

I have found that in most cases, I can load a song for the first time, but if I "revert from disk" once or twice it crashes.  The examples where I have had this happen are songs which have only .sm files to read.


Code signing issue with generate-docs.sh

generate-docs.sh is being included in the framework bundle.
This causes a failed validation when preparing for an app store upload.
is generate-docs.sh really needed int the bundle?

I'll create a point release (hopefully later today) that includes your fix. Thank you!


Add the docker-compose snap

This change is

Reviewed 3 of 3 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable

Comments from Reviewable


One more time: Revert "Merge pull request #289 from apple/revert-283-module-dep-graph-10-1b"

I am not sure what happened to https://github.com/apple/swift-driver/pull/290
It seems to be in a bad state where it got merged but the changes it contained disappeared.

@swift-ci please test


Fix GitHub token config update

When the github token config is updated, the token used by policy-service-compliance is not updated. This PR fixes this issue.

We should really avoid using stored state for this (or anything else if possible). Is there some other way we can determine if the token has changed by inspecting the live state of the service, for instance?

I think this is planned as a part of the charm review and refactor.


:// to use command name for scheme

Checklist

[x] I've searched for similar feature requests.

Enhancement request
:// for use command name for scheme, like this:
http ://example.com
--> http://example.com
https ://example.com
 --> https://example.com

Problem it solves
This will make requesting from clipboard more easy, it's just putting space.

Additional information, screenshots, or code examples
…

@sevenc-nanashi thanks for the suggestion — implemented in master 🎉


Add CentOS Stream 9 workers and builders

Merged, thank you ;-)

test_json and test_lib2to3 started to crash on s390x Fedora Clang 3.x buildbot: https://bugs.python.org/issue46542
Can it be related to this change?


fix: scoped package proxy

Type: bug
The following has been addressed in the PR:

There is a related issue? https://github.com/verdaccio/verdaccio/issues/1263
Unit or Functional tests are included in the PR: Not yet.

I had a hard time making a failing functional test for this. Some of this seems dependent on npm client behavior.
Description:
Resolves https://github.com/verdaccio/verdaccio/issues/1263
I'm not sure if this is the best way to fix this problem but this was the most straightforward.

I'll run some test and I let you know my outcome. 👍

In my tests, this PR creates another issue, Error: ENOENT: no such file or directory, open , the file cannot be written.
What bugs me, is the test do not fails. This will take a while as research.
➜ verdaccio
 warn --- config file  - /Users/user/.config/verdaccio/config.yaml
 warn --- Plugin successfully loaded: verdaccio-htpasswd
 warn --- Plugin successfully loaded: verdaccio-audit
 warn --- http address - http://localhost:4873/ - verdaccio/4.1.0-pr-1382
 info <-- <IP_ADDRESS> requested 'GET /@juan%2ftest'
 trace--- api middleware using JWT auth token
 trace--- allow access for @juan/test
 trace--- allowed access for @juan/test
 info --> making request: 'GET https://npm.fury.io/{OFFUSCATED}/@juan%2Ftest'
 http --> 200, req: 'GET https://npm.fury.io/{OFFUSCATED}/@juan%2Ftest' (streaming)
 http --> 200, req: 'GET https://npm.fury.io/{OFFUSCATED}/@juan%2Ftest', bytes: 0/1427
 debug-=- updating package @juan/test info
 http <-- 200, user: user(<IP_ADDRESS>), req: 'GET /@juan%2ftest', bytes: 0/568
 info <-- <IP_ADDRESS> requested 'GET<EMAIL_ADDRESS> trace--- api middleware using JWT auth token
 trace--- allow access for @juan/test
 trace--- allowed access for @juan/test
 warn --- error saving file { url:
   'https://npm.fury.io/{OFFUSCATED}/~/d/%40juan%2Ftest/%40juan%2Ftest-10.0.6',
  sha: '67f8f383aa354d135cf9b1bac03e07977fe14b33',
  registry: 'private' }: ENOENT: no such file or directory, open '/Users/user/.local/share/verdaccio/storage_empty/<EMAIL_ADDRESS>Error: ENOENT: no such file or directory, open '/Users/user/.local/share/verdaccio/storage_empty/<EMAIL_ADDRESS> info --> making request: 'GET https://npm.fury.io/{OFFUSCATED}/~/d/%40juan%2Ftest/%40juan%2Ftest-10.0.6'
 http <-- 200, user: user(<IP_ADDRESS>), req: 'GET<EMAIL_ADDRESS>bytes: 0/1275
 info <-- <IP_ADDRESS> requested 'POST /-/npm/v1/security/audits/quick'
 http <-- 200, user: null(<IP_ADDRESS>), req: 'POST /-/npm/v1/security/audits/quick', bytes: 221/145

I'm closing this, is too old, if you consider keeping working on this, please open a new PR.


feat(DataSpreadsheet): add initial component

Contributes to #1474
This adds the initial DataSpreadsheet component. The first version is a read only without any of the interactions, with the incorporation of react-table similar to the WKC data table that will be contributed to our library (allowing us to more easily virtualize the rows). I added two stories, a basic and another with 1000 rows.

What did you change?
packages/cloud-cognitive/package.json
packages/cloud-cognitive/src/components/DataSpreadsheet/DataSpreadsheet.js
packages/cloud-cognitive/src/components/DataSpreadsheet/DataSpreadsheet.mdx
packages/cloud-cognitive/src/components/DataSpreadsheet/DataSpreadsheet.stories.js
packages/cloud-cognitive/src/components/DataSpreadsheet/DataSpreadsheet.test.js
packages/cloud-cognitive/src/components/DataSpreadsheet/_data-spreadsheet.scss
packages/cloud-cognitive/src/components/DataSpreadsheet/_index.scss
packages/cloud-cognitive/src/components/DataSpreadsheet/_storybook-styles.scss
packages/cloud-cognitive/src/components/DataSpreadsheet/generateData.js
packages/cloud-cognitive/src/components/DataSpreadsheet/index.js
packages/cloud-cognitive/src/components/_index.scss
packages/cloud-cognitive/src/components/index.js
packages/cloud-cognitive/src/global/js/package-settings.js
packages/cloud-cognitive/src/global/js/utils/getScrollbarWidth.js
packages/core/story-structure.js
yarn.lock

How did you test and verify your work?
Storybook and ran tests

Yes I absolute agree with @dcwarwick about us being cautious of the dependencies we add. @davidmenendez these dependencies are required by the new data table that the WKC team is contributing, so we can double check with them.

have you verified that we're ok to use react-table

@matthewgallo I've remembered that we have a checklist for adding new production dependencies. We'd need to do this for both react-table and react-window, if we will definitely need both of those.

Review of dependencies

[X] Verify the dependency has previously been pedigree reviewed

[X] Verify the dependency doesn't contain any vulnerabilities (**Ran yarn audit and no vulnerabilities were produced from either of the two packages, however we do have some vulnerabilities coming from stylelint-config-carbon and jest-config-ibm-cloud-cognitive)

[X] Verify the dependency bundle size is acceptable, bundle size comparison of the two packages as compared to carbon-components and carbon-components-react

[X] Verify the dependency is actively maintained, screenshots from npmtrends showing uptrend usage over the past 2 years

[X] Verify license conditions are met e.g. forwarding of copyright if necessary (both packages use MIT licensing).


Specialize the class and div names to avoid clashes when used with other projects

Hi,
Love your work on simple weather. I modified it to specialize the class and div names to avoid clashes with other elements with the same class.  Modified the CSS slightly so it adjusts for multiple weather divs on the same page. I also created a function to easily call the weather function for multiple divs.
You can find the modified main .html file here: SimpleWeather.html
All credits to you.

Nice! It is intended that you use your own classes, divs, and CSS. simpleWeather includes none of that by default. What is shown are just example demos that I worked up; none of the HTML, CSS, or class names are required from them.


feat: Ionic serve cordova plugins browser support

From @zabojnik on May 19, 2016 8:19
Type: feat
Ionic Version: 2.x
Platform: desktop browser
Ionic serve is an astonishing way for a rapid app development. But its benefits are seriously limited when relying on cordova plugins which do have browser support (e.g. facebook login, google maps) since it doesn't inject cordova. If Ionic serve were to support browser enabled cordova plugins, it would speed up development in many cases tremendously. Thanks for consideration!

Copied from original issue: driftyco/ionic#6576

Hello! Thanks for opening an issue with us! As this issue is more related to the cli than the framework i will be moving this issue over to that repo. Thanks for using ionic!

Any solution with this?

@braianj doesn't look like it, but try running ionic platform add browser and ionic run browser for a non-live-reloading method.

This issue has been automatically closed because it had the v2 label. Please install the new CLI v3 (npm install -g ionic@latest). See CHANGELOG.md#Upgrading from CLI v2 for details.
If this issue is still a problem in CLI v3, please create a new issue. Thank you!


epic: Cortex Updater can migrate data structure changes

Goal

Cortex will need to be able to handle data structure migrations
#1154
#1116
Handles: https://github.com/janhq/cortex-internal/issues/15#issuecomment-2459073710
Scope

Migrate cortex.db between versions
Cortex Data Folder
up/down migrations
Make filesystem changes if needed

Scope

Should only cover #1115  (i.e. model folder, model.yaml, .cortexrc)
Jan should call Cortex's migrator during updates

Discussion

Adapter for DB layer
Down migration - additional considerations?

Recovery (restore column vs restore data)

Success Criteria:

Successful upgrade and db migration from 1.0.2 to 1.0.X (when /model/sources is merged)

Tasklist

[ ] ?

Some thoughts on data migration:

Database Migration Strategy

Versioning: Create a table within SQLite database to track the current schema version. This table will have a single row containing the version number

CREATE TABLE IF NOT EXISTS schema_version (
    version INTEGER NOT NULL
);

Migration Scripts:

Can create sql scripts for migration by version. These scripts can be executed after run cortex update. Not sure if we can run sql scripts by postscript cc: @hiento09
Pros: directly writing SQL scripts for migrations is straightforward and gives us full control over the SQL commands executed during migrations.
Cons: must manually organize, track, and apply scripts, which can become cumbersome as the number of migrations grows

Migration Framework:

Develop a C++ component that reads the current schema version from the database and applies the necessary migration scripts to reach the target version.
Pros: provide a consistent approach to managing migrations across different environments
Cons: not easy to implement

Data Preservation Techniques

Data Migration: Before dropping any columns or tables, migrate the existing data to a safe location (e.g., a backup table or external storage) so it can be restored if needed.
Column Preservation: Instead of dropping columns, consider marking them as deprecated or renaming them.

Question: should we use migration scripts or implement a C++ database migration component?
2. Cortex data structure
Similar to database migration, we can use a script to rearrange data to new data structure.
Note: We store yml file path in database, so if model structure changes, we also need to update the models' database
What do you think? @dan-homebrew @janhq/cortex

@vansangpfiev
Up/Down Migrations

I think we should explore something similar to RoR ActiveRecord
Each major version has an up/down migration (SQL migration script and and folder/file structure changes)
My sense is that handling this imperatively is easier for now, and we can figure out a more complicated declarative method later on
https://guides.rubyonrails.org/active_record_migrations.html#using-the-up-down-methods

/migrations
    1.0.2.cpp
    1.0.3.cpp

Database migration strategy

I think SQL migration scripts make most sense
Data Preservation: I think marking columns as deprecated is ok (for now)

Cortex Data Structure

We likely need to design for both local running and cloud deployment. Adding a code constraint would block our migration from the deployment layer, which likely waits for an instance to spin up and perform a health check, which is inefficient. There could also be a scenario where we want to share the database instance across services like cortex.py and cortex.cpp.
However, one advantage is that they can embed cortex.cpp as a standalone binary without having to worry about other services, which is particularly useful when embedding into Jan.
I’d prefer built-in migrations as suggested above for cortex.cpp to ensure embedding in Jan won’t cause issues.

We will use SQL scripts for up/down migrations, try to minimize changes between versions to ensure smooth transitions. For complex down migrations, we will create a PR to address any issues.

Script Execution: Migrations will run when the server starts for the first time (to support Jan use case)
Folder Structure Changes: Ideally managed via scripts, but may require code adjustments.
Version Management: We will only guarantee up/down migrations between versions.

Structure
cortexcpp
    |__ models/
    |__ engines/
    |__migrations/
           |__ v1/
           |    |__ v1.sql
           |    |__ data_structure_v1.sh
           |__ v2/
                |__ v2.sql
                |__ data_structure_v2.sh

cc: @dan-homebrew @hiento09 @janhq/cortex

@vansangpfiev Our discussion:

We will have a pure C++ updater

Remote .sql and .sh scripts may represent a security/backdoor risk in future
We will trade off flexibility (e.g. hotfixing) for verifiability

We will align Version for data structures and Cortex

Simplify
Most migrations will be empty (i.e. empty up/down)

cortexcpp
    |__ models/
    |__ engines/
    |__ migrations/
           |__ v1.0.2.cpp
           |__ v1.0.3.cpp

Oops. This wouldn’t work for nightly migration support or switching between commits.

Hmm, can we solve this via a heuristic?
Nightly

Can we use down and up in migrator to handle this case?

e.g. Updater for nightly runs down and then up

Otherwise, I think this is an edge case and we should trigger migrations manually for nightly

For nightly, we trigger migrations manually
e.g. cortex migrations run 1.0.3

Switching between commits

Same as Nightly

@dan-homebrew  IMO, It is necessary to distinguish between the data version and the software version. Since all migration actions occur within the software, the application may not know its current version during modifications (can be stable, beta, nightly, etc).
To ensure clarity and consistency, we can increment the data version each time a change is made. In the event of a conflict, we will revert to the previous version of the data. This separation allows for more effective management of both software and data changes, enhancing stability and reliability throughout the migration process.

@dan-homebrew IMO, It is necessary to distinguish between the data version and the software version. Since all migration actions occur within the software, the application may not know its current version during modifications (can be stable, beta, nightly, etc).
To ensure clarity and consistency, we can increment the data version each time a change is made. In the event of a conflict, we will revert to the previous version of the data. This separation allows for more effective management of both software and data changes, enhancing stability and reliability throughout the migration process.

I agree with you @vansangpfiev; software/release/app versioning is a separate aspect, more related to business/product management than engineering
We have source code versioning with Git commits. In today's practices, the relationship between source code versioning and data/migration versioning is one-to-one, as migration files or entity/model files are part of the code.
If we separate migration/data code versioning from source code versioning (Git commit), we would still need a mechanism to map it back. The migration/data for a specific Git commit should be deterministic—one and only one possibility.

Expected result:

Migration happens at server start
No change for model structure for v1.0.5
Cortex creates new tables if they do not exist: models, engines, hardware.
Migrate all data to new database schema version.

[x] Migration when server start

remove table hardwares on update

@TC117 Please close this ticket when completed


ros - kinetic failed to catkin_make

hello !
help me please . you had tested in ros-kinetic? it can't catkin_make successfully!!!!

@josephduchesne

/Test/src/flatland-master/flatland_server/thirdparty/Box2D/Dynamics/Joints/b2MouseJoint.cpp:54:13: error: no match for ‘operator!=’ (operand types are ‘const b2Vec2’ and ‘b2Vec2’)
if (target != m_targetA)
^
flatland-master/flatland_server/thirdparty/Box2D/CMakeFiles/flatland_Box2D.dir/build.make:127: recipe for target 'flatland-master/flatland_server/thirdparty/Box2D/CMakeFiles/flatland_Box2D.dir/Dynamics/Joints/b2MouseJoint.cpp.o' failed
make[2]: *** [flatland-master/flatland_server/thirdparty/Box2D/CMakeFiles/flatland_Box2D.dir/Dynamics/Joints/b2MouseJoint.cpp.o] Error 1

Test/src/flatland-master/flatland_server/thirdparty/Box2D/Dynamics/Joints/b2MouseJoint.cpp:54:13: error: no match for ‘operator!=’ (operand types are ‘const b2Vec2’ and ‘b2Vec2’)
if (target != m_targetA)
^
flatland-master/flatland_server/thirdparty/Box2D/CMakeFiles/flatland_Box2D.dir/build.make:127: recipe for target 'flatland-master/flatland_server/thirdparty/Box2D/CMakeFiles/flatland_Box2D.dir/Dynamics/Joints/b2MouseJoint.cpp.o' failed
make[2]: *** [flatland-master/flatland_server/thirdparty/Box2D/CMakeFiles/flatland_Box2D.dir/Dynamics/Joints/b2MouseJoint.cpp.o] Error 1

/home/hantewin/Test/src/flatland-master/flatland_server/thirdparty/Box2D/Dynamics/Joints/b2WheelJoint.cpp:363:45: error: no ‘float32 b2WheelJoint::GetJointLinearSpeed() const’ member function declared in class ‘b2WheelJoint’
float32 b2WheelJoint::GetJointLinearSpeed() const
^
/home/hantewin/Test/src/flatland-master/flatland_server/thirdparty/Box2D/Dynamics/Joints/b2WheelJoint.cpp:384:39: error: no ‘float32 b2WheelJoint::GetJointAngle() const’ member function declared in class ‘b2WheelJoint’
float32 b2WheelJoint::GetJointAngle() const
^
/home/hantewin/Test/src/flatland-master/flatland_server/thirdparty/Box2D/Dynamics/Joints/b2WheelJoint.cpp:391:46: error: no ‘float32 b2WheelJoint::GetJointAngularSpeed() const’ member function declared in class ‘b2WheelJoint’
float32 b2WheelJoint::GetJointAngularSpeed() const
^

Hi @Bkarso, I'm taking a quick look into this now. The last time I checked it worked, although I believe we're using catkin build rather than catkin_make.

I've tried to replicate this in a ros-kinetic docker container, but the build completes successfully for me (fairly fresh install):
Docker command: (using the osrf xenial container)
docker run --rm -it --privileged --net=host --ipc=host -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -v $HOME/.Xauthority:/home/$(id -un)/.Xauthority -e XAUTHORITY=/home/$(id -un)/.Xauthority -e DOCKER_USER_NAME=$(id -un) -e DOCKER_USER_ID=$(id -u) -e DOCKER_USER_GROUP_NAME=$(id -gn) -e DOCKER_USER_GROUP_ID=$(id -g) -e ROS_IP=<IP_ADDRESS> ros:kinetic-ros-base-xenial

(note: --rm will delete the container when you close it, which is great for testing, but not so great for work)
Inside the container:
mkdir flatland_ws_xenial
mkdir src
cd src/
git clone https://github.com/avidbots/flatland.git
rosdep init
rosdep update --rosdistro=kinetic
cd ../
rosdep install --from-paths src --ignore-src -r -y
catkin_make

Can you provide any additional information about your OS and compiler version?
The output from the following command should be  enough:
cat /etc/issue; gcc -v

root@root-System-Product-Name:~$ cat /etc/issue; gcc -v 2>&1 | tail -n 1Ubuntu 16.04.7 LTS \n \l
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12)


Support HTTP proxy instead

Why is Whatsapp not supporting regular HTTP(S) proxies with Authentication??
Running HAProxy should be the last option because:

HAProxy doesn't support Authentication > HTTP proxies do.
Using HTTPS proxy increases the security of Meta itself, Attackers may use these proxies which are publicly available without any kind of authentication.
HAProxy doesn't re-encrypt traffic therefore the censorship systems easily detect it > You cant set TLS encryption on your HTTP proxy and use HTTPS proxy so the traffic can't be detected
There are many running HTTP(S) proxies out there and you don't need to run a new one for yourself, but in case you want, It's verrrrrrry easy.

My recommendation is to add HTTPS proxy with authentication support to WhatsApp instead of this.
If you want to implement HTTPS proxy support in the WhatsApp application (please do so), it's important to implement it in the correct way and don't forget to implement simple important things like SNI, auth headers, and ..., just stick to RFC.
The reason I write this issue is:

The censorship systems block every proxy very fast
There is no authentication on my proxy, it's using my resources and I have no control over it.

Another option is to support SOCKS5+TLS+Authetication
This solution has the same benefits but uses a different protocol
There are some important facts about censorship systems (that people who live in the open world can't understand) and it's the importance of TLS re-encrypt and Authentication.

If you want to bypass the censorship system, you should have TLS re-encrypt: You should re-encrypt your encrypted data because if you don't, it will be detected and the system will drop your packets and block your server in very first packets.
Your Proxy/VPN should have authentication, If a Proxy/VPN exposes to public usage, it will be blocked very fast. by very fast I mean in a couple of minutes

good idea
It’s said that the Russian Gov can now figure out to whom you send messages by analyzing metadata. HTTPS proxy (with proper auth) would be a great solution


ArgumentNullException: HttpContext

When I first start debugging a project using IIS Express I get an ArgumentNullException in StructureMapDependencyScope.HttpContext, as System.Web.HttpContext.Current is null.
I'm not sure, but this might be because I'm trying to resolve dependencies in Application_Start for use in authorisation filters by calling DependencyResolver.Current.GetService<> - maybe this is too early for the HttpContext to exist?
In any case, it means that StructureMap is not created HTTP-scoped instances; I can end up with multiple instances of my DbContext, for example, despite the fact it should be HTTP-scoped.

@txavier's changes solve the issue for me at least. Thanks txavier!

Hi,
I'm having an exception when StructureMapDependencyScope.Dispose() is called from the ApplicationShutdownMethod (ASP.NET MVC 5). The problem is related to this discussion because the exception is being thrown in the HttpContext property of the StructureMapDependencyScope class. I've solved it changing slightly the code:
private HttpContextBase HttpContext {
    get {
        return (System.Web.HttpContext.Current == null
            ? null
            : (Container.TryGetInstance<HttpContextBase>() ??
                new HttpContextWrapper(System.Web.HttpContext.Current)));
    }
}

Is this code correct? Do you want me to make a PR?
Thanks in advance,

I'm also having the same problem.

I'm also having the same problem.

Hi,
I created a pull request to fix this problem. You can see it here:
https://github.com/webadvanced/Structuremap.MVC5/pull/9
Cheers,
Vicenç

Still,in package manager control,it is not handled https://www.nuget.org/packages/StructureMap.MVC5/

Still an issue.

I am dealing with the same issue, seems like its related to usage of async pattern & when there is something significant to process (which will put this thread back into pool) and the continuation is on another thread at this point HttoContext.Current is null. Suggested fix is to have  more explaination here https://blogs.msdn.microsoft.com/webdev/2012/11/19/all-about-httpruntime-targetframework/

What's the status of this issue ? I also have the problem. E.g. when you recycle the project, the exception is thrown. Is the suggested solution from txavier the right solution ? Or is there a reason why this is not commited to the main trunk ?

Same issue here


ssl->out_left in handling ssl_write_real

Sorry I am currently exploring which TLS server/client library to use and was just browsing the code to understand if the system can be operated genuinely non-blocking/etc.
In ssl_write_real I see this part of the code. To me it looks like:

If ssl->out_left != 0
And mbedtls_ssl_flush_output succeeds (all data written, ctr doesn't wrap)

The method will return len without anything being queued for writing? Am I wrong?
    if( ssl->out_left != 0 )
    {
        if( ( ret = mbedtls_ssl_flush_output( ssl ) ) != 0 )
        {
            MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_flush_output", ret );
            return( ret );
        }
    }
    else
    {
        ssl->out_msglen  = len;
        ssl->out_msgtype = MBEDTLS_SSL_MSG_APPLICATION_DATA;
        memcpy( ssl->out_msg, buf, len );

        if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 )
        {
            MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret );
            return( ret );
        }
    }

    return( (int) len );

That seems curious indeed.
On initial inspection I would assume a len = 0 on success would be appropriate there.

ARM Internal Ref: IOTSSL-948

I don't think you are wrong @zecke . But I think it is the intended behaviour. Namely it will return MBEDTLS_ERR_SSL_WANT_WRITE while there is any data being queued for writing. Whenever mbedtls_ssl_flush_output returns with 0 then all data is already written.
The return value is still correct because it doesn't reflect the number of byte queued, but the total number of bytes written.
You can find a detailed description of this behaviour in the doxygen documentation.

Okay, you are right.
When this function returns MBEDTLS_ERR_SSL_WANT_WRITE/READ, it must be called later with the same arguments, until it returns a positive value.

in GNUtls it says call it with NULL, 0 to make it more clear that it is about flushing the buffer. For an implementer that uses non blocking sockets both of your notes must be followed. for > 0 returns i need to remember how much was consumed and for < 0 need to call with same arguments. Maybe you can remove the warning as it can't happen right now?

Sorry, which warning do you mean?

Warning
This function will do partial writes in some cases. If the return value is non-negative but less than length, the function must be called again with updated arguments: buf + ret, len - ret (if ret is the return value) until it returns a value equal to the last 'len' argument.

For non blocking cases as an API user it would be easier to consider one abnormal case instead of mixing the two. After a brief look I don't think   ret > 0 && ret < len will occur (for -EWOULDBLOCK/-EAGAIN MBEDTLS_ERR_SSL_WANT_WRITE seems to be returned besides some data having been written in a previous run of the do {} while)

You are right, that case won't occur in ssl_write_real. But it is only a static function for inner use and it is not exposed directly. The API user can only call mbedtls_ssl_write, which besides being a public wrapper for ssl_write_real, handles the fragmentation of the message if necessary.
Therefore

If the requested length is greater than the maximum fragment length (either the built-in limit or the  one set or negotiated with the peer), then:
with TLS, less bytes than requested are written.

Okay


Authorization header not added for API calls

During ApiClient initialization two authentications are created: basic and oauth2. One can initialize basic auth by providing username and password. Both authentications are ignored during API call method execution, except for introspectOAuth2Token.
For example: I have created ApiClient and AdminApi instances and provided username and password for basic auth. My Hydra is running behind an Nginx server, which provides basic auth. I want to get a token, so I call getOAuth2Client(TOKEN_ID). From this method the call eventually reaches getOAuth2ClientCall where an localVarAuthNames variable is initialized as an empty array. This in turn causes prompt loop exit in updateParamsForAuth (called in buildRequest), which should add the "Authorization" header to the request.
It seems to me that this is a bug, since all the mechanisms are in place to configure basic auth in the calls towards hydra (ApiClient initialization, HttpBasicAuth.applyToParams, etc.). The problem is that the localVarAuthNames is hard coded initialized to an empty array, and this variable controls further flow.
Since Java code is generated, please let me know if I should create issue in the Hydra github repo.

I guess this is a dupe of https://github.com/ory/sdk/issues/18

I have secured Hydra Admin API with Nginx and basic authentication.
And I'm trying to set basic authentication for sh.ory.hydra.ApiClient and use it for AdminApi (sh.ory.hydra.api)
I have created ApiClient and set username and password for that
It look that it is not used during calls to the Hydra Admin API
Can you suggest how to configure ApiClient to use basic authentication

I have secured Hydra Admin API with Nginx and basic authentication.
And I'm trying to set basic authentication for sh.ory.hydra.ApiClient and use it for AdminApi (sh.ory.hydra.api)
I have created ApiClient and set username and password for that
It look that it is not used during calls to the Hydra Admin API
Can you suggest how to configure ApiClient to use basic authentication

I'm not a Java expert so I don't really know unfortunately. Is there not an option to set this in a config or something?

I'm not a Java expert so I don't really know unfortunately. Is there not an option to set this in a config or something?


Corrected test stub example

As currently written, the sample stub doesn't work when testing in rails for geocode callbacks.
The stub should return separate 'latitude' and 'longitude' attributes, instead of 'coordinates'.

Please see #1258.

@alexreisner Since the fix won't actually be available until 1.5, would it make sense to merge this to master now and revert it in the 1.5 branch. I thought I was loosing my mind trying to troubleshoot my test suite.

@marshallds sorry for the delay. I'm actually working on the 1.5 release right now. Should hopefully be out this week.

@marshallds just released 1.5.0.