Improve error reporting in case of knative is required but not installed

When an integration that requires knative is created but knative is not installed, the camel-k operator must provide better insight about the missing pre-condition and should wait to deploy the integration till the pre-condition is satisfied.
As example, given the flowing integration:
  - from:
      steps:
      - to: log:info?showAll=true&multiLine=true
      uri: knative:event/hello?name=test-broker

If you run it, then a standard deployment would be created and the integration pod would end in a CrashLoopBackOff state as the knative component lacks the information about how to properly run with a cryptic java.lang.IllegalStateException: Cannot load Knative configuration from file or env variable.
The resulting integration would look like:
apiVersion: camel.apache.org/v1
kind: Integration
metadata:
  name: test-integration
spec:
  flows:
  - from:
      steps:
      - to: log:info?showAll=true&multiLine=true
      uri: knative:event/hello?name=test-broker
status:
  conditions:
  - firstTruthyTime: "2022-11-09T11:08:24Z"
    lastTransitionTime: "2022-11-09T11:08:24Z"
    lastUpdateTime: "2022-11-09T11:08:24Z"
    message: default/camel-k
    reason: IntegrationPlatformAvailable
    status: "True"
    type: IntegrationPlatformAvailable
  - firstTruthyTime: "2022-11-09T11:09:24Z"
    lastTransitionTime: "2022-11-09T11:09:24Z"
    lastUpdateTime: "2022-11-09T11:09:24Z"
    message: kit-cdloka391rhs73ejkffg
    reason: IntegrationKitAvailable
    status: "True"
    type: IntegrationKitAvailable
  - lastTransitionTime: "2022-11-09T11:09:24Z"
    lastUpdateTime: "2022-11-09T11:09:24Z"
    message: different controller strategy used (deployment)
    reason: CronJobNotAvailableReason
    status: "False"
    type: CronJobAvailable
  - firstTruthyTime: "2022-11-09T11:09:24Z"
    lastTransitionTime: "2022-11-09T11:09:24Z"
    lastUpdateTime: "2022-11-09T11:09:24Z"
    message: deployment name is test-integration
    reason: DeploymentAvailable
    status: "True"
    type: DeploymentAvailable
  - firstTruthyTime: "2022-11-09T11:09:24Z"
    lastTransitionTime: "2022-11-09T11:09:24Z"
    lastUpdateTime: "2022-11-09T11:09:24Z"
    message: test-integration(http/80) -> integration(http/8080)
    reason: ServiceAvailable
    status: "True"
    type: ServiceAvailable
  - lastTransitionTime: "2022-11-09T11:09:24Z"
    lastUpdateTime: "2022-11-09T11:09:24Z"
    message: no host or service defined
    reason: IngressNotAvailable
    status: "False"
    type: ExposureAvailable
  - firstTruthyTime: "2022-11-09T11:09:28Z"
    lastTransitionTime: "2022-11-09T11:12:28Z"
    lastUpdateTime: "2022-11-09T11:12:39Z"
    message: back-off 2m40s restarting failed container=integration pod=test-integration-76b697c448-4bwp5_default(2910cf61-40e8-46d9-9d86-500529a5f94c)
    reason: Error
    status: "False"
    type: Ready
  phase: Error
  platform: camel-k
  profile: Kubernetes

The root problem can be derived by the fact that:

the profile is Kubernetes
there's no track of KnativeService in the conditions
the conditions reports that a standard deployment it's been created

But we should make it much more explicit.

I have had similar issues with YAKS. And I have added a role CLI command that is able to explicitly setup roles and permissions (user needs cluster admin privileges). This way the user can add Knative roles also after Camel K has been installed. Something like:
kamel roles --add knative

I have had similar issues with YAKS. And I have added a role CLI command that is able to explicitly setup roles and permissions (user needs cluster admin privileges). This way the user can add Knative roles also after Camel K has been installed. Something like:

In this particular example, knative was not even installed on purpose so I think the operator should not move forward deploying the integration as the minimum requirements to run the integration are not met.

Two aspects I want to work on is:

fail early, before the build starts, to not waste computing cycles and time, for early feedback
set the failure reason in the integration status and condition

When the integration fails, is is described as
    Last Transition Time:  2023-03-30T21:45:56Z
    Last Update Time:      2023-03-30T21:45:56Z
    Message:               error during trait customization: integration cannot run, as knative is not installed in the cluser
    Reason:                InitializationFailed
    Status:                False
    Type:                  Ready

...
  Phase:                Error
``

Maybe it would be nice to also have a condition about knative ?
  -lastTransitionTime: "2022-11-09T11:09:24Z"
    message: Knative is | is not available
    reason: KnativeAvailable
    status: "True|False"

    Last Transition Time:  2023-03-31T16:55:34Z
    Last Update Time:      2023-03-31T16:55:34Z
    Message:               integration cannot run, as knative is not installed in the cluser
    Reason:                KnativeNotInstalled
    Status:                False
    Type:                  KnativeAvailable
    Last Transition Time:  2023-03-31T16:55:34Z
    Last Update Time:      2023-03-31T16:55:34Z
    Message:               error during trait customization: integration cannot run, as knative is not installed in the cluser
    Reason:                InitializationFailed
    Status:                False
    Type:                  Ready

Seems better to inform the user about the conditions.


Missing progress/error messages

Checklist

[X] I have used the search function to see if someone else has already submitted the same feature request.
[X] I will describe the problem with as much detail as possible.
[X] This issue only contains a request for one single feature, not multiple (related) features.

App version
6.801
Problem you are trying to solve
K-9 badly lacks some basic status messages that will tell you what just happened, what K-9 has been doing and if it has been doing fine or ran into any problems.

When you push the "archive" button, the email simply vanishes without any indication what just happened.
When you send mail, the message simply vanishes and you’re back in the inbox. A short message like “Mail sent successfully” would do wonders.
When you retrieve mail, but don't get any, K-9 won't tell you if there wasn't any mail or if the server timed out or an error was found.

Suggested solution
The fact, that there's no message upon retrieval is the worst - when you don't get any mail, you always need to retrieve AGAIN because you can never be certain if there wasn't some connection glitch the first time.
Screenshots / Drawings / Technical details
No response

This is getting incredibly annoying.
Yesterday, there was an issue with outgoing mail. K9 just wouldn't send it. Wasn't in the mood to tell me why, the messages just sat there in the outbox. Maybe the attachments were too big, but who knows. After half an hour or so, K9 felt like telling me they won't be sent - got a truncated message on my main screen: "SocketTimeoutException: failed to connect to smt..."
Clicked on it to see the full issue, but nope - simply arrived at K9, no error message to be found.
Rest of the evening, when trying to retrieve mail, the little circle would only appear for three seconds, then, K9 would loose interest. Again, no messages.
Second attempt: Circle keeps spinning forever. Again, no clue what's going on.
This morning, still the same thing: K9 attempts to retrieve mail, but doesn't. Retrieving mail on my laptop reveals that there is indeed mail to be retrieved. Minutes later, the mail finally shows up in K9 - no clue how it got there.
Two hours ago, I received a message from K9 that it failed to send mail, even though I deleted the remaining mail from my outbox yesterday. Is it simply telling me what happened yesterday? Or did it snatch one of yesterdays mails, bury it in a hole in the yard and is now attempting to send it again? Nobody knows.
Summary: I don't mind bugs - it's fine, as long as you have a faint idea of what you're facing and / or what to expect. In this case, it's the double combo of non-communication that's killing the deal. #1 K9 isn't communicating. #2 The developers behing K9 aren't communicating. Posted on k9mail.app in early April, no replies. Posted here in early May, only to learn that all K9 issues have been poured into the bulk with Thunderbird.
Reminds me of the core issues K9 had a decade ago - reasons why I eventually moved on. Sad to see that nothing has really changed.


Filebrowser always starts in $HOME

Newsboat version (copy from newsboat -v): b66aa5d5
Steps to reproduce the issue:

Ensure there's at least one feed loaded in Newsboat.

cd somewhere other than the home directory.

Start Newsboat, open any article, press s.

Actual behaviour: file browser opens inside Newsboat, showing files and directories in user's home directory.
Expected behaviour: file browser shows files and dirs in current directory.
Other info you think is relevant: not sure if this is really a bug. On one hand, the code uses getcwd, which indicates programmer's intent clearly enough. On the other hand, no user ever complained about that to me, and I'm not sure if I'd ever notice if I didn't read the code.
TODO:

[ ] check if we promise anything regarding this in docs
[ ] check the history of this piece of code to see if there were any bugs related to it
[ ] check Newsbeuter's bugtracker to see if there are any bugreports regarding this

I think starting in the home directory is intended behavior.
The documentation mentions a setting called save-path with a default value of ~/.
During FileBrowser initialization the working directory is changed according to that config variable.
The getcwd call you mention is executed after the initial change of working directory.

The documentation mentions a setting called save-path with a default value of ~/.

Yeah, that settles it then. Thanks for investigating! Closing this as invalid.


File upload on mobile app is not working

@ledainam commented on Fri Oct 20 2017
Description:

Server Setup Information:

Version of Rocket.Chat Server: 0.59.1
Operating System: Centos 7
Deployment Method(snap/docker/tar/etc): tar
Number of Running Instances:  1
DB Replicaset Oplog: Enable

Mobile app on Android and iOs file upload not working.
when i click on icon computer to upload, and after borrow file nothing happen.
pls help us fix it soon.
Thanks.

@ledainam commented on Fri Oct 20 2017
Server version 0.58 worked fine. Only v0.59.1 have issue with file upload on mobile app both android and iOs.

@ledainam commented on Tue Dec 05 2017
@MartinSchoeler  : version 0.59.3 have same issues.
I didn't know when this issues will be fixed.

@ccfiel commented on Mon Jul 23 2018
same here version 0.66.3 cannot upload andriod

The issue is probably related to some bad configuration on the server. Refer to this one: https://github.com/RocketChat/Rocket.Chat.iOS/issues/2066


pydeck 0.3.0b1

For #4103

Background

Change List

Coverage decreased (-2.6%) to 79.856% when pulling 44ec7ae3bd672842dd6673444c4c59bcfe9a2f0f on ajd/update-changelog into 7d57bda29983cff4bc61ba2951c03db0f6d52c9a on master.


Add section on running stand-alone in the dev guide

We should explain how to run Kata without the complexity of container managers, blah.
Add a new section on running stand-alone which should be based on:

https://github.com/clearcontainers/runtime/wiki/Running-standalone.

Note that we appear to have broken running stand-alone - it used to work so we'll have to bisect and fix, then fix this doc issue.

... and add some basic functional tests for running stand-alone as we used to have in CC.


fix: ignore .env.developement

Avoid pushing out credentials in your repository.
props @jhuggett

Not 100%, but I thought this may have been intentionally committed to git. Not that we shouldn't change that, but we may also need to tweak some of our docs / onboarding: https://tina.io/guides/tina-cloud/starter/connect-to-tina-cloud/
For example, it looks like removing this from git may cause the user to initially start from the cloud workflow first instead of using the local client


feat: max_allowed_packet is set by the user

What this PR does:
Which issue(s) this PR fixes:

Fixes #292
Special notes for your reviewer:
Does this PR introduce a user-facing change?:

Codecov Report

Merging #312 (a363b4c) into master (6f5a27d) will increase coverage by 0.14%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #312      +/-   ##
==========================================
+ Coverage   39.66%   39.80%   +0.14%
==========================================
  Files          99       99
  Lines       13736    13683      -53
==========================================
- Hits         5448     5447       -1
+ Misses       7621     7569      -52
  Partials      667      667

Impacted Files
Coverage Δ

pkg/mysql/client.go
34.69% <0.00%> (+2.49%)
:arrow_up:

pkg/dataset/priority_queue.go
66.30% <0.00%> (-1.09%)
: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 6f5a27d...a363b4c. Read the comment docs.


Issues importing the package

No matching export in "browser-external:util" for import "TextEncoder" in Vite (SvelteKit).
 > node_modules/gpt3-tokenizer/dist/gpt3-tokenizer.esm.js:1:9: error: No matching export in "browser-external:util" for import "TextEncoder"
    1 │ import { TextEncoder, TextDecoder } from 'util';
      ╵          ~~~~~~~~~~~

 > node_modules/gpt3-tokenizer/dist/gpt3-tokenizer.esm.js:1:22: error: No matching export in "browser-external:util" for import "TextDecoder"
    1 │ import { TextEncoder, TextDecoder } from 'util';
      ╵                       ~~~~~~~~~~~

12:57:34 AM [vite] error while updating dependencies:
Error: Build failed with 2 errors:
node_modules/gpt3-tokenizer/dist/gpt3-tokenizer.esm.js:1:9: error: No matching export in "browser-external:util" for import "TextEncoder"
node_modules/gpt3-tokenizer/dist/gpt3-tokenizer.esm.js:1:22: error: No matching export in "browser-external:util" for import "TextDecoder"
    at failureErrorWithLog (/src/tymek-cz/node_modules/esbuild/lib/main.js:1493:15)
    at /src/tymek-cz/node_modules/esbuild/lib/main.js:1151:28
    at runOnEndCallbacks (/src/tymek-cz/node_modules/esbuild/lib/main.js:941:63)
    at buildResponseToResult (/src/tymek-cz/node_modules/esbuild/lib/main.js:1149:7)
    at /src/tymek-cz/node_modules/esbuild/lib/main.js:1258:14

Edit: this might be related: https://github.com/vitejs/vite/pull/6493

Ahh, thanks for submitting the issue. Currently it is built with NodeJS only packages and I need to swap out implementation for the TextEncoder and TextDecoder in order for browser usage. I will spend some time this week to do it.
I think there is an npm package called lib0 that can resolve the issue. If you have some extra time please give a hand and take a crack at it! Cheers!

@Tymek Please try the latest v1.1.2, it should work on the browser now. Please let me know if there are any more issues!

Hello @lhr0909 I have tested your update https://github.com/Niputi/vite-tests/tree/npm-gpt3-tokenizer

the browser dist version should end with .mjs
the readme is wrong. it should be import GPT3Tokenizer from 'gpt3-tokenizer' as you use default export.
it's possible to instantiate TextEncoder and TextDecoder in node environment without importing from util, so why import from util?

This is what worked for me (node v18.1.0):
tokenizer.mjs
import GPT3Tokenizer from 'gpt3-tokenizer'

const tokenizer = new GPT3Tokenizer.default({ type: 'gpt3' })

const str = "hello 👋 world 🌍";
const encoded = tokenizer.encode(str);
const decoded = tokenizer.decode(encoded.bpe);

console.log(encoded);
console.log(decoded);


please update root-zone trust-anchors in dnssec_test.py file

Users of your software that enable DNSSEC will not be able to validate DNS after October the 11th 2018.
Your repository contains a dnssec_test.py file without the new DNSSEC trust-anchors:
resolver.add_ta(".   IN DS   19036 8 2 49AAC11D7B6F6446702E54A1607371607A1A41855200FD2CE1CDDE32F24E8FB5")
It should also include:
resolver.add_ta(".   IN DS   20326 8 2 E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC683457104237C7F8EC8D")
More information can be found at: https://www.icann.org/resources/pages/ksk-rollover
Please don’t hesitate to get in touch.
Warmly,
Roy Arends
ICANN

This should be a clone of upstream unbound but for 1 branch. This issue should be filed the upstream repo through their bugzilla if it were still an issue.
This is both fixed upstream and on my repo too. https://github.com/chantra/unbound/blob/master/libunbound/python/examples/dnssec_test.py#L32


New context API [Proposal]

Similar to property and data. The goal is to add a new context function so we can provide a safer way to use contexts. The new API should:

Classify added variables by parent component, so children cannot accidentally override their values
Allow child components to specify just the variables they need
Merge context variables directly into the assigns
Allow static checking
Consider an added context variable part of the public interface, forcing the author to treat it as such (encourage him to provide documentation for it, etc.)
Export all information regarding contexts for later introspection. This way tools like ElixirSense can provide features like autocomplete, Go-to-definition and documentation preview for various editors.

Example
Form
defmodule Form do
  ...

  @doc "The form data"
  property for, :any, required: true

  @doc "The Form struct created by the <Form/> component"
  context :set, form

  def begin_context(props, context) do
    form = form_for(props.for, ...)
    Map.put(context, :form, form)
  end

  def render(assigns) do
    ~H"""
    {{ @form }}
    ...
    """
  end
  ...
end

Pay attention that form was automatically merged into the assigns. The @context.form is no longer available. Anything available to the user must be in the assigns and must have been explicitly declared using the API. Also notice that the begin_context now receives the context as an extra argument since props.context will no longer be available.
Field
defmodule Field do
  ...

  ### Public

  @doc "The field name"
  property field, :string, required: true

  @doc "The field name specified in the <Field/> component"
  context :set, field, :string, scope: :children

  ### Private

  context :get, form, from: Form

  def begin_context(props, context) do
    field = String.to_atom(props.field)
    Map.put(context, :field, field)
  end

  def render(assigns) do
    ~H"""
    <div class="field">
      {{ label(@form, @field, class: "label") }}
      ...
    </div>
    """
  end
  ...
end

The scope: :children option informs that the context variable field will only be available to its children, otherwise it would override the existing field property. The static checker will not allow overriding existing properties or data and should raise an error. The goal is to force the user to be explicit about the origin of anything present in the assigns.
TextInput
defmodule TextInput do
  ...

  context :get, form, from: Form
  context :get, field, from: Field

  def render(assigns) do
    ~H"""
    {{ text_input(@form, @field, ...) }}
    """
  end
end

Feel free to send any comment or suggestion you might have.
@brainlid since you already got your hands dirty with contexts before,  I'd love to hear your thoughts on this one :)
Cheers.

Update:
Since we now have to explicitly declare context variables, there's no need to implement the end_context/1 callback anymore so it will be removed from the API. There will be only an init_context/1 callback which should return the values to be added. The values will be automatically merged to the context and automatically removed at the end of the scope. Example:
context :set, field, :any

def init_context(assigns) do
  {:ok, field: assigns.field}
end

Closed in #44


Tracker: [Could not resolve hostname]

So synching the pi overnight and today, logged in this evening to find the error message in the title and stopped at about 2%

That is not nearly enough information for anyone to begin to guess what your problem is.
What happens when you reboot it?

Nothing yet as I haven’t tried it, thought I'd post in case it's a known issue that I couldn't find when I searched. I'll reboot later and see what happens

So it seems to be a DHCP issue in the end, i've rebooted and plugged directly into the router and its picked up where it left off


Wrong policy is specified in the FAQ topic "What is the default refresh interval after updates are made to site list contents?"

The section https://docs.microsoft.com/en-us/deployedge/edge-ie-mode-cloud-site-list-mgmt#what-is-the-default-refresh-interval-after-updates-are-made-to-site-list-contents says the following:
What is the default refresh interval after updates are made to site list contents?
The site list is refreshed in Microsoft Edge every two hours. You can change this interval the NavigationDelayForInitialSiteListDownloadTimeout policy. The minimum refresh interval is 30 minutes.
It points to the NavigationDelayForInitialSiteListDownloadTimeout policy for this, but it should point to the internetexplorerintegrationsitelistrefreshinterval policy: https://docs.microsoft.com/en-us/deployedge/microsoft-edge-policies#internetexplorerintegrationsitelistrefreshinterval

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

ID: a1a4c286-c376-c1aa-86d8-80a842861435
Version Independent ID: a1a4c286-c376-c1aa-86d8-80a842861435
Content: Cloud Site List Management for Internet Explorer (IE) mode (Public Preview)'
Content Source: edgeenterprise/edge-ie-mode-cloud-site-list-mgmt.md
Product: microsoft-edge
GitHub Login: @dan-wesley
Microsoft Alias: shisub

@cakin027 Thanks for the feedback! I've passed it on to the team to review.

@cakin027 The documentation has been updated.  Thanks for letting us know.


feat: PLNSRVCE-1280- Verify the logs of failed pipeline are stored persistently

Description
This PR added one more result test for verifying if the logs of failed pipeline are stored persistently.  This PR will require PR #441 to be merged first
Issue ticket number and link
Type of change

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

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist:

[x] I have performed a self-review of my code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] I have added meaningful description with JIRA/GitHub issue key(if applicable), for example HASSuiteDescribe("STONE-123456789 devfile source")
[ ] I have updated labels (if needed)

/retest

/retest

/test redhat-appstudio-e2e

/test redhat-appstudio-e2e

/test redhat-appstudio-e2e

/test redhat-appstudio-e2e


Is multiple ethernet possible for docker option?

Description of problem:
I want to use docker with bond which includes multiple ethernets,
I generated bond using nmcui, and configured /etc/sysconfig/docker and tried to restart docker.
systemctl restart docker
however, docker didn't start...
docker version:
Client version: 1.6.2
Client API version: 1.18
Go version (client): go1.4.2
Git commit (client): ba1f6c3/1.6.2
OS/Arch (client): linux/amd64
Server version: 1.6.2
Server API version: 1.18
Go version (server): go1.4.2
Git commit (server): ba1f6c3/1.6.2
OS/Arch (server): linux/amd64

docker info:
Containers: 2
Images: 93
Storage Driver: devicemapper
 Pool Name: docker-253:1-356462-pool
 Pool Blocksize: 65.54 kB
 Backing Filesystem: xfs
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data Space Used: 7.51 GB
 Data Space Total: 107.4 GB
 Data Space Available: 28.8 GB
 Metadata Space Used: 7.864 MB
 Metadata Space Total: 2.147 GB
 Metadata Space Available: 2.14 GB
 Udev Sync Supported: true
 Data loop file: /var/lib/docker/devicemapper/devicemapper/data
 Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
 Library Version: 1.02.93-RHEL7 (2015-01-28)
Execution Driver: native-0.2
Kernel Version: 3.10.0-229.7.2.el7.x86_64
Operating System: CentOS Linux 7 (Core)
CPUs: 4
Total Memory: 7.603 GiB
Name: zns.qc
ID: SCQ3:JNDM:UIZM:LNR3:UIN2:NAB2:XZR3:5TUW:D3KG:A3GS:DY7P:DWC3

uname -a:
root
Environment details (AWS, VirtualBox, physical, etc.):
CentOS Linux release 7.1.1503 (Core)
Question:
I want to use network bond for DOCKER_OPTS like
OPTIONS="-b=bond"

Is it possible to use multiple ethernet?

@letusfly85 You can have multiple network interfaces in a container using https://github.com/jpetazzo/pipework
I'm going to close this as this is a solution you can use right away. The networking system is still being developed to allow more flexible custom network drivers.
Please feel free to comment if you have any other questions.

@unclejack
Thanks, I'll try this! :smile:

@unclejack
I got it!
Thank you!!! :+1: :smile:


Update sbt-typelevel to 0.6.5

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

🔍 Files still referring to the old version number
The following files still refer to the old version number (0.6.3).
You might want to review and update them manually.
website/package-lock.json
website/yarn.lock

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

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

labels: sbt-plugin-update, early-semver-minor, semver-spec-patch, version-scheme:early-semver, old-version-remains, commit-count:n:2

Superseded by #275.


[Avatar] Fix error when name is falsey

Fixes #247

Deploy preview for gestalt ready!
Built with commit 62f3b12fae5ce85e7e1f20aad3c3b519403931b9
https://deploy-preview-248--gestalt.netlify.com

Deploy preview for gestalt ready!
Built with commit 6a85e2113512152caaa7bb0f0b09688f71b44ec7
https://deploy-preview-248--gestalt.netlify.com

Warnings

:warning:

Bundle size increase

Filename
Size Diff
Gzip Diff
Prev Size
Current Size
Prev Gzip
Current Gzip

gestalt.js
:small_red_triangle: 0.0%
:small_red_triangle: 0.0%
268.24 KB
268.25 KB
59.53 KB
59.54 KB

gestalt.es.js
:small_red_triangle: 0.0%
:small_red_triangle: 0.0%
265.62 KB
265.63 KB
59.17 KB
59.18 KB

  Generated by :no_entry_sign: dangerJS

Codecov Report

Merging #248 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master     #248   +/-   ##
=======================================
  Coverage   70.73%   70.73%
=======================================
  Files          46       46
  Lines         820      820
  Branches      188      189    +1
=======================================
  Hits          580      580
  Misses        169      169
  Partials       71       71

Impacted Files
Coverage Δ

packages/gestalt/src/Avatar/Avatar.js
100% <100%> (ø)
: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 3f54534...c0965dd. Read the comment docs.


Why does visual automation takes a long time to load?

pre-emptive query for visual automation release #386

If visual automation is used, SikuliX, OpenCV (for computer vision) and Tesseract (for OCR) will be loaded in the background in order to enable computer vision capabilities.
On a MacBook Air (2014), it takes around 15 seconds to load the engine before the first step that uses visual automation can execute. On Windows laptops, or newer laptops, the loading time will be much shorter.
If visual automation (TagUI will automatically detect from your script) is not used, then no loading of the computer vision engine will be done and there is no such lag time before execution.


Building (and packaging) Rumprun Unikernel

Kernel: 4.3.4 x86_64
System: Nixos 16.03pre76756.885acea
Nix version: 1.11.1
Nixpkgs version: 16.03pre76756.885acea

Hi guys, I'm having a hard time building the rumprun unikernel. Specifically it's having troubles resolving the machine/cdefs.h header.
I'm using a nix-shell with stdenv, which
Here's the error log:
CC=/home/peter/experiments/unikernels/rumprun/rumprun/obj-amd64-hw/rumptools/bin/x86_64--netbsd-gcc /home/peter/experiments/unikernels/rumprun/rumprun/obj-amd64-hw/rumptools/bin/nbmkdep -f InstrProfilingFile.d.tmp  --   -std=gnu99    -D__NetBSD__ -Ulinux -U__linux -U__linux__ -U__gnu_linux__ --sysroot=/home/peter/experiments/unikernels/rumprun/rumprun/obj-amd64-hw/rumptools/dest  -D_LIBC -DLIBC_SCCS -DSYSLIBC_SCCS -D_REENTRANT -D_DIAGNOSTIC -DHESIOD -DINET6 -DNLS -I/home/peter/experiments/unikernels/rumprun/rumprun/src-netbsd/lib/libc/include -I/home/peter/experiments/unikernels/rumprun/rumprun/src-netbsd/lib/libc -I/home/peter/experiments/unikernels/rumprun/rumprun/src-netbsd/sys -I/home/peter/experiments/unikernels/rumprun/rumprun/src-netbsd/lib/libc/compat/../locale -I/home/peter/experiments/unikernels/rumprun/rumprun/src-netbsd/lib/libc/compat/stdlib -I/home/peter/experiments/unikernels/rumprun/rumprun/src-netbsd/lib/libc/compat/../stdlib -D__BUILD_LEGACY -I/home/peter/experiments/unikernels/rumprun/rumprun/src-netbsd/lib/libc/../../common/lib/libc/quad -I/home/peter/experiments/unikernels/rumprun/rumprun/src-netbsd/lib/libc/../../common/lib/libc/string -I/home/peter/experiments/unikernels/rumprun/rumprun/src-netbsd/lib/libc/../../common/lib/libc/arch/x86_64/string -D__DBINTERFACE_PRIVATE -I/home/peter/experiments/unikernels/rumprun/rumprun/src-netbsd/libexec/ld.elf_so -I/home/peter/experiments/unikernels/rumprun/rumprun/src-netbsd/lib/libc/dlfcn -I/home/peter/experiments/unikernels/rumprun/rumprun/src-netbsd/lib/libc/gdtoa -I/home/peter/experiments/unikernels/rumprun/rumprun/src-netbsd/lib/libc/locale -DNO_FENV_H -I/home/peter/experiments/unikernels/rumprun/rumprun/src-netbsd/lib/libc/arch/x86_64/gdtoa -DWITH_RUNE -I/home/peter/experiments/unikernels/rumprun/rumprun/src-netbsd/lib/libc -DPOSIX_MISTAKE -DCOMPAT__RES -DUSE_POLL -DPORTMAP -DWIDE_DOUBLE -DALL_STATE -DUSG_COMPAT  -Wno-missing-prototypes  -Wno-old-style-definition  -Wno-strict-prototypes  -Wno-uninitialized  -Wno-cast-qual    /home/peter/experiments/unikernels/rumprun/rumprun/src-netbsd/sys/external/bsd/compiler_rt/dist/lib/profile/InstrProfilingFile.c > error.txt
In file included from /nix/store/n2wxp513rr00f6hr2dy0waqahns49dch-glibc-2.21/include/features.h:365:0,
from /nix/store/n2wxp513rr00f6hr2dy0waqahns49dch-glibc-2.21/include/inttypes.h:25,
from /home/peter/experiments/unikernels/rumprun/rumprun/src-netbsd/sys/external/bsd/compiler_rt/dist/lib/profile/InstrProfiling.h:25,
from /home/peter/experiments/unikernels/rumprun/rumprun/src-netbsd/sys/external/bsd/compiler_rt/dist/lib/profile/InstrProfilingFile.c:10:
/home/peter/experiments/unikernels/rumprun/rumprun/src-netbsd/sys/sys/cdefs.h:62:27: fatal error: machine/cdefs.h: No such file or directory
#include <machine/cdefs.h>
^
compilation terminated.
nbmkdep: compile failed.

I've tried doing this before, and its really not fun. BSD and the Rump build stuff has this /usr/src concept that really does not play will with Nix.

Ha! It's painful.
So, I'm looking into it more and in Ubuntu, the netbsd-gcc resolves inttypes.h from within the rumpctrl/rump/include/ headers, in Nixos the netbsd-gcc resolves the inttypes.h from the /nix/store/
Any idea how to correct this?

@paspanag was your question answered in the meantime?


Parsing a table name that starts with number returns an error

When passing a basic SELECT statement to the parser with a table name that starts with a number (e.g. '50ks'), I am incorrectly getting an error.  This is not the case if the number is later in the table name (e.g. 'ks50').
Request: "SELECT * FROM csv.50k"
Error msg: "Parsing halted while starting to recover from another error."
If I add backticks around the table name, it works, but wanted to flag b/c I believe this should be considered valid as well.  Please correct me if that is wrong!
In either case, it would be great to get a better error message aligned with other errors from the parser.
When I dug into the parser, I noticed that a better error message is getting flagged but is getting overwritten before the actual error is thrown.  That msg is - "Parse error on line 1:\nSELECT * FROM csv.50k\n-----------------^\nExpecting 'LITERAL', 'BRALITERAL', 'EOF', 'WITH', 'COMMA', 'AS', 'LPAR', 'RPAR', 'PIVOT', 'UNPIVOT', 'DOT', 'ORDER', 'WHERE', 'NOT', 'UNION', 'INTERSECT', 'EXCEPT', 'FROM', 'CROSS', 'OUTER', 'NATURAL', 'JOIN', 'INNER', 'LEFT', 'RIGHT', 'FULL', 'SEMI', 'ANTI', 'ON', 'USING', 'GROUP', 'LIMIT', 'OFFSET', 'END', 'ELSE', 'GO', 'SEMICOLON', got 'NUMBER'"

Good point. I see no reason numbers are not added to the lexical grammar for table names. I am testing a fix that will let it start with numbers - but looks like you will alwayse have to include a letter in the name.

Thank you, Mathias!  I understand the constraint around numbers as table names and we can be sure to document the need to backtick the table name in that scenario.
Appreciate the quick response!  Hope you all are doing well and staying safe and sane.

Mathias, one thing I just noticed when passing a number in as table name - i.e. SELECT * FROM csv.50 - the parser is translating the from statement to a table value with alias (see below)
yy.Table {   "tableid": "csv",   "as": ".50" }
Is this something that could be resolved to return an error or is this expected behavior?

Interesting aspect. Thank you for letting me konw.
I guess its the actual file name that is causing the problem. Have you tried to do a SELECT * FROM CSV('filename') ?

@mathiasrw sorry, that was a bad example.  csv in the above example is just the schema name that had been used in the bug reported to me.  It could be any string value - i.e. dev.50, temperature.101, etc.


Plugin Presets Via Toggle

I have two presets (4t and 7t) that I want to easily toggle back and forth. I could set one hotkey to b and the other to n, but it would be nice to develop the muscle memory to having it be the same hotkey. Have the plugin check for multiple hotkeys being the same. And have them cycle through the list of those presets when pressed. So I have 4t on. I press 'B', and 7t enables. I press 'B' again, and 4t comes back on. Etc. Thanks!

I guess it could be made to work like that. Currently the logic for the keybind/preset matching just loops the plugin preset list and enabled the first matching preset and it could be extended to enable the next matching preset if there is multile presets with same keybind...
I'd say that this has some possibility to cause some usage problems when some presets have the same keybind. Someone might think that 2 presets having the same keybind turns both presets on with that single keybind; which it doesn't do and will not do because of presets possibly collapsing together. That same problem applies to the preset keybind cycling.
Should same keybinds notice somehow that it cycles to the next one? If so, then how?

Closing as stale

Reopening this after there was other requests for this kind of feature. Will be implemented as so when 2 presets have same keybinds they toggle between each other and for multiple presets withg same keybind the next presets in the preset list will be enabled.

Added in ae1b28ec9000bc7ec17916b5f2512cf662e63494.
2 presets with the same keybind toggle between them and 3 or more cycle from top to bottom in the preset list.


Add input_type option

Add input_type option to support embed v3 models

@billytrend-cohere Shouldn't we use a different value of input_type for documents and queries?

You're right, updated to support user override but also sensible defaults. Thanks!

Actually sorry I don't think we should merge this. Thinking about it, I don't think we should try provide a default value for this, else we end up with the same issue as the model default as we upgrade. Will update PR now


when run auto_pruners_torch.py with save file flag, the log print out "Layer: conv1  Sparsity: 0.0000",  infact the sparsity is 0.3

Environment:ubuntu 18.04

NNI version: 1.7
NNI mode (local|remote|pai): local
Client OS: ubuntu 18.04
Server OS (for remote mode only):
Python version: 3.6
PyTorch/TensorFlow version:1.5.1+cu101
Is conda/virtualenv/venv used?: no
Is running in Docker?: no

Log message:
Evaluation result (masked model): 0.9833
[08/04/2020, 12:00:00 PM] INFO (nni.compression.torch.compressor) Layer: conv1  Sparsity: 0.0000
[08/04/2020, 12:00:00 PM] INFO (nni.compression.torch.compressor) Layer: conv2  Sparsity: 0.0000
[08/04/2020, 12:00:00 PM] INFO (nni.compression.torch.compressor) Model state_dict saved to ./model_masked.pth
[08/04/2020, 12:00:00 PM] INFO (nni.compression.torch.compressor) Mask dict saved to ./mask.pth

nnimanager.log:
dispatcher.log:
nnictl stdout and stderr:

What issue meet, what's expected?:
How to reproduce it?:
python3 auto_pruners_torch.py
Additional information:

This issue is fixed in PR https://github.com/microsoft/nni/pull/2736.
Thanks for your comments @weiqiangshen , please fetch the latest code from the master branch.

@weiqiangshen - as a reference, this fix will be released on the upcoming release: https://github.com/microsoft/nni/issues/2608 (current target release date is Aug 17).

I’m closing this issue as we have fixed the problem you raised, please feel free to reopen if you are still seeing it an active issue.


Implement popups based on errors

Whenever some error occurs during login,signup or logout then there must be different popups for different errors.
For example:

If user email is already used
If user doesn't exist
If password is not strong
If email is invalid

I have added some example error messages from firebase in signup,.js

Try adding alert(error.message) to the
catch (error) {
  // Show different popups on different errors:
  // 1. Firebase: Error (auth/email-already-in-use).
  // 2. Firebase: Password should be at least 6 characters (auth/weak-password).
  console.log(error.message);
  👉 alert(error.message);  //Like this
  setUserDetails({
    username: "",
    email: "",
    password: "",
  });
}

it should bring a popup on the browser window of the exact error message in the popup.

Hello there,
I am going to do this with react-toastify because alert looks very simple.
Thanks.


ESM problem with wrong export * as IOptions from './interfaces/IOptions';

Describe the bug
While using the package as ESM within nestJS, I run into a problem in the ts-migrate-mongoose/esm/migrator.js file in line 11.
export * as IOptions from './interfaces/IOptions';
The detailed error message:
Error: Cannot find module '/xyz/node_modules/ts-migrate-mongoose/dist/esm/interfaces/IOptions' imported from /xyz/node_modules/ts-migrate-mongoose/dist/esm/migrator.js
    at new NodeError (node:internal/errors:405:5)
    at finalizeResolution (node:internal/modules/esm/resolve:324:11)
    at moduleResolve (node:internal/modules/esm/resolve:943:10)
    at defaultResolve (node:internal/modules/esm/resolve:1129:11)
    at nextResolve (node:internal/modules/esm/loader:163:28)
    at ESMLoader.resolve (node:internal/modules/esm/loader:835:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:77:40)
    at link (node:internal/modules/esm/module_job:76:36)

To Reproduce
Add the ts-migrate-mongoose package in your ESM NestJS projects package.json
Try to run migrations at NestJS service startup.
Expected behavior
ts-migrate-mongoose/bash
/esm.sh
should add the missing '.js'-file-ending for the export pattern used in  ts-migrate-mongoose/esm/migrator.js file in line 11 so that this line ends up like export * as IOptions from './interfaces/IOptions.js';

PR: https://github.com/ilovepixelart/ts-migrate-mongoose/pull/248

Released in: https://github.com/ilovepixelart/ts-migrate-mongoose/releases/tag/v3.5.6

@ilovepixelart - thanks for your quick change an the new version!


Simplify data fetching with RSC, Suspense, and use API in Next.js

The original blog info

subject
content

title
Simplify data fetching with RSC, Suspense, and use API in Next.js

url
blog url

author
Nico Prananta

Simplify data fetching with RSC, Suspense, and use API in Next.js
Authors

Name
Nico Prananta
Twitter
Follow me: @2co_p

Data fetching in the React ecosystem has been a hot topic for a long time. Since React is not opinionated about how data is fetched, the community has come up with various solutions.
Fetch-in-effect
One solution that is simple and doesn't need any dependencies is using JavaScript's fetch and the useEffect hook.
function ProfilePage() {
  const [user, setUser] = useState(null);

  useEffect(() => {
    fetchUser().then(u => setUser(u));
  }, []);

  if (user === null) {
    return
Loading profile...
;
  }
  return (
    <>

{user.name}

      <ProfileTimeline />
    </>
  );
}

function ProfileTimeline() {
  const [posts, setPosts] = useState(null);

  useEffect(() => {
    fetchPosts().then(p => setPosts(p));
  }, []);

  if (posts === null) {
    return
Loading posts...
;
  }
  return (

      {posts.map(post => (

{post.text}

      ))}

  );
}

However, this approach has some drawbacks. First, without careful handling, it can lead to race conditions, as I have discussed before, and memory leaks, which happen when the component is unmounted before the fetch is completed.
Second, the fetch-in-effect approach causes network waterfall. This means that the data is fetched after the code for the component is downloaded and loaded. Now, if you have a component that fetches data in effect and it renders a child component that fetches data in effect, it will take a while for the child component to be rendered to the user.
Third, you need to write the API endpoints to return the data that your component needs. This can be a bit tedious and error-prone.
The lack of data fetching recommendations from the React team led to several popular solutions like TanStack Query and SWR. They simplify data fetching by providing a set of APIs that handle fetching and caching for you.
Then came the Suspense
Then React finally released Suspense. With Suspense, you can show a fallback component while the actual component is loading. Once the data is fetched, the Suspense component will render the component with the data. Unlike fetch-in-effect, Suspense is designed so that data fetching and code downloading are done in parallel, avoiding the network waterfall problem.
However, it’s important to remember that Suspense is not a data fetching mechanism. If you look at the official documentation of Suspense, you'll notice that React doesn't specifically mention data fetching. It says that Suspense is a mechanism to show a fallback UI while the component is loading. In the examples, they don't even show how the data is fetched. They don't show how you can actually suspend the component to activate Suspense. They recommend using data fetching with Suspense-enabled frameworks like Relay and Next.js.
Non-framework tools like SWR have finally supported Suspense, but it's still experimental and React doesn't actually recommend it. According to the announcement:

Suspense works best when it’s deeply integrated into your application’s architecture: your router, your data layer, and your server rendering environment.

I honestly think this is a mistake by the React team. They created Suspense and know exactly how it works. React should have come with an official API for Suspense-enabled data fetching instead of leaving it to the community to figure out.
RSC and its controversy
Sebastian Markbåge from the Next.js team, who is in the React core team, tweeted recently: "React never released official Suspense support on the client because it leads to client waterfalls. Instead, we shifted to an RSC strategy." I guess making Suspense work on the client without waterfalls is a hard problem to solve. While they stated that they might expose additional primitives that could make it easier to access your data without the use of opinionated frameworks, as of this writing, they focus instead on React Server Components (RSC).
RSC is a somewhat controversial technology. It was created to improve the efficiency of rendering React components on the server. Before RSC, React could already render components on the server, but it wasn't possible to feed the components with data fetched from the server. Frameworks like Next.js use a certain loader function like getServerSideProps, which allows us to fetch data from a database or third-party API and pass it to the page component as props in server-side rendering.
With RSC, we don't need a dedicated loader function anymore. Every server component can fetch its own data within the component itself. This avoids the need to fetch all data in one place and pass it from the root component to all the child components.
It's controversial because you cannot use RSC by itself. You need to use a framework like Next.js or Waku. And since Next.js is the poster child for RSC, many people accuse Vercel of forcing RSC to make more profit. The complicated caching mechanism and the many ways to render a page don't help the case.
Not to mention that there are many easy-to-misinterpret terms. For example, although they are named server components, they are not only executed and rendered on the server whenever the page is requested. They are also executed and rendered during build time. However, they are also not ALWAYS executed and rendered on the server when a request comes.
By default, server components in Next.js are static, which means they are only executed and rendered during build time. They won't be executed and rendered again on the server when the page is requested. You have to explicitly tell Next.js that your server component is dynamic by exporting a dynamic constant with the force-dynamic value, or by calling one of the dynamic functions.
Another confusing term is the use server directive. To mark a React component as a client component, you can add the use client directive at the top of the component. Naturally, people will assume that the use server directive is the opposite of use client, but it’s not. use server is a directive that marks server-side functions that can be called from client-side code. It's actually related to Server Actions.
RSC, Suspense, and use API
Despite the pitfalls mentioned above, RSC is fun to use in my experience. I've been using it in my work and personal projects for a while now. With RSC and Suspense, we can immediately send the static parts of the page to the client, and the components that need data can be suspended and rendered once the data is ready.
For example, in the following code, when the user visits the /suspense page, they will immediately see the static parts of the page like the
 and the Footer.
app/suspense/page.tsx
import { Suspense } from 'react'
import Albums from '../albums'
import Songs from '../songs'
import { headers } from 'next/headers'
import Loading from '../loading'
import Footer from '../footer'
import ErrorBoundaryWithFallback from '../fallback-error'

export default function Page() {
  headers()

  return (

Suspense Demo

        <ErrorBoundaryWithFallback>
          <Suspense fallback={<Loading />}>
            <Albums />
            <Songs />
          </Suspense>
        </ErrorBoundaryWithFallback>

  )
}

Meanwhile, the albums data is fetched on the server and sent to the client once it's available. While waiting for the albums data, the Loading component will be rendered. Once the data is fetched, the Albums component will be rendered with the data.
albums.tsx
import { Suspense } from 'react'
import { albumsData, relatedAlbums } from './albums-data'

export default async function Albums() {
  const albums = await albumsData()
  return (

Albums

      {albums.map((album) => (

{album.name}

{album.artist}

{album.year}

          <Suspense fallback={
Loading related...
}>
            <RelatedAlbums albumId={album.id} />
          </Suspense>

      ))}

  )
}

You can see the demo here.
In the example above, the Albums component wrapped in Suspense is a server component. But what if the component that needs data fetched on the server is a client component? A client component cannot be an async function. This is where the experimental use API comes to the rescue.  Instead, it's called the use API. I wonder why.
With RSC, Suspense, and the use API, data fetching can start early on the server and be awaited on the client.
app/suspense/hoisted-client/race/page.tsx
import { headers } from 'next/headers'
import Albums from './albums'
import Songs from './songs'
import { albumsData } from '../../albums-data'
import { songsData } from '../../songs-data'
import Footer from '../../footer'

export default function Page() {
  headers()

  const getAlbumsData = albumsData() // returns a promise but we don't need to await it
  const getSongsData = songsData() // returns a promise but we don't need to await it

  return (

Suspense Hoisted Race Demo

        <Albums dataSource={getAlbumsData} />
        <Songs dataSource={getSongsData} />

  )
}

albums.tsx
'use client'
import { Suspense, use } from 'react'
import { albumsData } from '../../albums-data'
import ErrorBoundaryWithFallback from '../../fallback-error'

export default function Albums({ dataSource }: { dataSource: ReturnType<typeof albumsData> }) {
  return (

Albums

      <ErrorBoundaryWithFallback>
        <Suspense fallback={
Loading albums...
}>
          <AlbumsList dataSource={dataSource} />
        </Suspense>
      </ErrorBoundaryWithFallback>

  )
}

function AlbumsList({ dataSource }: { dataSource: ReturnType<typeof albumsData> }) {
  const albums = use(dataSource) // this causes the AlbumsList to be suspended until the data is available

  return (
    <>
      {albums.map((album) => (

{album.name}

{album.artist}

{album.year}

      ))}
    </>
  )
}

You can check the demo here. In the demo, the data fetching is intentionally delayed and randomly throw errors.
Delightful data fetching pattern
There are several things I like about this pattern aside from how it avoids the network waterfall. First, it's easy to test the component. During the test, we can just pass a function to AlbumsList that returns a promise with the data needed by AlbumsList. We don't need an additional library to mock or stub the function.
Second, the component is simplified, which makes it easier to understand. We don't need to implement data fetching with fetch-in-effect or use TanStack Query or SWR. The component doesn't need to know how to implement the fetching logic. It just needs to wait for the data to be available, thanks to the use API.
Third, Suspense helps to reduce the complexity of the component even more. There's no need to implement conditional rendering for the loading state. It's all handled by Suspense. The component only needs to render the data when it's available.
It's all optional
I'm not saying that you have to use RSC, Suspense, and the use API. You can still use fetch-in-effect or TanStack Query or SWR. It's all optional. That's one of the great things about React. They take backward compatibility seriously. If you don't like the new API, you can still use the old API. And if you don't like the old API, you can start using the new API. If you want to create a Single Page Application (SPA), you can. The choice is yours.
PS: You might be interested in reading about caching mechanism in RSC here.
Update: I wrote another post showcasing an example of using this pattern. Read How to Show Task Sequence Progress with React Suspense and RSC in Next.js post.

By the way, I have a book about Pull Requests Best Practices. Check it out!

使用 RSC、Suspense 简化数据获取，并在 Next.js 中使用 API
作者

姓名
尼科·普拉南塔
叽叽喳喳
关注我：@2co_p

React 生态系统中的数据获取长期以来一直是一个热门话题。由于 React 对于如何获取数据没有固执己见，因此社区提出了各种解决方案。
获取效果
一种简单且不需要任何依赖项的解决方案是使用 JavaScript 的“fetch”和“useEffect”挂钩。
function ProfilePage() {
  const [user, setUser] = useState(null);

  useEffect(() => {
    fetchUser().then(u => setUser(u));
  }, []);

  if (user === null) {
    return
Loading profile...
;
  }
  return (
    <>

{user.name}

      <ProfileTimeline />
    </>
  );
}

function ProfileTimeline() {
  const [posts, setPosts] = useState(null);

  useEffect(() => {
    fetchPosts().then(p => setPosts(p));
  }, []);

  if (posts === null) {
    return
Loading posts...
;
  }
  return (

      {posts.map(post => (

{post.text}

      ))}

  );
}

然而，这种方法有一些缺点。首先，如果不仔细处理，它可能会导致竞争条件，正如我之前讨论过的，以及内存泄漏，当组件在组件之前被卸载时会发生这种情况。抓取完成。
**其次，有效获取方法会导致网络瀑布。**这意味着在下载并加载组件代码后才获取数据。现在，如果您有一个有效获取数据的组件，并且它渲染了一个有效获取数据的子组件，则需要一段时间才能将子组件呈现给用户。
第三，您需要编写 API 端点来返回组件所需的数据。这可能有点乏味并且容易出错。
由于 React 团队缺乏数据获取建议，因此出现了几种流行的解决方案，例如 TanStack Query 和 SWR。它们通过提供一组为您处理获取和缓存的 API 来简化数据获取。
然后悬念来了
然后React终于发布了Suspense。使用 Suspense，您可以在加载实际组件时显示后备组件。获取数据后，Suspense 组件将使用数据渲染组件。 与 fetch-in-effect 不同，Suspense 的设计使得数据获取和代码下载并行完成，避免了网络瀑布问题。
然而，重要的是要记住 Suspense 不是一种数据获取机制。如果你查看官方的Suspense文档，你会发现React并没有特别提到数据获取。它说 Suspense 是一种在组件加载时显示后备 UI 的机制。在示例中，它们甚至没有显示如何获取数据。 **他们没有展示如何实际挂起组件来激活 Suspense。**他们建议使用支持 Suspense 的框架（如 Relay 和 Next.js）来获取数据。
像 SWR 这样的非框架工具终于支持了 Suspense，但它仍然处于实验阶段，而且 [React 实际上并不推荐它](https://react.dev/blog/ 2022/03/29/react-v18#suspense-in-data-frameworks）。根据公告：

当 Suspense 深入集成到您的应用程序架构中时，效果最佳：您的路由器、数据层和服务器渲染环境。

老实说，我认为这是 React 团队的一个错误。他们创造了悬念并确切地知道它是如何运作的。 React 应该附带一个官方 API，用于支持 Suspense 的数据获取，而不是让社区来解决。
RSC 及其争议
来自 Next.js 团队的 Sebastian Markbåge（React 核心团队成员）最近 tweet：“React 从未在客户端上发布官方 Suspense 支持，因为它相反，我们转向了 RSC 策略。” 我想让 Suspense 在没有瀑布的情况下在客户端上工作是一个很难解决的问题。虽然他们表示[他们可能会公开额外的原语，这些原语可以使您在不使用固定框架的情况下更轻松地访问数据](https://react.dev/blog/2022/03/29/react-v18#suspense-in -data-frameworks），在撰写本文时，他们专注于 React 服务器组件（RSC）。
RSC 是一项颇具争议的技术。它的创建是为了提高在服务器上渲染 React 组件的效率。在 RSC 之前，React 已经可以在服务器上渲染组件，但无法向组件提供从服务器获取的数据。像 Next.js 这样的框架使用特定的加载器函数，例如“getServerSideProps”，它允许我们从数据库或第三方 API 获取数据，并将其作为服务器端渲染中的 props 传递给页面组件。
有了 RSC，我们不再需要专用的加载器函数。 **每个服务器组件都可以在组件本身内获取自己的数据。**这避免了需要在一个地方获取所有数据并将其从根组件传递到所有子组件。
这是有争议的，因为您不能单独使用 RSC。您需要使用 Next.js 或 Waku 等框架。由于 Next.js 是 RSC 的典型代表，许多人指责 Vercel 迫使 RSC 赚取更多利润。复杂的缓存机制和多种[渲染页面](https: //nextjs.org/docs/app/building-your-application/rendering）对这种情况没有帮助。
更不用说还有很多容易误解的术语。例如，尽管它们被命名为服务器组件，但它们不仅在请求页面时在服务器上执行和呈现。 它们也在构建期间执行和渲染。然而，当请求到来时，它们也不会总是在服务器上执行和呈现。
默认情况下，Next.js 中的服务器组件是静态，这意味着它们仅在构建期间执行和呈现。当请求页面时，它们不会在服务器上再次执行和呈现。您必须通过[使用“force-dynamic”值导出“dynamic”常量]（https://nextjs.org/docs/app/api-reference/）明确告诉 Next.js 您的服务器组件是“动态”的file-conventions/route-segment-config#dynamic)，或通过调用[动态函数]之一(https://nextjs.org/docs/app/building-your-application/rendering/server-components#dynamic-功能）。
另一个令人困惑的术语是“use server”指令。要将 React 组件标记为客户端组件，您可以在组件顶部添加 use client 指令。自然地，人们会认为“use server”指令与“use client”相反，但事实并非如此。 [use server 是一个指令，标记可以从客户端代码调用的服务器端函数](https://react.dev/reference/rsc/use-server#noun-labs-1201738-(2 ))。它实际上与服务器操作有关。
RSC、Suspense 和使用 API
尽管存在上述缺陷，但根据我的经验，RSC 使用起来很有趣。我已经在我的工作和个人项目中使用它有一段时间了。借助 RSC 和 Suspense，[我们可以立即将页面的静态部分发送给客户端，一旦数据准备好，就可以暂停并渲染需要数据的组件](https://nextjs.org/docs/app/构建您的应用程序/数据获取/模式#streaming）。
例如，在下面的代码中，当用户访问“/suspense”页面时，他们将立即看到页面的静态部分，例如“”和“Footer”。
应用程序/悬念/page.tsx
import { Suspense } from 'react'
import Albums from '../albums'
import Songs from '../songs'
import { headers } from 'next/headers'
import Loading from '../loading'
import Footer from '../footer'
import ErrorBoundaryWithFallback from '../fallback-error'

export default function Page() {
  headers()

  return (

Suspense Demo

        <ErrorBoundaryWithFallback>
          <Suspense fallback={<Loading />}>
            <Albums />
            <Songs />
          </Suspense>
        </ErrorBoundaryWithFallback>

  )
}

同时，专辑数据会在服务器上获取并在可用后发送到客户端。在等待专辑数据时，将渲染“Loading”组件。获取数据后，“Albums”组件将随数据一起呈现。
专辑.tsx
import { Suspense } from 'react'
import { albumsData, relatedAlbums } from './albums-data'

export default async function Albums() {
  const albums = await albumsData()
  return (

Albums

      {albums.map((album) => (

{album.name}

{album.artist}

{album.year}

          <Suspense fallback={
Loading related...
}>
            <RelatedAlbums albumId={album.id} />
          </Suspense>

      ))}

  )
}

您可以在此处查看演示。
在上面的示例中，包裹在“Suspense”中的“Albums”组件是一个服务器组件。 但是，如果需要在服务器上获取数据的组件是客户端组件怎么办？ 客户端组件不能是异步函数。这就是实验性的“use” API 发挥作用的地方。旁注：出于某种原因，React 没有将其称为“use”钩子。相反，它被称为“use”API。我想知道为什么。
借助 RSC、Suspense 和“use” API，数据获取可以在服务器上尽早开始并在客户端等待。
应用程序/悬念/hoisted-client/race/page.tsx
import { headers } from 'next/headers'
import Albums from './albums'
import Songs from './songs'
import { albumsData } from '../../albums-data'
import { songsData } from '../../songs-data'
import Footer from '../../footer'

export default function Page() {
  headers()

  const getAlbumsData = albumsData() // returns a promise but we don't need to await it
  const getSongsData = songsData() // returns a promise but we don't need to await it

  return (

Suspense Hoisted Race Demo

        <Albums dataSource={getAlbumsData} />
        <Songs dataSource={getSongsData} />

  )
}

专辑.tsx
'use client'
import { Suspense, use } from 'react'
import { albumsData } from '../../albums-data'
import ErrorBoundaryWithFallback from '../../fallback-error'

export default function Albums({ dataSource }: { dataSource: ReturnType<typeof albumsData> }) {
  return (

Albums

      <ErrorBoundaryWithFallback>
        <Suspense fallback={
Loading albums...
}>
          <AlbumsList dataSource={dataSource} />
        </Suspense>
      </ErrorBoundaryWithFallback>

  )
}

function AlbumsList({ dataSource }: { dataSource: ReturnType<typeof albumsData> }) {
  const albums = use(dataSource) // this causes the AlbumsList to be suspended until the data is available

  return (
    <>
      {albums.map((album) => (

{album.name}

{album.artist}

{album.year}

      ))}
    </>
  )
}

您可以在此处查看演示。在演示中，数据获取被故意延迟并随机抛出错误。
令人愉快的数据获取模式
除了它如何避免网络瀑布之外，我还喜欢这种模式的几个优点。首先，**测试组件很容易。**在测试期间，我们只需将一个函数传递给 AlbumsList，该函数返回一个包含 AlbumsList 所需数据的 Promise。我们不需要额外的库来模拟或存根该函数。
其次，组件被简化，更容易理解。我们不需要使用 fetch-in-effect 来实现数据获取，也不需要使用 TanStack Query 或 SWR。组件不需要知道如何实现获取逻辑。 它只需要等待数据可用，这要归功于“use” API。
第三，Suspense 有助于进一步降低组件的复杂性。 **加载状态不需要实现条件渲染。**这一切都由 Suspense 处理。该组件仅需要在数据可用时呈现数据。
都是可选的
我并不是说您必须使用 RSC、Suspense 和 use API。 您仍然可以使用 fetch-in-effect 或 TanStack Query 或 SWR。这都是可选的。这是 React 的伟大之处之一。他们非常重视向后兼容性。如果您不喜欢新的 API，您仍然可以使用旧的 API。如果您不喜欢旧的 API，您可以开始使用新的 API。如果您想创建单页应用程序 (SPA)，您可以。 选择是你的。
PS：您可能有兴趣阅读RSC 中的缓存机制。
更新：我写了另一篇文章，展示了使用此模式的示例。阅读如何在 Next.js 中使用 React Suspense 和 RSC 显示任务序列进度 帖子。

顺便说一句，我有一本关于 Pull 请求最佳实践的书。看看！

客户端 use 更讨喜些


Refresh doesn't work when also using bash

Clicking the result of this output:
echo "Refresh | refresh=true

Will re-run the script and refresh the content. Clicking the result of this output:
echo "Refresh | refresh=true bash=echo param1=hello";

Will run echo hello in bash and not re-run and refresh the content.
It would be really useful if this worked. Specifically, if the refresh occurred after the bash command had completed. This would allow (for example) the brew update checking script to clear itself back to zero once you've updated.

This is a known issue (#216). Try with terminal=false.


pouchdb-auth: TypeError: Cannot read property 'to' of undefined

I'm still getting this error, previously reported in the old repo after upgrading to version 4.0.0:
    TypeError: Cannot read property 'to' of undefined

      at installWrappers (node_modules/pouchdb-wrappers/lib/index.js:48:29)
      at Object.<anonymous>.exports.installWrapperMethods (node_modules/pouchdb-wrappers/lib/index.js:39:3)
      at PouchDB.Object.<anonymous>.exports.installSecurityMethods (node_modules/pouchdb-security/lib/index.js:32:14)
      at Object.<anonymous>.exports.installSystemDBProtection (node_modules/pouchdb-system-db/lib/index.js:25:35)
      at node_modules/pouchdb-auth/lib/index.js:67:16

My bad: I used pouchdb-adapter-memory directly. Using pouchdb-memory works, probably because it includes pouchdb-replication.
Close if you will.

Ok, thanks for reporting back. I think I'll close this, if the use case for not wanting pouchdb-replication comes up we can reconsider.


BEP: Make proc filename keyword optional for other (T1, EPI, etc) modalities

Continuing my trend (#47) of demands, I would like to add _proc to the campaign.
The original usecase (https://github.com/nipy/heudiconv/issues/266) is NORMalized (intensity normalization performend by the scanner software) T1w and T2w anatomicals.  NORM'ed files accompany non-normalized original raw data.  Sure thing I could just consider them "derivative" images and drop them, but some researchers might believe in that preprocessing superiority and demand them to be present in their raw BIDS datasets since that is what they get from the scanner.
Given that there is now _proc field (introduced optional for stim and meg) I do not see why it should not be allowed (optional as well) for pretty much any other modality (in particular anat, bold, dwi).

Because it is not about reconstruction type. Reconstruction was the same afaik, only to one postprocessing was applied. If I were to stick it to some random field I would probably use _acq, but that is the point - why to stick into a random field with loose or inappropriate semantic?

Please open a pull request with the change and we will see if anyone objects.


Uninstalling then reinstalling a package produces METADATA error

Steps to reproduce:

Installing some package, let's say pandas

uv venv env1 -p 3.10
source env1/bin/activate
uv pip install pandas

Uninstalling it and installing it again:

uv pip uninstall pandas
uv pip install pandas

Produces the following error:

error: Failed to read metadata for: pandas==2.2.0
  Caused by: failed to open file `~/env1/lib/python3.10/site-packages/pandas-2.2.0.dist-info/METADATA`
  Caused by: No such file or directory (os error 2)

Am I doing something wrong?

Hm interesting, I can't reproduce this:
❯ source .venv/bin/activate
❯ uv pip install pandas
Resolved 6 packages in 96ms
Downloaded 2 packages in 499ms
Installed 2 packages in 26ms
 + numpy==1.26.4
 + pandas==2.2.0
❯ uv pip uninstall pandas
Uninstalled 1 package in 87ms
 - pandas==2.2.0
❯ uv pip install pandas
Resolved 6 packages in 3ms
Installed 1 package in 16ms
 + pandas==2.2.0

It might be useful to see the contents of ~/env1/lib/python3.10/site-packages/pandas-2.2.0.dist-info or similar after the uninstall, and then after the second install.

After the uninstall the folder ~/env1/lib/python3.10/site-packages/pandas-2.2.0.dist-info is empty, but it still exists
After the second install attempt it remains empty.
I tried to manually remove the pandas-2.2.0.dist-info before the second installation attempt, and then the installation succeeded!
So it seems that this folder was not removed during the uninstall, which causes this issue.

Great, that's really helpful! Just confirming: it's totally empty, no dotfiles or anything, right? Will review.

Yes, it is totally empty - nothing shows up with ls -a
Thanks!

Thanks! I have at least one idea here.

I checked it in version 0.1.13, and I don't get this issue anymore. Closing, I guess :)

having similar problems on 0.4.27 on linux I think, whenever i do a uv pip uninstall and then uv pip install I end up in the following situation. Wondering if there's an argument/command I can utilize to get out of this state instead of manually deleting the dist-info file or re-creating the .venv
warning: Failed to uninstall package at .venv/lib/python3.8/site-packages/aiobotocore-2.13.3.dist-info due to missing `RECORD` file. Installation may result in an incomplete environment.


Function for the reading of QVAR data

Hi, I would like to know if it is possible to create a library or a function to acquire QVAR data as for example it is present for the ILPS22QS sensor using the Arduino IDE and a Nucleo-64 stm32 board.

Linked to https://www.stm32duino.com/viewtopic.php?t=1963

Hello @ce97 ,
it's in the TODO list. I keep you informed when the QVAR support will be added to the library.
Best Regards,
Carlo

Thank you!

You can find QVAR support in the last release of the library. So we can close this issue.


getrolloutestimate is moved from CLI to RPC

Solves #19

Thanks I incorporated your commit into PR #33


[optional] this could be extracted to a constant outside the test like we do in some other tests.

          [optional] this could be extracted to a constant outside the test like we do in some other tests.

Originally posted by @rootulp in https://github.com/celestiaorg/celestia-app/pull/3301#discussion_r1570982634

Already addressed in https://github.com/celestiaorg/celestia-app/pull/3351/files by @ninabarbakadze, if yes then we can close this issue.


Focus Zones shrunk

Microsoft PowerToys version
v0.57.2
Running as admin

[X] Yes

Area(s) with issue?
FancyZones
Steps to reproduce
First my setup. I'm on a work laptop, Dell 7400 2-in-1, connected to a thunderbolt adapter with 2 addition monitors (34in and 27in)
I set up some new overlapping focus zones yesterday on all screens but the issue was on the laptop screen. When I woke my computer this morning, I decided to do a restart (didn't check the zones before the restart) but after the restart, when I went to snap a window to one of the zones, they had shrunk to only a small portion of the screen. See the attached screenshot, where it shows them small in the zone editor. That's the same layout I setup yesterday, but the outer edges of the zones were to the extents of the screen when I setup, not shrunk down in the middle like that. I also haven't un-docked the computer either, so nearly the exact same situation

✔ Expected Behavior
Was expecting to turn my computer on and have the same zone setup as when I left it last night
❌ Actual Behavior
The zone on my laptop screen had mostly kept its layout, but appears to have shrunk.
Other Software
No response

There were some issues and changes with Canvas style zones lately, regarding scaling. Try deleting the layout and re-creating it.

@avanvliet did layout recreation help?
/needinfo

Hello - Yes, that is the first thing I did. I was mostly submitting the
ticket just to provide feedback in case you needed/wanted additional data
on the error.
I have also noticed that if I put my laptop to sleep for the night, and
return the next morning, the windows (at least some of them) are in
different zones. The zones themselves are still the same as I set up the
previous day, but some of the various windows I had open the night before
were definitely not where I left them.
On Mon, Apr 18, 2022 at 3:46 AM Seraphima Zykova @.***>
wrote:

@avanvliet https://github.com/avanvliet did layout recreation help?
/needinfo
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/PowerToys/issues/17768#issuecomment-1101306089,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AV7IJEPXLJS7QZ3A2UIINVTVFU4RRANCNFSM5TQZQLIQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

Can you please attach a /bugreport to help us investigate the windows positioning problem?

Sure, see attached. This particular bug happened a few days ago now though,
and I've restarted my computer since then. Hopefully the bugreport is still
helpful.
On Wed, Apr 20, 2022 at 2:06 AM msftbot[bot] @.***>
wrote:

Hi there!
We need a bit more information to really debug this issue. Can you add a
"Report Bug" zip file here?  Then drag the zipfile from your desktop onto the
GitHub comment box in this issue. Thanks!
[image: Report Bug]
https://user-images.githubusercontent.com/11349917/133042052-4975be21-4699-4363-83c9-a8e1869d079d.png
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/PowerToys/issues/17768#issuecomment-1103665013,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AV7IJENTQID3T6YCUJZFUH3VF7CKVANCNFSM5TQZQLIQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

Sure, see attached. This particular bug happened a few days ago now though, and I've restarted my computer since then. Hopefully the bugreport is still helpful.

I'm sorry, files can't be attached via email. You'll need to attach it to a comment on Github, it's the only way.

Are you still experiencing this issue? /needinfo

Hi, sorry this request was from over 2 years ago, so no, i am not still
experiencing the issue as I'm not using PowerToys anymore.
On Wed, Oct 23, 2024 at 12:41 PM Kayla Cinnamon @.***>
wrote:

Are you still experiencing this issue? /needinfo
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/PowerToys/issues/17768#issuecomment-2433285977,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AV7IJEJJ3A6MLLMKWESPCPLZ473VJAVCNFSM6AAAAABQPROA56VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZTGI4DKOJXG4
.
You are receiving this because you were mentioned.Message ID:
@.***>

--
Thanks!
Andrew


Use API additions.

Hi, pinnwand (which is what bpaste runs on) has for a while now supported returning the full paste_url. This pull request makes use of that.
Please don't merge yet because while testing this I noted that the wrong protocol is returned (http vs https) :)

Please tweak the commit message to point out what changes, perhaps "Use API-provided URL in PinnwandPastebin", otherwise LGTM.

It's listed in the full commit message:

pinnwand added support for returning the full paste url a while back and
its more resilient than concatenating the URL.

Merge is dependent on this issue which I have planned for tomorrow: https://github.com/supakeen/pinnwand/issues/28 will ping you :)

It's listed in the full commit message or is it not clear enough?

I'd prefer having it in the first line ("subject"), it makes the change more obvious in tools that don't show the full message, e.g. git log --oneline or other condensed history viewers.
...while it kinda feels like I'm splitting hairs, it's one of those minor tech debt things that can't be reasonably fixed down the road.
If you're not up for it (for any reason, no judgment), I can just make the change.

I've updated the commit message and the bpaste.net instance of pinnwand now correctly returns a HTTPS link!


[Bug]: CrewAI LLM Logs are visible but tools and actions logs are not present or not proper

Contact Details
No response
📦 Package Version
0.3.17
🎞 Framework Version
CrewAI
🔎 Describe the Bug
From our Discord: https://discord.com/channels/1139221568803840152/1294328000770474116

I have integrated agentops with a simple Crewai app.  I can view the LLM calls but tools are not visible and actions are not logged properly.
A screenshot of the action log is attached.
Code repo :
https://github.com/ConfuzedCoder/crewAgents

🤝 Contribution

[ ] Yes, I'd be happy to submit a pull request with these changes.
[ ] I need some guidance on how to contribute.
[X] I'd prefer the AgentOps team to handle this update.

roger that
anyone working on this atm?

roger that
anyone working on this atm?

We could definitely use help with this


Search Operators by Date

Notes by @timabbott from https://github.com/zulip/zulip/issues/10385#issuecomment-475012637:

We should start with building the backend (tests in test_narrow, etc.) with support for the textual syntax we have in mind, which we should copy from https://chat.zulip.org/#narrow/stream/9-issues/topic/Search.20by.20date.20.2310385 once that discussion conclusions.  Current notes are:

before: and after: for date ranges, with an inclusive model.
date: for a specific date (that seems a lot cleaner for a single day, and is what you want for e.g.
date:today; this seems a lot cleaner than needing to do before:today after:today or whatever.  From the original request I think this is likely the main use case.

Next, we should add that to the frontend search typeahead so that one can discover it
And the textual search documentation.
Think about adding aliases for common searches like during:, today, etc.

Only once those are done should we spend time on integrating the date picker part of this (we can use our existing flatpickr integration, but there's a ton of details to figure out here that are a paste of time to discuss until we have the backend and can play with it).

My two cents:

Accept partial dates like date: 2023-05 to show all messages from May 2023 (as such equivalent to after:2023-05-01 before: 2023-05-31) or date:2021 to show all messages of that year.
If before and after are inclusive, I would rather name them from and to/until, which would also match the from keyword in Slack.


Fixing exploring a table

Error was store.js?081e:59 Uncaught TypeError: Cannot read property 'filter' of undefined when clicking a table from the table list view.

This is a minor bugix, merging.

thanks @mistercrunch! 🎉


Send messages as bot instead of as user

Is your feature request related to a problem? Please describe.
There are two ways to send a message in Matrix, as a bot or as a user. In Element, messages sent from bots appear grey, while messages sent from users appear black or white depending on the theme. I noticed that my bot made with this library has its messages sent as a user instead of as a bot, even though this library is specifically for creating bots.
Describe the solution you'd like
Send messages as a bot, since the library is built for bots.

Can you provide screenshots?

Notice how my message is white and the bot's response is grey:

Here's what it looks like under light theme:

That was back when I used maubot. Now with simplematrixbotlib, the response would also be white, as if I logged into the bot account on a normal Matrix client and sent it myself.

What maubot method were you using to send the messages?

Not sure, I was just using the reactbot plugin.

Can you send me the Matrix event sources of one of the events of each bot?

How can I get that info?

With the element client, hover over the message,  click options, click view source

maubot:
{
  "content": {
    "body": "AMD Drivers: https://amd.com/en/support\nnVidia Drivers: https://nvidia.com/Download/index.aspx\nRealtek Drivers: https://www.realtek.com/en/downloads\n",
    "msgtype": "m.notice"
  },
  "origin_server_ts":<PHONE_NUMBER>225,
  "room_id": "!EWPxWFbOucPMmdTsdh:privacytools.io",
  "sender": "@tscbot:envs.net",
  "type": "m.room.message",
  "unsigned": {
    "age": 455978308
  },
  "event_id": "$90IWsiNs_b9TQPQtcwcAjcGQYvFD5UPwyYDN4I4GJXM",
  "user_id": "@tscbot:envs.net",
  "age": 455978308
}

simplematrixbotlib:
{
  "content": {
    "body": "I have been online for 29 seconds.",
    "msgtype": "m.text"
  },
  "origin_server_ts":<PHONE_NUMBER>643,
  "room_id": "!qBaeEuoSHSgyUrBQeq:fairydust.space",
  "sender": "@tscbot:envs.net",
  "type": "m.room.message",
  "unsigned": {},
  "event_id": "$mHF_onBgHz_i4cMix8b_2yHZGWcaL3rHDbXPjqAjk3o",
  "user_id": "@tscbot:envs.net"
}

I think the magic field here is "msgtype": "m.notice".

Could you try using the send_markdown_message method as shown in https://simple-matrix-bot-lib.readthedocs.io/en/latest/manual.html#using-the-send-markdown-message-method ?

Will be closed soon unless a response is sent.

Yes, sorry. It seems the previous reply went to my spam folder and I didn't see it. That method worked.


Episerver Admin UI JSON import does not invalidate cache in Load Balanced environment

Hi,
If a JSON file is imported in Admin UI, the Episerver Cache is not invalidated and other servers in a load balanced environment does not have the latest resources. Workaround is to restart all other servers.
I have not validated if XLIFF import have the same issue.
Cache will be invalidated if I change a value im Admin UI manually.
Using version 5.6.0 (sorry I did not have the time to test with 5.7.0).
Thanks in advance!

is lib working for you at all?? :)

We are using it very heavily :-)
Client is happy and I am happy with it!


Switch out Connexion for APIFlask

Ticket
{TICKET_LINK} - TODO
Changes
This is a draft as a few areas of implementation might warrant a bit of discussion (will comment on the PR for areas I'd like to talk through).
This replaces Connexion with APIFlask, a separate framework for wrapping Flask that generates API models
Context for reviewers
This approach specifically uses Marshmallow Dataclasses instead of just Marshmallow (as detailed at https://apiflask.com/schema/#use-dataclass-as-data-schema ). This approach lets us always work with just dataclass objects which auto-generate the marshmallow schema behind the scenes.
Testing
TODO - add a few screenshots.
You can run locally via make clean-volumes init run-logs and go to localhost:8080/docs to see the endpoints.

double checking, did you want an initial review on this while it's in draft, or should i wait until it's in "ready for review" state?

This is ready for review - the draft bit is to make clear there are a few areas I expect discussion + I need to update the docs / ticket description a bit more. Functionally it should be complete.

Closing as @lorenyu handled this in https://github.com/navapbc/template-application-flask/pull/51


Sibling SubViewports must be rendered from top to bottom

Sibling SubViewports must be rendered in the same order as in the Scene Tree, from top to bottom. _sort_active_viewports() reversed their order.
Fixes #65545
This is not the "Kahn algorithm" anymore, that's why I removed the comment. It resembles an "Iterative Depth First Postorder Tree Traversal" with the added benefit of keeping the Siblings in the correct order.

This still seems to be in activation order (reversed from before), which works fine by default, and may have unexpected results if the order of nodes is moved using move_child.

Thanks!


[ConstraintSystem] Bail out of applyFunctionBuilderBodyTransform if there is a failure in constraint generation.

Previously, this crashed in cases where the function builder transform was applied to a function body and there were constraint generation errors:
@ViewBuilder var body: some View {
  Text(undeclared)
}

Resolves: rdar://problem/59856491

@swift-ci please smoke test

Spurious failure on Linux. Trying again.

@swift-ci please smoke test Linux


Ledger resource doc is missing some fields

The ledger resource doc is missing:

total_coins (string)
fee_pool (string)
base_fee (number, stroops)
base_reserve (string, lumens)
max_tx_set_size (number)

@nullstyle I’m happy to do a PR, but I’m not clear on total_coins (is this # of lumens in circulation?) and fee_pool (sum of all transaction fees since last inflation?). Is max_tx_set_size the max number of transactions that will be nominated as described here, or just the max that can be accepted, period? I'm not really sure.

@Mr0grog:  correct on total_coins and fee_pool.  Regarding max_tx_set_size, I'm not quite sure so @jedmccaleb will have to interject.  My understanding is that max_tx_set_size represents the number of transactions that may be nominated per ledger.

a lot of these are described here: https://www.stellar.org/developers/guides/concepts/ledger.html so maybe link to this.  Yes max_tx_set_size is the surge pricing you linked to.


UI tick boxes missing

On the menu, in View, the tick boxes next to Dashboard and Debug messages are missing, so you can't toggle them on and off.
In fact, they do make them appear, but you can't then make them disappear.
There used to be a ticky box for node status indicators - has that been dumped in favour of always on?
Fine with me, but just wondered if it was meant to be there still?

The debug/dashboard options never were tick boxes. They are options to show that sidebar tab.
The status option has moved into the settings dialog under the view tab.

Just to expand on that...
Not all sidebar tabs can be hidden. Debug/info are not hideable. Config nodes and dashboard are hideable.
The menu is not (and never was) a toggle. They bring the corresponding tab to the front. If you want to remove a hideable tab, you click the cross in its tab bar.

thanks - yup - makes good sense :)


New rule: object-property-newline

Enforce placing object properties on separate lines.
eslint rule: https://github.com/eslint/eslint/blob/master/docs/rules/object-property-newline.md
    "object-property-newline": [2, { "allowMultiplePropertiesPerLine": true }]

OK:
var obj = { foo: 'foo', bar: 'bar', baz: 'baz' }

var obj2 = {
    foo: 'foo', bar: 'bar', baz: 'baz'
}

Not OK:
var obj = { foo: 'foo',
  bar: 'bar', baz: 'baz'
}

var obj = {
  foo: 'foo', bar: 'bar',
  baz: 'baz'
}

Ecosystem breakage:
# tests 427
# pass  419
# fail  8

This rule will be included in standard v8

Hm, this means I can no longer use a "dsl" like this :(
module.exports = [
  { name: 'application', path: '/', component: Application, abstract: true, children: [
    { name: 'home', path: '', component: Home },
    { name: 'messages', async: Messages },
    { name: 'status', path: ':user/status/:id' },
    { name: 'profile', path: ':user', component: Profile, abstract: true, children: [
      { name: 'profile.index', path: '', component: ProfileIndex },
      { name: 'profile.lists' },
      { name: 'profile.edit' }
    ]}
  ]}
]

@KidkArolis Sorry this makes life a bit more difficult for you. You can selectively disable this rule in files where you're defining DSLs by adding a comment to the top of the file:
/* eslint-disable object-property-newline */

Yeah, no worries, <3 standard, found a couple workarounds.
On Sat, 10 Sep 2016 at 20:44, Feross Aboukhadijeh<EMAIL_ADDRESS>wrote:

@KidkArolis https://github.com/KidkArolis Sorry this makes life a bit
more difficult for you. You can selectively disable this rule in files
where you're defining DSLs by adding a comment to the top of the file:
/* eslint-disable object-property-newline */
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/feross/standard/issues/524#issuecomment-246133251,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AATzWG5AAh_zSqv7hbvhjpa008wT0utEks5qowiYgaJpZM4If1Y0
.


PMID:16822282

decreased caspase activity
resistance to oxidative stress

resistance to oxidative stress FYPO:0007161

decreased caspase activity

added a narrow synonym to FYPO:0005285
edit file: 3b5f796febc2b25269ce60781e60e3413ae8d76a
release: 99fe37a8af866c5a704407dbfa93a28c77ef58e6


[animeram] Add new extractor

Support for downloading  videos through 'http://www.animeram.me/' added via new extractor.

youtube-dl does not support sites dedicated to copyright infringement. Can you provide a source that proves that they are allowed to distribute the content they do? Refer to our FAQ on the matter.

Thanks for mentioning this. I am seeing a DMCA link but i guess this proves that they maybe violating copyright since they don't take responsibility for it.
Sorry for the inconvenience caused, can you just verify the link and update(either close this pull request) or accept.

Yes, DMCA notice is inherent to sites violating copyrights therefore we can't include animeram.me, sorry.


ShutdownManager gives an UnauthorizedAccessException Even with System Management Capability.

When ShutdownManager is called, it throws an exception even when System.Management Capability is declared in manifest.
  <Capabilities>     <Capability Name="internetClient" />     <iot:Capability Name="systemManagement" />   </Capabilities>

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

ID: 62a8fcb6-ba44-0d4a-8015-d6ea016881f3
Version Independent ID: bc2d06ab-d3bd-42b8-c964-40f2b18a9370
Content: ShutdownManager Class (Windows.System) - UWP app developer
Content Source: https://cpubwin.visualstudio.com/DefaultCollection/windows-uwp/_git/winrt-api-build?path=%2fwinrt-api-build%2fwindows.system.shutdownmanager.yml&version=GBlive&_a=contents
Product: uwp
Git Login: wdg-dev-content
Microsoft Alias: wdg-dev-content

Closing this issue as there has been no activity for quite some time

i m trying to shutdown my computer from uwp app using  shutdown manager i gave it system management capabiltiy but it still giving unauthorized access exception can anyone help me?


Preprocessing refactor

^ CI breaks only due to dqn and dummy not having implemented recompile_model. Straightforward fix. Disregard Codacy now, merge as needed.

Did some refactoring and renaming by convention. Still wish to do mroe refactoring on the top level later today

Checked dev_dqn for blowups and lunar_landing to benchmark performance vs. master. Able to replicate solve in 222 epis with current best params. But some catastrophically bad episodes also. Stability of param setting to be investigated.


KeyPair should be moved to tests

The KeyPair type in Cardano.Ledger.Keys contains both the private and the public keys, which are never used in the ledger. It doesn't seem like anyone downstream uses that type. The only place were it is useful is in tests, therefore it should be moved to the new cardano-ledger-core:teslib  sublibrary introduced in #3184

:100:

Depends on #3184


at-rule-no-unknown :Unexpected unknown at-rule "@use"

The rule at-rule-no-unknown complains abouse the @use rule, wich is a default rule in sass/scss.
Versions:
  stylelint: 8.4.0
  stylelint-config-standard: 17.0.0
  stylelint-scss: 2.5.0

.stylelintrc.json:
{
    "extends": "stylelint-config-standard",
    "plugins": [
        "stylelint-scss"
    ],
    "rules": {
        "at-rule-no-unknown": null,
        "scss/at-rule-no-unknown": true
    }
}

It should handle the use of @use. Can you give an example of a code that throws an error?

_functions.scss
@use "variables";

output:
scss/_functions.scss
 1:1  ✖  Unexpected unknown at-rule "@use"                     scss/at-rule-no-unknown
         (at-rule-no-unknown)

I'm using the @use rule in my projects, and it does not show an error.
I recognized you are using an old version of everything. Did you try updating all the dependencies to their latest version?

You are using an old version of the package. The support of @use was introduced in Release 3.12.0. Update to this version (or later) to fix the issue.

oh yeah, I did not even check the version because I was expecting the latest one to be used :) Thanks @dsimon-onventis!
@maxjf1 Just updated to the latest version and the error goes away.


[compiler] migrate tui backend into crossterm and support windows build

condition compile to windows
fix bitflags version issue
remove whitespace
Signed-off-by: lemonhx<EMAIL_ADDRESS>
Motivation
close #66
Have you read the Contributing Guidelines on pull requests?
(Write your answer here.)
Test Plan
(Share your test plan here. If you changed code, please provide us with clear instructions for verifying that your changes work.)
Related PRs
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/diem/diem/tree/main/developers.diem.com, and link to your PR here.)
If targeting a release branch, please fill the below out as well

Justification and breaking nature (who does it affect? validators, full nodes, tooling, operators, AOS, etc.)
Comprehensive test results that demonstrate the fix working and not breaking existing workflows.
Why we must have it for V1 launch.
What workarounds and alternative we have if we do not push the PR.

Just to clarify, this enables possibly one restricted kind of Windows build, but many things won't work because ./scripts/dev_setup.sh does not support Windows, and I'm sure we have many violations of windows file path structure in the code (like using "/" in a path).
For Windows development I strongly recommend WSL. Windows native CLion/Intellij supports Rust running in WSL mostly transparently (few bugs). That is how I work on a daily base. Not sure what VSCode does.

@wrwg I will rewrite those script later on in python or powershell for windows.

Just to clarify, this enables possibly one restricted kind of Windows build, but many things won't work because ./scripts/dev_setup.sh does not support Windows, and I'm sure we have many violations of windows file path structure in the code (like using "/" in a path).
For Windows development I strongly recommend WSL. Windows native CLion/Intellij supports Rust running in WSL mostly transparently (few bugs). That is how I work on a daily base. Not sure what VSCode does.

@wrwg I will rewrite those script later on in python or powershell for windows.

I'm not sure whether we want this. Adding Windows support to our repo is a commitment that we need to keep it working and fix potential bugs for all of our tooling to work on Windows. This is something which has not been needed until now because, specifically since WSL, there are not many folks directly developing on Windows.

Just to clarify, this enables possibly one restricted kind of Windows build, but many things won't work because ./scripts/dev_setup.sh does not support Windows, and I'm sure we have many violations of windows file path structure in the code (like using "/" in a path).
For Windows development I strongly recommend WSL. Windows native CLion/Intellij supports Rust running in WSL mostly transparently (few bugs). That is how I work on a daily base. Not sure what VSCode does.

@wrwg I will rewrite those script later on in python or powershell for windows.

I'm not sure whether we want this. Adding Windows support to our repo is a commitment that we need to keep it working and fix potential bugs for all of our tooling to work on Windows. This is something which has not been needed until now because, specifically since WSL, there are not many folks directly developing on Windows.

right, so just be able to compile in msvc toolchain is enough

Just to clarify, this enables possibly one restricted kind of Windows build, but many things won't work because ./scripts/dev_setup.sh does not support Windows, and I'm sure we have many violations of windows file path structure in the code (like using "/" in a path).
For Windows development I strongly recommend WSL. Windows native CLion/Intellij supports Rust running in WSL mostly transparently (few bugs). That is how I work on a daily base. Not sure what VSCode does.

@wrwg I will rewrite those script later on in python or powershell for windows.

I'm not sure whether we want this. Adding Windows support to our repo is a commitment that we need to keep it working and fix potential bugs for all of our tooling to work on Windows. This is something which has not been needed until now because, specifically since WSL, there are not many folks directly developing on Windows.

right, so just be able to compile in msvc toolchain is enough

Yes, we definitely want to be able to create Windows releases at some point of time, and your PR gets us closer to there! What I'm saying is that we may not want to commit to a fully functional dev setup for Windows.

Let me know once this is ready to land.

/land

/help

/land

:lock: Merge Conflict

bors is fixed and seems back to normal, please resolve merge conflict and re-try /land

@LemonHX sorry for the hassle, but there was an issue with bors yesterday so this could not land, and now has a merge conflict.

@wrwg @zihaoccc  PTAL

Great!
/land

@wrwg :exclamation: This PR is still missing approvals, unable to queue for landing

/land

:lock: Merge Conflict

Oh -- you still have a merge conflict. Need to rebase.

@wrwg no confict now

Unfortunately, now a lint error. You need to run "cargo x generate-workspace-hack.

@wrwg fixing now


minor changes related to Editable

correcting the readme and looking at both the context and the class's classloader for the builder.
@iocanel @manusa on the Editable interface, currently there's need for it to be generic, it could just as easily be defined as:
public interface Editable {

  VisitableBuilder<?, ?> edit();
}

or to match the behavior in BaseFluent.builderOf
public interface Editable<T> {

  VisitableBuilder<T, ?> edit();
}

However either of these would likely be considered breaking changes, so I'm not sure if it's worth pursuing.

The suggested change restricts the return type of the edit method to VisitableBuilder without providing the ability specify a concrete builder, which defeats the purpose.

With either of the proposed signatures, the concrete class would still be:
  public ConcreteBuilder edit() {
    return new ConcreteBuilder(this);
  }

Maybe I'm missing something, but when I'm already dealing with the concrete class and the edit method signature is ConcreteBuilder edit(), there's really no need for having the generic parameterized by the builder.

This way the only thing one could do with edit is to call build

That is correct, which is exactly the usage pattern for cloning and builderOf.  The current logic, because of a lack of bounds, doesn't even make an assumption about what the edit method returns:
    if (item instanceof Editable) {
      Object editor = ((Editable) item).edit();
      if (editor instanceof VisitableBuilder) {
        return (VisitableBuilder<T, ?>) editor;
      }
    }

with "VisitableBuilder<T, ?> edit()", this instead becomes
    if (item instanceof Editable) {
      return ((Editable<T>) item).edit();
    }

or a user / fabric8 looking to clone would do
    if (item instanceof Editable) {
      return ((Editable<T>) item).edit().build();
    }

With either of the proposed signatures, the concrete class would still be:
  public ConcreteBuilder edit() {
    return new ConcreteBuilder(this);
  }

Right! The implementing methods return type can be a subtype.

Maybe I'm missing something, but when I'm already dealing with the concrete class and the edit method signature is ConcreteBuilder edit(), there's really no need for having the generic parameterized by the builder.

This way the only thing one could do with edit is to call build

That is correct, which is exactly the usage pattern for cloning and builderOf.

Why not just go for a clone/copy method instead? Calling edit without editing seems a little weird to me.

The current logic, because of a lack of bounds, doesn't even make an assumption about what the edit method returns:
    if (item instanceof Editable) {
      Object editor = ((Editable) item).edit();
      if (editor instanceof VisitableBuilder) {
        return (VisitableBuilder<T, ?>) editor;
      }
    }

with "VisitableBuilder<T, ?> edit()", this instead becomes
    if (item instanceof Editable) {
      return ((Editable<T>) item).edit();
    }

I am missing the context here.

Right! The implementing methods return type can be a subtype.

But in practice they won't be - as far as I can understand classes that implement Editable will be generated so the concrete signature will always be as expected.

I am missing the context here.

This is being looked at under https://github.com/fabric8io/kubernetes-client/issues/5135 and the prospective changes to our generation logic https://github.com/fabric8io/kubernetes-client/pull/5138 - but I understand that changing the generic parameters of Editable or the signature of edit may not be worth considering.
In the current BaseFluent logic - https://github.com/sundrio/sundrio/blob/259219a10376a1beaaf5191306cd22c10b5706ea/core/src/main/java/io/sundr/builder/BaseFluent.java#L35 - is doing an instanceOf and an unchecked cast.  I was trying to at least avoid the instanceOf and/or simply the Editable interface.  You could of course just do something like
public interface Editable<T extends VisitableBuilder<?, T>> {

  T edit();
}

to stick with the current interface and provide a little additional typing.

Why not just go for a clone/copy method instead? Calling edit without editing seems a little weird to me.

That's fine with me as well, I presume that would added for now as a default method on Editable correct?  Unless the generic parameters were expanded to include the concrete type, copy would have to simply return Object.
Alternatively edit may not right method name - with lombok this method would normally be called toBuilder so it doesn't necessarily connote editing.

I think that we could possibly avoid the unchecked cast by moving the builderOf method from BaseFluent to concrete Fluent. This way we would possibly avoid casting, reflections etc.

I think that we could possibly avoid the unchecked cast by moving the builderOf method from BaseFluent to concrete Fluent. This way we would possibly avoid casting, reflections etc.

Let's table any changes to the Editable interface and the builderOf method to a separate issue / pr, so that we can at least these base changes in.


fix(rebuild): fixing child retirement during rebuild running

Rebuild state is now always Failed when a child is being retired during rebuild
Fixed rebuild job stucking
Fixed several panic conditions

bors try

bors try

bors merge


Date reset when Time is select

When i select date and after select time, the date reset a current day
"react": "^15.4.2",
"react-datepicker": "1.6.x",

Same issue, time change in showTimeSelect+showTimeSelectOnly field resets date to today (Also confirmed in version 3.1.3)

I made a minimal reproducible case: https://stackblitz.com/edit/react-7u9dx3
Everything breaks if you erase last digit

Similar to https://github.com/Hacker0x01/react-datepicker/issues/2319
Has anyone found a fix/solution/workaround?

As a partial workaround, for cases where a dropdown is also available, https://github.com/Hacker0x01/react-datepicker/issues/942 provides information on how to block users to manually enter text.

Similar to #2319
Has anyone found a fix/solution/workaround?

passing the props "selected" will retain the value after use select the date
<DatePicker
  selected={ new Date(value || '')  }
  placeholderText='01/01/2022 08:30'
  autoComplete='off'
  showTimeSelect={ showTimeSelect }
  timeFormat='HH:mm'
  value={ value }
  onChange={ handleChange }
  className={ inputClassName }
/>

Similar to #2319
Has anyone found a fix/solution/workaround?

passing the props "selected" will retain the value after use select the date
<DatePicker
  selected={ new Date(value || '')  }
  placeholderText='01/01/2022 08:30'
  autoComplete='off'
  showTimeSelect={ showTimeSelect }
  timeFormat='HH:mm'
  value={ value }
  onChange={ handleChange }
  className={ inputClassName }
/>