Unhelpful error if template branch is specified incorrectly

Cookiecutter version: 1.4.0
Template project url: https://github.com/pybee/Python-Android-template
Python version: 2.7
Operating System: macOS

Description:
If you specify a template project URL that exists, but a branch that does not exist, the git clone command fails, raising an exception.
This is entirely expected. However, the error message that is raised isn't especially helpful - it's a simple dump of the subprocess failure, rather than something pointing at the underlying problem.
What I've run:
The problem is easy to reproduce - specify a valid template URL, but a branch name that doesn't exist. In this example, I'm using Python-Android-template, with the non-existent 2.7 branch.
$ cookiecutter https://github.com/pybee/Python-Android-template --checkout 2.7
You've cloned /Users/rkm/.cookiecutters/Python-Android-template before. Is it okay to delete and re-clone it? [yes]:
Cloning into 'Python-Android-template'...
remote: Counting objects: 174, done.
remote: Total 174 (delta 0), reused 0 (delta 0), pack-reused 174
Receiving objects: 100% (174/174), 75.87 KiB | 0 bytes/s, done.
Resolving deltas: 100% (64/64), done.
Checking connectivity... done.
error: pathspec '2.7' did not match any file(s) known to git.
Traceback (most recent call last):
  File "setup.py", line 56, in <module>
    test_suite='tests'
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Users/rkm/projects/beeware/briefcase/briefcase/app.py", line 193, in run
    self.generate_app_template()
  File "/Users/rkm/projects/beeware/briefcase/briefcase/app.py", line 110, in generate_app_template
    'month': date.today().strftime('%B'),
  File "/Users/rkm/.virtualenvs/briefcase/lib/python2.7/site-packages/cookiecutter/main.py", line 107, in cookiecutter
    no_input=no_input
  File "/Users/rkm/.virtualenvs/briefcase/lib/python2.7/site-packages/cookiecutter/vcs.py", line 122, in clone
    cwd=repo_dir)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '[u'git', u'checkout', '2.7']' returned non-zero exit status 1

The message error: pathspec '2.7' did not match any file(s) known to git. is contained higher up in the stack trace; a public facing error message that said this would be more helpful than details about non-zero exit status of the subprocess.
I've also tried invoking this directly via the API:
from cookiecutter.main import cookiecutter
cookiecutter(
        'https://github.com/pybee/Python-Android-template',
        no_input=True,
        checkout='%s.%s' % (sys.version_info.major, sys.version_info.minor),
        extra_context={
            'app_name': self.distribution.get_name(),
            'formal_name': self.formal_name,
            'organization_name': self.organization_name,
            'dir_name': self.dir,
            'bundle': self.bundle,
            'year': date.today().strftime('%Y'),
            'month': date.today().strftime('%B'),
        }
    )

Again, this raises a subprocess exception, rather than something more meaningful that could be caught and reported.

Thank you @freakboy3742 for reporting this! 🙇


The DefaultAccessLevel parameter description is misleading

The DefaultAccessLevel parameter description is misleading.  The current description says it "specifies access level for new devices."  In reality, changing from the default ALLOW to QUARANTINE or BLOCK will effect existing partnerships as well as new devices.
I recommend changing the description for the DefaultAccessLevel to this:
"The DefaultAccessLevel parameter specifies the access level for new and existing device partnerships. Valid values are Allow,Block or Quarantine. The default value is Allow.  Changing from the default to Quarantine or Block will immediately effect all existing devices connected unless device access rules or individual allow/block list entries exist"

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

ID: 750a108a-2566-c322-30d2-4ed9743375db
Version Independent ID: eec9bb15-d3c2-ec66-5a1d-6669b20fe297
Content: Set-ActiveSyncOrganizationSettings (exchange)
Content Source: exchange/exchange-ps/exchange/devices/Set-ActiveSyncOrganizationSettings.md
Service: exchange-powershell
GitHub Login: @chrisda
Microsoft Alias: chrisda

@austinmccollum, OK. Done. Thanks for the feedback. Remember, you can make updates like this to topics yourself. See https://github.com/MicrosoftDocs/office-docs-powershell/blob/master/README.md.


Identifying Multiple Bean

Is it possible to identify which bean we are talking to when using BeanListener? For example, when we connect to multiple beans and use a single BeanListener - how do we know which Bean just got connected or disconnected etc..?

Hi @nirjon
Unfortunately there is no great way to connect to multiple beans using the same BeanListener.  I wrote a quick test that exercises this scenario which you can view in PR14. I think there might be some value in changing the API so that the Bean context is passed through to the BeanListener callbacks, but I will create a separate ticket for that.


CPP: Make NoSpaceForZeroTerminator.ql more conservative.

Make NoSpaceForZeroTerminator.ql more conservative by requiring evidence that the string pointer is a null-terminated string, rather than assuming that it is unless we find evidence that it isn't.  This results in fewer, more accurate results (for example it should solve https://github.com/Semmle/ql/issues/2363).
A few notes:

weirdly, I can't actually reproduce https://github.com/Semmle/ql/issues/2363 locally, so can't confirm that fix.
I experimented with a non-local dataflow version of the query that would report paths, but generally the results it found were local anyway and the paths weren't interesting.  I think I prefer sticking to the (simpler, cached, presumably faster) local dataflow version.  I still have the code for the other version if anyone wants a look.
we've lost quite a lot of results in the tests, this is because we don't model enough things as ArrayFunctions in the models library yet.  I will make a couple of follow-up PRs to address this and fix all-but-one of the lost results.

The qlformat test failed ;).

Fixed formatting.

Before on 85 projects: https://lgtm.com/query/2078753667316726369/
After on 85 projects: https://lgtm.com/query/4202308844687447219/
Performance is perhaps 10% better on the projects I've tested.  Results are more accurate:

more than anything else we lose a lot of FPs, most commonly base64/hex decoding or strings without null termination.  Some of these are done through function calls, others through char-by-char loop code.  We lost a FP in jbj/magicrescue ('string_init'). :)
we do lose some TPs as well
in the 85 projects above, there are actually no results for the new version of the query, but the only ones I think it should flag are two of the three results in videolan/vlc.  We should get these back if we model sscanf as an ArrayFunction.
the tests give me confidence that the query is behaving, but needs better models.

Those two results in modules/demux/subtitle.c of vlc are FPs. They get the space for \0 from the space that was used by the fixed-length prefix text that gets stripped.
That means we'll get those FPs back when adding an ArrayFunction model of sscanf, but that shouldn't stop us from doing it.


Adds that k8s will be upgraded when a cluster is upgraded

Authored-by: Todd Sedano<EMAIL_ADDRESS>

@professor Thanks!


Error 185 Can not Find color scheme when I use vimplug for install colorschemeS and set it in vimrc

I am using vim 8.2 without GUI in Linux Lubuntu 22.04
I did Plug Upgrade too by the way but nothing the same like before upgrade.
Issue: When I use vimplug for install color-schemes and I set that colo in vimrc I get the Error 185 vim can not find that colo when vim is loading, at start up of vim.
When I use another colo in vimrc and in vim I use :colo  D that colo is in list and load well.
The isuue is when the colorscheme is set in vimrc = E185 at vim-loading.

Please post your vimrc.
Make sure to load your color scheme after call plug#end(). See https://junegunn.github.io/vim-plug/faq/#where-should-i-put-plugin-configuration.

ahhhh your help is HELP. I realize that my colois before your vimplug lines.
I will do the changes and tell you how it was.
I use now simple colorschemes but I have 1 with folders and I will use it (named onehalf colorscheme) to try your help.
cross my fingers!
and of course Thank you very much


scrape: add options to manager to allow scraping at startup and shutdown

This change adds the following:

ScrapeOnShutdown option - when enabled will force a final scrape before tearing down
InitialScrapeOffset option - when set, all targets will be scraped at the defined offset

These options are useful for serverless flavours of the OTel collector that uses the scrape manager. In serverless environments, instances are short lived and we deploy the collector as a sidecar. Making sure the scraping is not sensitive to startup latencies is important - as is a guarantee that there will be atleast one scrape before the instance is killed.
Fixes https://github.com/prometheus/prometheus/issues/15359

@bwplotka had a previous attempt here: https://github.com/prometheus/prometheus/pull/12687
cc @ArthurSens this came up in our last sync, PTAL


Upgrade notify prerelease dependency 5.0.0-pre.15 -> 5.0.0

Bevy version: 8.1
bevy_asset relies on a pre-release for notify, which creates dependency conflicts when using bevy in projects that also have a notify dependency.
It seems to be the only pre-release dependency in the bevy codebase, and AFIK we can't use dependency renaming to use prerelease versions alongside releases. The result is that I have been unable to publish my crate which depends on both bevy and notify, even using the prerelease version.
Let me know you'd like me to create a PR with the changes.

a PR to update notify would be most welcomed 🙂

gah! i was on the 8.1 branch! sorry, its already been done.


Uncaught TypeError: Cannot read property 'call' of undefined

I get the following error after an npm install (@1.5.3) (in the browser code i.e., the build goes through fine)
Uncaught TypeError: Cannot read property 'call' of undefined
2.2.js.map:1 GET http://.../static/build/2.2.js.map 404 (Not Found)

The error line is
/******/        // Execute the module function
/******/        modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

Module ID 172.
The state reveals the following... what am I missing?
"id": 172,
"identifier": "/pathtorepo/js/components/pages /^\\.\\/.*$/",
"name": "./js/components/pages ^\\.\\/.*$",
"size": 3656,
"cacheable": true,
"built": true,

My async loads look like this:
               require(['../components/pages/' + pathtocomp], function(Comp) {
                     // stuff
                });

Curiously adding commons chunk plugin (and then removing it) fixes it... :s

Are you deliberately using a dynamic require()? That's not directly causing this issue, but may somehow be related.
Dynamic requires will not be supported by ES6 modules.

@jhnns Yes I am. That is my router component pulling in components based on routes. (Currently it just makes one giant 2nd file with all the pages)

Dynamic requires will not be supported by ES6 modules.

They will. System.load("./templates/" + name).then(...)

@jhnns, see section 8. The ECMAScript 6 module loader API in the post you link to :)

But, strictly speaking, it is not a part of ES6 anymore

Yep, that's true. It's not part of ES6 modules.
There are use-cases where dynamic module loading is useful or even necessary. That's mostly the "main" module use-case: Some sort of initialization script that decides which part of the application should be executed next (I call those "init modules"). They usually just consume modules but don't export anything. And as far as I'm understanding it they will not be able to export properties dynamically.
However, I think for most cases it's best practice to avoid dynamic dependencies where possible.

I have same issue with dynamic require. It started to appear when I've migrated to Babel 6.

Same thing happens in here.
"However, I think for most cases it's best practice to avoid dynamic dependencies where possible."
Why support it if it's discouraged?

Why support it if it's discouraged?

If you know how to use it, it can be a very elegant solution in some cases :grin:. But I agree that it should not be enabled by default. But that's another discussion I had with @sokra a while back ago.

HI All
Just for information, I founf that this error it is a bit misleading, it is not a bug but the way how you build your common chunks. please refer to
this works for me
entry: {
    tradeReporting: './app/tradeReporting/main.ts',
    admin: './app/admin/main.ts',
    polyfills: './app/lib/polyfill.ts'
},
output: { path: './app/lib', filename: '[name]Bundle.js', chunkFilename: "[id].chunk.js" },
resolve: { extensions: ['', '.ts', '.js'] },
plugins: [
     new webpack.optimize.CommonsChunkPlugin({ names: ["vendor", "polyfills"], minChunks: 2 }),

https://github.com/webpack/webpack/tree/master/examples/multiple-commons-chunks
or
https://github.com/webpack/webpack/tree/master/examples/common-chunk-and-vendor-chunk

I am having issues with this, specifically when I add the commonschunkplugin to my config. My guess is the problem has to do with using the commonschunkplugin along with the Dll stuff for loading my vendor files. I run into errors when an angular function is called (which is in my vendor dll). Here is my config:
var path = require('path');
var webpack = require('webpack');
var CopyWebpackPlugin = require('copy-webpack-plugin');

module.exports = {
    resolve: {
        modules: [path.resolve(__dirname, '/src'), 'node_modules/'],
        descriptionFiles: ['package.json'],
        mainFields: ['main'],
        extensions : ['', '.js', '.ts'],
        moduleExtensions: ['-loader']
    },
    entry: {
        main: './src/app/main.ts',
        polyfills: './src/polyfills.ts',
        login: './src/login/main.ts',
        styleguide: './src/styleguide/main.ts',
        'component-sample': './src/component-sample/main.ts'
    },
    output: {
        path: path.join(__dirname, 'dist'),
        filename: '[name].js',
        publicPath: '/'
    },
    //Tells webpack to ignore dependencies on node backend modules
    node: {
        fs: 'empty',
        child_process: 'empty'
    },
    module: {
        loaders: [
            {
                test: /\.ts$/,
                loaders: ['ts?configFileName=./src/tsconfig.json', 'angular2-template-loader']
            },
            {
                test: /\.scss$/,
                exclude: /node_modules/,
                loader: 'raw!sass'
            },
            {
                test: /\.html$/,
                exclude: /node_modules/,
                loader: 'raw'
            },
            //json loader is for a few node_modules
            {
                test: /\.json$/,
                loader: 'json'
            }
        ]
    },
    plugins: [
        new CopyWebpackPlugin([
            { from: 'public' }
        ]),
        new webpack.optimize.CommonsChunkPlugin({
            name: 'common',
            minChunks: 2
        }),
        new webpack.DllReferencePlugin({
            context: __dirname,
            manifest: require('./dist/vendor-manifest.json')
        })
    ]
};

I also ran into this.
dll__vendor.js:21 Uncaught TypeError: Cannot read property 'call' of undefined__webpack_require__ @ dll__vendor.js:21(anonymous function) @ _isIterateeCall.js_from_dll-reference_DLL_vendor:1(anonymous function) @ app.js:2077__webpack_require__ @ vendor.js:686fn @ vendor.js:111(anonymous function) @ _createAssigner.js:1(anonymous function) @ app.js:1459__webpack_require__ @ vendor.js:686fn
Stack trace snippet above. If I do a simple reload in the browser it errors out, however if I do a hard reload that clears caches too, it works fine and HRM latches on. Aka. [HMR] connected
Anyone with any news on this? Or anyone who can help me shed some light on this please? I can also put in my config if that would be of any help. It's just a little more complex as I have a universal react app with isomorphic-web-tools. Maybe @acostaf ? I saw what you posted there but I'm not entirely certain I can reproduce your result :(

I get this issue with dynamic requires if I remove the es2015 Babel preset.

I'm stuck with this using 1.13.2 and 1.14.0.
It came up when I added a second instance of the CommonsChunkPlugin.
    new webpack.optimize.CommonsChunkPlugin({
      names: ['desktop/vendor', 'desktop/manifest'],
      filename: '[name].[hash].js',
      chunks: [
        'desktop/post-display',
        'desktop/post-list',
        'desktop/blog-display',
        'desktop/blog-list',
        'desktop/contact',
        'desktop/search'
      ]
    }),

    new webpack.optimize.CommonsChunkPlugin({
      names: ['mobile/vendor', 'mobile/manifest'],
      filename: '[name].[hash].js',
      chunks: [
        'mobile/post-display',
        'mobile/post-list',
        'mobile/blog-display',
        'mobile/blog-list',
        'mobile/contact',
        'mobile/search'
        ]
    }),

I fix this problem after remove manifest config under:
config.plugins.push(new CommonsChunkPlugin({names: ['commons', 'manifest']}));

But Is still not know the reason.

@Pines-Cheng:  it worked for me as well. It would be nice to know what happened and how to get the manifest back :)

We're seeing this issue too on our website and have absolutely no idea what's going on!
node: v6.11.2
npm: 5.5.1
Only started happening when we moved to Webpack 3. We've since rolled back to Webpack 1.
Our webpack 3 config:
import webpack from 'webpack';
import CleanWebpackPlugin from 'clean-webpack-plugin';
import { join } from 'path';
import config from 'config';
import applications from './lib/applications';

const { ContextReplacementPlugin, DefinePlugin, ProgressPlugin, optimize: { UglifyJsPlugin } } = webpack;

const { version } = require('./package.json');

const appName = config.get('machineTitle');
const plugins = [
  new CleanWebpackPlugin('chunks', {
    root: join(__dirname, 'static', 'generated')
  }),
  new ContextReplacementPlugin(/moment[\/\\]locale$/, /en/),
  new ProgressPlugin({ profile: false })
];
!!config.get('webpack.uglify') && plugins.push(
  new UglifyJsPlugin({
    compress: {
      warnings: config.get('webpack.uglify.warnings')
    },
    sourceMap: config.get('webpack.uglify.sourceMap')
  })
);
!!config.get('webpack.production') && plugins.push(
  new DefinePlugin({
    'process.env': {
      NODE_ENV: JSON.stringify('production')
    }
  })
);

export default {
  devtool: config.get('webpack.devtool'),
  entry: applications.reduce((entries, application) => {
    entries[application] = `./applications/${application}/browser.js`;
    return entries;
  }, {}),
  output: {
    path: `${__dirname}/static`,
    publicPath: `${config.get('app.assetPath')}`,
    filename: join('generated', `${appName}-[name].js`),
    pathinfo: !!config.get('webpack.devtool'),
    chunkFilename: join('generated', 'chunks', `${appName}-[name]-${version}.js`)
  },
  module: {
    rules: [
      {
        test: /\.js$/,
        exclude: [
          /node_modules/,
          /NBCD_AppMeasurement/
        ],
        loader: 'babel-loader',
        options: {
          presets: [['env', {
            modules: false,
            loose: true,
            targets: {
              browsers: ['last 2 versions', 'safari >= 7', 'ie >= 10']
            }
          }
        ], 'stage-0'],
        }
      },
      {
        test: /utils\/polyfill/,
        loader: 'imports-loader?this=>window'
      }
    ]
  },
  node: {
    net: 'empty',
    dns: 'empty',
    fs: 'empty',
    process: 'mock'
  },
  resolve: {
    alias: {
      'config': join(__dirname, '/webpack-alias/config.js'),
      'park-logger': join(__dirname, '/webpack-alias/park-logger.js')
    }
  },
  plugins
};

I'm facing exactly the same issue.
Error
bootstrap.js?v=vJAQuzJXo8majfJ7MXsDnns6bDpu2s1GcWBw0OPEvWA:1 Uncaught TypeError: Cannot read property 'call' of undefined
    at n (bootstrap.js?v=vJAQuzJXo8majfJ7MXsDnns6bDpu2s1GcWBw0OPEvWA:1)
    at Object.<anonymous> (main-client.bundle.js?v=f9OVGR1j914khV3Yj4QjuPaV3nJ2AnOTkETKRsolJhM:45)
    at n (bootstrap.js?v=vJAQuzJXo8majfJ7MXsDnns6bDpu2s1GcWBw0OPEvWA:1)
    at window.webpackJsonp (bootstrap.js?v=vJAQuzJXo8majfJ7MXsDnns6bDpu2s1GcWBw0OPEvWA:1)
    at main-client.bundle.js?v=f9OVGR1j914khV3Yj4QjuPaV3nJ2AnOTkETKRsolJhM:1

Config (as merged from a common and prod-config)
console.log("----> Production");
var webpack = require("webpack");
var webpackMerge = require('webpack-merge');
var ExtractTextPlugin = require("extract-text-webpack-plugin"); // plugin is configured in common
var commonConfig = require('./webpack.common.js');
var helpers = require('./helpers');
var path = require('path');
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
var CopyWebpackPlugin = require("copy-webpack-plugin");

// this config is the result of a merge from commonConfig and this config.
// for sake of demonstration, I've merged the two configurations into one file here.
// Original line was:
// var clientBundleConfig = webpackMerge.smart(commonConfig, {
var clientBundleConfig = {
    resolve: {
        extensions: ['.js', '.ts'],
        modules: [
            helpers.root('app'),
            helpers.root('node_modules')
        ]
    },

    entry: {
        'main-client': helpers.root('app', 'boot-client.ts'),
        'loading-splash': helpers.root('app', 'loading-splash', 'loading-splash.scss'),
    },

    output: {
        path: helpers.root('wwwroot', 'dist'),
        publicPath: '/dist/', // Webpack dev middleware, if enabled, handles requests for this URL prefix
        filename: '[name].bundle.js' // asp.net core does cache busting and we don't have a static HTML as entry point: <script src="~/dist/…" asp-append-version="true"></script>
    chunkFilename: '[id].[chunkhash].chunk.js' // for caching/cache-busting
    },

    module: {
        rules: [
            /* from common config */
            {
                test: /\.ts$/,
                include: [
                    helpers.root('app')
                ],
                use: [
                    {
                        loader: "ng-router-loader" // must be first in list
                    },
                    {
                        loader: 'awesome-typescript-loader'
                    },
                    {
                        loader: 'angular2-template-loader'
                    },
                ]
            },
            {
                test: /\.html$/, // mostly angular templates
                include: [
                    helpers.root('app')
                ],
                use: [
                    {
                        loader: 'html-loader',
                        options: {
                            ignoreCustomFragments: [/\{\{.*?}}/],
                            // root: helpers.root(),
                            root: helpers.root('app'),
                            attrs: ['img:src', 'link:href'],

                            // https://github.com/webpack-contrib/html-loader/issues/67
                            minimize: true,
                            removeComments: true,
                            collapseWhitespace: true,

                            removeAttributeQuotes: false,
                            keepClosingSlash: true,
                            caseSensitive: true,
                            conservativeCollapse: true
                        }
                    }
                ]
            },
            {
                test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)(\?.*$|$)/,
                include: [
                    helpers.root('app')
                ],
                use: [
                    {
                        loader: 'file-loader',
                        options: {
                            name: "assets/[name].[hash].[ext]"
                        }
                    }
                ]
            },
            {
                test: /\.scss$/,
                include: [
                    helpers.root('app')
                ],
                exclude: [
                    helpers.root("app", "loading-splash")
                ],
                use: [
                    {
                        loader: 'to-string-loader'
                    },
                    {
                        loader: 'css-loader'
                    },
                    {
                        loader: 'resolve-url-loader'
                    },
                    {
                        loader: 'sass-loader',
                        options: {
                            sourceMap: true,
                            outputStyle: "expanded"
                        }
                    }
                ]
            },
            {
                test: /\.scss$/,
                include: [
                    helpers.root("app", "loading-splash")
                ],
                use: ExtractTextPlugin.extract({
                    use: [{
                            loader: 'css-loader'
                        },
                        {
                            loader: 'resolve-url-loader'
                        },
                        {
                            loader: 'sass-loader',
                            options: {
                                sourceMap: true,
                                outputStyle: "expanded"
                            }
                        }
                    ]
                })
            },
            {
                test: /\.css$/,
                include: [
                    helpers.root('app')
                ],
                use: [
                    {
                        loader: 'to-string-loader'
                    },
                    {
                        loader: 'css-loader'
                    },
                    {
                        loader: 'resolve-url-loader'
                    }
                ]
            }
            /* from prod config */
            {
                test: /\.ts$/,
                include: [
                    helpers.root('node_modules')
                ],
                use: [
                    {
                        loader: "ng-router-loader" // must be first in list
                    },
                    {
                        loader: 'awesome-typescript-loader'
                    },
                    {
                        loader: 'angular2-template-loader'
                    }
                ]
            },
            {
                test: /\.html$/, // mostly angular templates
                include: [
                    helpers.root('node_modules')
                ],
                use: [
                    {
                        loader: 'html-loader',
                        options: {
                            ignoreCustomFragments: [/\{\{.*?}}/],
                            // root: helpers.root(),
                            root: helpers.root('app'),
                            attrs: ['img:src', 'link:href'],

                            // https://github.com/webpack-contrib/html-loader/issues/67
                            minimize: true,
                            removeComments: true,
                            collapseWhitespace: true,

                            removeAttributeQuotes: false,
                            keepClosingSlash: true,
                            caseSensitive: true,
                            conservativeCollapse: true
                        }
                    }
                ]
            },
            {
                test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)(\?.*$|$)/,
                include: [
                    helpers.root('node_modules')
                ],
                use: [
                    {
                        loader: 'file-loader',
                        options: {
                            name: "assets/[name].[hash].[ext]"
                        }
                    }
                ]
            },
            {
                test: /\.scss$/,
                include: [
                    helpers.root('node_modules')
                ],
                use: [
                    {
                        loader: 'to-string-loader'
                    },
                    {
                        loader: 'css-loader'
                    },
                    {
                        loader: 'resolve-url-loader'
                    },
                    {
                        loader: 'sass-loader',
                        options: {
                            sourceMap: true, // required by resolve-url-loader
                            outputStyle: "expanded"
                        }
                    }
                ]
            },
            {
                test: /\.css$/,
                include: [
                    helpers.root('node_modules')
                ],
                use: [
                    {
                        loader: 'to-string-loader'
                    },
                    {
                        loader: 'css-loader'
                    },
                    {
                        loader: 'resolve-url-loader'
                    }
                ]
            }
        ]
    },
    plugins: [
        /* from common */

        new ExtractTextPlugin({
            filename: "[name].css", // cache-busted by asp-append-version
        }),

        // …many uses of CopyWebpackPlugin here… (for things outside our control which use hardcoded strings)

        /* from prod */

        // Makes no difference if this is used or not (well, except for caching)
        // new webpack.HashedModuleIdsPlugin(),

        new webpack.optimize.CommonsChunkPlugin({
            async: "used-twice",
            minChunks: (module, count) => count >= 2,
        }),

        new webpack.optimize.CommonsChunkPlugin({
            names: ["main-client"],
            // the name or list of names must match the name or names
            // of the entry points that create the async chunks

            children: true,
            // (use all children of the chunk)

            async: true,
            // (create an async commons chunk)

            minChunks: 3,
            // (3 children must share the module before it's separated)
        }),

        /* chunk optimisation (reuse & size) */

        // devextreme-angular
        new webpack.optimize.CommonsChunkPlugin({
            chunks: ["main-client"],
            name: "devextreme-angular-chunk",
            async: "devextreme-angular.chunk.js",
            minChunks: (module) => module.resource && /node_modules[\x5c/]devextreme-angular/.test(module.resource)
        }),

        // @angular
        new webpack.optimize.CommonsChunkPlugin({
            chunks: ["main-client"],
            name: "angular-chunk",
            async: "angular.chunk.js",
            minChunks: (module) => module.resource && /node_modules[\x5c/]@angular/.test(module.resource)
        }),

        // @swimlane
        new webpack.optimize.CommonsChunkPlugin({
            chunks: ["main-client"],
            name: "swimlane-chunk",
            async: "swimlane.chunk.js",
            minChunks: (module) => module.resource && /node_modules[\x5c/]@swimlane/.test(module.resource)
        }),

        // devextreme
        new webpack.optimize.CommonsChunkPlugin({
            chunks: ["main-client"],
            name: "devextreme-chunk",
            async: "devextreme.chunk.js",
            minChunks: (module) => module.resource && /node_modules[\x5c/]devextreme[\x5c/](?!ui)/.test(module.resource)
        }),

        // devextreme/ui
        new webpack.optimize.CommonsChunkPlugin({
            chunks: ["main-client"],
            name: "devextreme-ui-chunk",
            async: "devextreme-ui.chunk.js",
            minChunks: (module) => module.resource && /node_modules[\x5c/]devextreme[\x5c/]ui/.test(module.resource)
        }),

        // table-editor
        new webpack.optimize.CommonsChunkPlugin({
            chunks: ["main-client"],
            name: "table-editor-chunk",
            async: "table-editor.chunk.js",
            minChunks: (module) => module.resource && /app[\x5c/]table-editor/.test(module.resource)
        }),

        // dashboard
        new webpack.optimize.CommonsChunkPlugin({
            chunks: ["main-client"],
            name: "dashboard-chunk",
            async: "dashboard.chunk.js",
            minChunks: (module) => module.resource && /app[\x5c/]dashboard/.test(module.resource)
        }),

        // widget-editor
        new webpack.optimize.CommonsChunkPlugin({
            chunks: ["main-client"],
            name: "widget-editor-chunk",
            async: "widget-editor.chunk.js",
            minChunks: (module) => module.resource && /app[\x5c/]widget-editor/.test(module.resource)
        }),

        /* Webpack bootstrap */
        new webpack.optimize.CommonsChunkPlugin({
            name: "bootstrap",
            filename: "bootstrap.js",
            minChunks: Infinity
        }),

        // Analyse bundles so that we can optimise them better.
        new BundleAnalyzerPlugin({
            // Can be `server`, `static` or `disabled`.
            // In `server` mode analyzer will start HTTP server to show bundle report.
            // In `static` mode single HTML file with bundle report will be generated.
            // In `disabled` mode you can use this plugin to just generate Webpack Stats JSON file by setting `generateStatsFile` to `true`.
            analyzerMode: 'static',
            // Host that will be used in `server` mode to start HTTP server.
            // analyzerHost: '<IP_ADDRESS>',
            // Port that will be used in `server` mode to start HTTP server.
            // analyzerPort: 8888,
            // Path to bundle report file that will be generated in `static` mode.
            // Relative to bundles output directory.
            reportFilename: 'webpack-report.html',
            // Module sizes to show in report by default.
            // Should be one of `stat`, `parsed` or `gzip`.
            // See "Definitions" section for more information.
            defaultSizes: 'parsed',
            // Automatically open report in default browser
            openAnalyzer: false, // because build server
            // If `true`, Webpack Stats JSON file will be generated in bundles output directory
            generateStatsFile: false,
            // Name of Webpack Stats JSON file that will be generated if `generateStatsFile` is `true`.
            // Relative to bundles output directory.
            statsFilename: 'stats.json',
            // Options for `stats.toJson()` method.
            // For example you can exclude sources of your modules from stats file with `source: false` option.
            // See more options here: https://github.com/webpack/webpack/blob/webpack-1/lib/Stats.js#L21
            statsOptions: null,
            // Log level. Can be 'info', 'warn', 'error' or 'silent'.
            logLevel: 'info'
        }),

        new webpack.optimize.UglifyJsPlugin({
            // do not deploy sources on prod
            // sourceMap: true
        }),

    ]
});

module.exports = [clientBundleConfig];

I have had no success with not extracting the webpack bootstrap/manifest. I then get the same error bust just with my main bundle instead.
main-client.bundle.js?v=rMAF2anNhu5rj3HaCRKXNp0--rAcST082pzrKofuvNM:1 Uncaught TypeError: Cannot read property 'call' of undefined
    at e (main-client.bundle.js?v=rMAF2anNhu5rj3HaCRKXNp0--rAcST082pzrKofuvNM:1)
    at Object.<anonymous> (main-client.bundle.js?v=rMAF2anNhu5rj3HaCRKXNp0--rAcST082pzrKofuvNM:45)
    at e (main-client.bundle.js?v=rMAF2anNhu5rj3HaCRKXNp0--rAcST082pzrKofuvNM:1)
    at main-client.bundle.js?v=rMAF2anNhu5rj3HaCRKXNp0--rAcST082pzrKofuvNM:1
    at main-client.bundle.js?v=rMAF2anNhu5rj3HaCRKXNp0--rAcST082pzrKofuvNM:1

+1

It is very old issue and we have a lot of difference problems here, it is difficult to help here. Closing. Feel free to open new issue with minimum reproducible test repo. Thanks!


Add clusteradm instruction

Signed-off-by: Dominique Vernier<EMAIL_ADDRESS>

I know I said use 1. 2. in slack but after looking at the page rendered, it makes it look like step 1 and then step 2. How about the below:
I will slack you the actual code. We should probably get the doc team to look at it as well. I will link this issue in the doc defect when we are ready.

I might be a little early on this one, but a couple of comments:
Use either of the following methods to bootstrap your Open Cluster Management environment:

Clusteradn CLI tool
OperatorHub

Clusteradm CLI tool
Run the following command to bootstrap your Open Cluster Management environment by using the CLI:
clusteradm.init

For more details, see the clusteradm GitHub page.
OperatorHub

Install and create a cluster manager on your hub cluster.
Install and create a klusterlet agent on your managed cluster.

For more details, see Core components.
CD The link to Core components is sending me a 404.

The link to Core components is sending me a 404.

Thanks for the review. You have to clone the repo locally and make server then browse to http://localhost:1313/ to check the links is working properly or not. It's using the hugo framework to render the webpage so just using an IDE's preview md to click the links might not work properly. The hugo framework will take care of the linkage after it builds. For example, after build it becomes like this https://github.com/open-cluster-management-io/open-cluster-management-io.github.io/blob/gh-pages/getting-started/quick-start/index.html#L241-L243

The original idea was to have all platforms method for download, but then we decided to have just a light how to join explanation here and the full explanation in the GitHub readme as not necessarily all user will pass by this website and we didn't want to maintain 2 locations for the quick-start (this website and the readme)

/approve
@mikeshng leave lgtm to you

I think we should adjust the review feedback for https://github.com/open-cluster-management-io/open-cluster-management-io.github.io/pull/90#discussion_r657156553 and we should be good to go

/lgtm


FastAPI - restApi is not database async?

First Check

[X] I added a very descriptive title to this issue.
[X] I used the GitHub search to find a similar issue and didn't find it.
[X] I searched the FastAPI documentation, with the integrated search.
[X] I already searched in Google "How to X in FastAPI" and didn't find any information.
[X] I already read and followed all the tutorial in the docs and didn't find an answer.
[X] I already checked if it is not related to FastAPI but to Pydantic.
[X] I already checked if it is not related to FastAPI but to Swagger UI.
[X] I already checked if it is not related to FastAPI but to ReDoc.

Commit to Help

[X] I commit to help with one of those options 👆

Example Code
#crud.py:

from sqlalchemy.orm import Session

from fastapi_restapi import models, schemas
from sqlalchemy.sql import func

def get_all_students_from_db(db: Session):
    return db.query(models.Students).all()

#-------------------------------------------------
#database.py:

import os

from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker

the_db_address = os.getenv("DB_ADDRESS").replace("'", "")
the_db_port = os.getenv("DB_PORT").replace("'", "")
the_db_user = os.getenv("DB_USER").replace("'", "")
the_db_password = os.getenv("DB_PASSWORD").replace("'", "")
the_database_to_use = os.getenv("WOIT_DATA_DB").replace("'", "")

complete_sql_string = the_db_user + ":" + the_db_password + "@" + the_db_address + "/" +the_database_to_use

SQLALCHEMY_DATABASE_URL = "mysql+pymysql://" + complete_sql_string

engine = create_engine(SQLALCHEMY_DATABASE_URL)

SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)

SessionLocal_async = sessionmaker(autocommit=True, autoflush=True, bind=engine)

Base = declarative_base()

def normal_DB():
    try:
        db = SessionLocal()
        yield db
    finally:
        db.close()

def async_DB(): #used for always having new data available
    try:
        db = SessionLocal_async()
        yield db
    finally:
        db.close()
#-------------------------------------------------
#main.py:
from fastapi.middleware.cors import CORSMiddleware
from sqlalchemy.orm import Session

from fastapi_restapi import models, schemas, crud

from .database import engine, normal_DB, async_DB
import asyncio
from fastapi import FastAPI, HTTPException, Security
from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer

models.Base.metadata.create_all(bind=engine)

async def get_all_the_students(db: Session = next(async_DB())):
    while True:
        await asyncio.sleep(10)
        all_studs = crud.get_all_students_from_db(db)
        for i in all_studs:
            print(i.student_name)
            #tim
            #rick
            #anna

students_from_db = asyncio.ensure_future(get_all_the_students())

Description
I thought this problem was solved, but its not..
Because of large amount of data inside the db, im planning to store some of it on the server.
The function inside main.py "pokes" the the DB each 10 seconds, and gets the data, which works fine, and i can see it, like this:
tim
rick
anna
But if some changes are made inside the DB, the server keeps poking the DB again, but i can not see the changes? Lets say i change the name "tim" to "jonny", then then the server pokes the DB again after 10 sec i still see this:
tim
rick
anna
Is there anyone here who can help solving this issue?
Operating System
Linux
Operating System Details
Linux ubuntu , and the restAPI is up and running using docker
FastAPI Version
0.68.0
Python Version
3.8
Additional Context
No response

This isn't a FastAPI issue.
first of all:
db: Session = next(async_DB())
"async_DB" is sync, and so you you are only using the one session from when the get_all_the_students function was initially running. It hasn't closed, thus it hasn't committed - or flushed the connection, and you're still getting the old data.

You're not setting up an async Session. Simply naming it that won't magically make it async ;)
You need to use the actual AsyncSession class and AsyncEngine as well. See the SQLAlchemy documentation for details: https://docs.sqlalchemy.org/en/14/orm/extensions/asyncio.html

This isn't a FastAPI issue.
first of all:
db: Session = next(async_DB())
"async_DB" is sync, and so you are only using the one session from when the get_all_the_students coroutine was initially running. It hasn't closed, thus it hasn't committed - or flushed the connection, and you're still getting the old data.

My apologies then, I have seen some example were people use db: Sesssion in their fastApi codes, so i thought i was a part of this :)

You're not setting up an async Session. Simply naming it that won't magically make it async ;)
You need to use the actual AsyncSession class and AsyncEngine as well. See the SQLAlchemy documentation for details on how to set this all up: https://docs.sqlalchemy.org/en/14/orm/extensions/asyncio.html
You also should define db: Session as a dependency, as described in the docs.

Thank you so much for information. I may close this issue then :)


Error when starting proxy device: bind: address already in use

Required information

Distribution: Ubuntu
Distribution version: 18.04.5 LTS
The output of "lxc info" or if that fails:

Kernel version: 4.15.0-112-generic
LXC version: 4.5
LXD version: 4.5
Storage backend in use: zfs

Issue description
We restart some of our containers over night for backup purposes. Some of them did not start again because of this error:
root@server:~# lxc start test
Error: Error occurred when starting proxy device: Error: Failed to listen on <IP_ADDRESS>:2227: listen tcp <IP_ADDRESS>:2227: bind: address already in use
Try `lxc info --show-log test` for more info

lxc info --show-log test shows this:
lxc test<PHONE_NUMBER>3103.967 WARN     cgfsng - cgroups/cgfsng.c:mkdir_eexist_on_last:1152 - File exists - Failed to create directory "/sys/fs/cgroup/cpuset//lxc.monitor.test"
lxc test<PHONE_NUMBER>3103.967 WARN     cgfsng - cgroups/cgfsng.c:mkdir_eexist_on_last:1152 - File exists - Failed to create directory "/sys/fs/cgroup/cpuset//lxc.payload.test"
lxc test<PHONE_NUMBER>3103.968 ERROR    utils - utils.c:lxc_can_use_pidfd:1834 - Kernel does not support pidfds
lxc test<PHONE_NUMBER>3110.396 WARN     network - network.c:lxc_delete_network_priv:3185 - Failed to rename interface with index 2 from "eth0" to its initial name "veth602b439a"

And indeed the port is already in use:
root@server:~# netstat -tlnp | grep 2227
tcp6       0      0 :::2227                 :::*                    LISTEN      5451/lxd

Beforehand I created a proxy:
root@server:~# lxc config device show test
SSH:
  connect: tcp:<IP_ADDRESS>:22
  listen: tcp:<IP_ADDRESS>:2227
  type: proxy
eth0:
  ipv4.address: <IP_ADDRESS>
  name: eth0
  nictype: bridged
  parent: lxdbr0
  type: nic

Now the proxy seems to be stuck. How can I stop it? And how can I avoid this issue in the future?

Okay, I figured out how to make it work again.
I found some forkproxy processes which I was able to kill. After that the containers started again.
In #7751 I saw the assumption for too less free space available on the device for PID files. I can not confirm that on my side. My ZFS pool has 2,21 TB free space available. And only some loop devices are 100% in use, but that should be normal.
root@server:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev             32G     0   32G   0% /dev
tmpfs           6,3G   20M  6,3G   1% /run
/dev/md1         20G   16G  2,7G  86% /
tmpfs            32G     0   32G   0% /dev/shm
tmpfs           5,0M     0  5,0M   0% /run/lock
tmpfs            32G     0   32G   0% /sys/fs/cgroup
/dev/loop1       55M   55M     0 100% /snap/core18/1880
/dev/md0        969M  144M  759M  16% /boot
lxd/home        2,4T  179G  2,3T   8% /home
tmpfs           1,0M     0  1,0M   0% /var/snap/lxd/common/ns
tmpfs           6,3G     0  6,3G   0% /run/user/0
/dev/loop4       56M   56M     0 100% /snap/core18/1885
/dev/loop2       97M   97M     0 100% /snap/core/9804
/dev/loop9       24M   24M     0 100% /snap/bashtop/128
/dev/loop10      98M   98M     0 100% /snap/core/9993
/dev/loop11      24M   24M     0 100% /snap/bashtop/134
/dev/loop12      73M   73M     0 100% /snap/lxd/17147
/dev/loop7       69M   69M     0 100% /snap/lxd/17280

I will wait and check if the same thing happens tonight. If it does not happen again, we can close this issue I guess.

@NicolasGoeddel  did this show up again?

No.

I got the exact same problem today. Manually killing forkproxy got me starting the machines again.

This happened to me as well. Killing the single forkproxy process associated with the device configuration attached to my instance allowed me to re-bind with the same device config.
This was the device I was trying to re-add
lxc config device add nearhan nearhanssh0 proxy listen=tcp:<IP_ADDRESS>:42022 connect=tcp:<IP_ADDRESS>:22 bind=host

This was originally a part of the container config, but a restart of the container failed with
lxc start nearhan
Error: Error occurred when starting proxy device: Error: Failed to listen on <IP_ADDRESS>:42022: listen tcp <IP_ADDRESS>:42022: bind: address already in use

The original configuration
#lxc config device show nearhan
nearhanssh0:   # had to remove this, kill forkproxy, and add it back
  bind: host
  connect: tcp:<IP_ADDRESS>:22
  listen: tcp:<IP_ADDRESS>:42022
  type: proxy
proxy0:
  connect: tcp:<IP_ADDRESS>:7420
  listen: tcp:<IP_ADDRESS>:7420
  type: proxy

Is this reproducible using LXD 4.8? Thanks

It's reproducible for me in 4.0.4 on ubuntu 20.04
Add the proxy, then reboot container, it won't start. Upon removing the proxy from the container the forkproxy process is still running, so cannot add the proxy back. The only fix seems to kill the orphaned process

@lcherone Hi, I've not managed to recreate this using LXD 4.0.4, see below:
apt install snapd -y; snap install lxd --channel=4.0/stable
lxd init --auto
lxc launch images:ubuntu/focal c1
lxc config device add c1 p1 proxy listen=tcp:<IP_ADDRESS>:1234 connect=tcp:<IP_ADDRESS>:1234
lxc shell c1
 reboot
lxc ls
ss -tlpn | grep lxd
LISTEN  0       4096                      <IP_ADDRESS>:1234          <IP_ADDRESS>:*      users:(("lxd",pid=2905,fd=8),("lxd",pid=2905,fd=3))

Please can you enable debug logging and then show the output when you attempt to restart an instance with a proxy:
sudo snap set lxd daemon.debug=true; sudo systemctl reload snap.lxd.daemon
sudo tail -f /var/snap/lxd/common/lxd/logs/lxd.log

@lcherone Hi, I've not managed to recreate this using LXD 4.0.4, see below:
apt install snapd -y; snap install lxd --channel=4.0/stable
lxd init --auto
lxc launch images:ubuntu/focal c1
lxc config device add c1 p1 proxy listen=tcp:<IP_ADDRESS>:1234 connect=tcp:<IP_ADDRESS>:1234
lxc shell c1
 reboot
lxc ls
ss -tlpn | grep lxd
LISTEN  0       4096                      <IP_ADDRESS>:1234          <IP_ADDRESS>:*      users:(("lxd",pid=2905,fd=8),("lxd",pid=2905,fd=3))

Please can you enable debug logging and then show the output when you attempt to restart an instance with a proxy:
sudo snap set lxd daemon.debug=true; sudo systemctl reload snap.lxd.daemon
sudo tail -f /var/snap/lxd/common/lxd/logs/lxd.log


ASP.NET Core differences within and outside Service Fabric

Service Fabric Runtime Version:
4.2.445
Environment: Must be one of these values [Standalone OR Azure OR OneBox/Dev cluster]
OneBox/Dev Cluster
Description
I'm finding that aspects of ASP.NET Core 5.0 execute differently when running within Service Fabric than not and it's not clear why. I've got a months-long support ticket<PHONE_NUMBER>00687) open showing Blazor authentication working outside of SF and when importing the same project into a stateless ASP.NET Core project, it fails to authenticate.
In an attempt to see if I could get this to work with another identity provider (I'm using Auth0 in this case), I cloned a sample repository offered by Auth0 that runs as a standalone ASP.NET Core project. I've made a few tweaks to it as it didn't work out of the box, but it can be cloned from https://github.com/WhitWaldo/nonsf-auth0. Load the project in /QuizManager, set the apporopriate identity provider values in appsettings.json and start it up. It will show a simple Blazor server-side page that indicates you're not logged in. Open your network developer tools, preserve the log and click Log In at the top. You'll find yourself redirected to the identity provider's login page. Let's take a look at the network requests so we know what we're expecting to see (my ports will vary from yours because of the fake HTTPS endpoint used).

First, a request is made to https://localhost:44363/login?redirectUri=/. The response points back via a 302 to my identity provider's instance domain along with parameters identifying the client and whatnot.
The next request is a GET made to the identity provider's page as noted in the location header in the last response. It points to another redirect to a different path, still on the IdP's domain.
Finally, we're there and we can log in. We don't actually need to authenticate for what I'm seeking to demonstrate through.

Let's now turn to what happens in the SF application. You can clone the repo I've got for this at https://github.com/WhitWaldo/sf-auth0 This project is identical to the other one except that I've dropped the "quiz" functionality. Clone this, set the IdP parameters in Web1/PackageRoot/Config/Settings.xml where indicated. Start debugging and you'll see we're at the same sort of Blazor server-side page if you navigate to https://localhost:9013 (your port should match in this case). You're not logged in, so open your network developer tools, preserve the log and click Log In at the top once again. This time you'll see the page flicker and appear to refresh and see exactly what you were looking at a moment ago (still not logged in).
If we look at the network requests, we'll see that they vary somewhat:

First, a request is made to https://localhost:9013/login?redirectUrl=/ as before. Instead of pointing to the login page at the IdP, this oddly instead points
The redirect points instead to the logout path for some reason. This is followed and the user is logged out.

Why the difference? I've run kdiff against either directory and apart from spacing/tab usage, there appears to be no distinction between either project except that it works as it should outside of SF and fails to work inside SF. Any ideas?
OS(Windows/Linux):
Windows
If this is a regression, which version did it regress from?
Never gotten Blazor to work with authentication inside SF

Assignees: /cc @microsoft/service-fabric-triage

Hi @WhitWaldo
Looks like there as typo in the file Login.cshtml
@page @model Web1.Pages.LogoutModel @{ }
This should be LoginModel - hope this fixes your issue.

@jesbach That does indeed resolve the issue, thank you. This will let me at least move forward with Auth0 as the IdP, but if there's anything you can do to help with support ticket<PHONE_NUMBER>00687 as well, I'd really appreciate it.

@jesbach I hate to say it, but I've got to re-open this. While your spotting the typo allowed the login page to show, I actually attempted to log in just now and it's not working. I simply added logging to either repo and have removed all the assembly load lines leaving just the details of what happened.
I'll describe the steps taken - first the non-SF version.

I launched the application
I was already logged in, so I logged out of the application
I clicked the Log In link and it took me to the Auth0 login page
This time, I logged into it and it took me to an authenticated page as expected upon getting redirected back to my page.

And the SF version:

I launched the application
I wasn't logged in yet, so I clicked the Log In link and it look me to the Auth0 login page.
I logged into it and it threw me an exception page with the following message:

OpenIdConnectProtocolException: Message contains error: 'access_denied', error_description: 'Unauthorized', error_uri: 'error_uri is null'.
Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.RedeemAuthorizationCodeAsync(OpenIdConnectMessage tokenEndpointRequest)
Exception: An error was encountered while handling the remote login.
Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler.HandleRequestAsync()

Exception: An error was encountered while handling the remote login.
Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler.HandleRequestAsync()
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

So, like the support ticket, I'm experiencing that the same application works fine when not in Service Fabric and doesn't work when loaded in (and I've double-checked for typos this time). Again, works great up until the callback and then there's a difference in how it operates for no clear reason.
NonSfLog.txt
SfLog.txt

So I've been pouring over the trace logs today in an attempt to figure out what's happening and while I see what's happening, I haven't yet figured out how to step through the ASP.NET Core framework to see the actual values being passed to determine what's happening, but here's an update of where I'm at.
For the sake of brevity, I'm excluding all the traces prior to and starting from the callback. It's configured to callback to /callback after successful authentication. In either case (SF and non-SF), a request is made to the callback. Here's what I see from the point of the /callback request start in Blazor outside of Service Fabric (lines 631 through 662 of the attached nonsf-trace.txt):

Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request starting HTTP/2.0 POST https://localhost:44363/callback application/x-www-form-urlencoded 418
Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware: Trace: All hosts are allowed.
Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware: Debug: POST requests are not supported
Microsoft.AspNetCore.Routing.Matching.DfaMatcher: Debug: 1 candidate(s) found for the request path '/callback'
Microsoft.AspNetCore.Routing.Matching.DfaMatcher: Debug: Endpoint 'Fallback {*path:nonfile}' with route pattern '{*path:nonfile}' is valid for the request path '/callback'
Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware: Debug: Request matched endpoint '/_Host'
Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler: Trace: Entering Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler's HandleRemoteAuthenticateAsync.
Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector: Trace: Performing unprotect operation to key {df922caa-2829-4bb1-9455-b49c4514b9f1} with purposes ('G:\code\blazor-quiz-manager\QuizManager', 'Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler', 'Auth0', 'v1').
Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler: Trace: MessageReceived: '?code=9Fso7LAerQlQfB1N'.
Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler: Debug: Updating configuration
Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler: Trace: Authorization code received.
Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler: Debug: Redeeming code for tokens.
Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler: Trace: Token response received.
'iisexpress.exe' (CoreCLR: clrhost): Loaded 'G:\code\blazor-quiz-manager\QuizManager\bin\Debug\netcoreapp3.1\Microsoft.IdentityModel.JsonWebTokens.dll'.
The thread 0x5e08 has exited with code 0 (0x0).
The thread 0x38f4 has exited with code 0 (0x0).
The thread 0x9884 has exited with code 0 (0x0).
'iisexpress.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.12\System.Security.Cryptography.Cng.dll'. Symbols loaded.
Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector: Trace: Performing unprotect operation to key {df922caa-2829-4bb1-9455-b49c4514b9f1} with purposes ('G:\code\blazor-quiz-manager\QuizManager', 'Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler', 'System.String', 'Auth0', 'v1').
Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector: Trace: Performing protect operation to key {df922caa-2829-4bb1-9455-b49c4514b9f1} with purposes ('G:\code\blazor-quiz-manager\QuizManager', 'Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationMiddleware', 'Cookies', 'v2').
Microsoft.AspNetCore.CookiePolicy.CookiePolicyMiddleware: Trace: Needs consent: True.
Microsoft.AspNetCore.CookiePolicy.CookiePolicyMiddleware: Trace: Has consent: False.
Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler: Information: AuthenticationScheme: Cookies signed in.
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request finished in 1215.3904ms 302
Microsoft.AspNetCore.Server.IIS.Core.IISHttpServer: Debug: Connection ID "18230571370515792001" disconnecting.
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request starting HTTP/2.0 GET https://localhost:44363/
Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware: Trace: All hosts are allowed.
Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware: Debug: The request path / does not match a supported file type
Microsoft.AspNetCore.Routing.Matching.DfaMatcher: Debug: 2 candidate(s) found for the request path '/'
Microsoft.AspNetCore.Routing.Matching.DfaMatcher: Debug: Endpoint 'Page: /_Host' with route pattern '' is valid for the request path '/'
Microsoft.AspNetCore.Routing.Matching.DfaMatcher: Debug: Endpoint 'Fallback {*path:nonfile}' with route pattern '{*path:nonfile}' is valid for the request path '/'
Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware: Debug: Request matched endpoint '/_Host'

This line Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler: Debug: Redeeming code for tokens. is the last one of either trace log that is shared between the two.  Here, we see that a message is received from the IdP representing some proprietary authorization code. Per the emphasized lines, it aims to redeem the code for a token, receives the token response, sets a pile of cookies and redirects back to _Host  From here, a token response is received, it sets a pile of cookies and we're in.
Looking at the equivalent lines in the SF trace log, we have the following (lines 598-642):

Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request starting HTTP/2 POST https://localhost:8512/callback application/x-www-form-urlencoded 396
Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware: Debug: POST requests are not supported
Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost: Debug: Circuit id 'CbEWMg-yIpmpVoAI68ZZpuHBs8SqDbiUyrSDxZJBfQE' disconnected from connection 'WQjfZCjqLtBOaaJ7KOH-Dw'.
Microsoft.AspNetCore.Routing.Matching.DfaMatcher: Debug: 1 candidate(s) found for the request path '/callback'
Microsoft.AspNetCore.Routing.Matching.DfaMatcher: Debug: Endpoint 'Fallback {*path:nonfile}' with route pattern '{*path:nonfile}' is valid for the request path '/callback'
Microsoft.AspNetCore.SignalR.HubConnectionHandler: Debug: OnConnectedAsync ending.
Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware: Debug: Request matched endpoint '/_Host'
Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector: Trace: Performing unprotect operation to key {33bb7499-58bd-464d-9c94-5b912213a6cb} with purposes ('C:\SfDevCluster\Data_App_Node_3\Auth0TestType_App128\Web2Pkg.Code.1.0.0', 'Microsoft.AspNetCore.Components.Server.CircuitIdFactory,V1').
Microsoft.AspNetCore.Components.Server.CircuitDisconnectMiddleware: Debug: Circuit with id 'CbEWMg-yIpmpVoAI68ZZpuHBs8SqDbiUyrSDxZJBfQE' terminating gracefully.
Microsoft.AspNetCore.Components.Server.Circuits.CircuitRegistry: Debug: Circuit with id CbEWMg-yIpmpVoAI68ZZpuHBs8SqDbiUyrSDxZJBfQE has been removed from the registry for permanent disconnection.
Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost: Debug: Disposing circuit 'CbEWMg-yIpmpVoAI68ZZpuHBs8SqDbiUyrSDxZJBfQE' started.
Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionContext: Trace: Application complete.
Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost: Debug: Circuit id 'CbEWMg-yIpmpVoAI68ZZpuHBs8SqDbiUyrSDxZJBfQE' disconnected from connection 'WQjfZCjqLtBOaaJ7KOH-Dw'.
Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost: Debug: Closing circuit with id 'CbEWMg-yIpmpVoAI68ZZpuHBs8SqDbiUyrSDxZJBfQE'.
Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Disposing component 0 of type Web2.App
Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Disposing component 1 of type Microsoft.AspNetCore.Components.Routing.Router
Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionManager: Debug: Removing connection SIIXxGeaWhIKiKK6WBv-FA from the list of connections.
Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Disposing component 2 of type Microsoft.AspNetCore.Components.Authorization.AuthorizeRouteView
Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Disposing component 3 of type Microsoft.AspNetCore.Components.Authorization.CascadingAuthenticationState
Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Disposing component 4 of type Microsoft.AspNetCore.Components.CascadingValue1[System.Threading.Tasks.Task1[Microsoft.AspNetCore.Components.Authorization.AuthenticationState]]
Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Disposing component 5 of type Microsoft.AspNetCore.Components.Authorization.AuthorizeRouteView+AuthorizeRouteViewCore
Microsoft.AspNetCore.Routing.EndpointMiddleware: Information: Executed endpoint '/_blazor'
Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Disposing component 6 of type Microsoft.AspNetCore.Components.LayoutView
Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Disposing component 7 of type Web2.Components.MainLayout
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request finished HTTP/1.1 GET https://localhost:8512/_blazor?id=SIIXxGeaWhIKiKK6WBv-FA - - - 101 - - 8861.4788ms
Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Disposing component 8 of type Web2.Components.NavMenu
Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Disposing component 9 of type Web2.Components.AccessControl
Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Disposing component 10 of type Microsoft.AspNetCore.Components.Routing.NavLink
Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler: Trace: Entering Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler's HandleRemoteAuthenticateAsync.
Microsoft.AspNetCore.Components.RenderTree.Renderer: Debug: Disposing component 11 of type Microsoft.AspNetCore.Components.Authorization.AuthorizeView
Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost: Debug: Disposing circuit 'CbEWMg-yIpmpVoAI68ZZpuHBs8SqDbiUyrSDxZJBfQE' succeeded.
Microsoft.AspNetCore.Components.Server.CircuitDisconnectMiddleware: Debug: Circuit with id 'CbEWMg-yIpmpVoAI68ZZpuHBs8SqDbiUyrSDxZJBfQE' terminated gracefully.
Microsoft.AspNetCore.Routing.EndpointMiddleware: Information: Executed endpoint 'Blazor disconnect'
Microsoft.AspNetCore.Server.Kestrel: Trace: Connection id "0HM6M157TQ0T8" sending HEADERS frame for stream ID 21 with length 37 and flags END_STREAM, END_HEADERS
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request finished HTTP/2 POST https://localhost:8512/_blazor/disconnect multipart/form-data;+boundary=----WebKitFormBoundaryNYoPOWRQI8dlEQHT 359 - 200 0 - 5343.5457ms
Microsoft.AspNetCore.Server.Kestrel: Debug: Connection id "0HM6M157TQ0T8", Request id "0HM6M157TQ0T8:00000017": started reading request body.
Microsoft.AspNetCore.Server.Kestrel: Debug: Connection id "0HM6M157TQ0T8", Request id "0HM6M157TQ0T8:00000017": done reading request body.
Microsoft.AspNetCore.Server.Kestrel: Debug: Connection id "0HM6M157TQ0T9" stopped.
Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector: Trace: Performing unprotect operation to key {33bb7499-58bd-464d-9c94-5b912213a6cb} with purposes ('C:\SfDevCluster\Data_App_Node_3\Auth0TestType_App128\Web2Pkg.Code.1.0.0', 'Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler', 'Auth0', 'v1').
Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler: Trace: MessageReceived: '?code=mwBo826sRjovxa0N'.
Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler: Debug: Updating configuration
Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler: Trace: Authorization code received.
Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler: Debug: Redeeming code for tokens.
Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler: Error: Message contains error: 'access_denied', error_description: 'Unauthorized', error_uri: 'error_uri is null', status code '401'.
Exception thrown: 'Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectProtocolException' in Microsoft.AspNetCore.Authentication.OpenIdConnect.dll

Note that here, we see a similar authorization code being received upon the return to the /callback path. It attempts to redeem the code for tokens and.. that's the end of the similarities. Here there's failure for no particularly obvious reason. The SF service got a code and for reasons unknown has rejected the same code that the non-SF version accepted without issue.
I attempted to debug my way through the Microsoft.AspNetCore.Authentication.OpenId library and see what exactly is happening, but for whatever reason I keep getting the "Source Not Available" page in Visual Studio and haven't found any means to access the OpenId library debug symbols in order to step through it.
nonsf-trace.txt
sf-trace.txt

Look at error, call to Auth0 for get accesstoken from code is failing with 401. Check the context by add empty handler for event.OnAuthorizationCodeReceived in OpenIdConnectOptions and inspect context to check what is different between both.

@siby-george It'd be nice to fix this altogether, but my larger question is why this works outside of Service Fabric and fails when running within Service Fabric. There being no other differences between the two than the latter running in Service Fabric, why is there a difference at runtime between each?
I'll add the empty handler and get back to you later today on what that looks like.

Solved it. The difference is that SF is distributed and a single instance obvious isn't. With help from someone that watched the last community call, I've identified that proper installation and utilization of the data protection services across all instances unifies the keys used to protect the cookie and allows the client to successfully validate all the intermediate checks.


Question - Nested routes

Hi @mattpocock! This looks like a great solution to keep routing safe. However, do you think it would be possible to have nested routes?
Cheers!

Hi @JoseLion! How would that look in terms of the API? Keeping the object flat feels quite useful to me, because this is how your app works in reality. You can freely go anywhere in your application no matter how deeply nested the route is, so representing the nesting in the routeMap declaration feels a little counter-intuitive. But I might be out on a limb here.

@mattpocock you're probably right about the flat routes, I agree 🙂 but my thinking was around the keys and avoiding confusion around the naming in big maps. Following the example in the readme, we can have something like this:
const routeMap = makeRouteMap({
  root: { path: "/" },
  users: {
    path: "/users"
  },
  viewUser: {
    path: "/users/:id",
    params: { id: true }
  },
  editUser: {
    path: "/users/:id/edit",
    params: { id: true }
  },
  orders: {
    path: "/orders"
  },
  // view and edit for orders will go here too
});

This could get kind of big depending on the application, and if you have a lint rule that enforces objects to be alphabetically ordered, for example, this will be harder to understand as it grows. So I was thinking it could be very useful to nest routes if they belong to the same domain. Something like this:
const routeMap = makeRouteMap({
  root: { path: "/" },
  users: {
    path: "/users",
    view: {
      path: "/users/:id",
      params: { id: true }
    },
    edit: {
      path: "/users/:id/edit",
      params: { id: true }
    }
  },
  orders: {
    path: "/orders",
    // view and edit for orders will go here too
  }
});

The route map will still grow big over time, but at least we have the user's routes under the users key and the orders routes under the orders key. IMHO, this will be more maintainable and easier to read, what do you think? 🙂
Usage could be something like this:
routeMap.users(); // "/users"
routeMap.users.view({ params: { id: 240 } }); // "/users/240"
routeMap.users.edit({ params: { id: 240 } }); // "/users/240/edit"

I've been thinking a few days over this, and probably the more challenging part of achieving this will be making the types work in this way. I'll be looking forward to your comments 🙂


Disable "import host" for local cluster

Addresses https://github.com/rancher/dashboard/issues/4964
Rancher does not manage the local cluster, so the 'Import Host' option should not be shown - currently it is:

With this PR it is now not shown:

This PR adds an additional check for the local (internal) cluster.

Fixed lint issue - need a re-approval


chore(main): release 1.1.0

A Release PR has been automatically generated based on activity.

1.1.0 (2024-07-09)
Bug Fixes

write to stderr (b8f034a)

Miscellaneous Chores

release 1.1.0 (8855bc1)

Merge this pull request to cut the next release.

:robot: Created releases:

v1.1.0
:sunflower:


we lost the "early build" feature of the legacy app in the main branch

Till now, the build process (by which I mean both the packer build of an AMI as well as the docker build) has done the "npm run build" step, which means that time to deploy is faster.  However, at run time we then have had to "fix up" the build by providing the jambonz base url, which is only known at deploy time.
You can see how that is done

for kubernetes in the entrypoint.sh here
for EC2 in the cloudformation script here

The main branch does not include this facility.  As a result, when deploying a system via cloudformation the webapp is non-functional until you log into the server and edit the jambonz-webapp/.env to put in the base url and then run npm run build and then restart the newly-rebuilt webapp.
@kitajchuk @EgleHelms We need the main branch to have this feature similar to how it used to work.  Because the build process is now different (using vite) I am not sure what changes are required but hope you can work them out.

Till now, the build process (by which I mean both the packer build of an AMI as well as the docker build) has done the "npm run build" step, which means that time to deploy is faster. However, at run time we then have had to "fix up" the build by providing the jambonz base url, which is only known at deploy time.
You can see how that is done

for kubernetes in the entrypoint.sh here
for EC2 in the cloudformation script here

The main branch does not include this facility. As a result, when deploying a system via cloudformation the webapp is non-functional until you log into the server and edit the jambonz-webapp/.env to put in the base url and then run npm run build and then restart the newly-rebuilt webapp.
@kitajchuk @EgleHelms We need the main branch to have this feature similar to how it used to work. Because the build process is now different (using vite) I am not sure what changes are required but hope you can work them out.

There is nothing really different about the build process. I remember the old app had a dot env and the docker stuff. This has that too. How was the url that is only known at runtime handled before?

well, in the old world we updated build/index.html at runtime and added a script tag
echo "REACT_APP_API_BASE_URL=http://$PUBLIC_IPV4/api/v1" > /home/admin/apps/jambonz-webapp/.env
REACT_APP_API_BASE_URL=http://$PUBLIC_IPV4/api/v1 TAG=""
sed -i -e "\@@i\ $TAG" /home/admin/apps/jambonz-webapp/build/index.html

In the new version, we now build in /dist rather than /build and in the .env we set VITE_API_BASE_URL
I guess we just need to update entrypoint.sh and the CF script to do the same thing -- insert a script section in the head of the index.html just changing the file to edit. Though, based on this code I guess we need to change the name of the variable assignment in the script code as well?

well, in the old world we updated build/index.html at runtime and added a script tag
echo "REACT_APP_API_BASE_URL=http://$PUBLIC_IPV4/api/v1" > /home/admin/apps/jambonz-webapp/.env
REACT_APP_API_BASE_URL=http://$PUBLIC_IPV4/api/v1 TAG=""
sed -i -e "\@@i\ $TAG" /home/admin/apps/jambonz-webapp/build/index.html

In the new version, we now build in /dist rather than /build and in the .env we set VITE_API_BASE_URL
I guess we just need to update entrypoint.sh and the CF script to do the same thing -- insert a script section in the head of the index.html just changing the file to edit. Though, based on this code I guess we need to change the name of the variable assignment in the script code as well?

The new web app does the same thing. It shouldn’t matter what the build directory is unless thats hardcoded somewhere else? The entrypoint:
https://github.com/jambonz/jambonz-webapp/blob/93d313b21c9f488ce7f3b2074111504b398a0dfb/entrypoint.sh#L14

ah ok, it is hardcoded in the cloudformation script, which I need to update in the same way.  Let me try that -- this is what I have been testing, so it makes sense that it is failing

ah ok, it is hardcoded in the cloudformation script, which I need to update in the same way. Let me try that -- this is what I have been testing, so it makes sense that it is failing

Ok. If it’s easier I think we can specify the output directory for vite and set it back to build.

No that's ok, lets leave as is.  I've updated the cloudformation yaml and am in the process of testing it now

No that's ok, lets leave as is. I've updated the cloudformation yaml and am in the process of testing it now

Coolio

Hi @kitajchuk @davehorton seems like this does not require any action. Maybe this issue can be closed then?

Yes, I have fixed and tested my CF as well as the packer build so I think we are good here.


sinkmanager(ticdc): consider table state when generate tasks

What problem does this PR solve?

Issue Number: ref https://github.com/pingcap/tiflow/issues/5928
What is changed and how it works?
Consider the table state when generating tasks. If the table sink state is not replicating, then skip it.
Check List
Tests

Unit test

Questions
Will it cause performance regression or break compatibility?
No
Do you need to update user documentation, design documentation or monitoring documentation?
No
Release note
None

/run-all-tests

Codecov Report

Merging #7591 (f99b25d) into master (c0c9a43) will increase coverage by 0.1996%.
The diff coverage is 62.0374%.

Additional details and impacted files

Flag
Coverage Δ

cdc
67.4037% <60.2920%> (-0.0006%)
:arrow_down:

dm
52.0636% <69.9284%> (+0.0478%)
:arrow_up:

engine
61.4999% <58.4821%> (+0.4726%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.
@@               Coverage Diff                @@
##             master      #7591        +/-   ##
================================================
+ Coverage   59.8343%   60.0340%   +0.1996%
================================================
  Files           804        822        +18
  Lines         92365      94030      +1665
================================================
+ Hits          55266      56450      +1184
- Misses        32287      32685       +398
- Partials       4812       4895        +83

/merge

/run-integration-test


restrict to guzzle <6.0 for BC

current >=4.2 constraint breaks with guzzle 6

@hashnz Thanks for your contribution and sorry for my late reply. I will be releasing a new version soon which will require guzzle 6 by default, so BC will no longer be needed.

@cleentfaar you might wanna version bump so composer update doesn't break existing installs, otherwise, ye this isn't required


Allowing both SENT AND ACKED to be acceptable states for

NoMatchedDomain.
A small percentage of the time, we will not be at ACKED state before the check, we will be at SENT instead.
This is because the check is just before we received the next request containing the response nouce like this:
I0825 04:13:02.896919396      36 ref_counted.h:199]          xds_client:0x7b5000001c08 src/core/ext/xds/xds_client.cc:1174 unref 3 -> 2 ADS+OnRequestSentLocked
test/cpp/end2end/xds_end2end_test.cc:2517: Failure
Expected equality of these values:
response_state.state
Which is: 1
AdsServiceImpl::ResponseState::ACKED
Which is: 2
I0825 04:13:02.948123878      20 xds_end2end_test.cc:1777]   Backend about to shutdown
I0825 04:13:02.948544320      34 xds_end2end_test.cc:763]    ADS[0x7b5000000448]: Received request for type type.googleapis.com/envoy.config.route.v3.RouteConfiguration with content version_info: "1"
resource_names: "application_target_name"
type_url: "type.googleapis.com/envoy.config.route.v3.RouteConfiguration"
response_nonce: "1"
So maybe we should accept both states as valid.

@karthikravis

As discussed via email, this isn't the right solution.  We can revert for now and I'll work on a better fix.


Update sbt-scalajs, scalajs-compiler to 0.6.33

Updates

org.scala-js:sbt-scalajs
org.scala-js:scalajs-compiler

from 0.6.32 to 0.6.33.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scala-js" } ]

labels: library-update, semver-patch

Subsumed by https://github.com/coursier/coursier/pull/1715.


Issue with planners for ADA

When I pulled the latest master version from prpy, the robot.PlanToConfiguration in adapy returns the following error:
 File "/home/snikolai/ONR_DEMO_WS/src/ada/adapy/scripts/test.py", line 34, in <module>    robot.PlanToConfiguration(values, execute=True)  File "/home/snikolai/ONR_DEMO_WS/src/prpy/src/prpy/base/robot.py", line 118, in __getattr__ [INFO] [rospy.internal:core.py:138]:rospyinfo: topic[/rosout] adding connection to [/rosout], count 0    delegate_method = getattr(canonical.planner, name)  File "/home/snikolai/ONR_DEMO_WS/src/prpy/src/prpy/planning/base.py", line 253, in __getattr__    for planner in self.get_planners_recursive(method_name):  File "/home/snikolai/ONR_DEMO_WS/src/prpy/src/prpy/planning/base.py", line 232, in get_planners_recursive    sub_planners = planner.get_planners_recursive(method)  File "/home/snikolai/ONR_DEMO_WS/src/prpy/src/prpy/planning/base.py", line 230, in get_planners_recursive    for planner in self.get_planners(method):  File "/home/snikolai/ONR_DEMO_WS/src/prpy/src/prpy/planning/base.py", line 303, in get_planners    if planner.has_planning_method(method_name)] AttributeError: 'NoneType' object has no attribute 'has_planning_method' [INFO] [rospy.core:core.py:455]:signal_shutdown: signal_shutdown [atexit] [INFO] [rospy.internal:core.py:138]:rospyinfo: topic[/rosout] removing connection to /rosout

That seems to suggest that one of the ADA planners is None? What's in robot.planner?

Yup, we were missing or_trajopt from the ada_rosinstall. Thanks!


License issue

Hiya, thanks for building this! We'd love to use it but I see that in linux/support_log.cc there's a GPL license, which would "infect" the whole package with GPL despite the declared MIT license. Would it be possible to replace that with something else? Or am I misunderstanding how the license thing works there?

Hi, thanks for noticing that. I will find a way to reimplement the linux part in the next version. It may take some times.


Offset trace number removes leading zero

ACH Version
dev-d3d639a6
What were you trying to do?
Using the offset field in the request, if the trace numbers start with zero, the offset trace number strips off the leading zero.
What did you expect to see?
"traceNumber": "088888880123459"
What did you see?
"traceNumber": "88888880123459"
How can we reproduce the problem?
Create an ACH file with an offset where the trace number begins with zero. The resulting ACH file contents appears to add back the zero but it's missing from the JSON.

Thanks for reporting this! I've opened up https://github.com/moov-io/ach/pull/1199 as a fix.


Test Desktop application with opentest

Hi All,
Does any one use Opentest to test desktop application?

Hi, we use it for some own application, What I know is that the development team has created custom actions and custom keywords using the windows configuration to click according to position x and y on the screen and this is working. But unfortunately, I don´t more information to help you and also don´t have knowledge of it. But yes, it´s possible since you can create these custom actions.


MODIS Aerosol_optical_depth

WHAT DOES THIS PR DO?
This is to pull satellite AOD data at a point and average over time.
aerosol_optical_depth
{{baseUrl}}api/v1/meta-data/aerosol_optical_depth?latitude=-1.737159100000003&longitude=8.150485640089402&startDate=2022-01-01&endDate=2022-02-01
Nitrogen dioxide
{{baseUrl}}/api/v2/meta-data/nitrogen_dioxide?latitude=-1.737159100000003&longitude=8.150485640089402&startDate=2022-01-01&endDate=2022-02-01
carbon monoxide
{{baseUrl}}/api/v2/meta-data/carbon_monoxide?latitude=-1.737159100000003&longitude=8.150485640089402&startDate=2022-01-01&endDate=2022-02-01

[ ] Item 1
[ ] Item 2

WHAT ISSUES ARE RELATED TO THIS PR?

Jira cards

[]

GitHub issues

Closes #

HOW DO I TEST OUT THIS PR?

[ ] Analytics: Link to Analytics README
[ ] Auth Service: Link to Auth Service README
[ ] Calibrate: Link to Calibrate README
[ ] Data Proxy: Link to Data Proxy README
[ ] Device Monitoring: Link to Device Monitoring README
[ ] Device Registry: Link to Device Registry README
[ ] Device Status: Link to Device Status README
[ ] Device Uptime: Link to Device Uptime README
[ ] Exceedances: Link to Exceedances README
[ ] Firebase: Link to Firebase README
[ ] GP Model: Link to GP Model README
[ ] Incentives: Link to Incentives README
[ ] Kafka Connectors: Link to Kafka Connectors
[ ] Locate: Link to Locate README
[x] Metadata: Link to Metadata README
[ ] Predict: Link to Predict README
[ ] Spatial: Link to Spatial
[ ] View: Link to View README
[ ] Workflows: Link to Workflows README

WHICH ENDPOINTS SHOULD BE READY FOR TESTING?:

[ ] Endpoint 1
[ ] Endpoint 2

ARE THERE ANY RELATED PRs?

[ ] Related PR 1
[ ] Related PR 2

Thanks @wabinyai , this PR looks good to me. Thanks a lot! Just out of curiosity, what informed the choice of using the meta-data microservice for this new functionality?

The satellite data infrastructure already exists in the Meta-data


Amendment RPC enhancements

RPC command to veto/unveto
Store votes
Add vote information to JSON
Add ledger majority information to JSON
Config section for vetos

Reviews: @seelabs, @JoelKatz

Current coverage is 49.19%

Merging #1384 into develop will increase coverage by +0.07% as of e4505c2

@@            develop   #1384   diff @@
=======================================
  Files           960     964     +4
  Stmts         66698   66829   +131
  Branches          0       0
  Methods           0       0
=======================================
+ Hit           32763   32879   +116
  Partial           0       0
- Missed        33935   33950    +15

Review entire Coverage Diff as of e4505c2

Powered by Codecov. Updated on successful CI builds.

:+1: I left two nit comments in the latest commits, but thumbs up with or without them.

:+1:

I rebased, squashed everything together and added a bit of extra logging. I am removing the "Passed" label because I made a small tweak in the code. Previously, a single server could vote multiple times for the same amendment within a single round - obviously that's not what we want. This is no longer the case.

This decreases coverage :-1:

Merged as f13668371e9b638cb2ffc274340048e66e6d5447


I need some help

There's still an error!
Attempted to parse file: Aki_Data/Server/configs/playerscav.json. Error: Expected "[", "false", "null", "true", "{", number, or string but end of input found.
The application had a critical error and failed to run
Exception produced: Error: Cannot inject the dependency at position #1 of "Watermark" constructor. Reason:
Attempted to parse file: Aki_Data/Server/configs/playerscav.json. Error: Expected "[", "false", "null", "true", "{", number, or string but end of input found.
Stacktrace:
Error: Cannot inject the dependency at position #1 of "Watermark" constructor. Reason:
Attempted to parse file: Aki_Data/Server/configs/playerscav.json. Error: Expected "[", "false", "null", "true", "{", number, or string but end of input found.
at C:\snapshot\project\node_modules\tsyringe\dist\cjs\dependency-container.js:324:23
at Array.map ()
at C:\snapshot\project\node_modules\tsyringe\dist\cjs\dependency-container.js:295:38
at InternalDependencyContainer.construct (C:\snapshot\project\node_modules\tsyringe\dist\cjs\dependency-container.js:297:11)
at InternalDependencyContainer.resolveRegistration (C:\snapshot\project\node_modules\tsyringe\dist\cjs\dependency-container.js:166:51)
at InternalDependencyContainer.resolve (C:\snapshot\project\node_modules\tsyringe\dist\cjs\dependency-container.js:109:33)
at Program.start (C:\snapshot\project\obj\Program.js)
at Object. (C:\snapshot\project\obj\ide\ReleaseEntry.js)
at Module._compile (pkg/prelude/bootstrap.js:1930:22)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
Press Enter to close the window

Originally written by zhongmof

Issue not filled out, closing
(You should reinstall SPT)

Originally written by chomp


segger-systemview: init at 352a

Description of changes
This PR adds the SEGGER SystemView debugging utility. It depends on the SEGGER J-Link libraries which are tracked in PR #255185 .
Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] 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

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
23.05 Release Notes (or backporting 22.11 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
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[ ] Fits CONTRIBUTING.md.

Now that #255185 has been merged, I have rebased this PR to only contain the changes for the systemview package.

@emilazy Thank you for your suggestion. Although I don't agree on the removal of the tools from nixpkgs (yet), I would like to explore the option of providing them via a flake. Do you have some resources I could use as a template?

The simplest thing would be a flake that just provides an overlay:
{
  outputs = { self }: {
    overlays.default = final: prev: {
      segger-jlink = final.callPackage ./pkgs/segger-jlink { };
      nrfconnect = final.callPackage ./pkgs/nrfconnect { };
      # …
    };
  };
}

Users could include it in their configuration with inputs.segger-flake.url = "…"; and set nixpkgs.overlays = [ inputs.segger-flake.overlays.default ]; to get the packages available. If you wanted to expose a full package set so that things like nix run …#segger-jlink also worked, you could do:
{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  };

  outputs = { self, nixpkgs }: {
    packages = let
      systems = [
        "x86_64-linux"
        "i686-linux"
        "aarch64-linux"
        "armv7l-linux"
      ];
    in nixpkgs.lib.genAttrs systems (system:
      nixpkgs.legacyPackages.${system}.extend self.overlays.default
    );

    overlays.default = …; # same as before
  };
}


cant download any songs

Cannot download any songs or playlists. No idea whats wrong, tried uninstalling and reinstalling spotdl and python. FFmpeg is installed
C:\Users\kspis>spotdl https://open.spotify.com/track/08mG3Y1vljYA6bvDt4Wqkj?si=SxezdxmlTx-CaVoucHmrUA Fetching Song...   0%|                                                                                |ETA: ?, ~min/songTraceback (most recent call last):   File "C:\Users\kspis\AppData\Local\Programs\Python\Python38-32\Scripts\spotdl-script.py", line 11, in <module>     load_entry_point('spotdl==3.2.0rc0', 'console_scripts', 'spotdl')()   File "c:\users\kspis\appdata\local\programs\python\python38-32\lib\site-packages\spotdl\__main__.py", line 84, in console_entry_point     downloader.download_single_song(song)   File "c:\users\kspis\appdata\local\programs\python\python38-32\lib\site-packages\spotdl\download\downloader.py", line 283, in download_single_song     download_song(songObj, self.displayManager, self.downloadTracker)   File "c:\users\kspis\appdata\local\programs\python\python38-32\lib\site-packages\spotdl\download\downloader.py", line 103, in download_song     youtubeHandler = YouTube(   File "c:\users\kspis\appdata\local\programs\python\python38-32\lib\site-packages\pytube\__main__.py", line 91, in __init__     self.prefetch()   File "c:\users\kspis\appdata\local\programs\python\python38-32\lib\site-packages\pytube\__main__.py", line 183, in prefetch     self.js_url = extract.js_url(self.watch_html)   File "c:\users\kspis\appdata\local\programs\python\python38-32\lib\site-packages\pytube\extract.py", line 143, in js_url     base_js = get_ytplayer_config(html)["assets"]["js"] KeyError: 'assets'   0%|                                                                                |ETA: ?, ~min/song

Same problem for me :
Traceback (most recent call last):   File "/Library/Frameworks/Python.framework/Versions/3.7/bin/spotdl", line 11, in <module>     load_entry_point('spotdl==3.2.0rc0', 'console_scripts', 'spotdl')()   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/spotdl/__main__.py", line 81, in console_entry_point     song = SongObj.from_url(request)   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/spotdl/search/songObj.py", line 43, in from_url     rawTrackMeta = spotifyClient.track(spotifyURL)   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/spotipy/client.py", line 331, in track     return self._get("tracks/" + trid)   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/spotipy/client.py", line 284, in _get     return self._internal_call("GET", url, payload, kwargs)   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/spotipy/client.py", line 220, in _internal_call     headers = self._auth_headers()   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/spotipy/client.py", line 211, in _auth_headers     token = self.auth_manager.get_access_token(as_dict=False)   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/spotipy/oauth2.py", line 175, in get_access_token     token_info = self._request_access_token()   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/spotipy/oauth2.py", line 197, in _request_access_token     error_payload = response.json()   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/models.py", line 897, in json     return complexjson.loads(self.text, **kwargs)   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py", line 348, in loads     return _default_decoder.decode(s)   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 337, in decode     obj, end = self.raw_decode(s, idx=_w(s, 0).end())   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 355, in raw_decode     raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

That's a pytube error. Please update to v3.1.4

That's a pytube error. Please update to v3.1.4

Done.
Now I have this shorter error message:
Traceback (most recent call last):   File "/Library/Frameworks/Python.framework/Versions/3.7/bin/spotdl", line 11, in <module>     load_entry_point('spotdl==3.2.0rc0', 'console_scripts', 'spotdl')()   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/spotdl/__main__.py", line 84, in console_entry_point     downloader.download_single_song(song)   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/spotdl/download/downloader.py", line 283, in download_single_song     download_song(songObj, self.displayManager, self.downloadTracker)   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/spotdl/download/downloader.py", line 105, in download_song     on_progress_callback = displayManager.pytube_progress_hook   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pytube/__main__.py", line 103, in __init__     self.descramble()   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/spotdl/patches/pyTube.py", line 149, in descramble     self.player_config_args = get_ytplayer_config(self.watch_html)["args"]   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/spotdl/patches/pyTube.py", line 241, in get_ytplayer_config     raise RegexMatchError( NameError: name 'RegexMatchError' is not defined

That's a pytube error. Please update to v3.1.4

thank you, works now after updating.

@darkross67 check if youtube music is available in your country.

@darkross67 check if youtube music is available in your country.

Sorry I Edit my last post to say that after reinstalling Spotdl it worked !
Thank you ;)


Docs: Change view in GitHub links in v4-dev

Description
Changed every View on GitHub link management inside main branch.
Motivation & Context
Facilitate release process to avoid dead links.
Type of changes

[x] Refactoring (non-breaking change)

Checklist

[x] I have read the contributing guidelines
[x] My code follows the code style of the project (using npm run lint)
[x] My change introduces changes to the documentation
[x] I have updated the documentation accordingly
[x] I have added tests to cover my changes
[x] All new and existing tests passed

Live previews

https://deploy-preview-37223--twbs-bootstrap.netlify.app/docs/4.6/getting-started/introduction/ (but anywhere in the docs).

Related issues
Fixes #36853.
Related to #37214.

Ah, it didn't close #36853 😞