Support dynamic apiKey

Validations

[X] I believe this is a way to improve. I'll try to join the Continue Discord for questions
[X] I'm not able to find an open issue that requests the same enhancement

Problem
In our environment we'd like to use custom model served via proxy.
This proxy requires API key that user may obtain via pre-installed authentication tool (get_token).
The proposal is to support dynamic API key by using standard output of the tool.
Solution
Possible solution could be to modify config.ts such that it executes the tool:
const { execSync } = require("child_process");

export function modifyConfig(config: Config): Config {
  config.models
    .filter(model => model.apiKey && model.apiKey.startsWith("$"))
    .forEach((model) => {
      const cmd = model.apiKey.substr(1).trim();
      Object.defineProperty(model, "apiKey", {
        get() {
          return execSync(cmd, { encoding: "utf8" }).trim();
        },
      });
    });
  return config;
}

and config.json
{
  "models": [
    {
      "title": "myLLM",
      "provider": "openai",
      "model": "bar/baz",
      "apiBase": "https://example.com/v1",
      "apiKey": "$ get_token"
    }
  ],
...

Another option is to allow apiKey to be a function:
const { execSync } = require("child_process");

export function modifyConfig(config: Config): Config {
  config.models
    .filter(model => model.apiKey && model.apiKey.startsWith("$"))
    .forEach((model) => {
      const cmd = model.apiKey.substr(1).trim();
      model.apiKey = () => {
        return execSync(cmd, { encoding: "utf8" }).trim();
      };
    });
  return config;
}

The challenge is to ensure that apiKey property getter is invoked each time its needed to refresh the value.

A possible workaround for now could be to update config.json via cron.

A possible workaround for now could be to update config.json via cron. VSCode detects config update and picks up new key.

IntelliJ plugin does not reload config.json although some related code is there.

IntelliJ plugin does not reload config.json

Looks like its not easy to implement external updates, see super old ticket https://youtrack.jetbrains.com/issue/IJPL-2188/Background-changes-by-external-tool-not-being-picked-up-until-VFS-refresh-happens
For externally changed files they suggest File -> Reload All from Disk :rofl:

It would be great if there was a feature like that 👍👍👍


Maybe we can just stack them?

Memo for when I pick this up again:

It's the tick formatter that appears to reset the tick fontsize. Find a way to set the font size while using a custom formatter.
Speaking of formatter, is it at all possible to squeeze in the percent change in a two-line tick label using a very custom formatter?
Why are the bars so far apart now?
Titles seem ok now, but do not provide a very good visual separation, can something be done with colours?

stacking@757 aka 20211230.22 vs main ewma over 6 builds from 2 to 749

Click to see table
main

build_id
build_number
Throughput (tx/s) ^
Latency (ms)
Peak working set size (GB)
Accuracy (%) ^
Error rate (%)
Memory fragmentation (%)
CPU usage (%)
New metric (U)

2
0000.0
48992
10
49
0.73
0.05
0.022
0.3
169

725
20211130.3
51282
11
49
0.69
0.05
0.021
0.32
158

733
20211207.4
46509
11
55
0.69
0.06
0.018
0.29
163

734
20211207.5
50987
11
52
0.68
0.04
0.021
0.29
108

747
20211230.12
47349
9
46
0.72
0.06
0.021
0.31
197

749
20211230.14
51543
11
49
0.72
0.04
0.018
0.31
135

stacking

build_id
build_number
Throughput (tx/s) ^
Latency (ms)
Peak working set size (GB)
Accuracy (%) ^
Error rate (%)
Memory fragmentation (%)
CPU usage (%)
New metric (U)

755
20211230.20
48109
11
51
0.72
0.06
0.02
0.31
158

756
20211230.21
46434
9
48
0.71
0.06
0.021
0.31
151

757
20211230.22
50504
11
51
0.68
0.06
0.02
0.32
159

/azp run


small formatting stuff

some messed up bullet points in the 1.1.1 OpenWDL section

and in 3.2.5 Prep for Other Platforms and Sharing section


Spelling mistakes fixed

Spelling mistakes fixed

 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.:x: samtrion sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.


Config not found with Kubectl.exe on Cygwin

Hi, I see an issue with kubectl (GitVersion1.17.0, GoVersion go1.13.4) from a Cygwin 3.1.4 installation over Windows 10. I assume this is the correct place to report as relates to the go client.
I have issues with let kubectl read config config files correctly.
When trying to launch kubectl cluster-info I obtain the following:
W0320 11:25:18.677337    9196 loader.go:223] Config not found: /home/myname/.kubectlconf_ec2.yaml
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.

Steps to reproduce:

Install Cygwin 3.1.4 on Windows

Download kubectl on your home directory through curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.17.0/bin/windows/amd64/kubectl.exe

Create a simple .yaml file in your home directory, as for example:

clusters:
- cluster:
    certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQC3RT1F1C4T34UTH0RIT1D4T4tLQo=
    server: https://yourkubernetesserverurl
  name: ec2
contexts:
- context:
    cluster: ec2
    namespace: default
    user: yourusername-ec2
  name: ec2
current-context: ec2
preferences: {}
users:
- name: yourusername-ec2
  user:
    auth-provider:
      config:
        client-id: loginapp
        client-secret: 4TORGiNVCL13N753CR376hUjfjr
        id-token: eyJhbGci1D70K3ND4746eU4maf8hh2zz4EENQ
        idp-issuer-url: https://dex.dev.youcompanydomain/dex
        refresh-token: Chlmr3fr35ht0k3nd474NG1p
      name: oidc

Edit the .bashrc file in your home directory to add the following line:
export KUBECONFIG=~/.kubectlconf_ec2.yaml

Source the file through source .bashrc

Launch a kubectl get command as example `kubectl --context=ec2 get deployments, statefulset

Obtain the Error:

W0320 14:14:26.293912   18648 loader.go:223] Config not found: /home/yourusername/.kubectlconf_ec2.yaml
context "ec2" does not exist
context "ec2" does not exist

Is this expected behavior ? Am I missing something ?
Thank you

Apologies, this is not an issue. I managed to run it by appending --kubeconfig .nameoftheconfig.yaml in the kubectl command inside cygwin.


nixos/locate: don't create /var/cache

This is already handled by the default systemd tmpfiles.
fixes #78941

Motivation for this change
Things done

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

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

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

I am still getting the warning
[/etc/tmpfiles.d/var.conf:19] Duplicate line for path "/var/cache", ignoring.
even merged to master and using unstable.mlocate

Are you sure you have updated the nixpkgs version used by NixOS? I don't see where this conflict should originate.

Yes I did update.
 sudo nix-channel --update ; sudo nixos-rebuild switch --show-trace                                                                                10.8s
unpacking channels...
building Nix...
building the system configuration...
activating the configuration...
setting up /etc...
reloading user units for mudrii...
setting up tmpfiles
[/etc/tmpfiles.d/var.conf:19] Duplicate line for path "/var/cache", ignoring.

 nix-shell -p nix-info --run "nix-info -m"
these paths will be fetched (0.06 MiB download, 0.31 MiB unpacked):
  /nix/store/5h35s50503spks8gkxdv3kk4szz8vx9g-bash-interactive-4.4-p23-dev
  /nix/store/qghrkvk86f9llfkcr1bxsypqbw1a4qmw-stdenv-linux
copying path '/nix/store/5h35s50503spks8gkxdv3kk4szz8vx9g-bash-interactive-4.4-p23-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/qghrkvk86f9llfkcr1bxsypqbw1a4qmw-stdenv-linux' from 'https://cache.nixos.org'...
 - system: `"x86_64-linux"`
 - host os: `Linux 5.4.17, NixOS, 19.09.2036.c49da6435f3 (Loris)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.2`
 - channels(root): `"home-manager-19.09, nixos-19.09.2036.c49da6435f3, unstable-20.03pre212208.8130f3c1c2b"`
 - channels(mudrii): `"home-manager, unstable-20.03pre196836.1c40ee6fc44"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

This looks indeed weird. Can you have a look where /var/cache exactly appears in /etc/tmpfiles.d:
$ grep -R /var/cache /etc/tmpfiles.d

@Mic92
grep -R /var/cache /etc/tmpfiles.d

/etc/tmpfiles.d/var.conf:d /var/cache 0755 - - -
/etc/tmpfiles.d/nixos.conf:d /var/cache/lightdm 0711 root lightdm -
/etc/tmpfiles.d/nixos.conf:d /var/cache 0755 root root -
/etc/tmpfiles.d/systemd.conf:d /var/cache/private 0700 root root -

I see what is happening here. The patch actually needs to be backported to 19.09, since this is the channel you are using.

Have a look at https://github.com/NixOS/nixpkgs/pull/79820

Thank you @Mic92 for checking on this
The issue is still mysterious as I am using unstable for mlocate
let
  unstable = import <unstable> {
    config.allowUnfree = true;
  };
in
{
    services. locate = {
      enable = true;
      locate = unstable.pkgs.mlocate;
      localuser = null; # mlocate does not support this option so it must be null
      # interval = "daily";
      interval = "hourly";
      pruneNames = [
        ".git"
        "cache"
        ".cache"
        ".cpcache"
        ".aot_cache"
        ".boot"
        "node_modules"
        "USB"
      ];

      prunePaths = options.services.locate.prunePaths.default ++ [
        "/dev"
        "/lost+found"
        "/nix/var"
        "/proc"
        "/run"
        "/sys"
        "/usr/tmp"
      ];
    };
}

According to  nix-shell -p nix-info --run "nix-info -m" you are on the 19.09 nixos channel. You are only using the mlocate package from unstable however the locate module comes from NixOS 19.09.

Yes, I did assume this.
Is any way to cherry-pick in service from diff channels?

Only if you have your own fork i.e. if you build from git. You a also use your github fork as a channel. However you can wait for the next channel update of 19.09 which includes a fix (it might been already out).


java.lang.RuntimeException: Failed to find input Node 'image_tensor'

Hi,
I have downloaded the sample and tried run the Android Example.
It is working fine.
Now I have my own .tflite model and .txt label file I have put them in assets and replaced
TF_OD_API_LABELS_FILE ,TF_OD_API_MODEL_FILE to my file path
I have ended up with the error
java.lang.RuntimeException: Failed to find input Node 'image_tensor'
I am running this sample on my samsung A50.
I am not much aware about any detail but the simple steps as above and the error. Can you guys please take deep dive into this and get me out of it?

Please provide following information:
**System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
TensorFlow installed from (source or binary):
TensorFlow version (use command below):
Python version:
Bazel version (if compiling from source):
GCC/Compiler version (if compiling from source):
CUDA/cuDNN version:
GPU model and memory:

You can collect some of this information using our environment capture
script
You can also obtain the TensorFlow version with: 1. TF 1.0: python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)" 2. TF 2.0: python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"
Describe the current behavior
Describe the expected behavior
Code to reproduce the issue
Provide a reproducible test case that is the bare minimum necessary to generate the problem.
Other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
**

@ymodak
As I have mentioned I am running the sample on my samsung A50.
Only two changes I have made in the sample code that is that changing label file and added my own tflite model, I have ended up with this error
java.lang.RuntimeException: Failed to find input Node 'image_tensor'

Hi @VirRajpurohit, for TFLite please follow this detection example, not the one in tensorflow/examples/android. The latter is for TensorFlow Mobile, and will soon be removed.


Added MachineAccountQuota LDAP module

Added MachineAccountQuota LDAP module
Coauthor @Shutdown
It retrieves the MachineAccountQuota domain-level attribute. It's useful to check this value because by default it permits unprivileged users to attach up to 10 computers to an Active Directory (AD) domain.
References

https://www.thehacker.recipes/active-directory-domain-services/movement/domain-settings/machineaccountquota

All good, merging !
Thx for the PR :)


Level 2 does not remove duplicate font imports "@import url(...)"

clean-css version 4.1.3

Won't fix as clean-css is going into maintenance mode.


How should forwarded for parsing work?

I'm confused on the expectations for parsing XFF headers.
Here's two sample log lines. The first column is the request IP. Then there is also the forwarded for IPs. Sometimes my server places the client IP in there as the only item. Other times it has other IPs, of which the right-most one is the real client IP.
I think the behavior I want is for goaccess to always look at the right-most IP in the XFF field and use that as the client IP. But can't figure it out.
<IP_ADDRESS> - - [13/Oct/2022:18:13:24 +0000] "GET /news HTTP/1.1" 404 49781 "-" "Mozilla/5.0 (compatible; SemrushBot/7~bl; +http://www.semrush.com/bot.html)" vhost=obfuscated host=obfuscated hosting_site=obfuscated pid=2617 request_time=562626 forwarded_for="<IP_ADDRESS>" request_id="obfuscated" location="-"

<IP_ADDRESS> - - [13/Oct/2022:18:13:24 +0000] "GET /news HTTP/1.1" 404 49781 "-" "Mozilla/5.0 (compatible; SemrushBot/7~bl; +http://www.semrush.com/bot.html)" vhost=obfuscated host=obfuscated hosting_site=obfuscated pid=2617 request_time=562626 forwarded_for="<IP_ADDRESS>, <IP_ADDRESS>" request_id="obfuscated" location="-"

I've tried this, but it doesn't seem to do anything with the XFF data. Is there supposed to be a panel just for XFF?
goaccess access.log --log-format '%h %^ %^ [%d:%t %^] "%r" %s %b "%R" "%u" %^ %^ %^ %^ %^ forwarded_for="~h{, }"' --date-format "%d/%b/%Y" --time-format="%H:%M:%S"

Not sure I understand, are you looking to get the client up?
The general format shows the left-most being the original client ip.
X-Forwarded-For: client, proxy1, proxy2

Right, sorry, that's what I meant. But what I'm confused about is how goaccess parses and presents the XFF data? My log format has both the client IP and the XFF data in separate fields. Is it possible to for goaccess to parse the list of XFF IPs and present them?

If you have both fields, you probably want to use the field that contains the client ip. Do you now which field has the client ip?

The XFF header will contain it, but it may not be trusted. But you're saying, I should really only tell goaccess to parse one or the other. Goaccess' is just trying to extract the client IP from XFF?

That's correct.

Thank you


[SOLVED] Webpack: Error in window is not defined during deploy with "window" used in necessary node modules

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
"Error in window is not defined" in main.js file during deploy.
I am not using "window" in my code and node_modules using it are all necessary so i have to use them.
If the current behavior is a bug, please provide the steps to reproduce.
There aren't much steps to describe. I simply get this error, but this doesn't provide me more infos...
Error blinks up during execution of "node node_modules/webpack/bin/webpack.js --mode=production --env.prod" command.

What is the expected behavior?
It should execute the command without any problem.
What can I do if window is used inside some necessary node_modules?
If this is a feature request, what is motivation or use case for changing the behavior?
Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.
Related to every other issue about this problem, which solutions haven't been helpful, unluckily...

Webpack version: 4.6.0
Node version: 5.6.0
Operating system: windows 10.

ERROR:

Hash: db48015ae3f0b2bb936804152e501136ec85ed58
Version: webpack 4.6.0
Child
Hash: db48015ae3f0b2bb9368
Time: 12756ms
Built at: 2018-04-24 10:55:27
1 asset
Entrypoint main-client = main-client.js
ERROR in window is not defined

Child
Hash: 04152e501136ec85ed58
Time: 12750ms
Built at: 2018-04-24 10:55:27
1 asset
Entrypoint main-server = main-server.js
ERROR in window is not defined

webpack.config content:
const path = require('path');
const webpack = require('webpack');
const merge = require('webpack-merge');
const AngularCompilerPlugin = require('@ngtools/webpack').AngularCompilerPlugin;
const CheckerPlugin = require('awesome-typescript-loader').CheckerPlugin;
var nodeExternals = require('webpack-node-externals');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');

module.exports = (env) => {
    // Configuration in common to both client-side and server-side bundles
    const isDevBuild = !(env && env.prod);
    //mode: isDevBuild ? 'development' : 'production';
    const sharedConfig = {
        stats: { modules: false },
        context: __dirname,
        resolve: { extensions: ['.js', '.ts'] },
        output: {
            filename: '[name].js',
            publicPath: 'dist/' // Webpack dev middleware, if enabled, handles requests for this URL prefix
        },
        module: {
            rules: [
                { test: /\.ts$/, include: /ClientApp/, use: isDevBuild ? ['awesome-typescript-loader?silent=true', 'angular2-template-loader', 'angular2-router-loader'] : '@ngtools/webpack' },
                { test: /\.html$/, use: 'html-loader?minimize=false' },
                { test: /\.css$/, use: ['to-string-loader', 'style-loader', isDevBuild ? 'css-loader' : 'css-loader?minimize'] },
                { test: /\.(png|jpg|jpeg|gif|svg)$/, use: 'url-loader?limit=25000' },
                //font management
                {
                    test: /\.(svg|eot|ttf|woff|woff2)$/,
                    use: [{
                        loader: 'file-loader',
                        options: {
                            name: 'images/[name].[hash].[ext]'
                        }
                    }]
                }
            ]
        },
        plugins: [new CheckerPlugin()]
    };

    // Configuration for client-side bundle suitable for running in browsers
    const clientBundleOutputDir = './wwwroot/dist';
    const clientBundleConfig = merge(sharedConfig, {
        entry: { 'main-client': './ClientApp/boot.browser.ts' },
        output: { path: path.join(__dirname, clientBundleOutputDir) },
        optimization: {
            minimizer: [
                // specify a custom UglifyJsPlugin here to get source maps in production
                new UglifyJsPlugin({
                    cache: true,
                    parallel: true,
                    uglifyOptions: {
                        compress: false,
                        ecma: 6,
                        mangle: true
                    },
                    sourceMap: true
                })
            ]
        },
        plugins: [
            new webpack.DllReferencePlugin({
                context: __dirname,
                manifest: require('./wwwroot/dist/vendor-manifest.json')
            })
        ].concat(isDevBuild ? [
            // Plugins that apply in development builds only
            new webpack.SourceMapDevToolPlugin({
                filename: '[file].map', // Remove this line if you prefer inline source maps
                moduleFilenameTemplate: path.relative(clientBundleOutputDir, '[resourcePath]') // Point sourcemap entries to the original file locations on disk
            })
        ] : [
                // Plugins that apply in production builds only
                new AngularCompilerPlugin({
                    tsConfigPath: './tsconfig.json',
                    entryModule: path.join(__dirname, 'ClientApp/app/app.browser.module#AppModule'),
                    exclude: ['./**/*.server.ts']
                })
            ])
    });

    // Configuration for server-side (prerendering) bundle suitable for running in Node
    const serverBundleConfig = merge(sharedConfig, {
        resolve: { mainFields: ['main'] },
        entry: { 'main-server': './ClientApp/boot.server.ts' },
        plugins: [
            new webpack.DllReferencePlugin({
                context: __dirname,
                manifest: require('./ClientApp/dist/vendor-manifest.json'),
                sourceType: 'commonjs2',
                name: './vendor'
            })
        ].concat(isDevBuild ? [] : [
            new AngularCompilerPlugin({
                tsConfigPath: './tsconfig.json',
                entryModule: path.join(__dirname, 'ClientApp/app/app.server.module#AppModule'),
                exclude: ['./**/*.browser.ts']
            })
        ]),
        output: {
            libraryTarget: 'commonjs',
            path: path.join(__dirname, './ClientApp/dist')
        },

        //exclude node modules
        target: 'node',
        externals: [nodeExternals()], // in order to ignore all modules in node_modules folder

        devtool: 'inline-source-map'
    });

    return [clientBundleConfig, serverBundleConfig];
};

webpack runs in a Node environment, if some of your dependencies rely on window object, enclose them in a check:
const isClient = typeof window !== 'undefined'

or when loading dependencies
let particles
if (typeof window !== 'undefined') {
  particles = require('particles.js')
}

It looks like some paths are misconfigured. I encourage you to ask your question on StackOverflow instead. We try to use the issue tracker for bug reports and feature requests, as well as some discussions, but this appears to be a very localized question.
I’m closing for these reasons.

@montogeek I want to try with your suggested solution, but since I'm a newbie to webpack i really need to ask you: where should I put these code snippets exactly? In webpack.config.js, in my angular app entry point,...?
Thanks in advance!
( I've asked it on stackoverflow before but I didn't have a real working solution, looks like no one has a real workaround for this and looking on other related issues on github I've never found some pratical examples as solutions... )

You should put them whatever you need to use window or you need to import a library that uses window object as you see on my examples.
Read more about globals in different environment here: https://www.hacksparrow.com/global-variables-in-node-js.html
There is ton of articles about how globals differ on Browser and Node.JS environment but in a nutshell:

Browsers have window global object.
Node.JS global object is global and it doesn't have window object.
Commands that run on your terminal are running on a Node environment, therefore any reference to window would result in an error.

🎉 🍻   **SOLVED ✔ ** 🍻  🎉
Changed this:
 { test: /\.ts$/, include: /ClientApp/, use: isDevBuild ? ['awesome-typescript-loader?silent=true', 'angular2-template-loader', 'angular2-router-loader'] : '@ngtools/webpack' },
In this:
 { test: /\.ts$/, include: /ClientApp/, use: ['awesome-typescript-loader?silent=true', 'angular2-template-loader', 'angular2-router-loader'] },
So I've actually:
✔ ▶  removed '@ngtools/webpack'  from typescript module rules loaders since it was causing this issue
I don't know why it was causing errors in libraries but I've seen that with other loaders it works pretty fine.
Website is now deployed and fully-working 😃

Congrats!

@montogeek
Actually I need a part of the library, but the library is bloated and imports another file that depends on window. I can't use your solution.
For example I need PIXI.Point, which works fine on node.js, but importing pixi.js it will import the whole file which has a window reference.

Shimming did the trick for me...
...
plugins: [
   new webpack.ProvidePlugin({
      window: 'global/window',
   }),
]
...

requires global package

@pundoo's webpack config update suggestion to use ProvidePlugin just changed the error to:
NativeScript encountered a fatal error: Uncaught ReferenceError: Zone is not defined
at
(file: src/webpack:/housters/node_modules/zone.js/dist/zone.js:703:0)
at (file: src/webpack:/housters/node_modules/zone.js/dist/zone.js:8:63)
at ./node_modules/zone.js/dist/zone.js(file: src/webpack:/housters/node_modules/zone.js/dist/zone.js:10:1)
at __webpack_require__(file: src/webpack:/housters/webpack/bootstrap:24:0)
at fn(file: src/webpack:/housters/webpack/runtime/hot module replacement:61:0)
at ./src/polyfills.ts(file:///app/bundle.js:26385:75)
at __webpack_require__(file: src/webpack:/housters/webpack/bootstrap:24:0)
at __webpack_exec__(file:///app/bundle.js:33452:39)
at (file:///app/bundle.js:33453:71)
at __webpack_require__.X(file: src/webpack:/housters/webpack/runtime/startup entrypoint:6:0)
at (file:///app/bundle.js:33453:47)
at (file:///app/bundle.js:33458:3)
at require(:1:137)


Schema generates conflicting names for enum variants

The following code fails to compile because the schema name generation for enum variants can produce name clashes.
#[derive(BorshSchema)]
enum Foo {
    Bar(FooBar),
}

#[derive(BorshSchema)]
struct FooBar {}

error[E0275]: overflow evaluating the requirement `<Foo as borsh::BorshSchema>::add_definitions_recursively::FooBar: borsh::BorshSchema`
 --> code.rs:1:10
  |
2 | #[derive(BorshSchema)]
  |          ^^^^^^^^^^^
  |
  = help: see issue #48214
  = note: this error originates in the derive macro `borsh::BorshSchema` (in Nightly builds, run with -Z macro-backtrace for more info)

I believe the error is a result of using a simple concatenation to generate the name.
https://github.com/near/borsh-rs/blob/7325a0aab74049237b9f978e1e2c0fcf7bb799c2/borsh-schema-derive-internal/src/enum_schema.rs#L28

Good catch! Thanks for reporting it, but I believe borsh schema issues won't be addressed at the moment as it is not used in production and was just an experiment without a clear specification

cc @itegulov @miraclx we might want to consider this issue now that we are using schema for ABI

what is possible outline of fix for this? I have clash for same named struct in different parts of my big account struct.

I see next:

BorshSchema is used with solana contracts, even some in spl
BorshSchema is used in near codebase in several types
NearSchema with borsh attribute generates BorshSchema impl
So there are some users

Did quick tests on schemars
#TLDR
For same named items schemars generates second declaration/definition under +1 suffixed name.
Long:
See #/definitions/A2

thread 'engine::tests::borsh_diff::serde_name_conflict' panicked at engine/src/engine/tests/borsh_diff.rs:68:5:
RootSchema { meta_schema: Some("http://json-schema.org/draft-07/schema#"), schema: SchemaObject { metadata: Some(Metadata { id: None, title: Some("D"), description: None, default: None, deprecated: false, read_only: false, write_only: false, examples: [] }), instance_type: Some(Single(Object)), format: None, enum_values: None, const_value: None, subschemas: None, number: None, string: None, array: None, object: Some(ObjectValidation { max_properties: None, min_properties: None, required: {"b", "c"}, properties: {"b": Object(SchemaObject { metadata: None, instance_type: None, format: None, enum_values: None, const_value: None, subschemas: None, number: None, string: None, array: None, object: None, reference: Some("#/definitions/B"), extensions: {} }), "c": Object(SchemaObject { metadata: None, instance_type: None, format: None, enum_values: None, const_value: None, subschemas: None, number: None, string: None, array: None, object: None, reference: Some("#/definitions/C"), extensions: {} })}, pattern_properties: {}, additional_properties: None, property_names: None }), reference: None, extensions: {} }, definitions: {"A": Object(SchemaObject { metadata: None, instance_type: Some(Single(Object)), format: None, enum_values: None, const_value: None, subschemas: None, number: None, string: None, array: None, object: Some(ObjectValidation { max_properties: None, min_properties: None, required: {"a"}, properties: {"a": Object(SchemaObject { metadata: None, instance_type: Some(Single(Integer)), format: Some("uint8"), enum_values: None, const_value: None, subschemas: None, number: Some(NumberValidation { multiple_of: None, maximum: None, exclusive_maximum: None, minimum: Some(0.0), exclusive_minimum: None }), string: None, array: None, object: None, reference: None, extensions: {} })}, pattern_properties: {}, additional_properties: None, property_names: None }), reference: None, extensions: {} }), "A2": Object(SchemaObject { metadata: None, instance_type: Some(Single(Object)), format: None, enum_values: None, const_value: None, subschemas: None, number: None, string: None, array: None, object: Some(ObjectValidation { max_properties: None, min_properties: None, required: {"a"}, properties: {"a": Object(SchemaObject { metadata: None, instance_type: Some(Single(Integer)), format: Some("uint8"), enum_values: None, const_value: None, subschemas: None, number: Some(NumberValidation { multiple_of: None, maximum: None, exclusive_maximum: None, minimum: Some(0.0), exclusive_minimum: None }), string: None, array: None, object: None, reference: None, extensions: {} })}, pattern_properties: {}, additional_properties: None, property_names: None }), reference: None, extensions: {} }), "B": Object(SchemaObject { metadata: None, instance_type: Some(Single(Object)), format: None, enum_values: None, const_value: None, subschemas: None, number: None, string: None, array: None, object: Some(ObjectValidation { max_properties: None, min_properties: None, required: {"a"}, properties: {"a": Object(SchemaObject { metadata: None, instance_type: None, format: None, enum_values: None, const_value: None, subschemas: None, number: None, string: None, array: None, object: None, reference: Some("#/definitions/A"), extensions: {} })}, pattern_properties: {}, additional_properties: None, property_names: None }), reference: None, extensions: {} }), "C": Object(SchemaObject { metadata: None, instance_type: Some(Single(Object)), format: None, enum_values: None, const_value: None, subschemas: None, number: None, string: None, array: None, object: Some(ObjectValidation { max_properties: None, min_properties: None, required: {"a"}, properties: {"a": Object(SchemaObject { metadata: None, instance_type: None, format: None, enum_values: None, const_value: None, subschemas: None, number: None, string: None, array: None, object: None, reference: Some("#/definitions/A2"), extensions: {} })}, pattern_properties: {}, additional_properties: None, property_names: None }), reference: None, extensions: {} })} }

mod a {
use borsh::{de, BorshDeserialize, BorshSchema, BorshSerialize};
#[derive(Default, Debug, BorshSerialize, BorshSchema, arbitrary::Arbitrary, schemars::JsonSchema, serde::Serialize)]
pub  struct A {
    a: u8,
}

#[derive(Default, Debug, BorshSerialize, BorshSchema, arbitrary::Arbitrary, schemars::JsonSchema, serde::Serialize)]
pub struct  B {
    a: A,
}

}
mod b {
use borsh::{de, BorshDeserialize, BorshSchema, BorshSerialize};
#[derive(Default, Debug, BorshSerialize, BorshSchema, arbitrary::Arbitrary, schemars::JsonSchema, serde::Serialize)]
pub  struct A {
    a: u8,
}

#[derive(Default, Debug, BorshSerialize, BorshSchema, arbitrary::Arbitrary, schemars::JsonSchema, serde::Serialize)]
pub struct  C {
    a: A,
}

}
use a::B;
use b::C;
#[derive(Default, Debug, BorshSerialize, BorshSchema, arbitrary::Arbitrary, schemars::JsonSchema, serde::Serialize)]
struct D {
b: B,
c: C,
}
#[test]
fn serde_name_conflict() {
let schema = schemars::gen::SchemaGenerator::default()
.into_root_schema_for::();
panic!("{:?}", schema);
}

@frol  @itegulov @miraclx @austinabell
would PR which does exact same bump of number suffix in declaration accepted as fix as in schemars?
solution
So for type A and A in definitions, second one will become A2
possible improvement
improvement can be if definitions are 100% same, do not bump, but use existing one (not conflict panic)
alternative
Prefix definition with parent struct, so if A and A in B and C, name of second one will be B_A, which will require need to propagate parent info (hopefully it is already).
In case A and A in same struct one will have alias or mod prefix, so use alias or mod prefix.
Alternative seems complicated.

I don’t see a universal solution to avoid naming collisions when names are autogenerated. The most flexible solution is to introduce macro attribute to control/override the naming.
@dzmitry-lahoda  Would you like to contribute the solution to allow naming customization?

@dzmitry-lahoda there's some solution for simple cases without deep nesting of conflicting types
diff --git a/borsh-derive/src/internals/attributes/field/schema.rs b/borsh-derive/src/internals/attributes/field/schema.rs
index 01353bf1..af632f93 100644
--- a/borsh-derive/src/internals/attributes/field/schema.rs
+++ b/borsh-derive/src/internals/attributes/field/schema.rs
@@ -24,31 +24,31 @@ pub static SCHEMA_FIELD_PARSE_MAP: Lazy<BTreeMap<Symbol, Box<ParseFn>>> = Lazy::
     // assigning closure `let f = |args| {...};` and boxing closure `let f: Box<ParseFn> = Box::new(f);`
     // on 2 separate lines doesn't work
     let f_params: Box<ParseFn> = Box::new(|attr_name, meta_item_name, meta| {
         parse_lit_into_vec::<ParameterOverride>(attr_name, meta_item_name, meta)
             .map(Variants::Params)
     });

     let f_with_funcs: Box<ParseFn> = Box::new(|_attr_name, _meta_item_name, meta| {
         let map_result = meta_get_by_symbol_keys(WITH_FUNCS, meta, &WITH_FUNCS_FIELD_PARSE_MAP)?;
         let with_funcs: WithFuncs = map_result.into();
-        if (with_funcs.declaration.is_some() && with_funcs.definitions.is_none())
-            || (with_funcs.declaration.is_none() && with_funcs.definitions.is_some())
-        {
-            return Err(syn::Error::new_spanned(
-                &meta.path,
-                format!(
-                    "both `{}` and `{}` have to be specified at the same time",
-                    DECLARATION.1, DEFINITIONS.1,
-                ),
-            ));
-        }
+        // if (with_funcs.declaration.is_some() && with_funcs.definitions.is_none())
+        //     || (with_funcs.declaration.is_none() && with_funcs.definitions.is_some())
+        // {
+        //     return Err(syn::Error::new_spanned(
+        //         &meta.path,
+        //         format!(
+        //             "both `{}` and `{}` have to be specified at the same time",
+        //             DECLARATION.1, DEFINITIONS.1,
+        //         ),
+        //     ));
+        // }
         Ok(Variants::WithFuncs(with_funcs))
     });
     m.insert(PARAMS, f_params);
     m.insert(WITH_FUNCS, f_with_funcs);
     m
 });

 /**
 Struct describes an entry like `order_param => override_type`,  e.g. `K => <K as TraitName>::Associated`
 */
diff --git a/borsh/Cargo.toml b/borsh/Cargo.toml
index e0a9465f..b208a7a6 100644
--- a/borsh/Cargo.toml
+++ b/borsh/Cargo.toml
@@ -38,19 +38,19 @@ bytes = { version = "1", optional = true }
 bson = { version = "2", optional = true }

 [dev-dependencies]
 insta = "1.29.0"

 [package.metadata.docs.rs]
 features = ["derive", "unstable__schema", "rc"]
 targets = ["x86_64-unknown-linux-gnu"]

 [features]
-default = ["std"]
+default = ["std", "unstable__schema"]
 derive = ["borsh-derive"]
 unstable__schema = ["derive", "borsh-derive/schema"]
 std = []
 # Opt into impls for Rc<T> and Arc<T>. Serializing and deserializing these types
 # does not preserve identity and may result in multiple copies of the same data.
 # Be sure that this is what you want before enabling this feature.
 rc = []
 de_strict_order = []
diff --git a/borsh/tests/schema/test_schema_with_third_party.rs b/borsh/tests/schema/test_schema_with_third_party.rs
index 30562f89..ea068e85 100644
--- a/borsh/tests/schema/test_schema_with_third_party.rs
+++ b/borsh/tests/schema/test_schema_with_third_party.rs
@@ -1,24 +1,25 @@
 use crate::common_macro::schema_imports::*;

 // use alloc::collections::BTreeMap;

 #[allow(unused)]
+#[derive(BorshSchema)]
 struct ThirdParty<K, V>(BTreeMap<K, V>);
 #[allow(unused)]
 mod third_party_impl {
     use crate::common_macro::schema_imports::*;

     pub(super) fn declaration<K: borsh::BorshSchema, V: borsh::BorshSchema>(
     ) -> borsh::schema::Declaration {
         let params = vec![<K>::declaration(), <V>::declaration()];
-        format!(r#"{}<{}>"#, "ThirdParty", params.join(", "))
+        format!(r#"{}<{}>"#, "ThirdPartyOneHasNoControlOfRenamed", params.join(", "))
     }

     pub(super) fn add_definitions_recursively<K: borsh::BorshSchema, V: borsh::BorshSchema>(
         definitions: &mut BTreeMap<borsh::schema::Declaration, borsh::schema::Definition>,
     ) {
         let fields = borsh::schema::Fields::UnnamedFields(vec![
             <BTreeMap<K, V> as borsh::BorshSchema>::declaration(),
         ]);
         let definition = borsh::schema::Definition::Struct { fields };
         let no_recursion_flag = definitions.get(&declaration::<K, V>()).is_none();
@@ -58,24 +59,24 @@ enum C<K, V> {
 pub fn struct_overriden() {
     assert_eq!(
         "A<u64, String>".to_string(),
         <A<u64, String>>::declaration()
     );
     let mut defs = Default::default();
     <A<u64, String>>::add_definitions_recursively(&mut defs);
     assert_eq!(
         schema_map! {
             "A<u64, String>" => Definition::Struct { fields: Fields::NamedFields(vec![
-                ("x".to_string(), "ThirdParty<u64, String>".to_string()),
+                ("x".to_string(), "ThirdPartyOneHasNoControlOfRenamed<u64, String>".to_string()),
                 ("y".to_string(), "u64".to_string())]
             )},
-            "ThirdParty<u64, String>" => Definition::Struct { fields: Fields::UnnamedFields(vec![
+            "ThirdPartyOneHasNoControlOfRenamed<u64, String>" => Definition::Struct { fields: Fields::UnnamedFields(vec![
                 "BTreeMap<u64, String>".to_string(),
             ]) },
             "BTreeMap<u64, String>"=> Definition::Sequence {
                 length_width: Definition::DEFAULT_LENGTH_WIDTH,
                 length_range: Definition::DEFAULT_LENGTH_RANGE,
                 elements: "(u64, String)".to_string(),
             },
             "(u64, String)" => Definition::Tuple { elements: vec!["u64".to_string(), "String".to_string()]},
             "u64" => Definition::Primitive(8),
             "String" => Definition::Sequence {
@@ -101,23 +102,23 @@ pub fn enum_overriden() {
         schema_map! {
             "C<u64, String>" => Definition::Enum {
                 tag_width: 1,
                 variants: vec![
                     (0, "C3".to_string(), "CC3".to_string()),
                     (1, "C4".to_string(), "CC4<u64, String>".to_string())
                 ]
             },
             "CC3" => Definition::Struct { fields: Fields::UnnamedFields(vec!["u64".to_string(), "u64".to_string()]) },
             "CC4<u64, String>" => Definition::Struct { fields: Fields::UnnamedFields(vec![
-                "u64".to_string(), "ThirdParty<u64, String>".to_string()
+                "u64".to_string(), "ThirdPartyOneHasNoControlOfRenamed<u64, String>".to_string()
             ]) },
-            "ThirdParty<u64, String>" => Definition::Struct { fields: Fields::UnnamedFields(vec![
+            "ThirdPartyOneHasNoControlOfRenamed<u64, String>" => Definition::Struct { fields: Fields::UnnamedFields(vec![
                 "BTreeMap<u64, String>".to_string(),
             ]) },
             "BTreeMap<u64, String>"=> Definition::Sequence {
                 length_width: Definition::DEFAULT_LENGTH_WIDTH,
                 length_range: Definition::DEFAULT_LENGTH_RANGE,
                 elements: "(u64, String)".to_string(),
             },
             "(u64, String)" => Definition::Tuple { elements: vec!["u64".to_string(), "String".to_string()]},
             "u64" => Definition::Primitive(8),
             "String" => Definition::Sequence {

this diff is vs https://github.com/near/borsh-rs/tree/f16cd07e3c982539352aa43f65abf3607461a7bc
cd borsh && cargo test  --features unstable__schema 'schema::test_schema_with_third_party'

it appears that doing a robust solution for arbitrary levels of nesting will require considerable breakage

after some discussion and above comments, it seems that if i am mistaken,

fixing conflicts in crates are I control is easy - rename or alias, or custom attributed. So i am not interested in fixing this as attribute.
fixing 3rd party crates could be solved by prefix, I am ok with that, but seems leaking details is not good. why I am good? because in the end everything is just some unique string which hints me how to debug thing, if crate+mod migrated/moved, i am ok with default behavior schema changes and TS consumer update as needed (even if change is doing nothing in the end). which leads to solution allow root object to hook and rename any 3rd party crates declaration during registration, so when assembly from root to children happens, my hook on root can receive child register and rename as needed

For me good is hook, but ideal is crate+module prefix and hook working together (controlled by attributes). So without hook does not seem there is final solution?

generates second declaration/definition under +1 suffixed name

@dzmitry-lahoda yeah, well, more-or-less robust automatic renames instead of conflict detection should be possible, if one introduces schema_id,
        impl schemars::JsonSchema for A {
            fn schema_name() -> std::string::String {
                "A".to_owned()
            }
            fn schema_id() -> std::borrow::Cow<'static, str> {
                std::borrow::Cow::Borrowed("example_crate::a::A")
            }

Someone willing to replace somebody's else's type schema intentionally will still be able to do so,
but a reasonable default of std::module_path!  + type_name in derives will be a great way to do a unique id for types,
which wish to conform to being nice to others.
Schemars doesn't attempt to compare the definitions of types semantically, which might prove to be anywhere from very hard to impossible with recursive types being present.
Self-assigned schema_id would be the full source of truth for comparing types, breaking borsh's schema trait in a similar way by replacing a btreemap<declaration, definition> with a Generator, having an additional  btreemap<schema_id, RenamedDeclaration> field.


Support ng-model-options for timepicker

We should support ng-model-options in the timepicker.

[ ] updateOn
[ ] debounce
[ ] allowInvalid
[ ] getterSetter
[ ] timezone

While they're working on this feature, probably it would be a good idea to review this workaround used when you're working at the same time with datepicker and time picker.
http://www.ericluwj.com/2015/11/06/angularui-ui-bootstrap-datepicker-and-timepicker-neutral-timezone.html
Hope someone helps...

@WindSaber we have full timezone support in the datepicker.
Support in the timepicker is of dubious value though.

Closing in favor of #5957 as this will result in a complete rewrite of the widget, addressing all the outstanding issues.

Not completely sure about this decision....I think maybe timezone support would be necessary....especially when working when multiple and different timezones at the same time

@WindSaber, we specifically do NOT want timezone support for this component as we fully intend on not even using a date object anymore.  as @wesleycho pointed out, if you want time zone support it's available via the date picker.

@WindSaber
https://github.com/Gillardo/bootstrap-ui-datetime-picker
use this repo with, enable-date="false" if you need timezone support.


Theme: Bootstrap v5 theme

Hi Ben!
I love your K6-Reporter tools. It's help me a lot. I created new theme to add some variations in the result html design. However I don't know how to make it flexible (user can set the theme using npm). So, I only created the ejs file and of course it's responsive.
Here some screenshoot

@khumam this is really nice!

@khumam this is really nice!

Thank You!!

I tried around and here is an example on how to make it swtichable. Seems to work https://github.com/fentas/k6-reporter/commit/c10fc88c3222177aa09286136e32cc4f4946b533
Add the option template: 'bootstrap'


k8s.io/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro/ tutorial not consistent with linked source code

This is a...

[ ] Feature Request
[x] Bug Report

Problem:
https://kubernetes.io/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro/ says:

The source code and the Dockerfile are available in the GitHub repository for the Kubernetes Basics.

The server.js in github just responds "Hello World!" to any request. However the server in the interactive tutorial is more complex:
var handleRequest = function(request, response) {
  response.setHeader('Content-Type', 'text/plain');
  response.writeHead(200);
  response.write("Hello Kubernetes bootcamp! | Running on: ");
  response.write(host);
  response.end(" | v=1\n");
  console.log("Running On:" ,host, "| Total Requests:", ++requests,"| App Uptime:", (new Date() - startTime)/1000 , "seconds", "| Log Time:",new Date());
}

Particularly during module 3 step 2 this is very confusing - when the reader tries to match what they see in the terminal with what they have been told they are running, they will find they are not consistent. Only in step 4 does the reason for the discrepancy become apparent.
Proposed Solution:
Change the source code or the tutorial so that they match.
Page to Update:
https://kubernetes.io/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro/

I think so. I opened same Issue(#8855) and PR(#8856).
Yet, PR wasn't reviewed.

Looks like the assign to @BenHall  didn't work, PR is still assigned to @zacharysarah .

Thanks, it's a little confusing as the repo was originally stored elsewhere and merged in.
Let me see if I can untangle this in time for next weeks SIG-DOCS.


connection string creation

Hi,
very interesting project!
I what to ask you if is there a function to create the connection string starting form some attributes.
For example in SqlAlchemy there area the URL and make_url functions (from sqlalchemy.engine.url import URL, make_url) to create the connection string in the proper way for sqlachemy library.

Hi! Turbodbc will automatically construct a connection string when you pass in keyword arguments (see here):
>>> from turbodbc import connect
>>> connection = connect(driver="PostgreSQL",
...                      server="hostname",
...                      port="5432",
...                      database="myDataBase",
...                      uid="myUsername",
...                      pwd="myPassword")

I guess this is what you are looking for? If you really want to have a function that creates a connection string and nothing else, you could use https://github.com/blue-yonder/turbodbc/blob/master/python/turbodbc/connect.py#L12, but this function is not part of the public interface and might change any second, though I would not expect it to.
If you try to build an SQLAlchemy dialect for some database, you might want to take a look at the Exasol dialect: https://github.com/blue-yonder/sqlalchemy_exasol/blob/master/sqlalchemy_exasol/turbodbc.py
Also, check out the list of SQLAlchemy dialects with turbodbc support before creating a new one, although I can't say anything about the quality/usage of these: http://turbodbc.readthedocs.io/en/latest/pages/faq.html#can-i-use-turbodbc-together-with-sqlalchemy

Thank you so much, I'll check all your links.
I close the issue.


[Bug]Media Plugin crashing on Android Lolipop 5.0

TakePhotoAsync works fine on my Galaxy Tab 10 running Kitkat.  My Samsung Galaxy 5 running Lolipop however routinely crashes.  Sometimes if I set a break point at that function, or if I wait a few minutes before taking a picture then the function might not crash.  However the image I could never get to load into the image view on the S5.  It did load on my tablet.
This was tested using the latest media plugin on nuget.  Version 1.0.2 and xamarin forms <IP_ADDRESS>92
The code was a copy and paste from the example except I had to change 1 line because an extension appears to have been changed from the example code

Do you have a stack trace that I could look at?

Closing no update.


[language][bytecode verifier] Rename Nonce to RefID

Motivation
This PR is part of a two-PR cycle for retargeting the type checker in the bytecode verifier to the borrow graph crate.  This PR makes two changes:

It renames Nonce to RefID, the name used in the borrow graph crate; variables that used the nonce are instead renamed to use id.
It drops stale documentation about reference safety.

Have you read the Contributing Guidelines on pull requests?
Yes.
Test Plan
Existing tests.
Related PRs

Addressed feedback by @dariorussi .
@sblackshear , @tnowacki : Am I good to land?

@bors-libra r=dariorussi

:pushpin: Commit 83ae22b has been approved by dariorussi

:hourglass: Testing commit 83ae22b6c4a55acf35e1a8dadf2753cd753d6c42 with merge c3b9339ac05df4c078305d5a9203fec02af25279...

:sunny: Test successful - checks-circle_commit_workflow
Approved by: dariorussi
Pushing c3b9339ac05df4c078305d5a9203fec02af25279 to master...


IPv4 peer address sharing not efficient enough

Very important!
In contrast to <IP_ADDRESS>,  "sending: getaddr" to a <IP_ADDRESS> node does NOT give back as answer a list of addresses from peers.dat of this node. Instead, nothing happen.
Compare:
2015-12-22 12:30:23 sending: getaddr (0 bytes) to peer=1, peeraddr=xynjl64xlviqhkjl2fbvupj7y3wct46jtayoxm2ksba6tqzo6tsa.b32.i2p
2015-12-22 12:30:23 Marking as good failed, expected to find xynjl64xlviqhkjl2fbvupj7y3wct46jtayoxm2ksba6tqzo6tsa.b32.i2p
2015-12-22 12:30:23 receive version message: /Anonymous:<IP_ADDRESS>/: version 70009, blocks=462736, services=0x0000000000000081 us=y5b2osxu5epibmmrzhsh4sncahdjbxx5zepkxlwie5qx5i7jlbda.b32.i2p, them=xynjl64xlviqhkjl2fbvupj7y3wct46jtayoxm2ksba6tqzo6tsa.b32.i2p, peer=xynjl64xlviqhkjl2fbvupj7y3wct46jtayoxm2ksba6tqzo6tsa.b32.i2p
2015-12-22 12:30:23 AddTimeData : Added a new peer, offset -3 seconds, now have 3 samples.
2015-12-22 12:30:23 sending: ping (8 bytes) to peer=1, peeraddr=xynjl64xlviqhkjl2fbvupj7y3wct46jtayoxm2ksba6tqzo6tsa.b32.i2p
2015-12-22 12:30:23 sending: addr (543 bytes) to peer=1, peeraddr=xynjl64xlviqhkjl2fbvupj7y3wct46jtayoxm2ksba6tqzo6tsa.b32.i2p
2015-12-22 12:30:23 initial getheaders (462735) to peer=1, peeraddr=xynjl64xlviqhkjl2fbvupj7y3wct46jtayoxm2ksba6tqzo6tsa.b32.i2p (startheight:462736)
2015-12-22 12:30:23 sending: getheaders (997 bytes) to peer=1, peeraddr=xynjl64xlviqhkjl2fbvupj7y3wct46jtayoxm2ksba6tqzo6tsa.b32.i2p
2015-12-22 12:30:23 received: verack (0 bytes) from peer=1, peeraddr=xynjl64xlviqhkjl2fbvupj7y3wct46jtayoxm2ksba6tqzo6tsa.b32.i2p
2015-12-22 12:30:23 received: ping (8 bytes) from peer=1, peeraddr=xynjl64xlviqhkjl2fbvupj7y3wct46jtayoxm2ksba6tqzo6tsa.b32.i2p
2015-12-22 12:30:23 sending: pong (8 bytes) to peer=1, peeraddr=xynjl64xlviqhkjl2fbvupj7y3wct46jtayoxm2ksba6tqzo6tsa.b32.i2p
2015-12-22 12:30:25 received: pong (8 bytes) from peer=1, peeraddr=xynjl64xlviqhkjl2fbvupj7y3wct46jtayoxm2ksba6tqzo6tsa.b32.i2p
2015-12-22 12:30:25 received: headers (82 bytes) from peer=1, peeraddr=xynjl64xlviqhkjl2fbvupj7y3wct46jtayoxm2ksba6tqzo6tsa.b32.i2p
2015-12-22 12:30:32 connection to <IP_ADDRESS>:9377 timeout
2015-12-22 12:30:32 trying connection <IP_ADDRESS>:9377 lastseen=108.3hrs
2015-12-22 12:30:32 connected <IP_ADDRESS>:9377
2015-12-22 12:30:32 Added connection to <IP_ADDRESS>:9377 peer=2
2015-12-22 12:30:32 send version message: version 70009, blocks=462736, us=<IP_ADDRESS>:9377, them=<IP_ADDRESS>:9377, peer=<IP_ADDRESS>:9377
2015-12-22 12:30:32 sending: version (105 bytes) to peer=2, peeraddr=<IP_ADDRESS>:9377
2015-12-22 12:30:32 received: version (104 bytes) from peer=2, peeraddr=<IP_ADDRESS>:9377
2015-12-22 12:30:32 peer <IP_ADDRESS>:9377, so far we know nVersion=70007 nServices=0x0000000000000083 nTime=1450787435, and there are 84 bytes left in the message.
2015-12-22 12:30:32 peer <IP_ADDRESS>:9377, setting send stream type, was 00040001, now set to 00000001
2015-12-22 12:30:32 sending: verack (0 bytes) to peer=2, peeraddr=<IP_ADDRESS>:9377
2015-12-22 12:30:32 sending: getaddr (0 bytes) to peer=2, peeraddr=<IP_ADDRESS>:9377
2015-12-22 12:30:32 While marking <IP_ADDRESS>:9377 as good, the peer services was found to have changed from 0x0000000000000001 to 0x0000000000000083, now updated.
2015-12-22 12:30:32 Moving <IP_ADDRESS>:9377 to tried
2015-12-22 12:30:32 receive version message: /Anonymous:<IP_ADDRESS>/: version 70007, blocks=462736, services=0x0000000000000083 us=<IP_ADDRESS>:54184, them=<IP_ADDRESS>:9377, peer=<IP_ADDRESS>:9377
2015-12-22 12:30:32 AddTimeData : Added a new peer, offset +3 seconds, now have 4 samples.
2015-12-22 12:30:32 sending: ping (8 bytes) to peer=2, peeraddr=<IP_ADDRESS>:9377
2015-12-22 12:30:32 sending: addr (543 bytes) to peer=2, peeraddr=<IP_ADDRESS>:9377
2015-12-22 12:30:32 initial getheaders (462735) to peer=2, peeraddr=<IP_ADDRESS>:9377 (startheight:462736)
2015-12-22 12:30:32 sending: getheaders (997 bytes) to peer=2, peeraddr=<IP_ADDRESS>:9377
2015-12-22 12:30:32 received: verack (0 bytes) from peer=2, peeraddr=<IP_ADDRESS>:9377
2015-12-22 12:30:32 verack from <IP_ADDRESS>:9377, recv stream type was 00040001, now set to 00000001
2015-12-22 12:30:33 received: pong (8 bytes) from peer=2, peeraddr=<IP_ADDRESS>:9377
2015-12-22 12:30:33 received: headers (82 bytes) from peer=2, peeraddr=<IP_ADDRESS>:9377
2015-12-22 12:30:33 trying connection 44xzfv5rz2fk2jwblrju2unwpjgmv26zng4evdbtmo2bmkgtciga.b32.i2p lastseen=202.4hrs
2015-12-22 12:30:40 received: addr (546003 bytes) from peer=2, peeraddr=<IP_ADDRESS>:9377
2015-12-22 12:30:40 received 1000 addresses, serialized size 542 bytes each, from peer=2, peeraddr=<IP_ADDRESS>:9377
2015-12-22 12:30:40 Added 3 addresses from <IP_ADDRESS>: 1 tried, 36 new
2015-12-22 12:30:40 received: addr (546003 bytes) from peer=2, peeraddr=<IP_ADDRESS>:9377
2015-12-22 12:30:40 received 1000 addresses, serialized size 542 bytes each, from peer=2, peeraddr=<IP_ADDRESS>:9377
2015-12-22 12:30:40 Added 3 addresses from <IP_ADDRESS>: 1 tried, 39 new
2015-12-22 12:30:40 received: addr (273003 bytes) from peer=2, peeraddr=<IP_ADDRESS>:9377
2015-12-22 12:30:40 received 500 addresses, serialized size 542 bytes each, from peer=2, peeraddr=<IP_ADDRESS>:9377
2015-12-22 12:30:40 Added 1 addresses from <IP_ADDRESS>: 1 tried, 40 new
Also see the similar if not identical issue https://github.com/Anoncoin/anoncoin/issues/90

In fact it works in <IP_ADDRESS>, but they dont share as much as <IP_ADDRESS> nodes, which in fact may be the good behaviour as there is too much addresses shared by those <IP_ADDRESS>. This is best discussed in https://github.com/Anoncoin/anoncoin/issues/90

This was corrected by the patch of addrman.cpp and addrman.h https://github.com/Anoncoin/anoncoin/commit/ec6acc2ca6f1a6df88107911fa029f8b558cb8db and before.
There is now on clearnet easily 8-12 connected nodes quickly both on windows and on linux.
Sadly, the patch did not remove the related issue for I2P network https://github.com/Anoncoin/anoncoin/issues/90

Corrected https://github.com/Anoncoin/anoncoin/commit/a700f49543b9c1a4bceb2c9e65cc5b4908fdebf3

Finally bug was found! https://github.com/Anoncoin/anoncoin/commit/44053a1104b37a88ba7fee2f1556346b9fb3cc57


Mixed use of breakpoint and snapshot may be confusing

I think the two terms are being used interchangeably in this repo but IIRC the official term is snapshot.  Either way I think it would simplify things to keep the name consistent.

Resolved by #18.


When starting Two server instances on diferent ports (even different interfaces) on same program just the second one works.

When starting two server instances on different ports (even different interfaces) on same program just the second one works. It looks like the instantiation of two servers on a single program, running in deferent treads and not sharing anything, is not supported as, some how the second one blocks the first one.
If you need me to provide more information i will be a pleasure!
Very nice library by the way!

I forgot to mention that I am using the latest version.

Strange, I've been using Simple-Web-Server together with Simple-WebSocket-Server many times. What OS are you on?

Ubuntu 16.04.
I have been investigating and it look like is the resources vector that is
being overwritten by the new instance.
On Sun, May 22, 2016 at 5:37 PM, Ole Christian Eidheim <
<EMAIL_ADDRESS>wrote:

Strange, I've been using Simple-Web-Server together with
Simple-WebSocket-Server many times. What OS are you on?
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/eidheim/Simple-Web-Server/issues/52#issuecomment-220838758

You sure you have two different server objects? There are no statics:)

Yes.. search for the word static was the first thing I did ;-). They are
two instances created from different threads.
On Sun, May 22, 2016 at 5:41 PM, Ole Christian Eidheim <
<EMAIL_ADDRESS>wrote:

You sure you have two different server objects? There are no statics:)
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/eidheim/Simple-Web-Server/issues/52#issuecomment-220839003

Would you mind creating a minimal test case where this fails, and I'll have a look at it when I have time.

Yes, I will do that. Thanks!
On Sun, May 22, 2016 at 5:46 PM, Ole Christian Eidheim <
<EMAIL_ADDRESS>wrote:

Would you mind creating a minimal test case where this fails, and I'll
have a look at it when I have time.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/eidheim/Simple-Web-Server/issues/52#issuecomment-220839300

My bad... I was to quick to blame your library... sorry!
It was a problem with identical namespaces (bug on my side) in different
places that where just manifesting when instancing two servers...
Sorry for making you loose your time and thanks for your help!!
Best regards,
          Nicolas.

On Sun, May 22, 2016 at 5:50 PM, nicolas pena<EMAIL_ADDRESS>wrote:

Yes, I will do that. Thanks!
On Sun, May 22, 2016 at 5:46 PM, Ole Christian Eidheim <
<EMAIL_ADDRESS>wrote:

Would you mind creating a minimal test case where this fails, and I'll
have a look at it when I have time.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/eidheim/Simple-Web-Server/issues/52#issuecomment-220839300

No worries, glad it got resolved:)


Error creating bean with name 'embeddedClickHouse' defined in class path resource

I'm trying to run tests using testcontainers embedded clickhouse, but I am getting java.lang.IllegalStateException: Failed to load ApplicationContext, which is caused by Error creating bean with name 'embeddedClickHouse' defined in class path resource

Please provide full stack trace and condition why bean was not initialized

No response in this thread.


No solution file?

Is it expected that the repo contains no .sln file?
I tried opening Microsoft.SqlServer.TransactSql.ScriptDom.csproj directly but it crashes VS 2022

Hi @clement911, we actually use SlnGen to generate the Visual Studio sln.
Here are the instructions:
https://github.com/microsoft/SqlScriptDOM/blob/main/CONTRIBUTING.md#getting-started

gotcha. sorry I missed that!
Will give it a try...


PipelineRuns are not recorded if re-triggered from Tekton dashboard

Hi there,
I found that the tekton result database only records pipelineruns that triggered from event listener, however if I re-run the pipeline directly from the tekton dashboard, then nothing changes in the database. No new records will be inserted, nor the update_time of the previous record will be updated.
Is this by design?
Thanks!

/kind bug

/label "priority/important-soon"

/priority important-soon

Sorry for missing this issue!
A new run of a Pipeline is considered a new event, so it should create new Result and Record (it won't try to group this within the previous result).
If that's not the case, let me know and I can try to reproduce (let me know what dashboard/result versions you're using).


Possible merger  with Fabric?

Hi author of Sultan, I just noticed your project from Hacker News.  It is subjective, I know but I am going to give my opinions anyway.
There is this awesome project called 'Fabric' for automating tasks using command line utilities through Python, and much more. We have already used that in place of Ansible and it served pretty well for us. I believe both of the projects (Sultan & Fabric) serves the same purpose, while Fabric doing much more (not being offensive).
Right now Fabric has reached a tipping point as mentioned in the Roadmap. So why not contribute the best parts of your project to Fabric so that it benefits Fabric's code base.
For your reference,

Invoke
Fabric

Please close this if this is completely ridiculous.

It's a good idea that you're recommending. I don't think Sultan's goals are to necessarily be in the same landscape as Fabric, or Invoke. Fabric is a deployment tool, and Invoke is a task tool. I think Sultan is more of a general all purpose tool where you can use it as part of any application.
For example, if you have a task to get some remote files, package it up and send it over to another environment, you can use Sultan to do this, and be on your way. It is not necessarily a deployment task or a build task. This example would certainly fall under some sort of DevOps work, but there are other use cases for what Sultan can be used.
I will certainly reach out to folks at Invoke and Fabric to see if they're interested in including Sultan as part of their projects.

Thank you for replying with clear use cases. I definitely see where Sultan can be used as a minimal library than full blown deployment solutions like Fabric.


Set tpie::tempname before calling tpie_init()

This avoids an additional directory named TPIE_<date>_<…> at the default tmp path.
About a year ago, when executing benchmarks in a scripted way, I ran into the problem that the BDDs produced by Adiar filled up the entire disk. Because of that, the benchmarking process crashed and left the files there, so my benchmark runner script was not even able to create new log files for the upcoming benchmarks. That was when I started to use the -T option in BDD benchmark to make Adiar write to a location I previously created using Python’s tempfile.TemporaryDirectory(), so I could be sure that would be cleaned even upon timeouts and crashes.
However, that fix seemed to be ineffective, Adiar still created directories named TPIE_<date>_<…> in my /tmp folder. So I added two additional lines to my benchmark running script to remove /tmp/TPIE_* after every benchmark item. Recently, I’ve switched to parallel execution of benchmarks, and it just came to my mind that removing all /tmp/TPIE_* might also remove the folders of another Adiar process, which could lead to crashes. Fortunately, there were no such crashes, but it made me think I should fix that issue in my script.
Seeking for solutions, I noticed that Adiar sets the temporary directory of TPIE only after initializing TPIE. So the /tmp/TPIE_* directories were probably created during the initialization, and afterwards TPIE switched to the other location. I just moved the initialization after setting TPIE’s temporary directory, and it worked as expected.
For sure, you know a lot more than me about TPIE, so please re-check that this change does not introduce any unwanted side-effects.
(EDIT: This is not urgent at all, it seems like the /tmp/TPIE_* directories stay below 1 MiB in size each, so I could just drop the removal of these directories from my script.)

Recently, I’ve switched to parallel execution of benchmarks, and it just came to my mind that removing all /tmp/TPIE_* might also remove the folders of another Adiar process, which could lead to crashes. Fortunately, there were no such crashes, but it made me think I should fix that issue in my script.

Depending on what you are measuring, this may introduce a lot of noise! Assuming the cache uses a LRU policy (which is optimal within a factor of two), one process may throw out the data needed by another process. That is, by measuring running time in parallel, you are introducing noise.
You should also notice something similar with Sylvan (and presumably OxiDD and LibBDD): as you increase the number of threads, you gain speed up to a (small) constant of the number of cores on your machine. Beyond doing so, performance decreases due to threads tripping over eachother.


Release-testing: v8.5.0 tiflow repo CI trigger

version release-test CI trigger for v8.5.0

What problem does this PR solve?

Issue Number: close #xxx
What is changed and how it works?
Check List
Tests

Unit test
Integration test
Manual test (add detailed scripts or steps below)
No code

Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note
Please refer to [Release Notes Language Style Guide](https://pingcap.github.io/tidb-dev-guide/contribute-to-tidb/release-notes-style-guide.html) to write a quality release note.

If you don't think this PR needs a release note then fill it with `None`.

/test
This is an automated do-test comment triggered by a release-testing robot.
Every evening at 11 PM, if there are updates to the PR in the repo, then perform the `/test CI FT` test.
Commented on: 2024-11-22 19:10:26.

/test
This is an automated do-test comment triggered by a release-testing robot.
Every evening at 11 PM, if there are updates to the PR in the repo, then perform the `/test CI FT` test.
Commented on: 2024-11-22 19:33:04.

/test
This is an automated do-test comment triggered by a release-testing robot.
Every evening at 11 PM, if there are updates to the PR in the repo, then perform the `/test CI FT` test.
Commented on: 2024-11-22 19:34:25.

/test
This is an automated do-test comment triggered by a release-testing robot.
Every evening at 11 PM, if there are updates to the PR in the repo, then perform the `/test CI FT` test.
Commented on: 2024-11-22 19:37:30.

/retest

/test
This is an automated do-test comment triggered by a release-testing robot.
Every evening at 11 PM, if there are updates to the PR in the repo, then perform the `/test CI FT` test.
Commented on: 2024-11-22 20:19:04.

/test
This is an automated do-test comment triggered by a release-testing robot.
Every evening at 11 PM, if there are updates to the PR in the repo, then perform the `/test CI FT` test.
Commented on: 2024-11-22 20:19:56.

/test ?

/test
This is an automated do-test comment triggered by a release-testing robot.
Every evening at 11 PM, if there are updates to the PR in the repo, then perform the `/test CI FT` test.
Commented on: 2024-11-25 22:33:35.

/retest

/retest

/test all

/test all


add images folder, update README link

Hi @andypbarrett , I added the images folder and updated the README link but please double-check that link :)\
Awesome work!!! Super excited for this, this is just what we were thinking for the Champions 🚀

I also realize I shouldn't have pushed all the generated files; the only files I actually edited are:

data_strategies_slides.qmd
README.md
images/ folder


Allow SDK endpoint proxy

Description
Allow users to query all the available endpoints on the SDK-based blockchain application in case of a missing endpoint and return responses in the decoded format.
Acceptance Criteria

The following endpoints are available
The responses are dynamically decoded as per the corresponding schema
Integration tests are implemented

Additional information
Endpoints
HTTP:  POST /invoke
RPC:    post.invoke
Request query params

Parameter
Type
Validation
Default
Comment

endpoint
String

(empty)
Required

params
Object

(empty)
Optional

This issue is invalid since the api-client now sends responses in the decoded JSON format. Ref: https://github.com/LiskHQ/lisk-sdk/issues/7189


Improve error message for LIMIT > max int

Currently this fails in TopNOperator constructor, because there's an
integer overflow in the LocalExecutionPlanner when it casts a long to an
int.

Looks good, but verify MAX_INT actually works and doesn't have a boundary condition problem.

Otherwise might need < instead of <=

Added a test


Disable YARN memory checks

I've added Greenplum version fix as declared one does not exist in ppa (https://launchpad.net/~greenplum/+archive/ubuntu/db)
cc @adamjshook

Oof, I was not anticipating them removing those releases from PPA. I'll have to build it from source.  Thanks for pointing this out. This is good for now but I'll need to open a PR.

flake failure. Previous run was ok for container which is problematic now.
Merging.


Update project for Java 9

I cloned the project and tried to run it but got this error:
java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter
clojure.lang.Compiler$CompilerException: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter, compiling:(aleph/http/client_middleware.clj:420:7)
  java.lang.ExceptionInInitializerError:
java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
             clojure.lang.ExceptionInfo: java.lang.ExceptionInInitializerError
    file: "/var/folders/x5/t1zvsp455tb1j07y_j6tddxm0000gn/T/boot.user545993743605152703.clj"
    line: 41

The issue seems to be an incompatibility with Java 9.
Updating details are here: https://www.deps.co/blog/how-to-upgrade-your-clojure-projects-to-use-java-9/

The above error is fixed as of now with https://github.com/ztellman/aleph/commit/b4a49a878d73bb7db4178f7e62ddc9feb912f664 . Also I could see current version of Clojurescript causes issues with JDK 9. Latest Clojurescript release 1.10 fixes JDK 9 compatibility issue caused by xml-bind. Relevant JIRA issue : https://dev.clojure.org/jira/browse/CLJS-2377 . Upgrading it might resolve the issue.

@ericstewart the --add-modules is a temporary fix as those EE modules are deprecated from the SE JDK and probably will disappear in Java 11.
Have you tried to explicitly add javax.xml.bind/jaxb-api {:mvn/version "2.3.0"} to your deps.edn?

@ericstewart try just explicitly listing javax.xml.bind/jaxb-api {:mvn/version "2.3.0"} in your deps.edn (this will also avoid issues with Java 11 when those EE modules won't be bundled into the JDK).

I believe this is all working now. We have a few developers using 9+ running edge projects.


Shadow/mirror requests

Describe the feature you'd love to see
Maybe this feature already exists, however I could not find a way to do it. We would like to mirror requests to replica server. Is this already possible?
Additional context (optional)
No response

Could you elaborate more on the use case and motivation for this feature?

Sure -
We want to take requests sent to a production environment and mirror those requests a copy of the production environment. We are using http-proxy-middleware as a proxy to a 3rd party API/application. We want to take all those proxied requests to the 3rd party and mirror them to a clone of the production. Does that help?


Possible to implement my own UI?

Hi, thanks for this great solution for authentification on docker-based systems with microservices. That is exactly what I was looking for 👍
Is it possible that I can implement my own login/logout interface? On the login page I would like to show him the different Auth providers like this:

After that, i want redirect the logged in user to a dashboard page, so he can see which services he can access like this:

Under the Quick access Headline, the user can click on a docker service to which he has access and is redirected directly to it. How can i do something like this?

We don't currently support more than one authentication method, so that's why we've got away so far without implementing a UI.
I know this is a feature of the oauth2_proxy project, which may be a better fit for your use case: https://github.com/oauth2-proxy/oauth2-proxy ?

@thomseddon thanks for your quick feedback. I think I will use traefik-forward-auth with keycloak to use multiple Auth providers and a Login Form.
I found this tutorial about this:
https://geek-cookbook.funkypenguin.co.nz/ha-docker-swarm/traefik-forward-auth/keycloak/
But I have a question about it:
Is it possible to run one instance of this over a variety of applications with different permissions?

You can use the "rules" config to apply different permissions/providers to different domains/subdomains/apps - in the latest release this supports specific user whitelists per rule!


model relationships association with default fabricator

with ActiveRecord, suppose I have a Book model and an Author model and
class Book < ActiveRecord::Base
has_many :authors, through: :books_authors
end
class Author < ActiveRecord::Base
has_many :books, through: :books_authors
end
And the requirement is that a book has to have at least an author, therefore in my book fabricator, I have
Fabricator(:book) do
authors! { Fabricate(:author) }
end
In my cucumber test, I want to be able to say
Given 1 book
And that book has the following author:
| name | John Doe |
.....
Currently if I do this the book will have two authors, one created with the book fabricator and John Doe. I'd like to be able to only have John Doe has the author for the book.

You should be doing this the other way around. Always build from the top down.
Given the following author:
| name | John Doe |
And that author has 1 book

I don't think authors are "on top of" books in this example - they "have many through" each other. But agree with you that coming from the other direction would solve this problem.

Oh, you are absolutely right. Sorry about that.
The base fabricator should never build things that aren't necessary to persist the object. You should make a :book_with_author fabricator for when you need them together. This will reduce the "magic" in your test suite and make cucumber work a lot better.

Makes a lot of sense. Thanks!


Restrict ILoader interface

From the discussion on the role of the ILoader/Loader on Tuesday.
Remove APIs on the ILoader interface that don't need to be there (around creating detached containers).  Callers are expected to have a concrete Loader in cases they would want to call these.
Most local changes are related to types in test code, and all instances where Bohemia calls the removed APIs are done on the Loader class rather than ILoader interface

Is there some summary describing why we do not want these methods on interface?

@vladsud those methods are really only useful in the context of a host which also has access to and knowlege of drivers, as it is necessary to know that inorder to use the create detached flow and craft the attach request. We've generally said this kind of host specific knowelege shouldn't be included in the container runtimes, so it makes sense not to expose it downward via the ILoader interfaces. For rehydrate it doesn't really have a use without create, as you need to create to serialize, and rehydrate


Param for og:image/twitter card in front-matter

First of all I like this template a lot. I was wondering if adding an optional front-matter parameter on blog posts for og:image / or twitter summary image would be a good idea. Something like .FeaturedImage. so you wouldn't end up sharing links with the same preview image.
What do you think. I would be glad to help. :)

@jeremejazz this is a great idea that I've wanted to implement myself for some time, but haven't gotten around to it. The aim is to have a featured image param that would be used for social media shares as you have mentioned and would also display at the top of the blog post.


(#139) LCOM3: advancing research on impediment for testing OneMethodCreatesLambda

as per #139
Upon research I found that the compiler creates "synthetic" methods (also known as "bridge" methods) as per JLS 13.1:

A construct emitted by a Java compiler must be marked as synthetic if it does not correspond to a construct declared explicitly or implicitly in source code, unless the emitted construct is a class initialization method (JVMS §2.9).

Synthetic methods were mostly known for generics (they are necessary due to type erasure), but are also used under the hood for lambdas.
What needs to be done is to exclude these synthetic methods from the skeleton.xml in #171 in order to avoid distortions in metric results.

Job #198 is now in scope, role is REV

This pull request #198 is assigned to @amihaiemil/z, here is why. The budget is 15 minutes, see §4. Please, read §27 and when you decide to accept the changes, inform @yegor256/z (the architect) right in this ticket. If you decide that this PR should not be accepted ever, also inform the architect.

Codecov Report

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

@@            Coverage Diff            @@
##             master     #198   +/-   ##
=========================================
  Coverage     73.91%   73.91%
  Complexity      159      159
=========================================
  Files            31       31
  Lines          1012     1012
  Branches         71       71
=========================================
  Hits            748      748
  Misses          232      232
  Partials         32       32

Impacted Files
Coverage Δ
Complexity Δ

src/main/java/org/jpeek/skeleton/XmlClass.java
93.33% <ø> (ø)
11 <0> (ø)
:arrow_down:

Continue to review full report at Codecov.

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

@amihaiemil please review

@llorllale looks good :)

@rultor good to merge

@rultor good to merge

@amihaiemil Thanks for your request. @yegor256 Please confirm this.

@llorllale Pls write a few words in the PR's decription (we've seen that the QA complains about that) :)

@amihaiemil fixed description

@yegor256 can we merge it?

@llorllale I don't see what this puzzle adds to the problem we had before. Let's just wait for #171 and solve the problem properly. Now we are just reformulating the puzzle. It's not moving us forward anyhow. Am I wrong?

@yegor256 I did research, figured out the problem (which indeed needs to be fixed in #171), and put the puzzle right where the fix needs to take place
What else should I have done here?

@llorllale you should just put #139 on hold and wait for #171. When it's fixed, you just fix #139. It's pointless to create a puzzle when the problem is already documented in #171 See the logic?

@yegor256 what I don't understand is, if this job has a known impediment upfront and there's nothing more to do with it, why was it added to the scope?
I don't know when #171 will be fixed. Declaring an impediment on this job will then leave it occupying one of my slots doing nothing. It would be more useful if I could instead be able to refuse this job without penalty points and accept another job.

@yegor256 I agree with the author, 0crat should look for keywords such as "impediment" in a new Issue's description. As we've seen, this is the case with many Issues in jpeek.

@llorllale I understand the problem, but it's not an excuse. The first option would be to put the ticket on hold (occupying your slot). The second option would be to move the project forward more than you did. Maybe by adding more documentation to the puzzle. Or maybe by writing some additional tests. Something.

@yegor256 There are no more tests left for LCOM3 (test for Bar is being address in a separate, open PR).
What I can do now is basically include the solution for #171 inside the text of the new puzzle I've created in this PR.
Would that suffice?

@llorllale yes, that will work

@yegor256 I expanded a bit on the puzzle basically laid out what needs to be done, basing myself on the documentation available.
I hope it's OK now.

ping @yegor256

@llorllale @amihaiemil I still don't understand what is the contribution of this PR. We had a puzzle, which said exactly what the new puzzle is saying: the skeleton is broken. When the skeleton will be fixed, we will fix this puzzle. What is the point of removing one puzzle and adding a new one, saying almost exactly the same?

@yegor256 well, the new puzzle is a bit more detailed and it has another parent ticket than the original one. It can be traced to the Issue of this PR, where @llorllale did more research and wrote his findings in the description. I would say it's an advancement; maybe not big, but an advancement :)

@llorllale @amihaiemil OK, I'm merging

@rultor merge

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

@rultor merge

@llorllale @yegor256 Oops, I failed. You can see the full log here (spent 6min)
Tests run: 52, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 23.457 sec - in [MethodsWithDiffParamTypes:TCC:0.2]
Running org.jpeek.web.ResultsTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0 sec - in org.jpeek.web.ResultsTest
Running org.jpeek.IndexTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 23.652 sec - in org.jpeek.IndexTest

Results :

Tests run: 81, Failures: 0, Errors: 0, Skipped: 3

[INFO]
[INFO] --- jacoco-maven-plugin:0.7.8:check (jacoco-check) @ jpeek ---
[INFO] Loading execution data file /home/r/repo/target/jacoco.exec
[INFO] Analyzed bundle 'jpeek' with 32 classes
[WARNING] Rule violated for bundle jpeek: lines covered ratio is 0.63, but expected minimum is 0.67
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:09 min
[INFO] Finished at: 2018-02-21T19:35:01+00:00
[INFO] Final Memory: 34M/264M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jacoco:jacoco-maven-plugin:0.7.8:check (jacoco-check) on project jpeek: Coverage checks have not been met. See log for details. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jacoco:jacoco-maven-plugin:0.7.8:check (jacoco-check) on project jpeek: Coverage checks have not been met. See log for details.
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Coverage checks have not been met. See log for details.
	at org.jacoco.maven.CheckMojo.executeCheck(CheckMojo.java:186)
	at org.jacoco.maven.CheckMojo.executeMojo(CheckMojo.java:160)
	at org.jacoco.maven.AbstractJacocoMojo.execute(AbstractJacocoMojo.java:63)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
	... 20 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
container d101b4315091a4739f4fbe4011834bc9a5dd24bf21a17ddee946f7f7d8fc07ef is dead
Wed Feb 21 20:35:08 CET 2018

@yegor256 @amihaiemil reopened #192

@yegor256 like I mentioned in #192, this may be an intermittent issue. Can you please try merging again just in case it works this time around?

@amihaiemil/z this job was assigned to you 5 days ago. It will be taken away from you soon, unless you close it, see §8. Read this and this, please.

@amihaiemil fixed conflicts, please review

@yegor256 can we try to merge again?

ping @yegor256

@amihaiemil/z this job was assigned to you 8 days ago. It will be taken away from you soon, unless you close it, see §8. Read this and this, please.

@rultor merge

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

@rultor merge

@llorllale @yegor256 Oops, I failed. You can see the full log here (spent 2min)
+ scripts=('export '\''MAVEN_OPTS=-XX:MaxPermSize=256m -Xmx1g'\''' ';' 'export '\''JAVA_OPTS=-XX:MaxPermSize=256m -Xmx1g'\''' ';' 'export '\''head=git@github.com:yegor256/jpeek.git'\''' ';' 'export '\''pull_id=198'\''' ';' 'export '\''fork=git@github.com:llorllale/jpeek.git'\''' ';' 'export '\''fork_branch=139'\''' ';' 'export '\''head_branch=master'\''' ';' 'export '\''pull_title=(#139) LCOM3: advancing research on impediment for testing OneMethodCreatesLambda'\''' ';' 'export '\''author=yegor256'\''' ';' 'sudo gem install --no-rdoc --no-ri pdd' ';' 'sudo gem install --no-rdoc --no-ri xcop' ';' 'mvn clean install -Pqulice --errors --settings ../settings.xml' ';' 'mvn clean site -Psite --errors --settings ../settings.xml' ';' 'mvn clean' ';' 'pdd --source=$(pwd) --verbose --file=/dev/null' ';')
+ container=yegor256_jpeek_198
+ as_root=false
+ mkdir -p /home/rultor/.ssh
+ echo -e 'Host github.com\n\tStrictHostKeyChecking no\n'
+ chmod 600 /home/rultor/.ssh/config
+ git clone git@github.com:yegor256/jpeek.git repo
Cloning into 'repo'...
+ cd repo
+ git config user.email<EMAIL_ADDRESS>+ git config user.name rultor
+ '[' -z 'export '\''MAVEN_OPTS=-XX:MaxPermSize=256m -Xmx1g'\''' ']'
+ cd ..
+ cat
+ '[' false = true ']'
+ cat
+ chmod a+x entry.sh
+ cat
+ echo 'export '\''MAVEN_OPTS=-XX:MaxPermSize=256m -Xmx1g'\''' ';' 'export '\''JAVA_OPTS=-XX:MaxPermSize=256m -Xmx1g'\''' ';' 'export '\''head=git@github.com:yegor256/jpeek.git'\''' ';' 'export '\''pull_id=198'\''' ';' 'export '\''fork=git@github.com:llorllale/jpeek.git'\''' ';' 'export '\''fork_branch=139'\''' ';' 'export '\''head_branch=master'\''' ';' 'export '\''pull_title=(#139) LCOM3: advancing research on impediment for testing OneMethodCreatesLambda'\''' ';' 'export '\''author=yegor256'\''' ';' 'sudo gem install --no-rdoc --no-ri pdd' ';' 'sudo gem install --no-rdoc --no-ri xcop' ';' 'mvn clean install -Pqulice --errors --settings ../settings.xml' ';' 'mvn clean site -Psite --errors --settings ../settings.xml' ';' 'mvn clean' ';' 'pdd --source=$(pwd) --verbose --file=/dev/null' ';'
+ rm -rf .gpg
+ cd repo
+ git remote add fork git@github.com:llorllale/jpeek.git
+ git remote update
Fetching origin
Fetching fork
From github.com:llorllale/jpeek
 * [new branch]      106        -> fork/106
 * [new branch]      118        -> fork/118
 * [new branch]      135        -> fork/135
 * [new branch]      139        -> fork/139
 * [new branch]      141        -> fork/141
 * [new branch]      16         -> fork/16
 * [new branch]      65         -> fork/65
 * [new branch]      93         -> fork/93
 * [new branch]      gh-pages   -> fork/gh-pages
 * [new branch]      master     -> fork/master
+ args=
+ '[' default == default ']'
+ args=' --ff'
+ '[' default == no ']'
+ '[' default == only ']'
+ export BRANCH=__rultor
+ BRANCH=__rultor
++ git show-branch __rultor
++ wc -l
+ '[' 0 -gt 0 ']'
+ git checkout -B __rultor fork/139
Switched to a new branch '__rultor'
Branch __rultor set up to track remote branch 139 from fork.
+ git checkout -B master origin/master
Switched to and reset branch 'master'
Branch master set up to track remote branch master from origin.
Your branch is up-to-date with 'origin/master'.
+ '[' false == true ']'
+ '[' false == true ']'
+ git merge --ff __rultor
Auto-merging src/test/java/org/jpeek/MetricsTest.java
CONFLICT (content): Merge conflict in src/test/java/org/jpeek/MetricsTest.java
Automatic merge failed; fix conflicts and then commit the result.
'cid' file is absent, container wasn't started correctly

@llorllale conflict again here... we really have to fix that MetricsTest stuff :/

@amihaiemil fixed conflicts, please review

@yegor256 Can we merge this? 10th day...

@yegor256 ping

The user @amihaiemil/z resigned from #198, please stop working. Reason for job resignation: It is older than 10 days, see §8

Resigned on delay, see §8: -15 points just awarded to @amihaiemil/z, total is +1130

Mistake of @amihaiemil/z/z (your student): Resigned on delay, see §8: -15 points just awarded to @yegor256/z, total is +11014

@rultor merge

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

@rultor merge

@yegor256 Done! FYI, the full log is here (took me 11min)

The job #198 is now out of scope


Chart is broken (goes out of view box)

Hi there. Thank you for your work!
Describe the Bug
The Likes chart is not displayed correctly here https://x-tracker.hobl.in/tweets/21
Screenshots

Environment (please complete the following information):

OS: Mac OS
Browser: Brave
Version: 1.58.137 Chromium: 117.0.5938.153 (Official Build) (arm64)

Thanks. I'll take a look this weekend.

Is it due to y-axis scaling depending on the most current value, not max value?

Probably due to preset min and max values for the Y axis without margins here app/decorators/tweet_decorator.rb


Improve formatting of reminders

Description of Problem:
When a large block of reminders are all sent at once, I want to be able to distinguish each one, so I can more easily visually parse those reminders and home in on the ones of interest.
Potential Solutions:
Start each reminder with the ⚽ emoji, and bold the first line.  e.g.:
⚽ Stoke City FC vs Middlesbrough FC starts in 14 minutes.
Referees: Matt Donohue, Samuel Lewis, Darren Blunden, Darren Bond
⚽ Birmingham City FC vs Hull City AFC starts in 14 minutes.
Referees: Dean Whitestone, Akil Howson, Geoff Russell, Thomas Bramall

Fixed in rev 6095213f21ef1e3cf521a2c28fd53ffedc3059a0.


python311Packages.dvc-studio-client: 0.20.0 -> 0.21.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python311Packages.dvc-studio-client is: Library to post data from DVC/DVCLive to Iterative Studio
meta.homepage for python311Packages.dvc-studio-client is: https://github.com/iterative/dvc-studio-client
meta.changelog for python311Packages.dvc-studio-client is: https://github.com/iterative/dvc-studio-client/releases/tag/0.21.0
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 0.21.0 with grep in /nix/store/kmc59ly2xsn05axv11s743p9l8nfg8v4-python3.11-dvc-studio-client-0.21.0
found 0.21.0 in filename of file in /nix/store/kmc59ly2xsn05axv11s743p9l8nfg8v4-python3.11-dvc-studio-client-0.21.0

Rebuild report (if merged into master) (click to expand)

13 total rebuild path(s)

13 package rebuild(s)

First fifty rebuilds by attrpath

dvc
dvc-with-remotes
python311Packages.dvc
python311Packages.dvc-gdrive
python311Packages.dvc-hdfs
python311Packages.dvc-studio-client
python311Packages.dvclive
python312Packages.dvc
python312Packages.dvc-gdrive
python312Packages.dvc-hdfs
python312Packages.dvc-studio-client
python312Packages.dvclive

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/kmc59ly2xsn05axv11s743p9l8nfg8v4-python3.11-dvc-studio-client-0.21.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python311Packages.dvc-studio-client https://github.com/r-ryantm/nixpkgs/archive/16da5db888c8b9d47f146b6dbff96bfded45ec2e.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/16da5db888c8b9d47f146b6dbff96bfded45ec2e#python311Packages.dvc-studio-client

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/kmc59ly2xsn05axv11s743p9l8nfg8v4-python3.11-dvc-studio-client-0.21.0
ls -la /nix/store/kmc59ly2xsn05axv11s743p9l8nfg8v4-python3.11-dvc-studio-client-0.21.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

22 packages built:

dvc (python311Packages.dvc)
dvc-with-remotes
dvc-with-remotes.dist
dvc.dist (python311Packages.dvc.dist)
python311Packages.dvc-gdrive
python311Packages.dvc-gdrive.dist
python311Packages.dvc-hdfs
python311Packages.dvc-hdfs.dist
python311Packages.dvc-studio-client
python311Packages.dvc-studio-client.dist
python311Packages.dvclive
python311Packages.dvclive.dist
python312Packages.dvc
python312Packages.dvc-gdrive
python312Packages.dvc-gdrive.dist
python312Packages.dvc-hdfs
python312Packages.dvc-hdfs.dist
python312Packages.dvc-studio-client
python312Packages.dvc-studio-client.dist
python312Packages.dvc.dist
python312Packages.dvclive
python312Packages.dvclive.dist

Maintainer pings
cc @mattmelling for testing.

Result of nixpkgs-review pr 322975 run on x86_64-linux 1

22 packages built:

dvc (python311Packages.dvc)
dvc-with-remotes
dvc-with-remotes.dist
dvc.dist (python311Packages.dvc.dist)
python311Packages.dvc-gdrive
python311Packages.dvc-gdrive.dist
python311Packages.dvc-hdfs
python311Packages.dvc-hdfs.dist
python311Packages.dvc-studio-client
python311Packages.dvc-studio-client.dist
python311Packages.dvclive
python311Packages.dvclive.dist
python312Packages.dvc
python312Packages.dvc-gdrive
python312Packages.dvc-gdrive.dist
python312Packages.dvc-hdfs
python312Packages.dvc-hdfs.dist
python312Packages.dvc-studio-client
python312Packages.dvc-studio-client.dist
python312Packages.dvc.dist
python312Packages.dvclive
python312Packages.dvclive.dist


nixosTests.forgejo: Cover forgejo-actions-runner registration

Description of changes
Extends the NixOS test by additionally testing the runner registration with forgejo-actions-runner.

Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[x] Tested, as applicable:

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

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

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

[x] Fits CONTRIBUTING.md.

Thanks!
Have you tested anything besides the registration?
Last time I checked, the forgejo-actions-runner tried to wrap all :host labels in lxc, in a way that is simply not supported by services.gitea-actions-runner.
Additionally, both gitea-actions-runner and forgejo-actions-runner hardcode FHS paths (while upstream act doesn't).

Not yet but perhaps in the future, as I intend to switch from gitlab to forgejo soon.

I am planning to extend the VM test to test the forgejo-actions-runner registration and a full workflow run.
Is this (and forgejo in a broader sense) something you'd be still interested?

There is #303149 now :)

This is great news. Thanks a lot for picking this up! :purple_heart:


WIP: 2d convolution with KANs

Based on the custom Conv2d python implementation.
WIP points:
-> The tensor size matching needs improving for it to be able to work
-> Add striding
-> Add dilation

This convolution doesn't have the same weights for each input channel?

I also created 2d convolution KAN, but I used KAN linear layers multiple times, so maybe doing it all in one class will boost performance, I must try - https://github.com/Indoxer/LKAN

@Indoxer great! I will try it out