Named export 'knex' not found.

Environment
Knex version: 2.2.0
Database + version: MySQL 8.0.27-0ubuntu<IP_ADDRESS> - (Ubuntu), connector mysql v2.18.1
ts-node: 10.9.1
node: 14.20.0 (tried also with v16)
OS: WSL2 (Ubuntu)
@lorefnon
Bug
I am trying to run my server application using ts-node package with enabled support of ES Modules as described in the ts-node documentation. It's still an experimental functionality but all other dependencies work well so far. The problem I am experiencing is that when I use ts-node to run my script, I am getting an error that the named export knex is not defined since knex is a CommonJS package altough I am using the TypeScript syntax you are recommending in the documentation.
When I run the code below (this is truncated content of the server/start.ts script) using npm run server, I run into this error:
import { knex } from 'knex';
         ^^^^
SyntaxError: Named export 'knex' not found. The requested module 'knex' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'knex';
const { knex } = pkg;

import argv from 'argv';
import path from 'path';
import { knex, Knex } from 'knex';

export class Starter {
    private dbConnection : Knex;

    constructor(private script: string) {
        this.initDbConnection();
    }

    private initDbConnection() {
        const knexConfig : Knex.Config = {
          client: 'mysql',
          connection: {
            host: '',
            user: '',
            password: '',
            database: ''
          }
        }
        this.dbConnection = knex(knexConfig);
    }
}

argv.option({
    name: 'script',
    short: 's',
    type: 'string',
    description: `Start this script.`,
});

const script = argv.run().options.script;

new Starter(`${path.dirname(import.meta.url)}/${script}.ts`);

My package.json is as follows:
{
    ...,
    "type": "module",
    "scripts": {
        "server": "ts-node -P server/tsconfig.json -r dotenv/config --experimental-specifier-resolution=node server/start.ts --script=server",
        ...
    },
    "dependencies": {
        "@date-io/core": "^1.3.11",
        "@date-io/luxon": "^1.3.11",
        "@material-ui/core": "^4.5.1",
        "@material-ui/icons": "^4.5.1",
        "@material-ui/pickers": "^3.2.7",
        "@testing-library/jest-dom": "^5.11.5",
        "@testing-library/react": "^11.1.1",
        "@testing-library/user-event": "^12.2.0",
        "@types/argv": "0.0.5",
        "@types/bcryptjs": "^2.4.2",
        "@types/body-parser": "^1.19.2",
        "@types/cors": "^2.8.12",
        "@types/date-fns": "^2.6.0",
        "@types/debounce-promise": "^3.1.1",
        "@types/express": "^4.17.13",
        "@types/history": "^4.7.2",
        "@types/jsonwebtoken": "^8.5.8",
        "@types/leaflet": "^1.5.17",
        "@types/luxon": "^1.4.1",
        "@types/md5": "^2.3.2",
        "@types/node": "^18.0.6",
        "@types/node-fetch": "^2.6.2",
        "@types/papaparse": "^5.3.2",
        "@types/query-string": "^6.1.1",
        "@types/react": "^16.9.56",
        "@types/react-autosuggest": "^10.0.0",
        "@types/react-dom": "^16.9.9",
        "@types/react-easy-chart": "^0.1.4",
        "@types/react-leaflet": "^2.5.2",
        "@types/react-router-dom": "^4.3.1",
        "@types/react-table": "^6.7.17",
        "@types/react-text-mask": "^5.4.3",
        "@types/supertest": "^2.0.7",
        "@types/uuid": "^8.3.4",
        "argv": "0.0.2",
        "bcryptjs": "^2.4.3",
        "body-parser": "^1.20.0",
        "configchecker": "^1.5.1",
        "cors": "^2.8.5",
        "csv-stringify": "^6.2.0",
        "date-fns": "^2.28.0",
        "debounce-promise": "^3.1.2",
        "dotenv": "^16.0.1",
        "emailjs": "^4.0.0",
        "everstorage": "^0.9.1",
        "express": "^4.18.1",
        "history": "^4.7.2",
        "jsonwebtoken": "^8.5.1",
        "knex": "^2.2.0",
        "leaflet": "^1.7.1",
        "luxon": "^1.5.0",
        "md5": "^2.3.0",
        "mysql": "^2.18.1",
        "node-fetch": "^3.2.9",
        "objection": "^3.0.1",
        "package-json-type": "^1.0.3",
        "papaparse": "^5.2.0",
        "pdfmk": "^0.9.0",
        "query-string": "^6.2.0",
        "react": "^17.0.1",
        "react-app-polyfill": "^0.2.0",
        "react-autosuggest": "^10.0.3",
        "react-dom": "^17.0.1",
        "react-easy-chart": "^1.0.0",
        "react-leaflet": "^2.7.0",
        "react-router-dom": "^4.3.1",
        "react-scripts": "^4.0.1",
        "react-table": "^6.8.6",
        "react-text-mask": "^5.4.3",
        "socket.io": "^4.5.1",
        "socket.io-client": "^4.5.1",
        "sql-formatter": "^8.2.0",
        "supertest": "^4.0.2",
        "ts-node": "^10.9.1",
        "typescript": "^4.7.4",
        "uuid": "^8.3.2",
        "waitasecond": "^1.9.0"
    },
    "devDependencies": {
        "@typescript-eslint/eslint-plugin": "^5.30.7",
        "@typescript-eslint/parser": "^5.30.7",
        "depcheck": "^0.8.3",
        "eslint": "^8.20.0",
        "eslint-config-prettier": "^8.5.0",
        "glob-promise": "^3.4.0",
        "natural-orderby": "^2.0.3",
        "node-ssh": "^12.0.2",
        "onchange": "^6.1.0",
        "organize-imports-cli": "^0.8.0",
        "prettier": "^1.19.1",
        "promise-ftp": "^1.3.5",
        "source-map-explorer": "^1.6.0",
        "tar": "^6.1.11"
    }

tsconfig.json and server/tsconfig.json is as follows:
{
  "compilerOptions": {
    "downlevelIteration": true,
    "baseUrl": ".",
    "outDir": "build/dist",
    "target": "es5",
    "lib": [
      "dom",
      "dom.iterable",
      "esnext"
    ],
    "sourceMap": true,
    "allowJs": true,
    "skipLibCheck": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "strict": false,
    "noFallthroughCasesInSwitch": true,
    "module": "esnext",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react-jsx",
    "moduleResolution": "node",
    "rootDir": "./",
    "forceConsistentCasingInFileNames": true,
    "noImplicitReturns": true,
    "noImplicitThis": true,
    "noImplicitAny": true,
    "strictNullChecks": true,
    "suppressImplicitAnyIndexErrors": true,
    "experimentalDecorators": true,
    "noUnusedLocals": false
  },
  "include": [
    "src"
  ]
}

{
    "extends": "./../tsconfig.json",
    "compilerOptions": {
        "target": "es6",
        "module": "ESNext",
        "lib": ["es2017", "dom"],
        "rootDir": "./../"
    },
    "ts-node": {
      "esm": true
    },
    "include": ["."],
    "exclude": ["user"]
}

Solution
I actually found a solution online in this article so it seems I am not the only one out there experiencing this issue. It took me quite some time to figure this out and this looks like a very different (and unwanted?) behaviour compared to all my other dependencies.

This works for me:
import pkg from 'knex'
const { Knex, knex } = pkg

Got it from that error message:
import { Knex, knex } from 'knex'
^^^^
SyntaxError: Named export 'Knex' not found. The requested module 'knex' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'knex';
const { Knex, knex } = pkg;

The Node state of affairs when it comes to ESM vs CJS mix up is borderline ridiculous. And we have ended up with this unpleasant disaster of an ecosystem.
Would it make sense to have a branch of knex that has correct named exports so ESM projects can use it in peace?

I think it would be just fine (for now) if the correct way would be documented.

For future reference: sadly the only (not so straightforward) way of making it work in my ESM project is like:
import knex, { Knex } from 'knex';
let knex_conn: Knex;
async function connect(connection: Record<string, string>) {
    let conn = {
        client: 'pg',
        connection
    }
    knex_conn = knex(conn);
    return knex_conn;
}

Source.

The snippet above didn't work for me:
import knex, { Knex } from 'knex';

However, the following has worked for me by telling TS to not compile the type declaration:
import knex, { type Knex } from 'knex';

Just for furture, im adding that wen using alias this error also appears, i was using this:
import "dotenv/config";
import { knex as setupKnex, Knex } from "knex";
import { env } from "./env";

export const config: Knex.Config = {
  client: env.DATABASE_CLIENT,
  connection:
    env.DATABASE_CLIENT === "sqlite"
      ? { filename: env.DATABASE_URL }
      : env.DATABASE_URL,
  useNullAsDefault: true,
  migrations: {
    extension: "ts",
    directory: "./src/db/migrations",
  },
};

export const knex = setupKnex(config);

and my way was change to what @mhouchin suggest (thanks for you and all the other guys).
import "dotenv/config";
import knex, { type Knex } from "knex";     // changed the import
import { env } from "./env";

export const config: Knex.Config = {
  client: env.DATABASE_CLIENT,
  connection:
    env.DATABASE_CLIENT === "sqlite"
      ? { filename: env.DATABASE_URL }
      : env.DATABASE_URL,
  useNullAsDefault: true,
  migrations: {
    extension: "ts",
    directory: "./src/db/migrations",
  },
};

export const kknex = knex(config);    // changed here to kknex just for name, and call config directly

I dont know if someone is working in this at this time, but, in outher project of mine, i use the same code, but with no errors, using the alias setupKnex
import "dotenv/config";
import { knex as setupKnex, Knex } from "knex";
import { env } from "./env";

export const config: Knex.Config = {
  client: env.DATABASE_CLIENT,
  connection:
    env.DATABASE_CLIENT === "sqlite"
      ? {
          filename: env.DATABASE_URL,
        }
      : env.DATABASE_URL,
  useNullAsDefault: true,
  migrations: {
    extension: "ts",
    directory: "./src/db/migrations",
  },
};

export const knex = setupKnex(config);

Comparing the package files, the major diff is the node version i think. But, i tried to run at the LTS node 20.10 and also run good.
ACTUAL PACKAGE.JSON giving error:
{
  "name": "diet-planner-api",
  "type": "module",
  "version": "1.0.0",
  "description": "API for diet planning",
  "main": "index.js",
  "scripts": {
    "dev": "tsx watch src/server.ts",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "github.com:andreluiz901/diet-planner-API.git"
  },
  "author": "André Luiz",
  "license": "ISC",
  "devDependencies": {
    "@types/node": "^20.10.6",
    "@types/supertest": "^6.0.2",
    "eslint": "^8.56.0",
    "supertest": "^6.3.3",
    "tsx": "^4.7.0",
    "typescript": "^5.3.3",
    "vitest": "^1.1.0"
  },
  "dependencies": {
    "@fastify/cookie": "^9.2.0",
    "dotenv": "^16.3.1",
    "fastify": "^4.25.2",
    "knex": "^3.1.0",
    "pg": "^8.11.3",
    "sqlite3": "^5.1.7-rc.0",
    "zod": "^3.22.4"
  }
}

OLD PACKAGE.JSON running with no errors:
{
  "name": "modulo-02-aulas",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "engines": {
    "node": "18"
  },
  "scripts": {
    "dev": "tsx watch src/server.ts",
    "knex": "node --no-warnings --import tsx ./node_modules/.bin/knex --knexfile ./knexFile.ts ",
    "knex:migration": "node --no-warnings --import tsx ./node_modules/.bin/knex --knexfile ./knexFile.ts --migrations-directory ./src/db/migrations",
    "knex:m-latest": "node --no-warnings --import tsx ./node_modules/.bin/knex --knexfile ./knexFile.ts --migrations-directory ./src/db/migrations migrate:latest",
    "migrate:create": "npm run knex -- migrate:make --migrations-directory ./src/db/migrations -x ts",
    "lint": "eslint src --ext .ts --fix",
    "test": "vitest",
    "build": "tsup src --out-dir build"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@types/node": "^20.10.5",
    "@types/supertest": "^6.0.2",
    "eslint": "^8.56.0",
    "supertest": "^6.3.3",
    "tsup": "^8.0.1",
    "tsx": "^4.7.0",
    "typescript": "^5.3.3",
    "vitest": "^1.1.0",
    "sqlite3": "^5.1.7-rc.0"
  },
  "dependencies": {
    "@fastify/cookie": "^9.2.0",
    "dotenv": "^16.3.1",
    "fastify": "^4.25.2",
    "knex": "^3.1.0",
    "pg": "^8.11.3",
    "zod": "^3.22.4"
  }
}


Include the parent query for both approved and rejected queries

Store and push to disk (csv files) the parents along with the kernel value for both approved and rejected queries.

Closing this as implemented already.


Updating documentation with info relevant to the Mk5.1 hand

Also, general overhaul of the Coupling sections. Formulas amended, new images and clearer table.

cc @xEnVrE


Add Bootstrap Regression Procedure as a Test method

Here you can find an explanation about why this method is better than using Z-Score, Chi-Square or MAD
https://opensiuc.lib.siu.edu/cgi/viewcontent.cgi?article=1032&context=epse_pubs
https://opensiuc.lib.siu.edu/cgi/viewcontent.cgi?article=1033&context=epse_pubs

Thank you, @AngelGL!
I will check this out.
Would you happen to know what python package implements this?
Would you be interested in helping with the implementation?
Thanks anyway,
Milcent

Sorry, but I'm not a programmer. I just know very basic things about programming.

No problem.
I shall put in the pipeline anyway.
It’s just that time is scarce nowadays...


Feature request: AES Key Wrap/Unwrap (RFC 3394)

The problem
Some applications use Key Wrapping to store a key (that is used to decrypt some user data) in a "non-trusted" location, usually together with the data it encrypted.
The key isn't stored in plain-text and instead it is stored in an encrypted form, called the "wrapped" form.
This is done by encrypting using a secondary key, called a KEK. This secondary key is usually not stored in the same place.
A common way to implement it is to generate the KEK in memory based on a password/PIN code that a user enters, then decrypt the wrapped key and then use the results to decrypt the user's data.
"AES Key Wrapping" defined in RFC 3394 is a popular way to wrap keys.
It uses the raw AES function but does some arithmetic/shifting around the input/output.
So this is NOT the same as just Running AES-ECB with the input=key_to_wrap and the encryption key=KEK.
The solution I'd like to have
New modules in Cyberchef that work like this:

AES Key Wrapping: Works on the input data as the "Key Data" (Key to wrap)
With 2 parameters:
* KEK - The Key to encrypt with
* IV - As defined in RFC 3394, It's prepended to the "Key Data" before encrypting/wrapping it. (It is NOT used as the IV to the AES method. The abused the name "IV" here)
AES Key Unwrapping: Works on the input data as the "Wrapped Key"
With 2 parameters:
* KEK - The Key to decrypt with
* IV - As defined in RFC 3394, The first 8 bytes of the decrypted blob should equal to this IV (this is used to verify that unwrapping succeeded).

For both IV parameters, RFC 3394 suggests these 8 bytes:
a6a6a6a6a6a6a6a6
So using it as the default value will probably cover most use cases.
Alternatives I've considered
I've tried using "AES Decrypt"/"AES Encrypt" modules directly before I realized that the usage of AES in the wrapping/unwrapping is not just a simple call to AES, there are several additional shifting and XORing involved.
** Links: **
RFC 3394 - https://www.rfc-editor.org/rfc/rfc3394
Key Wrap in Wikipedia - https://en.wikipedia.org/wiki/Key_wrap

Implemented! I hope you like this.


Add proper argument/configuration management

Add proper argument/configuration handling using viper

As this is a package, this feature won't be implemented


Inconsistent Icon Focus and Lack of Color Change in Payment Section

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Navigate to "Settings" and select "Payments".
Click on "Add Payment" and choose "Paypal. me".
Hover over the icon behind the link and observe that The icon behind the link in the PayPal.me section does not focus like the icons in other sections. Additionally, the color does not change to a slight white as expected.

Expected Result:
The icon behind the link in the PayPal.me section should focus when hovering over it, and the color should slightly change as in other sections.
Actual Result:
The icon behind the link in the PayPal.me section does not focus when hovering over it like the icons in other sections. Additionally, the color does not change to a slight white as expected.
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android / native
[ ] Android / Chrome
[ ] iOS / native
[ ] iOS / Safari
[x] MacOS / Chrome / Safari
[ ] MacOS / Desktop

Version Number: 1.3.38-2
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/43996225/fdaed538-b8a9-46bd-97c7-dbe304bd1404
https://github.com/Expensify/App/assets/43996225/4e4d94c8-fd09-45d5-b16b-3c6434b4dc65
Expensify/Expensify Issue URL:
Issue reported by: @tewodrosGirmaA
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1688837421146249
View all open jobs on GitHub

Proposal
Please re-state the problem that we are trying to solve in this issue.
Inconsistent Icon Focus and Lack of Color Change in Payment Section.
What is the root cause of that problem?
there is no handle for hover and press event on the icon.
What changes do you think we should make in order to solve the problem?
We can handle hover and press event on the whole link or on the icon only and change the icon color based on it.
// we will use whole link PressableWithoutFeedback to apply hover on whole link.
// or surround the Icon with new PressableWithoutFeedback to make the change only in icon
<PressableWithoutFeedback>
      {({hovered, pressed}) => (
             ...
             <Icon
                 ...
                  fill={(hovered || pressed) ? themeColors.iconHovered : themeColors.icon}
              />
              ...
      )}
  </PressableWithoutFeedback>

What alternative solutions did you explore? (Optional)
N/A

Bug report looks good!

I don't think this is a bug, they are different components.


Define behavior for function calls with non-matching argument count

The behavior is currently defined - or was of a couple of weeks ago - as a 'resolution failure', and thus returns null and emits a warning.
You may of course wish to change this.

Thanks @lukechurch!


Bump version to 1.0.2

Verified that @boxtcarpel has signed the CLA. Thanks for the pull request!

+2 LGTM


show_dash keeps hanging indefinitely when port is already used.

I experienced (plotly-resampler 0.8.0) that a dash app might keep "hanging" indefinitely, when something is already running on the same port, seems to be caused by a dash-werkzeug combination. Will need to further look into this (fyi: @jvdd )
https://github.com/plotly/jupyter-dash/issues/103#issue-1385617801

Seems to be related to the werkzeug version, when I switch from werkzeug==2.2.0 -> werkzeug==2.1.0, everything seems to work fine.
Maybe we keep this issue open and adjust the pyproject.toml as a hotfix? @jvdd


[CP Staging] Fix document upload on Android

@mountiny
Details

Add file:// scheme prefix to attachment files (when it's missing)
Related to: https://github.com/Expensify/App/pull/4908#issuecomment-1013968846
RN Document picker does not add a URI scheme for the file uri on Android. This seems to work ok for showing the document in previews, but instantly fails File upload when file:// is missing
Checked on iOS and there we do have a file:// prefix
So the logic that adds the prefix is conditional
Maybe we should try to address this on RN document picker's repo - this PR would remove the deploy blocker in the meantime
Fixed Issues

$ https://github.com/Expensify/App/issues/7267
Tests

[ ] Verify that no errors appear in the JS console
[ ] Add a Document attachment in Android (verify it gets uploaded)
[ ] Add a Document attachment in iOS (verify it gets uploaded)
[ ] Add a Document attachment on other platforms (verify it gets uploaded)

QA Steps

Same as above
Tested On

[x] Web
[x] Mobile Web
[x] Desktop
[x] iOS
[x] Android

Screenshots

Web

https://user-images.githubusercontent.com/12156624/149757142-b7beb8de-c4dc-46bb-b3e3-65a072cdfc3d.mp4
Mobile Web

https://user-images.githubusercontent.com/12156624/149758955-0ddcf6ff-d9f0-46c0-8c2d-c7661667adec.mov
Desktop

https://user-images.githubusercontent.com/12156624/149758544-e45cee5b-2582-4987-bde3-b2823ceef7cf.mov
iOS

https://user-images.githubusercontent.com/12156624/149754955-b9012998-e7b1-4ce8-be58-f9e0c327c04d.mov
Android

https://user-images.githubusercontent.com/12156624/149754871-620c812c-38ca-4307-8d4b-9883c1f70935.mp4

🚀 Cherry-picked to staging by @mountiny in version: 1.1.30-1 🚀

platform
result

🤖 android 🤖
failure ❌

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes.

Great! Thank you for fixing this deploy blocker. I agree this would be better to fix in the RN Attachment picker.

I've opened an issue here: https://github.com/rnmods/react-native-document-picker/issues/526
I guess it would be OK if we can open a PR about it

Thank you for following up with the issue. It would be great if the fix could be implemented in the package itself. Would you be able to also create the PR? Do you need me to create a separate issue in our repo so you could be paid for it or can you just add time spent on that to this issue?

Thank you for following up with the issue. It would be great if the fix could be implemented in the package itself. Would you be able to also create the PR? Do you need me to create a separate issue in our repo so you could be paid for it or can you just add time spent on that to this issue?

You're welcome
I've identified the cause https://github.com/rnmods/react-native-document-picker/issues/526#issuecomment-1014777947 and I can submit a PR
I can time track it and log it under https://github.com/Expensify/App/issues/7267
Can you add me there (but remove the deploy blocker label)?

Done @kidroca! Thank you!

🚀 Deployed to production by @roryabraham in version: 1.1.30-3 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Add ServiceGenerator::finalize_package

Similar in motivation to ServiceGenerator::finalize, this adds a new trait method finalizer for an entire package, not just individual proto files.
This resolves a challenge in tonic-build that causes multiple client and server modules to appear in the generated code when service definitions for a single package are spread across multiple proto files. See https://github.com/hyperium/tonic/issues/38 for existing discussion.
With this feature, tonic-build can very easily support the use case with complex proto packages broken into smaller proto files. The following comment contains a simplified example of such a proto file layout: https://github.com/hyperium/tonic/issues/38#issuecomment-557213434

This is not currently working the way tonic expects. The unordered nature of HashMap iteration is causing some breaking changes. I'm looking into a way to fix this now.

This is fixed. I will add some tests in a bit. @danburkert if this looks good to you, I'd like to propose a new patch release with this feature included.
The unordered iteration wasn't really the problem. tonic-build just needed a way to associate the finalize_package calls with an actual package name.

Added tests for the new feature.

Nice work @parasyte.  I'm also blocked on this whilst looking to migrate from protoc-grpcio to tonic.
I've been using a specific commit from master for a while now as it has a fix for another (unrelated) blocking issue and so rather than a patch release specifically for this issue it would be good to get a full release of prost with all a rollup of all the latest changes and fixes when feasible.

Merged.  Thanks @parasyte!


added tree sort under hacktoberfest 2022

@AdarshAddee kindly view the PR and merge under Hacktoberfest 2022 label if it seems fine. Thank you!


Blueprint page should show some info when loading blueprint settings instead of a blank page

When user enters into blueprint page to view blueprint setting, like hostname, image, etc, by click blueprint name link, there's a blank page without any information, e.g. loading or prompt user blueprint setting is loading banner.
And the blank page keeps at least 1-2 minutes before blueprint setting is loaded.

Combining #323 into this issue:

The Blueprint page should load immediately, and not make api calls for depsolve or composes until requested by the user.
* When the user navigates to the Blueprint page and the Details tab loads, don't make any api calls for composes or dependencies

* When the user clicks the primary tab labeled "Selected Components":

  * Then the depsolve api call is called
  * The loading icon displays in the Dependencies tab until the components are loaded. When the Dependencies are returned, the badge with number of dependencies will display with the tab
  * The loading icon will display on the secondary "Selected Components" tab

* When the user clicks the primary tab labeled "Images":

  * The composes api call is called
  * The loading icon displays in the page

* After fetch is complete for any of the cases listed above, if an error occurred, then an error message should display (similar to the one added for Blueprints in #268)


Make netplugin resilient against unconfigured data stores

Description

When netplugin starts, it will contact etcd/consul ("the data store") and attempt to read the configuration it should use.  If no configuration is present, it will load a default configuration (mainly, forwarding mode becomes "bridge") and establish a watch to be notified of future changes.
There is some kind of race condition or timing bug where netplugin can come up but have a forwarding mode (and potentially other settings?) which does not match the current state of the data store.
This is pretty easy to reproduce using the make demo-kubeadm target in contiv/install.  One or both of the nodes will come up with the wrong forwarding mode.
There are a few issues here:

The race condition/timing issue.  We should probably establish the watch before checking the data store for the config.  If we do things the other way around, there is a tiny window between the read and the establishing of the watch where we could miss an update.  I doubt this is the issue, but we should fix it.
Should netplugin start with default settings in the absence of an available configuration?  I would say NO.  Even if netplugin receives a config via the data store watch shortly after it starts, there is a period of time where it is 100% capable of servicing requests from Docker when it has no configuration loaded.  This seems really bad and unnecessary and is easily avoided.  We could either poll in a loop until the configuration is present or just die (like when the data store is unavailable).  There are likely other options here, like having the configuration set up as part of the container bring-up, etc.
We should modify our k8s yaml to have a readiness probe for netplugin.  The probe could be hitting one of the HTTP endpoints which isn't available until after the config is read + applied and the http listener socket is up.

Expected Behavior

Netplugin shouldn't come up in a different forwarding mode than its data store is specifying.
Steps to Reproduce (for bugs)

Clone contiv/install, run make demo-kubeadm
cd cluster
vagrant ssh kubeadm-master -- sudo head /var/contiv/log/netplugin.log <-- look at forwarding mode
vagrant ssh kubeadm-worker0 -- sudo head /var/contiv/log/netplugin.log <-- look at forwarding mode

Your Environment

netctl version: 1.0.3
Orchestrator version (e.g. kubernetes, mesos, swarm): k8s 1.6 and 1.7
Operating System and version:  Mac OSX 10.11.6 and Ubuntu 16.04 LTS (amd64), both running latest Vagrant and Virtualbox

cc: @gkvijay @rhim

@tiewei looks like it is something you have fixed?

yes, this can be closed

i think this has been resolved by contiv/netplugin#1043


Documentation

I added some more documentation and a few examples. Ready to receive your comments, @dalcinl.
See HTML @ https://shmem4py--15.org.readthedocs.build/en/15/index.html

As we discussed, demo examples now run as part of CI/CD and the code from demo is "included" in examples.rst.


[#491] add oauth moduels

add omniauth gems
add oauth custom drivers
add member login modules

Coverage decreased (-0.09%) to 75.48% when pulling ad4617353dd70011f29dfac52f69ce807e883611 on sunny4381:shirasagi-491 into 65e39f19c2df4a2e0e96223b13874d7076a7f915 on shirasagi:master.


Custom radios / checkboxes [DO NOT MERGE]

This requires no change to the existing HTML: the custom inputs are built using pseudoelements. In a no-JS / no-CSS / IE8 scenario it falls back to standard inputs. To style the radio and checkboxes differently a class is needed on the label. As the selected state requires the SelectionButton class from govuk_frontend_toolkit this was updated to add this automatically, and will need to be merged at the same time.
This is partially based on Verify’s styles, and updates a design by @timpaul and @joelanman inspired by observations from user research and lots of requests from @cjforms. The inputs are sized to match the height of text inputs.

Tested on:

IE 7-11
Edge 14
OS X Firefox 48
OS X Chrome 51
OS X Safari 9
iOS Safari 5.0 - 9.1
Android 4.4+ Chrome

Android Browser on BrowserStack’s Nexus 4 (4.2) is massively unresponsive and doesn’t seem to let you click on the radios most of the time. It will need to be tested on a real device.
Would absolutely love any feedback.

[x] Base implementation + testing
[x] Check that this works with click events in Selenium (testing in verify indicated possible problems)
[x] Make it use currentColor for compatibility with custom colour themes
[x] Make the pseudo-elements permanent and just repaint the background colour on state change
[x] Add a translucent hover state
[ ] Potentially make it work with em sizing
[ ] Test in old Android devices
[ ] Check that it works with screen readers and assistive tech

Tim Paul and me :)

Oops! Fixed.

Nice

Might be worth marking as [Do not merge] since it relies on the upstream addition to selection buttons?

Some interesting information around touch sizes http://www.lukew.com/ff/entry.asp?1085 , might be relevant :P

Interesting research! The actual input has increased in height from 29px to 37px, but as we’ve removed the grey background it no longer needs the padding which means that the overall height of the hit area has gone down from 60px to 37px. As long as people are still trying to press on the control maybe that’s not a problem though.

this work comes from user research that shows that in general people don't know the grey area is the hit box. so while the actual hit box is reduced, the perceived hit box is increased.
also worth noting that, at least in Chrome on OSX, our current radios aren't actually 29px (perceived)

Just remembered, I also want to get @cfq / @accessiblewebuk / @aduggin’s seal of approval on this before we merge, or at least before we do a release.

@robinwhittleton Can you make a rendered version available on a public url (for example, in the sandbox) so we can get it fully tested?

Why does it need to fall back to default inputs in a no js situation?

<input /> is an empty element; it can’t have pseudo-elements because there is text content for a ::before or ::after to be before or after. Therefore if we want to keep the same HTML structure we need to attach out pseudo-elements to the parent label. That poses a problem – we can’t style the parent based on child state (currently) so we need to base our pseudo-element styles on the classes that SelectionButtons applies. If we don’t have these classes then the fake inputs will be able to display their selected state, so we need to make sure that they don’t show up in the absence of JavaScript.

Based on a design by @timpaul and @joelanman inspired by observations from user research and lots of requests from me.

Is this deployed anywhere we can try?
What do these do on hover?
What do these look like with focus?
Any thoughts on the below hover effect? (stolen from @selfthinker)

Is this deployed anywhere we can try?

Not yet.

What do these do on hover?

No change. I like @selfthinker’s idea. What would you want to do with checkbox hover states?

What do these look like with focus?

Due to removal of padding I went for outline of the element (square with checkboxes):

@robinwhittleton It's something I'd want to try in user research. I suspect you could do a greyed out tick on hover. I think once the radio or checkbox has been checked, hovering over it should not show the greyed symbol.
An alternate would be to show a hover effect that is not the same as the tick or dot and could work whether the control was selected or not. Something like changing the white ring for a grey ring, or grey inner-stroke.

Seperately - how do these work for people who use css to adjust contrast / change colours?

It’s worth having the conversation about contrast issues, but my gut feeling is that browser-default checkboxes and radios already don’t respond to setting user colours?

@robinwhittleton My worry is especially about something like this happening:

Where the controls themselves disappear rather than being the wrong style.
Chatting with @nickcolley on Slack, it sounds like we may have a solution?

The idea I put forward on slack was to remove the white background from the input and allow the colour to be defined by the text color of the label.

In the above examples the container I set the background-color and color and you can see the changes reflect properly when using currentColor and removing the background from the input.
Might be some edge cases I've not thought about though..

Hmm. That generally works. I think on Verify start page we’d want to keep the white background though.

Yeah I think the current implementation should work fine even if the user changes their background/color sorry!

@robinwhittleton The current live verify radios do not work if the user has custom colours set (using firefox). Clicking on the option does nothing (visually). Where can I raise this?

New issue on verify-frontend? The fix might be to complete this PR though and merge that in.

This is ace, thanks Robin. Minor question: is the js-enabled class needed in the selectors?
I might be missing something but I think the styles can all be based off the selection-button-radio and selection-button-checkbox classes which are only applied if the JS for that runs anyway. If that's the case it would be nice to hang these styles off that rather than being dependant on the user having JS at all.

For the most part that wouldn’t be a problem, but imagine this situation:

Developer copies HTML from an existing service by opening devtools and right-click / Copy HTML on a node.
Developer then pastes that rendered HTML (which includes selection-button-radio) into a new place and changes the name and text of the radio and label.
Developer doesn’t notice any difference as the JS is applying that class anyway.
User without JS finds a custom radio button and no way of selecting it.

Obviously good developers should test with JS disabled, but it’s easy for something to slip through.

Makes sense.

@robinwhittleton really interesting and useful - thanks for posting. I learn something new every day working here.

@robinwhittleton I did not realise that the removal of padding meant that the focus outline would shrink to the target. That's not so good. Although many people aim for the target - hence this whole large target idea - the majority do not (especially on mobile), so the focus ought to include the clickable area, especially including the label. Having the focus solely around the target gives the impression that only the target is clickable.

@cjforms it would be good to do some research on this. I'm not sure it's as much of an issue - unless you're using keyboard controls, you don't normally see focus until after you've picked something. So the focus area isn't that important for indicating what you can click on. Right now the grey fill and border indicate the click area, and for me that's a bigger loss for indicating where you can pick.
"Although many people aim for the target - hence this whole large target idea - the majority do not (especially on mobile)" - do you mean the reverse? On mobile I agree that users pick the text (or the area in the grey box), but on desktop the vast majority I've observed go for the target.

Can we try alternates with having the focus around the entire area? I'm not sure it does much for indicating click area, but if you're using keyboard controls it's probably an improvement.

@edwardhorsford Maybe I was wrong to quote 'the majority' and 'many'. I had these approximate ratios in mind:

more mobile users than desktop
mobile users more likely to aim for clickable area than target
I've seen roughly equal number of users aim for clickable area and for target.
But you've watched a lot more desktop users recently than I have, and I'm sure the proportions of users on mobiles and users on desktop vary a lot by service.
What I really meant was: making life easy for people who aim for the target is a good thing, and we also need to continue to make life easy for people who aim for the clickable area.
+1 to your point about focus and keyboard controls. Let's test it.

Had a meeting with @markhurrell / @joelanman / @gemmaleigh / @miaallers: general consensus what that we were happy with the approach but wanted to tweak the design a bit and add a hover state. I’ve done this and updated the image in the first post to match the current state.

I prefer the smaller dot, so, I like the improvement.
Regarding the hover and having "stolen" from me, I just wanted to give a shout to @encosion who had the idea in the first place (at my previous job). Maybe he stole it from somewhere as well. ;-)

Cheers @selfthinker! I don't recall but, there is nothing new under the sun...

We should also check that the hover states do not affect devices that do simulated hovering.
https://github.com/twbs/mq4-hover-shim

@nickcolley turns out we don’t need to shim CSS4 hover: none media queries as it’s supported in recent versions of Safari and Chrome.

@robinwhittleton that'll work on newer iOS devices but we'd still find that bug in older devices if we tested them I think...

Looks great. I dispose of waste from mines and quarries mainly.

Chatting with @adamsilver got me thinking about another problem. We know that a fair few people have .js-enabled but don’t get the rest of the JS (broken pipe to CDN / people MitMing the connection and messing with the JS / browser plugins breaking the environment etc). In this scenario the inputs will now be broken for them as they’ll never be able to select them, or at least see the visual state of them being checked. Is there anything we can do for these users?

@robinwhittleton assuming the definition and initialisation happens in the same script (bundled/concat for prod etc) then you could do something similar to this:
    <script>
    	// Assuming the script is called GOVUK.SelectionButtons
    	if(typeof GOVUK === 'undefined' || typeof GOVUK.SelectionButtons === 'undefined') {
    	   // undo the incomplete enhancing
    	}
    </script>
</body>

Fixed that situation for some of the people in https://github.com/alphagov/govuk_template/pull/248, which will be released soon in govuk_template 0.18.2.

Current status: waiting on @cfq / @accessiblewebuk to check these in Dragon NaturallySpeaking 13. DAC reported these working in 12.5 and failing in 13, so I want to get to the bottom of what’s going on before launching.

Got a chance to sit down with Dragon 13 today and figured out what the problem is - it doesn’t recognise the original checkboxes / radios with our original hiding code. There’s a fix in https://github.com/alphagov/govuk_elements/commit/ea23ea5af2362d54d9eddfdadb19459bd5a71a28, and I’ve tested that in lots of different places. I haven’t yet tested in Dragon 12.5 though. Has anyone got a copy to test in? http://govuk-elements-wip.herokuapp.com/form-elements/#form-radio-buttons is currently running this latest code.

@aduggin is going to run this back past the DAC to get the latest version checked out.

With the fix in place for Windows high contrast themes DAC gave their thumbs up. I think, amazingly, that’s we’re ready to go.

N.b. anyone using this will need to be on at least govuk_frontend_toolkit 4.17.0 as that contains the necessary JavaScript to get this to work properly.

Thanks for all your work on this @robinwhittleton and to everyone else who contributed and offered advice.
We'll release an update to govuk_elements for custom radio buttons and checkboxes today and update the govuk_prototype_kit to include them too.


Some navigations don't work on iOS 14

Hey,
I've just updated Pulse to the latest version (thanks for your work on it recently btw!).
I was using PulseUI in my UIKit app, by using MainViewController. Since it was behaving strangely after the update, I looked at the docs, and noticed MainViewController is now deprecated. According to the docs, showing ConsoleView in a UIHostingController should be sufficient to replace it. But by doing so, I only get the console view, nothing else.
By embedding ConsoleView in NavigationView, I get the top buttons with the menu allowing to access the other stuff (Insights, Settings…). Unfortunately, clicking those items don't do anything (except the Sponsor button).
I'm probably doing something wrong. Here's my code:
    static func showDebugUI(from vc: UIViewController) {
        let navView = NavigationView {
            ConsoleView()
                .navigationBarItems(leading: Button("Close") {
                })
        }

        let hostingController = UIHostingController(rootView: navView)
        let debugUIVC = hostingController
        vc.present(debugUIVC, animated: true)
    }

Could you please recommend the correct way to transition from MainViewController to ConsoleView with UIKit?

Hi, I tested the provided code with the latest version of Pulse and it works well. Can you please provide a sample where I could reproduce it?

Alright I have some findings. It was driving me crazy because it was working correctly on the test project I was making for you. But I was building my app on my iOS 14 iPhone, and the test project on the iOS 16 simulator. So here's the conclusion: opening those menus is broken on iOS 14. I've tried on iOS 15, works fine, so only iOS 14 is affected.
I can share with you the test project, but it is basically just the provided code above (tell me if you still want it).

I can share with you the test project, but it is basically just the provided code above (tell me if you still want it).

Thanks for providing the details. No, need for the project.
Yeah, it compiles on iOS 14, but there've been so many changes to how SwiftUI APIs work in iOS 15 that I barely support iOS 14. But I'll take a look. And PRs are always welcome as well.

I would have loved to be able to help, but unfortunately I've looked at it, and being pretty novice with SwiftUI (trying to stay as far as possible from it), I'll probably won't be of any help. I would have started playing with the .sheet() or NavigationView handling in ConsoleRouterView.swift, but I don't know how navigation is supposed to be done in SwiftUI so I'd probably messed with something 😅

Hey, I tried using the exact code you provided on iOS 14.5 (sim) and all navigations seems to work as expected:
 func showDebugUI(from vc: UIViewController) {
    let navView = NavigationView {
        ConsoleView()
            .navigationBarItems(leading: Button("Close") {
            })
    }

    let hostingController = UIHostingController(rootView: navView)
    let debugUIVC = hostingController
    vc.present(debugUIVC, animated: true)
}

Maybe there are some other conditions to reproduce it? Which specific iOS version have you tried?

Hey! So I had tried on an iOS 14.3 physical iPhone and was able to reproduce it in a new project. I could try downloading other versions on the simulator to check if I can provide more information about the affected versions.

I would appreciate it if you could look into it and make a fix. I'm not planning to invest more resources into iOS 14 support – I'm planning to remove it soon.

The new version (Pulse 4.0) removes support for iOS 14. You can still integrate it in projects that target it, but the ConsoleView will show an error messages if it runs on a system below iOS 15. So I'm closing this ticket.


Record Keeping for sig security assessments

Creating the OWNERS file for sig-security-assessments
/sig security

/verify-owners

/verify-owners

/easycla

/verify-owners

/verify-owners

/lgtm
/assign tabbysable coldwater
(Looks like CLA and Org membership issues are now resolved. Assigning to chairs for approval)

/assign IanColdwater
(Trying the correct Github handle now)

/approve
/honk


Add bibliography usage to sample code

This is done in https://github.com/raxod502/mla-tex/commit/1ce4219a16c76c4245b6f1449cb624b0b6ecbb23.


chore(wrangler): Add pages dev tests

What this PR solves / how to test
This PR adds some sanity-check unit and e2e tests for wrangler pages dev.

Author has addressed the following

Tests

[ ] TODO (before merge)
[x] Included
[ ] Not necessary because:

Changeset (Changeset guidelines)

[ ] TODO (before merge)
[ ] Included
[x] Not necessary because: not user facing. Only adding tests

Public documentation

[ ] TODO (before merge)
[ ] Cloudflare docs PR(s): https://github.com/cloudflare/cloudflare-docs/pull/...
[x] Not necessary because: not user facing. Only adding tests

Ironically, the E2E Tests CI job is skipped, so y'all just have to take my word that all these tests are 🍏  ;)


lport or local bind

please add local bind options for softether clients or local port and user can change port numbers

For changing ports,
You can use either the SoftEther VPN Admin GUI for windows or you can do that from command line if that's a *NIX server.
Windows GUI works fine and it's easy to understand and can do those things you require.

you are wrong i am not server admin to change remote port used by vpn server.
I am asking SoftEther VPN Client manager windows needed option change local port used by vpn config not remote port (like openvpn remote port set by vpn provider but local port can be changed by user using lport option and user can bind to any port, but in softether vpn client manager only option to change remote port )

Sorry the question is not clear at all. Which port are you talking about? When you start the connection from your PC, a socket is created on your machine with a port number > 1024 and connects to whatever port on the SE-Server (port 443 or so)
Which port do you want to change now?? and why??

Close due to inactivity


[SPARK-25542][Core][Test] Move flaky test in OpenHashMapSuite to OpenHashSetSuite and make it against OpenHashSet

What changes were proposed in this pull request?
The specified test in OpenHashMapSuite to test large items is somehow flaky to throw OOM.
By considering the original work #6763 that added this test, the test can be against OpenHashSetSuite. And by doing this should be to save memory because OpenHashMap allocates two more arrays when growing the map/set.
How was this patch tested?
Existing tests.

cc @dongjoon-hyun @cloud-fan

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/testing-k8s-prb-make-spark-distribution-unified/3536/
Test PASSed.

Test build #96688 has started for PR 22569 at commit 39a77d6.

Test build #96688 has finished for PR 22569 at commit 39a77d6.

This patch fails Spark unit tests.
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/96688/
Test FAILed.

retest this please.

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/testing-k8s-prb-make-spark-distribution-unified/3539/
Test PASSed.

Test build #96697 has started for PR 22569 at commit 39a77d6.

LGTM except one minor comment

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/testing-k8s-prb-make-spark-distribution-unified/3541/
Test PASSed.

Test build #96701 has started for PR 22569 at commit dca4e5c.

Also, please fix the tag in the PR title from [SQL] to [CORE].

Test build #96697 has finished for PR 22569 at commit 39a77d6.

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/96697/
Test PASSed.

Test build #96701 has finished for PR 22569 at commit dca4e5c.

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/96701/
Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/3554/
Test PASSed.

Merged build finished. Test PASSed.

Test build #96726 has started for PR 22569 at commit 22bfa80.

Test build #96726 has finished for PR 22569 at commit 22bfa80.

This patch fails Spark unit tests.
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/96726/
Test FAILed.

retest this please.

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/testing-k8s-prb-make-spark-distribution-unified/3557/
Test PASSed.

Test build #96733 has started for PR 22569 at commit 22bfa80.

Test build #96733 has finished for PR 22569 at commit 22bfa80.

This patch fails due to an unknown error code, -9.
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/96733/
Test FAILed.

retest this please.

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/testing-k8s-prb-make-spark-distribution-unified/3559/
Test PASSed.

Test build #96738 has started for PR 22569 at commit 22bfa80.

Test build #96738 has finished for PR 22569 at commit 22bfa80.

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/96738/
Test PASSed.

Merged to master/branch-2.4.


Define custom install directory in environment variable

Is there any way to define a custom install directory for linuxbrew packages in an environment variable (e.g. LINUXBREW_HOME)?
This could be really helpful in cases such as a multitenant system, in which Linuxbrew will be installed globally and users using it would get each package installed in their home directory.
This is a feature that is already supported by most package managers:

pip utilizes the combination of PYTHONUSERBASE and PIP_USER environment variables
npm utilizes the NPM_CONFIG_PREFIX environment variable
composer utilizes COMPOSER_HOME
gem works as such by default

If this feature is not available are there any plans to implement it?

Yes, this feature is supported. I'm curious though. What's the advantage of centralizing the Homebrew source code, and why wouldn't each user install their own in their home directory?
Here's how a user would set up their own cellar of software:
~ ❯❯❯ which brew
/usr/local/bin/brew
~ ❯❯❯ brew --cellar
/usr/local/Cellar
~ ❯❯❯ mkdir ~/bin ~/Cellar
~ ❯❯❯ ln -s /usr/local/bin/brew ~/bin/
~ ❯❯❯ PATH=$HOME/bin:$PATH
~ ❯❯❯ which brew
/Users/sjackman/bin/brew
~ ❯❯❯ brew --cellar
/Users/sjackman/Cellar

See the Homebrew source code here: https://github.com/Homebrew/homebrew/blob/master/Library/Homebrew/config.rb#L44-L48

In general sounds okay, but wouldn't it be better if we could handle this easily with an environment variable like LINUXBREW_CELAR? Would you be open to review a pull request for this?

You could try sending a pull request for that feature upstream to https://github.com/Homebrew/homebrew

I try not to make significant changes to Linuxbrew that aren't also found in Homebrew.


1.0.0

🔧 Changes
Updating changelog and migration guide for upcoming 1.0.0 release.
📚 References

🔬 Testing

📝 Checklist

[ ] All new/changed/fixed functionality is covered by tests (or N/A)
[ ] I have added documentation for all new/changed functionality (or N/A)

Codecov Report
Patch and project coverage have no change.

Comparison is base (f764ae5) 70.83% compared to head (53869bc) 70.83%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #737   +/-   ##
=======================================
  Coverage   70.83%   70.83%
=======================================
  Files          87       87
  Lines       11211    11211
=======================================
  Hits         7941     7941
  Misses       2750     2750
  Partials      520      520

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


[Issue #62 Solution] New Activity Based on Nell Colours

Issue #62 Fix
This is an initial build for a new activity based on Nell Colours.
Currently this program can identify uppercase English Alphabets
Note: As tensorflow.js is used in this activity which uses the fetch API that doesn't work on file:/// mode, it won't run in file:/// mode in the browser so it needs to opened through the sugarizer server.
Also currently internet connectivity is needed to run this program
Yet to implement

[ ] Toolbar
[ ] Support for identifying lowercase English Alphabets and numbers
[ ] Message to display when letter has been identified (currently only a windows alert appears)
@llaske @ashish0910  Please suggest any major changes I need to do in the UI because currently this is an initial build and major changes are easy to do.

@Hemansh31 Good start UI looks very cool . But I was getting issues with the accuracy .

Also one more thing , It also worked on file:/// mode for me .

@ashish0910 I am working on a better Machine learning model.

Not convincing implementation.


$ref doesn't work when referencing a property in models which use 'allOf' keyword.

Below is a sample model.
ABC:
  allOf:
    - $ref: '#/BasePayload'
    - type: object
      properties:
        failingAlertSeries:
          type: array
          items:
            $ref: '#/AlertSeriesItem'
        recoveredAlertSeries:
          type: array
          items:
            $ref: '#/AlertSeriesItem'
        newlyFailingAlertSeries:
          type: array
          items:
            $ref: '#/AlertSeriesItem'
        alertType:
           type: string

And, I'm trying to refer 'alertType' property present in the above model and it doesn't seem to work.
facets:
      type: object
      properties:
        v_info:
          type: object
          properties:
            vc_size:
              type: string
        manifest_info:
          type: object
          properties:
            cycle_id:
              $ref: '#/components/schemas/ABC/properties/alertType'

Can we reference a parameter in a model which uses 'allOf' keyword in another model?
Please help here. Thanks.

@bsarchana this looks like a tooling question.  This repository is only about the specification itself.
From a specification perspective, $ref: '#/components/schemas/ABC/properties/alertType' should work fine assuming the JSON pointer is correct (and it looks like it is).  It is generally considered good practice to put all of your $ref targets directly under #/components/schemas rather than $ref-ing subschemas, but you are allowed to reference any Schema Object, whether it's a direct component or a subschema of some sort.
If this is not working with your tools, you should raise an issue with the tooling vendor.


Reporting Instructions Screen - Add JSON Format and URL

Under Monitoring Plan Reporting Instructions, add:
Monitoring Plan JSON Format
Monitoring Plan - Swagger Page (https://easey-dev.app.cloud.gov/api/monitor-plan-mgmt/swagger/)

Test Case: TC509
Test Passed


[$500] Edit message, save/cancel and visiting different report removes focus from composer

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 1.3.86-1
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1697650111645879
Action Performed:

Open the app
Open any report
Send any message
Edit the message
Save or cancel the edit message
Visit another report and observe that app does not focus on composer

Expected Result:
App should focus on composer whenever we visit any report
Actual Result:
App does not focus on composer when we edit any message, save/cancel the mesage and visit any other report
Workaround:
unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android: Native
[ ] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

Screenshots/Videos

Android: Native

https://github.com/Expensify/App/assets/38435837/c3f36b1b-88c8-40ac-8d90-3a56dc825c84

Android: mWeb Chrome
https://github.com/Expensify/App/assets/38435837/64011705-26e2-4491-ae26-1c5fe5a23d8a

iOS: Native
https://github.com/Expensify/App/assets/38435837/9b4e85c6-0ea2-446e-9efe-7051bebff9ec

iOS: mWeb Safari

MacOS: Chrome / Safari

https://github.com/Expensify/App/assets/38435837/b4674a0a-6d3c-4052-8897-b7c72814d42e
https://github.com/Expensify/App/assets/38435837/ef7bcf0a-7590-4fd9-b87e-3af9c7fb959b

MacOS: Desktop
https://github.com/Expensify/App/assets/38435837/506d54e2-9240-4322-a645-be26708dad1a

View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01e2dccea0afb54c13
Upwork Job ID:<PHONE_NUMBER>301872640
Last Price Increase: 2023-11-08

Proposal
Please re-state the problem that we are trying to solve in this issue.
Composer is not focused when user has edited a chat from different report
What is the root cause of that problem?
Within deleteDraft which is called in the triggerSaveOrCancel method, composer focused is set to false thus loses its focus state:
https://github.com/Expensify/App/blob/1ed55e0517e8855da3d6c5d54eb33ec4c45a4f22/src/pages/home/report/ReportActionItemMessageEdit.js#L275-L276
isFocused triggers composerFocusKeepFocusOn on an effect that then read from the state value to remove the focus ref.
https://github.com/Expensify/App/blob/1ed55e0517e8855da3d6c5d54eb33ec4c45a4f22/src/pages/home/report/ReportActionItemMessageEdit.js#L136-L138
What changes do you think we should make in order to solve the problem?
Remove the offending line that triggers the focus state change:
const deleteDraft = useCallback(() => {
        // InputFocus.callback(() => setIsFocused(false)); << remove this line
        InputFocus.inputFocusChange(false);

What alternative solutions did you explore? (Optional)
N/A

is it a regression from https://github.com/Expensify/App/pull/29073 ?

@narefyev91 please take a look

I am not sure, let me take a look.

Is this intended behaviour? From here:
On small devices the auto focus will bring up the keyboard which may be annoying. Reports are optimized for reading. Ref: https://expensify.slack.com/archives/C01GTK53T8Q/p1617201995245400

Yes, please. If @zukilover's proposal still works to your liking? Looks like an extremely easy one.

Let me please write down the proposal as well. Since apparently my PR is connected with this bug.

That specific line was added from https://github.com/Expensify/App/issues/26527 to fix a glitch of the focus states (race condition).
It should be fixed with the new inputFocusChange, and thus the focus callback is a redundant line here that should be removed.

it will cause regression if we remove this line and the bug mentioned in
the https://github.com/Expensify/App/issues/26527 will reappear.
On Thu, Nov 2, 2023 at 1:55 PM Vinh Hoang @.***> wrote:

@zukilover https://github.com/zukilover Thanks for your proposal #29919
(comment)
https://github.com/Expensify/App/issues/29919#issuecomment-1769526386.
I think you pointed out the correct place that causes this issue. But you
haven't explained why we need that line from the beginning and if we remove
this line, will it cause any regression bug?
—
Reply to this email directly, view it on GitHub
https://github.com/Expensify/App/issues/29919#issuecomment-1790313461,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAF3LTZFSHJJMCEQIYGBPGTYCNNW3AVCNFSM6AAAAAA6GGGOZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJQGMYTGNBWGE
.
You are receiving this because you were mentioned.Message ID:
@.***>

basically thats why I requested to put proposal but I am still not able to
find fix for it so far.
On Thu, Nov 2, 2023 at 3:10 PM ayaz alavi @.***> wrote:

it will cause regression if we remove this line and the bug mentioned in
the https://github.com/Expensify/App/issues/26527 will reappear.
On Thu, Nov 2, 2023 at 1:55 PM Vinh Hoang @.***>
wrote:

@zukilover https://github.com/zukilover Thanks for your proposal #29919
(comment)
https://github.com/Expensify/App/issues/29919#issuecomment-1769526386.
I think you pointed out the correct place that causes this issue. But you
haven't explained why we need that line from the beginning and if we remove
this line, will it cause any regression bug?
—
Reply to this email directly, view it on GitHub
https://github.com/Expensify/App/issues/29919#issuecomment-1790313461,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAF3LTZFSHJJMCEQIYGBPGTYCNNW3AVCNFSM6AAAAAA6GGGOZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJQGMYTGNBWGE
.
You are receiving this because you were mentioned.Message ID:
@.***>

If we take a look at how composerFocusKeepFocusOn is implemented, especially these lines:
https://github.com/Expensify/App/blob/17ce0c218189017f645ef0e1a53d52d87d6e7a21/src/libs/actions/InputFocus/index.website.ts#L16-L26
It tries to focus on refSave but refSave will be defined if isFocused is truthy, but the focusing is executed only when isFocused is falsy. This seems to be counterintuitive.

Proposal
Restating the Problem
The problem we are addressing is that when a user edits a message in a chat and then switches to another chat, the main composer does not receive focus.
Identifying the Root Cause
The root cause of this issue is that the focus on the compose field is triggered programmatically in ComposerWithSuggestions at this location:
https://github.com/Expensify/App/blob/bc9cb8f8ca149c1f90dd09de9f19ae97bcaf07f0/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js#L550.
The issue arises when the edit compose box loses focus after closing the edit input field. As a result, the main compose box in the same chat where the message was edited regains focus. When we switch to another chat, this line
https://github.com/Expensify/App/blob/bc9cb8f8ca149c1f90dd09de9f19ae97bcaf07f0/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js#L542
evaluates prevIsFocused===true, causing it to skip the focus() method call at
https://github.com/Expensify/App/blob/bc9cb8f8ca149c1f90dd09de9f19ae97bcaf07f0/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js#L550.
Consequently, the main compose box loses focus in the new chat.
Proposed Solution
To solve this problem, we suggest calling the focus method at
https://github.com/Expensify/App/blob/bc9cb8f8ca149c1f90dd09de9f19ae97bcaf07f0/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js#L614-L620.
This will ensure that the main compose box receives focus as soon as it's layout'd, preventing the issue from occurring.
Result:
https://github.com/Expensify/App/assets/767439/ab557817-7268-4d40-b89c-cff9deeac54a
Alternative Solutions
No alternative solutions were explored or mentioned in the proposal.

Not overdue, just waiting on proposal review

@vinh hoang
Simply calling focus on main composer layout callback fixes the issue. The issue is due to bug in main composer component as I said in my proposal. Focus doesn’t gets called in a condition when it was already focused without popover getting rendered. If popover gets rendered then to us gets called correctly and this bug doesn’t happen.

On Nov 13, 2023 at 12:24 PM,  <Vinh Hoang @.***)>  wrote:
Update: still reading the previous issue  #26527 (https://github.com/Expensify/App/issues/26527)  to understand their changes.
—
Reply to this email directly,   view it on GitHub (https://github.com/Expensify/App/issues/29919#issuecomment-1807591084), or   unsubscribe (https://github.com/notifications/unsubscribe-auth/AAF3LT6XKF372C75I6UB7YLYEHDKFAVCNFSM6AAAAAA6GGGOZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBXGU4TCMBYGQ).
You are receiving this because you were mentioned.Message ID:  @.***>

+1 I can no longer reproduce. I'm checking how compensation works in this scenario (personal paper trial)

My ticket was marked with regression. Should I be paid for compensating that?

On Nov 13, 2023 at 7:19 PM,  <peterdbarkerUK @.***)>  wrote:
+1 I can no longer reproduce. I'm checking how compensation works in this scenario (personal paper trial (https://expensify.slack.com/archives/C01SKUP7QR0/p1699885147013969))
—
Reply to this email directly,   view it on GitHub (https://github.com/Expensify/App/issues/29919#issuecomment-1808252876), or   unsubscribe (https://github.com/notifications/unsubscribe-auth/AAF3LTYAGBIPRNE3XKIR7PLYEIUA5AVCNFSM6AAAAAA6GGGOZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBYGI2TEOBXGY).
You are receiving this because you were mentioned.Message ID:  @.***>

@ayazalavi I'm not sure I understand your question, could you clarify? Thanks!

Hey folks - first up, I really appreciate all your work making and reviewing proposals for this.
As this has been resolved by the rn-web update, I'm going to close it out without paying bounties. The reason being that this issue was solved "in the course of things" unrelated to this issue, without work needing to be done. I understand this can be frustrating, though with the issues that are quick and easy to resolve I hope it is, on balance, not too painful.
Please let me know if you have any questions or disagree!


jpegdecompresssurface : picture decode failed : e00002d1

jpegdecompresssurface : picture decode failed : e00002d1
I can get exact same data as image data from sql server.
So i try to load image from NSData, below the code,

(void)process:(NSArray*)results
{
NSArray *table=[results objectAtIndex:0];
NSDictionary *row=[table objectAtIndex:0];
NSData *image_source=[row objectForKey:@"Company_Logo"];
UIImage *image=[[UIImage alloc] initWithData:image_source];
image=[UIImage imageWithData:image_source];
[self.imageView setImage :image];
}
but the final step , it is showing like this, in here
// [self.imageView setImage :image];
jpegdecompresssurface : picture decode failed : e00002d1
How can i solve this?
Regards.

Please try the types branch.

I used types branch and used the sample project for testing but same.
can you give me the source code for that?
I checked the
NSData *image_source=[row objectForKey:@"Company_Logo"];
by log the value.
but same as data in sql.
How can i use this for mapping to uiimage type?
can you teach me?
i want your reply. thanks .
king regards,

It could be related to this:
https://msdn.microsoft.com/en-us/library/ms177687(v=sql.90).aspx
What version of SQL Server are you using?
What data type is the column with the image?
If possible, can you attach the image file here?

I am using the SQL EXPRESS 2016.
I used the Company_Logo(image,null) for saving/loading image.
Additionally, I am trying to load the image that saved by C# program i made.
In android , the image can be read by byte array and convert that to bitmap image, and it is working.
In C# , it is also working well.
but in iOS when i tried to do like that with above code , it is showing
jpegdecompresssurface : picture decode failed : e00002d1

These three pictures , i used to try.
jpg file looks like that issue , but png file is not showing at all.

Hello , Mr.Martin Rybak.
I tried to debug the code and found something related.
So, (void)process:(NSArray*)results
{
NSArray *table=[results objectAtIndex:0];
NSDictionary *row=[table objectAtIndex:0];
NSData *image_source=[row objectForKey:@"Company_Logo"];
UIImage image=[[UIImage alloc] initWithData:image_source];
image=[UIImage imageWithData:image_source];
[self.imageView setImage :image];
}
in this code ,(NSArray) results is returning values from sql.
in here , i checked the @"Company_Logo".
It was NSInlineData and 4096bytes.
That's why the above 5kb jpg image is not showing full.
I tried to use small jpg image (for example 400bytes) , and it is showing well.
Can you give me some solution for large image?
Really thanks for your help.
Regards.

Please put a breakpoint on line 544 of SQLClient.m:
https://github.com/martinrybak/SQLClient/blob/types/SQLClient/SQLClient/SQLClient/SQLClient.m#L544
What is the value of column->size?

in image type the column size is 4096

column->size is 4096

OK, to be sure, put a breakpoint on this line and verify that dbcollen(_connection, c) is returning 4096 for your image column.
https://github.com/martinrybak/SQLClient/blob/types/SQLClient/SQLClient/SQLClient/SQLClient.m#L261

Also try changing your data type from image to varbinary(max)

I tried both type, means , i saved the data to image type and varbinary(max) type
and read the data using your framework.
In 261 , breakpoint, the column.size is 4096 for both types , sir.

OK, in the freetds docs I found the following:
text size: default value of TEXTSIZE, in bytes. For text and image datatypes, sets the maximum width of any returned column. Cf. set TEXTSIZE in the T-SQL documentation for your server.
http://www.freetds.org/userguide/freetdsconf.htm
Try adding a file called freetds.conf to your app with these contents:
[global]
text size = 10000

Then add an environment variable to your app called FREETDS whose value is the path to that file.
http://www.freetds.org/userguide/envvar.htm
See if that helps.

sorry but my app means?
ios project, sir?

Yes, add it to your iOS project.

yeah ,i added freetds.conf to SQLClint folder , but i am not sure about the environment variable adding , can you guide me a bit more , sir?
thanks.

http://nshipster.com/launch-arguments-and-environment-variables/

freetds.conf path would be full path like this "/Volumes/Mac_Data/KO/pos_australia/latest/SQLClient_Type/SQLClient-types/SQLClient/SQLClient/SQLClient/freetds.conf"
or what's the right path of freetds.conf file, sir?

I added with your requirement and ran the project
ntext type in sql returning column->size 8192 bytes in  dbcollen(_connection, c) 164 line.
but image type and varbinary is same as 4096, sir.

http://stackoverflow.com/questions/12205785/getting-bundle-file-references-paths-at-app-launch

I got file path using your reference source code ,
"/var/containers/Bundle/Application/0E8B03A5-869A-4435-AE41-21972F55CA4B/SQLClient.app/freetds.conf"
so i set above path as value of FREETDS.

what value would i check by debugging?

The value must be relative to your app. Try freetds.conf instead.

I changed with your instruction
and tested , again . but the column->size of image is still 4096

Try setting other values to verify that TDS is finding your file.
http://www.freetds.org/userguide/freetdsconf.htm

i setup the sql express 2016 to other computer windows 10 system.
in here , TDS version how can i check this?
I am really sorry for bothering your time, but can you teach me via my screen? like using teamviewer,sir?

I'm sorry, I can't do that. Please do some reading up on FreeTDS until you can customize the text size setting. I think that is the problem.

so the conclsion is change the text size?

i facing this issue in my iOS app. please help me out. thank you.
in android application is working fine to get binary image from SQL server but facing issue in iOS and load some part of image only.

can you show me the code?
On Sat, Aug 4, 2018 at 12:38 PM, Harikant Amipara<EMAIL_ADDRESS>wrote:

i facing this issue in my iOS app. please help me out. thank you.
in android application is working fine to get binary image from SQL server
but facing issue in iOS and load some part of image only.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/martinrybak/SQLClient/issues/40#issuecomment-410425470,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATFs4zEkmQotzpgfH0rTkdfuzxIYLI7vks5uNTM4gaJpZM4LrSNS
.

@totoourworld i'm getting size of image is still 4096

https://stackoverflow.com/questions/4500506/php-is-truncating-mssql-blob-data-4096b-even-after-setting-ini-values-am-i-m

is this issue of getting size of image is still 4096byte is from SQL SERVER ?


 This issue outlines a structured approach to manage our project workflow efficiently. We'll iterate between team meetings and individual work, ensuring that everyone is aligned and contributing effectively.
Workflow Recap
Please follow the structured workflow outlined below to ensure smooth progress on the project:

Team Meeting (Scrum Meeting)

Review Issues: Start with items marked as "done," then move to "in progress," and finally discuss not started items and their reasons.
Integrate Pull Requests: Review and merge open pull requests, ensuring the project still runs after each merge.
Assign New Issues: Distribute tasks among team members based on priority and expertise.
Issue Management: Optionally, write and assign new issues during the meeting.
Prioritize: (Re)arrange issues on the project board according to current priorities.
Next Meeting: Set the date and time for the next team meeting.

Individual Work
Work on Tasks: Focus on completing your assigned issues.
Collaborate: Assist team members with their tasks, especially if they encounter blockers.
Review Pull Requests: Pre-review pull requests to streamline the team meeting process.
Ideation: If you have new ideas, start drafting an issue and add it to the backlog on the project board for discussion at the next meeting.

Next Steps
So, what do we advise you to work on next?

Issue Creation: Write issues for upcoming tasks (e.g., code testing, data exploration, finalizing documentation). Assign team members to each task.
Project Board: If not already set up, create a project board. Organize issues into "Done," "In Progress," and "To Do" columns.
Schedule Meeting: Decide on the date and time for your next group meeting.

Deliverable
After organizing your workflow and setting the stage for the next steps:

Confirm the establishment or update of the project board.
Share the scheduled date and time for the next team meeting in this issue as a comment.
Once you've completed the above tasks and streamlined your project workflow, close this issue.

Remember, adopting GitHub might feel complex and counterintuitive at first, differing significantly from the way you have worked previously. Yet, it's a proven methodology embraced by leading global firms for developing software and conducting research. Trust in this process is essential.

Hi all - this one got moved to in progress last week but I haven't seen updates on your repository. Also, many of the issues have remained untackled so far.
Are you struggling to use Git/GitHub?
Please address any bottlenecks during today's class.


make func (l location) Location() (string, int) simpler

/cc @ChrisHines

This must be tested with a package where directories in the package import path contain a period ..

Scanning the file path backwards is fundamental to correct behavior in order to avoid problems when the file path contains multiple occurrences of the package import string.
For example, the proposed code would produce the wrong output given the following conditions:
GOPATH     /home/user
file       /home/user/src/user/file.go
fn.Name()  user.Fn

In addition, the code in this PR would return "unknown", 0 for all functions in most main packages. The exception being if "main" appeared somewhere in the file path, but it would still return misleading information in that case.
GOPATH     /home/user
file       /home/user/src/user/my-app.go
fn.Name()  main.main

i got it. Thanks


python310Packages.lupa: 1.13 -> 1.14.1

Description of changes
https://github.com/scoder/lupa/releases/tag/lupa-1.14.1

Things done

Built on platform(s)

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

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

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

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

2 packages built:

python310Packages.lupa
python39Packages.lupa


chart: remove offlineReplicaRebuilding

Which issue(s) this PR fixes:

Issue Longhorn/longhorn#9090
What this PR does / why we need it:
Special notes for your reviewer:
Additional documentation or context

@mergify backport v1.7.x


Cant Remove <> From Name

How Do I Remove The <> From The User's Name And Rank?

This is the default chat format of various chat plugins. You need to change this in your chat plugin config.


[WIP] perf_capture: inverse_of

Use inverse_of to reduce the number of objects accessed in the database.

before
after

vms
100
100

MiqQueue
79
79

MiqTask
43
43

time
2749 ms
2455 ms

sql queries
486
55

ms db
117 ms
15ms

memory
37MB
6.5MB

these are wrong
https://bugzilla.redhat.com/show_bug.cgi?id=1221750

Except for the ones with :foreign_key => "ems_id", I would have expected to Rails to do auto-inverse-of on all of them.
@matthewd Please review.

@Fryguy queue_captures is drastically different - I've run the numbers a few times. it really does have that much of a difference.
I'll try running the numbers on a bigger db. It take a hours(?) to run that before the change
@akrzos would you verify it takes an hourto run a perf_capture_timer on the 100k db?

@kbrock, can you verify in rails console using the snippets from https://github.com/ManageIQ/manageiq/pull/5091... it's really easy to verify each and every one of these if you have a database with the rows needed for each association.  I'd also think rails would figure out the non-foreign key ones but perhaps the complicated naming of vms, vms_and_templates, VmOrTemplate is in play.

I'm not saying it doesn't change your numbers.  I'm saying that maybe not all of them are part of changing your number.  From the way auto-inverse_of works, I don't think you needed to define almost all but 2 of those, which is confusing...(read: makes me think something is wrong with Rails)

@Fryguy yea - I've felt rails 2.0 (maybe 3.0) did a good job with :inverse_of. In the 4 world, it seems it is needed in places that really shouldn't be necessary.
Do you want me to try and reduce this list, only adding the ones that make a change?

I agree some of these sound like they should be automatic.
@kbrock I haven't looked it up, but can you find the relevant thing to call on the association reflection, to check whether it's successfully found its inverse?

These metrics are wrong. revisiting this

for the record, belongs_to should not have the inverse, and many of these were not needed.


Input.Toggle values are bool of type string

The values presented in the schema are that of type string for properties, value, valueOn and valueOff.
These should either be an enum field with additional values or strictly bool types.

Hi there, do you mean something like this:
``json
"Input.Toggle": {
"additionalProperties": true,
"type": "object",
"description": "Input.Toggle collects a true/false response from the user",
"allOf": [
{
"$ref": "#/definitions/CardElement"
}
],
"properties": {
"id": {
"type": "string",
"description": "Id for the value (will be used to identify collected input when SUBMIT is clicked)"
},
"title": {
"type": "string",
"description": "Title for the toggle"
},
"type": {
"type": "string",
"description": "Input.Toggle",
"enum": [
"Input.Toggle"
]
},
"value": {
"type": "string",
"description": "The current selected value",
"default": "false",
"enum": [
"true",
"false"
],
"additionalProperties": true
},
"valueOff": {
"type": "string",
"description": "The value when toggle is off (default:false)",
"enum": [
"false"
],
"additionalProperties": true
},
"valueOn": {
"type": "string",
"description": "The value when toggle is on (default:true)",
"enum": [
"true"
],
"additionalProperties": true
}
},
"required": [
"id",
"title"
]
},

Sorry Matt - I didn't mean that what is clearly a bool should be turned into an enum - what I mean is that if it string for a particular reason (you want to insert further values other than true and false) then the property type should be an enum. If not and it is planned to remain TRUE or FALSE - then it should be a type of bool as opposed to string.

Closing as this is intentional that these properties are of type string


Match Whole Word

Hi,
I don't get how to "Match Whole Word". Is it possible?
Thanks

Hi,
Is it the "Matrix search" functionality?
This will search all words contained in all text.

Hi,
Match Whole Word as in the regular VSCode search field.
Search 'foo' find 'foo' but not 'foos'.
Thanks

You can use regular expressions. \b means word boundary in regex. Surrounding your text with \bs you get the desired behavior: \bfoo\b

@gcem thanks, yes it works, but I think a checkbox "Match Whole Word" would be more intuitive.


Unwrap AggregateException when using a synchronous method in ChannelPool

This will fix https://github.com/GoogleCloudPlatform/google-cloud-dotnet/issues/206

Ping?

Sorry, missed this. LGTM.


Update MD file on new branch 2017-11-09_19-23-06

:warning: Validation status: warnings

File
Status
Preview URL
Details

split/test_link_to_con.yml
:warning:Warning

Details

split/updateTestRef1.md
:white_check_mark:Succeeded

split/test_link_to_con.yml

[Warning] Uid(Microsoft.SqlServer.Server) has already been defined in ref.yml.
Line 1: [Warning] Invalid file link:(~/content.md).

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Getting Failed to establish a new connection: [Errno -2] Name or service not known on using AZ keyvault secret show

Describe the bug
I have got a script which was working fine for az cli 2.34.1(2 years back) but when we checked now(with the same version as well as upgraded version we are facing error
az keyvault secret show --debug --name SECRET_NAME --vault-name VAULT_NAME
this is script_snippet for your referrence
    if ! CLIENT_ID=$(az keyvault secret show --name SPClientId --vault-name "${KEYVAULT_NAME}" | jq -r '.value') 1> /dev/null; then
        echo "[ERROR] Could not get [SPClientId] from keyvault!"
        failed_kv=true
    fi

In else, we have checker for failed_kv to create this secret values
But when we are trying to run this we got below error
/
az keyvault secret show --name SECRET_NAME --vault-name VAULT_NAME
<urllib3.connection.HTTPSConnection object at 0x7f768aadd0d0>: Failed to establish a new connection: [Errno -2] Name or service not known

Related command
az keyvault secret show --name SECRET_NAME --vault-name VAULT_NAME
Errors
<urllib3.connection.HTTPSConnection object at 0x7f768aadd0d0>: Failed to establish a new connection: [Errno -2] Name or service not known
Issue script & Debug output
cli.knack.log: File logging enabled - writing logs to '/home/codebuzz/.azure/logs'.
cli.knack.cli: Command arguments: ['keyvault', 'secret', 'show', '--debug', '--name', 'SPClientSecret', '--vault-name', 'CE-management-TEST-kv']
cli.knack.cli: init debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7f916412d3a0>, <function OutputProducer.on_global_arguments at 0x7f91640d1da0>, <function CLIQuery.on_global_arguments at 0x7f916410b880>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'keyvault': ['azure.cli.command_modules.keyvault']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name                  Load Time    Groups  Commands
cli.azure.cli.core: keyvault                  0.031        20       113
cli.azure.cli.core: Total (1)                 0.031        20       113
cli.azure.cli.core: Loaded 20 groups, 113 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command  : keyvault secret show
cli.azure.cli.core: Command table: keyvault secret show
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f9162ff8c20>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/codebuzz/.azure/commands/2024-01-02.21-47-30.keyvault_secret_show.76214.log'.
az_command_data_logger: command args: keyvault secret show --debug --name {} --vault-name {}
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7f916306cea0>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7f916306cf40>, <function register_cache_arguments..add_cache_arguments at 0x7f916306d080>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f91640d1e40>, <function CLIQuery.handle_query_parameter at 0x7f916410b920>, <function register_ids_argument..parse_ids_arguments at 0x7f916306cfe0>]
cli.azure.cli.core.auth.persistence: build_persistence: location='/home/codebuzz/.azure/msal_token_cache.json', encrypt=False
cli.azure.cli.core.auth.binary_cache: load: /home/codebuzz/.azure/msal_http_cache.bin
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: openid_config = {redacted}
msal.application: Broker enabled? False
urllib3.connectionpool: Starting new HTTPS connection (1): ce-management-test-kv.vault.azure.net:443
urllib3.connectionpool: Starting new HTTPS connection (2): ce-management-test-kv.vault.azure.net:443
urllib3.connectionpool: Starting new HTTPS connection (3): ce-management-test-kv.vault.azure.net:443
urllib3.connectionpool: Starting new HTTPS connection (4): ce-management-test-kv.vault.azure.net:443
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/opt/az/lib/python3.11/site-packages/azure/cli/command_modules/keyvault/_command_type.py", line 135, in keyvault_command_handler
show_exception_handler(ex)
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/arm.py", line 429, in show_exception_handler
raise ex
File "/opt/az/lib/python3.11/site-packages/azure/cli/command_modules/keyvault/_command_type.py", line 112, in keyvault_command_handler
result = op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/core/tracing/decorator.py", line 78, in wrapper_use_tracer
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/keyvault/secrets/_client.py", line 72, in get_secret
bundle = self._client.get_secret(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/keyvault/secrets/_generated/_operations_mixin.py", line 1640, in get_secret
return mixin_instance.get_secret(vault_base_url, secret_name, secret_version, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/core/tracing/decorator.py", line 78, in wrapper_use_tracer
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/keyvault/secrets/_generated/v7_4/operations/_key_vault_client_operations.py", line 760, in get_secret
pipeline_response: PipelineResponse = self._client._pipeline.run(  # pylint: disable=protected-access
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/_base.py", line 211, in run
return first_node.send(pipeline_request)  # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/_base.py", line 71, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/_base.py", line 71, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/_base.py", line 71, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
[Previous line repeated 2 more times]
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/policies/_redirect.py", line 158, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/policies/_retry.py", line 468, in send
raise err
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/policies/_retry.py", line 446, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/policies/_authentication.py", line 118, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/_base.py", line 71, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/_base.py", line 71, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/_base.py", line 71, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
[Previous line repeated 1 more time]
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/_base.py", line 103, in send
self._sender.send(request.http_request, **request.context.options),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/transport/_requests_basic.py", line 361, in send
raise error
azure.core.exceptions.ServiceRequestError: <urllib3.connection.HTTPSConnection object at 0x7f91617e5010>: Failed to establish a new connection: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 663, in execute
raise ex
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 726, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 697, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 333, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/command_modules/keyvault/_command_type.py", line 138, in keyvault_command_handler
return keyvault_exception_handler(self.command_loader, ex)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/command_modules/keyvault/_command_type.py", line 51, in keyvault_exception_handler
raise CLIError(ex)
knack.util.CLIError: <urllib3.connection.HTTPSConnection object at 0x7f91617e5010>: Failed to establish a new connection: [Errno -2] Name or service not known
cli.azure.cli.core.azclierror: <urllib3.connection.HTTPSConnection object at 0x7f91617e5010>: Failed to establish a new connection: [Errno -2] Name or service not known
az_command_data_logger: <urllib3.connection.HTTPSConnection object at 0x7f91617e5010>: Failed to establish a new connection: [Errno -2] Name or service not known
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f9162ff8ea0>]
az_command_data_logger: exit code: 1
cli.main: Command ran in 8.318 seconds (init: 0.365, invoke: 7.954)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3634 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/opt/az/bin/python3 /opt/az/lib/python3.11/site-packages/azure/cli/telemetry/init.py /home/codebuzz/.azure"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.
Expected behavior
Keyvault doesn't exist
Environment Summary
azure-cli 2.55
terraform_azurm: 3.85
Additional context
No response

Thank you for opening this issue, we will look into it.

Hi @Amrish-Sharma, by Failed to establish a new connection: [Errno -2] Name or service not known, we do mean that the keyvault or secret doesn't exist. Are you unhappy with the error message?

Hi @evelyn-ys thanks for confirmation.
But this error is pretty generic and often confuses that there is some issue with either network or user-code.
Can we please have message instead that clarifies particular keyvault or secret is not present


How to: Publish a message and subscribe to a topic broken link

Describe the bug
The link in https://docs.dapr.io/developing-applications/building-blocks/pubsub/howto-publish-subscribe, section Next Steps for Try the pub/sub tutorial is incorrect.
Current link is: https://docs.dapr.io/developing-applications/building-blocks/pubsub/{{https://github.com/dapr/quickstarts/tree/master/tutorials/pub-sub}}.
Link should be: https://github.com/dapr/quickstarts/tree/master/tutorials/pub-sub.
Steps to reproduce
Steps to reproduce the behavior:

Go to https://docs.dapr.io/developing-applications/building-blocks/pubsub/howto-publish-subscribe
Click on Try the pub/sub tutorial in next steps.
See error 404 page

Expected behavior
Should redirect to https://github.com/dapr/quickstarts/tree/master/tutorials/pub-sub
Desktop (please complete the following information):

OS: macOS 12.4
Browser: chrome
Version: 101.0.4951.64 (Official Build) (arm64)

/assign


nao tem saida logica

Nós escrevemos os dados necessários em sua área de transferência porque era muito grande para ser enviado. Por favor, Cole.

@romuant It looks like you forgot to paste. Can you provide more information on the issue?

Translation from Portuguese:
Title: "there isnt logical exit"
Description: "We wrote the necessary data in your (copy) clipboard because it was too big to be sent. Please, paste"

I don't think there is anything actionable here. The text does not make sense, unless the person actually misplaced the text.


mongodb: fix build on aarch64

Motivation for this change
MongoDB currently fails to build on aarch64 because WiredTiger fails to compile without crc extensions on aarch64.
Things done

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

[x] NixOS (aarch64)
[ ] macOS
[ ] other Linux distributions

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

@GrahamcOfBorg test mongodb