Single File Component

Implements #4
Features:

Transform Vue SFC (hook)
Change folder structure.

Bugs:

Hook not always executing (manually => node hooks/before-prepare/nativescript-dev-android-snapshot.js)
Lost two-way binding( only working from JS to DOM)

Screenshots:

Hey @KABBOUCHI. Thanks for submitting this PR!
There has been an effort by @tralves to bring .vue file support to NativeScript (https://github.com/tralves/nativescript-vue-webpack-template) using webpack and vue-loader.
And I think I'd like to keep the .vue file support out of this repository.
Do you think your changes could work as a nativescript template or a plugin?
Awesome that you got the <style> tags working, and I think extracting to a css file is the right way to go.
I haven't seen browserify used too much lately, is vueify still supported (last activity mar 9)?
I'm thinking, since webpack is the officially supported "bundler" both for NativeScript and Vue, we should work on having the webpack template fully functional instead of browserify.
Since you got the <style> tags working, could you look at https://github.com/tralves/nativescript-vue-webpack-template/issues/1 ?

Nice work!
I am on vacations and so I can't test it now. I agree with @rigor789 in
that we should let the webpack plugins do the work to bundle the single
file components because that way we use the "official" Vue tools instead of
maintaining scripts to do the same thing. There may be other stuff that
vue-loader does that we don't know too.
For instance, will <styles lang="scss" scoped> work?
In any case, impressive work!
On Wed, Aug 2, 2017, 20:53 Igor Randjelovic<EMAIL_ADDRESS>wrote:

Hey @KABBOUCHI https://github.com/kabbouchi. Thanks for submitting this
PR!
There has been an effort by @tralves https://github.com/tralves to
bring .vue file support to NativeScript (
https://github.com/tralves/nativescript-vue-webpack-template) using
webpack and vue-loader.
And I think I'd like to keep the .vue file support out of this repository.
Do you think your changes could work as a nativescript template or a
plugin?
Awesome that you got the

@rigor789  I was hoping you split the sample to another repo(template).
I can't create a nativescript template, I don't have much experience with nativescript.
I'll check @tralves template repo in the weekend.

@KABBOUCHI the samples will be kept in this repo, as they are mainly used during development to test out new changes, and having them in the same repo makes this easier.
That's fine, there is probably no need to create a new template, instead we should work on the one by @tralves and make that "the template". If you have some time, you could move your changes regarding the <style> tags into the template repo, since that is the only feature currently missing.

@rigor789  @tralves  https://github.com/tralves/nativescript-vue-webpack-template/pull/3
It was an easy fix.
I think the main problem in this template is the live update, not the style.

This has been now implemented in https://github.com/tralves/nativescript-vue-webpack-template
Closing.


[Bug]: api keys endpoint skip oidc auth

zot version
v2.0.2-rc1
Describe the bug
If i use oidc method auth, after login to zot and try create apikey, i have UNAUTHORIZED code, because auth by oidc to /zot/auth/apikey does not work (work only with basic auth)
To reproduce

Configuration
helm chart version: v2.0.2-rc1
values.yaml

replicaCount: 1
image:
  repository: ghcr.io/project-zot/zot-linux-amd64
  pullPolicy: IfNotPresent
  tag: "v2.0.2-rc1"

strategy:
  type: Recreate
ingress:
  enabled: true
  annotations:
    nginx.ingress.kubernetes.io/proxy-body-size: "0"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
  className: "nginx"
  pathtype: ImplementationSpecific
  hosts:
    - host: reg.example.com
      paths:
        - path: /
  tls:
   - secretName: cert
     hosts:
       - reg.example.com

httpGet:
  scheme: HTTP

mountConfig: true
mountSecret: true

configFiles:
  config.json: |-
    {
      "storage": {
        "rootDirectory": "/tmp/zot",
        "dedupe": false,
        "storageDriver": {
            ........
        }
      },
      "http": {
        "address":"<IP_ADDRESS>",
        "port":"5000",
        "externalUrl": "https://reg.example.com",
        "auth":{
          "apikey": true,
          "htpasswd": {
            "path": "/secret/htpasswd"
          },
          "openid": {
            "providers": {
              "oidc": {
                "issuer": "https://keycloak.example.com/realms/test",
                "clientid": "project-zot",
                "clientsecret": "secret....",
                "keypath": "",
                "scopes": ["openid", "profile", "email", "groups"]
              }
            }
          }
        },
        "accessControl": {
          "repositories": {
            "tenant-1/**": {
              "policies": [{
                "users": ["user"],
                "groups": ["project-zot-tenant-1"],
                "actions": ["read", "create", "update", "delete"]
              }],
              "defaultPolicy": []
            },
            "tenant-2/**": {
              "policies": [{
                "users": ["user"],
                "groups": ["project-zot-tenant-2"],
                "actions": ["read", "create", "update", "delete"]
              }],
              "defaultPolicy": []
            }
          },
          "adminPolicy": {
            "users": ["admin"],
            "actions": ["read", "create", "update", "delete"]
          }
        }
      },
      "log": {
        "level":"debug"
      },

      "extensions": {
        "search": {
          "enable": true
        },
        "ui": {
          "enable": true
        },
        "mgmt": {
          "enable": true
        },
        "sync": {
          "downloadDir": "/tmp/zot",
          "registries": [
            {
              "urls": ["https://<IP_ADDRESS>:5000"],
              "content": [
                {
                  "prefix": "**",
                  "destination": "/tenant-1"
                }
              ],
              "onDemand": true,
              "tlsVerify": false
            },
            {
              "urls": ["https://<IP_ADDRESS>:5000"],
              "content": [
                {
                  "prefix": "**",
                  "destination": "/tenant-2"
                }
              ],
              "onDemand": true,
              "tlsVerify": false
            },
            {
              "urls": ["https://reg2.example.com"],
              "content": [
                {
                  "prefix": "**",
                  "destination": "/gitlab"
                }
              ],
              "onDemand": true,
              "tlsVerify": true
            },
            {
              "urls": ["https://docker.io/library"],
              "content": [
                {
                  "prefix": "**",
                  "destination": "/docker"
                }
              ],
              "onDemand": true,
              "tlsVerify": true
            }
          ]
        }
      }
    }

secretFiles:
  htpasswd: |-
    admin:$2y$05$vmiurPmJvHylk78HHFWuruFFVePlit9rZWGA/FbZfTEmNRneGJtha

authHeader: "YWRtaW46YWRtaW4="

Client tool used
I try to create apikey and have UNAUTHORIZED code error

curl -u "username_oidc:password" -X POST https://reg.example.com/zot/auth/apikey -d '{"label": "git", "scopes": ["tenant-1"]}'

{"code":"UNAUTHORIZED","message":"authentication required","detail":{"description":"The access controller was unable to authenticate the client. Often this will be accompanied by a WWW-Authenticate HTTP response header indicating how to authenticate."}}

but i can login to ui with username_oidc:password by oidc mathod auth and have only problem to access https://reg.example.com/zot/auth/apikey page (auth by admin default user can open page)

Seen error
logs

 {"level":"error","goroutine":430,"caller":"zotregistry.io/zot/pkg/api/authn.go:190","time":"2024-02-17T09:33:24.173655954Z","message":"invalid api token format"}                                               {"level":"info","module":"http","username":"username_oidc","component":"session","clientIP":"<IP_ADDRESS>:34988","method":"POST","path":"/zot/auth/apikey","statusCode":401,"latency":"0s","bod ││ ySize":253,"headers":{"Accept":["*/*"],"Authorization":["******"],"Content-Length":["40"],"Content-Type":["application/x-www-form-urlencoded"],"User-Agent":["curl/7.81.0"],"X-Forwarded-For":["<IP_ADDRESS>"], ││ "X-Forwarded-Host":["reg.example.com"],"X-Forwarded-Port":["443"],"X-Forwarded-Proto":["https"],"X-Forwarded-Scheme":["https"],"X-Real-Ip":["<IP_ADDRESS>"],"X-Request-Id":["7761d6375e1e46aa0f480de470b2cf5a" ││ ],"X-Scheme":["https"]},"goroutine":430,"caller":"zotregistry.io/zot/pkg/api/session.go:132","time":"2024-02-17T09:33:24.173776652Z","message":"HTTP API"}

Expected behavior
allow to create apikey with oidc auth
Screenshots
No response
Additional context
No response

Hi @legolego621, the oidc auth workflow is more complex and requires multiple requests, which the UI implements.
We added the api keys feature specifically for oidc users as a workaround for command line tools, as an alternative.
Ideally the oidc user would login to the UI, and generate the API key from a menu there.
Unfortunately, the UI implementation is not merged yet (https://github.com/project-zot/zui/pull/403).

Hi @legolego621, the oidc auth workflow is more complex and requires multiple requests, which the UI implements. We added the api keys feature specifically for oidc users as a workaround for command line tools, as an alternative. Ideally the oidc user would login to the UI, and generate the API key from a menu there.
Unfortunately, the UI implementation is not merged yet (project-zot/zui#403).

Hi, thanks for the quick response.
Please tell me how I can now generate an api key by logging in as user oidc? You mentioned that you added the api path.

@legolego621, we merged https://github.com/project-zot/zui/pull/403.
Do you think you could build zot based on https://github.com/project-zot/zot/pull/2256 (which includes https://github.com/project-zot/zui/pull/403), and test the UI feature for API key management?
It's in the menu available for logger in users at the top right of the page.

@andaaron
Thanks, this worked for me.
I built the zui image from commit-33524ce


[Discussion]: Add + Organize language specific Examples and Implementations

While we currently have some examples in our "Concepts" folder, it would make sense to include different language's examples rather than defaulting to whatever is easiest (where applicable, as some languages do not utilize certain concepts, for example OOP).
Discuss:

Default language for examples
Folder structure and organization (do we want to duplicate pages but with language specific examples)
See if there is a way to implement multiple language examples on the same page? (Maybe a dropdown to swap to that language)

I Have Figured this one out here is an example how it works currently:

Though this should be made globally accessible features changing these into " JavaScript file " and Storing it either as a cookie or memory to Remember what option was clicked, Additionally that means, the default should  be listed, currently it should stay  under the " c++ " content by default, though I donät think on the live server it would remember it when the page gets refreshed.
I have done this in the following way:
`
layout: default
title: OOP
nav_order: 1
parent: Concepts
has_children: false
{{ page.title }}
{% include under_construction.html %}

  This is C++ content for Object-Oriented Programming.

  This is C# content for Object-Oriented Programming.

C++
C#

`

I have added another method to the feature " https://github.com/VerzatileDev/Programming_HandBook/tree/main  "on my specific fork branch.
Additionally added a feature that adds an event listener and saves the current language to the users local storage, if not defiend previously.
If it is defined it loads the selected language from this example Cpp or Csharp.
Which will be asked each time a refresh is called or page is reloaded.
Additionally Pressing the Button either cpp or Csharp will rewrite the Language Preference and store it to locally.
Note:
This Requires that the JavaScript would be made globally not for each instance where possible.
Make sure that only specified buttons are called so make cases if there are less or more languages.
" in the future figure out where to store these as all in the same file would be an overkill potentially ".

See the following addressed in the pull request " https://github.com/VerzatileDevOrg/Programming_HandBook/pull/68 " Language Specific examples. The following addresses the issue in a basic way as a concept of how it could be handled, though would require it to be accessible globally, which requires a selection of what types are shown based on the available " <div Id " defined in the .md file.


all job roletimers

Ensure all jobs have roletimers based on https://cm-ss13.com/wiki/Marines

this is waiting on

#620


Add regression

After fix the ticket in the other project. We need to make sure that doesn't break anything in this project.
Related to #287

@MoOx this required some release in the other project for be able to update the dependencies here


refactor(gitlab collection): removing the 'skip' flags from collection

Skipping collection causes more problems than it solves. Better to collect all at once, and maybe
later implement a configuration by API request.

@kevin-kline Thanks for the PR, I think it's fine to keep the code. We'll implement this functionality more formally later.


Error installing with pip

Getting a syntax error when installing on a fresh virtualenv system
(pipeline_run3) data_management> python
Python 3.4.5 (default, Sep 08 2016, 13:41:53) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
(pipeline_run3) pipeline@SequenceKing:~/cancerplus/code/data_management> pip3 install sample_sheet
Collecting sample_sheet
  Using cached https://files.pythonhosted.org/packages/fc/75/69cab3b91ea745a909bedc53f30789414eedc11ce2ebe6189733560a9583/sample_sheet-0.6.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-5eqifgel/sample-sheet/setup.py", line 12
        URL = f'https://github.com/clintval/{PACKAGE_NAME}'
                                                          ^
    SyntaxError: invalid syntax

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-5eqifgel/sample-sheet/

Hi @nuin, only Python3.6+ is supported at the moment.

Ah, OK. We have this system with 3.4 installed where we do our bcl2fastq conversions and we are automating our sample sheet parsing. Is it hard to add compatibility to 3.4? I will check installing 3.6 on it.
Thanks.

It would not be hard to add Python 3.4+ compatibility. To do so I think I need to change/check two things:

Drop the f-strings
Check unit tests such that they do not rely on deterministic dictionary key order

If you can't port to Python 3.6 and still want Python 3.4 support, could you open a new issue with the request and I can review there?
FYI my initial intention was to keep this Python 3.6+ but I do understand many others are still locked into earlier Python 3 versions.

I will check tomorrow, if it's a no go on 3.6, I will let you know.
Thanks

I was able to install 3.6 on my machine, I am checking my code now.
Thanks


Enable building on xcode 12 beta

Quiet warnings and errors building on Xcode 12 Beta.

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


udp2raw + openVPN redirect full traffic

Hello & good morning
-- i configured both server + client for udp2raw as you explained
also configured udp2raw + openvpn followed guide: https://github.com/wangyu-/udp2raw-tunnel/blob/master/doc/openvpn_guide.md
-- i used your openvpn config for both server+client
-- i can ping <IP_ADDRESS> from client side
how can i forward all traffic in client side , all traffic go through openvpn??
i think you said we should add "redirect-gateway" , but where we put that parameter server or client & what is full line we should add?
ip route add <IP_ADDRESS> via <IP_ADDRESS>
how can add that line inside openvpn client config instead of enter it manually?
ip route add <IP_ADDRESS> dev XXX
XXX = eth0 or virtual TAP device card which related to openvpn ?
also how can add it manually inside ovpn client config
because why try to add redirect-gateway it eat all traffic then udp2raw tunnel disconnect

i hope you give full config for both sides server + client which allow route all traffic
here are my full config:
Server:
udp2raw:
server.conf

iptables

after run:

client: debian 8.8 x64
udp2raw:

ovpn client:

iptables

how can i forward all traffic in client side , all traffic go through openvpn??
i think you said we should add "redirect-gateway" , but where we put that parameter server or client & what is full line we should add?

Add redirect-gateway def1  to openvpn client conf

ip route add <IP_ADDRESS> via <IP_ADDRESS>
how can add that line inside openvpn client config instead of enter it manually?

You cant. You have to add it manually, or write a script for it.

ip route add <IP_ADDRESS> dev XXX
XXX = eth0 or virtual TAP device card which related to openvpn ?

Typically eth0.
Here is an example:
root@raspberrypi:/home/pi# ip route
default via <IP_ADDRESS> dev eth0  metric 202
<IP_ADDRESS> dev tun100  proto kernel  scope link  src <IP_ADDRESS>
<IP_ADDRESS>/24 dev wlan0  proto kernel  scope link  src <IP_ADDRESS>
<IP_ADDRESS>/24 dev eth0  proto kernel  scope link  src <IP_ADDRESS>  metric 202

I ran ip route on my openvpn client side,  then it shows a line of
default via <IP_ADDRESS> dev eth0  metric 202
then I should add a route exception by typingip route add <my_server_ip> via <IP_ADDRESS> dev eth0
or  ip route add  <my_server_ip> via <IP_ADDRESS>  for short.（you usually can omit the dev XXX）

i hope you give full config for both sides server + client which allow route all traffic

The only difference of openvpn conf is, Add redirect-gateway def1  to openvpn client conf.
And the route exception step has to be added maually, so I cant give you a full conf that works without doing any thing manually.

Thanks for great explain
my server IP: <IP_ADDRESS>
Client:
1- added redirect-gateway def1 to openvpn client conf
2- ip route result before / after run openvpn & add route exception

seems eating traffic stopped but still no traffic route via openvpn!

Server:
i applied both of 2 mentioned commands of enable ipforward and SNAT(MASQUERADE)

iptables:

i tried client at two different debian x64 & raspbx raspberrypi
where is issue?

Hi, can you make traffic-redirection work when you are using OpenVPN alone(without udp2raw involved) ?

hi
i tried to connect using openvpn alone without udp2raw, when ping yahoo.com i got " destination host prohibited" , so issue seems related to iptables at server
i could solve issue with following:
@ server:
1- i flushed iptables (clean all chains/rules)
iptables --flush
2- enable MASQUERADE /SNAT using your magic command
iptables -t nat -A POSTROUTING -s <IP_ADDRESS>/16 ! -d <IP_ADDRESS>/16 -j MASQUERADE
service iptables save
i can show content:
cat  /etc/sysconfig/iptables

@ client:
add route as you mentioned:
ip route add <IP_ADDRESS> via <IP_ADDRESS> dev eth0
<IP_ADDRESS> is my public server IP
<IP_ADDRESS> my mikrotik router
you said i can not add route command automatically inside openvpn client config  so should write script, i found way to add route inside ovpn client config  which add route automatically once ovpn client connected and delete it auto once disconnect:
route <my_server_ip> <IP_ADDRESS> net_gateway
example:

after openvpn client connected

in case worked with you credits to alaa2003 ))))

1- i flushed iptables (clean all chains/rules)
iptables --flush

This wont work as you expected, to clean all rules in all tables, you need to run :
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT

you said i can not add route command automatically inside openvpn client config so should write script, i found way to add route inside ovpn client config which add route automatically once ovpn client connected and delete it auto once disconnect:
route <my_server_ip> <IP_ADDRESS> net_gateway

thank you for mention that, looks like that also works.

i tried to connect using openvpn alone without udp2raw, when ping yahoo.com i got " destination host prohibited" , so issue seems related to iptables at server

I think your iptables is blocking ip forward. Try the commands above to clear all iptables rules.

cool, thanks a lot for great points >>
How to run udp2raw binary as service on linux for both server and client  ?
may load parameters from configuration file for easy !
this will help to run it in background and when linux starts too
do not forget to add monitoring log :)

How to run udp2raw binary as service in linux for both server and client ?
this will help to run it in background and when linux starts too
do not forget to add monitoring log :)

Hi, there is currently no service wrapper for udp2raw. You can do it by yourself with scripts.

may load parameters from configuration file for easy

Take a look at --conf option.


tags not saved when creating a project with API

tags not saved when creating a project with API
$ curl -X PUT "http://localhost:8080/api/v1/project" \
>   -H "accept: application/json" \
>   -H "X-Api-Key: UBq4k6VZYejzwPbug8kmd0zU6tNxJEQB" \
>   -H "Content-Type: application/json" \
>   -d "{ \
>       \"name\": \"test\",\
>       \"version\": \"1\",\
>       \"tags\": [ { \"name\": \"test\" } ]\
>       }"

results
{"name":"test","version":"1","uuid":"5931a119-35bf-4b3a-96f6-a0839d5f5cd1","properties":[],"tags":[]}

in Database, in Table "TAG", tag test is created but not linked with project.

I noticed this as well in the UI. Updating the project seems to work, but the initial creation of the project is where the tags do not seem to be saved.

A fix for this has been included in the master branch and the 3.0.x branch.


scrape configs as files

Additional logic to handle scrape configs as files, as in rule file blobs.
Builds as is, requires testing.
-- for consideration only, please hold on merge.

Thank you for PR. In Prometheus we generally only have one way to do thing, and try to leave configuration management problems to configuration management tools rather than clashing with them. Accordingly you should handle this with templating within your configuration management system, such as Ansible's assemble module.

meh i just think its funny that for rules, the separate files are the one way and for scrapes the all in config.yml is the one way ... doesn't really seem like one way to me :P ...


Jupyter Notebook Cell in Dark Theme in WSL not colored

Bug: Notebook Editor, Interactive Window, Editor cells

Steps to cause the bug to occur

Open VS code regularly (i.e., through the start menu).
Create test.ipynb (LEFT in the figure)
Launch Ubuntu/WSL. Type code .
Create test_wsl.ipynb (RIGHT in the figure)
Change theme color: Light+ (Default) to produce the following figure (expected):

Change theme color: Dark+ (Default) to produce the following figure (unexpected):

Actual behavior
The cell in the dark theme does not have a color that is distinct from the background color in dark theme when connected to WSL (right panel)
Expected behavior
The cell in the dark theme should have a color that is distinct from the background color in dark theme, similar to the left panel.

Your Jupyter and/or Python environment
Please provide as much info as you readily know

Jupyter server running: Local
Extension version: 2020.08.101144
VS Code version: 1.48
Setting python.jediEnabled: true
Setting python.languageServer: Jedi
Python and/or Anaconda version: 3.8.3
OS: Windows | Mac | Linux (distro): Windows & WSL Ubuntu 20.04
Virtual environment: conda

Python Output

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer, @joyceerhl

Hello everyone!
The bug persists and since https://github.com/microsoft/vscode/issues/91987 has the Notebook theme support marked as done I think the issue would require reopening.
I was trying to play around with jupyter.colorizeInputBox but this doesn't seem to work. Up to my understanding of 'peek color' it is just the darkest color of the theme. I would expect setting the darker background would force the cells to have distinct background color, but it does not.
What I have in settings + jupyter.colorizeInputBox: true

How I want it to look like vs what I get in WSL:

The font coloring seems to be broken too:
Normal:

WSL:

@rafalpotempa The new notebook support is only supported by the Jupyter extension with VS Code - Insiders not in stable VS Code as it's still in preview. What you have pictured above is still our old webview implementation. That implementation is going away and will not be updated. If you try out Insiders you can see the new UI.


Mc annotations

Why'd you make a pull request to mc_annotations?

these PRs are more for me so I can see the result of travis ci before moving my local changes to the feature branch.  if there was more than one person on this branch it could be more useful...but really it's just good practice


Upgrade Fontawesome ?

Hello, I am preparing a site with your theme and I have just noticed that it is impossible to have the social network icons in the version of fontawesome provided in the form of css.
I updated to version 6 and the icons are visible with this version.
Would it be possible to update the theme?
Thanks.

Sorry, my previous comment went missing:
Because the theme still supports IE11, Font Awesome 6 is not an option as it is not compatible.
I already made an ill attempt in #151 and reverted it in #191.
If you want to use Font Awesome 6 you could try to download it on your own and place the various files in your own project's static/css and static/webfonts directory respectively.

I think it's totally a good idea to drop IE11 support, just bump major version of theme. Or someone else will do the cleanup a day.

I will do the cleanup - once my company dropped IE11 support ;-)


What happened to UnmarshalAny?

The library breaks backward compatibility. How can I use Any type?

use https://godoc.org/github.com/json-iterator/go#Get


No class hierarchy

I noticed that all GObject-based classes are exported without parent classes. Instead, all members etc of the parent GObject-class are copied into the definition of the new class. This causes problems when you want to pass one of these classes to a function that expects a parent class.
Is there an important reason you made it do this instead of using extends?

Look at #3, we tried to replicate the hierarchy to stop ending up with a gazillion megabytes of typings to parse on every check or IDE launch, but had trouble with static members. TypeScript inheritance and GObject inheritance aren't compatible when it comes to that. Maybe you'll find a fix, please see.

I've read the comments for #3, but I still don't understand why static method inheritance is a problem. Could you explain that more?

When a GObject subclass had a static method with same name and argument count as one in its parent classes, but their argument or return types differed, we got either typings that didn't compile or code that passed type checks but didn't work in Gjs. Unfortunately I don't remember more specifics.

OK, I see that Typescript doesn't allow even static members to override parents with incompatible types. I'm not very familiar with the language, but I think I've found a workable solution. I haven't tested it yet with any real-world classes from GObject, but a simple test case compiled OK in tsc, and it generated code that did what I expected.
Say what we want is this:
export class Parent {
    myMethod(): void
    static new(blurb: string): Parent
}

export class Child extends Parent {
    myMethod(): void
    static new(blurb1: number, blurb2: number): Child
}

The compiler rejects that, but accepts it if I simply add this to Child:
    static new<T, V>(blurb1: T): V

Surprisingly, I don't need to change Parent, which makes things considerably simpler, nor do I have to provide a second argument in the generic method signature. I have to admit I don't know why it's lax about that, but it's good for us. I should probably do some more research on stackoverflow, and also work out what happens if Parent.new takes more arguments than Child.new instead of the other way round.
Using a generic for the return type actually tightens up type safety, because if you try to abuse it something like this:
const child = Child.new("blurb")

child would be of type unknown, most likely causing errors when we try to use it. The error would be in the wrong place, but that's better than the compiler not detecting the mistake at all.

Someone on stackoverflow has thought laterally and come up with what I think is a great solution. Typescript allows objects and interfaces with the same names to co-exist. The interface provides us with the inheritance relationships and defines instance methods and properties, while the object provides us with the static methods and constructors (and constants?). After a bit of experimentation etc I think this approach will work for us.

Yes, I can confirm the problem is as stated earlier - that TS inheritance and that used in GObject isn't quite compatible.
I did initially use the sort of pattern @realh mentions. Here's a note I made when doing some testing orignally:
// Defines an interface for the constructor function itself ("new" is a keyword / special syntax below) export interface Foo_Constructor {     new (params: ParamInterface) } // Extend the interface with any other static-side methods // Actually define Foo.new(), not a constructor function export declare class Foo_Constructor {     new (a1: string): Foo } // The interface/class members export interface Foo {     // ... } // Describe the "Foo" part of the API: it's the static side of the "Foo" class, // so "new Foo(params)" gives us a Foo, as does "Foo.new('bar')" export declare var Foo: Foo_Constructor
That was how the generated code looked at one point. I don't remember quite why it changes or why I didn't push this idea forward anymore. Best we can do is implement the approach and see how it goes...

I started implementing it the way I learned from jcalz's answer on stackoverflow, but I realised that it doesn't solve the problem of having to copy members from superclasses into subclasses. If I don't do that, Typescript doesn't recognise that the objects implement the interfaces. So I think I'll try my first idea instead.

Is now implemented in the master :)


Environment Variable

To avoid putting my key on github, I want to store it in .env and then pull that into Contact.js with process.env.REACT_APP_ACCESS_KEY. Unfortunately, this is not working. I've found no solution yet.

I found a solution which required an edit in the root package.json after downloading env-cmd. Now, the access key is being pulled successfully from the .env in the root, but it can still be console logged, which is its own issue.
https://www.linkedin.com/pulse/how-use-environment-files-env-react-app-muhammad-sameem
This is where I found the solution that worked.

To truly be secure, I'd need to keep the key away from the client folder entirely. The browser is never secure. So I'd have to run the api request server side. Not going to do that for now, but might come back to it at some point.


openreview-py should support python 3

Importing the module in a python 3 environment throws the following error:
>>> import openreview
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/site-packages/openreview/__init__.py", line 2, in <module>
  from tools import *
ModuleNotFoundError: No module named 'tools'

This error is related to the use of relative imports which are no longer allowed in python: https://wiki.python.org/moin/PortingPythonToPy3k#relative-imports

thanks @zbialecki, this is in the works


Script Missing - Link Unhelpful

The link to the script "Events 16962 - 16969 Reader" still point to the gallery.technet.microsoft.com. Navigation is redirected to docs.microsoft.com/en-us/samples/browse. Searching for script at "Browse Code Samples" page returns zero results. The page will need to be updated and/or the script link corrected:
Link is as follows and likely found between lines 90 and 100 of "network-access-restrict-clients-allowed-to-make-remote-sam-calls.md":
https://gallery.technet.microsoft.com/Events-16962-16969-Reader-2eae5f1d

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

ID: ef8b6967-0e45-bcdd-6d70-54759d9f7ec8
Version Independent ID: 6651ebc1-04f0-421f-891b-6957ca37da7c
Content: Network access - Restrict clients allowed to make remote calls to SAM - Windows security
Content Source: windows/security/threat-protection/security-policy-settings/network-access-restrict-clients-allowed-to-make-remote-sam-calls.md
Product: m365-security
Technology: mde
GitHub Login: @Dansimp
Microsoft Alias: dansimp

(similar issue ticket to #9435 Parsing Script Missing)


Default New Machine Role

default new machine role in provisioning wizard to node

fixes https://github.com/supergiant/supergiant/issues/856

Coverage remained the same at 61.721% when pulling 96dde997ef22e3d598b65d4ec2b14b74a900ad32 on josephkane:default-new-machine-to-node into 9733a710193f75da959e1e90df9c662435543ed8 on supergiant:master.

LGTM


[GraphQL/Limits] Gate showing limits behind header

Description
Add a header -- X-Sui-RPC-Show-Usage -- to control whether to display a query's usage of limits.  Also only show the usage, and not the limits themselves, now that the limits are exposed via an explicit GraphQL API.
Test Plan
Tested on GraphiQL

does today's limiting design accumulate usage and throttle one a limit is reach?

@longbowlu, yes, the limits are all cumulative (across the whole query).  I believe @oxade is working on the more complex limits (estimating DB roundtrips, estimating based on EXPLAIN, and timeouts) which are all also cumulative.


Mod total on title screen bug

I was just opening fabric to play some more on my modded world, when I noticed that the total mods it said I had installed on the title screen was 53, and when I opened the actual menu, it said the correct amount which was 5. Can easily reproduce just by opening the client again. Will give more details if necessary.

Can you send a screenshot of the ModMenu in-game config screen?

Can you send a screenshot of the ModMenu in-game config screen?

 Yes, that did the trick. Thank you!


Fixed code snippet include in first Web API tutorial

Fixing a wrong code include withtin the first Web API tutorial.

Hi @FPar, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, DNFBOT;

@rachelappel  if this looks OK maybe you could merge before you start your update.


Kernel crashes or hangs on tab completions

It appears that both the console and notebook will crash or hang if you try to tab complete in a weird place, like after a number. Otherwise tab completion works normally, as does other functionality.
Steps to reproduce:

Run jupyter console --kernel=raku, or open a notebook
(Optional) Type 1+1 and hit enter or run the cell, and get 2.
Type 1 and hit <tab>.
(Optional) Hit <delete>
Hit <enter>
Expected result: either 1 or nothing (if deleted).

Actual result, in a console:

/opt/homebrew/anaconda3/lib/python3.9/site-packages/jupyter_console/ptshell.py:787: UserWarning: The kernel did not respond to an is_complete_request. Setting `use_kernel_is_complete` to False.
  warn('The kernel did not respond to an is_complete_request. '

Actual result, in a notebook: the cell's execution indefinitely hangs.  I don't see any output from the notebook's log when this happens.

It turns out I was on an older version of jupyter-console and jupyter-notebook, and after updating them now all tab completion fails in a similar way for the notebook, and for the console there is an additional error after step 3 (when typing anything and hitting tab, such as "a"):
Unhandled exception in event loop:
  File "/opt/homebrew/anaconda3/lib/python3.9/asyncio/tasks.py", line 256, in __step
    result = coro.send(None)
  File "/opt/homebrew/anaconda3/lib/python3.9/site-packages/prompt_toolkit/buffer.py", line 1939, in new_coroutine
    await coroutine(*a, **kw)
  File "/opt/homebrew/anaconda3/lib/python3.9/site-packages/prompt_toolkit/buffer.py", line 1763, in async_completer
    async for completion in async_generator:
  File "/opt/homebrew/anaconda3/lib/python3.9/site-packages/prompt_toolkit/completion/base.py", line 326, in get_completions_async
    async for completion in completer.get_completions_async(
  File "/opt/homebrew/anaconda3/lib/python3.9/site-packages/prompt_toolkit/completion/base.py", line 202, in get_completions_async
    for item in self.get_completions(document, complete_event):
  File "/opt/homebrew/anaconda3/lib/python3.9/site-packages/jupyter_console/ptshell.py", line 150, in get_completions
    content = self.jup_completer.complete_request(
  File "/opt/homebrew/anaconda3/lib/python3.9/site-packages/jupyter_console/completer.py", line 37, in complete_request
    msg = run_sync(self.client.shell_channel.get_msg)(timeout=self.timeout)
  File "/opt/homebrew/anaconda3/lib/python3.9/site-packages/jupyter_core/utils/__init__.py", line 158, in wrapped
    return _runner_map[name].run(inner)
  File "/opt/homebrew/anaconda3/lib/python3.9/site-packages/jupyter_core/utils/__init__.py", line 125, in run
    return fut.result(None)
  File "/opt/homebrew/anaconda3/lib/python3.9/concurrent/futures/_base.py", line 446, in result
    return self.__get_result()
  File "/opt/homebrew/anaconda3/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result
    raise self._exception
  File "/opt/homebrew/anaconda3/lib/python3.9/asyncio/tasks.py", line 256, in __step
    result = coro.send(None)
  File "/opt/homebrew/anaconda3/lib/python3.9/site-packages/jupyter_client/channels.py", line 230, in get_msg
    raise Empty

Exception
Press ENTER to continue...

Relevant version info:
❯ raku --version
Welcome to Rakudo™ v2023.02.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2023.02.
❯ zef info Jupyter::Kernel
===> Searching for: Jupyter::Kernel
===> Updating fez mirror: https://360.zef.pm/
===> Updated fez mirror: https://360.zef.pm/
===> Updating rea mirror: https://raw.githubusercontent.com/Raku/REA/main/META.json
===> Updated rea mirror: https://raw.githubusercontent.com/Raku/REA/main/META.json
- Info for: Jupyter::Kernel
- Identity: Jupyter::Kernel:ver<0.0.20>:auth<cpan:BDUGGAN>
- Recommended By: Zef::Repository::Ecosystems<rea>
- Installed: Yes, as Jupyter::Kernel:ver<0.0.20>
Description:	 Raku Kernel for Jupyter Notebooks
License:	 Artistic-2.0
Source-url:	 https://raw.githubusercontent.com/raku/REA/main/archive/J/Jupyter%3A%3AKernel/Jupyter%3A%3AKernel%3Aver%3C0.0.20%3E%3Aauth%3Ccpan%3ABDUGGAN%3E.tar.gz
Provides: 11 modules
Depends: 6 items
❯ jupyter --version
Selected Jupyter core packages...
IPython          : 8.10.0
ipykernel        : 6.19.2
ipywidgets       : 8.0.4
jupyter_client   : 7.3.4
jupyter_core     : 5.2.0
jupyter_server   : 1.23.4
jupyterlab       : 3.5.3
nbclient         : 0.5.13
nbconvert        : 6.5.4
nbformat         : 5.7.0
notebook         : 6.5.2
qtconsole        : 5.4.0
traitlets        : 5.7.1
❯ jupyter notebook --version
6.5.2
❯ python --version
Python 3.9.16

Let me know if you need any other info.

I've made a change that fixed things for me; let me know if you're still seeing issues.

It's working great for me now, thank you for the quick fix!


auth: clear cookie and redirect on error

This commit changes the behaviour of the OIDC Authservice, when an error
is encountered when processing the JWT.
An error may come up because:

The JWT may be expired.
The JWT may be invalid.

When an error is encountered now, an HTTP error code is returned along
with a message.
This behaviour is changed so that the cookie is cleared and the user is
redirected when there is an error with the JWT.
Fixes: #13
Signed-off-by: Yannis Zarkadas<EMAIL_ADDRESS>

Hi,
Thank you for this! I admit that redirect is a much better way to handle this.


Can not send requests via socks proxy with Async-http-client

Hi,
I experienced some problems when trying to send request via a Socks proxy. The backend i used is Akka-http-client with Cats-effect. The execution of requests sent by socks results in the following exception:
org.asynchttpclient.exception.RemotelyClosedException: Remotely closed
  at org.asynchttpclient.exception.RemotelyClosedException.INSTANCE(Unknown Source)

Steps to reproduce
import cats.effect._
import com.softwaremill.sttp._
import com.softwaremill.sttp.asynchttpclient.cats.AsyncHttpClientCatsBackend

implicit val backend: SttpBackend[IO, Nothing] =
    AsyncHttpClientCatsBackend[IO](options = SttpBackendOptions.socksProxy(host, port))

sttp.get(uri"https://github.com/softwaremill/sttp").send().unsafeRunSync()

it seems to come from how the AsyncHttpClientBackend configures the ProxyServer.
A pull request is on its way.

The Pull request #146


unify naming conventions for imported LMetab functions

schmidt and do_deficit are taken care of w/ recent PRs. k600.2.kgas and day2doy remain

i think the calc_xxx scheme looks good

Open to changes later, but we seem to have settled pretty solidly on calc_xxx and convert_x_to_y

Looks great to me.


Violation of PRIMARY KEY constraint, on SQL Server Database, using BulkInsertOrUpdate method

Hello. I´ve been using this extension in .net core 6 and with a sql server database. It worked fine for some tables, but today i got this error:

I checked my list for duplicate values and theres none. My key is based on three columns (descart, colcart, seqncha).
I added only two items with different keys and still got the same error.

But if i only do "BulkInsert", i dont get this error. I think there' s something wrong with "BulkInsertOrUpdate" method.
@borisdj hope someone can help me solve this. Thank you.

Can you write a test where the issue would be reproducible.

I was building a sample project with only this specific table in a different database, and i had no problems. The only difference is that the database im using has various tables and relations between them (Foreign Keys). Is it possible that the problem has to do with the foreign keys? Is it possible to disable this verification, when adding the data, in the InsertOrUpdate method Properties?

Not sure, and without reproducible example, don't have more info.


support http proxy when using nuxi init

Environment

Operating System: Darwin
Node Version:     v16.17.0
Nuxt Version:     0.0.0
Nitro Version:    -
Package Manager:  unknown
Builder:          webpack
User Config:      -
Runtime Modules:  -
Build Modules:    -

Reproduction
Not exist
Describe the bug
 ERROR  Failed to download template from registry: request to https://raw.githubusercontent.com/nuxt/starter/templates/templates/v3.json failed, reason: connect ECON3

  at /Users/xdclass/.npm/_npx/a95e0f536cf9a537/node_modules/nuxi/dist/chunks/init.mjs:13269:11
  at processTicksAndRejections (node:internal/process/task_queues:96:5)
  at async downloadTemplate (/Users/xdclass/.npm/_npx/a95e0f536cf9a537/node_modules/nuxi/dist/chunks/init.mjs:13268:20)
  at async Object.invoke (/Users/xdclass/.npm/_npx/a95e0f536cf9a537/node_modules/nuxi/dist/chunks/init.mjs:13336:15)
  at async _main (/Users/xdclass/.npm/_npx/a95e0f536cf9a537/node_modules/nuxi/dist/cli.mjs:50:20)

Additional context
 curl https://raw.githubusercontent.com/nuxt/starter/templates/templates/v3.json
{
  "name": "v3",
  "defaultDir": "nuxt-app",
  "url": "https://v3.nuxtjs.org",
  "tar": "https://codeload.github.com/nuxt/starter/tar.gz/refs/heads/v3"
}

Everything works fine when I request the URL directly, I think this might be a bug in nuxt.
Logs
No response

Not work for me. Already set proxy with clash
node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: getaddrinfo ENOENT raw.githubusercontent.com
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
Emitted 'error' event on ClientRequest instance at:
    at TLSSocket.socketErrorListener (node:_http_client:502:9)
    at TLSSocket.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'getaddrinfo',
  hostname: 'raw.githubusercontent.com'
}

Not work for me. Already set proxy with clash
node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: getaddrinfo ENOENT raw.githubusercontent.com
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
Emitted 'error' event on ClientRequest instance at:
    at TLSSocket.socketErrorListener (node:_http_client:502:9)
    at TLSSocket.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'getaddrinfo',
  hostname: 'raw.githubusercontent.com'
}

get ip of raw.githubusercontent.com from a web.
and set these into hosts file (windows: C:\Windows\System32\drivers\etc)
<IP_ADDRESS> raw.githubusercontent.com
rerun 'npx nuxi init nut3-app', and it works

Reopening to investigate more.

In fact, this is entirely due to China's network issues. @rabbitxl method of operation is to switch to an IP that has not been blocked, and the proxy works well (:
I think if we want to solve this problem for real, the first step is to directly abandon GitHub as a resource handling platform.

I totally understand your situation and it is not great or fair for Nuxt being hard to use in some countries. We should find a better way to overcome this issue (I'm thinking to either an easier global proxy config or one for custom end-pont).

we may create a new package to automatically set http(s)_proxy by detecting the system proxy. I found a package luckyyyyy/node-system-proxy, which can set / remove the system api through napi. is it possible to form this library and add an api to get the current proxy?

another package: @cypress/get-windows-proxy

same issue here.
It's seems that the problem also is from ipv6. i disabled ipv6 and it works :)
npm ERR! code ETIMEDOUT
npm ERR! syscall connect
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/nuxi failed, reason: connect ETIMEDOUT 2606:4700::6810:1323:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/x535/.npm/_logs/2023-03-15T15_33_57_098Z-debug-0.log

how to solve if this issue arise
node:events:491
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20)
Emitted 'error' event on ClientRequest instance at:
at TLSSocket.socketErrorListener (node:_http_client:502:9)
at TLSSocket.emit (node:events:513:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -4077,
code: 'ECONNRESET',
syscall: 'read'
}

environment:macos
solution: edit your file named /etc/hosts and add a mapping like this <<IP_ADDRESS> raw.githubusercontent.com>
the ip you could find in https://ipaddress.com/website/raw.githubusercontent.com

environment:macos solution: edit your file named /etc/hosts and add a mapping like this <<IP_ADDRESS> raw.githubusercontent.com> the ip you could find in https://ipaddress.com/website/raw.githubusercontent.com

This is not actually a solution. Now we are finding a way to let giget use the system proxy, not how to connect to github in China.

But I can't run the example mentioned at https://github.com/unjs/giget/issues/23

But I can't run the example mentioned at unjs/giget#23

Have you set the http(s)_proxy environment variable?

yes , I put my clash proxy address in .env file

But I can't run the example mentioned at unjs/giget#23

Have you set the http(s)_proxy environment variable?

yes , I put my clash proxy address in .env file

It won't work because nuxi in it does not use dozens and the environment variables in .env files are injected. You should set them in your shell (terminal).

<IP_ADDRESS>

Really good!!!

<IP_ADDRESS>

Really good!!!

哎 就不能看一下issue标题吗？？？这个issue讨论的是如何让nuxi走代理的问题而不是怎么访问GitHub
Please read the title. This issue is discussing how to let nuxi use the proxy.

<IP_ADDRESS>

Really good!!!

哎 就不能看一下issue标题吗？？？这个issue讨论的是如何让nuxi走代理的问题而不是怎么访问GitHub
Please read the title. This issue is discussing how to let nuxi use the proxy.

修改DNS能够正确初始化项目，而使用代理不可以，仅限个人情况

That's too bad.  Can you tell me what I should do to create a project?

That's too bad. Can you tell me what I should do to create a project?

If you want to start a new project,  you can simply clone this GitHub repository: https://github.com/nuxt/starter/tree/v3.

That's too bad. Can you tell me what I should do to create a project?

If you want to start a new project, you can simply clone this GitHub repository: https://github.com/nuxt/starter/tree/v3.

And delete the .git folder :)

That's too bad. Can you tell me what I should do to create a project?

If you want to start a new project, you can simply clone this GitHub repository: https://github.com/nuxt/starter/tree/v3.

And delete the .git folder :)

Thank you. That's a great idea.

get ip of raw.githubusercontent.com from a web. and set these into hosts file (windows: C:\Windows\System32\drivers\etc) <IP_ADDRESS> raw.githubusercontent.com rerun 'npx nuxi init nut3-app', and it works

it works

Thanks! It's work for me

Browser proxy is invalid for it. Try setting up a terminal proxy.
export https_proxy=http://<IP_ADDRESS>:7890 http_proxy=http://<IP_ADDRESS>:7890 all_proxy=socks5://<IP_ADDRESS>:7890

I have the same problem and solved it, if you are using clash, you can turn on tun mode to ensure that nuxi init use the proxy :P

I have the same problem and solved it, if you are using clash, you can turn on tun mode to ensure that nuxi init use the proxy :P

it worked for me

Hello, nuxi init does not work under proxy (Windows 11). My proxy is also password-protected (http://user:pass@proyhost:port/). Nuxi gives me error:
Error: Failed to download template from registry: fetch failed
I have proxy configured (both http and htttps) under npm and environment variables and it works fine. I've also tried Angular CLI and works as well.
Thank you

Are you still investigating this @pi0?

Report content

Thank you.
I'm in China.
In my Mac, i add DNS command in "/etc/hosts" file. I have already solved this problem.
<IP_ADDRESS> raw.githubusercontent.com


func requires credentials on each local func deploy for Mac OS X

I literally have to type in the username and password to my personal machine each and every time

@matejvasek note that I am not seeing the same behavior.  My ~/.docker/config.json is:
{
	"auths": {
		"https://index.docker.io/v1/": {},
		"localhost:5000": {
			"auth": "REDACTED_BUT_POPULATED"
		},
		"quay.io": {}
	},
	"credsStore": "desktop",
	"experimental": "enabled",
	"stackOrchestrator": "swarm",
	"currentContext": "default"
}

the registry which Omer is using when this issue is encountered is the localhost:5000.

This shouldn't be Mac OS X exclusive. Users are prompted for credentials if they are not logged in via docker login.

Ah, i see. I think including that help text when we prompt login will
satisfy me enough to close this issue out!
On Wed, Sep 15, 2021 at 8:58 AM Matej Vasek @.***>
wrote:

This shouldn't be Mac OS X exclusive. Users are prompted for credentials
if they are not logged in via docker login.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/knative-sandbox/kn-plugin-func/issues/512#issuecomment-919995079,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AD4G5HWBLYUOHXKUFWLVHO3UCCJ6HANCNFSM5DSNCN7A
.

I think we could save the entered credentials (or maybe first ask the user if it's OK to save it). We just need to decide where to put it, I would prefer to create our own auth file, and use ~/.docker/config.json only as read-only.


Question : using HystrixCommand without inheriting from it ?

I'm new to hystrix and all examples i see use a service interface and implementation where the implementation inherits from the HystrixCommand class.
From what i see it's also possible to instantiate the command when needed and pass an anonymous method to it.
Is it considered a bad practice to use it this way ? Or is this just because most examples are implemented using the inheritance way ?
Thanks.

Its just more common to derive from HystrixCommand and customize it as needed...
There is no problem just doing new HystrixCommand()...
Dave

I saw a difference, request level caching is available only when inheriting as you have to override a virtual method.


cant connect to pods from external k8s nodes , k8s nodes can connect only to local pods, load balancing doesnt work properly

Your Environment
3 servers  with CentOS 7.3.1611 (Core)  / 3.10.0-514.el7.x86_64
flannel - v0.8.0
kubernetes - v 1.7.5
3 node cluster with 1 master (cent501) and 2 workers (cent502, cent503)
[root@cent501 ~]# kubectl get nodes
NAME      STATUS    AGE       VERSION
cent501   Ready     39m       v1.7.5
cent502   Ready     24m       v1.7.5
cent503   Ready     14m       v1.7.5

Expected Behavior
1.k8s nodes should serve my service (type=nodePort) on servicePort on each k8s node
2.pods should communicate with others, nodes should communicate with pods
Current Behavior
run simple deployment based on 6 replicas of nginx:
[root@cent501 ~]# kubectl run deployment01 --image=nginx --replicas=6 --port=80
deployment "deployment01" created

my pods:
[root@cent501 ~]# kubectl get pods  -o wide
NAME                           READY     STATUS        RESTARTS   AGE       IP            NODE
deployment01-554722758-7lfdg   1/1       Running       0          48s       <IP_ADDRESS>   cent502
deployment01-554722758-9gvp5   1/1       Running       0          48s       <IP_ADDRESS>   cent503
deployment01-554722758-hdgw2   1/1       Running       0          48s       <IP_ADDRESS>   cent501
deployment01-554722758-p5hzs   1/1       Running       0          48s       <IP_ADDRESS>   cent503
deployment01-554722758-sxqr2   1/1       Running       0          48s       <IP_ADDRESS>   cent503
deployment01-554722758-vxp7j   1/1       Running       0          48s       <IP_ADDRESS>   cent503

expose deployment as a service with type "NodePort"
[root@cent501 ~]# kubectl expose deployment/deployment01 --type="NodePort" --port 80
service "deployment01" exposed

my services and my endpoints (nginx service works on 31326):
[root@cent501 ~]# kubectl get svc
NAME           CLUSTER-IP     EXTERNAL-IP   PORT(S)        AGE
deployment01   <IP_ADDRESS>   <nodes>       80:31326/TCP   4s
kubernetes     <IP_ADDRESS>      <none>        443/TCP        44m

[root@cent501 ~]# kubectl get ep
NAME           ENDPOINTS                                                  AGE
deployment01   <IP_ADDRESS>:80,<IP_ADDRESS>:80,<IP_ADDRESS>:80 + 3 more...   6s
kubernetes     <IP_ADDRESS>:6443                                        44m

[root@cent501 tmp]# kubectl describe svc deployment01
Name:			deployment01
Namespace:		default
Labels:			run=deployment01
Annotations:		<none>
Selector:		run=deployment01
Type:			NodePort
IP:			<IP_ADDRESS>
Port:			<unset>	80/TCP
NodePort:		<unset>	31326/TCP
Endpoints:		<IP_ADDRESS>:80,<IP_ADDRESS>:80,<IP_ADDRESS>:80 + 3 more...
Session Affinity:	None
Events:			<none>

my flannel subnet.env files on 3 nodes:
# ssh cent501 cat /run/flannel/subnet.env
FLANNEL_NETWORK=<IP_ADDRESS>/16
FLANNEL_SUBNET=<IP_ADDRESS>/24
FLANNEL_MTU=1450
FLANNEL_IPMASQ=true

# ssh cent502 cat /run/flannel/subnet.env
FLANNEL_NETWORK=<IP_ADDRESS>/16
FLANNEL_SUBNET=<IP_ADDRESS>/24
FLANNEL_MTU=1450
FLANNEL_IPMASQ=true

# ssh cent503 cat /run/flannel/subnet.env
FLANNEL_NETWORK=<IP_ADDRESS>/16
FLANNEL_SUBNET=<IP_ADDRESS>/24
FLANNEL_MTU=1450
FLANNEL_IPMASQ=true

I can't curl (on service port = 31326) my hardware-nodes, load balancing doesnt work properly
I can only curl and ping pods from nodes where these pods are running , no way to communicate with pods from other host
Once again my pods:
[root@cent501 ~]# kubectl get pods  -o wide
NAME                           READY     STATUS    RESTARTS   AGE       IP            NODE
deployment01-554722758-7lfdg   1/1       Running   0          14m       <IP_ADDRESS>   cent502
deployment01-554722758-9gvp5   1/1       Running   0          14m       <IP_ADDRESS>   cent503
deployment01-554722758-hdgw2   1/1       Running   0          14m       <IP_ADDRESS>   cent501
deployment01-554722758-p5hzs   1/1       Running   0          14m       <IP_ADDRESS>   cent503
deployment01-554722758-sxqr2   1/1       Running   0          14m       <IP_ADDRESS>   cent503
deployment01-554722758-vxp7j   1/1       Running   0          14m       <IP_ADDRESS>   cent503

on node cent501 I can only ping these one pod with <IP_ADDRESS>
on node cent502 I can only ping these one pod with <IP_ADDRESS>
on node cent503 I have 4 pods so I can ping them but only them:
<IP_ADDRESS>
<IP_ADDRESS>
<IP_ADDRESS>
<IP_ADDRESS>
with curling 80 the same effect
my routing tables:
# ssh cent501 ip route show
default via <IP_ADDRESS> dev enp0s3  proto static  metric 100
<IP_ADDRESS>/24 dev cni0  proto kernel  scope link  src <IP_ADDRESS>
<IP_ADDRESS>/16 dev flannel.1
<IP_ADDRESS>/16 dev docker0  proto kernel  scope link  src <IP_ADDRESS>
<IP_ADDRESS>/24 dev enp0s3  proto kernel  scope link  src <IP_ADDRESS>  metric 100

# ssh cent502 ip route show
default via <IP_ADDRESS> dev enp0s3  proto static  metric 100
<IP_ADDRESS>/16 dev flannel.1
<IP_ADDRESS>/24 dev cni0  proto kernel  scope link  src <IP_ADDRESS>
<IP_ADDRESS>/16 dev docker0  proto kernel  scope link  src <IP_ADDRESS>
<IP_ADDRESS>/24 dev enp0s3  proto kernel  scope link  src <IP_ADDRESS>  metric 100

# ssh cent503 ip route show
default via <IP_ADDRESS> dev enp0s3  proto static  metric 100
<IP_ADDRESS>/16 dev flannel.1
<IP_ADDRESS>/24 dev cni0  proto kernel  scope link  src <IP_ADDRESS>
<IP_ADDRESS>/16 dev docker0  proto kernel  scope link  src <IP_ADDRESS>
<IP_ADDRESS>/24 dev enp0s3  proto kernel  scope link  src <IP_ADDRESS>  metric 100

type=vxlan
[root@cent501 ~]# cat /tmp/kube-flannel.yml | grep -i type
      "type": "flannel",
        "Type": "vxlan"

I installed k8s via kubeadm and after that apply 2 flannel yml files:
kubeadm init --pod-network-cidr=<IP_ADDRESS>/16
kubectl apply -f /tmp/kube-flannel.yml
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel-rbac.yml

the only difference between my local kube-flannel.yml and "official" file
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
is:
59c59
<         command: [ "/opt/bin/flanneld", "--ip-masq", "--kube-subnet-mgr" ]
---
>         command: [ "/opt/bin/flanneld", "--ip-masq", "--kube-subnet-mgr", "--iface=enp0s3" ]

according to:
https://github.com/coreos/flannel/issues/535
without or without these small change it doesnt work

I also tested solution from other issues:
ip route add <IP_ADDRESS>/16 dev enp0s3

with no success :-(

Finally I found important checkpoint during installation:
kubectl get nodes -o jsonpath='{.items[*].spec.podCIDR}'
if it is not ok (empty output) my problem still persists, if its ok (output with <IP_ADDRESS>/24) there is no problem any more nad I have correct inter-node communication between pods

and 2nd milestone - after reboot of kubernetes slave node we must execute
iptables -P FORWARD ACCEPT

I'm leaving this open to track the iptables -P FORWARD ACCEPT park

news?

still (sometimes) have to use "iptables -P FORWARD ACCEPT"
no more additional info

I've run iptables -P FORWARD ACCEPT on all nodes and pods still can't communicate across hosts. One of the effects of this is that I can't get cluster DNS working (they can't reach the dns pods)

I changed to Canal 1.7.0 while using the same terraform scripts for a cluster and now all pods can communicate across hosts without issue.
Any ideas why this would be?

I have a similar issue.
My setup:
k8s version: v1.8.5
I have two nodes (Oracle Linux 7.4)
Network plugin: flannel
node1 -> pod1 (nginx)
node2 -> pod2 (nginx)
node1 to pod1 - works
node2 to pod2 - works
node1 to pod2 -> ping works. curl does not work.
node2 to pod1 -> ping works. curl does not work.
I have added the iptables rules to FORWARD chain. Still does not work. I am really not sure why ping works but not http. Any help is much appreciated.

Using tcpdump, I can see that the traffic reaches the pod but the I do not see anything going out from the pod.

Having the same issue but with weave. (5 Nodes CoreOS)
I have to agree with @slawekgh ... maybe its linked to docker somehow.
If I ping from other nodes, it works. If I curl from other nodes, it does not work.
If I ping from the slave node, it works. if I curl from the slave node (where that specific pod is running), it works.

facing the same for weave as well
helpp??

Hello,
this post helped me to solve my issue:
It seems that some forwarding rules needs to be set manualy since docker v1.13
Maybe earlier version of flanneld can solve this issue (actually can't have a more recent version than 0.7.0)
Regards

https://github.com/coreos/flannel/issues/799


CUDA kernel function scalar parameter data type

Hey guys, I'm using cuda for a large project involved with lots of parameters. And I want to use either float32 or int32 data type in kernel function. So it's of no problem when i decorate the argument as like cuda.jit(void(float32[:],float32[:]) f(a,b).
So my question is what if I put some pre-defined scalar, let's name it c, inside kernel function, and have kernel like b[i] = a[i]*c.
We know that c is a float64 in python if we do not specify it. So a[i]*c should be a float64 instead. So will it cause any problem that I load it in c[i]?
Can anyone explain it at RAM allocation level? Thanks!

Thanks for the question. Numba does type inference to work out the types of all the variables using an algorithm that mixes information known about the input types and information about what happens to the types of variables across all operations in a function. You can take a look at the types that Numba worked out using the .inspect_types() method on the dispatcher, e.g.:
from numba.cuda import jit
from numba import cuda
import numpy as np

@jit("void(float32[:], float32[:])")
def foo(a, b):
    tid = cuda.grid(1)
    sz = len(a)
    c = 12
    if tid < sz:
        b[tid] = a[tid] * c

N = 10
x = np.ones(N, np.float32)
y = np.zeros(N, np.float32)

foo[1, 32](x, y)

print(x)
print(y)
print(foo.inspect_types())

gives:
[1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]
[12. 12. 12. 12. 12. 12. 12. 12. 12. 12.]
_ZN6cudapy8__main__7foo$241E5ArrayIfLi1E1A7mutable7alignedE5ArrayIfLi1E1A7mutable7alignedE (array(float32, 1d, A), array(float32, 1d, A))
--------------------------------------------------------------------------------
# File: issue4654.py
# --- LINE 6 ---
# label 0

@jit("void(float32[:], float32[:])")

# --- LINE 7 ---

def foo(a, b):

    # --- LINE 8 ---
    #   a = arg(0, name=a)  :: array(float32, 1d, A)
    #   b = arg(1, name=b)  :: array(float32, 1d, A)
    #   $0.1 = global(cuda: <module 'numba.cuda' from '<path>/numba/cuda/__init__.py'>)  :: Module(<module 'numba.cuda' from '<path>/numba/cuda/__init__.py'>)
    #   $0.2 = getattr(value=$0.1, attr=grid)  :: Macro(<class 'numba.cuda.cudadecl.Cuda_grid'>)
    #   del $0.2
    #   del $0.1
    #   $const0.3 = const(int, 1)  :: Literal[int](1)
    #   $0.4 = call ptx.grid.1d($const0.3, func=ptx.grid.1d, args=[Var($const0.3, issue4654.py (8))], kws=(), vararg=None)  :: (int64,) -> int32
    #   del $const0.3
    #   tid = $0.4  :: int32
    #   del $0.4

    tid = cuda.grid(1)

    # --- LINE 9 ---
    #   $0.5 = global(len: <built-in function len>)  :: Function(<built-in function len>)
    #   $0.7 = call $0.5(a, func=$0.5, args=[Var(a, issue4654.py (8))], kws=(), vararg=None)  :: (array(float32, 1d, A),) -> int64
    #   del $0.5
    #   sz = $0.7  :: int64
    #   del $0.7

    sz = len(a)

    # --- LINE 10 ---
    #   $const0.8 = const(int, 12)  :: Literal[int](12)
    #   c = $const0.8  :: Literal[int](12)
    #   del $const0.8

    c = 12

    # --- LINE 11 ---
    #   $0.11 = tid < sz  :: bool
    #   del sz
    #   branch $0.11, 30, 46
    # label 30

    if tid < sz:

        # --- LINE 12 ---
        #   del $0.11
        #   $30.3 = getitem(value=a, index=tid)  :: float32
        #   del a
        #   $30.5 = $30.3 * c  :: float64
        #   del c
        #   del $30.3
        #   b[tid] = $30.5  :: (array(float32, 1d, A), int64, float64) -> none
        #   del tid
        #   del b
        #   del $30.5
        #   jump 46
        # label 46
        #   del tid
        #   del c
        #   del b
        #   del a
        #   del $0.11
        #   $const46.1 = const(NoneType, None)  :: none
        #   $46.2 = cast(value=$const46.1)  :: none
        #   del $const46.1
        #   return $46.2

        b[tid] = a[tid] * c

================================================================================

Note this line  #   $30.5 = $30.3 * c  :: float64, where the use of c is resulting an a float64 type.
If you change the type of the kernel to void(int32[:], int32[:]) the types are inferred differently, c is interpreted as an int64, i.e. #   $30.5 = $30.3 * c  :: int64.

Thanks! So if I understand correctly, it's usually of no problem because python can adjust output to fit the type accordingly. But it will still cause some problem because it used float64 c to do the calculation and then adjust the result to our desired type. So when it's involved with some rounding issue, float32 c and float64 c will still cause a minor difference, right?

At present literal values are taken as the widest type of their class, e.g. float->float64, int->int64, you can force the type by wrapping in a numba.types.* call. e.g.
from numba.cuda import jit
from numba import cuda
import numpy as np

from numba import types

@jit("void(float32[:], float32[:])")
def foo(a, b):
    tid = cuda.grid(1)
    sz = len(a)
    c = types.float32(12) # force this as a float32
    if tid < sz:
        b[tid] = a[tid] * c

N = 10
x = np.ones(N, np.float32)
y = np.zeros(N, np.float32)

foo[1, 32](x, y)

print(x)
print(y)
print(foo.inspect_types())

gives:
[1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]
[12. 12. 12. 12. 12. 12. 12. 12. 12. 12.]
_ZN6cudapy8__main__7foo$241E5ArrayIfLi1E1A7mutable7alignedE5ArrayIfLi1E1A7mutable7alignedE (array(float32, 1d, A), array(float32, 1d, A))
--------------------------------------------------------------------------------
# File: issue4654_2.py
# --- LINE 7 ---
# label 0

@jit("void(float32[:], float32[:])")

# --- LINE 8 ---

def foo(a, b):

    # --- LINE 9 ---
    #   a = arg(0, name=a)  :: array(float32, 1d, A)
    #   b = arg(1, name=b)  :: array(float32, 1d, A)
    #   $0.1 = global(cuda: <module 'numba.cuda' from '<path>/numba/cuda/__init__.py'>)  :: Module(<module 'numba.cuda' from '<path>/numba/cuda/__init__.py'>)
    #   $0.2 = getattr(value=$0.1, attr=grid)  :: Macro(<class 'numba.cuda.cudadecl.Cuda_grid'>)
    #   del $0.2
    #   del $0.1
    #   $const0.3 = const(int, 1)  :: Literal[int](1)
    #   $0.4 = call ptx.grid.1d($const0.3, func=ptx.grid.1d, args=[Var($const0.3, issue4654_2.py (9))], kws=(), vararg=None)  :: (int64,) -> int32
    #   del $const0.3
    #   tid = $0.4  :: int32
    #   del $0.4

    tid = cuda.grid(1)

    # --- LINE 10 ---
    #   $0.5 = global(len: <built-in function len>)  :: Function(<built-in function len>)
    #   $0.7 = call $0.5(a, func=$0.5, args=[Var(a, issue4654_2.py (9))], kws=(), vararg=None)  :: (array(float32, 1d, A),) -> int64
    #   del $0.5
    #   sz = $0.7  :: int64
    #   del $0.7

    sz = len(a)

    # --- LINE 11 ---
    #   $0.8 = global(types: <module 'numba.types' from '<path>/numba/types/__init__.py'>)  :: Module(<module 'numba.types' from '<path>/numba/types/__init__.py'>)
    #   $0.9 = getattr(value=$0.8, attr=float32)  :: class(float32)
    #   del $0.8
    #   $const0.10 = const(int, 12)  :: Literal[int](12)
    #   $0.11 = call $0.9($const0.10, func=$0.9, args=[Var($const0.10, issue4654_2.py (11))], kws=(), vararg=None)  :: (Literal[int](12),) -> float32
    #   del $const0.10
    #   del $0.9
    #   c = $0.11  :: float32
    #   del $0.11

    c = types.float32(12)

    # --- LINE 12 ---
    #   $0.14 = tid < sz  :: bool
    #   del sz
    #   branch $0.14, 36, 52
    # label 36

    if tid < sz:

        # --- LINE 13 ---
        #   del $0.14
        #   $36.3 = getitem(value=a, index=tid)  :: float32
        #   del a
        #   $36.5 = $36.3 * c  :: float32
        #   del c
        #   del $36.3
        #   b[tid] = $36.5  :: (array(float32, 1d, A), int64, float32) -> none
        #   del tid
        #   del b
        #   del $36.5
        #   jump 52
        # label 52
        #   del tid
        #   del c
        #   del b
        #   del a
        #   del $0.14
        #   $const52.1 = const(NoneType, None)  :: none
        #   $52.2 = cast(value=$const52.1)  :: none
        #   del $const52.1
        #   return $52.2

        b[tid] = a[tid] * c

================================================================================

note the multiply by c line now reads:  #   $36.5 = $36.3 * c  :: float32

Closing this issue as it seems to be resolved. If this is not the case please re-open with a comment about any item that appears to be unresolved. Many thanks.


WIP:  Update vendor 20180619

This PR updates vendor dependencies.
It onboards PR #1568
It is essentially focused on testing go-openapi/analysis#30 (currently forced to a branch at my fork)
and in particular, non-regression testing with the new flatten behavior (e.g. maps are simple types).
This testing uncovered some bugs, which are fixed in a distinct commit.
Successful integration of this one means that go-openapi/analysis#30 may be merged.
Complementary integration work on go-swagger (CLI update, more testing with newly available options) will come as a separate PR.
Cheers,
Fred

Contributes to #1572


how to use it under webpack

Use webpack configuration development environment, how to use after installing pug-loader?

@wjf444128852 Add this to your loaders list:
loaders: [
  ...
  {
    test: /\.pug$/,
    loader: 'pug-loader'
  },
  ...
]

@drfisher TKS，This problem has been solved，
do you know how to include pug template to html ?

@wjf444128852 You can use in plugins:
plugins: [       new HtmlWebpackPlugin({           template: './src/index.pug',        })     ]

@BigLiao TKS  a lot

You have to alter your webpack config for every new page you want to make? Doesn't it defeat the whole purpose of templating?

@ffpetrovic no, it's a configuration thing
From https://stackoverflow.com/questions/44792582/how-to-output-html-files-from-pug-templates-with-webpack
{
    test: /\.pug$/,
    use: [
      "file-loader?name=[path][name].html",
      "extract-loader",
      "html-loader",
      "pug-html-loader"
    ]
  }

So yeah, pug-html-loader + html-loader solved my use case. Any way we can emulate that behavior in this package? I'd prefer it here since this one's official 😸

+1 Still having issues around webpack not being able to include pug.
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

@betheldob https://github.com/ffpetrovic/ef-template/blob/master/webpack.config.js


Unable to drag and drop links

Provide a general summary of the issue here
When using the Link component or useLink hook, I am unable to drag and drop rendered links.
🤔 Expected Behavior?
Links should be able to be dragged around and dropped even outside of the browser application, as that is the default behavior in browsers.
😯 Current Behavior
Links cannot be dragged.
💁 Possible Solution
No response
🔦 Context
No response
🖥 Steps to Reproduce

Go to https://react-spectrum.adobe.com/react-spectrum/Link.html#example
Attempt to drag the example link with a mouse of finger

Version
3.0.0
What browsers are you seeing the problem on?
Firefox, Chrome, Safari, Microsoft Edge
If other, please specify.
No response
What operating system are you using?
macOS 14.5
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response

Related discussion: https://github.com/adobe/react-spectrum/discussions/6010


Add to templates support operationId as links

Swagger specification
Possible solution

Hi @Anatoliy057
Thank You for your contribution, and apologies for replying so late. I am merging.


fix: batch in applicantApplication error

Description :sparkles:
HL-1329
Fixes the issue where an applications that has a batch has been opened for the application for editing and updating the application fails as the backend expects a Dict for the update request and receives a boolean instead.
Issues :bug:
Testing :alembic:
Screenshots :camera_flash:
Additional notes :spiral_notepad:

Correct ticket number is HL-1329.

API branch is deployed to platta: https://helsinkilisa-pr3062.api.dev.hel.ninja/healthz :rocket::rocket::rocket:

HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr3062.dev.hel.ninja :rocket::rocket::rocket:

APPLICANT branch is deployed to platta: https://helsinkilisa-ui-pr3062.dev.hel.ninja :rocket::rocket::rocket:

TestCafe result is success for https://helsinkilisa-ui-handler-pr3062.dev.hel.ninja :laughing::tada::tada::tada:

TestCafe result is success for https://helsinkilisa-ui-pr3062.dev.hel.ninja :laughing::tada::tada::tada:


Checking if the apollo response has no error

@wtrocki https://github.com/aerogear/aerogear-android-sdk/pull/290

@danielpassos Awesome!


Repos url

http://localhost:8080/repo/?repos=71700629
contains an unnecessary slash and also should be repo and not repos

We've changed that already when we were checking the form together earlier but haven't pushed yet :smile:


RKE2 Snapshots all show different sizes

Rancher Server Setup

Rancher version: 2.6-head commit id: e93a53c
Installation option (Docker install/Helm Chart): docker install

Information about the Cluster

Kubernetes version: v1.21.10+rke2r1
Cluster Type (Local/Downstream): Downstream DO Node driver cluster

User Information

What is the role of the user logged in? (Admin/Cluster Owner/Cluster Member/Project Owner/Project Member/Custom) admin

To reproduce:

Deploy an rke2 do cluster - 3 etcd, 3 worker and 1 cp nodes
Enable recurring snapshot. - retention = 5 and interval = * * * * * (every minute)
When the cluster comes up Active, take a manual snapshot
3 snapshots will be seen in the Snapshot page from Cluster Management.
Wait for Recurring snapshots to take page.
Noticed the size of all the snapshots are different.

Note:

I wasn't able to reproduce this again in my setup
I did not have time to check on the node.

This is a potential RKE2 issue.
/cc @briandowns @galal-hussein

@sowmyav27 Can you try to reproduce this and see what behavior you see?
Also
Can you collect logs and see if there's any etcd compaction taking place?
Can you deploy something to the cluster and perform a restore?
Can you check the sizes on disk?

Moving to "Need Info" as we need some more info from QA to investigate.

On a 3 node all roles RKE2 cluster, RKE2 AWS node driver cluster,

The latest ones taken at 01.30 and 01.35, were taken after a few resources were created on the cluster.

Noticed the size of the snapshot on all the nodes remained the same as the previous one

Also Noticed the snapshot size were different on all the nodes

ON node 1

/var/lib/rancher/rke2/server/db/snapshots# ls -ltr
total 56256
-rw------- 1 root root 14397472 Mar  7 23:56 on-demand-sowmya-aws-pool1-bb1a4a72-t5mp9-1646697404
-rw------- 1 root root 14397472 Mar  8 00:00 etcd-snapshot-sowmya-aws-pool1-bb1a4a72-t5mp9-1646697600
-rw------- 1 root root 14397472 Mar  8 01:30 on-demand-sowmya-aws-pool1-bb1a4a72-t5mp9-1646703056
-rw------- 1 root root 14397472 Mar  8 01:35 on-demand-sowmya-aws-pool1-bb1a4a72-t5mp9-1646703304

On node 2

/var/lib/rancher/rke2/server/db/snapshots# ls -ltr
total 55344
-rw------- 1 root root 14164000 Mar  7 23:56 on-demand-sowmya-aws-pool1-bb1a4a72-q8vns-1646697404
-rw------- 1 root root 14164000 Mar  8 00:00 etcd-snapshot-sowmya-aws-pool1-bb1a4a72-q8vns-1646697600
-rw------- 1 root root 14164000 Mar  8 01:30 on-demand-sowmya-aws-pool1-bb1a4a72-q8vns-1646703056
-rw------- 1 root root 14164000 Mar  8 01:35 on-demand-sowmya-aws-pool1-bb1a4a72-q8vns-1646703303

On node 3

/var/lib/rancher/rke2/server/db/snapshots# ls -ltr
total 55152
-rw------- 1 root root 14114848 Mar  7 23:56 on-demand-sowmya-aws-pool1-bb1a4a72-6dtd8-1646697404
-rw------- 1 root root 14114848 Mar  8 00:00 etcd-snapshot-sowmya-aws-pool1-bb1a4a72-6dtd8-1646697600
-rw------- 1 root root 14114848 Mar  8 01:30 on-demand-sowmya-aws-pool1-bb1a4a72-6dtd8-1646703052
-rw------- 1 root root 14114848 Mar  8 01:35 on-demand-sowmya-aws-pool1-bb1a4a72-6dtd8-1646703304

On Rancher UI

@briandowns , could you take a look into it and let us know if it's happens to be an RKE2 issue?

@galal-hussein is going to take this on.

@galal-hussein , wondering if you have any updates on this one?

@snasovich yeah upon my investigation, I found out that different snapshots taken at the same time does indeed have different sizes on different nodes, but when checking the snapshots status I found the following:
Server 1:
# /tmp/etcd-download-test/etcdctl --write-out=table snapshot status /var/lib/rancher/rke2/server/db/snapshots/etcd-snapshot-ip-172-31-16-174-1649103600
Deprecated: Use `etcdutl snapshot status` instead.

+----------+----------+------------+------------+
|   HASH   | REVISION | TOTAL KEYS | TOTAL SIZE |
+----------+----------+------------+------------+
| 8c150882 |     3377 |       2116 |     7.7 MB |
+----------+----------+------------+------------+

Server 2
# /tmp/etcd-download-test/etcdctl --write-out=table snapshot status /var/lib/rancher/rke2/server/db/snapshots/etcd-snapshot-ip-172-31-20-132-1649103600
Deprecated: Use `etcdutl snapshot status` instead.

+----------+----------+------------+------------+
|   HASH   | REVISION | TOTAL KEYS | TOTAL SIZE |
+----------+----------+------------+------------+
| 8c150882 |     3377 |       2116 |     7.4 MB |
+----------+----------+------------+------------+

Server 3
# /tmp/etcd-download-test/etcdctl --write-out=table snapshot status /var/lib/rancher/rke2/server/db/snapshots/etcd-snapshot-ip-172-31-29-253-1649103600
Deprecated: Use `etcdutl snapshot status` instead.

+----------+----------+------------+------------+
|   HASH   | REVISION | TOTAL KEYS | TOTAL SIZE |
+----------+----------+------------+------------+
| 8c150882 |     3377 |       2116 |     7.5 MB |
+----------+----------+------------+------------+

So as you can see all the snapshots have the same number of keys and the same revision, so I did restore the snapshots in a temp data dir to investigate more and I found out that the db file located in <etcd-data-dir>/member/snap/db has different sizes, this file contains the main etcd content, applied to a specific point of the Raft log The better bolt storage is physically organized as a b+tree which has different leafs, upon digging deeper I found the following:
Server 1
gobin --run go.etcd.io/bbolt/cmd/bbolt stats /tmp/etcddata/member/snap/db
Aggregate statistics for 10 buckets

Page count statistics
	Number of logical branch pages: 9
	Number of physical branch overflow pages: 0
	Number of logical leaf pages: 505
	Number of physical leaf overflow pages: 253
Tree statistics
	Number of keys/value pairs: 2117
	Number of levels in B+tree: 3
Page size utilization
	Bytes allocated for physical branch pages: 36864
	Bytes actually used for branch data: 17073 (46%)
	Bytes allocated for physical leaf pages: 3104768
	Bytes actually used for leaf data: 2350009 (75%)
Bucket statistics
	Total number of buckets: 10
	Total number on inlined buckets: 9 (90%)
	Bytes used for inlined buckets: 1131 (0%)

Server 2:
# gobin --run go.etcd.io/bbolt/cmd/bbolt stats /tmp/etcddata/member/snap/db
Aggregate statistics for 10 buckets

Page count statistics
	Number of logical branch pages: 9
	Number of physical branch overflow pages: 0
	Number of logical leaf pages: 500
	Number of physical leaf overflow pages: 252
Tree statistics
	Number of keys/value pairs: 2117
	Number of levels in B+tree: 3
Page size utilization
	Bytes allocated for physical branch pages: 36864
	Bytes actually used for branch data: 16908 (45%)
	Bytes allocated for physical leaf pages: 3080192
	Bytes actually used for leaf data: 2349929 (76%)
Bucket statistics
	Total number of buckets: 10
	Total number on inlined buckets: 9 (90%)
	Bytes used for inlined buckets: 1131 (0%)

As you can see the number of key/value pairs has the same number 2117 which is the important part which indicates the same data between snapshots, my guess is that different sizes are related to different metadata between nodes and how they branch the pages, I couldn't dig more deeper than that, but as far as I can see from the integrity check and hash of the snapshots, they are all should be the same in terms of data within.
note: I did post a question in Kubernetes slack in etcd channel asking for further details but still didnt get a response yet.

@galal-hussein , thank you for the detailed investigation (though initial report's size discrepancy was much larger if I understand correctly (repro from Sowmya was much closer though)). Keep us posted if you hear back to your question from k8s Slack.
@Oats87 @thedadams @sowmyav27, FYI

@galal-hussein , just wondering if you've heard back re: your question in k8s Slack?

As mentioned in the previous comment, closing as "working as expected".


Reduce Error Message What needs to be shown to user instead of lot of error code and stack trace.

And for the big red boxes when it happens for “rejections”, “rate limit”, etc, any way to change that to say what it is instead of a lot of code?

duplicated so removed
https://github.com/bobanetwork/boba/issues/705


Adapted textual inversion distillation for quantization example to latest transformers and diffusers packages

Adapted textual inversion distillation for quantization example to latest transformers and diffusers packages.
Type of Change
bug fix
API not changed
Description
textual inversion distillation for quantization example not compatible with latest transformers and diffusers packages.
JIRA ticket: NLPTOOLKIU-1324
Expected Behavior & Potential Risk
pass test
How has this PR been tested?
follow readme
Dependency Change?
no library dependency introduced or removed

https://inteltf-jenk.sh.intel.com/job/nlp-toolkit-feature-test-top/290/

https://inteltf-jenk.sh.intel.com/job/nlp-toolkit-feature-test/1865/

https://inteltf-jenk.sh.intel.com/job/nlp-toolkit-feature-test/1866/


As a developer, I want to audit our kademlia implementation

Tasks:

[x] Learn from external resources to get a better understanding of how kademlia/DHT works.
[x] Code-review our implementation: think of problematic corner cases (IN PROGRESS).
[x] Keep fuzz-testing our implementation (https://github.com/openmina/openmina/pull/560).
[ ] Review Go implementation for potential issues or misuse by the OCaml node.

General Observations and Design:

Kademlia was first designed to use UDP, a connection-less transport.

This design lets the protocol keep many peers in its routing table without needing to keep a connection to all of them.
PING messages are used to check if peers are still alive.
In Mina, Kademlia uses Yamux streams as the transport protocol. Yamux is based on Noise/Pnet/TCP which needs to keep connections to peers.
This affects the number of connections we need to make: https://github.com/MinaProtocol/mina/commit/35c7ab4c447f00e35172dbea8c1c02367b0c9855
It also makes PING messages not needed, as we have to make a connection just to send the message. Note: PING isn't even implemented in OpenMina.
PING is needed for k-bucket updates to work right when a k-bucket is full (we only replace an older peer if it doesn't respond to PING).

There seems to be no way to stop a peer from reporting fake peer-ids that point to known (good) IP addresses.
In this case, nodes that get this fake info could try to connect to valid peers but disconnect during the Noise handshake because the peer-id won't match.
What the attacker can't control is the distance, as it needs to break the hash function security.

OpenMina Implementation Observations:

Only FIND_NODE message is implemented.
Entry replacement policy:

Old addresses are always kept (as we don't implement PING).
New addresses can be added to the multiaddr vector for an existing peer-id if they aren't already there. This vector seems to have no limit.

A P2pPeerAction::Discovered action is sent for every discovered peer. This always adds a new peer into the P2pState's .peers BTree. This seems to have no limit.


wxt build -c | --config is ignored

Describe the bug
When I used wxt build-c to specify the configuration file, I found that it did not take effect according to my configuration.

Still read the default configuration file, wxt.config.ts in the root directory.

I found that it seems that when wxt executes the build command, the parameter name used by loadConfig is written dead, which limits the use. Does this place need to be modified, or is there any other way to meet my needs?
What I want is for different browsers to type a different file.

Released fix in v0.16.10


pre-push hook not working due to git-lfs?

Summary
When I try to configure pre-push hook, it complains about git-lfs, but my repo doesn't use git-lfs.
pre-commit hook works perfectly. When actually trying to push a commit with a staged file I know will fail, it just works and pushes anyway.
Steps to reproduce

Setup following config:

pre-push:
  parallel: true
  commands:
    lint:
      glob: '*.{ts,vue}'
      run: pnpm eslint {staged_files}

npx lefthook install
npx lefthook run pre-push

Expected results
❯ npx lefthook run pre-push
Lefthook v1.2.0
RUNNING HOOK: pre-push
lint: (SKIP. NO FILES FOR INSPECTION)

SUMMARY: (SKIP EMPTY)
(base)

Actual results
Lefthook v1.2.0
RUNNING HOOK: pre-push
Executing LFS Hook: `git lfs pre-push
This should be run through Git's pre-push hook.  Run `git lfs update` to install it.
git-lfs command failed
lint: (SKIP. NO FILES FOR INSPECTION)

SUMMARY: (SKIP EMPTY)
(base)

Possible Solution
I already tried "uninstalling" git lfs using git lfs uninstall and then I get the following output:
✖ git lfs uninstall
warning: error running /opt/homebrew/Cellar/git/2.36.0/libexec/git-core/git 'config' '--includes' '--global' '--remove-section' 'filter.lfs': 'fatal: no such section: filter.lfs' 'exit status 128'
Hook already exists: pre-push

	#!/bin/sh

	if [ "$LEFTHOOK" = "0" ]; then
	exit 0
	fi

	call_lefthook()
	{
	dir="$(git rev-parse --show-toplevel)"
	osArch=$(echo "$(uname)" | tr '[:upper:]' '[:lower:]')
	cpuArch=$(echo "$(uname -m)" | sed 's/aarch64/arm64/')

	if lefthook -h >/dev/null 2>&1
	then
	eval lefthook $@
	elif test -f "$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook"
	then
	eval "$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook $@"
	elif test -f "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook"
	then
	eval "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook $@"
	elif test -f "$dir/node_modules/lefthook/bin/index.js"
	then
	eval "$dir/node_modules/lefthook/bin/index.js $@"
	elif bundle exec lefthook -h >/dev/null 2>&1
	then
	bundle exec lefthook $@
	elif yarn lefthook -h >/dev/null 2>&1
	then
	yarn lefthook $@
	elif npx @evilmartians/lefthook

Hooks for this repository have been removed.
Global Git LFS configuration has been removed.
(base)

@jclaessens97 thank you for the issue! I see the two problems in your issue:

git-lfs is trying to execute but it is not used in the project
{staged_files} don't work for pre-push hook

Answers:

I see that now lefthook only checks if there is a git-lfs executable in $PATH and runs it whenever you want it or not. However lefthook currently doesn't check the return value, it only prints all STDOUT and STDERR of git-lfs. I should consider checking whether git-lfs is configured in the repo or not and skip running LFS hooks based on that. I'll put it on my radar!
For the pre-push hook if the files are already committed (you mentioned that you are pushing a commit with staged files, but it seems the files are already committed, so {staged_files} template doesn't reference them. I suggest using {push_files} to reference these files in your example. My bad - it is not referenced in documentation yet.

For point 2, I lowkey was expecting it to be something else, but I couldn't find anything about it, so great it's now added to the docs 👍🏻
For point 1, uninstalling git-lfs completely with homebrew seemed to fix it for now. That is until I have to use git-lfs again for another repo ofcourse 😄


Wrong calculation values if the number is less than 10

(void)flickerAnimation:(NSTimer *)timer{
long long rangeInteger = [timer.userInfo[DDRangeIntegerKey] longLongValue];
self.flickerNumber = @([self.flickerNumber longLongValue] + rangeInteger);

rangeInteger value is always zero

(void)flickerAnimation:(NSTimer *)timer{
float rangeInteger = [timer.userInfo[DDRangeIntegerKey] floatValue];
self.flickerNumber = @([self.flickerNumber floatValue] + rangeInteger);

need to take a float value

thanks, I have fixed it as your suggest.

Thank you if you do not make it more difficult to upgrade in pods

please use the version 1.0.1 on pods

if ([timer.userInfo[DDRangeIntegerKey] floatValue] >= 1.0) {

crash at here

@jxbaoweiyj  what's the sence when crashed?


Could not locate .ddl file

Which OS are you using?

OS: Windows

Since a couple of days I get the following message: Could not locate cudnn_ops_infer64_8.dll. Please make sure it is in your library path!
I've reinstalled everything but it keeps showing the message.

thank you i'll try it.
here is a screenshot from my terminal:

Perfview's solution did the trick.


Implemented sliding window to calculate values changes/s

Extended IMessageTrigger

property DataChangesCountLastMinute that calculates all OPC UA data changes in the last 60 seconds
property ValueChangesCountLastMinute that calculates all OPC UA value changes in the last 60 seconds

Updated diagnostic log with values of last 60 seconds
Reset diagnostic log after first data is received, to align timings

ADO #10205715
Improved logging for #912

The ring buffer implementation is really fast:


[Bug]: Doesn't work with multiline text

Bug Description
Tried "Rephrase Selection" for multiline in a couple different apps. Got
<ERROR: We could not parse the JSON body of your request. (HINT: This likely means you aren't using your HTTP library correctly. The OpenAI API expects a JSON payload, but what was sent was not valid JSON. If you have trouble figuring out how to fix this, please contact us through our help center at help.openai.com.)>

Relevant Screenshot
No response
To Reproduce
No response
Debugging Log
[09:56:01.253] Writing Assistant[Hotkey] Processing complete
[09:56:01.254] Writing Assistant[Hotkey] Passing output 'this
that' to Post Notification
[09:56:01.260] Writing Assistant[Post Notification] Processing complete
[09:56:01.261] Writing Assistant[Post Notification] Passing output 'this
that' to Run Script
[09:56:01.673] ERROR: Writing Assistant[Run Script] {
    "error": {
        "message": "We could not parse the JSON body of your request. (HINT: This likely means you aren't using your HTTP library correctly. The OpenAI API expects a JSON payload, but what was sent was not valid JSON. If you have trouble figuring out how to fix this, please contact us through our help center at help.openai.com.)",
        "type": "invalid_request_error",
        "param": null,
        "code": null
    }
}
[09:56:01.674] Writing Assistant[Run Script] Processing complete
[09:56:01.674] Writing Assistant[Run Script] Passing output 'ERROR: We could not parse the JSON body of your request. (HINT: This likely means you aren't using your HTTP library correctly. The OpenAI API expects a JSON payload, but what was sent was not valid JSON. If you have trouble figuring out how to fix this, please contact us through our help center at help.openai.com.)' to Copy to Clipboard

Workflow Configuration

Checklist

[X] I have updated to the latest version of this workflow.
[X] I am using Alfred 5. (Older versions are not supported anymore.)

Fixed. You can download the new version here, or wait 1-2 days for the update to show up in the Alfred gallery