SyntaxError: 'import' and 'export' may appear only with 'sourceType: module' (1:0)

Hi
I want to coverage all files and not only the tests. So I excluded the node_moduels folder. But i get this error on all the others files.
WARNING in ./lib/components/home/home.config.js
Module build failed: SyntaxError: 'import' and 'export' may appear only with 'sourceType: module' (1:0)
at Parser.pp.raise (C:\Users\kevin\Documents\Projets\web-template-webpack\node_modules\babylon\lib\parser\location.js:22:13)
This is my karma.config.js:
var webpack = require("webpack");
var path = require("path");
module.exports = function(config) {
    config.set({
        files: [
            './tests.webpack.js'
        ],

        preprocessors: { './tests.webpack.js': ['webpack'] },

        // frameworks to use
        frameworks: ['chai', 'mocha'],

        reporters: ['spec', 'coverage'],

        coverageReporter: {
            type: 'html',
            dir: 'coverage/'
        },

        webpack: {
            // webpack configuration
            module: {
                loaders: [
                    {
                        test: /\.js$/,
                        exclude: [
                            path.resolve('lib/'),
                            path.resolve('node_modules/')
                        ],
                        loaders: ['babel']
                    }
                ],

                postLoaders: [{
                    test: /\.js/,
                    include: path.resolve('lib/'),
                    exclude: /(node_modules)/,
                    loader: 'istanbul-instrumenter'
                }]
            },
            resolve: {
                modulesDirectories: [
                    "",
                    "lib",
                    "node_modules"
                ]
            }
        },

        webpackMiddleware: {
            // webpack-dev-middleware configuration
            noInfo: true
        },

        plugins: [
            require("karma-webpack"),
            require("istanbul-instrumenter-loader"),
            require("karma-mocha"),
            require("karma-coverage"),
            require("karma-phantomjs-launcher"),
            require("karma-spec-reporter"),
            require("karma-chai-plugins"),
            require("karma-sourcemap-loader")
        ],

        browsers: ['PhantomJS']
    });
};

this is my tests.webpack.js:
// require all `project/test/src/components/**/index.js`
const testsContext = require.context('./lib/', true, /*.js$/);

testsContext.keys().forEach(testsContext);

Example of home.config.js:
import Home from './home.html';
import RightMenu from '../rightMenu/rightMenu.html';

class HomeConfig {
    static initRoute($stateProvider) {
        'ngInject';
        $stateProvider.state('home', {
            url: '/home',
            views: {
                mainView: {
                    templateUrl: Home,
                    controller: 'homeController as home'
                },
                rightMenuView: {
                    templateUrl: RightMenu,
                    controller: 'rightMenuController'
                }
            }
        });
    }
}

export default HomeConfig.initRoute;

What's wrong ? Thank you :)

try this:
    loader: 'istanbul-instrumenter',
    query: {
        esModules: true
    }

I have just updated readme with a special note about esModules option.

ok thank you very much  :). Now i get this
PhantomJS 2.1.1 (Windows 8 0.0.0) ERROR
  SyntaxError: Use of reserved word 'import'
  at tests.webpack.js:100

Any idea ? :)

hmm, try to comment out everything related to coverage – it looks like you should to transpile some additional folder or files, so ES6 code gets in PhantomJS as is.

What do you mean ? Sorry i tried so many things, i don't visualize what i have to remove or comment with the karma config.

remove the whole block:
                postLoaders: [{
                    test: /\.js/,
                    include: path.resolve('lib/'),
                    exclude: /(node_modules)/,
                    loader: 'istanbul-instrumenter'
                }]

and coverage from here:
reporters: ['spec', 'coverage'],

and include lib/ back here:
                    {
                        test: /\.js$/,
                        exclude: [
                            path.resolve('lib/'),
                            path.resolve('node_modules/')
                        ],
                        loaders: ['babel']
                    }

and give it a try, run your tests without coverage. it looks like your issue is not related to istanbul-instrumenter.

I tried like this:
var webpack = require("webpack");
var path = require("path");
module.exports = function(config) {
	config.set({
		files: [
			'./tests.webpack.js'
		],

		preprocessors: { './tests.webpack.js': ['webpack'] },

		// frameworks to use
		frameworks: ['chai', 'mocha'],

		reporters: ['spec'],

		coverageReporter: {
			type: 'html',
			dir: 'coverage/'
		},

		webpack: {
			// webpack configuration
			module: {
				preLoaders: [
					{
						test: /\.js$/,
						exclude: [
							path.resolve('node_modules/')
						],
						loader: 'babel'
					}
				],
			},
			resolve: {
				modulesDirectories: [
					"",
					"lib",
					"node_modules"
				]
			}
		},

		webpackMiddleware: {
			// webpack-dev-middleware configuration
			noInfo: true
		},

		plugins: [
			require("karma-webpack"),
			require("istanbul-instrumenter-loader"),
			require("karma-mocha"),
			require("karma-coverage"),
			require("karma-phantomjs-launcher"),
			require("karma-spec-reporter"),
			require("karma-chai-plugins")
		],

		browsers: ['PhantomJS']
	});
};

No error and my two tests files successful

weird... do you have any public repo with this so I can reproduce it by myself?

Yes of course, i updated the repo like that, you can try:
https://github.com/kevincaradant/web-template-webpack
git checkout dev . And thank you to check :)

@kevincaradant thanks, I got it.
@DatenMetzgerX just realized that the instrumented code is not transpiled at all o_O
var cov_13pxw8gy6p=function(){var path='/Users/deepsweet/Projects/web-template-webpack/lib/components/home/home.controller.spec.js',hash='85d2c537457b95fcb8ace2987d3b6c86ba398801',global=new Function('return this')(),gcv='__coverage__',coverageData={path:'/Users/deepsweet/Projects/web-template-webpack/lib/components/home/home.controller.spec.js',statementMap:{'0':{start:{line:3,column:0},end:{line:9,column:3}},'1':{start:{line:4,column:1},end:{line:8,column:4}},'2':{start:{line:5,column:2},end:{line:5,column:26}},'3':{start:{line:7,column:2},end:{line:7,column:9}}},fnMap:{'0':{name:'(anonymous_0)',decl:{start:{line:3,column:28},end:{line:3,column:29}},loc:{start:{line:3,column:40},end:{line:9,column:1}}},'1':{name:'(anonymous_1)',decl:{start:{line:4,column:36},end:{line:4,column:37}},loc:{start:{line:4,column:52},end:{line:8,column:2}}}},branchMap:{},s:{'0':0,'1':0,'2':0,'3':0},f:{'0':0,'1':0},b:{}},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();import homeController from'./home.controller';++cov_13pxw8gy6p.s[0];describe('home.controller',function(){++cov_13pxw8gy6p.f[0];++cov_13pxw8gy6p.s[1];it('makes sure that true is true',function(done){++cov_13pxw8gy6p.f[1];++cov_13pxw8gy6p.s[2];expect(true).to.be.true;// expect(homeController.changeName()).toEqual("angular-tips");

note:
import homeController from

does this mean that we have to transpile it with babel-loader after instrumentation step?.. I thought that it works the same way as isparta does, i.e. transpiling + instrumentation.

@DatenMetzgerX just looked at source code:

parse the code with Babylon
insert coverage metainfo
generate ES6 code back again

but if after these steps I need to transpile it to ES5 with Babel, how this statementMap:{'0':{start:{line:3,column:0},end:{line:9,column:3}} will handle transpiled lines and columns properly?

that's why we have https://github.com/deepsweet/istanbul-instrumenter-loader/pull/29...
looks like https://github.com/istanbuljs/babel-plugin-istanbul is a simpler solution at this moment.

The babel-plugin does exactly the same as the loader does. Sorry, I'm still at a Hacketon, so I don't really have time to look into it. Will come back to you soon.

yes but babel-plugin-istanbul works as a part transpiling process by directly using its "visitor" by Babel, so they don't need to support input SourceMaps and subsequent remapping.
as far as I understand what we need here for now:

transpile ES6 sources with Babel + SourceMaps
insert coverage metainfo by istanbul-lib-instrument with respecting of input SourceMaps from Babel
achieve coverage reporting for original ES6 sources

The very more important part is, that babel does no bundlinge. Therefore, for each file there is one output (input -> output).  But currently there exist no solution to do so when using a bundler (all PRs are still pending)

and I still can't get how exactly karma-coverage will generate a report for original ES6 lines and columns. if my tests requires transpiled source code then ++cov_13pxw8gy6p.s[1]-like counters wraps a transpiled code part...

I tried to explain it in istanbuljs/istanbul-lib-source-maps#4

am I understanding it right that istanbul-lib-instrument will remap these parts statementMap:{'0':{start:{line:3,column:0},end:{line:9,column:3}} too with https://github.com/istanbuljs/istanbul-lib-instrument/pull/23? and it's still not completely clear for me what will happen with counters.

which counters?
istanbul-lib-instrument does not perform any remapping at it's own. But the line numbers created by lib istanbul reference the line numbers of the input source (in case of a transpiled input from typescript, those are the line numbers of the transpiled source code and not the original ones...)
When generating the reports, then istanbul-lib-sourcemap-support uses the sourcemap included in the file (if 1:1 mapping between input and output source) or - the version of my pull requests - uses the sourcemap included in the coverage information to map the line numbers back to the original code (transpiled line numbers back to original line numbers). This is also possible if remap-istanbul is used.
The old istanbul version is not capable to perform this remapping, but loads the original source code. Therefore it tries to highlight branches / lines that are not existing in the original source code, but are in the transpiled....
My working setup is the following (It's a little bit complicated, as non of my pull requests got merged so far). My build chain uses typescript -> babel -> istanbul and karma for running the tests.

I use my own version of istanbul-instrumenter-loader that uses it's own version of istanbul-lib-instrument. This version can be installed using npm install -D --save datenmetzgerx/istanbul-instrumenter-loader#with-patched-lib-istanbul-instrument
I also use my own version of remap-istanbul that uses the source maps included in the coverage information, if available (I had to exclude all files where no source maps are available, otherwise remap istanbul fails). This version can be installed using npm install -D --save datenmetzgerx/remap-istanbul#consider-sourcemap-from-file-coverage
I configured karma to only output a json output (type json)
I then use remap istanbul to create the html and lcov report

    "coverage:remap": "remap-istanbul --input ./coverage/Firefox*/coverage-final.json --output ./coverage/html -t html && remap-istanbul --input ./coverage/Firefox*/coverage-final.json --output ./coverage/lcov.info -t lcovonly"
The setup is used quite successfully in my student project parallel.es (the only setup i found that is capable to create the coverage over typescript source that actually works if webpack is used)
I hope this helps

ok, after deep digging into the problem and fixing my start-istanbul (look at these "hacky" singletons to share sourceMapStore accross different istanbul steps) to remap coverage to original source if it was transpiled, now I can totally understand what's going on here.
@DatenMetzgerX your solution proposed in https://github.com/istanbuljs/istanbul-lib-instrument/pull/23 + https://github.com/istanbuljs/istanbul-lib-source-maps/pull/4 looks legit, in my opinion coverage object is ok to store the original source map in it. I didn't look in detail in https://github.com/karma-runner/karma-coverage/pull/251 yet, just hope that your PR will contain remapping of coverage map.
@kevincaradant sorry for involving you in this :)
the bottom line: we are waiting for at least 3 PRs to be merged to just be able to show you coverage over original sources.

@kevincaradant you can use https://github.com/deepsweet/isparta-loader or https://github.com/deepsweet/babel-istanbul-loader for a while, I just undeprecated them.

No problem :)
I tried https://github.com/deepsweet/isparta-loader.
My karma.config.js becomes:
var webpack = require("webpack");
var path = require("path");
module.exports = function(config) {
	config.set({
		files: [
			'./tests.webpack.js'
		],

		preprocessors: { './tests.webpack.js': ['webpack']},

		babel: {
			presets: ['es2015']
		},

		isparta: {
			embedSource: true,
			noAutoWrap: true,
			// these babel options will be passed only to isparta and not to babel-loader
			babel: {
				presets: ['es2015']
			}
		},

		// frameworks to use
		frameworks: ['chai', 'mocha'],

		reporters: ['progress', 'coverage'],

		coverageReporter: {
			type: 'html',
			dir: 'coverage/'
		},

		webpack: {
			// webpack configuration
			module: {
				preLoaders: [
					{
						test: /\.js$/,
						exclude: [
							path.resolve('lib/'),
							path.resolve('node_modules/')
						],
						loader: 'babel'
					},
					// transpile and instrument only testing sources with isparta
					{
						test: /\.js$/,
						include: path.resolve('lib/'),
						loader: 'babel-istanbul'
					}
				],
			},
			resolve: {
				modulesDirectories: [
					"",
					"lib",
					"node_modules"
				]
			}
		},

		webpackMiddleware: {
			// webpack-dev-middleware configuration
			noInfo: true
		},

		plugins: [
			require("karma-webpack"),
			require("istanbul-instrumenter-loader"),
			require("karma-mocha"),
			require('karma-babel-preprocessor'),
			require("karma-coverage"),
			require("karma-phantomjs-launcher"),
			require("karma-spec-reporter"),
			require("karma-chai-plugins")
		],
		autoWatch: false,
		singleRun: true,

		browsers: ['PhantomJS']
	});
};

Do you see something wrong ?
Ah also this is my tests.webpack.js as you suggested like only point of entry:
const testsContext = require.context('./lib/', true, /.*.spec.js$/);

testsContext.keys().forEach(testsContext);

const componentsContext = require.context('./lib/', true, /\*.js$/);

componentsContext.keys().forEach(componentsContext);

But I'm not sure about my regex for the components :/. My tests and others files are in the same location but the only diff is that the tests files are named : *.spec.js instead of *.js.
But i thought that at the end I should have all files and not only this :

I have two files *.spec.js which are home and page1.
Do you an idea to have others files with 0% coverage ?

aaand there you go https://github.com/deepsweet/istanbul-instrumenter-loader/issues/15

Thnaks @deepsweet :). Mhh what is the good answer ? I don't know what I have to try finally ? :/

unfortunately there is no good answer, that's the way how Istanbul works. you have to somehow require all the sources to get 0% coverage listing even if there are no tests for them.

just to be more clear: istanbul-instrumenter-loader will instrument (i.e. there will be some coverage) only those files that were required by 1. some test(s) 2. you.

Hi
This issue can be closed or not yet ? Just to know, no pression ;)

https://github.com/karma-runner/karma-coverage/pull/251 :(

@deepsweet
I think we should close the issue. The karma-coverage pull request is not going to be merged any time soon as they expect a feature complete pull request instead. Furthermore, I currently lack the time and knowledge to work on it any further...

try https://github.com/mattlewis92/karma-coverage-istanbul-reporter

Getting  SyntaxError: 'import' and 'export' may appear only with 'sourceType: module', If I comment all the code in webpact.test.conf related to  istanbul-instrumenter-loader' there is no error
I believe the following are the relevant files, please take a look:
/** build/webpack.test.conf.js **/
var webpackConfig = merge(baseConfig, {
  // use inline sourcemap for karma-sourcemap-loader
  module: {
    rules: [
      {
        test: /\.ts$/,
        enforce: "pre",
        loader: 'istanbul-instrumenter-loader',
        include: path.resolve('src/'),
        options: {
          compilerOptions: {
            sourceMap: false,
            inlineSourceMap: true
          }
        }
      },
      ...utils.styleLoaders()
    ]
  },
  devtool: '#inline-source-map',
  plugins: [
    new webpack.DefinePlugin({
      'process.env': require('../config/test.env')
    })
  ]
})

/** build/webpack.base.conf.js **/
module.exports = {
  entry: {
    app: './src/main.ts'
  },
  output: {
    path: config.build.assetsRoot,
    filename: '[name].js',
    publicPath: process.env.NODE_ENV === 'production'
      ? config.build.assetsPublicPath
      : config.dev.assetsPublicPath
  },
  resolve: {
    extensions: ['.js','.ts', '.vue', '.json'],
    alias: {
      'vue$': 'vue/dist/vue.esm.js',
      '@': resolve('src')
    }
  },
  module: {
    rules: [
      {
        test: /\.(js|vue)$/,
        loader: 'eslint-loader',
        enforce: 'pre',
        exclude: '/node_modules',
        include: [resolve('src'), resolve('test')],
        options: {
          formatter: require('eslint-friendly-formatter')
        }
      },
      {
        test: /\.js$/,
        loader: 'babel-loader',
        exclude: '/node_modules',
        include: [resolve('src'), resolve('test')]
      },
      {
        test: /\.vue$/,
        loader: 'vue-loader',
        options: vueLoaderConfig
      },
      {
        test:  /\.(ts)$/,
        loader: 'ts-loader',
        options: {
          appendTsSuffixTo: [/\.vue$/]
        }
      }
}

/** tsconfig.json **/
{
  "compilerOptions": {
    "module": "es2015",
    "moduleResolution": "node",
    "types": [
      "node",
      "mocha",
      "sinon-chai"
    ],
    "target": "es5",
    "allowJs": true,
    "rootDirs": ["src"],
    "noImplicitAny": false,
    "experimentalDecorators": true,
    "rootDir": ".",
    "sourceMap": true,
    "strictNullChecks": true,
    "allowSyntheticDefaultImports": true,
    "lib": [
      "es5",
      "dom",
      "es2017",
      "es2015.promise",
      "es2017.object"
    ],
    "baseUrl": "./",
    "paths": {
      "@/*": [
        "src/*"
      ]
    }
  },
  "exclude": [
    "node_modules",
    "src/vue-shim.d.ts"
  ]
}

/** test/unit/karma.conf.js **/
const webpackConfig = require('../../build/webpack.test.conf');

module.exports = function (config) {
  config.set({
    browsers: ['PhantomJS'],
    frameworks: ['mocha', 'sinon-chai'],
    reporters: ['spec', 'coverage'],
    files: ['../../node_modules/babel-polyfill/dist/polyfill.js','./index.js'],
    preprocessors: {
      './index.js': ['webpack', 'sourcemap']
    },
    webpack: webpackConfig,
    webpackMiddleware: {
      noInfo: true,
      stats: 'errors-only'
    },
    coverageReporter: {
      dir: './coverage',
      reporters: [
        { type: 'lcov', subdir: '.' },
        { type: 'text-summary' }
      ]
    }
  })
}

/** test/unit/index.js **/
import Vue from 'vue'

Vue.config.productionTip = false

const testsContext = require.context('./specs', true, /\.spec$/)
testsContext.keys().forEach(testsContext)

const srcContext = require.context('../../src', true, /^\.\/(?!main(\.ts)?$)/)
srcContext.keys().forEach(srcContext)

Why are you running the loader as a pre step on typescript files?  The istanbul loader can not handle typescript as input, only js. So change it to a post loader instead of pre loader and test if this works.
The loader should run as post loader. Furthermore, you need to specify esModule.

Apologies for not putting the updated code, I changed my description but forgot to change the code. I already tried all the steps and have updated the code too, by the @deepsweet mentions esModules and singular esModule, but I tried both and same error

@khanharis87 have you tried Matt Lewis's [karma-coverage-istanbul-reporter][https://github.com/mattlewis92/karma-coverage-istanbul-reporter] with options: {       esModules: true     } ?
I just try and works, thanks to him :heart:

try this:
loader: 'istanbul-instrumenter',
query: {
esModules: true
}
Where exactly (at what level, which property?) does this go? My legacy config has two references to Istanbul, one with typescript. Thanks much.


/eco add @p 100 gives An internal error has occurred!

Sponge: spongeforge-1.10.2-2221-5.1.0-BETA-2185
EcoLite: EconomyLite-6.0.0-2.9.0-16

Can you please add your Sponge versions and EconomyLite versions to the issue description?

I'm runnign SpongeForge 2188, try upgrading just in case something changed. Also, I would use the release version of EconomyLite, the development builds are for API 6, as seen in the file name.

Oh sorry. I can't believe I didn't notice I was running 6
Anyways, here are my current versions:
EconomyLite-5.0.0-2.10.2
spongeforge-1.10.2-2221-5.2.0-BETA-2219
Also, fml-server-latest.log doesn't show anything after running command
[22:12:08] [Server thread/INFO] [nucleus/]: DiamondArrow ran the command: /eco add @p 100 [22:12:16] [Server thread/DEBUG] [FML/]: Gathering id map for writing to world save world [22:12:23] [HikariPool-1 housekeeper/DEBUG] [com.zaxxer.hikari.pool.HikariPool/sponge]: HikariPool-1 - Pool stats (total=17, active=2, idle=15, waiting=0) [22:12:27] [Server thread/INFO] [nucleus/]: DiamondArrow ran the command: /homes

Could you try removing all other plugins temporarily and seeing if anything is causing a conflict with EconomyLite?

The command works with exactly the same mods and economylite config folder on a test server... Is there anything else that may be affecting it?

@DiamondArrow: Does it work with no mods and plugins except for SpongeForge?

Eh... Economylite is for API 6 while SpongeForge is for API 5. Not an issue.

@Flibio It does. It also works with my current mods: As I mentioned on top, I moved mods folder and economylite config to a test server and /eco add @p works. However it still doesnt on the main server (with exact same mods and economylite config). I'm kind of at a loss now of what to do.

@DiamondArrow Use the economylite for the correct API version (5 or 6)

thanks for pointing that out. I changed it after fiblio pointed it out earlier. Same results

Post log again

@DiamondArrow: Did you copy the exact same mod and plugin configs to the test server?

Same mods, brand new config files for them (except for economylite). I double checked my log file there's nothing written after running the command

@DiamondArrow: Could you try copying the configs over and seeing if that causes the error to happen?

Just imported exact same configs. Works just as well.. going to check my world's playerdata

FIXED: Removed a couple corrupted files (0kb) in playerdata and stats folders

Great, I'll keep this in mind if anyone else ever has the same issue.


Drag from "Open File" dialog

Issue Type: Bug

Click File.
Click "Open File...".
Drag a file from the dialog into the editor.
The editor should crash.

VS Code version: Code 1.22.2 (3aeede733d9a3098f7b4bdc1f66b63b0f48c1ef9, 2018-04-12T16:38:45.278Z)
OS version: Windows_NT x64 10.0.16299

System Info

Item
Value

CPUs
Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz (4 x 2712)

Memory (System)
7.94GB (2.04GB free)

Process Argv
C:\Program Files\Microsoft VS Code\Code.exe

Screen Reader
no

VM
0%

Extensions (15)

Extension
Author (truncated)
Version

gitkraken-glo
axo
1.0.2

cacher-vscode
Cac
1.0.3

npm-intellisense
chr
1.3.0

vue-peek
dar
1.0.2

vscode-eslint
dba
1.4.8

gitlens
eam
8.2.4

EditorConfig
Edi
0.12.1

vscode-npm-script
eg2
0.3.3

theme-monokai-pro-vscode
mon
1.1.6

python
ms-
2018.3.1

sublime-keybindings
ms-
3.0.3

debugger-for-chrome
msj
4.3.0

vetur
oct
0.11.7

vscode-docker
Pet
0.0.26

code-settings-sync
Sha
2.9.0

(1 theme extensions excluded)

I'm still seeing this in what appears to be the latest version of vscode on Windows 10:
Version: 1.29.0 (user setup)
Commit: 5f24c93878bd4bc645a4a17c620e2487b11005f9
Date: 2018-11-12T07:47:15.448Z
Electron: 2.0.12
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64
Today I made the same error, inadvertently mixing two different styles of opening a file. I also replicated it with all extensions disabled.

I can confirm that this issue is still present in the latest version of VSCode.
Version: 1.28.2 (user setup)
Commit: 7f3ce96ff4729c91352ae6def877e59c561f4850
Date: 2018-10-17T00:23:51.859Z
Electron: 2.0.9
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

The issue is still present in:
Version: 1.28.2 (user setup)
Date: 2019-03-14
Electron: 3.1.6
Chrome: 66.03359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS version: Windows_NT x64 10.0.15063

Seems to be fixed in the newer releases.
Version: 1.32.3 (user setup)
Commit: a3db5be9b5c6ba46bb7555ec5d60178ecc2eaae4
Date: 2019-03-14T23:43:35.476Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.17134

I am on exactly the same version but the issue still occurs for me.


Use inline SVG for Quotes

What is the context of this PR?
Refactor Quotes to use inline SVGs
How to review
Check Quotes work as expected and example looks as expected

 Use inline SVGs for Quotes


es6 convertion

This Pr if just the boilerplate to create rules for pipelines switching from es5 to es6.
Please discuss the approach taken as well as better solutions to achieve this.
@obuckley-kenzan | @paul-barry-kenzan

Can one of the admins verify this patch?

@cxoltero
Let's start with an issue in this repo first, that can be linked to the parent we made yesterday.  This will help us collate all discussion into one place.  This "local" issue to the repo can then be used for the feature branch name.
One thing we need to determine as part of this effort is the new minimum version of Node required, which should be set in package.json for the engine property.  This is important because upgrading to ES6 features may break backwards compatibility.
I'll add more notes in the parent issue.


RDEV-6144 [Webpack] Remove data-test-id from production builds

just curious, do you see any relevant performance gains. is there any other rational behind?

just curious, do you see any relevant performance gains. is there any other rational behind?

@joaompneves We might start using data-test-id a lot with the migration of Enzyme to React Testing Library. I don't foresee any visible difference to the user with this change, but I'm afraid that the usage of these will start to grow a lot. Might worth a very few milliseconds in some views 😅


Great Work!!!! Few Queries regarding the training details

Hi authors,
I found you work very interesting to further investigate about the paper, I just want to understand about your paper more. I had some queries
(a) What is the estimated training time and the number of GPUs required.
(b) To find the Global direction for each prompt, How the paper has trained the SVM using the Encoder.

Hi authors,
I found you work very interesting to further investigate about the paper, I just want to understand about your paper more. I had some queries (a) What is the estimated training time and the number of GPUs required. (b) To find the Global direction for each prompt, How the paper has trained the SVM using the Encoder.

Thank you for your interest.
(a) We trained the model on a single V100 for about a week.
(b) For the editing directions in the inversion manifold, we perform inversion with our encoder on FFHQ [3] dataset. Here, we have obtained the latent code w and image pairs. An off-the-shelf multi-label classifier is applied to predict the images. We train the SVM to find the hyperplane that distinguishes binary attributes using the latent code w and the corresponding classification result as input. The normal vector of the hyperplane is the attribute editing direction.  We use the multi-label classifier and SVM from the repository https://github.com/clementapa/CelebFaces_Attributes_Classification.


We need a logo

snake with a hat on it seems obvious

If all else fails we can put a hat emoji on a snake emoji :sweat_smile:


Started italian translation

Added new file it.html and italian sectionin translation.txt.
p.s. traslation it's not over

The Italian translation is now over.


Class and Object is not open to extending/overriding

The following cases for Class is the same as for Object.

Cannot add any methods to Class (or Object) with def:

» Class.methods
#» [">", "ancestors", "attr_accessor", "attr_reader", "attr_writer", "extend", "include", "name", "new", "superclass", "!", "!=", "==", "block_given?", "class", "instance_variable_get", "instance_variable_set", "is_a?", "methods", "nil?", "object_id", "puts", "raise", "require", "require_relative", "send", "singleton_class", "sleep", "thread", "to_s"]
» class Class
¤   def zoo
¤     666
¤   end
» end
#»
» Class.methods
#» [">", "ancestors", "attr_accessor", "attr_reader", "attr_writer", "extend", "include", "name", "new", "superclass", "zoo", "!", "!=", "==", "block_given?", "class", "instance_variable_get", "instance_variable_set", "is_a?", "methods", "nil?", "object_id", "puts", "raise", "require", "require_relative", "send", "singleton_class", "sleep", "thread", "to_s"]
» zoo
#» UndefinedMethodError: Undefined Method 'zoo' for <Instance of: Object>
» 1.zoo
#» UndefinedMethodError: Undefined Method 'zoo' for 1

Cannot override the methods in Class (and Object)

» class Class
¤   def name
¤     444
¤   end
» end
#»
» 1.name
#» UndefinedMethodError: Undefined Method 'name' for 1
» Class.name
#» Class
»

I wonder if the behaviors are intentional or not.

@hachi8833 Can you try other built in classes like String or Integer? I want to forbidden builtin classes being monkey-patched, but I don't remember I've implemented it

Other native classes such as Integer can be extensible and overridden.
» class Integer
¤   def foo
¤     42
¤   end
¤   def to_s
¤     99
¤   end
» end
#»
» 1.foo
#» 42
» 1.to_s
#» 99

This is weird, I'll looking into it

@hachi8833 After taking a closer look, I found that it's because your scripts are wrong. Here's how you should test it:
class Class
  def foo
    10
  end
end

puts(Object.foo)

Sorry! It works.


Let gsutil to support Workload Identity Federation authentications (i.e. GitHub OIDC)

TL;DR
It would be nice if gsutil supports Workload Identity Federation, or GitHub OIDC. As README says:

⚠ The bq and gsutil tools do no currently support Workload Identity Federation! You will need to use traditional service account key authentication for now.

but I really want to do this. I believe this is a key feature for GitHub Actions.
Detailed design
No response
Additional information
No response

I also had this issue when implementing WIF. The way forward is to use gcloud alpha storage instead.
See this comment for more context.

@IuryAlves Ah, thank you! So gcloud alpha storage is the next major version of Google Cloud Storage CLI and gsutil is no longer activily developed. Hope README describes it.

This seems to be the case. Although I don't think they have feature parity yet.
For my usecase I needed to copy from a bucket to a local path (i.e gcloud alpha storage cp) and it worked.

Hi @gfx and @IuryAlves
Our team does not control the bq or gsutil CLIs. There's nothing we can do in our GitHub Action to add support - the owners of those CLI tools need to add support for WIF. You can file a support ticket or technical deal blocker with Google Cloud support to request this functionality.
As pointed out, there's also the gcloud alpha storage CLI which is under active development which does support WIF, but might not have 100% feature parity with gsutil. Thanks!


After login / registration, the player is redirected to Lobby page (design Lobby page)

The mock avaters are not showing.

The avatar showing bug has been fixed.


Add static_protocol_name deviation to metadata file for sflow_base_test for Arista

This change updates the metadata.textproto file for Arista for the sflow_base_test to make use of static_protocol_name deviation. This fixes a regression made recently due to a test code change.

Pull Request Functional Test Report for #2562 / cc7269a6b99427969f47f3f792d2aceb80b96a33
Virtual Devices

Device
Test
Test Documentation
Job
Raw Log

Arista cEOS

SFLOW-1: sFlow Configuration and Sampling

Cisco 8000E

SFLOW-1: sFlow Configuration and Sampling

Cisco XRd

SFLOW-1: sFlow Configuration and Sampling

Juniper cPTX

SFLOW-1: sFlow Configuration and Sampling

Juniper ncPTX

SFLOW-1: sFlow Configuration and Sampling

Nokia SR Linux

SFLOW-1: sFlow Configuration and Sampling

Openconfig Lemming

SFLOW-1: sFlow Configuration and Sampling

Hardware Devices

Device
Test
Test Documentation
Raw Log

Arista 7808

SFLOW-1: sFlow Configuration and Sampling

Cisco 8808

SFLOW-1: sFlow Configuration and Sampling

Juniper PTX10008

SFLOW-1: sFlow Configuration and Sampling

Nokia 7250 IXR-10e

SFLOW-1: sFlow Configuration and Sampling

Help

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 52.141%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
1668

Relevant Lines:
3199

💛  - Coveralls


Use LLM to generate default task/method/platform descriptions

ChatGPT, for example, seems at least conversant enough in quantum technologies to write descriptions for taxonomy items with acceptable accuracy. Since users very frequently skip adding an optional description, it'd be great if an LLM API could automatically suggest a "stub" description to users, who would be free to accept, reject, or edit it.

Mentioning that https://github.com/unitaryfund/metriq-app/issues/833 is related.


Fix datetime_picker field locales

The field was using bootstrap-datepicker and pc-bootstrap4-datetimepicker at the same time, the language config wasn't working.
Removed:
packages/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js
Removed:
packages/bootstrap-datepicker/dist/locales/bootstrap-datepicker.'.$field_language.'.min.js'
Added packages/moment/min/locales.min.js, because pc-bootstrap4-datetimepicker uses moment.js locales and not bootstrap-datepicker locales.

Hi @jsvini ,
You're totally right, again 😄  Of course. Thank you, your PR was spot-on. I merged it as-is, and it'll be available with a composer update later today, as version 4.0.21.
Thanks again.
Cheers!


0.8.0: No support for china

Describe the issue
Starting with 0.8.0, support for region china had to be dropped.
We are currently unable to figure out the login mechanism used. If you want to jump in and help us fixing it, we can provide full network traffic.
Workaround: Use bimmer_connected<0.8.0 or the Home Assistant custom component BMW ConnectedDrive China (to be released soon).
Expected behavior
Login to china possible, reuse of existing vehicle endpoints.
Which Home Assistant version are you using?
none
What was the last working version of Home Assistant Core?
No response
What is your region?
China
ConnectedDrive website

[X] I can still successfully login to the BMW ConnectedDrive website and the car status is available there.
[ ] I have ConnectedDrive enabled for my vehicle.

Number of cars

[X] I have 2 or more cars linked to the ConnectedDrive account.
[ ] I have a Mini vehicle linked to my account.

Output of bimmer_connected fingerprint
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response

Hi, I am a bimmer from China. I have figured out the login mechanism in MyBMW. However, I am not a programmer and know nothing about python. You can find the login mechanism in the Siri Shortcuts I wrote for BMW
[https://docs.qq.com/doc/DRG5hVkNPQ0VEVHRt](All Shortcuts download link)
[https://www.icloud.com/shortcuts/eb064e89e6b647d2828a404227b91c4a](MyBMW login Shortcuts)

Hello，BMW ConnectedDrive China    How long is it expected to be released

@muxiachuixue thanks! Unfortunately I am not able to translate what you have written.

"command_url_prefix":"https://myprofile.bmw.com.cn/eadrax-vrccs/v2/presentation/remote-commands/\",
"climate_on_url_postfix":"/climate-now?action=START",
"climate_off_url_postfix":"/climate-now?action=STOP",
"lock_url_postfix":"/door-lock",
"unlock_url_postfix":"/door-unlock",
"light_url_postfix":"/light-flash",
"horn_url_postfix":"/horn-blow",
"event_url_postfix":"eventStatus?eventId=",
"status_url":"https://myprofile.bmw.com.cn/eadrax-vcs/v1/vehicles?apptimezone=480&appDateTime=\",
"status_vin_url_prefix":"https://myprofile.bmw.com.cn/eadrax-vcs/v1/vehicles/\",
"status_vin_url_postfix":"/state?apptimezone=480&appDateTime=",
"token_url":"https://myprofile.bmw.com.cn/eadrax-coas/v1/oauth/token\",
"login_url":"https://myprofile.bmw.com.cn/eadrax-coas/v1/login/pwd\",
"publickey_url":"https://myprofile.bmw.com.cn/eadrax-coas/v1/cop/publickey\",
"jsencrypt_url":"https://gitee.com/ichuixue/bmw_shortcuts/raw/master/BMW_JSEncrypt.js\",
"check_in_url":"https://myprofile.bmw.com.cn/cis/eadrax-community/private-api/v1/mine/check-in\",
"joy_list_url":"https://myprofile.bmw.com.cn/cis/eadrax-membership/api/v2/joy-list\",
"article_list_url":"https://myprofile.bmw.com.cn/cis/eadrax-ocommunity/public-api/v1/article-list\",
"share_article_url":"https://myprofile.bmw.com.cn/cis/eadrax-oarticle/open/article/api/v2/share-article\",
"joy_info_url":"https://myprofile.bmw.com.cn/cis/eadrax-membership/api/v1/joy-info\",

Is this useful?

I will make a clear one for you.

@muxiachuixue thanks! Unfortunately I am not able to translate what you have written. @zhaozengxiao no idea :( If the login issue is understood, will be very quick.

I will make a clear one for you.

@muxiachuxue谢谢！不幸的是，我无法翻译您所写的内容。@zhaozengxiao不知道:( 如果理解登录问题，会很快。

我给你说清楚。

你好，大哥

@rikroe Now the Shortcuts for MyBMW in China will be more easier to read and understand:
MyBMW login
Lock MyBMW
Status of MyBMW
Anything I can help, please let me know.

When I click on one of the shortcuts, it says "not found". Do I need an iPhone for this?

@rikroe I'm just a porter, All his credit @muxiachuixue ，I really want to take the test, thank you

When I click on one of the shortcuts, it says "not found". Do I need an iPhone for this? Also on MacOS I get a "not found".
Just saw your link to BMW_JSEncrypt.js. This is the only thing missing on is how to encrypt the password for login/pwd. From what you posted I understand the password is send using RSA public key encryption.
However I am not able to (re-)create valid passwort hashes that I have seen. Do you only need to encrypt the password? Or More?
EDIT: Nevermind, I figured it out! Will try to implement it before it gets merged into Home Assistant.
EDIT2: got a first implementation working. Will create some tests and then give it to you for testing.

The IOS Shortcuts need the App "Scriptable" to run the JavaScript codes. If you have not installed the App, a "not found" error will come out.
If you need a Chinese BMW account for test, please let me and @zhaozengxiao know.
Thanks again for the efforts.

After installing the bimmer-connected-0.8.1.dev1 version on my raspberry pi 4B, I executed the following command:
bimmerconnected status<PHONE_NUMBER>234 password1234 china
And got the error outputs:
`DEBUG:bimmer_connected.account:Getting vehicle list
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): myprofile.bmw.com.cn:443
DEBUG:urllib3.connectionpool:https://myprofile.bmw.com.cn:443 "GET /eadrax-coas/v1/cop/publickey HTTP/1.1" 200 356
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): myprofile.bmw.com.cn:443
DEBUG:urllib3.connectionpool:https://myprofile.bmw.com.cn:443 "POST /eadrax-coas/v1/login/pwd HTTP/1.1" 200 731
DEBUG:bimmer_connected.account:got new token eyJhbGciOiJIUzI1NiIsInR5xxxxxxxxImV4cCI6MTYzNzc1OTY0NywiaWF0Ijxxxxxxxr5V62o5yw9urSL2IvMG9IzyF7s with expiration date 2021-11-24 13:14:07
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:bimmer_connected.account:Request to: https://myprofile.bmw.com.cn/eadrax-vcs/v1/vehicles
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): myprofile.bmw.com.cn:443
DEBUG:urllib3.connectionpool:https://myprofile.bmw.com.cn:443 "GET /eadrax-vcs/v1/vehicles?apptimezone=480.0&appDateTime=1637727547.929913&tireGuardMode=ENABLED HTTP/1.1" 200 7517
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:bimmer_connected.account:Request to: https://myprofile.bmw.com.cn/eadrax-vcs/v1/vehicles
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): myprofile.bmw.com.cn:443
DEBUG:urllib3.connectionpool:https://myprofile.bmw.com.cn:443 "GET /eadrax-vcs/v1/vehicles?apptimezone=480.0&appDateTime=1637727549.340775&tireGuardMode=ENABLED HTTP/1.1" 200 2
DEBUG:bimmer_connected.account:Getting vehicle list
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:bimmer_connected.account:Request to: https://myprofile.bmw.com.cn/eadrax-vcs/v1/vehicles
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): myprofile.bmw.com.cn:443
DEBUG:urllib3.connectionpool:https://myprofile.bmw.com.cn:443 "GET /eadrax-vcs/v1/vehicles?apptimezone=480.0&appDateTime=1637727550.503834&tireGuardMode=ENABLED HTTP/1.1" 200 7517
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:bimmer_connected.account:Request to: https://myprofile.bmw.com.cn/eadrax-vcs/v1/vehicles
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): myprofile.bmw.com.cn:443
DEBUG:urllib3.connectionpool:https://myprofile.bmw.com.cn:443 "GET /eadrax-vcs/v1/vehicles?apptimezone=480.0&appDateTime=1637727551.604555&tireGuardMode=ENABLED HTTP/1.1" 200 2
Found 1 vehicles: 325i
VIN: LBV5F340ABCD01234
Mileage: (13547, 'km')
Vehicle data:
DEBUG:bimmer_connected.vehicle_status:No data available for attribute <function VehicleStatus.charging_level_hv at 0xb56f18e8>!
ValueError: '已上锁' is not a valid LockState
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/.local/bin/bimmerconnected", line 10, in
sys.exit(main())
File "/home/pi/.local/lib/python3.7/site-packages/bimmer_connected/cli.py", line 279, in main
args.func(args)
File "/home/pi/.local/lib/python3.7/site-packages/bimmer_connected/cli.py", line 117, in get_status
print(to_json(vehicle, indent=4))
File "/home/pi/.local/lib/python3.7/site-packages/bimmer_connected/utils.py", line 41, in to_json
return json.dumps(obj, default=serialize, *args, **kwargs)
File "/usr/lib/python3.7/json/init.py", line 238, in dumps
**kw).encode(obj)
File "/usr/lib/python3.7/json/encoder.py", line 201, in encode
chunks = list(chunks)
File "/usr/lib/python3.7/json/encoder.py", line 439, in _iterencode
yield from _iterencode(o, _current_indent_level)
File "/usr/lib/python3.7/json/encoder.py", line 431, in _iterencode
yield from _iterencode_dict(o, _current_indent_level)
File "/usr/lib/python3.7/json/encoder.py", line 405, in _iterencode_dict
yield from chunks
File "/usr/lib/python3.7/json/encoder.py", line 438, in _iterencode
o = _default(o)
File "/home/pi/.local/lib/python3.7/site-packages/bimmer_connected/utils.py", line 40, in serialize
return getattr(obj, 'to_json',  getattr(obj, 'dict') if hasattr(obj, 'dict') else str(obj))
File "/home/pi/.local/lib/python3.7/site-packages/bimmer_connected/utils.py", line 64, in to_json
return serialize_for_json(self)
File "/home/pi/.local/lib/python3.7/site-packages/bimmer_connected/utils.py", line 25, in serialize_for_json
**{a: getattr(obj, a) for a in get_class_property_names(obj) if a not in excluded + ["to_json"]}
File "/home/pi/.local/lib/python3.7/site-packages/bimmer_connected/utils.py", line 25, in
**{a: getattr(obj, a) for a in get_class_property_names(obj) if a not in excluded + ["to_json"]}
File "/home/pi/.local/lib/python3.7/site-packages/bimmer_connected/vehicle_status.py", line 140, in _func_wrapper
return func(self, *args, **kwargs)
File "/home/pi/.local/lib/python3.7/site-packages/bimmer_connected/vehicle_status.py", line 306, in door_lock_state
return LockState(self.status['doorsGeneralState'].upper())
File "/usr/lib/python3.7/enum.py", line 310, in call
return cls.new(cls, value)
File "/usr/lib/python3.7/enum.py", line 564, in new
raise exc
File "/usr/lib/python3.7/enum.py", line 548, in new
result = cls.missing(value)
File "/usr/lib/python3.7/enum.py", line 577, in missing
raise ValueError("%r is not a valid %s" % (value, cls.name))
ValueError: '已上锁' is not a valid LockState
`

@rikroe Thank you for your efforts!I want to know how to use the new version in Home Assistant?Thank you！！！

@muxiachuixue ouch, seems the API is returning chinese instead of english...
Could you please try one thing for me and and edit /home/pi/.local/lib/python3.7/site-packages/bimmer_connected/account.py L272-L276 so it looks like this (added accept-language):
        headers = {
            "accept": "application/json",
            "x-user-agent": X_USER_AGENT.format(brand.value),
            "Authorization": "Bearer {}".format(self._oauth_token),
            "accept-language": "en",
        }

Let me know if that works for you!

@muxiachuixue ouch, seems the API is returning chinese instead of english...
Could you please try one thing for me and and edit /home/pi/.local/lib/python3.7/site-packages/bimmer_connected/account.py L272-L276 so it looks like this (added accept-language):
        headers = {
            "accept": "application/json",
            "x-user-agent": X_USER_AGENT.format(brand.value),
            "Authorization": "Bearer {}".format(self._oauth_token),
            "accept-language": "en",
        }

Let me know if that works for you!
@zhaozengxiao it just got merged into Home Assistant, so it should be included in the next major version.

After adding the "accept-language" line as you told, I can get the correct outputs of the car status json data. However, before the json data, you can see the following lines. Is it OK?
`DEBUG:bimmer_connected.account:Getting vehicle list
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): myprofile.bmw.com.cn:443
DEBUG:urllib3.connectionpool:https://myprofile.bmw.com.cn:443 "GET /eadrax-coas/v1/cop/publickey HTTP/1.1" 200 356
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): myprofile.bmw.com.cn:443
DEBUG:urllib3.connectionpool:https://myprofile.bmw.com.cn:443 "POST /eadrax-coas/v1/login/pwd HTTP/1.1" 200 731
DEBUG:bimmer_connected.account:got new token eyJhbGciOiJIUzI1NiIsIxxxxxBJDE2Mzc4MTAyMjUwNTMiLCJuYmYiOjE2Mxxxxxx3ODEwMjI1fQ._F33fIjXbh5Sn0srxxxxxpcQWTqdVBY with expiration date 2021-11-25 04:12:05
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:bimmer_connected.account:Request to: https://myprofile.bmw.com.cn/eadrax-vcs/v1/vehicles
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): myprofile.bmw.com.cn:443
DEBUG:urllib3.connectionpool:https://myprofile.bmw.com.cn:443 "GET /eadrax-vcs/v1/vehicles?apptimezone=480.0&appDateTime=1637781425.01832&tireGuardMode=ENABLED HTTP/1.1" 200 7410
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:bimmer_connected.account:Request to: https://myprofile.bmw.com.cn/eadrax-vcs/v1/vehicles
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): myprofile.bmw.com.cn:443
DEBUG:urllib3.connectionpool:https://myprofile.bmw.com.cn:443 "GET /eadrax-vcs/v1/vehicles?apptimezone=480.0&appDateTime=1637781426.85447&tireGuardMode=ENABLED HTTP/1.1" 200 2
DEBUG:bimmer_connected.account:Getting vehicle list
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:bimmer_connected.account:Request to: https://myprofile.bmw.com.cn/eadrax-vcs/v1/vehicles
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): myprofile.bmw.com.cn:443
DEBUG:urllib3.connectionpool:https://myprofile.bmw.com.cn:443 "GET /eadrax-vcs/v1/vehicles?apptimezone=480.0&appDateTime=1637781429.366527&tireGuardMode=ENABLED HTTP/1.1" 200 7410
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:bimmer_connected.account:Request to: https://myprofile.bmw.com.cn/eadrax-vcs/v1/vehicles
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): myprofile.bmw.com.cn:443
DEBUG:urllib3.connectionpool:https://myprofile.bmw.com.cn:443 "GET /eadrax-vcs/v1/vehicles?apptimezone=480.0&appDateTime=1637781430.841364&tireGuardMode=ENABLED HTTP/1.1" 200 2
Found 1 vehicles: 325i
VIN: LBV5F340XLMX56669
Mileage: (13569, 'km')
Vehicle data:
DEBUG:bimmer_connected.vehicle_status:No data available for attribute <function VehicleStatus.charging_level_hv at 0xb56c1858>!
{
"attributes": {
"vin": "LBV5F340XLMX56669",
"vehicleType": "connected",
"licensePlate": "\u6caaB61A52",
"cdActiveStatus": "ACTIVATED",
...
}
`

It is quite strange that, the car status json data from the IOS shortcut shows less information than the data from your bimmerconnected program in linux. The POST request is like this in IOS shortcut:
`GET  'https://myprofile.bmw.com.cn/eadrax-vcs/v1/vehicles?apptimezone=480.0&appDateTime=1637781426.85447&tireGuardMode=ENABLED'
Header:
{
"accept":"application/json"
"Authorization":"Bearer $access_token",
"x-user-agent":"ios(14.8);bmw;1.4.0(7743)"
"accept-language":"en"
}`
What did I miss?

Thanks, this is looking good then!

@rikroe    Hello, I am a beginner in python. After I pull the package, what command should I use to test? ? ?

It is not a implemented in the official package yet, I will do that after work and let you know.
Also I'll give you the command you need to use.

It is not a implemented in the official package yet, I will do that after work and let you know.
Also I'll give you the command you need to use.

Thanks  @rikroe

It is not a implemented in the official package yet, I will do that after work and let you know.
Also I'll give you the command you need to use.

bimmerconnected status<PHONE_NUMBER>234 password1234 china

It is not a implemented in the official package yet, I will do that after work and let you know.
Also I'll give you the command you need to use.

bimmerconnected status<PHONE_NUMBER>234 password1234 china

Thanks  @muxiachuixue

Just released <IP_ADDRESS>b1.
It can be installed via pip3 install --upgrade bimmer_connected==<IP_ADDRESS>b1 and should continue the fix for chinese responses in the My BMW API.

Just released <IP_ADDRESS>b1.
It can be installed via pip3 install --upgrade bimmer_connected==<IP_ADDRESS>b1 and should continue the fix for chinese responses in the My BMW API.
I have just updated the custom component as well to try it out.

Nice, I have tried the HA custom component <IP_ADDRESS>b4. It works well. Thanks again.


AllenNLP version

Code breaks with AllenNLP version 1.0, works with 0.8.
Not a bug, could save someone's time if specified in your ReadMe.
Thanks 😄

Duly noted. Will update, thanks!


OpenTelemetry in Practice Blog Announcement

(With edits by @chalin)
Blog about the OpenTelemetry in Practice event on Aug 23rd
To-do before publishing:

[x] add the Zoom link from the OpenTelemetry public calendar - this is stuck behind finding someone who can edit the calendar

https://github.com/open-telemetry/community/issues/1130

[x] Remove the "draft" tag (not doing this until the link is there)
[x] Resolve TODO items in the page front matter and then remove those comments
[x] Update the blog publication date to the day it's published
[ ] link this from the end user resources post that is currently in the banner

Preview: https://deploy-preview-1618--opentelemetry.netlify.app/blog/2022/otel-in-practice

I think I just removed the yaml file but lmk if that's not the case - I'm pretty new to GitPod. Appreciate you taking time to draw attention to this issue for those of us who don't necessarily want to build the project locally just to change or draft text.

PS: scheduled to receive the zoom link in a little so we should be able to publish this tomorrow or later tonight!

All: is this good to go? @svrnm in particular since you had previously asked for some changes.

Believe this is ready for merge once @svrnm approves changes.
The link from the end user resources post I mentioned at the top isn't blocking, I actually need to do that after I land this because it will 404 if I do it before.
thanks everyone!

It's the middle of the night for @svrnm. I've double checked that all of his original concerns have been addressed. Would you like for me to merge now @musingvirtual?

@chalin thank you so much for all your help with this pr. Yes I think it's
ready to go if you agree!
On Wed, Aug 17, 2022, 4:08 PM Patrice Chalin @.***>
wrote:

It's the middle of the night for @svrnm https://github.com/svrnm. I've
double checked that all of his original concerns have been addressed. Would
you like for me to merge now @musingvirtual
https://github.com/musingvirtual?
—
Reply to this email directly, view it on GitHub
https://github.com/open-telemetry/opentelemetry.io/pull/1618#issuecomment-1218538719,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAMWYDFLX5FYJXXTOL5L5V3VZVPF5ANCNFSM56JQFSLQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

We've got two approvals, and @svrnm's comments have been addresses, so I'll merge now.

Thanks all!

And it's live: https://opentelemetry.io/blog/2022/otel-in-practice/


🐛 BUG:

Which Cloudflare product(s) does this pertain to?
Wrangler
What version of Wrangler are you using?
2.17.0
What operating system are you using?
Mac
Describe the Bug
I am trying to use a Cloudflare Worker to build a function that makes API calls to OpenAI.
I followed the instructions here to set up my Worker: https://developers.cloudflare.com/workers/get-started/guide/
and I have my function wrapped in a handler in my index.js file.
When I run wrangler publish it gives me this error:
Uncaught ReferenceError: process is not defined     at index.js:2625:11    [code: 10021]
How can I fix this?

Thanks for reporting this! Unlike in NodeJS, the process global is not defined in the Cloudflare Workers runtime, which is based on web standards. The Cloudflare Developers Discord is a great place to ask questions around general Workers development, and they should be able to point you in the right direction (in this case, it's likely that one of your dependencies isn't supported in the Cloudflare Workers runtime environment)


Service shuts down on startup with 504 Gateway Timeout

Govee Device SKU
any
Govee2MQTT Version
2024.07.21-c9d27764
Describe the issue
govee2mqtt is currently failing on startup with a 504 Gateway Timeout from the API.
Based on users currently reporting Govee app issues on this old resurrected Reddit thread, it appears to be a server-side issue and no remediation in govee2mqtt should be required. I'm opening an issue for tracking and to provide a searchable artifact if it happens in the future. I'll close the issue when the issue clears up.
Startup Diagnostics
govee2mqtt | [2024-07-30T19:31:50 INFO  govee::commands::serve] Starting service. version 2024.07.21-c9d27764
govee2mqtt | [2024-07-30T19:31:50 INFO  govee::commands::serve] Querying platform API for device list
govee2mqtt | Error: request https://openapi.api.govee.com/router/api/v1/user/devices status 504: Gateway Timeout. Response body:
govee2mqtt | <title>504 Gateway Time-out</title>
govee2mqtt |
govee2mqtt |
504 Gateway Time-out

govee2mqtt |
govee2mqtt |
govee2mqtt |
govee2mqtt |
govee2mqtt | Stack backtrace:
govee2mqtt |    0: anyhow::error::<impl anyhow::Error>::msg
govee2mqtt |    1: anyhow::__private::format_err
govee2mqtt |    2: govee::cache::CacheResult<T>::into_result
govee2mqtt |    3: govee::platform_api::GoveeApiClient::get_devices::{{closure}}
govee2mqtt |    4: govee::commands::serve::ServeCommand::run::{{closure}}
govee2mqtt |    5: govee::Args::run::{{closure}}
govee2mqtt |    6: tokio::runtime::park::CachedParkThread::block_on
govee2mqtt |    7: tokio::runtime::context::runtime::enter_runtime
govee2mqtt |    8: tokio::runtime::runtime::Runtime::block_on
govee2mqtt |    9: govee::main
govee2mqtt |   10: std::sys_common::backtrace::__rust_begin_short_backtrace
govee2mqtt |   11: std::rt::lang_start::{{closure}}
govee2mqtt |   12: std::rt::lang_start_internal
govee2mqtt |   13: main

Additional Logs
No response
Home Assistant Logs
No response
Anything else?
No response

Having the same issue here.

Also having the issue with openapi.api.govee.com
curl --request GET
--url https://openapi.api.govee.com/v1/devices
--header 'Govee-API-Key: '
--header 'accept: application/json'

504 Gateway Time-out

504 Gateway Time-out

This URL of developer-api.govee.com seems to be functioning just fine
curl --request GET
--url https://developer-api.govee.com/v1/devices
--header 'Govee-API-Key: '
--header 'accept: application/json'
{"data":{"devices":[]...,"message":"Success","code":200}

I've noticed the same issue, clearly a Govee side issue, hopefully just temporary and not a breaking change for the integration.
With local LAN control enabled on the devices and govee2mqtt talking locally to the devices is there a way to avoid issues should the internet go down or some other Govee issue like this? Is this integration 100% reliant on the cloud hosted Govee API to function? Or was I unlucky because I restarted HA while Govee had an issue and then purged caches in an attempt to get this working?
Is govee2mqtt simply trying to speak to the Govee cloud API for a list of devices to then talk locally to?
For info there is a similar more recent Redit post here talking about server issues with many people reporting them with the standard Govee app: https://www.reddit.com/r/Govee/comments/1eg6rj1/network_error/
Interestingly my Govee app works fine but I believe I am able to control my devices via Bluetooth at the moment rather than Wi-Fi if I'm correct.

Now when I try to start the addin I get this error “status 500: Internal Server Error.”

Now it is all working again for me!


Insecure implementation of OpenResty ngx.req.set_uri + memory content  leak in nginx, does kong have this security flaw？

nginx <= v1.17.7 (commit af8ea176a743e97d767b3e1439d549b52dd0367a)
openresty <= v<IP_ADDRESS>
Summary
https://www.openwall.com/lists/oss-security/2020/03/18/1

We do not have any code that calls it. So closing this.


⚠ Bofrost.be has degraded performance

In ed34613, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 1800 ms

Resolved: Bofrost.be performance has improved in 9491606 after 36 minutes.


[BUG] Result is in status failed. Value is not set.

Hello all,
I am encountering what appears to be a bug.
GOAL:
In some methods, I want to return a Result such as "User", so I query the User, and the User is wrapped by a Results object.
I see in the demo code, that you can wrap an Object like this:

In my code, when I do this, I get the error:
Result is in status failed. Value is not set.  and Result.Value appears to throw an excpetion.
Here is my code:

Error:

I get the same error when I do any of the following combinations (these are not in the demo code, I was just problem solving and trying to find a working  @scenerio)
Result.Fail<AeonicProxyDto>("This is the error message explaining details of why it failed...").ToResult();
Result.Fail<AeonicProxyDto>("This is the error message explaining details of why it failed...").ToResult<AeonicProxyDto>()
 Result.Fail("This is the error message explaining details of why it failed...").ToResult<AeonicProxyDto>();
From what I can see, my code is the same as the examples.  If I remove the  from the Results<Object> making it like Result instead, the method throws an error, and I must also remove the  from the method.  This prevents me from returning the User Object.

326 stars on this repository, it looks great! I can't imagine this is a bug with that many stars, but with that said I do not know what I am doing wrong.
Can someone please advise?
@altmann

Hi. The short answer is that I think that the result object will be serialized in your code because it is part of the return type of the Controller action. Therefore all properties are serialized - also .Value property. If you try to access the Value property of a failed result you get an exception.
Long answer will come tomorrow. Good night

@altmann Thank you for your quick response!
I have implemented the entire FluentResults library in one of my microservices, and plan to do it for the others once I get a handle on this.
Here is a demo repository I made with the issues I encountered:
https://github.com/jeffward01/FluentResultsExplore (This runs better when you start the console app in full screen maximized mode)
Questions:

What is the difference between Result<Object>.Value and Result.<Object>.DefaultValue?

What is the proper way of returning an Error (Fail) while using Result<Object> as a return type on method?

What is the proper way to return a successful result? Is it:
A.)  someResultFromMethod.ToResult()
B.) Result.Ok(someResultFromMethod)

Thanks for the help! I appreciate it!

Now the long version.
Answer to your first post
You return an object of OkObjectResult from the controller method. You pass an object of FluentResult Result into the constructor of OkObjectResult. This causes that the FluentResult Result object is serialized into Json/xml or whatever. During the serialization all properties from the FluentResult Result object are mapped into json. This means that the serialization logic access all properties of the FluentResult Result object.
IsSuccess or IsFailed Properties for example are safe during the serialization but .Value is not safe. Value Property should only be accessed if it is a success result because the Value can only be set if its an success result. A failed result has no Value set and therefore accessing .Value property makes no sense. To protect devs from bugs accessing Value property of a failed success throws an exception. (details see #81)
There is another property ValueOrDefault. You can access this property in failed and success state. If result object is in success state then ValueOrDefault return the setted Value. If result object is in failed state then ValueOrDefault return the default value of the type of the Value for example integer 0, int? null, etc. Details see readme
My suggestion: Don't use the FluentResult Result object as return type of public controller methods. Create an ResultDto and use that as return type. Details and example see here
Answer to your second post

I don't know what you mean with DefaultValue. If you mean ValueOrDefault then see readme or above answer
Result.Fail<Object>("My error message"); details see readme
Result.Ok(5); or Result.Ok(new Dto(...) If you want to transform an result object to another result object that you can read that

I hope this explanations help you in your project. If not please let me know. I put much energy into writing the readme and the examples. I think all the important use cases are documented there.

Hello!
(I included summarized replies and questions at the bottom of this reply)
Thank you for this! It is very helpful to know that we should use a ResultDto object. (I did see this in the documentation, but all of your examples are for Result and not Result<object> so I was unsure if the process was the same. The documentation you provided is very helpful! I did not see many examples for Result<object>,  which left me with some questions regarding Result<object>.
Question:

You return an object of OkObjectResult from the controller method. You pass an object of FluentResult Result into the constructor of OkObjectResult. This causes that the FluentResult Result object is serialized into Json/xml or whatever. During the serialization all properties from the FluentResult Result object are mapped into json. This means that the serialization logic access all properties of the FluentResult Result object.

Yes you are correct here, however in the Demo Console App I attached, I do not pass the object to a new OkObjectResult() builder, and the error still persists. (See screenshots below)
Can you please run the console app, or examine the service code:
https://github.com/jeffward01/FluentResultsExplore (This runs better when you start the console app in full screen maximized mode)
Here is my service.cs class, this is what you want to see.
This service class will produce an error:

This is how the result is handled, an exception is thrown, and I do not cast it to another object such as  new OkObjectResult()

At our company, we like your Library very much, we  aim to build a 'wrapper' around it, mainly to accomplish:

Have a unified Result Response for our API endpoints (https://developers.facebook.com/docs/graph-api/using-graph-api/error-handling) with errors and other meta-data

The ResultDTO answer you gave is very helpful! We will implement this for the  new OkObjectResult() , do we also need to implement this scenerios like the Demo Console App above?

Replies to your answers:
I don't know what you mean with DefaultValue. If you mean ValueOrDefault then see readme or above answer
Result.Fail("My error message"); details see readme
Result.Ok(5); or Result.Ok(new Dto(...) If you want to transform an result object to another result object that you can read that

I don't know what you mean with DefaultValue. If you mean ValueOrDefault then see readme or above answer
Result.Fail<Object>("My error message"); details see readme
Result.Ok(5); or Result.Ok(new Dto(...) If you want to transform an result object to another result object that you can read that

1 - Yes you are correct
2 - Thank you I will investigate!
3 - Basically my question here is "What is the proper way to return an object using the Result<object> wrapper. Please see my Demo Console App.

** Summarized questions from this reply for you are compiled below:**
1 - What is the proper way to handle Result<Object>? Please refer to the Demo App. This throws and exception, I believe I am using your library correctly, but we receive an exception:  Result is in status failed. Value is not set. <-- This is the main question, I get an error, and I do not know what I am doing wrong.
2 - Is there a reason why ResultDto is not included in the library? We have no issue implementing this, just thinking that if this is required to not receive serialization errors in some scenarios, the library might receive benefit from refactor to include this.
Thank you again for being active on your library!

You access .Value in the console app, line 69. This throws an exception if the result is in failed state.
ResultDto is not part of the lib because in most use cases its very project specific. Some project need a errorcode property, some not, some want a error description, some not.


Add support for HashMap & BTreeMap with parseable keys

I'm working on a prototype where I have hashmaps that use a custom type as key:
#[derive(Reconcile, Hydrate)]
pub struct Document {
    stuff: HashMap<CustomKey, String>,
}

where CustomKey cannot implement either AsRef<str> or From<String>, which mean the derives for Reconcile and Hydrate fail.
I'm suggesting adding support for HashMap<K, V> & BTreeMap<K, V> where Hydrate requires K: FromStr (which is fallible), and Reconcile requires K: ToString.  I wrote the following module, that I use with autosurgeon(with=...):

(Long code listing)
mod autosurgeon_hashmap_parseable_keys {
    use std::{collections::HashMap, hash::Hash, str::FromStr};

    use automerge::{ObjId, ObjType, Value};
    use autosurgeon::{
        reconcile::{LoadKey, MapReconciler},
        Hydrate, HydrateError, Prop, ReadDoc, Reconcile, Reconciler,
    };

    pub fn reconcile<R, K, V>(items: &HashMap<K, V>, mut reconciler: R) -> Result<(), R::Error>
    where
        R: Reconciler,
        K: ToString,
        V: Reconcile,
    {
        let mut m = reconciler.map()?;
        for (k, val) in items {
            let k = k.to_string();
            if let LoadKey::Found(new_key) = val.key() {
                if let LoadKey::Found(existing_key) = m.hydrate_entry_key::<V, _>(&k)? {
                    if existing_key != new_key {
                        m.replace(k, val)?;
                        continue;
                    }
                }
            }
            m.put(k, val)?;
        }
        Ok(())
    }

    pub fn hydrate<'a, D, K, V>(
        doc: &D,
        obj: &ObjId,
        prop: Prop<'a>,
    ) -> Result<HashMap<K, V>, HydrateError>
    where
        D: ReadDoc,
        K: FromStr + Eq + Hash,
        K::Err: ToString,
        V: Hydrate,
    {
        let obj = match doc.get(obj, &prop)? {
            Some((Value::Object(ObjType::Map), id)) => id,
            _ => {
                return Err(HydrateError::unexpected(
                    "a map",
                    "something else".to_string(),
                ))
            }
        };
        let Some(obj_type) = doc.object_type(&obj) else {
            return Err(HydrateError::unexpected("a map", "a scalar value".to_string()))
        };
        match obj_type {
            ObjType::Map | ObjType::Table => {
                let mut result = HashMap::new();
                for (key, _, _) in doc.map_range(&obj, ..) {
                    let column_key = K::from_str(key).map_err(|err| {
                        // FIXME this is an abuse of `Unexpected::Other`
                        HydrateError::Unexpected(autosurgeon::hydrate::Unexpected::Other {
                            expected: err.to_string(),
                            found: key.to_owned(),
                        })
                    })?;
                    let val = V::hydrate(doc, &obj, key.into())?;
                    result.insert(column_key, val);
                }
                Ok(result)
            }
            ObjType::Text => Err(HydrateError::unexpected(
                "a map",
                "a text object".to_string(),
            )),
            ObjType::List => Err(HydrateError::unexpected(
                "a map",
                "a list object".to_string(),
            )),
        }
    }
}

If you think that's a good thing to have in autosurgeon, I'm happy to make a PR.  I think I'd also need to add a variant HydrateError::Parse(Box<dyn Error>) or something akin to that, which would wrap a parse error from FromStr.

I think this would be a good addition. How do you thing we should expose this? As a module with a note in the documentation at the top level about how to use this in a with= attribute? We can't really add the implementation for maps directly without conflicting with the AsRef<str> definition, which I would think is more useful.

I think it makes most sense as a module, yep :+1: I'll get started on a PR


Too much disk activity and CPU time in Store._flush()

I record breadcrumbs at a fast rate and that triggers disk writes and CPU usage mostly attributed to writeFileSync in Store._flush().
Is it possible to prevent Sentry from calling that code entirely, that is, from logging last breadcrumbs to a file?

I described this inaccurately


When using manual completion, insert the text of the first entry automatically

This is related to https://github.com/hrsh7th/nvim-compe/issues/202, but slightly different.
When using manual completion, triggering completion doesn't automatically insert the text of the first entry. This means manual completion requires at least two steps when you want the first entry:

Trigger the initial completion to show suggestions
Navigate to the first entry manually

It would be nice if there was a way to not just select the first entry in the menu (using the preselect option), but to also have its text inserted automatically.

I think it is not good idea.
I suggest to realize it by <CR> and preselect = 'always'.
If you can't agree, please clarify it more detailed.

@hrsh7th That doesn't quite achieve the same ease of use, as you still need to manually confirm the first entry. Consider the following example:
Vec::with_|

Here | is the cursor location. When using manual completion, chances are the number of matches is small, as completion starts later compared to auto completion. In fact, I find that most of the time there are only a few matches, with the first one usually being the one I want to have inserted. Imagine that for the above example, there are two possible matches:

Vec::with_capacity()
Vec::with_capacity_in()

Most of the time I want Vec::with_capacity(). In coc.nvim this works nicely, because it matches the shortest match first. Combined with my feature request, this means that in most cases I just need to trigger completion to get my results, without also having to confirm the selection (or making the selection in the first place). Since I have completion mapped to tab, this means I can complete most code with a single key press.
With compe this isn't possible at the moment, and instead requires a more tedious process of:

Triggering completion (e.g. using tab)
Selecting the first entry yourself
Confirming the selection

I think this issue fixed by https://github.com/hrsh7th/nvim-compe/commit/398b06ccc9863f068e9103a7f8403f363f0d7bcb
I don't think #202 is good but this issue is reasonable.

@hrsh7th Thanks! This helps a lot :smile:


Link on farmOS.org

Hi @bitsecondal ! Thanks for creating this module!
Would you like me to add a link to it on farmOS.org?
It would appear under "Other modules" on this page: http://farmos.org/development/projects/
I would be happy to add your name/organization to the list of farmOS supporters too, if you'd like: http://farmos.org/community/supporters/

@mstenta Yes link can be placed on the FarmOS website.
Please use "Kenny Robinson" is the individual name to be listed on the website.

Done! Thanks again for the contributions!


[Enhancement] Support restore/rollback sync during conversion (1/2)

Important Read

Aim to address #40

What is the purpose of the pull request
Previously, if a rollback/restore occurred in the source table, XTable would reflect it as file changes (added or deleted) in the target table. In this PR, we aim to improve this by issuing a rollback command in the target tables, ensuring more consistent histories between the source and target. This approach is also more efficient, as it allows us to restore directly to a specific version/snapshot instead of computing a large diff against the table’s current state.
Brief change log
This is the first part of this enhancement (1/2), focusing primarily on supporting commit-level information for all target table formats and the ability to locate certain target commit with given source identifier.

Add a source identifier in target transaction

snapshot ID in Iceberg, version ID in Delta, and instant timestamp in Hudi

Locate target commit with given source identifier

Additional Info
Fallback scenarios
Fallback will happen when a rollback or restore is detected in the source table, but the corresponding commit is not found in the target table. We will still leverage the rollback information from the source, but this round of sync will be treated as file changes in the target table, following the previous behavior.
Here’s an example:
Iceberg (Source)          Delta (Target)
┌────────────┐      ┌─────────────────────┐
│ Snapshot 0 │ ◀  ▶ │ Version 0 (Synced)  │
│ Snapshot 1 │ ◀  ▶ │ Version 1 (Synced)  │
│ Snapshot 2 │ ◀  ▶ │ Version 2 (Synced)  │
│ Snapshot 3 │ ◀  ▶ │ Version 3 (Synced)  │
│ Snapshot 4 │      │                     │
│ Snapshot 5 │ ◀  ▶ │ Version 4 (Synced)  │
└────────────┘      └─────────────────────┘

If rollback to Snapshot 0, 1, 2, 3, 5, can find a corresponding commit in target
If rollback to snapshot 4, can not find a corresponding commit in target. This makes it impossible to issue a rollback command, but we can still make use of the info of source snapshot to issue a file changes

In this case, we can not guarantee complete metadata consistency between the source and target, but it helps reduce some computation.
Verify this pull request
This pull request is already covered by existing tests, all existing tests should pass

@danielhumanmod Thanks for looking into it. I think being able to store this at a commit level better aligns with my our intentions so it would be great to fix this.

Thanks for the suggestions @the-other-tim-brown ! I have updated the code in latest commit, including changes:

All XTABLE_METADATA are commit level across 3 table format
Adjust getTargetCommitIdentifier method
Refactor metadata retrieval logic in `HudiConversionTarget'
Added test cases for empty target commit identifier.

Appreciate any further suggestion in advanced!


PySide6 compatibility

I was using guidata with PySide6 with no problems, with the following versions:
PySide==6.4.2
guidata==2.3.0
After updating both to the lastet packages (PySide=6.5.2, guidata==3.0.4), I get an error importing QVariant.
As noted in the QT6 for python doc, QVariant was removed:
https://doc.qt.io/qtforpython-6/considerations.html
In the guidata site, I see only PyQt5 is supported.
Is PySide6 planned to be supported on the future ?

Thanks for the feedback.
The only QVariant import in the code was introduced when adding typing annotations, but it's clearly a mistake: thanks for pointing that out.
In other words, PySide6 is already supported.


Wallet-API: add tokens

Purpose
Add entrypoint to wallet API to add CIS-2 tokens to the view.
Checklist

[x] My code follows the style of this project.
[x]  The code compiles without warnings.
[x] I have performed a self-review of the changes.
[x] I have documented my code, in particular the intent of the
hard-to-understand areas.
[x] (If necessary) I have updated the CHANGELOG.

I probably need to add the details view to this page.

I probably need to add the details view to this page.

Should be relatively easy. You can see how it can be done in #148 for the pages/Account/AddTokens/AddTokens.tsx@Details component


Set Doc title to clientAppName

Hoist P/R Checklist
Pull request authors: Review and check off the below. Items that do not apply can also be
checked off to indicate they have been considered. If unclear if a step is relevant, please leave
unchecked and note in comments.

[X] Caught up with develop branch as of last change.
[X] Added CHANGELOG entry, or determined not required.
[X] Reviewed for breaking changes, added breaking-change label + CHANGELOG if so.
[X] Updated doc comments / prop-types, or determined not required.
[X] Reviewed and tested on Mobile, or determined not required.
[X] Created Toolbox branch / PR, or determined not required.

If your change is still a WIP, please use the "Create draft pull request" option in the split
button below to indicate it is not ready yet for a final review.

Pull request reviewers: when merging this P/R, please consider using a squash commit to
collapse multiple intermediate commits into a single commit representing the overall feature
change. This helps keep the commit log clean and easy to scan across releases. PRs containing a
single commit should be rebased when possible.

Followed your suggestion @amcclain
Please note that I tried to preset this a little bit earlier -- before environmentService loads -- and then again after environmentService to append the environment name.  That was giving a strange eslint warning regarding non-atomic sets.  I think its clearer to just set it once anyway.
Ultimately, we have a bit of flashing of the original 'appName' -- but I don't think that is bad -- its going to  useful in case the app doesn't get past environmentService loading, we would like the document title to be set to something!


Make possible to add params on URI and by queryParams simultaneously for Http Requests

As software engineer I would like to be possible have query parameter on my URI and on queryParams block.
            "name": "find_combing_url_and_query_params",
            "url": "/api/v1/search/persons?lang=Amazing",
            "operation": "GET",
            "request": {
                "queryParams": {
                    "city": "Lon"
                }
            },
            "assertions": {
                "status": 200,
                "body" : {
                    "exactMatches" : true,
                    "name" : "Mr Bean",
                    "lang" : "Amazing",
                    "city" : "Lon"
                }
            }
        }

Today it's no possible, and what happen is an error of bad format url.
like :
/api/v1/search/persons?lang=Amazing?city=Lon

I just code a solution for this, and I gonna open a PR, is little similar at was discussed in https://github.com/authorjapps/zerocode/issues/148.
I made some refactor and use Apache URI Builder to handle with that, and others possibles situations

To be available in 1.3.19


Fix/capture nextflow outputs

Getting the run log for running nextflow jobs has been failing due to failed nextflow log ${jobid} process. This PR seeks to create a backup process for aggregating the run logs that isn't based on the nextflow log command

Codecov Report

Merging #31 (a83ad87) into develop (4432563) will decrease coverage by 5.73%.
The diff coverage is 23.05%.

:exclamation: Current head a83ad87 differs from pull request most recent head b68ab1a. Consider uploading reports for the commit b68ab1a to get more accurate results

@@              Coverage Diff              @@
##             develop      #31      +/-   ##
=============================================
- Coverage      50.71%   44.97%   -5.74%
+ Complexity       212      198      -14
=============================================
  Files             47       54       +7
  Lines            974      996      +22
  Branches          47       59      +12
=============================================
- Hits             494      448      -46
- Misses           460      528      +68
  Partials          20       20

Impacted Files
Coverage Δ

...arterkit/wes/config/engine/NativeEngineConfig.java
100.00% <ø> (ø)

...tarterkit/wes/config/engine/SlurmEngineConfig.java
0.00% <ø> (ø)

...starterkit/wes/exception/NextflowLogException.java
0.00% <0.00%> (ø)

.../utils/requesthandler/GetRunLogRequestHandler.java
0.00% <0.00%> (ø)

.../utils/runmanager/WorkflowRunExecutorMediator.java
68.42% <ø> (+1.75%)
:arrow_up:

...rkit/wes/utils/runmanager/engine/FileMetadata.java
0.00% <0.00%> (ø)

...es/utils/runmanager/engine/SlurmEngineHandler.java
0.00% <0.00%> (ø)

...t/wes/utils/runmanager/language/CommandOutput.java
0.00% <0.00%> (ø)

...it/wes/utils/runmanager/language/NextflowTask.java
0.00% <0.00%> (ø)

...s/runmanager/language/NextflowLanguageHandler.java
10.45% <0.72%> (-7.38%)
:arrow_down:

... and 23 more

Continue to review full report at Codecov.

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


Spanner API

Hi,
I was wondering when does the Spanner API will be official released?
Also, I've tried to work with the current implementation under this repository. Tried some simple snippet, such as follows:
SpannerClient spannerClient = SpannerClient.Create();
 // Initialize request argument(s)
DatabaseName database = new DatabaseName("myprojectid", "myinstance", "mydb");
// Make the request
Session response = spannerClient.CreateSession(database);

The CreateSession throws the following exception:
Grpc.Core.RpcException: 'Status(StatusCode=InvalidArgument, Detail="Invalid CreateSession request.")'
Anything I'm missing?
Thanks

I wouldn't suggest working with the autogenerated code directly. It's there at the moment mostly to prove that it generates correctly - and I have used it successfully, so it definitely works - but the intention is to provide higher level abstractions on top. I can't give details at the moment, but watch this space.
As for why that request didn't work - I can't tell easily, to be honest. Does the project/instance/database definitely already exist?

My bad - I fell on the instance name camel-case... It indeed works...
Ok, I'm planing to write this abstraction that you're talking about on top of this auto-generated code.
I'll start and see how things come up.
Any tips?

Well, we already have resources allocated in Google for doing this work - so it's fine if you want to do that for the sake of interest, but you'll probably be duplicating work. You may well want to look at the Java code:  https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-spanner

I understand, well we want to build it so that we can start to work with spanner on our .Net servers.
Can you tell if this lib implementation is on the roadmap for the near future (1-2 months)?

We're expect work to start on it soon, but I expect it'll be a while before it's in even a beta release state. Designing this appropriately is not a trivial matter.

Yes of course.
Maybe we'll start to work with Cloud SQL (MySQL) and Repository pattern in the meantime, just so that our models will be pretty much the same as with Spanner, and later on, when this lib will be ready, we will move to work with Spanner.
Of course this will be only for the development phase, for production we will surely use Spanner anyhow (even if we'll need to write this lib on our own).
Thanks for the help and info!

Just updating that I wrote some EFCore intergration on top of Spanner - currently it is working with this unofficial api.
Once this api will be official released I plan to integrate it as well...
https://github.com/NoGame/NG.Data.Spanner


build error: externally-managed-environment

https://pythonspeed.com/articles/externally-managed-environment-pep-668/

Fixed.


enchancement: update extract translation to only push on one branch

Questions
Answers

Description?
Currently we got multiple PR then we have new translation (possibly with same content), we fix this by pushing only changes in one branche named 'translation-extraction'

Type?
improvement

BC breaks?
no

Deprecations?
no

Sponsor company
@PrestaShopCorp

How to test?
Add translations and merge multiple PR on dev and check if we got one or many PR.

Can we close this PR @ga-devfront ?

PR merged, well done!
Message to @PrestaShop/committers: do not forget to milestone it before the merge.


2674: assume bucket has been automatically created by the service

Context
Changes proposed in this pull request
Guidance to review

 Scale bulk allocation updates


Crash of Protocol-Log

Description
When the npm run launch:protocol-log is launched, crashes with WPP is not defined.
And If i add window.WPP to the code, it crashes with
page.evaluate: TypeError: Cannot read properties of null (reading 'sendIq')
    at eval (eval at evaluate (:191:30), <anonymous>:3:35)
    at UtilityScript.evaluate (<anonymous>:193:17)
    at UtilityScript.<anonymous> (<anonymous>:1:44)
    at Page.<anonymous> (/Users/XXX/Documents/GitHub/wa-js/src/tools/launchProtocolLog.ts:63:10)

Environment

WhatsApp version: 2.2246.10
WA-JS version(s): v2.17.0
Browser: Chromium
OS: Mac OS 13
MultiDevice (BETA): yes

Steps to Reproduce

npm run launch:protocol-log

Log Output

page.waitForFunction: ReferenceError: WPP is not defined
    at eval (eval at predicate (eval at evaluate (:191:30)), <anonymous>:1:7)
    at predicate (eval at evaluate (:191:30), <anonymous>:10:20)
    at eval (eval at evaluate (:191:30), <anonymous>:19:82)
    at next (<anonymous>:4563:27)
    at <anonymous>:4573:7
    at Object.run (<anonymous>:4617:22)
    at eval (eval at evaluate (:191:30), <anonymous>:1:14)
    at UtilityScript.evaluate (<anonymous>:193:17)
    at UtilityScript.<anonymous> (<anonymous>:1:44)
=========================== logs ===========================
  WPP is not defined
============================================================
    at Page.<anonymous> (/Users/XXX/Documents/GitHub/wa-js/src/tools/launchProtocolLog.ts:59:16)

Hi @genseric , thanks for the report, I will check it later, this part of code is outdated


Delete failing errors_test.go

The purpose of this pull request
The only test case in that file only tests if the constructor function exists and returns an error with a correctly formatted string. This format changed in 4ce38f3546eb88b7265acb8d02e2e8f37f5fc5eb but wasn't updated in the test. And everything besides the format is also tested by the go compiler at built time. We don't need a special test for that.

Checklist

[x] make test executed successfully
[ ] unit test provided
[ ] integration test provided
[ ] docs updated

in 0.6.0 we still have this test, but I agree that it is somewhat pointless.

But it still passes in 0.6. Even though it's pointless :-)

because I fixed the error message there :D


angular.json Scripts file not compile ES6 module to es5 ?

I write a javascript file named Toast.js
export class XQL {
   ///....
};

I want to use the file in my angular component, i add it's to angular.json scripts:
"scripts": ["src/assets/js/Toast.js"]

when i restart my ng serve, i got an error:
Uncaught SyntaxError: Unexpected token export

I knew in scripts file ,will bundle to scripts.js :
export class XQL {

};
;
//# sourceMappingURL=scripts.js.map

** i want to know why my js file not compile by webpack ??**
then, i change  Toast.js  to Toast.ts, i got this:
var XQL = /** @class */ (function () {
    function XQL() {
    }
    return XQL;
}());
export { XQL };

but also give me Uncaught SyntaxError: Unexpected token export error !
Plase help me, thank you very much!
Versions

Angular CLI: 6.2.1
Node: 10.10.0
OS: darwin x64
Angular: 6.1.7
... common, compiler, compiler-cli, core, forms, http
... language-service, platform-browser, platform-browser-dynamic
... router
Package                           Version
@angular-devkit/architect         0.8.1
@angular-devkit/build-angular     0.8.1
@angular-devkit/build-optimizer   0.8.1
@angular-devkit/build-webpack     0.8.1
@angular-devkit/core              0.8.1
@angular-devkit/schematics        0.8.1
@angular/animations               6.1.8
@angular/cdk                      6.4.7
@angular/cli                      6.2.1
@angular/material                 6.4.7
@ngtools/webpack                  6.2.1
@schematics/angular               0.8.1
@schematics/update                0.8.1
rxjs                              6.2.2
typescript                        2.9.2
webpack                           4.18.0

Hello, we reviewed this issue and determined that it doesn't fall into the bug report or feature request category. This issue tracker is not suitable for support requests, please repost your issue on StackOverflow using tag angular-cli.
If you are wondering why we don't resolve support issues via the issue tracker, please check out this explanation.


Move contain_zalgo to DispatchQueue

I also wonder if something like asyncUnlessZalgo is a better name than containZalgo, since it wasn't obvious to me at first than containZalgo dispatched.

Actually I'm not sure about this. It's awkward to have an "instance" method that checks against the instance to determine what to do.

We can rename the method or document it more.
Probably static func DispatchQueue.pmkAsync would be enough, to indicate it is special to us.


Lark won't parse input in right order.

So I'm making a programming language using lark, but if I parse something like
print("HI");
x = input("Number:  ");

It parses the input statement first, and I can't figure out why. Below is somewhat what my code looks like.
from lark import Lark, Transformer, v_args
from lark.indenter import Indenter
grammar = '''
?start: expr
      | statement* -> statement
?statement: "print" "(" expr ")" ";"  -> print_statement
          | "input" "(" expr ")" ";"  -> input_statement
          | NAME "=" "input" "(" expr ")" ";" -> var_input_statement
          | NAME "=" expr ";"      -> assign_var
?expr: STRING            -> string
     | NUMBER            -> number
     | NUMBER "+" NUMBER -> add
     | NUMBER "-" NUMBER -> sub
     | NUMBER "*" NUMBER -> mul
     | NUMBER "/" NUMBER -> div
     | STRING "+" STRING -> str_add
     | NAME              -> get_var

%import common.ESCAPED_STRING -> STRING
%import common.NUMBER
%import common.CNAME -> NAME
%declare _INDENT _DEDENT
%import common.WS_INLINE
%ignore WS_INLINE
%import common.NEWLINE -> _NL
%ignore _NL
'''

class Print():
    def __init__(self, value):
        self.value = value

    def eval(self):
        return print(self.value)

class Input():
    def __init__(self, value):
        self.value = value

    def eval(self):
        return input(self.value)

@v_args(inline=True)
class MainTransformer(Transformer):
    number = int
    string = str

    def __init__(self):
        self.vars = {}

    def add(self, val1, val2):
        return int(val1) + int(val2)

    def sub(self, val1, val2):
        return int(val1) - int(val2)

    def mul(self, val1, val2):
        return int(val1) * int(val2)

    def div(self, val1, val2):
        return int(val1) / int(val2)

    def get_var(self, name):
        try:
            return self.vars[name]
        except KeyError:
            raise Exception(f"Variable {name} not found")

    def assign_var(self, name, value):
        if name == "print":
            pass
        if type(value) == str:
            value = value.strip('"')
        self.vars[name] = value

    def var_input_statement(self, name, value):
        data = self.input_statement(value, store_data=True)
        self.assign_var(name, data)

    def print_statement(self, value=" "):
        if type(value) == str:
            value = value.strip('"')
        return Print(value)

    def input_statement(self, value, store_data=False):
        if type(value) == str:
            value = value.strip('"')
        if store_data == True:
            data = input(value)
            return data
        else:
            return Input(value)

    def statement(self, *values):
        for value in values:
            if value == None:
                pass
            else:
                value.eval()

class MainIndenter(Indenter):
    NL_type = '_NL'
    OPEN_PAREN_types = ['LPAR', 'LBRACE']
    CLOSE_PAREN_types = ['RPAR', 'RBRACE']
    INDENT_TYPE = '_INDENT'
    DEDENT_type = '_DEDENT'
    tab_len = 8

parser = Lark(grammar, parser='lalr',
              transformer=MainTransformer(), postlex=MainIndenter())
main_parser = parser.parse

data_input = '''
print("HI");
x = input("Number: ");
'''
if __name__ == '__main__':
    main_parser(data_input)

I can't figure out why its not parsing in the right order, help would be appreciated, thanks!

You don't mean parsing, you mean that the Transformer is executing the input statement before the print statement. And that is exactly what you are telling it to do. The input_statement function calls the input and therefor that is the point at which you see the prompt. Only afterwards does the statement function get called, and the Print.eval method is called.

Oh ok, thanks! But the thing is, if I do
print("HI");
input("Number: ");

It executes in order, with the print first, its only if I have
print("HI");
x = input("Number: ");

When the input executes first

That is your own doing in var_input_statement

Yeah, but doesn't the transformer start from bottom up? So why is the var_input_statement evaluating first?

before this gets any further, I think you just shouldn't use a Transformer for that.

I shouldn't?

Look at the visitors.Interpreter class, it might be more relevant to your usecase.

Why not?

Oh ok, thanks!

I'll look into it

Just for an intuitive explanation, by the time statement runs both its children have already been transformed. It's only afterwards that you call eval(), but input_statement can call input() directly, long before statement had a chance to run.
In the Interpreter, all recursion is explicit, so you won't get these kind of surprises.

Oh ok! Thanks

Do I use interpreter mostly the same way, or is it drastically different?

It's very similar, but you have to manually recurse in order to visit the children.
Most of the time you can just add the @visit_children_decor decorator to get the same effect. But I recommend that you don't use it when control-flow statements are involved.

Oh ok

(See here: https://lark-parser.readthedocs.io/en/latest/visitors.html#interpreter)

Hey, so for some reason my Indenter class isn't working anymore

I started with Interpreter


Changed minimum number of characters for password

Fixes #1943
Checklist:
I have updated the minimum number of characters required for Password.
Changes: The value of app:validateMinLength:8

Closing this. Please do changes in the last PR itself. Do not create a new PR.

Okay sir.


Increment version for ai releases

Increment package version after release of azure-ai-resources

/check-enforcer override


Fix kube-linter issues

run containers as non root
run containers with read only root file system

The 'mc' init container is using the /tmp folder so for that container, mount an empty dir volume to /tmp to be able to set root file system readonly while being able to write to /tmp.
PLNSRVCE-1476

@sayan-biswas @Roming22

/ok-to-test