Documentation incorrect

Hi, I'm wondering why is documentation totally different than this example? I mean creating webhook in that case - https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/api-reference/aaa-premium#post-account-activity-all-env-name-webhooks ?
Or am I missing something?

Hey there, what specifically are you referring to that is different? I can happily get the documentation updated as needed. Are you referring to the OAuth mode for webhook registration, or something else?

I'll open this internally for our documentation, but I'll leave this issue open for now as a reminder.

is this still valid?
$ curl --request POST --url 'https://api.twitter.com/1.1/account_activity/all/:ENV_NAME/webhooks.json?url=https%3A%2F%2Fyour_domain.com%2Fwebhook%2Ftwitter' --header 'authorization: OAuth oauth_consumer_key="CONSUMER_KEY", oauth_nonce="GENERATED", oauth_signature="GENERATED", oauth_signature_method="HMAC-SHA1", oauth_timestamp="GENERATED", oauth_token="ACCESS_TOKEN", oauth_version="1.0"'
im getting this error
{"errors":[{"code":32,"message":"Could not authenticate you."}]}
can't subscribe to account activity api

I have the same error. Do you find a solution ? @Mrwh0

Hi.. I have the same error..

well i set up a flask_rest_enpoint.py
#!/usr/bin/python3.6
#-*- coding: utf-8 -*-
from flask import Flask, request , abort , make_response , jsonify
TWITTER_CONSUMER_SECRET = b'your_API_secret_key_here'
app = Flask(__name__)
@app.route("/webhook/twitter", methods=['GET'])
def webhook_challenge():
    try:
        if request.args.get('crc_token'):
            sha256_hash_digest = hmac.new(TWITTER_CONSUMER_SECRET,bytes(request.args.get('crc_token'),"utf-8"), digestmod=hashlib.sha256).digest()
            response = {
             'response_token': 'sha256=' + (base64.b64encode(sha256_hash_digest)).decode("utf-8")
            }
            return json.dumps(response)
    except:
        abort(make_response(jsonify(message="Internal Server Error"), 500))
if __name__ == "__main__":
   app.run(host='<IP_ADDRESS>', port=5060)

run that rest server and use the account-activity-dashboard
https://github.com/twitterdev/account-activity-dashboard

create the webhook config
node example_scripts/webhook_management/create-webhook-config.js -e environment -u url
node example_scripts/webhook_management/create-webhook-config.js -e your_enviroment_here -u https://yout_domain.com_here/webhook/twitter
response : {"id":"webhook_config_id","url":"https://your_domain.com/webhook/twitter","valid":true,"created_timestamp":"a_cool_unix_timestamp"}

if you need re-validate the webhook
node example_scripts/webhook_management/validate-webhook-config.js -e your_enviroment_here -i the_webhook_config_id_here

hope it helps..

Having recently integrated.  I would ask that this feedback be relayed to the documentation teams in twitter.  :pray:
If we wouldn't have discovered this repo we would not have been able to finish an integration.  Many of the endpoints mentioned in the documentation around registering a webhook, registering subscriptions etc weren't even the right endpoint in the documentation.   We had to locate the correct one from the code here.

Can you be specific so that we can fix the reference documentation?

Unfortunately we pushed our way through it and managed to find this code base with the correct api's.  So with out going through it with out the knowledge again I wouldn't be able to find it.
I think this is an example of one:
https://developer.twitter.com/en/docs/twitter-api/enterprise/account-activity-api/api-reference/aaa-enterprise#get-account-activity-webhooks
https://api.twitter.com/1.1/account_activity/webhooks.json but needs environment like found: https://github.com/twitterdev/account-activity-dashboard/blob/master/example_scripts/webhook_management/delete-webhook-config.js#L8


Faq backup updaten

This PR resolves the enhancement request https://github.com/corona-warn-app/cwa-website/issues/1319 "Update FAQ https://www.coronawarn.app/en/faq/#backup".
The section of https://www.coronawarn.app/de/faq/ has more information about the vaccination certificate

@MohamedZaghdoudi
This PR also has unrelated changes in it. 🙁 You need to remove the commit https://github.com/corona-warn-app/cwa-website/pull/3260/commits/87b3f38731b6712583193a67e23e3c5bebc96059 related to Berlin from this branch.

@MohamedZaghdoudi
Which operating system are you developing on? If you are using Windows or macOS the GitHub Desktop is quite useful for reordering commits, squashing them or undoing them. It does not cover all the functions available through git, but I certainly use it a lot in parallel with git.

@MohamedZaghdoudi
I have pushed a suggested solution to https://github.com/MikeMcC399/cwa-website/tree/add/faq-backup-section. You are welcome to base a PR on this if you wish. It should cleanly merge into master if needed. Unfortunately I can't clean up your PR easily and directly.

Refer to the previous PR https://github.com/corona-warn-app/cwa-website/pull/3257 for related information. Try working on the same PR and fixing the issue with another commit, please. For example a revert commit. Information is a bit scattered now. But its ok, no worries.
I can also recommend GitHub Desktop for that matter. It greatly helps visualizing the changes and being able to interact with them in a more natural way than the terminal. Let me know if you need help.

This now looks a lot better!

Reformatting the added section for consistent spacing, indentation and cleaning up blank lines would be nice but not essential.

The Pull Request Checklist recommends squashing after correcting errors.

The branch needs to be updated before merging.

@MohamedZaghdoudi Let me know once then final tasks/suggestions have been completed

Please change "updaten" to "update" in the title.


ExtractOfftargets uses fixed absolute path "/mnt/ssd1/Crackling-extractOfftargets"

Hi there,
I found that the ExtractOfftargets program uses a fixed path "/mnt/ssd1/Crackling-extractOfftargets", which may cause errors on the user machine. See https://github.com/bmds-lab/CracklingPlusPlus/blob/08e167ba4dfa40ad01736cd2ebf0b06d8f906c29/ExtractOfftargets/ExtractOfftargets.cpp#L29
Could you please fix this?
Jack

Hi Jack,
I have addressed the issue in  409d710.
Thank you for reaching out.


archimede: init at 0.0.2

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Yes, you need to amend the commit and force push so that there are two commits (one adding maintainer, one adding the package), but it seems you already did that, so as far as I can tell, it is all in order!

I think you accidentally put the two commits in the wrong order... x)


hyprland-0.41.1 causes wezterm to crash when selecting copy

Bug or Regression?
Bug
System Info and Version
 System/Version info
<Paste the output of the command here>
hyprland-0.41.1 in archlinux  repo

Hyprland, built from branch  at commit cba1ade848feac44b2eda677503900639581c3f4  (props: bump version to 0.40.0).
Date: Sat May 4 15:42:32 2024
Tag: v0.40.0, commits: 4606

flags: (if any)

System Information:
System name: Linux
Node name: Archlinux
Release: 6.9.4-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Wed, 12 Jun 2024 20:17:17 +0000

GPU information:
00:02.0 VGA compatible controller [0300]: Intel Corporation Comet Lake UHD Graphics [8086:9bca] (rev 04) (prog-if 00 [VGA controller])

os-release: NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo

plugins:

Description
in hyprland-0.41.1, open wezterm , select some text , then the  wezterm will crash,
After rolling back to 0.40.0, wezterm is back to normal
How to reproduce

in  hyprland-0.41.1
open wezterm and exec some command
use mouse select some text
the wezterm will crash

Crash reports, logs, images, videos
No response

What wezterm version are you using? I'm using latest commit from wezterm and dont experience this. I just can't paste into wezterm.

logs from WAYLAND_DEBUG=1 wezterm please. Also try git, had some fixes

What wezterm version are you using? I'm using latest commit from wezterm and dont experience this. I just can't paste into wezterm.你用的是什么版本的wezterm？我正在使用wezterm的最新提交，但没有经历过这种情况。我就是无法粘贴到wezterm中。

I use wezterm 20240203.110809.5046fc22-2

WAYLAND_DEBUG=1 wezterm

━  WAYLAND_DEBUG=1 wezterm
16:14:00.916  WARN   window::os::x11::connection > Unable to resolve appearance using xdg-desktop-portal: get_appearance.read_setting: Reading xdg-portal org.freedesktop.appearance color-scheme: org.freedesktop.DBus.Error.UnknownMethod: 在路径 org.freedesktop.portal.Settings 的对象上没有“/org/freedesktop/portal/desktop”接口
16:14:05.940  ERROR  wezterm_gui                 > running message loop: process_queued_xcb: process_xcb_event_ime: SendEvent {
    propagate: true,
    destination: Window(
        Window {
            res_id: 2097168,
        },
    ),
    event_mask: NO_EVENT,
    event: SelectionNotifyEvent {
        response_type: 31,
        pad: 1,
        sequence: 0,
        time: 0,
        requestor: Window {
            res_id: 2097168,
        },
        selection: Atom {
            res_id: 249,
        },
        target: Atom {
            res_id: 296,
        },
        property: Atom {
            res_id: 248,
        },
    },
}: X(Window(ValueError { response_type: 0, error_code: 3, sequence: 2914, bad_value: 2097168, minor_opcode: 0, major_opcode: 25, pad: 1 }), Some("x::SendEvent")); terminating

wez is running in x11 mode. Does it happen on wayland?

wez is running in x11 mode. Does it happen on wayland?wez以x11模式运行。它发生在陆地上吗？

I can't run wezterm on wayland, detail: https://github.com/wez/wezterm/issues/5604

wez is running in x11 mode. Does it happen on wayland?wez以x11模式运行。它发生在陆地上吗？

Yes, I enabled Wayland in the WezTerm configuration file. detail: https://github.com/wez/wezterm/issues/5604

WAYLAND_DEBUG=1 wezterm in the terminal
however if it's launching via X11 that won't do anything.

After wezterm is configured to enable wayland, wezterm cannot be opened in terminator or anyrun。
terminator and anyrun are running in wayland mode, confirmed with hyprctl clients

wezterm-git is solved. (only work on wayland=true)

this is a wezterm bug


Windows ignore path fix

Path fix for CopyContents, the ignore files use filepath (https://github.com/openshift/source-to-image/blob/30d81a9440f30b472bb32e592b12c1a83a396edd/pkg/ignore/ignore.go#L58), Ignore probably should too.
Untested on linux.

/assign @bparees
@adambkaplan is unavailable this week @bparees ... if you have cycles ptal to consider adding the approved label; if you don't, no worries, we'll engage with @adambkaplan next week when he becomes available again
thanks


New SSR Next example doesn't work on a multipage app

In my app, after upgrading to mui v5 and migrating to the new SSR strategy I found that I had unstyled pages and an error warning me about a server/client css class name mismatch.
I've isolate the issue here:
https://github.com/mui-org/material-ui/blob/d9aed9cbd6f6360af55eae4d9d673e3f47db2a9b/examples/nextjs/pages/_app.js#L11-L21
This area seems to contain a singleton and i think accumulates styles on the server side in a way that causes the bug. I fixed it by changing that code to this:
const App: FC<AppProps> = (props) => {
  const { Component, emotionCache: externalEmotionCache, pageProps, apollo } = props;

  let [emotionCache, setEmotionCache] = React.useState(externalEmotionCache || null);
  React.useEffect(() => {
    if (emotionCache) { return; }
    setEmotionCache(createEmotionCache());
  }, [emotionCache]);

  if (!emotionCache) { return null; }
  ....

Is there any side-effect I've accidentally created here? Should the original code change? Thoughts?

hey @parris , thanks for opening this ticket. We've got the same issue, after upgrading to mui v5, using next v12.
Adding your fix to the app.js at least loads the css on F5 Page Refresh. However, it "flickers" now and one can clearly see the not working state. So this is not really production ready, but at least something to work with.
Great find!
Looking at the open SSR/Next and MUI v5 + SSR Tickets, there seems to be something in general either A not working, or B undocumented.

In my app, after upgrading to mui v5 and migrating to the new SSR strategy I found that I had unstyled pages and an error warning me about a server/client css class name mismatch.

Would you be able to provide a minimal repository that reproduces the issue? This kind of issue is pretty hard to find the root cause if we can't reproduce and see the actual code.


Add (another) PS4 controller

I just got a new PS4 controller and it has a different ID then any of the PS4 controllers in the configuration. I also included the model number.

Added (and many more), thanks for the PR!


Unable to start using Docker

Fresh Docker pull with Token and Database Uri ENV set.
Error from Docker log:
/app/server.js:15
clientManager.start()
TypeError: clientManager.start is not a function
at Object. (/app/server.js:15:15)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47

Sorry for the late reply, but I believe this should be fixed - is it still happening?

everything looks good now. thank you!


Guide[ClassName] is not a constructor

[ ] I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Steps to reproduce
加载链接就看到了
What is expected?
跟图表演示一致
https://antv-f2.gitee.io/zh/examples/gallery/forecast
What is actually happening?
×
←→1 of 3 errors on the page
TypeError
Guide[ClassName] is not a constructor

Environment
Info

f2
3.6.3

System
mac

Browser
Chrome

默认包里是不带这个的，
用 import F2 from '@antv/f2/lib/index-all';


Params extension does not work when param_type is body

Hi!
When I try to document an extension for a parameter like this:
requires :foo, type: String, documentation: { x: { some: 'stuff' }, param_type: 'body' }

It does not work. The documentation is generated without the x-some extension.
But when param_type is omitted:
requires :foo, type: String, documentation: { x: { some: 'stuff' } }

The generated documentation includes the x-some extension.
I wrote the following script to help reproduce this problem:
require 'grape'
require 'grape-swagger'

class API < Grape::API
  format :json

  params do
    requires :foo, type: String, documentation: { x: { some: 'stuff' } }
  end
  post :test1 do
  end

  params do
    requires :foo, type: String, documentation: { x: { some: 'stuff' }, param_type: 'body' }
  end
  post :test2 do
  end

  add_swagger_documentation
end

This is the generated documentation:
(I redacted it to keep only the relevant content)
{
    ...
    "paths": {
        "/test1": {
            "post": {
                ...
                "parameters": [
                    {
                        "in": "formData",
                        "name": "foo",
                        "type": "string",
                        "required": true,
                        "x-some": "stuff"
                    }
                ],
                ...
            }
        },
        "/test2": {
            "post": {
                ...
                "parameters": [
                    {
                        "name": "postTest2",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/postTest2"
                        }
                    }
                ],
                ...
            }
        }
    },
    "definitions": {
        "postTest2": {
            "type": "object",
            "properties": {
                "foo": {
                    "type": "string"
                }
            },
            "required": [
                "foo"
            ]
        }
    }
}

As you can see in the JSON, when in is formData, "x-some": "stuff" is present. When in is body, it isn't.
I think this happens because of this method in the MoveParams class, which appears to be used to document body params:
https://github.com/ruby-grape/grape-swagger/blob/3a5da56fb3ad19dcb07cf3ef86549bb811e22dcc/lib/grape-swagger/doc_methods/move_params.rb#L104-L115
It uses a fixed list of properties from property_keys and documents them if they are present. Anything else that is not in this list gets discarded.
Maybe it would be possible to change this method to check for keys that start with x- and document them.
Does that make sense? I can try to make a PR if it does.
Thanks!

Hi @lenon … thanks for the detailed bug report, and yes I PR would be very welcome … 👍

Fixed by #918. Thanks @numbata 😃


Port RHEL-8 to the common RHEL distro implementation

Port RHEL-8 to the common RHEL distro implementation.
As a side effect, the following changes were made to make this possible:

Image Types can now define unsupported partitioning modes.
Add KernelOptionsBootloader option to ImageConfig, which is used by older distros.
Add 'DefaultOSCAPDatastream' option to ImageConfig.
Introduce OSTreeDeploymentCustomizations, which is an equivalent of OSCustomizations for OSTree deployments and use it for all distros.
Add IgnitionPlatform option to ImageConfig.
Add distro.InstallerConfig for configuring the installer part of installer image types.

The diff of all manifests generated from the main and HEAD of this PR: manifests-diff.txt

WRT the Snyk failure - it is complaining about code which was not added by this PR. basically the LUKS passphrase in pkg/distro/rhel/rhel9/edge.go.


content security policy (#361)

adds django-csp to dependencies
adds a baseline security setup pared down from PPA's settings (we can adjust if we need to)
adds new settings to sample local settings, including some explanation of how to configure based on environment and some convenience stuff for local development

thanks for the comment about the manifest! dunno why it didn't get blocked on my machine, but we needed to add the manifest-src directive to address it. can you check again and see if the error is resolved?

Codecov Report

:exclamation: No coverage uploaded for pull request base (develop@da98fbf). Click here to learn what that means.
The diff coverage is 100%.

@@            Coverage Diff             @@
##             develop     #383   +/-   ##
==========================================
  Coverage           ?   98.54%
==========================================
  Files              ?      160
  Lines              ?     7345
  Branches           ?       22
==========================================
  Hits               ?     7238
  Misses             ?      107
  Partials           ?        0


Create machine got Storage controller named 'SATA' already exists

Error performing create: Error creating machine: Error in driver during machine creation: /usr/local/bin/VBoxManage storagectl default --name SATA --add sata --hostiocache on failed:
VBoxManage: error: Storage controller named 'SATA' already exists
There is another docker-machine created before.

Probably related to the conflict of having two VMs with the same name

I think it would be fine to check VMs names before do creation.
like this:
$ pm create default
Podman machine or VM named "default" already exists


[FLAKE] Basic Tests Python MacOS Timeout

https://source.cloud.google.com/results/invocations/08a5bce3-261a-4e73-ad67-540c219025f5/targets
Time limit 3600 seconds is not sufficient to compile gRPC Python for 3 times in a slow Kokoro Mac VM. Since none of the gRPC Python version has special compilation flags, we should be able to compile-once-then-reuse.

Another occurrence https://source.cloud.google.com/results/invocations/28ef2a95-41a2-4867-881d-9ca00d745ad8/log

Test has been healthy for 14+ days:
https://fusion.corp.google.com/projectanalysis/summary/KOKORO/prod%3Agrpc%2Fcore%2Fmaster%2Fmacos%2Fgrpc_basictests_python


Website field without http(s):// prepends external URL.

When website field is filled without http:// or https:// , the input URL is prepended with an external URL.
Example: If I input website as google.com or www.google.com, the hyperlink generated in CV becomes localhost:8000/app/builder/google.com and localhost:8000/app/builder/www.google.com respectively.
(CV generated from https://rxresu.me/ prepends https://rxresu.me/r/ - example: https://rxresu.me/r/www.google.com)
Since this is a website field, I think it's safe to prepend http:// to website entries. This way, every properly configured https:// website will be redirected to https:// equivalent. I'd like to work on this, once the approach is final as to what needs to be done.

work around for this problem would be to open the pdf file in a text editor (i used vim)  and search and remove the string "https://rxresu.me/r/ " from the file.

Closing this in favor of Reactive Resume v3 release.
If you continue to face this issue, please raise a new one and I'll have a look at it as soon as I can.
In the meantime, if you are able to, please consider donating to keep supporting the project: https://www.buymeacoffee.com/AmruthPillai :)
Thank you!


Week 1 4/6 items

Add my background, my projects, my profiles and my gallery.

Add what I like to photograph and a hidden talent. Now 6/6.


Request search criteria reset when going back to "saved"

Ideally the request search criteria should "stick" so that if I go back to "Saved" I still see the applicable requests. I would often need to go back and forth and find the right version of the request, and would rather not re-type the search criteria.
Expected outcome
Search criteria should stick around until reset by user
Actual outcome
Search criteria is reset when click "Saved"
Versions
App: <IP_ADDRESS>-stable
Chrome: 50.0.2661.75
Platform: Windows (7)
Steps to reproduce

save a few requests
go to "Saved"
Type a search criteria in the top bar
select a request - click "Open"
go back to "Saved"
Search criteria seems to have reset (no longer applied)

This is fixed already. Will be released soon.


Issue with catkin_make

Hi,
I'm having an issue getting the repo to completely catkin_make on a Jetson Tk1 board. When we try to make from the parent directory, we receive the error:
[ 34%] Building CXX object vicon_bridge/CMakeFiles/testclient.dir/src/ViconDataStreamSDK_CPPTest.cpp.o
Linking CXX executable /home/ubuntu/catkin_ws/devel/lib/vicon_bridge/testclient
/usr/bin/ld: skipping incompatible /home/ubuntu/catkin_ws/src/vicon_bridge/vicon_sdk/Vicon_SDK_1.3_Linux/32-bit/libViconDataStreamSDK_CPP.so when searching for -lViconDataStreamSDK_CPP
/usr/bin/ld: cannot find -lViconDataStreamSDK_CPP
collect2: error: ld returned 1 exit status
Any advice on how to proceed would be appreciated.
Thank you!

vicon_bridge depends on the SDK provided by Vicon (libViconDataStreamSDK_CPP.so). This come precompiled from Vicon for Windows and Linux on x86 and x64. The Jetson TK1 is basen on ARM processors and CUDA cores, this is probably not compatible with the given libraries.
There has been talk about swiching to VRPN, but I don't know about it.
I have seen an other ROS package  that implements the protocol instead of using the precompiled library, I have not tried it, but that may work for you.

thanks for answering! I think we can close this.


Handle MCC and MNC is incorrect

We store MNC as Integer https://github.com/tananaev/traccar/blob/master/src/org/traccar/model/CellTower.java#L89
But we should not do it in this way. According to Wikipedia it is

the mobile network code consists of 2 or 3 decimal digits (for example: MNC of 001 is not the same as MNC of 01)

But for integer it is the same 1
MCC is not so significant because fist digit 0 used only for test networks, but still...

Interesting, but all our geolocation api providers treat them as integer.

Why nobody cares of standards :worried:
https://developer.android.com/reference/android/content/res/Configuration.html#mnc
and at the same time https://developer.android.com/reference/android/telephony/TelephonyManager.html#getNetworkOperator()

I think the most important question is whether it's possible to have conflicting MNC in the same country. I looked through wikipedia and it doesn't seems like there are any examples of that:
https://en.wikipedia.org/wiki/Mobile_country_code
Also in most APIs it's a number, so I suspect that we don't need to worry about it:
https://developers.google.com/maps/documentation/geolocation/intro

There are the same MNC in one country USA, but with different MCC.
OK, if it works in US and in Google, it is not that thing we should worry about. False alarm.


feat: fetching resources names from the Account CR

https://issues.redhat.com/browse/NVPE-29
Description

Fetching  resources names from the Account CR instead of using the static ones.
How Has This Been Tested?

It has been tested locally.
Test Impact

Checked to make sure that all 4 resources names are being pulled from the Account CR.
Unit test was added for the new function.
Request review criteria:

Self checklist (all need to be checked):

[x] The developer has manually tested the changes and verified that the changes work
[x] Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
[x] The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)

If you have UI changes:

[ ] Included any necessary screenshots or gifs if it was a UI change.
[ ] Included tags to the UX team if it was a UI/UX change.

After the PR is posted & before it merges:

[ ] The developer has tested their solution on a cluster by using the image produced by the PR to main

/ok-to-test

/lgtm

/lgtm

/retest

/lgtm


check if ActionExecutionRejected should be thrown after custom action for slot validations was called

Proposed changes:

fix https://github.com/RasaHQ/rasa/issues/6977
check for a required ActionExecutionRejection error after custom action for slot validations / extractions was called
don't deactivate the form in case the user manually returned a ActionExecutionRejected event
raise InvalidDomain instead of ValueError for invalid slot mappings to avoid unnecessary Sentry errors
a custom action can reject its execution by returning a ActionExecutionRejected event and still apply other events (e.g. slots)

Status (please check what you already did):

[x] added some tests for the functionality
[x] updated the documentation
[x] updated the changelog (please check changelog for instructions)
[x] reformat files using black (please check Readme for instructions)

@ArjaanBuijk Could you please check the documentation?

@tczekajlo The security check for the secrets is currently failing. it's not required but I think we need to exclude mdx files from the check

@melindaloubser1 Requested review from you since @ArjaanBuijk doesn't seems to be busy

Thank you so much for this blazing fast review and changes @melindaloubser1 🙌

@Ghostvv I'm gonna dismiss your changes requested because you said it's good to go apart from the docs and they were approved now.


Request through Kong periodically return '404 - no Route matched with those values'

Our issue seems very close to #5374 (Kong throws '404 - no Route matched with those values' because of corrupted Cache)
The differences are:

We are on Kong 0.14.1
We are not making changes to routes yet we've observed that one route seems return 404 periodically.
our mem_cache_size is set to 512m
There are other differences in some settings.

We cannot upgrade at this time due to budget.
I suspect we need to increase our mem_cache_size.
Steps To Reproduce
We have a javascript app which makes CORS requests to an API - a Geocoder and a Router API.
The correct CORS headers are passed along with the request and the the CORS plugin is enabled and configured correctly.   This has been verified by making the same requests using curl.
Using the Javascript app, It is difficult to reproduce reliably: it works sometimes and not others. We have 3 people manually attempting to do this.
Additional Details & Logs

We are running 3 kong nodes and using cassandra as the data store.
This is using dns round robin to load balance between kong nodes.
The issue occurs on all nodes - off and on.
The nodes are configured identically.

kong.conf
Note: settings that are commented out are defaults
#cassandra_schema_consensus_timeout = 10000
#cassandra_repl_factor = 1
cassandra_data_centers = dc1:2,dc2:2
cassandra_local_datacenter = dc1
db_update_frequency = 5
db_update_propagation = 15
mem_cache_size = 512m
ssl = on
#cassandra_ssl_verify = off
#cassandra_timeout = 5000
anonymous_reports = off
cassandra_consistency = ONE
cassandra_lb_policy = DCAwareRoundRobin
cassandra_repl_strategy = NetworkTopologyStrategy

nginx-kong.conf
lua_shared_dict kong                5m;
lua_shared_dict kong_db_cache       512m;
lua_shared_dict kong_db_cache_miss 12m;
lua_shared_dict kong_locks          8m;
lua_shared_dict kong_process_events 5m;
lua_shared_dict kong_cluster_events 5m;
lua_shared_dict kong_healthchecks   5m;
lua_shared_dict kong_rate_limiting_counters 12m;
lua_shared_dict kong_cassandra      5m;
lua_socket_log_errors off;

Questions

How can I estimate the optimal size of mem_cache_size based on configured apis, upstreams, routes, services and plugins?
How can it get visibility into the cache behavior?
Why is a route that we have not touched being evicted or is not found?

Can you try to backport this:
https://github.com/Kong/kong/pull/5564

thanks.  looking at it now.

We have not backported it to 0.1x.x.

I'll take a look at the code.  What is described as the solution makes sense: thread clobbering shared variables.

I got my 0.14.1 environment setup in Vagrant.
When I looked at the kong/db/strategies/cassandra/init.lua I realized that 0.14.1 (the version we're using) is way, way behind.
Applying the describe solution is not trivial.
I learned where the error message we're seeing is being emitted from.
I have an idea to add logging to determine the extent of the number of 'no Route and no API found with those values' incidents.
kong/runloop/handler.lua line 484

It should not be that hard:

Remove
https://github.com/Kong/kong/blob/85b17fdd57908829d3857631a0aa0e380f4f8db4/kong/db/strategies/cassandra/init.lua#L619

Add following to: https://github.com/Kong/kong/blob/85b17fdd57908829d3857631a0aa0e380f4f8db4/kong/db/strategies/cassandra/init.lua#L655

local opts = new_tab(0, 2)

And that's it.

Thanks I'll give it a try.

@bungle Hi, will the fix at #5564 be added to 1.x at some point?

@bungle Hi, will the fix at #5564 be added to 1.x at some point?

It has been released with 2.0.2, and unlikely been backported to the older versions. Would like to help if you have any migration issue.

Thanks everyone!  We have more than one Kong setup in different environment, using different versions of Kong.  The exact error message I saw initially was from a newer version, 1.4.x.  and not what I was describing here, 0.14.1.  I've "inherited" this and have been focused on higher priority items.  This was very helpful regardless!


slirp4netns: set mtu to 65520

it improves significantly the performance of the slirp4netns network:
https://github.com/rootless-containers/slirp4netns/tree/777bdccceffa5bee38dbfd9eefc06628cc160ff6#iperf3-netns---host
Closes: https://github.com/containers/libpod/issues/1732
Signed-off-by: Giuseppe Scrivano<EMAIL_ADDRESS>

LGTM once we get our CI in a good state

CI should be fixed, rebase please

LGTM

/lgtm


Upgrade aptoma/twig-markdown to 2.0

This PR upgrades the aptoma/twig-markdown library to 2.0. The currently used version of that library accesses deprecated Twig functionality.

I'm scratching my head over the test failures. I cannot reproduce them and they don't seem related to my change. Also, only one of the three test runs is red. 🤔

Gonna request it run again on same commit. Could be something specific to PHP 7.0. Unrelated: seeing "Unit", "Mockery" and "Infrastructure" in the same failure message really makes me want to rewrite as an Integration test. This is a good example of something breaking and the test doesn't really point any fingers in the right direction other than the test method that failed.
At any rate, it does look like a failure outside the scope of this PR if I'm looking at this right.

Build failure seems unrelated, but the failing tests could be improved anyway.
Question is whether we want to merge this and risk a failing master, or sort out the failing tests in a separate PR first, and then see if these do not bring this build to fail here.
Have not been able to reproduce the build failures locally.
$ php -v

PHP 7.0.25 (cli) (built: Nov 11 2017 12:08:41) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans

Looks like that worked. Going to merge this and close #974.

Heh... fun times... blocked from merging for some reason and can't approve.


Keras validator?

"The model_type isn't called by the user -- it is inferred based on the type of object returned by load_model. This will probably need to be updated to accept other objects like a kera.Model, etc... Alternative would be to change this to a command line arg and only import the required framework."
https://github.com/neuralaudio/hear-validator/pull/3/files#r672560828

keras.Model inherits from tf.Module -- so turns out this actually works already for Keras


[Lorem Ipsum] Add more languages

Extension
https://www.raycast.com/AntonNiklasson/lorem-ipsum
Description
Pretty self explanatory, suggest lorem ipsum text in other languages than English.
Who will benefit from this feature?
Anyone speaking language other that English.
Anything else?
No response

Isn’t the content generated just not tied to any language? What would it look like in another language? Or are you referring to the AI command?

My guess, @iftachhh means utilizing additional ipsum packages such as chinese-lorem and aripsum which seems outside the scope since this extension generates its namesake, lorem-ipsum?

Hey, I mean suggesting Lorem Ipsum like texts in other alphabets that English, for example in Hebrew, Arabic, Chinese letters and etc. The text itself still won't have any meaning it will be used to illustrate how long text will look in different languages.

Okay got it! It sounds like a great addition. I don’t have bandwidth right now, but could either review a PR or potentially get to it in a few weeks.


Add mypy.ini and type annotations

Now that development has started on rf 5 which is dropping support for python 2.7-3.5 adding type annotations and mypy integration is a good idea (imo).

There are lot of APIs where adding type information helps, but I don't think adding them everywhere and making MyPy happy is worth the effort. My biggest problem is the added noise in cases like these:

Magic comments like # type: ignore[attr-defined] to make MyPy happy.
Redundant return value annotation -> None in general and especially with __init__ that just cannot return anything.
Argument information when it's generic (e.g. Any) or redundant (e.g. arg: bool = True).
Code like ExecutionResult(*sources: str | TextIO | bytes | Path, merge: bool = ..., rpa: Literal[True] = ...) -> Result: ... that requires deep typing knowledge to even understand.

There's also the problem that RF 5.0 will still support Python 3.6 and we cannot use more modern typing features. For example, we couldn't use list[int|float] and needed to use a lot more verbose from typing import List, Union; List[Union[int,float]] instead. We cannot even use from __future__ import annotations to solve that since Python 3.6 doesn't support that either. That particular future import and how to evaluate annotations is also subject to change in future Python versions and I'd rather just avoid that thing altogether until there are some decisions related to that.
This PR also has a problem that it was started before we removed Python 2 support and there are thus a lot of conflicts.
Before spending more time for this, it would be a good idea to discuss this more either here or on Slack. As I already wrote, I don't think being MyPy compatible is worth the effort, but if you can list good concrete benefits we'd get I may be convinced otherwise. Adding type information to public APIs is definitely a good idea, but should probably be done so that there's an issue/PR for each API.
One API that would especially benefit from type information is visitor. Changing current
class Visitor:
    ...
    def start_test(self, test):
        ...

to
from robot.model import TestCase

class Visitor:
    ...
    def start_test(self, test: TestCase):
        ...

would mean that users of this API would get support for auto-completion. That's a concrete benefit and there's no extra noise either.

Magic comments like # type: ignore[attr-defined].

Type ignore comments aren't magic, they are part of PEP 484

Redundant return value annotation -> None
I completely agree (https://github.com/python/mypy/issues/9413), but is currently a requirement.

Argument information when it's generic (e.g. Any) or redundant (e.g. arg: bool = True)

Any is not generic, it's dynamic, not sure what you mean there.
The redundant annotation when there's a default argument is questionable, but I think it's better to be explicit.

Code like ExecutionResult(*sources: str | TextIO | bytes | Path, merge: bool = ..., rpa: Literal[True] = ...) -> Result: ... that requires deep typing knowledge to even understand.

Not sure what you mean here, all these features are standard typing constructs:

... eludes an expression when it's not meaningful (ie a type context)
| is the type union operator
Literal[True] is a literal type: it can only be the value True.

I don't think being MyPy compatible is worth the effort

Don't you think that by adding type information to the internal api it would make development / refactoring a much smoother process?

i think typing even the internal API would be highly beneficial especially for new contributors. in my experience, projects with types are so much easier to jump right in and start making changes with little to no experience with the codebase, because it allows your IDE to help out a lot when looking for a property you need or when you're trying to figure out how to call a function. another huge benefit is that the type checker informs me of other parts of the code i may have broken

Don't you think that by adding static type information to the internal api it would make development / refactoring a much smoother process?

No I don't. For me most changes this PR just make the code harder to understand because there's so much extra noise. I don't like how the code looks and I'd even less like to write code like this. If I'd like static typing, I'd use Java or C#. I see benefits from type hints in selected APIs, especially in public APIs, but I really see more problems than benefits with full MyPy support.

i think typing even the internal API would be highly beneficial especially for new contributors.

This is a valid point, I'm not the only one working with this code base. I'm not sure is this true with all new contributors, though. Typing in Python, especially if you want full MyPy compatibility, is somewhat advanced topic and lot of our contributors are novice programmers. I'm afraid this could be a barrier of entry for people who aren't already familiar with typing.

Community Ng into this project is it seems very overwhelming, with multiple classes with the same name and functions with very ambiguous types. Even trying to figure out the types for this change has been extremely confusing.

I'm sure we can add types to various places to make the code easier to understand and to ease navigation around. Adding more documentation and creating some kind of an architecture diagram could help as well.
It's the full MyPy compatibility that bothers me. A very good example of noise it adds without benefits is the robot.api.deco module. The original code is pretty trivial (assuming you know how decorators work), but the added # type: ignore comments, @overloads and changing signatures like
def keyword(name=None, tags=(), types=()):

to
def keyword(name: Union[Fn, str, None] = None, tags: Union[List[str], Tuple[None, ...]] = (), types: Union[Dict[str, type], List[type], Tuple[None, ...], None] =()) -> Union[Callable[[Fn], Fn], Fn]:

make it a lot more complicated. As far as I can see, none of the changes in that file actually has any concrete benefits.

Mypy is very flexible around what needs to have annotations / what is checked. Everything is entirely optional and confurable down to the individual module.
Tbh in my projects that use robot framework the @keyword decorator was the first thing I typed with a local stub because otherwise it erases the entire original signature.
Maybe there is a way to simplify this type annotation.

Tbh in my projects that use robot framework the @keyword decorator was the first thing I typed with a local stub because otherwise it erases the entire original signature.

Could you clarify this? Does the variant in this PR fix the problem?

When a decorator isn't typed the signature of the original function becomes dynamic(basically completely uncheck d), there is a mypy rule relating to this https://mypy.readthedocs.io/en/stable/config_file.html#confval-disallow_any_decorated.
@untyped_decorator
def foo(a: int) -> str: ...

reveal_type(foo) # Any

Any is the dynamic type, meaning that any usage is entirely unchecked.
So when keyword isn't typed it disables and type checks on any function it's used on. And a naïve implementation of typing wouldn't allow the optional arts etc.
I do have an idea about how to drastically simplify this implementation but will need to get to it tomorrow.

@overload
def keyword(name: Fn) -> Fn: ...

@overload
def keyword(name: str = None, tags: List[str] = ..., types: _Types = ...) -> Callable[[Fn], Fn]: ...

@not_keyword
def keyword(name: object = None, tags: object = (), types: object = ()) -> object:

Simplified the defs to this

@pekkaklarck If you think type annotations look gross they could be implemented as separate pyi stubs, I think sellib does it that way. Or they could be added to TypeShed.


Add optional tags to create-service command

Tracker Story: https://www.pivotaltracker.com/story/show/61861194

Hey @Gerg
It looks like we've updated the translation files for this since you submitted the PR. Could you rebase on master to fix the merge conflicts?
Other than that this looks good.

We've done a rebase, should be an easier merge now.

Because #474 was merged already, this PR now just includes some formatting changes to the help text and translations.

Nice! Merged.


Redirecting the test output (to prevent the CI from leaking secrets) is preventing us to get the actual error locally

Description
I faced this issue investigating failures at the time to deploy openscapes.
More details here: https://github.com/2i2c-org/pilot-hubs/pull/691#issuecomment-922320344
Value / benefit
We should be able to easily get the test output when we are working locally whereas we redirect the output in the CI environment.
Implementation details
A proposal lives in this comment: https://github.com/2i2c-org/pilot-hubs/pull/691#issuecomment-922320344 (check diff) and people showed interest to have this piece as a new PR.
Tasks to complete

[ ] PR diff with the proposed implementation
[ ] Discuss details about the env variable that we may use to detect the GitHub env

Updates
No response

Added to the sprint board since @damianavila mentioned he wanted to tackle this in our team update

Verified on production: https://github.com/2i2c-org/pilot-hubs/runs/3738348406?check_suite_focus=true#step:9:190


Updating = Flow Broken (v0.61)

I keep running into an issue where whenever I do basically anything flow stops reporting any/all errors and I have to restart atom completely.  It seems like Flow is just completely broken at this point.
I posted about the resolve_dirname thing but even without that configuration if I edit .flowconfig then all errors stop reporitng for flow until I quit and restart atom.  I have restarted about 65 times in the last 2 hours.
I have "Debug LSP" checked but that appears to do nothing so I dont really know how to debug anything at this point.

[ignore]
.*test/.*

[libs]
./internals/flow/definitions
./node_modules/ioredis-utils/flowlibs

[options]
unsafe.enable_getters_and_setters=true
esproposal.class_static_fields=enable
esproposal.class_instance_fields=enable
esproposal.export_star_as=enable
; module.system.node.resolve_dirname=node_modules
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue
suppress_comment=\\(.\\|\n\\)*\\$FlowIgnore

I have same problem and I cannot upgrade flow to 0.61.0. I have a slightly different problem. At first run, flow does not report any error. Then when I save a specific file, it seems to "unlock" all errors and they are reported to the console.

I can assure you that Flow is not "completely broken." There's not enough information here for me to guess what is happening for you.

This probably can be closed.
/cc @vkurchatkin


Improve compatibility with DocToc action

Describe the problem/need and solution
Context
Use https://github.com/marketplace/actions/toc-generator and mdformat "together".
Problem / Idea
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- param::isNotitle::true:: -->
<!-- param::maxHeaderLevel::4:: -->

<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
<!-- END doctoc generated TOC please keep comment here to allow auto update -->

changes to
 <!-- START doctoc generated TOC please keep comment here to allow auto update -->

 <!-- param::isNotitle::true:: -->

 <!-- param::maxHeaderLevel::4:: -->

And the options are no longer used by doctoc in this action and disappear.
Solution
This could be fixed by skipping that section/adding a method to skip sections.
Benefit
This allows automatic TOC generation while keeping the DocToc options.
Guide for implementation
No response
Tasks and updates
No response

Thanks for the issue!
I'm hesitant to add special casing like this. I'd suggest one of the following first

Use mdformat-toc to generate ToC with mdformat instead (my experience is that doctoc can be a bit buggy)
Open an issue in https://github.com/thlorenz/doctoc and ask if they'd be able to ignore the added newline.

Thanks for your reply & hint.

a feature to exlude part of the md file formatting could "fix" this

An issue for this exists: https://github.com/executablebooks/mdformat/issues/53

Thanks for your reply & hint.

 Please close this issue if mdformat-toc solves your issue


Durable database writes

Hi! Thanks for the project, I believe it's of a great value to the community.
Currently, this plugin accumulated data and writes it to the database. I think it's important to do several things to ensure more durable writes:

Retry network and database failures. Use exponential backoff in a case when the database cannot server write immediately.
Buffer data not written to DB. Ensure that the buffer does not overflow. Sacrifice data intentionally if it cannot be stored in DB.
Reload connection string when requested: a user can add new shards to CH installation

What do you think?

Can any of these by hadnled by ch sql driver (for instance retries)? Maybe there is some middleware for SQL client that provides these capabilities.

Reload connection string when requested: a user can add new shards to CH installation

Can you please explain this further? Do you mean call sql.Open when the user requests it?

I do not know if drivers do it.
Can you please explain this further? Do you mean call sql.Open when the user requests it?
It's important to handle case when users changes topology of CH cluster. Adds or removes nodes. sql.Open() is part of the solution, yes. BTW it's important to reconnect when database was rebooted.

It's important to handle cases when users change the topology of the CH cluster. Adds or removes nodes. sql.Open() is part of the solution, yes. BTW it's important to reconnect when database was restarted.

Let's say the DB plugin writes to Distributed table engine and the topology changes (e.g. added new node/shard). Is it mandatory to reconnect to DB with sql.Open? I didn't experience this when working on https://github.com/jaegertracing/jaeger-clickhouse/blob/main/guide-sharding-and-replication.md.

No, it's OK to connect to the remaining nodes. But, I think, eventually you need to update connection information.

Also the storage plugin is connected to the loadbalancer and not to each individual node.
Perhaps we should mention this in our docs. @EinKrebs would you like to document this in the config?

I think in CH each individual node is the load balancer. And you can specify this in the connection string of the driver. But it's better to ask some CH experts here... I'll do that.