Carbon Aware CLI redesign

Issue Number: 583
Summary
Implement initial design patterns for new CLI
Checklist

[ ] Local Tests Passing?
[ ] CICD and Pipeline Tests Passing?
[ ] Added any new Tests?
[ ] Documentation Updates Made?
[ ] Are there any API Changes? If yes, please describe below.
[ ] This is not a breaking change. If it is, please describe it below.

Are there API Changes?
If yes, what are the expected API Changes? Please link to an API-Comparison workflow with the API Diff.
Is this a breaking change?
If yes, what workflow does this break?
Anything else?
Other comments, collaborators, etc.
This PR Closes Issue #

Codecov Report

Merging #139 (5f73f75) into dev (6696b8c) will decrease coverage by 5.27%.
The diff coverage is 0.62%.

@@            Coverage Diff             @@
##              dev     #139      +/-   ##
==========================================
- Coverage   82.05%   76.78%   -5.28%
==========================================
  Files          53       57       +4
  Lines        1700     1710      +10
  Branches      196      196
==========================================
- Hits         1395     1313      -82
- Misses        252      346      +94
+ Partials       53       51       -2

Impacted Files
Coverage Δ

src/CarbonAware.CLI/src/Program.cs
0.00% <0.00%> (ø)

...are.CLI/src/commands/emissions/EmissionsCommand.cs
0.00% <0.00%> (ø)

.../commands/emissions/LocalizableStrings.Designer.cs
0.00% <0.00%> (ø)

...src/commands/emissions/observed/ObservedCommand.cs
0.00% <0.00%> (ø)

...LI/src/common/CommonLocalizableStrings.Designer.cs
0.00% <0.00%> (ø)

src/CarbonAware.CLI/src/common/CommonOptions.cs
0.00% <0.00%> (ø)

...bonAware.CLI/src/extensions/AnsiColorExtensions.cs
0.00% <0.00%> (ø)

...CLI/src/extensions/CommandLineBuilderExtensions.cs
0.00% <0.00%> (ø)

...s/src/Configuration/ServiceCollectionExtensions.cs
100.00% <100.00%> (ø)

When adding a start time, the output continues to give a value that is earlier than the time given. For example: .\caw.exe emissions -l eastus -s 2022-09-07T12:45:11+00:00 -e 2022-09-07T13:45:11+00:00
Gives the output of : [{"Location":"eastus","Time":"2022-09-07T04:45:11+00:00","Rating":54,"Duration":"08:00:00"},{"Location":"eastus","Time":"2022-09-07T12:45:11+00:00","Rating":60,"Duration":"08:00:00"}]
This is also happening for: .\caw.exe emissions -l eastus -s 2022-09-07T12:45:11+00:00

@esgraham I tried the same input on the web and get the same results. It has to do with the TimeSpan value specified in the date. If you try the same without the TimeSpan (2022-09-07T12:45:11), it returns the right result set.

When adding a start time, the output continues to give a value that is earlier than the time given. For example: .\caw.exe emissions -l eastus -s 2022-09-07T12:45:11+00:00 -e 2022-09-07T13:45:11+00:00
Gives the output of : [{"Location":"eastus","Time":"2022-09-07T04:45:11+00:00","Rating":54,"Duration":"08:00:00"},{"Location":"eastus","Time":"2022-09-07T12:45:11+00:00","Rating":60,"Duration":"08:00:00"}]
This is also happening for: .\caw.exe emissions -l eastus -s 2022-09-07T12:45:11+00:00

@esgraham I tried the same input on the web and get the same results. It has to do with the TimeSpan value specified in the date. If you try the same without the TimeSpan (2022-09-07T12:45:11), it returns the right result set.

@esgraham If this is not the expected result we should file a bug, because that is the aggregator implementation, unrelated to the CLI or the WebAPI specifically.  I don't think that should block this PR

When adding a start time, the output continues to give a value that is earlier than the time given. For example: .\caw.exe emissions -l eastus -s 2022-09-07T12:45:11+00:00 -e 2022-09-07T13:45:11+00:00
Gives the output of : [{"Location":"eastus","Time":"2022-09-07T04:45:11+00:00","Rating":54,"Duration":"08:00:00"},{"Location":"eastus","Time":"2022-09-07T12:45:11+00:00","Rating":60,"Duration":"08:00:00"}]
This is also happening for: .\caw.exe emissions -l eastus -s 2022-09-07T12:45:11+00:00

Bug #615 was added.


[Improvement-4573][UI] Adds prompt message to DAG page button

What is the purpose of the pull request
this PR close #4573
Adds prompt message to DAG page button

Verify this pull request
This change added tests and can be verified as follows:

Manually verified the change by testing locally.

Please delete the data-container attribute

Please delete the data-container attribute

@break60 done.

@break60 done.


[5.4] fix date validator

I am not good at explaining the issues as it creates a lot of confusion explaining in sentences to me. I have attached tinker examples below which should explain the issue i guess. I am not sure if the current behavior is expected and is not a bug.  check_date returns true as the result returned from the date_parse function is different.
>>> $date = date_parse('22/12/1990')
=> [
     "year" => 1990,
     "month" => 2,
     "day" => 12,
     "hour" => false,
     "minute" => false,
     "second" => false,
     "fraction" => false,
     "warning_count" => 0,
     "warnings" => [],
     "error_count" => 1,
     "errors" => [
       "Unexpected character",
     ],
     "is_localtime" => false,
   ]
>>> strtotime('22/12/1990')
=> false
>>> new DateTime('22/12/1990')
Exception with message 'DateTime::__construct(): Failed to parse time string (22/12/1990) at position 0 (2): Unexpected character'
>>> Carbon::parse('22/12/1990')
Exception with message 'DateTime::__construct(): Failed to parse time string (22/12/1990) at position 0 (2): Unexpected character'
>>> checkdate($date['month'], $date['day'], $date['year'])
=> true
// after changing the dateformat it works
>>> Carbon::parse('12/22/1990')
=> Carbon\Carbon {#1642
     +"date": "1990-12-22 00:00:00.000000",
     +"timezone_type": 3,
     +"timezone": "UTC",
   }
>>>

Hey @gcamrit your test passes without any change in /src, so I believe this change is useless.
Also date_parse and new \Datetime try to "guess" the format of the dates; in this case just use the date in the American notation (MM/DD/YYYY) and this will pass.
Or else, the better is still to validate with date format : https://laravel.com/docs/5.4/validation#rule-date-format

@lucasmichot  no it's not passing without changing validateDate method.

@gcamrit - it does not change anything ;-)
See  https://github.com/laravel/framework/pull/19680 & https://travis-ci.org/laravel/framework/builds/244611735

Not passing and i have installed php on ubuntu 16.04 (aws) not working there too

Super strange @gcamrit

@lucasmichot strtotime check before date_parse should have returned false.

Closing it as not sure what is going on. Thanks @lucasmichot

You're welcome @gcamrit


Cannot find module node_abi-platform-arch

After a fresh install of @mapbox/mbtiles package and with just the import statement  var MBTiles = require('@mapbox/mbtiles'); i'm getting the following error:

Cannot find module 'node_modules/sqlite3/lib/binding/node_abi-platform-arch/node_sqlite3.node'

In the node_module/sqlite3 folder i can only find one binding:

node_modules/sqlite3/lib/binding/node-v67-darwin-x64/node_sqlite3.node

I've already updated my nodejs version(v11.4.0) and reinstalled the node_module packages but the error persists.
Can someone help?
Best regards
André Santos

The application can not be running with NodeJS 11.4.0, because that is the right binding for that version.
Oddly enough, the ABI version, platform and arch are not being filled in when it's trying to open it.
That's rather strange.


Linux syscall update

Added two missing syscalls and  fixed a bug in sockaddrToNative.

Besides the inline comments, I'd prefer you put any linux-specific syscalls in a file suffixed with linux.go for now, like eventfd_linux.go so it won't break the OS X build.

You can make test locally to run the unit tests. I don't think you should be taking the &ref value of the flags you're casting to uintptr - uintptr is just a shortcut for "full register sized value".
Also, I just noticed you're using syscall.Syscall for eventfd, which actually doesn't return a syscall.Error, so I think you should call it errn or errno and just return it for now instead of wrapping in posix.Error like is done here, sorry for the confusion.

I cleaned up the commits a bit and merged into unstable, thanks!

(You should develop against unstable going forward.)


No member safeAreaLayoutGuide

Hi Luis,
Getting this build error... Any suggestions?

Hey, there are you using the latest Xcode? Which would be Xcode 9 (beta).
The newer version require the latest Xcode, as those are methods available there.
If you'd like to use the library on an older version, please use v0.8.3. But I highly recommend just updating as the newer versions have fixed a lot of issues.

Actually I'm using Xcode 8. Will upgrade to 9. Thanks!

On Sep 8, 2017, at 10:55 AM, Luis Padron<EMAIL_ADDRESS>wrote:
Hey, there are you using the latest Xcode? Which would be Xcode 9 (beta).
The newer version require the latest Xcode, as those are methods available there.
If you'd like to use the library on an older version, please use v0.8.3. But I highly recommend just updating as the newer versions have fixed a lot of issues.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.


Extract original_transaction_id instead of transaction_id

As I understand all transactions should have original_transaction_id.  But this test fails
https://github.com/hoels/app-store-server-library-php/blob/7a4d1b95a1d9db85ac9324c4a1b08274b69f7727/tests/AppStoreServerLibrary/ReceiptUtilityTest.php#L18-L24
I don't know what it tests but my guess is invalid receipt. Anyway, the receipt with transactionId "0" does it even make sense?
PHPUnit 10.5.16 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.1.27
Configuration: /var/www/html/apple/app-store-server-library-php/phpunit.xml.dist

..........................F.....................                  48 / 48 (100%)

Time: 00:00.989, Memory: 14.00 MB

There was 1 failure:

1) AppStoreServerLibrary\Tests\ReceiptUtilityTest::testXcodeAppReceiptExtractionWithTransactions
Failed asserting that null matches expected '0'.

/var/www/html/apple/app-store-server-library-php/tests/AppStoreServerLibrary/ReceiptUtilityTest.php:23

FAILURES!
Tests: 48, Assertions: 240, Failures: 1.

Also, I tested with many real receipts, and all of them have original_transaction_id and can be parsed and never seen transaction_id "0"

See my comments in the corresponding issue on why this won't be merged.


Porch: failure cloning a package due to "different origin" even though it is not a different origin

Expected behavior
I can successfully clone a package.
Actual behavior
When trying to clone, I get a failure like "cannot create revision of test01-cluster with a different origin than other package revisions in the same package". I am still trying to narrow down the exact circumstances.
It's likely this has something to due with the the way I am testing - I am actually not sure if we should consider it a bug or not.
Information
I have a repository example-nephio-packages which has some packages in it. I have a fork of that repository, which I have registered to Porch. It may have something do due with creating derivates of those packages in the fork. I am not sure yet. I am able to successfully clone packages from my fork to another repo, though.

Actually, this is not during the clone. It's when PV controller tries to save the mutated Draft. So the clone works, but the Update doesn't.

Do the "mutations" in the mutated draft change the initial clone task in the package revision? I think we compare clone tasks among package revisions in the same package to try to make sure that they're coming from the same upstream.

Not intentionally. They just change packagerevisionresources actually. But I think there some concurrency issues going on. Since we do this in controllers, things happen way faster than they would manually. The process is basically:

clone
pull out package revision resources
tweak some values and save them

but the thing is, I often see errors for a while until things stabilize - like "could not find packagerevisionresources" and "removing tasks is not supported". So,  that first one seems to be happening because the reload after clone is not working or something. The second one perhaps is trying to save an outdated version of the package revision or packagerevisionresources (like, a stale cache entry and we are not catching that it is stale and kicking back the update attempt).

At the same time this is all happening, there is another controller watching things. It used to make its own mutations, but I added a delay of 30s before it does anything, and that helped some.
Also, 80% of the time, these things "settle" and work eventually, but not 100% of the time.

I backed the auto-approval controller off to wait 2 minutes (rather than 30s) before doing anything, and this is working a lot better so far.

I backed the auto-approval controller off to wait 2 minutes (rather than 30s) before doing anything, and this is working a lot better so far.

@mortent Could this be related to the other package approval issues that we've seen?

Going to implement this which may help with noise, but there is still some issue here:
https://github.com/nephio-project/nephio/issues/251

This sounds like it is concurrency issues. @johnbelamaric is the code you run here available so we can try to reproduce it? Even if slowing things down seems to help here, it is useful for us to know what is going on and hopefully fix the underlying issues.

Yep - follow the instructions here and you should see some issues with various packagerevisions and/or packagevariants (try describe on the packagerevisions that get stuck, the approval controller sends events):
https://github.com/nephio-project/test-infra/tree/main/e2e/provision#quick-start-for-gce
I have a couple PRs in the queue though that may make it less flaky, so spinning up your environment sooner rather than later will make it easier (and note that we are using :latest images for some things while in dev, so your environment may "auto upgrade"...).

So, interestingly, this specific error seems to have to do with publishing. Once the package is published, I get this error when PV should be creating a new Draft due to a change in the PV. I also see that the v1 published package is in DeletionProposed state when it should not be (instead, we should have it in Published and have a new Draft with the updates).

Here's what I did.

I set up a Nephio sandbox as described here.
Then, I create a test01 workload cluster by cloning the nephio-workload-cluster@v6 to the mgmt repo, approving and publishing, via the UI. This worked great, I got a test01 workload cluster created and registered to Nephio.
Next, I created this PVS:

apiVersion: config.porch.kpt.dev/v1alpha2
kind: PackageVariantSet
metadata:
  name: edge-clusters
spec:
  upstream:
    repo: nephio-example-packages
    package: nephio-workload-cluster
    revision: v6
  targets:
  - repositories:
    - name: mgmt
      packageNames:
      - edge01
      - edge02
      - edge03
      - edge04
    template:
      annotations:
        approval.nephio.org/policy: initial

Which again worked wonderfully, I got 4 clusters all named edge01-04 (though some of the CAPI machines didn't come up, but that's unrelated to this AFAIK).
4. Next, I deployed a package to all of the workload clusters with this PVS:
apiVersion: config.porch.kpt.dev/v1alpha2
kind: PackageVariantSet
metadata:
  name: free5gc-operator
spec:
  upstream:
    repo: free5gc-packages
    package: free5gc-operator
    revision: v2
  targets:
  - objectSelector:
      apiVersion: infra.nephio.org/v1alpha1
      kind: WorkloadCluster
    template:
      annotations:
        approval.nephio.org/policy: initial

Again, all good. Yay!

Now, I wanted to deploy to a smaller subset of clusters - just the ones labeled "edge" (ie, not the test01 one). Oops...I forgot to apply labels. So, I updated my PVS for edge clusters like this (added the pipeline):

apiVersion: config.porch.kpt.dev/v1alpha2
kind: PackageVariantSet
metadata:
  name: edge-clusters
spec:
  upstream:
    repo: nephio-example-packages
    package: nephio-workload-cluster
    revision: v6
  targets:
  - repositories:
    - name: mgmt
      packageNames:
      - edge01
      - edge02
      - edge03
      - edge04
    template:
      annotations:
        approval.nephio.org/policy: initial
      pipeline:
        mutators:
        - image: gcr.io/kpt-fn/set-annotations:v0.1.4
          configMap:
            nephio.org/site-type: edge

This shoud create new Draft edge01-edge04 packages, with that annotation added to all the resources in the package (in particular, the WorkloadCluster resource). Unfortunately, instead nothing happend.  I suspect this is because edge01-edge04 were updated by the PVS. Though, I don't understand why that would result in DeletionProposed. And of course we have no new Drafts.

oooo...when I update the PVS template for the PV, it doesn't update the PV. Instead, it deletes and recreates the PV (with a different name). That's why DeletionProposed...interesting.

(also I should have used set-labels, not set-annotations...)

I spun the delete/recreate off into its own issue, but I don't think it's the only cause of this problem.

I've tried to go through the steps in https://github.com/nephio-project/test-infra/tree/main/e2e/provision#quick-start-for-gce and the only potential issue I'm seeing is that the PackageVariant controller complains about PackageRevisionResources not being found. But once I check the actual PackageVariant resources, the conditions seems correct, so it might be that this is a transient issue. But it might be worth looking into.
However, I can see that the newly created PackageRevisions created from the PackageVariantSet (with package names edge01, edge02, ...) in the mgmt repo remains in Draft state. Should these be automatically published by a controller?

Yeah, it should have. But there may be some slight misalignment between what's checked in in the packages repo vs e2e repo, etc. You may be having permissions issues that cause the approval controller to fail (e.g., it may not have package variant permissions which it now needs as it checks for their readiness status).
I also tweaked the latest approval controller to wait 2 minutes after a Draft is created before it does anything to it, AND to check that the PackageVariant shows Ready before touching the resulting Draft. That avoids a lot of the issues. But I can build you a version of it that just hammers away with no delay and without checking the PV - then you will see the issue.

Ok, I built a special image that is more aggressive - doesn't check PV readiness and no delays. You can access my environment directly if you want, you should have access to project jbelamaric-dev, the nephio-r1-e2e is in us-central1-c.
Or, you can spin up a new VM (or reuse yours if it is still up, but if it had permissions missing then starting over is probably better), and just update the nephio-operator image. Login to your nephio-r1-e2e after it comes up and then:
cd /tmp/nephio-controllers/
sudo chown ubuntu:ubuntu resourcegroup.yaml
kpt pkg update @nephio-controllers/v4
sudo kpt fn eval --image gcr.io/kpt-fn/set-image:v0.1.1 -- name=docker.io/nephio/nephio-operator newTag=quick-approval
kpt live apply
# make sure the deployment restarts
kubectl -n nephio-system get po

Now apply the edge-clusters.yaml and check the various packagevariants that arise:
ubuntu@nephio-r1-e2e:~$ kubectl describe packagevariant edge01-cluster
Name:         edge01-cluster
Namespace:    default
Labels:       app.kubernetes.io/managed-by=configmanagement.gke.io
              configsync.gke.io/declared-version=v1alpha1
Annotations:  config.k8s.io/owning-inventory: config-management-system_mgmt
              configmanagement.gke.io/managed: enabled
              configmanagement.gke.io/source-path: edge01/pv-cluster.yaml
              configmanagement.gke.io/token: 8392753af157e62fd4db69fa6842608b885d1f2d
              configsync.gke.io/declared-fields:
                {"f:metadata":{"f:annotations":{"f:internal.kpt.dev/upstream-identifier":{}},"f:labels":{}},"f:spec":{"f:annotations":{"f:approval.nephio....
              configsync.gke.io/git-context: {"repo":"http://<IP_ADDRESS>:3000/nephio/mgmt.git","branch":"main","rev":"HEAD"}
              configsync.gke.io/manager: :root_mgmt
              configsync.gke.io/resource-id: config.porch.kpt.dev_packagevariant_default_edge01-cluster
              internal.kpt.dev/upstream-identifier: config.porch.kpt.dev|PackageVariant|default|example-cluster
API Version:  config.porch.kpt.dev/v1alpha1
Kind:         PackageVariant
Metadata:
  Creation Timestamp:  2023-06-04T17:09:31Z
  Finalizers:
    config.porch.kpt.dev/packagevariants
  Generation:  1
  Managed Fields:
    API Version:  config.porch.kpt.dev/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          f:config.k8s.io/owning-inventory:
          f:configmanagement.gke.io/managed:
          f:configmanagement.gke.io/source-path:
          f:configmanagement.gke.io/token:
          f:configsync.gke.io/declared-fields:
          f:configsync.gke.io/git-context:
          f:configsync.gke.io/manager:
          f:configsync.gke.io/resource-id:
          f:internal.kpt.dev/upstream-identifier:
        f:labels:
          f:app.kubernetes.io/managed-by:
          f:configsync.gke.io/declared-version:
      f:spec:
        f:annotations:
          f:approval.nephio.org/policy:
        f:downstream:
          f:package:
          f:repo:
        f:packageContext:
          f:data:
            f:clusterName:
        f:pipeline:
          f:mutators:
        f:upstream:
          f:package:
          f:repo:
          f:revision:
    Manager:      configsync.gke.io
    Operation:    Apply
    Time:         2023-06-04T17:09:46Z
    API Version:  config.porch.kpt.dev/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:finalizers:
          .:
          v:"config.porch.kpt.dev/packagevariants":
    Manager:      porch-controllers
    Operation:    Update
    Time:         2023-06-04T17:09:31Z
    API Version:  config.porch.kpt.dev/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:status:
        .:
        f:conditions:
    Manager:         porch-controllers
    Operation:       Update
    Subresource:     status
    Time:            2023-06-04T17:09:55Z
  Resource Version:  12000
  UID:               cc9284a7-02ce-49fa-ba6f-4b6ada4db611
Spec:
  Annotations:
    approval.nephio.org/policy:  initial
  Downstream:
    Package:  edge01-cluster
    Repo:     mgmt
  Package Context:
    Data:
      Cluster Name:  edge01
  Pipeline:
    Mutators:
      Config Map:
        nephio.org/cluster-name:  edge01
      Image:                      gcr.io/kpt-fn/set-annotations:v0.1.4
  Upstream:
    Package:   cluster-capi-kind
    Repo:      nephio-example-packages
    Revision:  v3
Status:
  Conditions:
    Last Transition Time:  2023-06-04T17:09:31Z
    Message:               all validation checks passed
    Reason:                Valid
    Status:                False
    Type:                  Stalled
    Last Transition Time:  2023-06-04T17:09:31Z
    Message:               Internal error occurred: cannot create revision of edge01-cluster with a different origin than other package revisions in the same package
    Reason:                Error
    Status:                False
    Type:                  Ready
Events:                    <none>
ubuntu@nephio-r1-e2e:~$

All that said - this may be just #3982, so maybe we should just fix that and see if this resolves completely (the "different origin" bit).
In an earlier version of the approval controller, rather than just delaying, it actually tried to set a readinessGate and add a false condition. That's when I saw the most issues - when it was modifying the PackageRevision at the same time as the PackageVariant controller. For example that's when I saw this error https://github.com/bluekeyes/go-gitdiff/blob/981bc4b60c4490e10d9f8ca8cfd7833e303c399e/gitdiff/apply_text.go#L130. We also do need to understand the many many identical or similar patch tasks that seem to indicate some controller battle happening.
So, perhaps I should see if I can find (or recreate) that code and we can see it get hammered that way. Ultimately, the controllers and other clients should be able to throw anything at the server and it should sort it out or at least kick them back.
As a side note - I still don't fully understand the point of the task list. I would like to understand if that's really necessary. I think it adds complexity, and also means the PackageRevision grows linearly with the changes, which seems odd since we already have everything in git (i.e., are we storing everything twice?).

Ok, small update here. I tried this again with #3986 included. Now, PVS controller does properly update the PV, rather than delete and recreate. However, I still see this error. I had put in a little instrumentation to ensureSameOrigin. What I found is that the false was being returned by the last return, not by any of the ealier ones.
If I have a chance tomorrow I will increase the instrumentation and try to figure it out.

Ooo...I am seeing this just using the CLI to try to create a new Draft:
ubuntu@nephio-test1-e2e:~$ kpt alpha rpkg get --name regional
NAME                                            PACKAGE    WORKSPACENAME   REVISION   LATEST   LIFECYCLE   REPOSITORY
mgmt-a150bb3c1977fbaee528c69dd50ff888321c38f0   regional   v1              main       false    Published   mgmt
mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868   regional   v1              v1         true     Published   mgmt
ubuntu@nephio-test1-e2e:~$ kpt alpha rpkg copy -n default mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868 --workspace set-labels
Error: Internal error occurred: cannot create revision of regional with a different origin than other package revisions in the same package
ubuntu@nephio-test1-e2e:~$

@natasha41575 the above should be impossible, shouldn't it?

Ah yeah that's not good, if you are using copy you should never see that error (it should just be copying the init or clone task from the specified packagerevision). I think this is indicative of something wrong more than concurrency issues unless something is coming in to modify the package revision that you are copying

Ah yeah that's not good, if you are using copy you should never see that error (it should just be copying the init or clone task from the specified packagerevision). I think this is indicative of something wrong more than concurrency issues unless something else is coming in to modify the package revision that you are copying

So I guess the question is whether the package itself is somehow broken or if it is the copy operation that is broken.

This file contains the contents of the package that is failing copy, its upstream, and the output of kubectl get packagerevision -o yaml for the failing package (pr.yaml) and all other package revisions (prs.yaml).
origin-issue.tar.gz

@natasha41575 I attached a bunch of files that may be helpful. But is there anything obviously wrong with this that would cause the issue (this is from the package I am trying to copy):
spec:
  lifecycle: Published
  packageName: regional
  repository: mgmt
  revision: v1
  tasks:
  - clone:
      strategy: resource-merge
      upstreamRef:
        upstreamRef:
          name: nephio-example-packages-0fbaccf6c5e75a3eff7976a523bb4f42bb0118ce
    type: clone
  - eval:
      config: null
      image: render
      match: {}
    type: eval
  workspaceName: v1
status:

Thanks for the files @johnbelamaric. No I don't see anything obviously wrong.
I think it might be helpful to see why it is returning false here: https://github.com/GoogleContainerTools/kpt/blob/7102ff0a71b886958009c5d932034c9d7a32ca1a/porch/pkg/engine/engine.go#L366 - we probably should improve logging for that. I can see that if we fail to fetch previous package revisions for whatever reason, we would get this error.
I think I can take a look later this week or early next week to see if I can get any hints as to what might be going wrong.

I think it might be helpful to figure out why it is returning false here:

Yeah, I put in some instrumentation. I haven't checked specifically with the "copy" command, but with the other errors the "return false" was from the last one in the function: https://github.com/GoogleContainerTools/kpt/blob/7102ff0a71b886958009c5d932034c9d7a32ca1a/porch/pkg/engine/engine.go#L464

Yeah, this seems like an issue that is probably unrelated to concurrency. I'm uncertain if enforcing the same upstream policy is all that helpful, so depending on the result here we can consider removing it.

what I am seeing in the task list that it continuously grows and will run out of space.
I had an example with more than 200+ entries
this is small snippet of it.

eval:
config: null
image: render
match: {}
type: eval

patch:
patches:

contents: |
--- Kptfile
+++ Kptfile
@@ -1,8 +1,8 @@
apiVersion: kpt.dev/v1
info:

description: example upf blueprint package
readinessGates:

conditionType: config.injection.WorkloadCluster.workload-cluster

description: example upf blueprint package
kind: Kptfile
metadata: # kpt-merge: /edge
annotations:
@@ -22,73 +20,73 @@

image: docker.io/nephio/upf-deploy-fn:latest
status:
conditions:

type: config.injection.WorkloadCluster.workload-cluster

status: "True"
message: injected resource "cluster01" from cluster

message: injected resource "cluster01" from cluster
reason: ConfigInjected

type: ipam.resource.nephio.org/v1alpha1.IPClaim.internet-pool1
status: "True"

message: update done

type: config.injection.WorkloadCluster.workload-cluster

message: update done
reason: req.nephio.org/v1alpha1.DataNetwork.internet

type: ipam.resource.nephio.org/v1alpha1.IPClaim.n3-ipv4
status: "True"

message: update done

type: ipam.resource.nephio.org/v1alpha1.IPClaim.internet-pool1

message: update done
reason: req.nephio.org/v1alpha1.Interface.n3

type: ipam.resource.nephio.org/v1alpha1.IPClaim.n4-ipv4
status: "True"

message: update done

type: ipam.resource.nephio.org/v1alpha1.IPClaim.n3-ipv4

message: update done
reason: req.nephio.org/v1alpha1.Interface.n4

type: ipam.resource.nephio.org/v1alpha1.IPClaim.n6-ipv4
status: "True"

message: update done

type: ipam.resource.nephio.org/v1alpha1.IPClaim.n4-ipv4

message: update done
reason: req.nephio.org/v1alpha1.Interface.n6

type: k8s.cni.cncf.io/v1.NetworkAttachmentDefinition.n3
status: "True"

message: update done

type: ipam.resource.nephio.org/v1alpha1.IPClaim.n6-ipv4

message: update done
reason: req.nephio.org/v1alpha1.Interface.n3

type: k8s.cni.cncf.io/v1.NetworkAttachmentDefinition.n4
status: "True"

message: update done

type: k8s.cni.cncf.io/v1.NetworkAttachmentDefinition.n3

message: update done
reason: req.nephio.org/v1alpha1.Interface.n4

type: k8s.cni.cncf.io/v1.NetworkAttachmentDefinition.n6
status: "True"

message: update done

type: k8s.cni.cncf.io/v1.NetworkAttachmentDefinition.n4

message: update done
reason: req.nephio.org/v1alpha1.Interface.n6

type: req.nephio.org/v1alpha1.Capacity.dataplane
status: "True"

message: update condition for initial resource

type: k8s.cni.cncf.io/v1.NetworkAttachmentDefinition.n6

message: update condition for initial resource
reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-empty-cluster01

type: req.nephio.org/v1alpha1.DataNetwork.internet
status: "True"

message: update done

type: req.nephio.org/v1alpha1.Capacity.dataplane

message: update done
reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-empty-cluster01

type: req.nephio.org/v1alpha1.Interface.n3
status: "True"

message: update done

type: req.nephio.org/v1alpha1.DataNetwork.internet

message: update done
reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-empty-cluster01

type: req.nephio.org/v1alpha1.Interface.n4
status: "True"

message: update done

type: req.nephio.org/v1alpha1.Interface.n3

message: update done
reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-empty-cluster01

type: req.nephio.org/v1alpha1.Interface.n6
status: "True"

message: update done

type: req.nephio.org/v1alpha1.Interface.n4

message: update done
reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-empty-cluster01

type: vlan.resource.nephio.org/v1alpha1.VLANClaim.n3
status: "True"

message: update done

type: req.nephio.org/v1alpha1.Interface.n6

message: update done
reason: req.nephio.org/v1alpha1.Interface.n3

type: vlan.resource.nephio.org/v1alpha1.VLANClaim.n4
status: "True"

message: update done

Do you know if the task list reflects 200+ real changes or is there duplicate entries? We did add logic that would prevent new tasks for no-op updates for certain types of changes, but there might be more that can be done there.
But regardless, we need to revisit the task list. It is problematic in its current form and its value is questionable. I know @johnbelamaric also mentioned this in a separate comment, but we need to consider removing it.

I will do some more due diligence and will inform

Ok. So, even after fixing the concurrency issues via use of resourceVersion, I see this issue continue.
Attached is a package for which copy fails. I will debug a bit more.
cannot-copy.tar.gz

This also fails to copy (and is much simpler than the one in the tarball above):
apiVersion: porch.kpt.dev/v1alpha1
kind: PackageRevision
metadata:
  creationTimestamp: "2023-07-07T21:57:51Z"
  name: regional-2328b858664a5d619338770f5e6d31118c547294
  namespace: default
  resourceVersion:<PHONE_NUMBER>5a946e5510cf311c576e1ea179fd34
  uid: uid:foo:copy-test
spec:
  lifecycle: Draft
  packageName: foo
  repository: regional
  tasks:
  - clone:
      strategy: resource-merge
      upstreamRef:
        upstreamRef:
          name: nephio-example-packages-bb0001a2735f809281be792895a6a410abbe60fd
    type: clone
  - eval:
      config: null
      image: render
      match: {}
    type: eval
  workspaceName: copy-test
status:
  deployment: true
  publishTimestamp: null
  upstreamLock:
    git:
      commit: ce0e222636400e6e9aa1a8a4c3b54e26b6e4be7e
      directory: repository
      ref: repository/v3
      repo: https://github.com/nephio-project/nephio-example-packages.git
    type: git

Ok...I got it to work actually, by passing in --replay-strategy=false:
ubuntu@nephio-r1-e2e:~$ kpt alpha rpkg copy -n default regional-8bcf50b42723a4f7462e1d41264515cdc7546d1b --workspace copy-test --replay-strategy=false
regional-aced90670981e49ac9232400f8b072d70304839b created
ubuntu@nephio-r1-e2e:~$

Because the rpkg copy code has this:
        if len(packageRevision.Spec.Tasks) == 0 || !r.replayStrategy {
                spec.Tasks = []porchapi.Task{
                        {
                                Type: porchapi.TaskTypeEdit,
                                Edit: &porchapi.PackageEditTaskSpec{
                                        Source: &porchapi.PackageRevisionRef{
                                                Name: packageRevision.Name,
                                        },
                                },
                        },
                }
        } else {
                spec.Tasks = packageRevision.Spec.Tasks
        }

So, it's that else that's not working...

So an alternative workaround instead of #4000 would be to switch kpt to default to --replay-strategy=false. That still leaves the replay-strategy=true mode broken, though.

So the cause of this issue is the logic that tries to handle the sameOriginPolicy for packages. When copying a package that is cloned from another package, the logic tries to "walk the references" of upstream packages in an attempt to figure out if the package is in fact based on the same origin. The background for doing this is described in https://github.com/GoogleContainerTools/kpt/issues/3467.
But the current logic is broken in that it assumes that upstream package lives in the same repository as the current package, which is obviously not a good assumption.
https://github.com/GoogleContainerTools/kpt/blob/70c5e274e53ed6505f439285277e50fe83e04ccc/porch/pkg/engine/engine.go#L438-L460
And if the upstream package is not found, the sameOriginPolicy logic ends up in the default, which is that the new packagerevision does not share an upstream with the existing revisions in the same package. There also seems to be some other bugs in this code.
But even if we could fix it, it is almost certainly a bad idea to try to walk the references all the way back. Among other things, it assumes that the source repositories for all packagerevisions in the ancestor hierarchy are all available in the same Porch instance. And even then, there are several other scenarios where we can't really know if a packagerevision is logically "based on" an existing revision. So I think we should remove sameOriginPolicy logic and just leave this up to users.
Separately from that, I think it makes sense to change the default value for the --replay-strategy flag. The reclone-and-replay strategy is somewhat equivalent to rebasing in git, in that it tries to reclone the new upstream for a package and the replay the same changes as the origin package. However, this is difficult, as replaying patches on when the base might have changed is risky. More details about the differences between the strategies are discussed in https://github.com/GoogleContainerTools/kpt/issues/3329.


Add translation endpoint to Igbo API

Describe your changes
This PR updates the IgboAPI with a new endpoint to do Igbo-to-English text translation.
Motivation and Context
We're constantly trying to improve our AI product offering to include more useful Igbo technology. This now includes a machine translation endpoint served by Nkọwa okwu team.
How Has This Been Tested?
Tests can be found in src/controllers/__tests__/translation.test.ts

I've added the schema changes we discussed. Also some new validation for the schema values as well as new tests for the extra validation. Let me know if any more needs to be done!


istioctl: add support for filtering resources by istio revision to injector list

Please provide a description of this PR:
Supporting filtering by revision is a common and popular feature in istioctl, which can help us quickly locate istio information of a specified revision

Before the change, injector list will list all hooks:

After he change, injector list also list all hooks, and can list webhooks of a specified reversion, by -r flag:

After this PR https://github.com/istio/istio/pull/54095, this improvement does not seem to be necessary


"Modules" toolbar when removed must be easily returned

it should be easy to return the "modules" to the UI:

it shows in A+ menu (or ToolsMenu)
it has an attached key combination
ctrl + shift + a

+ some list of all the possible panes

+ notification when removing

j: mid priority

shows in View -> ToolWindows already

not doing


refactor: code review

Hi, I'm from the discord Reactiflux channel.
I have made some changes and they might not affect the production.
There was no problem with the test result, I recommend you to test the app yourself once more.
I will share my opinions based on my experiences, it would be thankful if you share your opinions with me too.

added .prettierrc to format files for readability
In some files, two spaces as a tap was used, and in other files, four space as a tap was used.
It would be better to use the same spaces. I used prettier to format files, but actually, it's up to you whether to use it or not.

defined types for components' properties
Actually, you can define the type for properties without defining them separately. I defined the types for each component's property type with name [Component Name]props.

fixed DisplayTire by changing params
From what I have seen the path and the name, the function is supposed to be a component. I moved the event handler to props.

added types RevsUnit, SidewallHeightUnit
I thought it would be better to define the types in the type file to see all types in one file.

Camelcased a type name from 'tire' -> 'Tire'

used Omit to omit unused fields

DisplayTire
calculateTireHeight in helpers.tsx

Since the height field was not used, it would be better to omit the field.

used slice instead of conditional rendering
When people who don't know the logic see the code, it would be more noticeable using the slice function.

removed expectable data types
the following variables already have a type. So, I don't think that the types need to be defined.
  tires.map((tire, index: number) =>

  const INCH_PER_MM = 0.03937008;

used optional call instead of condition in TireHeightColumns
You can use the optional operator to call if the function is callable.

used if instead of using a ternary operator in a ternary operator in helpers
using ternary operator is really useful and make the code shorter but in my opinion, using more than once can harm code readability.

changed prop name from 'handleX' -> 'onX'
For consistency, it followed the prop name in TireHeightColumn.

Additionally, there are two things I want to mention.
First of all,
You can give hints for what code exactly does by giving a name.
For example,
before
{(((tire1Height - tire2Height) / tire2Height) * speed + speed).toFixed(2)}

after
{calculateX(tire1Height, tire2Height, speed).toFixed(2)}

// or you can use a variable

{X.toFixed(2)}

before
 {range(10, 101, 10).map((speed) => {
  const tire1Height = calculateTireHeight(tires[0]);
  const tire2Height = calculateTireHeight(tires[1]);
  return (

    {(
       ((tire1Height - tire2Height) / tire2Height) * speed + speed ).toFixed(2)}

    );
})}

after
<SomethingRange tires={tires} speed={speed} />

before
{tires[0] && tires[1] && (
  // ...
)}

after
{hasBothTires && (
  // ...
)}

and last, you should use useEffect instead of useMemo in App.
useMemo is used for performance purposes, for example.
const Comp = ({ value, list }) => {
  const convertedList = calculate(list); // it takes 1 sec every time

  return (

      {value} / {convertedList.length}

  );
}

Let's say, the calculate function takes 1 sec to return the result, and the list prop is barely changed while value is often changed.
Whenever the value is changed, the component will be rendered(called) and the calculate function will be called unnecessarily.
In this case, you can use useMemo to execute the logic only when list is changed.
  const convertedList = useMemo(() => calculate(list), [list]);

  ...

This is it. These are my opinions.
Have a nice day, I will be waiting for your opinions.

I'm glad it was helpful.
I have learned a lot from your code, thank you for the opportunity!
Have a nice coding!

VScode is giving me a warning on the way I'm importing App in my test. I did some searching but couldn't quite find a solution. It's not a big deal, the tests still run but I'm curious if you had any thoughts.

It looks like moving the tests folder inside of src fixes the issue. I'm not sure why.

Thank you for sharing the issue! I learned a new one!
JSX needs React because actually JSX calls React.createElement to create an element.
By plugin react, you don't need to import React but it seems like it applies under the src folder by default.

I also did a refactor here if you're interested https://github.com/mkaatman/tirecomparecalc/pull/4/commits/cf8a23a90ca15459a0730e32f49966a89d6bf76d


Additional hand checking functionality

Penalties should be less severe - don't slap the user with their entire hand if any of their plays are invalid
Should objects be recreated to make sure there is no object modification used to work around the checks?

This should also be resolved with GH-33


[Bug] Crafting issues

When I want to craft the item it disappears

Describe the Bug
Provide a clear and concise description of what the bug is, and what should have happened.
No information provided
Steps to Reproduce
Steps to reproduce the behavior (Err on over-descriptive).
No information provided
Additional Information
If applicable, include screenshots, OS/Browser/Build version, or any other relevant information.
No information provided

@Thecrack116, when you create an issue there is a template which is automatically added to the issue. It prompts you to provide the information needed for us to help you diagnose the problem. When you don’t provide anything else besides “When I want to craft the item disappears,” it makes it near impossible for us to help you. I’ve edited your post to show you what areas you’re missing. If you want the problem to be fixed, please take the time to provide the relevant information.


CellFocusEvent is not fired in grid multiselect mode when focus moves to left adjacent cell

Hello,
CellFocusEvent is not fired when the following circumstances apply:
-grid is in multiselect mode
-focus is moved to the left neighboring cell
I believe this is caused by FastNavigation lastFocusedCol being adjusted with an offset, but when checking against it in the focusUpdated function, there is no compensation for offset (FastNavigation.java).

Yes, I can replicate the problem

The fix is in version 2.4.6 which I uploaded to Directory a moment ago.

Thank you very much for the fast fix!


Move pre-reminder check to be first

Puts the check to make sure the user is in the guild to be the very first check as this supersedes all others because if they're not in the server there's no point checking anything else.

I don't think it can? cos you'd be saying loop over the members in the guild then check if the member is in the guild wouldn't you?

 But I think there's something wrong with the caching from pycord here. Because surely the logic of "we're looping through the guild members" holds true even further down in the condition checks? How can the member be part of the main guild at line 87, but suddenly not at line 127?

I would suggest that if we think there's a possibility that the user is leaving the server between the start and the checks, the. The "is in guild" check should be as close to the action to be taken as possible.
If it is a caching issue, moving this check higher leaves a greater gap for the user to leave before we want to send them a message.

yeah there's definitely something funky going on - my guess was something along the lines of yeah it's doing the loop, then before it gets to person xyz they've already left but idk

counter proposal: every single line of this method should just check if the user is in the guild over and over again

yeah there's definitely something funky going on - my guess was something along the lines of yeah it's doing the loop, then before it gets to person xyz they've already left but idk

If this is currently our best guess, I think we have the greatest chance of success by keeping the check closer. Sure it hurts performance a tiny bit in some cases as extra checks are performed despite this one later failing, but if rather that than open the door to random request.Forbidden exceptions.
It might be worthwhile, rather than moving the check further away, just adding a not comment explaining why this check is there and why it's in that location
# NOTE: blah blah blah.


Fix the unread banner not appearing

fixes #2218
Signed-off-by: Fridtjof Mund<EMAIL_ADDRESS>

This PR fixes the missing unread banner but it creates severe other bugs:

DM room with an enabled widget:

Preview of an unjoined room:

Closing in favor of #2252


SS4: Cannot sort many_many result when using through

Unsure if this is expected behaviour, or missing functionality. Please let me know :)
Setup
I have a class (Locale) that has a many_many relationship to itself. This is being run through a class called FallbackLocale.
Locale:
class Locale extends DataObject
{
    private static $has_many = [
        'FallbackLocales' => FallbackLocale::class . '.Parent',
    ];

    private static $many_many = [
        'Fallbacks' => [
            'through' => FallbackLocale::class,
            'from' => 'Parent',
            'to' => 'Locale',
        ],
    ];
}

FallbackLocale:
class FallbackLocale extends DataObject
{
    private static $has_one = [
        'Parent' => Locale::class,
        'Locale' => Locale::class,
    ];

    private static $db = [
        'Sort' => 'Int',
    ];

    private static $default_sort = 'Sort';
}

Scenario
I create a new Locale through a very standard Model Admin with a Gridfield.
I add two Fallback() records, and I sort them.
Whenever I use $locale->Fallbacks() (or $locale->Fallback()->sort('Sort')), the records are always in ID order, not the Gridfield Sort order.
Workaround
If I use $locale->FallbackLocales() instead, I get the correct Gridfield sorting - however, I am then required to go an extra step to get the Object I'm actually interested in.
EG:
foreach ($locale->FallbackLocales() as $throughObject) {
    $throughObject->Locale();
}

Or: I need to add a join before I sort.
Pull requests

[x] #8417

I've been asked to add that: While we do have a workaround for this sorting issue (great for project code), Fluent (and maybe other modules) use many_many_through, and currently assume that this sorting functionality is working.
If possible, could we please make this fix upstream, rather than relying on the modules to apply the workaround?
CC: @frankmullenger

We already have sorting tests using the table prefix as in Damian's suggestion above (ManyManyThroughListTest::testSortingOnJoinTable() as of #8417), and I've added another one into that PR which sorts without using a table alias as well.
As far as I can tell this functionality is working as expected.
The stub objects in the tests are the same as in the description of this issue, except that the parent/child objects aren't the same class (but I don't think that matters). I'll set up a new set of stubs that exactly match those in this example and see if it does.

Ok I think I have found a bug. Here are my unit tests: https://gist.github.com/robbieaverill/1fedcc375da4703216a07dc37a2a8a6d
The first test fails, where you don't specify a sort in the ORM call. This should default to using the sort order, but it doesn't look like it's doing that and is using the ID instead (as originally reported):
Starting test 'SilverStripe\ORM\Tests\MMTL7981Test::testDefaultSortOrder'.
F
Starting test 'SilverStripe\ORM\Tests\MMTL7981Test::testSortWithSpecificColumn'.
.
Starting test 'SilverStripe\ORM\Tests\MMTL7981Test::testSortWithSpecificColumnAscendingOrder'.
.
Starting test 'SilverStripe\ORM\Tests\MMTL7981Test::testWithSpecificSortColumnDescendingOrder'.
.

With HasManyList the DataQuery looks up the default sort field during construction:
https://github.com/silverstripe/silverstripe-framework/blob/4/src/ORM/DataQuery.php#L174-L176
With ManyManyThroughList the default_sort could come from the joined class, not the data class.
I'll add some logic to ManyManyThroughQueryManipulator to handle this

Ok I've adjusted the tests in #8417 so that they actually show the bug then pushed a fix for it to that PR

@micmania1 Could you peer review this please?

Fixed with #8417. @micmania1 if you find anything you don't like please ping me on the PR and I'll address it separately

Hi team,
This doesn't appear to be working for me. I've made sure that I have the changes from:
https://github.com/silverstripe/silverstripe-framework/pull/8417/files
Same example, but more detail.
Locale:
class Locale extends DataObject
{
    private static $table_name = 'Fluent_Locale';

    /**
     * @config
     * @var array
     */
    private static $db = [
        'Title' => 'Varchar(100)',
        'Locale' => 'Varchar(10)',
        'URLSegment' => 'Varchar(100)',
        'IsGlobalDefault' => 'Boolean',
    ];

    private static $has_many = [
        'FallbackLocales' => FallbackLocale::class . '.Parent',
    ];

    private static $many_many = [
        'Fallbacks' => [
            'through' => FallbackLocale::class,
            'from' => 'Parent',
            'to' => 'Locale',
        ],
    ];

    private static $default_sort = '"Fluent_Locale"."Locale" ASC';
}

FallbackLocale (I added the default sort here, but removing it has the same results):
class FallbackLocale extends DataObject
{
    private static $db = [
        'Sort' => 'Int',
    ];

    private static $has_one = [
        'Parent' => Locale::class,
        'Locale' => Locale::class,
    ];

    private static $table_name = 'Fluent_FallbackLocale';

    private static $default_sort = 'Sort';
}

I have three Locales:

International
Mexico
Argentina

Mexico has been set up with the following Fallback Locales (in order):

Argentina
International

These are my DB records:
Fluent_Locale:

ID
Title
Locale

1
International
en_NZ

2
Mexico
es_MX

3
Argentina
es_AR

Fluent_FallbackLocale:

ID
Sort
ParentID
LocaleID

1
2
2
1

2
1
2
3

I have a dev task to test:
class TestLocaleTask extends BuildTask
{
    private static $segment = 'TestLocaleTask';

    public function run($request): void
    {
        /** @var Locale $locale */
        $locale = Locale::get()->filter('Locale', 'es_MX')->first();

        Debug::message($locale->Fallbacks()->count());

        foreach ($locale->Fallbacks() as $fallback) {
            Debug::message($fallback->Locale);
        }
    }
}

The output of this is:
Debug (line 48 of TestLocaleTask.php): 2

Debug (line 51 of TestLocaleTask.php): es_AR

Debug (line 51 of TestLocaleTask.php): en_NZ

Appears to be working! But then I change Mexico's Fallback order to:

International
Argentina

Fluent_FallbackLocale:

ID
Sort
ParentID
LocaleID

1
1
2
1

2
2
2
3

I would not expect the order to switch.
I run the dev task again, and the output is still:
Debug (line 48 of TestLocaleTask.php): 2

Debug (line 51 of TestLocaleTask.php): es_AR

Debug (line 51 of TestLocaleTask.php): en_NZ

This affects Fluent heavily because the module uses $locale->Fallbacks() to determine it's "chain", which means you get incorrect content.


Search within file responsiveness is broken

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

VS Code Version:
OS Version: Windows 11

Steps to Reproduce:

Open 2 files in parallel (one next to each other
Open the file explorer
Search something with the file closed to the file exploired (via search functionality)
In few but boring cases, the responsiness of the search input text does not work.
The general Rule is that the search input text does not cover the number of the line, but in that specific case, it slight break. Is very annoying.

this seems to be fixed, or maybe I'm not following the repro steps correctly

Search something with the file closed to the file exploired (via search functionality)

is not clear to me.


Update Cats to 1.5.0-RC0

I'll publish this as 0.11.0-M1 tomorrow if everything looks alright.

Codecov Report

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

@@           Coverage Diff            @@
##           master   #1015     +/-   ##
========================================
+ Coverage   85.49%   85.7%   +0.2%
========================================
  Files          75      75
  Lines        2386    2386
  Branches      174     174
========================================
+ Hits         2040    2045      +5
+ Misses        346     341      -5

Impacted Files
Coverage Δ

.../core/shared/src/main/scala/io/circe/Decoder.scala
93.2% <0%> (+0.3%)
:arrow_up:

...rc/main/scala/io/circe/numbers/BiggerDecimal.scala
91.56% <0%> (+0.6%)
:arrow_up:

...re/shared/src/main/scala/io/circe/JsonNumber.scala
96.2% <0%> (+1.26%)
:arrow_up:

...rc/main/scala/io/circe/shapes/SizedInstances.scala
92.85% <0%> (+14.28%)
:arrow_up:

Continue to review full report at Codecov.

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

anything I or other contributors can do to help this move forward?

looks like the M5 build is stuck on
[error] coursier.ResolutionException: Encountered 1 error(s) in dependency resolution:
[error]     org.spire-math:jawn-parser_2.13.0-M5:0.13.0:
[error]         not found:
[error]             /home/travis/.ivy2/local/org.spire-math/jawn-parser_2.13.0-M5/0.13.0/ivys/ivy.xml
[error]             https://repo1.maven.org/maven2/org/spire-math/jawn-parser_2.13.0-M5/0.13.0/jawn-parser_2.13.0-M5-0.13.0.pom
[error]             https://oss.sonatype.org/content/repositories/releases/org/spire-math/jawn-parser_2.13.0-M5/0.13.0/jawn-parser_2.13.0-M5-0.13.0.pom
[error]             https://oss.sonatype.org/content/repositories/snapshots/org/spire-math/jawn-parser_2.13.0-M5/0.13.0/jawn-parser_2.13.0-M5-0.13.0.pom

I opened https://github.com/non/jawn/issues/120 on it

@SethTisue Yeah, Jawn is the only thing we're waiting on. I've tried pinging @non a number of times over the past couple of months, but haven't heard anything, so I'll probably just fork it once Cats 1.5.0 is ready.

perhaps someone watching this repo could submit an M4->M5 upgrade over at https://github.com/non/jawn so that all Erik would need to do is pull publishing levers. M4->M5 is usually an easy bump to do

@SethTisue We've had a PR open for a couple of months with no response: https://github.com/non/jawn/pull/117


Adding metatranscriptomics as a valid entry for 'Assay'.

@wasade @antgonza @RodolfoSalido As far as I know, column name remapping for metagenomics and metatranscriptomics should be the same and both have reverse barcodes, right?

One reviewer should be fine.


Many fixes

Checklist:

[x] All tests pass in CI.
[x] There are sufficient tests for the new fix/feature.
[x] Grammar rules have not been renamed unless absolutely necessary.
[x] The conflicts section hasn't grown too much.
[x] The parser size hasn't grown too much (check the value of STATE_COUNT in src/parser.c).

Closes #46
Closes #62
Closes #94
Closes #95
Closes #104
Closes #106
Closes #107

@amaanq would it be possible to have one separate PR for each of those fixes? I know it's tedious, but then it's easier to revert one individually if 2 months from now someone find a regression. It's also far easier to review.

A few of the linked issues are the same problem, I'll split it into two, one for bug fixes/precedence issues and one for the added types/fixed struct elements

thx


Merge latest librespot

plietar/librespot's development has been wound up by the primary developer. The eventual plan for spotify-connect-scrobbler was to cease building directly on top of the librespot codebase and use it as a library, but the conversion to a library with a well documented public API won't happen now.
s-c-s should merge the latest librespot upstream and plan for stalled librespot development.

Latest librespot upstream has been merged with master.


auto-test should handle multiple ppn

Original author: Nikhil Jain
Original issue: https://charm.cs.illinois.edu/redmine/issues/917

Currently, if ppn > 1 is given as TESTOPTS, auto-test will fail since +p<> may not divide them. Should be handle more graciously.

Original date: 2016-03-13 15:47:38

~~https://charm.cs.illinois.edu/gerrit/#/c/1111~~ https://github.com/UIUC-PPL/charm/commit/93c9f262faabdcc737ca342bfed7151fca884ee0

Original date: 2016-04-11 19:36:07

Windows builds are still failing autobuild due to an inability to find the testrun script where they expect it.

Original date: 2016-04-11 19:36:52

Sorry, I see that was opened as #1028


Address contributions in the README.md file

This should wait until the CLA has been deployed.  There is a link in it that won't work until that has been done.

@kwalcock (a) did you see my other PR? and (b) man, look at the drop in test coverage!  You should have written a test for the readme! :D

From now on for every n lines of code you add, you have to remove n + 1.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.:white_check_mark: kwalcock:x: BeckySharpYou have signed the CLA already but the status is still pending? Let us recheck it.

Now Becky has to sign because she has a commit.  Ha ha.  You're it!

Now Becky has to sign because she has a commit. Ha ha. You're it!

hahaha that's hilarious, yet potentially problematic, right?  should I have the ability to invalidate your work simply bc i commented on your message?

You have a commit in there as well as a comment.  That's what you get for adding that comma to my beautiful text.

You have a commit in there as well as a comment. That's what you get for adding that comma to my beautiful text.

ah, i forgot about that!!


Update to latest node opcua and fix existing issues

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Thank you very much @erossignon


net/mail: ParseDate Does not correctly parse RFC5322 timezone

What version of Go are you using (go version)?

$ go version
go version go1.14.4 linux/amd64

Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
...
GOARCH="amd64"
GOHOSTARCH="amd64"
GOOS="linux"
...

What did you do?
https://play.golang.org/p/BFTQrcW9JzP
package main

import (
	"fmt"
	"net/mail"
)

func main() {
	t, err := mail.ParseDate("Sun, 28 Jun 2020 21:51:24 UT")
	if err != nil {
		fmt.Printf("%v\n", err)
	} else {
		fmt.Printf("%s\n", t)
	}
}

What did you expect to see?
2020-06-28 21:51:24 +0000 UT

What did you see instead?
mail: header could not be parsed

Research
I looked at the source and found where the problem lies.
time.Parse() does not accept UT as a valide timezone even though rfc5322 allows it (section 4.3) because time.parseTimeZone() does not see a timezone with less than 3 characters as valid.
This could be fixed by adding a special case in email.ParseDate() if the timezone is "UT" and change it to something time.Parse() accepts, or adding yet another special case to time.Parse().

Somehow duplicates #39260 as obsolete time zones are not supported.

Do you mean it should not be fixed ?
I get that obsolete timezones should not be generated, but there are many mail servers still sending email with them in their date fields.
Regardless, all the obsolete timezones should be treated the same way, don't you think ?

I think the point is that any fix in this area may as well fix both issues at the same time.

@ianlancetaylor I'm going for this if it's not a work in progress.
It will be my first contribution to Go Repo, any tips would be appreciated. :-D

@jimist Go for it.  Thanks.  The place to change is probably net/mail.ParseDate.

@ianlancetaylor
As a follow-up explanation, the tests of UT were used for testing if any timezone with T shouldn't work and they're now valid.
Since UT is just a standard, I replaced it with UTC to be used as the timezone.

@ianlancetaylor
As a follow-up explanation, the tests of UT were used for testing if any timezone with T shouldn't work and they're now valid.
Since UT is just a standard, I replaced it with UTC to be used as the timezone.


Feditest side of http support changes

Closes #183
When defining a node, use the server-prefix parameter instead of hostname. The server prefix is in the form <scheme>://<hostname>[:<port>] (no trailing slash). This should be backward-compatible. The hostname parameter should still work too, but note that the existing code ignores that parameter when constructing WebFinger queries. The resource URI hostname is used instead.

@jernst This PR is needed by the test changes that were merged in feditest-test-fediverse.

Sorry for missing this the first around.


Ability to Use Tip Loss Correction Feature when using C++ API with WakeMod = 0

When we run OpenFAST with its C++ API coupled with CFD codes, the actuator line/disk model naturally accounts for induction, so we set WakeMod = 0.  However, with actuator disk, we still may want to use a tip-loss correction because actuator disks do not capture tip vortices and their downwash.  Tip-loss corrections are only available with WakeMod = [1|2].
Is it possible to make the tip-loss corrections available even with WakeMod = 0.  The velocities from CFD can be sent to AeroDyn, AeroDyn can calculate aerodynamic forces, and then the tip-loss factor can be applied to the resultant loads.
For now, I am correcting the velocities sent from CFD to OpenFAST as a work around, but it is not exactly the same as correcting the forces afterward.  I could apply the correction within the CFD code, but the uncorrected forces will still be used in OpenFAST resulting in an over prediction of loads and torque, so it would be best to have the correction available in AeroDyn outside the BEM iteration loop.
I am willing to help out with this effort, so feel free to work with me.
Thanks,
Matt Churchfield

@ebranlard, let's keep this in mind while restructuring AD15.


Fix python functions

Motivation
Currently Python Functions is broken because several values that the python instance files reference are not found in the proto files. This pr corrects it.
Modifications
Describe the modifications you've done.
Result
After your change, what will change.

@sijie @jerrypeng

retest this please

retest this please


[C++] "utf8_split_whitespace" kernel returned offset buffers are too small for large string in case of empty array

Describe the bug, including details regarding any error messages, version, and platform.
Consider the following call to utf8_split_whitespace
import pyarrow as pa
import pyarrow.compute as pc

result = pc.utf8_split_whitespace(
    pa.array([], type=pa.large_string()),
)
print(result.type)
print(result.buffers())

The returned type is list<item: large_string>, but the returned offset buffer has size=4, not size=8. I expect to see size=8, pertaining to a length-one array of int64 (a single zero)
For a non-empty array, the size is correct.
We've encountered this in Awkward Array (https://github.com/scikit-hep/awkward/pull/2679#issuecomment-1697469490).
Thanks!
Component(s)
Python

@agoose77 thanks for the report! I can confirm this looks buggy.
In the execution path of a scalar kernel, we do have a check for an empty input:
https://github.com/apache/arrow/blob/f40bf7751772276134c46cae7ac25cef2cdad560/cpp/src/arrow/compute/exec.cc#L781-L793
And so I suppose something is going wrong there (because once you enter the actual kernel-specific exec code, it creates a LargeStringBuilder, and finishing such a builder produces the correct offsets, also in the case of an empty result)

The bug is indeed in this MakeArrayOfNull call used above, when using a length of 0 and having a nested large_string inside a list.
This function is exposed in pyarrow through the nulls function, which can reproduce the same issue:
In [1]: pa.nulls(0, pa.large_string())
Out[1]:
<pyarrow.lib.LargeStringArray object at 0x7f957decd0c0>
[]

In [2]: pa.nulls(0, pa.large_string()).buffers()
Out[2]:
[None,
 <pyarrow.Buffer address=0x7f9580a08040 size=8 is_cpu=True is_mutable=True>,
 <pyarrow.Buffer address=0x7f9580a08040 size=8 is_cpu=True is_mutable=True>]  # <-- not fully sure this buffer is actually needed ..

In [3]: pa.nulls(0, pa.list_(pa.large_string())).values.buffers()
Out[3]:
[None,
 <pyarrow.Buffer address=0x7f9580a08080 size=4 is_cpu=True is_mutable=True>,
 <pyarrow.Buffer address=0x7f9580a08080 size=4 is_cpu=True is_mutable=True>]

So creating empty large string array itself gives the correct offset size, but when nested in a list array, then the list's values array (the large string array) has a wrong offset size.

Ah, I see. It makes sense that it was a helper function; the other split functions also appear to have this bug.


Refactor sr-api to not depend on client anymore

I know we want to go fast, but I'm not a fan of marking a PR that touches 2500 lines of code as "insubstantial" and without any explanation.

That was by mistake and I already have removed that (before your comment :P).


Improve Text Contrast in Capability Section Table under /user/preferences in Meshery Playground

Current Behavior
The table in the Capability section under /user/preferences in the Meshery Playground has poor text-to-background contrast, making it difficult to read.
Expected Behavior
The table's text should have a higher contrast ratio with the background. Which maches with the Theme.
Screenshots/Logs

Environment

Host OS: Windows (Edge Browser)
Platform: Docker or Kubernetes
Meshery Server Version: stable-v
Meshery Client Version: stable-v

To Reproduce

Navigate to /user/preferences in the Meshery Playground.
Scroll down to the Capability section.

Contributor Guides and Handbook

🛠 Meshery Build & Release Strategy
📚 Instructions for contributing to documentation

Meshery documentation site and source

🎨 Wireframes and designs for Meshery UI in Figma (open invite)
🙋🏾🙋🏼 Questions: Discussion Forum and Community Slack

Solution to Improve Text-to-Background Contrast in the Capability Table:
To solve the issue of poor text-to-background contrast in the Capability section under /user/preferences, I suggest the following:
Adjust Background Color: Modify the table's background color to a lighter or more neutral shade, such as light gray or off-white, to improve contrast with the text.
Text Color Modification: Update the text color to a darker shade (e.g., dark gray or black) to make it stand out clearly against the background, improving readability.
Ensure Accessibility Standards: Ensure that the contrast ratio between text and background meets WCAG guidelines, specifically a ratio of at least 4.5:1 for normal text. Tools like the WebAIM Contrast Checker can help verify this.
Dynamic Theme Integration: If Meshery supports dynamic theming (e.g., light/dark mode), the table's styling should adapt to match the selected theme, maintaining consistency throughout the UI.
Cross-Device Testing: Test the table on different devices and browsers to ensure the updated contrast works effectively across various screen sizes and settings.

Hi, I would like to take this issue up if it's available.

Hi I'd like to take this up.

can i work on this?

Hey, @Vidit-Kushwaha i tried this on server and client version both, in edge and other browser but the styling seems fine.

@rohan-choudharyy Thank you


Remove "spot price" calculation from V1.0 scripts

spot price calculation not required for analysis in V1.0
spot price reference can vary case by case, we'll only need it for later version slippage analysis
for V1.0 remove spot_prices from the data frame
setting spot price reference not required, initial value spot prices not required (genesis_states.py)

option added to include or not spot prices in post processing method.


Capacity nodes- Memory

Is "Memory" in this table the same as "Model Size Limit" on this page  or "Max memory per dataset" on this page?
If they are not the same, how are they different?
If they are the same, why are 3 different terms used?

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 18013a6f-b02d-30d4-3b6d-93295624f352
Version Independent ID: e307e1d7-e565-8742-e563-86d596d7d1e1
Content: What is Microsoft Power BI Premium? - Power BI
Content Source: powerbi-docs/enterprise/service-premium-what-is.md
Service: powerbi
Sub-service: powerbi-premium
GitHub Login: @KesemSharabi
Microsoft Alias: kesharab

Thanks for your comment, @djurecic0. This issue has been assigned to the doc author for review.

Hi @djurecic0,
The information in What is Power BI Premium? is outdated. We'll soon delete this article. Please refer to What is Power BI Premium Gen2? instead.
I hope this will clarify things,
Kesem

@KesemSharabi Thank you, this is helpful.


Investigate and handle download errors gracefullly

Handle this output:
bash-3.2$ bash <(curl -sL get.comby.dev)
comby-0.9.1-x86_64-macos: truncated gzip input
tar: Error exit delayed from previous errors.

brew install comby hopefully takes care of this for Mac, haven't been able to reproduce otherwise.


Update activation retry logic and logging

Clarifies when the script is giving up after max retry attempts; Better for parsing in the event of failure.

/assign bkatyl


Add checker for Espresso

Check inputs in JSON File to see if they are valid

I have completed this, now when the TranslationEngine finds that a field it needs to get all its information is null, it prints out the StepTestCase that has the missing field.


Mark some distributed-ucxx tests as flaky and rerun

Some tests fail during teardown which probably indicates there are some resources that leak in certain situations. While this should definitely be resolved we weren't able to do so yet, thus to prevent os many CI failures we now mark those tests flaky if they fail at teardown (when UCX is reset).

/merge


Omit capacity from bullet charts

This change omits the capacity from bullet charts. There's a possible the capacity could be really long and skew the charts.
Just commenting out the code for now, in case we want to bring it back after summit.
Fixes: https://github.com/project-koku/koku-ui/issues/741

Codecov Report

Merging #742 into master will decrease coverage by 0.07%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #742      +/-   ##
==========================================
- Coverage   76.35%   76.28%   -0.08%
==========================================
  Files         227      227
  Lines        3722     3727       +5
  Branches      645      648       +3
==========================================
+ Hits         2842     2843       +1
- Misses        788      791       +3
- Partials       92       93       +1

Impacted Files
Coverage Δ

...ports/ocpReportSummary/ocpReportSummaryDetails.tsx
60% <0%> (-6.67%)
:arrow_down:

Continue to review full report at Codecov.

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


fix redis queue can't work in redis cluster

php artisan queue:work console command can't work in redis cluster 3.0, because in redis cluster, the KEYS call must be in same hash slot.
see
https://redis.io/topics/cluster-spec#keys-hash-tags
https://github.com/laravel/framework/issues/16754

Tests and fail and unclear if this is a breaking change or not. Please clarify all of these things.


Using image component in install package modal as well

Fallback images:

Reviewer: @orlandohohmeier

LGTM

This is awesome, good job!!


SQLITE_IOERR: disk I/O error on update to 1.23.4

⚠ Please verify that this bug has NOT been raised before.

[X] I checked and didn't find similar issue

🛡 Security Policy

[X] I agree to have read this project Security Policy

Description
Hello
I'v upgrade uptime-kuma 1.23.3 to 1.23.4 and when my pod starting I have this errors logs
👟 Reproduction steps
Upgrade 1.23.3 to 1.23.4
👀 Expected behavior
Uptime-kuma starting
😓 Actual Behavior
Uptime-kuma won't start
🐻 Uptime-Kuma Version
1.23.4
💻 Operating System and Arch
unknown
🌐 Browser
Google Chrome Version 119.0.6045.123 (Build officiel) (64 bits)
🐋 Docker Version
No response
🟩 NodeJS Version
No response
📝 Relevant log output
==> Performing startup jobs and maintenance tasks
==> Starting application with user 0 group 0
Welcome to Uptime Kuma
Your Node.js version: 18.18.2
2023-11-16T09:34:03Z [SERVER] INFO: Welcome to Uptime Kuma
2023-11-16T09:34:03Z [SERVER] INFO: Node Env: production
2023-11-16T09:34:03Z [SERVER] INFO: Inside Container: true
2023-11-16T09:34:03Z [SERVER] INFO: Importing Node libraries
2023-11-16T09:34:03Z [SERVER] INFO: Importing 3rd-party libraries
2023-11-16T09:34:06Z [SERVER] INFO: Creating express and socket.io instance
2023-11-16T09:34:06Z [SERVER] INFO: Server Type: HTTP
2023-11-16T09:34:06Z [SERVER] INFO: Importing this project modules
2023-11-16T09:34:06Z [NOTIFICATION] INFO: Prepare Notification Providers
2023-11-16T09:34:06Z [SERVER] INFO: Version: 1.23.4
2023-11-16T09:34:06Z [DB] INFO: Data Dir: ./data/
2023-11-16T09:34:06Z [SERVER] INFO: Connecting to the Database
2023-11-16T09:34:07Z [DB] INFO: SQLite config:
[ { journal_mode: 'wal' } ]
[ { cache_size: -12000 } ]
2023-11-16T09:34:07Z [DB] INFO: SQLite Version: 3.41.1
2023-11-16T09:34:07Z [SERVER] INFO: Connected
2023-11-16T09:34:07Z [DB] INFO: Your database version: 10
2023-11-16T09:34:07Z [DB] INFO: Latest database version: 10
2023-11-16T09:34:07Z [DB] INFO: Database patch not needed
2023-11-16T09:34:07Z [DB] INFO: Database Patch 2.0 Process
2023-11-16T09:34:07Z [DB] INFO: patch-fix-kafka-producer-booleans.sql is not patched
2023-11-16T09:34:07Z [DB] INFO: patch-fix-kafka-producer-booleans.sql is patching
2023-11-16T09:34:07Z [DB] INFO: Closing the database
2023-11-16T09:34:09Z [DB] INFO: SQLite closed
[Error: UPDATE monitor SET kafka_producer_allow_auto_topic_creation = monitor.kafka_producer_allow_auto_topic_creation_old
    WHERE monitor.kafka_producer_allow_auto_topic_creation_old IS NOT NULL - SQLITE_IOERR: disk I/O error] {
  errno: 10,
  code: 'SQLITE_IOERR'
}
2023-11-16T09:34:09Z [DB] ERROR: Start Uptime-Kuma failed due to issue patching the database
2023-11-16T09:34:09Z [DB] ERROR: Please submit the bug report if you still encounter the problem after restart: https://github.com/louislam/uptime-kuma/issues

Please keep using 1.23.3 first, I think the migration script is still having some issue.

1.23.5 should be fixed this issue.


Profiler - Athena metric computation error with injected projected partitions

Affected module
Profiler
Might be based on https://docs.aws.amazon.com/athena/latest/ug/partition-projection-dynamic-id-partitioning.html
Describe the bug
 Injected projected partition column date_time must have only (and at least one) equality conditions in the WHERE clause!
[SQL: /* {"app": "OpenMetadata", "version": "<IP_ADDRESS>"} */
SELECT avg(LENGTH(country)) AS mean, count(country) AS "valuesCount", count(DISTINCT country) AS "distinctCount", MIN(LENGTH(country)) AS min, MAX(LENGTH(country)) AS max, SUM(CAST(CASE WHEN (country IS NULL) THEN %(param_1)s ELSE %(param_2)s END AS BIGINT)) AS "nullCount", STDDEV_POP(LENGTH(country)) AS stddev, SUM(CAST(LENGTH(country) AS BIGINT)) AS sum
FROM XYZ LIMIT %(param_3)s]
[parameters: {'param_1': 1, 'param_2': 0, 'param_3': 1}]
(Background on this error at: https://sqlalche.me/e/14/e3q8)

To Reproduce
Screenshots or steps to reproduce
Expected behavior
A clear and concise description of what you expected to happen.
Version:

OS: [e.g. iOS]
Python version:
OpenMetadata version: [e.g. 0.8]
OpenMetadata Ingestion package version: [e.g. openmetadata-ingestion[docker]==XYZ]

Additional context
Add any other context about the problem here.

It looks like we need to add a default partition key for these kind of table -- similar to what we do with BigQuery.

It looks like we need to add a default partition key for these kind of table -- similar to what we do with BigQuery.

yup, we might need to pick this info during the ingestion as well which I don't think we're doing now


Explicit arr object creation

Hi, I have started playing with the cookbook examples and there is a little doc section that I did not find clear hence here this PR.
Issue
The testsetup:: blocs in the rst files are not written out in the resulting HTML.
In the "Given an array with 100 numbers, from 0 to 99" sections the arr object pops up ex nihilo in the documentation which might lose the reader a bit even though most people will guess the np.arange here.
Proposed solution
Add the array creation code in the testcode:: blocs for those sections section to make it more explicit.
That is going from
Given an array with 100 numbers, from 0 to 99

print(f"{arr[0]} .. {arr[-1]}")

0 .. 99

to
Given an array with 100 numbers, from 0 to 99

import numpy as np
import pyarrow as pa

arr = pa.array(np.arange(100))

print(f"{arr[0]} .. {arr[-1]}")

0 .. 99

in the resulting HTML.
Thanks,
Nathanaël

@amol- mind taking a look?

FYI, I think amol- is on vacation for another week or so, so this won't get looked at til then

I had the same observation while going through the IO cookbook: I think it would indeed be nice that the example is fully reproducible (copy/pastable), and thus includes the code to create the dummy data.
The same code in the testsetup could then be removed?

I think we still need the testsetup code for the intermediate cell tests to pass.

@amol- any thoughts on this?  Otherwise I'll go ahead and merge this evening.

Merging.  @Nlte Thank you very much for the contribution!  Feel free to add any other ideas.  This project is just getting started so the more input the better :)


React is rendering cached view instead of updating with new state (GitHub Pages)

Have you read the Contributing Guidelines on issues?

[X] I have read the Contributing Guidelines on issues.

Prerequisites

[X] I'm using the latest version of Docusaurus.
[ ] I have tried the npm run clear or yarn clear command.
[ ] I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
[ ] I have tried creating a repro with https://new.docusaurus.io.
[x] I have read the console error message carefully (if applicable).

Description
React view is not updated with React states that are different than at the time of build. 🤯 , I know. I have a clock that doesn't load with the correct time.
Locally the site works perfectly. The bug is related to the deployment.
I suspect the problem is as follows:

the static bundle generated by yarn deploy "freezes/caches" the html view (the view encodes the React state at the time of deploy, i.e. the time on the clock is the time of the build for deployment)
when accessed on a browser the "frozen/cached" view is loaded
React states are initialized (i.e. time) but the view shows the "frozen/cached" view not the view generated with the latest React states (i.e. latest time)

React seems to to think the initial React state (time) at time of page load correspond to the "frozen/cached" views so React does not re-render the view.
Steps to reproduce

open https://alzafacon.com/
notice the time on the local clock is not correct (in fact, the time happens to be the time of the yarn deploy I did)
wait for the system time to advance by one minute (you can also trigger a state change by moving the slider)
notice the time is reflected correctly now

if you run the project locally this does not happen.
Expected behavior
On first load (or on page refresh) the clock should reflect the React state of the component not of the cached static bundle.
Actual behavior
The clock shows the wrong time until the state values change again
Your environment

Public source code: https://github.com/alzafacon/alzafacon.github.io
Public site URL: alzafacon.github.io (github pages, will redirect to alzafacon.com)
Docusaurus version used: 2.0.0-beta.9
Environment name and version (e.g. Chrome 89, Node.js 16.4): Chrome 96
Operating system and version (e.g. Ubuntu 20.04.2 LTS): macOS

Reproducible demo
alzafacon.github.io
Self-service

[ ] I'd be willing to fix this bug myself.

You need to remount the component during React hydration. Something like:
import React, { useState } from "react"
import useIsBrowser from '@docusaurus/useIsBrowser';
import { ZoomClock } from "./ZoomClock"
import { useInterval } from 'react-use'
import { DateTime } from "luxon"

export const WallClock = ({ size = 200, timeZone = 'local', label = "" }) => {
    const isBrowser = useIsBrowser()
    const [time, setTime] = useState(DateTime.now().setZone(timeZone))

    useInterval(() => {
        setTime(DateTime.now().setZone(timeZone))
    }, 1000)

    return (
        <ZoomClock
            size={size}
            hour={time.hour}
            minute={time.minute}
            label={label}
            key={String(isBrowser)}
        />
    )
}

Otherwise, the state is only updated when the useInterval callback is first fired.

aha, thank you so much! I used the hook to fix it.
so it's de hydration not "freeze/cache" 🤦 of course


Whats is a CA bundle file?

Whats is a CA bundle file?
What format is acceptable?

Just a text file with PEM blocks of certificates, similar to what apache would expect. Here is a tool that creates them based off different trust stores - https://github.com/PeculiarVentures/tl-create/  also see: https://github.com/GlobalSign/PKI.js/tree/master/examples/CA bundle


Report on failed packs

If you try to download the pack Healing After A Breakup, which has a content id of 1419, or the pack Find Stillness in Any Moment, which maybe does not exist in the database, you will find out both gives the 404 error.

Not very sure why this happens. I think headspace works inconsistently for these specific packs.


Release a new version

Are there any plans to release a new version? I'm particularly interested in indexed expressions.

It's out now: https://github.com/yaml-path/YamlPath/releases/tag/0.0.4
It will be eventually available in Maven Central.

thank you! I was able to pull a new relase


Cooking menu planning helper solution

Problem
Frustrations that I haven't really tried to deal with are:

Unclear every evening who's going to make adults meal.
Unclear almost every evening what to make for dinner.
Because recipe is undecided, grocery shopping list is spontaneous except limited number of items with specific ideas in mind.

My hunch is:

1st item is easy. I just talked to my wife and by default it's me who makes adult food, as it has been.
2nd, and 3rd items: No solution yet.

For coming up with menu, there are ingredient delivery services. We tried Hello Fresh before https://github.com/130s/30y-130s_life/issues/575 and liked although stopped because of other considerations at that time. It's on our list but not a permanent/complete solution to my problem.
I can only think of being proactive in making a menu prior to no later than grocery shopping run.

Here I can utilize menu/recipe services that have features that can help me.

Requirement
Deduced from analyzing the problem above,

I can list up easily the ingredients by default for a menu.
I can list up menus for a set number of days, say for 7 days at minimum.
I can find good Asian menu coverage.

One of my random search criteria is "tendon", and see if the service returns "rice bowl with tempura on the top", not just recipes with tendon.

Both desktop, and mobile app available.
I can get inspiration on the same service, not having to go out of somewhere else.
(Optional) I can post a plan referencing to a recipe external to the service.
(Optional) I can upload original recipe to the same service.

Giving a try with Big Oven. So far I'm liking the meal planner feature.
Initially I'd stick to either allrecipes.com or yummly.com, both of which don't seem to come with meal planning feature.

Back in 2011 allrecipes.com launched a planner service, but today I can't find it. Understandably it's an old announcement, and also the service was purchased by another company in the meantime so I expect there's been changes.


ion-slide pager overlays the slide itself

Without custom styles, it looks like when using the ion-slide directive, the pager overlays the slide itself.
I have been told a fix is to custom define a height, although I feel this should be fixed in the library itself.

I use the following style to make the pager below:
.emoji {
width: 225px;
}
.slider {
padding-bottom: 10px;
}
.slider-pager {
top: initial ;
bottom: 2px ;
}


Change og:image to use the full size of image

Closes #24.

thanks!

hi, when is this going to be pushed to the wordpress plugin registry? because there you still get the medium sized image.


Increase max size for passwords - Solving the "E-Mail address already in use" Error

Hi,
New installs are unable to register for accounts out of the box, I weren't able to do enough testing to see if it's related to password length (my one was about 40 characters). After clicking 'Create Account' it would always end up telling me "E-Mail address already in use"? I just launched the instance? Looking at issue #88 I could quickly verify it was related to the password length limiter in the code as @357up said.
Looking at the code only changing the number from 60 to 254 does the job just fine. Temporary solutions include:
for PostgreSQL databases:
ALTER TABLE users ALTER COLUMN password TYPE varchar(254) ALTER COLUMN password SET NOT NULL;

and for MySQL:
ALTER TABLE `users` MODIFY `password` VARCHAR(254) NOT NULL;

I did fix this and make a PR here but it doesn't seem to have been seen yet, @SpecialAro would you like me to make a new PR on this repo?

@bioluks instead of making a new PR can you push the changes to this one instead? Thank you!


[BUG] The TablesNamesFinder mistakenly treat nested SELECT in FROM as table

Recently I used TablesNamesFinder trying to find true tableNames within a SQL query, during testing, found out it treat nested SELECT alias as table, which is wrong.
Sample query
select * from (select * from a) as a1, b
select * from b, (select * from a) as a1

It calculates a, a1, b are the table names, a1 suppose to be an alias, not a table name
I used two examples, as I found out the parsed structure of these two examples are slight different that the 1st case, the a1 alias shown within plainSelect.fromItem.alias. And 2nd case, the a1 alias shown within  one of plainSelect.joins's fromItem.alias.
Is that normal or expected?

Greetings,
although it seems reasonable to exclude any Aliases from the returns, TableNamesFinder will always be more like a Find any Object Names suspiciously looking like a Table and you are supposed to filter the returned list against the actual Meta Data.
Because:
with a (select 1 b from b)
select b from a
;

This test succeeds against JSQLParser 4.10 Snapshot and will likely succeed against 4.9 or 4.8 since nothing has been changed in this regard:

    @Test
    void testSubqueryAliasesIssue1987() throws JSQLParserException {
        String sqlStr = "select * from (select * from a) as a1, b;";
        Set<String> tables = TablesNamesFinder.findTablesOrOtherSources(sqlStr);
        assertThat(tables).containsExactly("a", "b");
        assertThat(tables).doesNotContain("a1");

        sqlStr = "select * from b, (select * from a) as a1";
        tables = TablesNamesFinder.findTablesOrOtherSources(sqlStr);
        assertThat(tables).containsExactly("a", "b");
        assertThat(tables).doesNotContain("a1");
    }

Please reproduce and then close this issue.

Sorry, my example is bad, as it later must reference the alias in FROM clause, below SQL will reproduce it
SELECT * FROM b, (SELECT * FROM a) as a1 WHERE b.id IN ( SELECT id FROM a1 )

It will output a1, a, b as tableNames.
The reason my earlier example works is because there is no reference to the alias, a1 not at all tracked, but for withStatement it is tracked, but only in https://github.com/JSQLParser/JSqlParser/blob/master/src/main/java/net/sf/jsqlparser/util/TablesNamesFinder.java#L284, it don't really track nested query alias

This is exactly what I have tried to explain at first: there are situations where the AST alone is not sufficient and you will need to add Meta Data information and/or need to operate with actual name scopes within the AST.

Please more thoroughly with your tests because your example is still working fine and as expected (with 4.10-Snapshot at least):
    @Test
    void testSubqueryAliasesIssue1987() throws JSQLParserException {
        String sqlStr = "WITH a2 AS (SELECT * FROM a) SELECT * FROM b WHERE b.id IN ( SELECT id FROM a2 )";
        tables = TablesNamesFinder.findTablesOrOtherSources(sqlStr);
        assertThat(tables).containsExactlyInAnyOrder("a", "b", "a2");

        tables = TablesNamesFinder.findTables(sqlStr);
        assertThat(tables).containsExactlyInAnyOrder("a", "b");
        assertThat(tables).doesNotContain("a2");
        ;
    }

I have removed any Alias of any ParenthesedSelect, ParenthesedFromItem, LateralSubSelect and WithItem.
This eases the problem for simple AST with only one scope, although it would not completely solve it and even may harm some other cases. Its probably good for 95% of the use cases, we will see.
The following test passes now:
    @Test
    void testSubqueryAliasesIssue1987() throws JSQLParserException {
        String sqlStr = "select * from (select * from a) as a1, b;";
        Set<String> tables = TablesNamesFinder.findTablesOrOtherSources(sqlStr);
        assertThat(tables).containsExactlyInAnyOrder("a", "b", "a1");

        tables = TablesNamesFinder.findTables(sqlStr);
        assertThat(tables).containsExactlyInAnyOrder("a", "b");
        assertThat(tables).doesNotContain("a1");

        sqlStr = "select * from b, (select * from a) as a1";
        tables = TablesNamesFinder.findTablesOrOtherSources(sqlStr);
        assertThat(tables).containsExactlyInAnyOrder("a1", "a", "b");

        tables = TablesNamesFinder.findTables(sqlStr);
        assertThat(tables).containsExactlyInAnyOrder("a", "b");
        assertThat(tables).doesNotContain("a1");

        sqlStr = "SELECT * FROM b, (SELECT * FROM a) as a1 WHERE b.id IN ( SELECT id FROM a1 )";
        tables = TablesNamesFinder.findTablesOrOtherSources(sqlStr);
        assertThat(tables).containsExactlyInAnyOrder("a1", "a", "b");

        tables = TablesNamesFinder.findTables(sqlStr);
        assertThat(tables).containsExactlyInAnyOrder("a", "b");
        assertThat(tables).doesNotContain("a1");
    }

Yeah, I am about to think the same, but majorly in tracking PlainSelect's fromItem and Join's fromItem. And got same issues if got tableName, alias clash. But I think a clash is not a formal SQL syntax? But anyway, I agree your fix will cover 95% of cases


Set doesn't save

From @markburgessstl on August 29, 2015 13:30
currentLocatiom = System.IO.Directory.GetCurrentDirectory();
var configurationBuilder = new ConfigurationBuilder(currentLocatiom).AddJsonFile("config.json");
config = configurationBuilder.Build();
...
config.Set("access_token", accessToken);
the call to Set() seems to work, but the config file is not changed.
Copied from original issue: aspnet/Announcements#59

From @glen-84 on August 29, 2015 13:40
@markburgessstl Why are you posting an issue in the Announcements repo?
Please read the README.

Sorry, I'm new to this

@markburgessstl It does seem confusing (especially without knowing which version of the runtime you are using) but based on ConfigurationSource Set is saving your key value pair in a dictionary, it doesn't change your files.
I want to say I remember (vaguely) there being a "Commit" method, but I cannot find it. Has it been replaced with "Reload"?
I'd imagine @Eilon or @kirthik would know

Where to Commit? There are several Configurationsources. Better is to not allow Set at all. It does not work in Farm Environments as it currently designed.

Closing in favor of a backlog item at #386. There are valid points raised here that we would need to address.


As a DMRPP integrator, i want to be able to run a set of test files agains the dmrpp-generator code so that i can validate outputs before integrating this into my cumulus workflows

The integration into cumulus looks straight forward, but for QA purposes, i'd like to generate and verify/validate the DMRPP files before running end to end in cumulus. By simply being able to point the DMRPP generator at a local file (or directory of files) and output dmrpp, i'd be able to validate those without cumulus integration and workflows. We'd also be able to quickly narrow down if an issue was because of our file + DRM, or with the cumulus integration portion.

Thanks @mgangl  @ellett we need to convert this into a jira action to schedule it.

Issue fixed now you can generate DMR++ files locally by running
docker run --rm -it -v <path/to/nc/hdf/files>:/workstation ghrcdaac/dmrpp-generator


add optimistic locking option

please see title.

but
package-lock.json auto updated.
I did only this command.

npm install && npm run build && npm run cover

My environment.
$ node --version
v7.5.0
$ npm --version
5.3.0

@hiradimir, looks good. Thanks for adding this :)

@RobinBuschmann Thanks you for merging!