Unable to load preload script

Pre-flight checklist

[X] I have read the contribution documentation for this project.
[X] I agree to follow the code of conduct that this project uses.
[X] I have searched the issue tracker for a bug that matches the one I want to file, without success.

Electron Forge version
6.0.0-beta.65
Electron version
20.1.0
Operating system
macOS12.5.1
Last known working Electron Forge version
No response
Expected behavior
use contextBridge to expose API in src/preload.js
Actual behavior
chome console shows error: unable to load preload script

Steps to reproduce
check the code at https://github.com/mikesongming/electron-forge-demo.git
Additional information
No response

What worked for me was setting nodeIntegration: true, for mainWindow.
  const mainWindow = new BrowserWindow({
    width: 1200,
    height: 800,
    webPreferences: {
      preload: MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY,
      nodeIntegration: true,
    },
  });

Electron 20 is enable sandbox by default, I have to remove all npm package that uses deps that not in the sandbox.
See https://www.electronjs.org/docs/latest/tutorial/sandbox#preload-scripts for what we can use.

Electron 20 is enable sandbox by default, I have to remove all npm package that uses deps that not in the sandbox.
See https://www.electronjs.org/docs/latest/tutorial/sandbox#preload-scripts for what we can use.

it says renderer process modules are available, however, when I use contextBridge, I get the error above.

__dirname is not available too, it is out of the white list.
My solution is using IPC to get most of the value and methods
https://github.com/tiddly-gittly/TidGi-Desktop/blob/22f79c13ed1a498bd8767eecfe571a4e8b5e187d/src/preload/common/services.ts#L28
https://github.com/tiddly-gittly/TidGi-Desktop/blob/22f79c13ed1a498bd8767eecfe571a4e8b5e187d/src/services/native/index.ts#L182-L196
And use https://github.com/linonetwo/electron-ipc-cat

The following seems to work for me (in development mode). However, in a packaged application I am still having the same issue.
const mainWindow = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
      preload: path.join(__dirname, 'preload.js'),
      contextIsolation: true
    },
});

Hey! The maintainers are taking a look at this, but we're unable to reproduce this on MacOS12.5.1- this is what we are seeing:

can you double check that  the (demo)[https://github.com/mikesongming/electron-forge-demo.git] leads us to the correct error message?
🥂

https://github.com/electron/electron/blob/main/docs/breaking-changes.md#default-changed-renderers-without-nodeintegration-true-are-sandboxed-by-default
I suspect this error, as individuals above have mentioned stems from the electron 20 sandbox change. This means that you are unable to use __dirname in the renderer preload by default. For a quick fix, you can set sandbox: false in your browserWindow, but keep in mind that this goes against security best practices

Seems to me I am not getting the error on Ubuntu 22.04

Weird... Could be a windows bug?

contextIsolation: true, // must be set to true when contextBridge is enabled
nodeIntegrationInWorker: true, // must be set to true when contextBridge is enabled
preload: MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY, // preload script enable contextBridge
----- I did this and it works using

looks like preload is loaded before it's done build, when i save package.json everything works normally.
without contextIsolation & nodeIntegrationInWorker enabled

I had the same error with preload.ts. The root cause was that the file had a default import inside. Replacing it with curlies fixed the problem.

I was able to reproduce this with the release build of v6.0.0 on MacOS 12.5 by trying to use a Web Worker.
Specifically by using worker-loader and adding this rule to the webpack.renderer.config.js
rules.push({
  test: /\.worker\.js$/,
  use: { loader: "worker-loader", options: { inline: "fallback" } },
});

Here is my preload script:
import Worker from "./test.worker";

const worker = new Worker();

worker.postMessage("Hello from worker!");

And here is my worker code:
onmessage = function (e) {
  console.log(e.data);
};

Setting sandbox to false prevents the issue but it would be good to avoid that.

@mitchemmc Are you able to reproduce this issue without worker-loader? I see that package was deprecated in Webpack 5, which is the major version used in Forge 6.
https://webpack.js.org/guides/web-workers/

@mitchemmc Are you able to reproduce this issue without worker-loader? I see that package was deprecated in Webpack 5, which is the major version used in Forge 6.
https://webpack.js.org/guides/web-workers/

Unfortunately the new method doesn't work with Electron Forge.
Specifically when using:
new Worker(new URL('./worker.js', import.meta.url));
It will give a 404 error
Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:3000/Users/mitch/Documents/Tests/forge-preload-webpack/.webpack/renderer/main_window/native_modules/worker.js

@erickzhao
Ok I was able to get the new worker method to work.
If you create a new url with the import.meta.url then webpack will pick up the worker.js file and include it in the bundle.
Then if I hard code the worker path into the worker creation like this:
new URL("./worker.js", import.meta.url);
const worker = new Worker("/main_window/native_modules/worker.js");

This will make use of the local dev server so we can test it (although this method won't work in a production build).
Unfortunately after this I get the same issue as a worker-loader plugin.
It works with sandbox set to false but I still get a ReferenceError: __dirname is not defined error with sandbox enabled.

The native_modules folder path is suspect.
It seems like the @vercel/webpack-asset-relocator-loader loader is causing this problem. Commenting it out makes the minimal example from the webpack docs work both in dev mode and packaged mode.
See repro: https://github.com/erickzhao/ericktron-forge/commit/ea27cf9018f7163eb76c4355bb0a9113f59a7f96
I think I'll open a separate issue for this!

Interesting, it seems that removing the webpack-asset-relocator-loader I was able to get workers to work in the renderer but it still seems to run in to issues if I try and create the worker in a preload script.

Workers don't work in preload scripts as they run before a document context is initialized (this is an electron limitation).  If we register the worker in the preload inside an window.onload event handler it will also work.

@MarshallOfSound hmm, I've been using workers in preload scripts for a while now and haven't had many issues 🤔
The main issue I'm seeing is with sandboxing.
Having it enabled seems to run in to these __dirname issues.
Here's a repro that incorporates what @erickzhao found with the webpack-asset-relocator-loader plugin.
https://github.com/mitchemmc/forge-worker-sandbox
If I disable sandboxing then it seems to work.

+1
I also am having this same issue now with Electron 20, using the Webpack plugin. My local preload script combines with webpack to a new preload.js which uses __dirname out of my control. If I go outside webpack and add my own preload ONLY, then I get an error that I cannot import outside of modules (so I can't set up the IPC context bridge correctly).
I don't see a solution here besides enabling node_integration or disabling sandbox (less secure), or simply downgrading electron :-/

+1
I also am having this same issue now with Electron 20, using the Webpack plugin (https://www.electronforge.io/config/plugins/webpack). My local preload script combines with webpack to a new preload.js which uses __dirname. If I go outside webpack and add my own preload ONLY, then I get an error that I cannot import outside of modules (so I can't set up the IPC context bridge correctly).
I don't see a solution here besides enabling nodeIntegration / disabling sandbox (less secure), or simply downgrading electron :-/

Using my own preload.js is working for me. I think you may need to write it using require instead of import.

@MikeJerred We could look into that, but trying to avoid using require if possible. I thought it was still failing for me, but haven't checked lately.
Ultimately we need to be able to use the Webpack preload.js anyway, so the first issue is still a huge blocker.

+1
I also am having this same issue now with Electron 20, using the Webpack plugin (https://www.electronforge.io/config/plugins/webpack). My local preload script combines with webpack to a new preload.js which uses __dirname. If I go outside webpack and add my own preload ONLY, then I get an error that I cannot import outside of modules (so I can't set up the IPC context bridge correctly).
I don't see a solution here besides enabling nodeIntegration / disabling sandbox (less secure), or simply downgrading electron :-/

Checking in to see if anyone was able to get preload.js working without enabling nodeIntegration due to security concerns

+1
I also am having this same issue now with Electron 20, using the Webpack plugin (https://www.electronforge.io/config/plugins/webpack). My local preload script combines with webpack to a new preload.js which uses __dirname. If I go outside webpack and add my own preload ONLY, then I get an error that I cannot import outside of modules (so I can't set up the IPC context bridge correctly).
I don't see a solution here besides enabling nodeIntegration / disabling sandbox (less secure), or simply downgrading electron :-/

Using my own preload.js is working for me. I think you may need to write it using require instead of import.

Had this issue in a pure ESM electron+forge+webpack project. For me as well, the issue was resolved by using my own preload.js in commonjs syntax instead of the preload.js bundled by webpack-plugin. nodeIntegration is disabled, sandbox and context isolation are enabled.

你好朋友！
我是win10+vue
在electron 使用preload的时候我也出现了这个问题。
我开始使用preload.js也是和主线程平级的然后就发生了错误 ：“Unable to load preload script”
后来我发现需要放入生成的执行文件dist_electron里才能运行成功，目前我是这样处理的。

@bdlb77 did you find any solution for this : Checking in to see if anyone was able to get preload.js working without enabling nodeIntegration due to security concerns?

I'm getting the same error, but as soon as I change a file and reload the error goes away
the problem only happens when you first run electron forge with "npm start or yarn start", it seems electron is trying to load the preload.js file before webpack is finished building it or something like that like someone implied earlier, once it starts you need to force a reload for it to be able to load it

I have been able to narrow this down to webpack placing a __dirname in the preload.js script that is compiled from typescript, and that by removing the plugin webpack-asset-relocator-loader its resolved - I had put it in following this comment

I just hit this case with a newly created forge app.
My package.json:
{
  "name": "tlshot",
  "productName": "tlshot",
  "version": "1.0.0",
  "description": "My Electron application description",
  "main": ".webpack/main",
  "scripts": {
    "dev": "./dev.sh",
    "start": "electron-forge start",
    "package": "electron-forge package",
    "make": "electron-forge make",
    "publish": "electron-forge publish",
    "lint": "eslint .",
    "fix": "yarn lint --fix; prettier -w .",
    "postinstall": "patch-package"
  },
  "keywords": [],
  "author": {
    "name": "Jake Teton-Landis",
    "email"<EMAIL_ADDRESS>  },
  "license": "MIT",
  "devDependencies": {
    "@electron-forge/cli": "^6.1.1",
    "@electron-forge/maker-deb": "^6.1.1",
    "@electron-forge/maker-rpm": "^6.1.1",
    "@electron-forge/maker-squirrel": "^6.1.1",
    "@electron-forge/maker-zip": "^6.1.1",
    "@electron-forge/plugin-webpack": "^6.1.1",
    "@typescript-eslint/eslint-plugin": "^5.0.0",
    "@typescript-eslint/parser": "^5.0.0",
    "@vercel/webpack-asset-relocator-loader": "1.7.3",
    "css-loader": "^6.0.0",
    "electron": "24.0.0",
    "electron-extension-installer": "^1.0.4",
    "eslint": "^8.0.1",
    "eslint-import-resolver-typescript": "^3.5.5",
    "eslint-plugin-import": "^2.25.0",
    "eslint-plugin-react": "^7.32.2",
    "eslint-plugin-react-hooks": "^4.6.0",
    "eslint-plugin-unused-imports": "^2.0.0",
    "fork-ts-checker-webpack-plugin": "^7.2.13",
    "node-loader": "^2.0.0",
    "patch-package": "^6.5.1",
    "prettier": "^2.8.7",
    "style-loader": "^3.0.0",
    "ts-loader": "^9.2.2",
    "ts-node": "^10.0.0",
    "typescript": "5.0.4"
  },
  "dependencies": {
    "@tldraw/assets": "^2.0.0-canary.e59200e42",
    "@tldraw/editor": "^2.0.0-canary.e59200e42",
    "@tldraw/tldraw": "^2.0.0-canary.e59200e42",
    "@tldraw/tlstore": "^2.0.0-canary.e59200e42",
    "@tldraw/ui": "^2.0.0-canary.e59200e42",
    "@types/lodash": "^4.14.194",
    "electron-squirrel-startup": "^1.0.0",
    "electron-store": "^8.1.0",
    "execa": "^7.1.1",
    "fs-extra": "^11.1.1",
    "lodash": "^4.17.21",
    "nanoid": "^4.0.2",
    "path-browserify": "^1.0.1",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-new-window": "^1.0.1",
    "signia": "^0.1.2-canary.0094a5d",
    "signia-react": "^0.1.2-canary.0094a5d"
  }
}

Git repo: https://github.com/justjake/tlshot

Here's a fresh repro of the error in a newly-created electron-forge project:

I created this project via: yarn create electron-app preload-error-repro --template=webpack-typescript
Then, I added some imports to preload.ts:
diff --git a/forge.config.ts b/forge.config.ts
index e356488..75f684a 100644
--- a/forge.config.ts
+++ b/forge.config.ts
@@ -15,6 +15,7 @@ const config: ForgeConfig = {
   plugins: [
     new WebpackPlugin({
       mainConfig,
+      port: 5001,
       renderer: {
         config: rendererConfig,
         entryPoints: [
diff --git a/src/preload.ts b/src/preload.ts
index 5e9d369..93aeaad 100644
--- a/src/preload.ts
+++ b/src/preload.ts
@@ -1,2 +1,26 @@
 // See the Electron documentation for details on how to use preload scripts:
 // https://www.electronjs.org/docs/latest/tutorial/process-model#preload-scripts
+
+try {
+  console.log("preload.ts can access __dirname:", __dirname);
+} catch (error) {
+  console.error("preload.ts cannot access __dirname:", error);
+}
+
+import { contextBridge } from "electron";
+import child_process from "child_process";
+import path from "path";
+console.log("preload.ts can import node modules:", { child_process, path }});
+
+const preloadStuff = {
+  child_process,
+  join: path.join,
+} as const;
+
+contextBridge.exposeInMainWorld("fromPreload", preloadStuff);
+
+declare global {
+  interface Window {
+    fromPreload: typeof preloadStuff;
+  }
+}
diff --git a/src/renderer.ts b/src/renderer.ts
index a91994f..5754360 100644
--- a/src/renderer.ts
+++ b/src/renderer.ts
@@ -26,6 +26,13 @@
  * ```
  */

-import './index.css';
+import "./index.css";

-console.log('👋 This message is being logged by "renderer.js", included via webpack');
+console.log(
+  '👋 This message is being logged by "renderer.js", included via webpack'
+);
+console.log(
+  "fromPreload:",
+  window.fromPreload,
+  window.fromPreload.join("a", "b", "c")
+);

Repo: https://github.com/justjake/electron-forge-webpack-preload-error-repro

Ah, I think for __dirname and node modules to work in preload, you need to set sandbox: false (and probably then contextIsolation: true to maintain security while allowing complete node integration in the preload?

I 'fixed' it by patching @electron-forge/plugin-webpack so it also strips __dirname from preloads
(I do not know if this is safe)
diff --git a/dist/WebpackConfig.js b/dist/WebpackConfig.js
index a0e876ea373009554472cada07f1b80a38444ed7..c82403b9cd36d4ea67238648289a3062459bea30 100644
--- a/dist/WebpackConfig.js
+++ b/dist/WebpackConfig.js
@@ -142,6 +142,7 @@ class WebpackConfigGenerator {
                 __dirname: false,
                 __filename: false,
             },
+            plugins: [new AssetRelocatorPatch_1.default(this.isProd, !!this.pluginConfig.renderer.nodeIntegration)],
         }, rendererConfig || {}, { target: 'electron-preload' });
     }
     async getRendererConfig(entryPoints) {

Does anyone have a solution for this?
It's 2024 and I'm still stuck on Electron 19.

Does anyone have a solution for this? It's 2024 and I'm still stuck on Electron 19.

Yes it was fixed in the forge webpack plugin, this issue should be resolved

Yes it was fixed in the forge webpack plugin, this issue should be resolved

I just updated my project to the latest electron but I still get the error;
VM4 sandbox_bundle:2 Unable to load preload script: C:\Users\...\server\src\js\preload.js
What should I do to fix it?

I'm seeing this error --

unable to load preload script: path/to/file/.webpack/renderer/main_window/preload.js
Error: Can not find module path/to/file/.webpack/renderer/main_window/preload.js

  "devDependencies": {     "@babel/core": "^7.24.4",     "@babel/preset-react": "^7.24.1",     "@electron-forge/cli": "^7.4.0",     "@electron-forge/maker-deb": "^7.4.0",     "@electron-forge/maker-rpm": "^7.4.0",     "@electron-forge/maker-squirrel": "^7.4.0",     "@electron-forge/maker-zip": "^7.4.0",     "@electron-forge/plugin-auto-unpack-natives": "^7.4.0",     "@electron-forge/plugin-fuses": "^7.4.0",     "@electron-forge/plugin-webpack": "^7.4.0",     "@electron/fuses": "^1.8.0",     "@types/react": "^18.2.79",     "@types/react-dom": "^18.2.25",     "@vercel/webpack-asset-relocator-loader": "^1.7.3",     "babel-loader": "^9.1.3",     "css-loader": "^6.11.0",     "electron": "30.0.0",     "node-loader": "^2.0.0",     "style-loader": "^3.3.4"   },

Tenía el mismo problema, lo resolví usando la extensión ".mjs" -> "preload.mjs".
No fué necesario tocar nada más.
I had the same problem, I solved it by using the extension ".mjs" -> "preload.mjs".
It was not necessary to touch anything else.

{
"name": "electron-vue-vite",
"version": "28.1.0",
"main": "dist-electron/main/index.js",
"description": "electron-vue-vite",
"author": "hxx",
"license": "MIT",
"private": true,
"keywords": [
"electron",
"rollup",
"vite",
"vue3",
"vue"
],
"debug": {
"env": {
"VITE_DEV_SERVER_URL": "http://<IP_ADDRESS>:3344/"
}
},
"scripts": {
"dev": "chcp 65001 && vite --mode development",
"dev:pro": "vite --mode production",
"build": "vue-tsc --noEmit && vite build && electron-builder",
"preview": "vite preview"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.4",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"electron": "27.0.4",
"electron-builder": "^24.13.3",
"typescript": "^5.4.2",
"unplugin-auto-import": "^0.9.2",
"unplugin-vue-components": "^0.21.1",
"unplugin-vue-define-options": "^0.6.2",
"vite": "^5.1.5",
"vite-plugin-commonjs": "^0.10.0",
"vite-plugin-electron": "0.28.2",
"vite-plugin-electron-renderer": "0.11.4",
"vite-plugin-windicss": "^1.9.0",
"vue": "^3.4.21",
"vue-tsc": "1.8.27",
"windicss": "^3.5.6"
},
"dependencies": {
"@electron/remote": "^2.1.0",
"@rollup/plugin-commonjs": "^25.0.7",
"electron-store": "10.0.0",
"element-plus": "^2.7.6",
"sortablejs": "^1.15.2",
"vite-plugin-require-transform": "^1.0.21",
"vuedraggable": "^4.1.0"
}
}

I switched from using ES6 import statements to CommonJS require in the preload.js and that solved my issue.

It's okay with CommonJS require, but ESModule import.
However, when I changed preload.js to preload.mjs, concurrently also enabled nodeIntegrationInWorker option inside BrowserWindow constructor, the error has gone.

@hieund140386 This worked for me too!


Python: rework OutputId so it works in deserialization

Description of change
Python: rework OutputId so it works in deserialization
Links to any relevant issues
Fixes https://github.com/iotaledger/iota-sdk/issues/2020
Type of change

Breaking change (fix or feature that would cause existing functionality to not work as expected)

How the change has been tested
Running tests

This is fine I guess. What was the reason it wouldn't work as a class with two fields?

Because it needs to be a dict for multiple fields and then it fails to deserialize because the field in the data is just a string AttributeError: 'str' object has no attribute 'keys'
This could probably also solved in some other way with a custom deserialization method, but didn't found how this can be done and to me this now also seems to be cleaner overall


Working on file trees and locking

This is probably more of a support request than an actual issue, please close if this is not the right place.
I want to work on a file tree and can't quite figure out to work around locking. The simplest version of what I'm trying to do would be this:
copyFiles :: FilePath -> FilePath -> Shell ()
copyFiles srcDir targetDir = do
  file <- lstree srcDir
  cp file $ targetDir </> file

If I try to evaluate this with sh $ copyFiles a b, however, I get a crash from the first item in the source directory:
file.hs: /path/to/file: openBinaryFile: resource busy (file is locked)

Is this intended behavior? Is there a way to work around this?

I've just realized that there might actually be an overlap between srcDir and targetDir in which case this error is absolutely justified. I'll investigate that a bit more and reopen if this turns out to be wrong. :)

Yeah, in that case you can just add guard (srcDir /= targetDir) before the cp (perhaps after canonicalizing them first using realpath)


Need fluent client method for validate()

And it should support the DSTU2 extended operation form

Closing, as this was added.


ARM Template for Service Health Alerts

We wish to create service health alerts using ARM template. I was trying the ARM template given on https://docs.microsoft.com as Create activity log alerts on service notifications.
We are able to create service health alert but it does not meet our requirements. As we want to create service health alerts for Service Bus in one Region East US, but we don't understand how to provide these in condition field. When we are trying to create it is selecting all the services and regions. We are not able to understand what changes we should make to code in  condition field and equals to be able to select Services and Regions directly from ARM template code.
I would request everyone to help me out here. Thanks.
Our Requirement :

We are able to create this :

This is the ARM template JSON code we are using :
`{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
"contentVersion": "<IP_ADDRESS>",
"parameters": {
"activityLogAlertName": {
"type": "string",
"defaultValue": "serviceHealthAlert",
"minLength": 1,
"metadata": {
"description": "Name for the Activity log alert."
}
},
"alertDescription": {
"type": "string",
"defaultValue": "This is a metric alert",
"metadata": {
"description": "Description of alert"
}
},
"resourceId": {
"type": "string",
"minLength": 1,
"metadata": {
"description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"
}
},
"actionGroupId": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "The ID of the action group that is triggered when the alert is activated or deactivated"
}
}
},
"resources": [
{
"name": "[parameters('activityLogAlertName')]",
"type": "Microsoft.Insights/activityLogAlerts",
"apiVersion": "2017-04-01",
"location": "global",
"properties": {
"description": "[parameters('alertDescription')]",
"enabled": "true",
"scopes": ["[parameters('resourceId')]"],
"condition": {
"allOf": [
{
"field": "category",
"equals": "ServiceHealth",
}
]
},
"actions": {
"actionGroups": [
{
"actionGroupId": "[parameters('actionGroupId')]"
}
]
}
}
}
]
}`

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

ID: 57d87021-31e4-29d5-fbf3-a67384ef1a66
Version Independent ID: 88043e51-cb48-6e6b-0744-6ecad591d765
Content: Receive activity log alerts on Azure service notifications
Content Source: articles/monitoring-and-diagnostics/monitoring-activity-log-alerts-on-service-notifications.md
Service: azure-monitor
GitHub Login: @shawntabrizi
Microsoft Alias: shtabriz

If there are further questions regarding this matter, please comment and we will gladly continue the discussion.

@Mike-Ubezzi-MSFT  Thanks for your time. This issue got resolved now I am able to add specific services and regions using ARM templates.

@Mike-Ubezzi-MSFT  If you have any idea how these above requirements can be implemented in Terraform, that would be of great help.

What is the solution to this issue @Mike-Ubezzi-MSFT . Is there a Sample ARM template somewhere which shows how to code in Region, type of Service?

@msaravindh Without the customer (@kundan123456) specifying exactly what was implemented to resolve the issue, I believe the solution is with this section of the template with regard to "location":"Global", "equals": "ServiceHealth", and "equals": "Incident":

   {
      "comments": "Service Health Activity Log Alert",
       "type": "microsoft.insights/activityLogAlerts",
      "name": "[parameters('activityLogAlerts_name')]",
       "apiVersion": "2017-04-01",
       "location": "Global",
       "tags": {},
       "scale": null,
       "properties": {
           "scopes": [
               "[variables('alertScope')]"
           ],
           "condition": {
               "allOf": [
                   {
                       "field": "category",
                       "equals": "ServiceHealth"
                   },
                   {
                       "field": "properties.incidentType",
                       "equals": "Incident"
                   }
               ]
           },

The values used for location and for "equals": "Incident" (which is equal to Event Type) would need to be modified for the specific region and for the type of incident. Are there more specific events you wish to track?

@Mike-Ubezzi-MSFT : Thanks for your reply. I want to filter the Region to say "East US" and the Service to say "Virtual Machine" & "Virtual Machine Scale Sets". Is this possible through ARM templates? I don't see a way to do that using templates. @kundan123456  If you have a sample which shows how you restricted to specific services and regions using ARM templates that would be really helpful.

@msaravindh It might be best to create a new issue if you don't get an answer to your question. Thank you!

@Mike-Ubezzi-MSFT  : Sure i created a new issue here https://github.com/MicrosoftDocs/azure-docs/issues/45355

@kundan123456  Can you Please let me know how was this resolved?
This issue got resolved now I am able to add specific services and regions using ARM templates.


Testing jest framework 2

Jest testing ♻
We create a testing file for editing the task description, for updating an item's 'completed' status and the "Clear all completed" function with jest in this pull request. 📝

Add testing for editing task description function 👍
Add testing for updating an item's 'completed' status when is false and true😃
Add testing for the "Clear all completed" function 😃
Use jest DOM manipulation
Use testing ES6 modules

@ShinhyoBelok sorry it's a mistake


Fix compilation error under Visual Studio 2010

Visual Studio 2010 use a compiler that supports only C89, which
only supports declaring variable at top of a local scope. Moving
scope variable to the top of function should solve this problem.

@freerdp-bot this one is straight forward, but can you test it before I merge it ?

@xdqi We use visual studio 2012 (and above) for the compilation tests but not 2010 anymore ;). That's why this problem hasn't shown up before. Thanks for the fix.


Hard-code libcuda version number to "1". Fixes #2865.

As per comments from nvidia-docker dev @3XX0, hardcoding "1" should be
reasonably safe. The TF_CUDA_VERSION variable from the configure script
is not appropriate here (it will contain something like "7.0" or "7.5",
while the libcuda soname major version number should be "1").
/CC @rdadolf  and @martinwicke

Can one of the admins verify this patch?

@tensorflow-jenkins test this please
(CLA is fine, this is a cherrypick)

(Martin: does it matter that this is not cherrypicking from the master branch?)

er, @martinwicke

That's fine. A commit is a commit.

ping?

@tensorflow-jenkins test this please (not sure why tests failed, trying again)

We have test failures :(

I think there's been flakiness
let's try again
@tensorflow-jenkins test this please

Screw it, the GPU tests passed, let's just merge.


GH-3809 introduce a method to state that each invocation of a query

GitHub issue resolved: #3809
Briefly describe the changes proposed in this PR:
If we prepare/precompile a functioncall then functions may be turned into constant values. This is never valid for a number of functions such as UUID or RAND(). A new method is added to the Function interface that is used to mark such cases, and avoids constant folding.

PR Author Checklist (see the contributor guidelines for more details):

[x] my pull request is self-contained
[x] I've added tests for the changes I made
[x] I've applied code formatting (you can use mvn process-resources to format from the command line)
[x] I've squashed my commits where necessary
[x] every commit message starts with the issue number (GH-xxxx) followed by a meaningful description of the change

Looks good to me.


object_merger removes obsacles around known object

Checklist

[X] I've read the contribution guidelines.
[X] I've searched other issues and no duplicate issues were found.
[X] I'm convinced that this is not my fault but a bug.

Description
With the default parameters, object_merger node removes the unknown obstacles around a known object. Even though CAR-UNKNOWN and UNKNOWN-CAR parameters in can_assign_matrix are activated, object_merger cannot merge them. Here are photos for the current situation. The first one shows the scenario. The obstacle inside the red circle is removed by object_merger.

Here is the RViz2 screen. The removed unknown object is in the red circle.

Here is the output of camera lidar fusion:

Expected behavior
The unknown object in front of the ego vehicle should not be removed.
Actual behavior
The unknown object in front of the vehicle is removed by the object_merger.
Steps to reproduce

Launch centerpoint detection and camera_lidar_fusion.
Launch object_merger with the ouput of detections with default parameters.

Versions

OS: Ubuntu 22.04
ROS 2: Humble

Possible causes
object_merger cannot merge unknown objects and known objects properly. To remove unknown objects inside a known object, remove_overlapped_unknown_objects part was added. If the merging is good, there won't be need for remove_overlapped_unknown_objects.
Additional context
No response

@mebasoglu
#4499 is merged. Could you please check how this will look using the latest universe?

Hello, I tested it with a bag file and It worked, thank you. I am going to test it also on our vehicle and I will let you know as soon as I tried on the vehicle.

Hello, we have tested this and it works. We can close the issue. Here is an image of object_merger merges known and unknown objects successfully:


shell integration onDidStart never stops

Testing #226655
tried testing onDidStartTerminalShellExecution with something simple like writing git status and running it (since it runs by default), but it never stops sending the text via sendText.
maybe this is intended since there is anexplicit onDidEndTerminalShellExecution, but can maybe specify in docs that these two go hand in hand (unless this is already something well known 🫨 )

@justschen not sure what you mean by but it never stops sending the text via sendText.?

hmm I actually cannot repro anymore...
for context, I was trying something along the lines of:
	vscode.window.onDidStartTerminalShellExecution(e => {
			if (e.execution.commandLine.value === 'git add .') {
				e.terminal.sendText('git commit -m "audot commit"');
			}
		}),

perhaps e.shellIntegration.executeCommand is the more correct one in this case anyways, but i'll continue playing around with it

@justschen my only guess is that commandLine.value may have been different in start and stop? Also something like this is how I would go about doing your example:
// end not start, destructuring
vscode.window.onDidEndTerminalShellExecution({ execution, shellIntegration } => {
    if (execution.commandLine.value === 'git add .') {
        // executeCommand instead of sendText
        shellIntegration.executeCommand('git commit -m "auto commit"');
    }
})


Long dropdown in Search Within shrinks Search field to unacceptable size

Description
When the dropdown of a "Search Within" has very long text, there's no room for the search field.
Steps to reproduce

Add a dropdown item: "A very very very very very very long item"
Select it.
Observe that there's no room to type in search text.

Expected behavior
There should be a maximum relative size to the dropdown so there's room for the search field.
Screenshots

@harbs it does look like we need a sensible min-width on the search field here. Thanks!

Still an issue

FWIW, my suggested fix is here: https://github.com/adobe/spectrum-css/issues/880#issuecomment-685673492


Update const.py

Coverage increased (+0.1%) to 59.547% when pulling e2e443641b3f22f5db49b7b19a91d4719e072e56 on ggravlingen-patch-1 into 9e1e1ddfa9cade6b86304049182d95622383bcd0 on master.


Deprecate expecting data.pck and only look for binaryname.{pck,zip} + engine.cfg

Based on this comment by @reduz in https://github.com/godotengine/godot/pull/2788#issuecomment-158920824:

I will probably need to add some changes (noting down)
-writing and reading zips (done in #2879)
-deprecating expecting data.pck and only use the code provided by this patch

Why do you want to deprecate data.pck though? I don't have a strong opinion, but it could become a bother at least for packaging: to package Godot games current, I just put the good linux template in the $PATH as e.g. /usr/games/godot-runner and can then use it to load a packaged data.pck (actually I plan to package libre games, so I'll probably packaged them unpacked, but the use case is still relevant).
Or did you have something more specific in mind?

on some platforms it's not clear what the binary name is because the system
doesn't provide it (or it has different names depending how you launch the
game, ie launching from a host computer will have one name, launching from
a game installed on the devkit will have a different one). A "hardcoded"
name like data.pck is useful for those cases.
Also if you distribute a .zip users might try to unpack it, just like it
happened to the templates file before we renamed it to .tpz, so an option
to open with a different extension like .pcz would be useful
On 11 January 2016 at 05:54, Rémi Verschelde<EMAIL_ADDRESS>wrote:

Why do you want to deprecate data.pck though? I don't have a strong
opinion, but it could become a bother at least for packaging: to package
Godot games current, I just put the good linux template in the $PATH as
e.g. /usr/games/godot-runner and can then use it to load a packaged
data.pck (actually I plan to package libre games, so I'll probably packaged
them unpacked, but the use case is still relevant).
Or did you have something more specific in mind?
—
Reply to this email directly or view it on GitHub
https://github.com/godotengine/godot/issues/3313#issuecomment-170470983.

yes, this would only be useful in Linux and Windows, in many other platforms the binaryname is less meaningful, such as OSX, Android, HTML5, etc. so you have to rely on a data.pck

we should only make this work and deprecate data.pck on linux and windows

But should we really deprecate it at all? As I said above, it can still be quite useful if you want to be independent from the binary name; though as long as the behaviour can be specified by a command-line, it's fine by me if it no longer searches for data.pck in the runtime dir.

I would deprecate it because it happened countless times that users manage
to put a data.pck in a project directory, making it no longer work
On Jan 11, 2016 09:41, "Rémi Verschelde"<EMAIL_ADDRESS>wrote:

But should we really deprecate it at all? As I said above, it can still be
quite useful if you want to be independent from the binary name; though as
long as the behaviour can be specified by a command-line, it's fine by me
if it no longer searches for data.pck in the runtime dir.
—
Reply to this email directly or view it on GitHub
https://github.com/godotengine/godot/issues/3313#issuecomment-170533873.

But let's wait for 2.1 for this
On Jan 11, 2016 10:05, "Juan Linietsky"<EMAIL_ADDRESS>wrote:

I would deprecate it because it happened countless times that users manage
to put a data.pck in a project directory, making it no longer work
On Jan 11, 2016 09:41, "Rémi Verschelde"<EMAIL_ADDRESS>wrote:

But should we really deprecate it at all? As I said above, it can still
be quite useful if you want to be independent from the binary name; though
as long as the behaviour can be specified by a command-line, it's fine by
me if it no longer searches for data.pck in the runtime dir.
—
Reply to this email directly or view it on GitHub
https://github.com/godotengine/godot/issues/3313#issuecomment-170533873
.

Yeah, sometimes many platforms will share the same pck, for example on
Steam you create a package (they call it a "depot") with the pck which is
downloaded on all platforms, then one depot for each binary, for each
platform. So they all share the same pck, but only download the depot with
the binary for the current platform. The code already tries to open
multiple files, trying to open 1 more file doesn't really make a
difference..
On 11 January 2016 at 09:41, Rémi Verschelde<EMAIL_ADDRESS>wrote:

But should we really deprecate it at all? As I said above, it can still be
quite useful if you want to be independent from the binary name; though as
long as the behaviour can be specified by a command-line, it's fine by me
if it no longer searches for data.pck in the runtime dir.
—
Reply to this email directly or view it on GitHub
https://github.com/godotengine/godot/issues/3313#issuecomment-170533873.

Not critical for the upcoming 2.1, so moving to the next milestone.

Done for 3.0.


vnc resolution too large on some connections

VNC rescaling can be done client-side.
Here is a starting point:
https://stackoverflow.com/a/61098288/12570052


using babel in ts-jest

I'd like to be able to add  "globals": {       "ts-jest": {         "useBabelrc": true       }     }. I'm using the typescript plugin but I have some babel plugins that I need for tests to be able to run. Is there a reason globals is not one of the allowed config overrides?

solved with #719

Hi @jaredpalmer, do you have any plans to release a version the change in #719? I have seen that it's merged since quite a while but it's not part of the currently published 2.4.0.


[SPARK-31240][SQL] Constant fold deterministic Scala UDFs with foldable arguments

What changes were proposed in this pull request?
Constant fold deterministic Scala UDFs with foldable arguments, conservatively.
ScalaUDFs that meet all following criteria are subject to constant folding in this PR:

deterministic
all arguments are foldable
does not throw an exception when evaluating the UDF for constant folding

Why are the changes needed?
This is an optimization that enables more constant folding, improving the performance of a special case of Scala UDFs.
Catalyst already implements constant folding of expressions in a few places, through the pattern if (e.foldable) e.eval(EmptyRow). One of the optimizer rules that specifically performs constant folding is ConstantFolding.
ScalaUDF does not override foldable, so it isn't subject to constant folding right now.
To enable constant folding of ScalaUDFs, it's tempting to make it override foldable:
  override lazy val foldable: Boolean = deterministic && children.forall(_.foldable)

But ScalaUDFs are declared as deterministic by default, so it's possible for users to mis-declare a potentially exception-throwing UDF as deterministic, so for callers of the "constant folding" code pattern that do not expect an exception, overriding ScalaUDF.foldable in general may have a wide impact.
Instead, this PR tackles the problem in a conservative way, where the constant folding of ScalaUDFs is only implemented in the ConstantFolding rule, with special handling to catch non-fatal exceptions when evaluating a Scala UDF during constant folding and skip folding such UDFs.
Does this PR introduce any user-facing change?
No.
Caveat: this PR assumes certain semantics of Expression.deterministic. Although it guards against potentially exception-throwing Scala UDFs being mis-declared as deterministic, it cannot guard against other kinds of mis-declarations, e.g.

UDFs that are only expected to be invoked on executors;
UDFs that return the same value but have other side-effects, such as modifying a static field.
Users should explicitly mark such UDFs as asNondeterministic.

How was this patch tested?
Added a test case in ConstantFoldingSuite.

Test build #120295 has started for PR 28008 at commit aed59d7.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/25005/
Test PASSed.

Test build #120295 has finished for PR 28008 at commit aed59d7.

This patch fails to build.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/120295/
Test FAILed.

FYI, there was a similar try at https://github.com/apache/spark/pull/24593

I looked over the two jira and I feel both are the same, so I will close the newer one as duplicated and update the PR title. If there is any problem, please re-update them.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/25007/
Test PASSed.

Test build #120297 has started for PR 28008 at commit ab15f5c.

Thank you very much for linking this PR to the existing JIRA ticket and its PR!
I vaguely remember this had been implemented before but didn't find it in master and got curious... now I know >_<|||
It's highly likely that this PR won't be good enough to make the bar, but I'd like to hear other folks' opinions.
Thanks.
Basically this is a hurdle that we cannot get past until the APIs are clarified and the semantics of ScalaUDF.deterministic is strong enough for optimizations to depend on:
https://github.com/apache/spark/pull/24593#pullrequestreview-237361795
I had the same concerns when sending out this PR, and I'm more than okay to withdraw and close this PR given the current state of the API/semantics.

Closing this PR as I don't think it's going to work given the current API semantics.

Test build #120297 has finished for PR 28008 at commit ab15f5c.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/120297/
Test PASSed.


Updates getting-started/cli

Adds a warning box and instructions on what to do if the cli install fails because of permissions writing to the global node_modules directory

ibm-garage-cloud/planning#28


Online_Chat plugin have a problem

For example:
When another player is opening the menu, and someone is chatting, the game will crash on the person who is opening the menu
line 195

Should be all set :)


Framework or static library

Can I build it to get framework or static library?

So since this is swift code, it can't be used in a static library.   Swift code requires a framework to work correctly.
Currently using FutureKit with cocoapods, causes it to create a framework.
I still have an open issue to get Carthage support working, which means I need a Framework target somewhere in a project.   Which is a big TBD, but could happen pretty soon.

And how do you install it with Cocoapods?
For me it does not work.
I got:
[!] Unable to satisfy the following requirements:

FutureKit required by Podfile

ping me at<EMAIL_ADDRESS>if you are still having issues.  (It's probably a bad Podfile).


Improve search by ranking slugs over titles over topics over bodies

as mentioned at bottom of this https://github.com/leeoniya/uFuzzy/issues/7
think need to use custom sort function https://github.com/leeoniya/uFuzzy#options

minor improvements here too

simple https://github.com/sw-yx/swyxdotio/commit/d72f859038749204a892485c06e1aa1b4776ef64
hydrated https://github.com/sw-yx/swyxdotio/commit/62c06c247848a01f4374316d8b0146437b745d4e


test integration on slack

Event
Title:
Date:
Time (include time zone):
Duration:
Description:
List any pre-requisites:
What type is your event (pick one that sounds more like it):

[ ] Webinar
[ ] Class/Tutorial
[ ] Presentation
[ ] Demo

Presenter(s)
All presenter(s) subscribed to our Remote Meetup Go channel?

[ ] yes

Enter below the name of each presenter so we can find them on the channel:

Worked.


Add link to slack community chat

my point is that iifistead of the text, you add <CommunityJoin /> and it will generate the link!


look forward to mobilenetV3

look forward to mobilenetV3  & pretrain weights

Would be nice to have the application MobileNetV3


ActiveRecord adapter not idempotent

Wondering if someone could clarify an expected behavior in the ActiveRecord adapter. Specifically in the enable function. If I run in my tests:
flipper[flag_name].enable entity
flipper[flag_name].enable entity

An ActiveRecord::RecordNotUnique: exception raises. Is this fully expected? I expect yes, since I see so many enable calls wrapped in unless blocks checking for the flag to already be enabled, but couldn't find it explicitly documented anywhere (nor addressed in tests). Additionally, in the enable_single method there is this line: @gate_class.where(feature_key: feature.key, key: gate.key).destroy_all, which I would expect to destroy any existing rows to avoid that duplicate exception.
Am I misunderstanding that line? Any help on this would be appreciated, thanks.

Not sure if related, but in https://github.com/jnunemaker/flipper/issues/422 I'm also seeing behaviour that doesn't seem to match the intent of the code.

@wTheRockb what versions of flipper, flipper-active_record are you using?

@jnunemaker good question! Looks like I'm a bit outdated, on 0.10.2 it looks like, which I see is outdated. I can potentially update and retest, and if I do I'll update this thread with news.

I see the same issue here. I want to have a feature enabled in a trashable docker environment. Frontend and database are separated. In a flipper initializer, after the config I have the following line:
Flipper[:foo].enable if Rails.env.development?

My expectation was it should be idempotent. It's however not and it breaks when running the frontend docker while the flipper information already exists in the database.
Gem version:
flipper (0.16.2)
flipper-active_record (0.16.2)

@wTheRockb does this issue still persists after upgrading your version?

Closed by #436 hopefully. Use git in gemfile to check this out. I'll be releasing new version soon as well if you want to wait.


TAJO-1359: Add nested field projector and language extension to project nested record.

This work is still on going. So, please just review the direction.
Actually, all features seem to work well. But, I still need to clean up and refactor the changes in the patch. Also, I'll add more unite tests to verify more use cases of complex types.
For tests, I'm using a twitter example data set at https://dev.twitter.com/rest/reference/get/search/tweets. Projecting all fields including nested primitive fields works well.
Here is an example DDL and a query statement.
DDL
CREATE EXTERNAL TABLE tweets (
  coordinates TEXT,
  favorited BOOL,
  truncated BOOL,
  created_at TIMESTAMP,
  id_str TEXT,
  /*entrities RECORD (
    urls ARRAY<TEXT>
  )*/
  in_reply_to_user_id_str TEXT,
  contributors TEXT,
  text TEXT,
  metadata RECORD (
    iso_language_code TEXT,
    result_type TEXT
  ),
  retweet_count INTEGER,
  in_reply_to_status_id_str TEXT,
  id TEXT,
  geo TEXT,
  retweeted BOOL,
  in_reply_to_user_id TEXT,
  place TEXT,
  user RECORD (
    profile_sidebar_fill_color TEXT,
    profile_sidebar_border_color TEXT,
    profile_background_tile TEXT,
    name TEXT,
    profile_image_url TEXT,
    created_at TIMESTAMP,
    location TEXT,
    follow_request_sent TEXT,
    profile_link_color TEXT,
    is_translator BOOL,
    id_str TEXT,
    /*
    entities RECORD (
      url RECORD (
      ),
      description RECORD (
      )
    ), */
    default_profile BOOL,
    contributors_enabled BOOL,
    favourites_count INTEGER,
    url TEXT,
    profile_image_url_https TEXT,
    utc_offset INTEGER,
    id BIGINT,
    profile_use_background_image BOOL,
    listed_count INTEGER,
    profile_text_color TEXT,
    lang TEXT,
    followers_count INTEGER,
    protected BOOL,
    notifications TEXT,
    profile_background_image_url_https TEXT,
    profile_background_color TEXT,
    verified TEXT,
    geo_enabled TEXT,
    time_zone TEXT,
    description TEXT,
    default_profile_image TEXT,
    profile_background_image_url TEXT,
    statuses_count INTEGER,
    friends_count INTEGER,
    following TEXT,
    show_all_inline_media BOOL,
    screen_name TEXT
  ),
  in_reply_to_screen_name TEXT,
  source TEXT,
  in_reply_to_status_id TEXT
) USING JSON LOCATION ${table.path};

DML
SELECT
  coordinates,
  favorited,
  truncated,
  created_at,
  id_str,
  in_reply_to_user_id_str,
  contributors,
  "text",
  metadata.iso_language_code,
  metadata.result_type,
  retweet_count,
  in_reply_to_status_id_str,
  id,
  geo,
  retweeted,
  in_reply_to_user_id,
  place,
  user.profile_sidebar_fill_color,
  user.profile_sidebar_border_color,
  user.profile_background_tile,
  user.name,
  user.profile_image_url,
  user.created_at,
  user.location,
  user.follow_request_sent,
  user.profile_link_color,
  user.is_translator,
  user.id_str,
  user.default_profile,
  user.contributors_enabled,
  user.favourites_count,
  user.url,
  user.profile_image_url_https,
  user.utc_offset,
  user.id,
  user.profile_use_background_image,
  user.listed_count,
  user.profile_text_color,
  user.lang,
  user.followers_count,
  user.protected,
  user.notifications,
  user.profile_background_image_url_https,
  user.profile_background_color,
  user.verified,
  user.geo_enabled,
  user.time_zone,
  user.description,
  user.default_profile_image,
  user.profile_background_image_url,
  user.statuses_count,
  user.friends_count,
  user.following,
  user.show_all_inline_media,
  user.screen_name,
  in_reply_to_screen_name,
  source,
  in_reply_to_status_id
FROM
  tweets;

This patch also includes some refactoring of Schema class as follows:

Rename Schema::getColumns to Schema::getRootColumns.

It just returns only root columns in a schema.

Add Schema::getAllColumns, returning all flatten columns including nested fields.

I used this site to convert jsons to json lines.
http://www.freeformatter.com/json-formatter.html
I think that it would be helpful to make test data sets.

Thanks for the great work!
I'll review soon.

I looked over the above queries.
Basically, it looks good to support the nested schema.
I have a question.
It looks that a record column and a table have the same name. In this case, how can we identify them exactly?
Additionally, I have one suggestion.
As for tables, it would be good if we support the alias names for record types. It will be helpful when the record column has a long name.
What do you think?

Hi @jihoonson,

It looks that a record column and a table have the same name. In this case, how can we identify them exactly?

Here is how to resolve names.
https://github.com/apache/tajo/pull/422/files#diff-23481c6f9849708ac4a57d2252714846R312
There is a priority about resolving names. If a record column and a table, a table has a higher priority. To resolve this problem, users should use full qualified names.
Could you explain what alias for nested record is? Is it different from just column alias?

@hyunsik thanks. It looks good.
On alias, I was missed it. My suggestion is exactly same with column alias.

@hyunsik truly sorry for delayed review.
I'm reviewing, but it requires to be rebased.

@hyunsik, thanks for your nice work. I've left some trivial comments.
In addition, I met an error while running an example in the unit test as follows.
default> create external table test (title TEXT,   name RECORD (     first_name TEXT,     last_name TEXT   ) ) USING JSON LOCATION 'hdfs://localhost:7020/test/';
OK
default> \d
test
default> \d test

table name: default.test
table path: hdfs://localhost:7020/test
store type: JSON
number of rows: unknown
volume: 257 B
Options:
	'text.serde'='org.apache.tajo.storage.json.JsonLineSerDe'

schema:
title	TEXT
name	RECORD (first_name TEXT, last_name TEXT)

default> select * from test;
ERROR: java.lang.NullPointerException

Here is the log.
2015-05-08 01:47:37,239 INFO org.apache.tajo.master.GlobalEngine: Query: select * from test
2015-05-08 01:47:37,323 ERROR org.apache.tajo.master.GlobalEngine:
Stack Trace:
java.lang.NullPointerException
        at org.apache.tajo.catalog.DDLBuilder.buildSchema(DDLBuilder.java:76)
        at org.apache.tajo.catalog.SchemaUtil.toDisplayString(SchemaUtil.java:161)
        at org.apache.tajo.catalog.TypeDesc.toString(TypeDesc.java:66)
        at org.apache.tajo.catalog.Column.toString(Column.java:159)
        at java.lang.String.valueOf(String.java:2847)
        at java.lang.StringBuilder.append(StringBuilder.java:128)
        at org.apache.tajo.catalog.Schema.toString(Schema.java:503)
        at org.apache.tajo.plan.logical.ScanNode.getPlanString(ScanNode.java:246)
        at org.apache.tajo.plan.visitor.ExplainLogicalPlanVisitor.visitScan(ExplainLogicalPlanVisitor.java:195)
        at org.apache.tajo.plan.visitor.ExplainLogicalPlanVisitor.visitScan(ExplainLogicalPlanVisitor.java:32)
        at org.apache.tajo.plan.visitor.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:108)
        at org.apache.tajo.plan.visitor.ExplainLogicalPlanVisitor.visitUnaryNode(ExplainLogicalPlanVisitor.java:130)
        at org.apache.tajo.plan.visitor.ExplainLogicalPlanVisitor.visitProjection(ExplainLogicalPlanVisitor.java:88)
        at org.apache.tajo.plan.visitor.ExplainLogicalPlanVisitor.visitProjection(ExplainLogicalPlanVisitor.java:32)
        at org.apache.tajo.plan.visitor.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:69)
        at org.apache.tajo.plan.visitor.ExplainLogicalPlanVisitor.visitRoot(ExplainLogicalPlanVisitor.java:81)
        at org.apache.tajo.plan.visitor.ExplainLogicalPlanVisitor.visitRoot(ExplainLogicalPlanVisitor.java:32)
        at org.apache.tajo.plan.visitor.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:60)
        at org.apache.tajo.plan.visitor.ExplainLogicalPlanVisitor.getBlockPlanStrings(ExplainLogicalPlanVisitor.java:74)
        at org.apache.tajo.plan.LogicalPlan.getLogicalPlanAsString(LogicalPlan.java:344)
        at org.apache.tajo.plan.LogicalPlan.getQueryGraphAsString(LogicalPlan.java:334)
        at org.apache.tajo.plan.LogicalPlan.toString(LogicalPlan.java:366)
        at org.apache.tajo.master.GlobalEngine.createLogicalPlan(GlobalEngine.java:275)
        at org.apache.tajo.master.GlobalEngine.executeQuery(GlobalEngine.java:186)
        at org.apache.tajo.master.TajoMasterClientService$TajoMasterClientProtocolServiceHandler.submitQuery(TajoMasterClientService.java:287)

The main cause is that my patch does not support direct projection of record type. In other words, the current work only support projecting primitive type fields in nested records. I'll support this feature and flatten operator in another jira issue. Now, I added logical planner to prohibit the direct projection of record type.

tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/SeqScanExec.java, line 198 [r6] (raw file):
This was investigated at https://issues.apache.org/jira/browse/TAJO-1422. So, I'll remove this TODO comment.

tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/NameResolver.java, line 56 [r6] (raw file):
LogicalPreProcessor and LogicalPlanner changes all column names derived from relations are full qualified names. LogicalPlanner temporarily makes some short names during processing. So, the situation you mentioned won't occur in the current planner.

tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/NameResolver.java, line 104 [r6] (raw file):
Done.

tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/NameResolver.java, line 223 [r6] (raw file):
This is only for developers misuse instead of users.

Comments from the review on Reviewable.io

Thanks. I've verified that join and aggregation queries work well. Really nice patch.
The one thing I'd like to comment is that it needs to improve the error message.
Here is an example case.
default> select title, name.first_name, name.last_name from test t1, test t2 where t1.name.last_name = t2.name.last_name;
ERROR: column "title" does not exist
default> select name.first_name, name.last_name from test t1, test t2 where t1.name.last_name = t2.name.last_name;
ERROR: column name name.first_name is ambiguous

It would be great if the ambiguous exception occurs for the first case.

Comments from the review on Reviewable.io

+1 thanks for your nice work!


Keylogger issue

Quasar version
1.4.1
Server installed .NET version
No response
Server operating system
Windows 11/Server 2022
Client installed .NET version
No response
Client operating system
Windows 11/Server 2022
Build configuration
Debug
Describe the bug
I'm running v 1.4.1 and for some reason some of the logs of the key logger will not decrypt and it just shows random symbols. Could somebody please help?
How to reproduce
Try key logger
Expected behavior
To be able to read logs.
Actual behavior
Cannot read them.
Additional context
No response

The solution is (if you selecetd appdata in quasar builder settings) is to remote access the machine, go to the user's appdata, then open the defaulty titled 'Logs' folder and delete all the logs. Then wait a minute and go back to quasar manager and click on the keylogging tool and make sure to select get logs and it should work.

The solution is (if you selecetd appdata in quasar builder settings) is to remote access the machine, go to the user's appdata, then open the defaulty titled 'Logs' folder and delete all the logs. Then wait a minute and go back to quasar manager and click on the keylogging tool and make sure to select get logs and it should work.

What I said but in lesser words like over a month ago.

Do you think we should handle old keylogger logs differently, e.g. upgrading them (re-encrypt) to the new keys during a client update?

Do you think we should handle old keylogger logs differently, e.g. upgrading them (re-encrypt) to the new keys during a client update?

Only if you feel it's worth the time and would solve the occasional issue.
I realize you have enough to do.


project.py - changed (unlogical?) behaviour

Some commits before it was possible to call:
project.py -S

to get the supported matrix of MCUs and IDEs.
Now I get:
usage: project.py [-h] -m MCU -i IDE [-c] [-p PROGRAM] [-n PROGRAM] [-b] [-L]
                  [-S] [-E] [--source SOURCE_DIR] [-D MACROS]
project.py: error: argument -m/--mcu is required

and have to call e.g.
project.py -S -m ARCH_MAX -i uvision5

to get this tables.
The same error is generated with :
project.py -L

build.py and make.py with option -S are working as before.

I think it was introduced in PR #2010
Maybe @theotherjimmy can help.

Yep. On it.


REPL: Include Source Maps?

Thought:  Including source maps in the transpiled REPL output would allow browser debugging through the ES6 (REPL input) vs ES5 (REPL output) code.

Note to self, I tried simply setting the sourceMap option when transforming:
transformed = to5.transform(code, {
        sourceMap : 'inline',
        experimental: options.experimental,
        playground: options.playground,
        loose: options.loose && "all",
        filename: 'repl'
      });

...which actually worked in Firefox, but not in Chrome or Safari.

@sparty02 Are you working on creating a PR for this?

@thejameskyle Yeah, I have one for the simple change I mentioned above, but it's flaky across browsers.  It doesn't cause any issues, but it doesn't work great either.
Some considerations:

Should this be an option?  (I tend to think no, since it's more or less transparent)
Is it important that the source maps do/don't display in the REPL output (i.e. maybe they should be 'attached' behind the scenes)
Should this feature wait until a better cross browser solution is found?

Should this be an option?

No I don't think so.

Is it important that the source maps do/don't display in the REPL output (i.e. maybe they should be 'attached' behind the scenes)

Yes that would be much better.

Should this feature wait until a better cross browser solution is found?

Yeah, even if it's only enabling them in browsers we know will work (preferably via feature-detection if possible).

Hmm, I might be able to take this on. We would like an easy way to quickly make some source map examples for debugger-examples

Yeah I believe @developit already did something for the preact reply that we can do

Yup:
https://github.com/developit/preact-www/blob/master/src/components/controllers/repl/worker.js#L36

Hey all 😄 Would love your thoughts on #1315 regarding how we should expose this in the UI.


Consume correct core utils in lab

Commonjs appeared because of using deep path import

[x] I have followed (at least) the PR section of the contributing guide.

Should we fix all the occurrences?

I found only this one in lab

Ah, I see docs and tests too

@TrySound Thanks


Clarify a few points

As per here https://stackoverflow.com/questions/61729744/powerbi-gateway-load-balancing

When a new gateway is installed to the cluster, does it duplicate connections and credentials from the other gateway
Do gateways have to be the same version?

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

ID: 3609538e-bb86-1026-ddd5-dabe93fddc7e
Version Independent ID: 9dbd2442-7d03-5e24-0882-7a10cb2f71d7
Content: Manage on-premises data gateway high-availability clusters and load balancing
Content Source: data-integration/gateway/service-gateway-high-availability-clusters.md
Technology: on-premises-data-gateway
GitHub Login: @arthiriyer
Microsoft Alias: arthii

The connections and credentials are stored as metdata at the cluster level instead of a gateway member level.
Please make sure the gateway members within a cluster are running the same gateway version as different versions could cause unexpected failures based on supported functionality

@ElectricLlama Thanks for your feedback. Since your questions are answered, I'm closing this issue.

Thanks Guys!


feat: add useIonHead for ionic-compatible head metadata

I created an utility function, useIonHead, that works almost the same as useHead from unhead, but just with a hack around.
The function provides a way to dispose and patch the created head object just like useHead.
During the process, I realized that tabbed view was a big problem when trying to create this util, and the randomness of the Ionic Hooks. The main issue was leaving from a tabbed view to a non-tabbed view and trying to mantain or destroy state.
Guess What: You can nest useIonHead calls within children components and still retain the same structure after the page it was created on, is brought into view, and it's also fast as well.

This is fantastic! Do you think we should overwrite useHead instead of creating an additional composable?

This is fantastic! Do you think we should overwrite useHead instead of creating an additional composable?

Sure, I guess changing the name to useHead would be better for ease when working with ongoing projects

I think the next step would be to write a browser test that asserts the correct title after client navigation, following the pattern here:
https://github.com/danielroe/nuxt-ionic/blob/a45c95693f1fdb8de0be43d7a664db72989effd2/test/e2e/ssr.spec.ts#L27-L36
Is that something you would be happy & able to do?

@danielroe I will be able to do this

@danielroe  Already created a new test in the e2e/ion-head.spec.ts file, and also changed useIonHead to useHead with a higher priority.
Made a few more changes to the tests due to timeout and memory consumption from previously ongoing tests, ssr.spec.ts, by closing the open page, shaving off a huge amount of allocated memory.
I added delays after each toggle of the button in the test to represent the delay that useHead takes to rectify changes to the document's head tag, but this brought about a reason to increase the timeout for the test.
I hope the test satisfies the required condition

cc: @harlan-zw - you may have a better idea or improvements to suggest

I'm not entirely sure I understand the issue, the Ionic lifecycle hooks don't align with the Vue lifecycle hooks?
If you have any capacity to make an issue on the Unhead repo with some technical background I'd be happy to explore some alternative ways of solving it that don't rely on new composables.
This solution seems quite good though, nice job!


Future ownership of Quick Tabs

Did anyone hear from @babyman  lately? I haven't, but would like to see this project continue. But without the repository owner we can't do anything. I find it strange that he haven't said anything on here or anywhere else; not on his website, on twitter and so on.
So I contacted @babyman on twitter and wait for an answer. In the meantime we could collect ideas on how to proceed if he doesn't reply.

Hey @MartinLichtblau I have been really busy the last while and... anyway no excuses!  Time is starting to open up for me to review and merge pull requests, gather the best ideas and fix issues people have been experiencing.  I can't believe it's over a year since the last release!!
Thank you, and everyone else for taking the time to report issues and generally care about this project, I do still use it myself daily so it's far from dead.
Evan


Remove ignoring missing block files in Querier

This can lead to partial query results.

not sure if we need to revert this actually


updating an item in the cursor

Hi,
I was wondering if I update a property of a node returned from a cursor will it persist after a call to connection.commit?
Olu

No - the objects you get from the cursor are completely detached. This is by design, in order to keep this library light weight and simple. For that kind of stuff (eg. "live" objects), I'd recommend building a library on top of this one, like a graph mapping library :)


When Log Severity is Warning, the log cannot be sent to the syslog server.

What kind of request is this (question/bug/enhancement/feature request): bug
**Rancher version:**rancher/rancher:master 02/27
Steps to reproduce (least amount of steps as possible):

Enable syslog logging target
Log Severity select Warning
Save

Result:
The log could not be sent to the syslog server, fluentd error log:
2019-02-28 07:50:58 +0000 [warn]: #0 got unrecoverable error in primary and no secondary error_class=ArgumentError error="'warning' is not a designated severity"

I tested all Log Severities, only the Warning level could not send logs to the syslog server.

Could you add you syslog config and version, the warning severity is supported. https://en.wikipedia.org/wiki/Syslog

rsyslog version:
root@ip-172-31-31-219:/var/log# rsyslogd -v
rsyslogd 8.16.0, compiled with:
	PLATFORM:				x86_64-pc-linux-gnu
	PLATFORM (lsb_release -d):
	FEATURE_REGEXP:				Yes
	GSSAPI Kerberos 5 support:		Yes
	FEATURE_DEBUG (debug build, slow code):	No
	32bit Atomic operations supported:	Yes
	64bit Atomic operations supported:	Yes
	memory allocator:			system default
	Runtime Instrumentation (slow code):	No
	uuid support:				Yes
	Number of Bits in RainerScript integers: 64

rsyslog config:
module(load="imuxsock") # provides support for local system logging
module(load="imklog")   # provides kernel logging support
#module(load="immark")  # provides --MARK-- message capability

# provides UDP syslog reception
module(load="imudp")
input(type="imudp" port="514")

# provides TCP syslog reception
module(load="imtcp")
input(type="imtcp" port="514")

*.warning /var/log/hailong/warning_Log
*.debug /var/log/hailong/debug_Log
*.err /var/log/hailong/err_Log
*.info /var/log/hailong/info_Log
*.notice /var/log/hailong/notice_Log
*.crit /var/log/hailong/crit_Log

@aiwantaozi Tested with rsyslogd 8.34.0, the same error exists

The fluentd syslog gem depends on this gem, and it used deprecated warn instead of warning https://github.com/eric/syslog_protocol/blob/master/lib/syslog_protocol/common.rb#L58

Version: master 2.2 (3/7/19)
Confirmed fix. When Log Severity sets Warning, the log can be sent to syslog


PerformanceMonitor: augmented javadocs, some refactoring

I wanted to learn more about the PerformanceMonitor, in the context of creating a new set of metrics that can be seen pressing the F4 key. In the process of going through the code I saw a number of
opportunities for improving the javadocs and, to a minor extent, improving the readability of the code.
This PR attempts to fullfill those opportunities.
The first commit should be relatively uncontroversial: it just adds or refine javadocs to PerformanceMonitor and does some minor refactoring to PerformanceMonitorImpl. I imagine however the wording on some of the javadocs could be further refined.
The usefulness of the second commit is perhaps more debatable: primarily it makes the rollCycle() method more concise and readable by explicitly defining and instantiating (once) procedure classes rather than using anonymous ones. Furthermore it refactors getRunningMean() and getAllocatedMean() using a similar strategy.
Should the second commit be a step too far, I will anyway submit shortly a second, parallel PR including only the first commit. Cervator suggests that if this PR goes through the other one will be automatically closed. If this PR is too much, the other one will represent plan B.

Refer to this link for build results (access rights to CI server needed):
http://jenkins.terasology.org/job/TerasologyPRs/120/
Hooray Jenkins reported success with all tests good!

Tests out fine :-)
Looked at the code and it doesn't look crazy or anything. Just tweak the spacing and I say we merge it.
One maybe to look at - the "Memory Allocations" section you can toggle to with F4 lists the entries in ms - does that make sense? How is it a memory allocation?
That's probably pre-existing though

Yes, I think I'm going to fix the ms thing in memory allocation, but it's elsewhere, it doesn't actually have anything to do with the PerformanceMonitor but how the data from it is formatted.

Refer to this link for build results (access rights to CI server needed):
http://jenkins.terasology.org/job/TerasologyPRs/130/
Hooray Jenkins reported success with all tests good!

Ok, I think I've addressed all comments. I also added a few minor last minute changes marked in the third commit's description as "new".
For those who had a look at the second commit, here's the diff with the third commit.
For those who had a look only at the first commit, here is a diff with the third commit.
I will now close #1752 as it appears this PR might go through after all.

Looked over the additional changes some and tested again, all seems well (and so thoroughly documented!) so I'm merging :-)

Yay! Thank you!


How to set LoggerFactoryOptions.ActivityTrackingOptions via appsettings.json?

This paragraph describes how to make a logger add the W3C trace context (trace id, span id, parent id, tc.) to all log messages.
Is there an easy way how I can configure this via appsettings.json without having to hardwire the logging configuration into my C# code?
If so, could you please add a json code snippet to the documentation? Most other paragraphs on said site contain json examples for the configuration options.

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

ID: 7184a308-a254-9350-a5cd-5bced1f369ae
Version Independent ID: 726e3bf1-f367-d733-8933-bccc04da0e16
Content: Logging in .NET Core and ASP.NET Core
Content Source: aspnetcore/fundamentals/logging/index.md
Product: aspnet-core
Technology: aspnetcore-fundamentals
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

Nope. See https://learn.microsoft.com/en-us/aspnet/core/fundamentals/w3c-logger/


Support for Exec Runner tee command option

I want to check the contents of the standard output in real time when executing a command that takes a long time to execute.

It is the debugger's job to check the output of the Runner, but it may need to be well integrated with the runn.Capturer interface.

Implemented 👍


backport: merge bitcoin#25678, #26040, #26847, #25619, #27214, #26261, #27745, #27529, #28341, partial bitcoin#25331 (addrman backports: part 4)

Additional Information

Dependent on https://github.com/dashpay/dash/pull/6243

Dependent on https://github.com/dashpay/dash/pull/5167

Breaking Changes
None observed.
Checklist:

[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas (note: N/A)
[x] I have added or updated relevant unit/integration/functional/e2e tests
[x] I have made corresponding changes to the documentation (note: N/A)
[x] I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

pls see 2a840d10d9


Gateway does not refresh weight % with Spring Config Server

Version:
Spring Boot = 2.1.3.RELEASE
Spring Cloud version = Greenwich.SR1.
Background:
Our Spring Cloud Gateway application utilizes a Spring Config Server for application.yml values.
Steps leading to bug:

Update weights defined in our Config Server application.yml
Invoke /actuator/refresh & /actuator/gateway/refresh from our Spring Cloud Gateway router application
Router weights do not update and still show old values.

Question:
Could this be an issue be due to an incompatibility between Spring Cloud Gateway & Spring Config server?
Code snippet:
Specifically, envAWeight and envBWeight do not refresh.
    @Bean
    public RouteLocator customRouteLocator(RouteLocatorBuilder builder) {
        return builder.routes()
                      .route(r -> r.weight("group", envAWeight)
                                   .and()
                                   .path(pathA)
                                   .filters(f -> f.filter(fallBackUriFilter(envAFallbackUrl)).hystrix(c -> c.setName("envAcmd").setFallbackUri(
                                                   "forward:/fallback")))
                                   .uri(envAUrl))

                      .route(r -> r.weight("group", envBWeight)
                                   .and()
                                   .path(pathB)
                                   .filters(f -> f.filter(fallBackUriFilter(envBFallbackUrl)).hystrix(c -> c.setName("envBcmd").setFallbackUri(
                                                   "forward:/fallback")))
                                   .uri(envBUrl))

                      .build();

    }

Closed as duplicate of #922


Running export from downloaded fcrepo-import-export-0.3.0.jar binary hangs

I have a Fedora 5.0.0 repository built by the Islandora 8 claw-playbook on CentOS 7.
Following the instructions in the Fedora docs I

Downloaded the binary to ~/fcrepo-import/export/: curl -OL https://github.com/fcrepo4-labs/fcrepo-import-export/releases/download/fcrepo-import-export-0.3.0/fcrepo-import-export-0.3.0.jar
Created an export directory: mkdir /data/fcrepo-export
I ran the export script: java -jar fcrepo-import-export/fcrepo-import-export-0.3.0.jar --mode export --resource http://dams.library.unlv.edu:8080/fcrepo/rest/masters/whh --dir /data/fcrepo-export --binaries

The script displayed:
INFO 11:33:29.619 (Exporter) Running exporter...
INFO 11:33:29.620 (Exporter) Attempting to automatically determine the repository root
INFO 11:33:29.810 (RdfWriterHelper) Loading JENA 3.1.1 Patched RDF Output Writers

and then did nothing. After a bit I checked the export directory which was still empty. I don't see a log file anywhere for more details. Thinking it might be an authorization issue I used the default auth noted in the Fedora docs: java -jar fcrepo-import-export/fcrepo-import-export-0.3.0.jar --mode export --resource http://dams.library.unlv.edu:8080/fcrepo/rest/masters/whh --dir /data/fcrepo-export --binaries -u fedoraAdmin:secret3 but the result was the same. I got the same three lines and, an hour later, still no additional output or data in the export directory.
Any ideas?

Nevermind. I just let it sit and 1.5 hours later it finally started exporting.
I wouldn't think that "Loading JENA..." would take that long. If something else is happening it might be useful to give more status updates.


User Roles not being properly assigned.

Describe the bug
When you assign a role to an existing user from Groups page, and then refresh the page, it's non-deterministic but in some cases it appears that the role was not applied.
Relevant thread: https://datahubspace.slack.com/archives/C029A3M079U/p1671717473032899

hi Team,
this issue is consistently occurring on a self-hosted platform. The version of Datahub is 0.10.5. Please assist


Remove the gzip stage from S3 uploads

Apparently they do this for us now?

Note we should evaluate based on filetype-we have some oddballs that it may make sense to keep manually gzipped. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html#compressed-content-cloudfront-file-types

Apparently (according to testing at the LAT), CloudFront compression removes the Content-Length and ETag headers from responses. Since we use the latter extensively for avoiding unnecessary bandwidth in unchanged response polling (e.g., election data), we should not rely on CloudFront's compression.


NullPointerException MSA.java:424

I've been using devlogin for a couple of days now and never had any issues with it, until today
I'm running my fabric mod from IntelliJ with --msa added to the program arguments, and I'm getting this error:
[pool-2-thread-1/ERROR] (FabricLoader) Uncaught exception in thread "pool-2-thread-1"
 java.lang.NullPointerException: null
	at java.io.Reader.<init>(Reader.java:168) ~[?:?]
	at java.io.InputStreamReader.<init>(InputStreamReader.java:76) ~[?:?]
	at fabric.com.ptsmods.devlogin.MSA.lambda$doRequest$15(MSA.java:424) ~[devlogin-3.1.1.jar:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
	at java.lang.Thread.run(Thread.java:833) [?:?]

I tried restarting intellij, tried --msa-nostore, nothing changed.

I also just got this. Deleting the run/DevLoginCache.json file fixes it.

Guessing Microsoft maybe now lets refresh tokens expire? Not sure, but something on Microsoft's side is not approving of how we do things anymore.

This error occurs once every day for me, re-authenticating every time is getting quite annoying. Any ideas what might cause that?

This error occurs once every day for me, re-authenticating every time is getting quite annoying. Any ideas what might cause that?

I assume Microsoft now lets refresh tokens expire after a day which they never did before. I'm not sure if there's anything I can do to circumvent this, but I'll have a look.

I am using --msa-nostore however, the refresh token shouldn't be stored.

I am using --msa-nostore however, the refresh token shouldn't be stored.

In that case, you'll have to re-authenticate every time your session expires anyway.
I think that the error may be caused by the game token now being invalid in a different stage than it was before or the servers now respond differently to an expired token which would mean there's nothing wrong with the refresh token, it just doesn't get used.
But since the requests are done async, the stack trace isn't very helpful.

Understand this isn't your fault but Microsoft really be trying to make this worse and worse. Past couple weeks I had to delete the json and relog about once a day, now since yesterday it's been nearly hourly.

That does sure sound inconvient, I'll have a look at this tomorrow, see if I can find a solution.

Sorry for the big delay, I still haven't got a clue what caused this issue all of a sudden, but with the latest version, this is now fixed.

Oh it was very annoying problem, thanks for fix this :D


object: mark enpoint as a optional field

Signed-off-by: Nitin Goyal<EMAIL_ADDRESS>
Description of your changes:
Which issue is resolved by this Pull Request:
Resolves #
Checklist:

[ ] Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide).
[ ] Skip Tests for Docs: If this is only a documentation change, add the label skip-ci on the PR.
[ ] Reviewed the developer guide on Submitting a Pull Request
[ ] Pending release notes updated with breaking and/or notable changes for the next minor release.
[ ] Documentation has been updated, if necessary.
[ ] Unit tests have been added, if necessary.
[ ] Integration tests have been added, if necessary.

@travisn @BlaineEXE Can you pls take a look?

/approve
Looks good to me to make the endpoint optional,
I think we should also make this change upstream to make this change consistent.

/approve Looks good to me to make the endpoint optional,
I think we should also make this change upstream to make this change consistent.

It is already available in the upstream

/approve Looks good to me to make the endpoint optional,
I think we should also make this change upstream to make this change consistent.

It is already available in the upstream

Right, the changes are already in upstream master, somehow we missed in downstream cherry-pick.

/approve Looks good to me to make the endpoint optional,
I think we should also make this change upstream to make this change consistent.

It is already available in the upstream

Right, the changes are already in upstream master, somehow we missed in downstream cherry-pick.

@iamniting these changes also need in upstream 1.10 branch but not in master

/approve Looks good to me to make the endpoint optional,
I think we should also make this change upstream to make this change consistent.

It is already available in the upstream

Right, the changes are already in upstream master, somehow we missed in downstream cherry-pick.

@iamniting these changes also need in upstream 1.10 branch but not in master

I see here is a PR https://github.com/rook/rook/pull/11300


Add github action CI, replace travis

Closing as it's not running the github actions. Might need to be enabled first. See actions working in https://github.com/alexkli/openwhisk-wskdebug/pull/2 (PR in my fork).


[infra] iPhone 11 is not available

Type of Request
bug
Infrastructure Environment
Device Lab
What is happening?
Tree has gone red a few times in the last hour due to the failure below.
Infra Failure: Step('Prepare iOS device.Dismiss iOS dialogs.Run app to dismiss dialogs') (retcode: 70)

iPhone 11, error:iPhone 11 is not available because it is unpaired Pair with the device in the Xcode Devices Window, and respond to any pairing prompts on the device. }

Examples:
https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios platform_views_scroll_perf_non_intersecting_impeller_ios__timeline_summary/8501/overview
https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios complex_layout_ios__start_up/17170/overview
https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_arm64_ios hello_world_ios__compile/12973/overview
https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_arm64_ios flutter_gallery_ios__compile/12937/overview

@jmagman Problems has been resolved and fixed. Can you give another try?

Closing this because I'm no longer observing the infra failure and the tree is stable.


Add 'BufferWriter' class for constructing strings/sequences of characters.

This is a continuation of PR 2300 ( https://github.com/apache/trafficserver/pull/2300 ).  (I renamed the branch in my private repo, which seems to force one to create a new PR.)

[approve ci]

I have reworked this majorly, in the following ways:

The odious name Printer has been changed to BufferWriter.
I rebased the unit tests onto catch.hpp (in a way that allowed maximal reuse of the existing code).
I switched to Jason's ts::string_view.
Per Alan, I squashed the two abstract base classes into one (BufferWriter), and provided two derived concrete classes, one writing to an external fixed array (FixedBufferWriter), and one writing to an internal (to the instance) fixed array (LocalBufferWriter).  Potentially controversial:  the two concrete classes are specializations of a template (ConcreteBufferWriter) containing the large amount of stuff that is common to both of them.
The proxy/http code juggles lots o' raw char pointers.  Some of them point to nul-terminated strings, and some point to strings that are not nul-terminated, with a variable or fixed length.  When you are trying to find problems in this code, the more the code reflects this distinction the better.  An issue with this is that the standard string view has an implicit constructor from a char pointer (a conversion) that is not marked explicit.  This makes using the insertion operator (<<) problematic.  Because this header surgery code has per-message frequency, routinely calling strlen() unnecessarily may have a non-negligible performance impact.  I have eliminated the function call member operators, and use only use chainable writing member function with short names.  l() for nul-terminated string literals.  nT() for a pointer to a (non-literal) nul-terminated string.  sV() which forwards the actual parameters to a string_view constructor, and writes the resulting string_view.  c() to write a single character.

[approve ci]

For further explanation of this, I have set up documentation providing more context.

I added discarding BufferWriter derived classes.  They throw away the written data, and only keep track of the total length written.  Possibly useful for log field marshaling.

Looking at the base logic, I presume the concept is concrete subclasses will use the string_view interface to do what are effectively write buffer operations? Complimented by single character writes (pushback)?

[approve ci]

I think the discarding writer classes are interesting, but my view it would be better to have FixedBufferWriter do that by simply having it track theoretical size even in overload condition. Then you get the discarding behavior simply by creating a FixedBufferWriter with a zero sized buffer.

Yes @SolidWallOfCode the sV() templete member func forwards the actual parameters to the constructor of a string_view, then passes the constructed string view to pushBack().  So effectively there is an overload of sV() for each constructor of string_view with the same parameters.

Updated per @SolidWallOfCode 's comments

Pushed again to rebase to tip of master.

[approve ci]

Two questions:1.  What does [approve ci] mean?2.  Is it a valid python program?
On Tuesday, August 1, 2017 6:51 PM, Alan M. Carroll<EMAIL_ADDRESS>wrote:

[approve ci]—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub, or mute the thread.

I'm very, very torn on this. This seems overly complicated, for solving problems that I'm apparently unaware of. I don't like the usage syntax either, the class hierarchy is very complex, it's using things that we're not used to do. Why can't we keep things reasonably simple?

@zwoop So looking at the "old" and "new" code samples here:
https://gist.github.com/ywkaras/7d32688f8a0054df2d4f107891ffde7d
see the old way as better?  Or is there some third alternative better than both of these?

Pushed again.

Added << for Bryan.
Added write(), saveSize(), resizeIfError() for Alan.

I'm not keen on the impact of having so many interfaces, implementations and specific methods that basically does a "push" or "join". C++ is generally more clever than this. amc told me it's because of string literals (avoiding a strlen on "foo"), but if that's the only reason, I think I'd much prefer something like e.g.
bw.push(ts::string_view("the).push(' ').push("quick").push(' ').push(ts::string_view("brown"));

or with the new stream operators:
bw << ts::string_view("the") << ' ' << "quick" << ' ' << ts:;string_view("brown")

This is why amc added string_view in the first place I think? Either reads better than the original
bw.l("the").c(' ').cstr("quick").c(' ').l("brown");

Call the overloaded method push(), or join(), or add(), or whatever. l and c etc. reads really poorly, and would require me to look at your implementation (or docs)  everytime I need to decipher it.
IMO, a good library would make Bryan write code that read in a way that I (zwoop) never have to look at the library implementation. C++ and STL is notoriously bad at this, where you can't tell what happens under the hood without looking at an implementation, but that's no excuse IMO :-).

[approve ci]

@zwoop That's good with me as long as no one would object if I wrote:
{ // Beginning of some small scope.
  using SV = ts::string_view;

  // ...

  bw << SV("the") << ' ' << "quick" << ' ' << SV("brown");

  // ...
}

I've updated the documentation again, see if that looks any better. The main changes are

There is really only the write method now, overloaded for various inputs.
Built in support for C-strings is gone, callers must do the strlen. String literals are supported.

There is no operator << in BufferWriter for the same reason there aren't any in std::ostream. All of those should be free functions.

If we want to simplify the hierarchy, it might be reasonable to make LocalBufferWriter a subclass of FixedBufferWriter and remove the template and ConcreteBufferWriter.

@SolidWallOfCode  Oh so now you don't want your write() member that takes a functor parameter (wimp).
Re: ConcreteBufferWriter:

It's invisible to code using Local/FixedBufferWriter.
It adds no run-time overhead.
LocalBufferWriter will be fatter by a pointer and a size_t data member if it's rewritten to be derived from FixedBufferWriter.

Templates are like Boo Radley, scary but really your friend.

This is a bit scary.  Implicit conversion to string_view handles a literal string optimally, but calls strlen on an array of const char.
wkaras /tmp/X
$ cat x.cc
#include <string_view.h>

class X;

void operator << (X &, ts::string_view);

void foo(X &i) { i << "xxx"; }

const char argh[] = { 'a', 'b', 'c' };

void bar(X &i) { i << argh; }
wkaras /tmp/X
$ gcc -S -O2 -std=c++11 -Its x.cc
wkaras /tmp/X
$ cat x.s
	.file	"x.cc"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"xxx"
	.section	.text.unlikely,"ax",@progbits
.LCOLDB1:
	.text
.LHOTB1:
	.p2align 4,,15
	.globl	_Z3fooR1X
	.type	_Z3fooR1X, @function
_Z3fooR1X:
.LFB7938:
	.cfi_startproc
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	movl	$.LC0, %esi
	movl	$3, %edx
	call	_ZlsR1XN2ts17basic_string_viewIcSt11char_traitsIcEEE
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE7938:
	.size	_Z3fooR1X, .-_Z3fooR1X
	.section	.text.unlikely
.LCOLDE1:
	.text
.LHOTE1:
	.section	.text.unlikely
.LCOLDB2:
	.text
.LHOTB2:
	.p2align 4,,15
	.globl	_Z3barR1X
	.type	_Z3barR1X, @function
_Z3barR1X:
.LFB7942:
	.cfi_startproc
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	movl	$_ZL4argh, %edi
	call	strlen
	movq	%rbx, %rdi
	movl	$_ZL4argh, %esi
	movq	%rax, %rdx
	call	_ZlsR1XN2ts17basic_string_viewIcSt11char_traitsIcEEE
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE7942:
	.size	_Z3barR1X, .-_Z3barR1X
	.section	.text.unlikely
.LCOLDE2:
	.text
.LHOTE2:
	.section	.rodata
	.type	_ZL4argh, @object
	.size	_ZL4argh, 3
_ZL4argh:
	.byte	97
	.byte	98
	.byte	99
	.ident	"GCC: (GNU) 5.3.1 20160406 (Red Hat 5.3.1-6)"
	.section	.note.GNU-stack,"",@progbits
wkaras /tmp/X
$

Why would LocalBufferWriter be any larger if it was a subclass of FixedBufferWriter? It would just hide the super class constructor and substitute its own.
As for the function based write, you convinced me yesterday it would be better this way.

@SolidWallOfCode I'm shitcanning and redoing, so the question is moot.

I think that's a bit extreme.

@SolidWallOfCode I don't see an alternative.

And now it's something completely different:
https://git.corp.yahoo.com/pages/solidwallofcode/solidwallofcode.github.io/buffer-writer.en.html

[approve ci]

[approve ci autest]

@bryancall @SolidWallOfCode The lack of resolution of this PR is delaying a PR to add support for IETF RFC 7239.

[approve ci autest]

Can we break the impasse by adding an issue, that says we will revisit this at some point in the future, and remove members and squash base classes that aren't being used?


Document how to use solr images

The documentation on the official Solr docker image is a bit sparse and not particularly helpful for the Tugboat context. We should document how best to use Solr with Tugboat.

This got us a step further:
su -p solr -c "precreate-core [corename] [/path/to/config]"

For the Drupal 9 instance I had to use
search:
image: tugboatqa/solr:8.6
checkout: true
commands:
init:
- su -p solr -c "solr create_core -c mycore -d ${TUGBOAT_ROOT}/lando-src/solr-primary"
Where search is the name of my solr Host and mycore is the core.
@q0rban precreate-core definitely was creating solr and Drupal was communicating but for some reason there was an issue with the core being added.  So even though Drupal was talking to solr it was failing because there was an error in the core init.  Checking the logs I saw running precreate-core made the core but there must of been an underlying issue.

Another example https://github.com/bluehorndigital/tugboat-examples/blob/main/configs/drupal_extra_services.yml#L61-L66

Big thanks for @q0rban and @smustgrave to get me started on this. Here's my setup steps for Solr 8.6 and Drupal 9.2 using Search API Solr.

Create a new Solr service

  solr:
    image: tugboatqa/solr:8.6
    checkout: true
    commands:
      init:
        - su -s /bin/sh -c "solr create_core -c [CORE] -force" solr

      build:
        - cd "${SOLR_HOME}/[CORE]" && rm -rf conf
        - cd "${SOLR_HOME}/[CORE]" && ln -snf "${TUGBOAT_ROOT}/path/to/solr/config" conf

You will need to replace [CORE] with the name of your solr core configured in Search API Solr. You will also need to export the config.zip configset from the Search API Solr module, extract the archive, and store it in version control in your project for Tugboat to use (you also should do this for your other environments) in order to remove the "Incompatible configset" error message in the Drupal admin UI.

Depend on the Solr service

Make sure to add the solr service (or whatever you call your Solr service) to the depends directive under the default application.

Lastly, make sure you tell Drupal what the hostname is for the Solr service in Tugboat. You can accomplish this using the Config Split module and enable that split just for Tugboat, or you can override the configuration in a settings file that's loaded specifically for Tugboat:

$config['search_api.server.default']['backend_config']['connector_config']['host'] = 'solr';

Note: solr here is the service name in .tugboat/config.yml if you name your service something different make sure to use that service name as the host.


Incompatible with prompt_toolkit version 2.0

As prompt_toolkit 2.0 is not compatible with 1.0 (upgrade guide). whaaaaat can not be imported right now. Errors below.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/whaaaaat/__init__.py", line 6, in <module>
    from prompt_toolkit.token import Token
ImportError: cannot import name Token

Temporary fix:
pip uninstall prompt-toolkit
pip install -Iv prompt_toolkit==1.0.15

I saw the pt2 branch, but wasn't able to try it out, maybe because it targets a pre-release of pt2 (the req.txt seems to reference a commit that's been rebased, so it does not exist anymore?)
Do you have any plan of resurrecting it?

Just checkout the  master branch, it should be on version 2 now.
https://github.com/jonathanslenders/python-prompt-toolkit

Yes, I know, 2.0.4 is official now: but the pt2 branch does not seem to work with that neither.

You might want to pin requirements.txt to version 1.0.15 until you can update the library to ver 2.0.

I've been working on a fork of this stale project which runs on prompt toolkit 2: https://github.com/tmbo/questionary (does not work with prompt_toolkit 1 though, as it really is either or)

Thanks, I will surely try it out!

@tmbo, why have you discarded previous history? I would have expected some acknowledgement to at least markfink...
Anyway, is questionary completely API-compatible with whaaaat?

@lelit It is based on https://github.com/CITGuru/PyInquirer, so I acknowledged the work of Oyetoke Toby. But you are right, I have added Mark Fink as well, let me know if I am missing someone.
https://github.com/tmbo/questionary#contributors (is there a better place to put this?)
The API is compatible for the prompt types implemented (it is compatible to PyInquierer, but I think that one is in turn API compatible).

Great, thank you again.

@tmbo, just to say thank you again: FYI, basically replacing imports was enough to port my tinject tool to questionary :smiley:

so can we close this?

That's up to you, obviously: the existence of an PTv2-compatible alternative library does not actually change the fact that whaaaaat is not PTv2-ready.
If you do not foresee it reaching that state (in other words, if the pt2 branch is not going to evolve), the yes, and maybe make it official to avoid reopening similar issue.
Thanks for the work you have done, either way.