[Bug]: PrismaClient execution fails on @remix-run/cloudflare-workers

Which Remix packages are impacted?

[X] remix (Remix core)
[X] create-remix
[ ] @remix-run/architect
[X] @remix-run/cloudflare-workers
[ ] @remix-run/dev
[ ] @remix-run/express
[ ] @remix-run/netlify
[ ] @remix-run/node
[ ] @remix-run/react
[ ] @remix-run/serve
[ ] @remix-run/server-runtime
[ ] @remix-run/vercel

What version of Remix are you using?
1.0.4
Steps to Reproduce

Use create-remix to create a project. Select Cloudflare Workers at that time.
Install and build prisma.
Write new PrismaClient() in the loader or in app/utils/db.server.ts.
Start up miniflare with yarn start.

Expected Behavior
new PrismaClient() should run without problems.
Actual Behavior
$ yarn start
yarn run v1.22.17
$ miniflare --build-command "npm run dev:worker" --watch

> dev:worker
> esbuild --define:process.env.NODE_ENV='"development"' --bundle --sourcemap --outdir=dist ./worker

  dist/worker.js      609.5kb
  dist/worker.js.map  903.5kb

[mf:inf] Build succeeded
true
[mf:err] /Users/myusername/git/remix-tutorial-cloudflare/dist/worker.js:13428
          throw new Error(`PrismaClient is unable to be run in the browser.
          ^

Error: PrismaClient is unable to be run in the browser.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues
    at new PrismaClient (/Users/myusername/git/remix-tutorial-cloudflare/node_modules/.prisma/client/index-browser.js:153:11)
    at build/index.js (/Users/myusername/git/remix-tutorial-cloudflare/build/index.js:76:21)
    at __require (/Users/myusername/git/remix-tutorial-cloudflare/dist/worker.js:13:46)
    at /Users/myusername/git/remix-tutorial-cloudflare/worker/index.js:3:24
    at /Users/myusername/git/remix-tutorial-cloudflare/dist/worker.js:14682:3
    at Script.runInContext (node:vm:139:12)
    at VMScriptRunner.runAsScript (file:///Users/myusername/git/remix-tutorial-cloudflare/node_modules/@miniflare/runner-vm/src/index.ts:21:12)
    at VMScriptRunner.run (file:///Users/myusername/git/remix-tutorial-cloudflare/node_modules/@miniflare/runner-vm/src/index.ts:71:12)
    at EventTarget.#reload (file:///Users/myusername/git/remix-tutorial-cloudflare/node_modules/@miniflare/core/src/index.ts:437:38)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I have confirmed that this problem does not occur in remix-run/node.
I have read the official Prisma documentation. I tried to change the alias, but the build fails.

I was able to avoid this problem by creating worker.build.js and changing the alias.
(When I name the esbuild script file build.js, it fails to start up miniflare. The cause is not known.)
// worker.build.js
const alias = require('esbuild-plugin-alias');

const isProd = process.env.NODE_ENV === 'production'

require('esbuild')
  .build({
    entryPoints: ['./worker'],
    bundle: true,
    sourcemap: true,
    minify: isProd,
    outdir: 'dist',
    define: {
      "process.env.NODE_ENV": `"${process.env.NODE_ENV ?? 'development'}"`,
    },
    plugins: [
      alias({
        '@prisma/client': require.resolve('@prisma/client'),
      }),
    ],
  })
  .catch(() => process.exit(1));

# package.json

  "scripts": {
    ...
    "build:worker": "NODE_ENV=production node worker.build.js",
    "dev:worker": "node worker.build.js",
    "start": "miniflare --build-command \"npm run dev:worker\" --watch",
    ...
  },

$ yarn start
yarn run v1.22.17
$ miniflare --build-command "npm run dev:worker" --watch

> dev:worker
> node worker.build.js

[mf:inf] Build succeeded
[mf:inf] Worker reloaded! (0.93MiB)
[mf:inf] Listening on :8787
[mf:inf] - http://<IP_ADDRESS>:8787
[mf:inf] - http://<IP_ADDRESS>:8787

would be good to be fixed soon

(When I name the script file for esbuild build.js, it fails to build. The reason is not known.)

this is due to the fact that remix compiles the server-side javascript under <root>/build/ and worker.js then references said built files via import * as build from "../build"
-> the worker.js ends up importing your build.js file and will obviously not do what's intended

Using the fix here and adding the worker.build.js and updating the scripts doesn't resolve this for me.  I still get other errors when trying to start the project:
❯ npmst

> start
> miniflare --build-command "npm run dev:worker" --watch

> dev:worker
> node worker.build.js

✘ [ERROR] Could not resolve "path"

    node_modules/.prisma/client/index.js:57:21:
      57 │ const path = require('path')
         ╵                      ~~~~~~

  The package "path" wasn't found on the file system but is
  built into node. Are you trying to bundle for node? You
  can use "platform: 'node'" to do that, which will remove
  this error.

✘ [ERROR] Could not resolve "events"

    node_modules/@prisma/client/runtime/index.js:50:40:
      50 │ ...mport_events = __toModule2(require("events"));
         ╵                                       ~~~~~~~~

  The package "events" wasn't found on the file system but
  is built into node. Are you trying to bundle for node? You
  can use "platform: 'node'" to do that, which will remove
  this error.

✘ [ERROR] Could not resolve "fs"

    node_modules/@prisma/client/runtime/index.js:51:36:
      51 │ var import_fs = __toModule2(require("fs"));
         ╵                                     ~~~~

  The package "fs" wasn't found on the file system but is
  built into node. Are you trying to bundle for node? You
  can use "platform: 'node'" to do that, which will remove
  this error.

✘ [ERROR] Could not resolve "path"

    node_modules/@prisma/client/runtime/index.js:52:39:
      52 │ var import_path2 = __toModule2(require("path"));
         ╵                                        ~~~~~~

  The package "path" wasn't found on the file system but is
  built into node. Are you trying to bundle for node? You
  can use "platform: 'node'" to do that, which will remove
  this error.

✘ [ERROR] Could not resolve "crypto"

    node_modules/@prisma/client/runtime/index.js:54:40:
      54 │ ...mport_crypto = __toModule2(require("crypto"));
         ╵                                       ~~~~~~~~

  The package "crypto" wasn't found on the file system but
  is built into node. Are you trying to bundle for node? You
  can use "platform: 'node'" to do that, which will remove
  this error.

✘ [ERROR] Could not resolve "child_process"

    node_modules/@prisma/client/runtime/index.js:55:47:
      55 │ ...ocess = __toModule2(require("child_process"));
         ╵                                ~~~~~~~~~~~~~~~

  The package "child_process" wasn't found on the file
  system but is built into node. Are you trying to bundle
  for node? You can use "platform: 'node'" to do that, which
  will remove this error.

✘ [ERROR] Could not resolve "net"

    node_modules/@prisma/client/runtime/index.js:58:37:
      58 │ var import_net = __toModule2(require("net"));
         ╵                                      ~~~~~

  The package "net" wasn't found on the file system but is
  built into node. Are you trying to bundle for node? You
  can use "platform: 'node'" to do that, which will remove
  this error.

✘ [ERROR] Could not resolve "url"

    node_modules/@prisma/client/runtime/index.js:60:37:
      60 │ var import_url = __toModule2(require("url"));
         ╵                                      ~~~~~

  The package "url" wasn't found on the file system but is
  built into node. Are you trying to bundle for node? You
  can use "platform: 'node'" to do that, which will remove
  this error.

✘ [ERROR] Could not resolve "util"

    node_modules/@prisma/client/runtime/index.js:61:38:
      61 │ var import_util = __toModule2(require("util"));
         ╵                                       ~~~~~~

  The package "util" wasn't found on the file system but is
  built into node. Are you trying to bundle for node? You
  can use "platform: 'node'" to do that, which will remove
  this error.

✘ [ERROR] Could not resolve "stream"

    node_modules/@prisma/client/runtime/index.js:62:40:
      62 │ ...mport_stream = __toModule2(require("stream"));
         ╵                                       ~~~~~~~~

  The package "stream" wasn't found on the file system but
  is built into node. Are you trying to bundle for node? You
  can use "platform: 'node'" to do that, which will remove
  this error.

✘ [ERROR] Could not resolve "async_hooks"

    node_modules/@prisma/client/runtime/index.js:67:45:
      67 │ ...c_hooks = __toModule2(require("async_hooks"));
         ╵                                  ~~~~~~~~~~~~~

  The package "async_hooks" wasn't found on the file system
  but is built into node. Are you trying to bundle for node?
  You can use "platform: 'node'" to do that, which will
  remove this error.

✘ [ERROR] Could not resolve "os"

    node_modules/@prisma/client/runtime/index.js:1733:22:
      1733 │     var os2 = require("os");
           ╵                       ~~~~

  The package "os" wasn't found on the file system but is
  built into node. Are you trying to bundle for node? You
  can use "platform: 'node'" to do that, which will remove
  this error.

✘ [ERROR] Could not resolve "tty"

    node_modules/@prisma/client/runtime/index.js:1734:22:
      1734 │     var tty = require("tty");
           ╵                       ~~~~~

  The package "tty" wasn't found on the file system but is
  built into node. Are you trying to bundle for node? You
  can use "platform: 'node'" to do that, which will remove
  this error.

✘ [ERROR] Could not resolve "assert"

    node_modules/@prisma/client/runtime/index.js:6400:27:
      6400 │       var assert = require("assert");
           ╵                            ~~~~~~~~

  The package "assert" wasn't found on the file system but
  is built into node. Are you trying to bundle for node? You
  can use "platform: 'node'" to do that, which will remove
  this error.

✘ [ERROR] Could not resolve "buffer"

    node_modules/@prisma/client/runtime/index.js:6667:51:
      6667 │ ...ants: BufferConstants } = require("buffer");
           ╵                                      ~~~~~~~~

  The package "buffer" wasn't found on the file system but
  is built into node. Are you trying to bundle for node? You
  can use "platform: 'node'" to do that, which will remove
  this error.

✘ [ERROR] Could not resolve "http"

    node_modules/@prisma/client/runtime/index.js:14867:41:
      14867 │ ...ar http = _interopDefault(require("http"));
            ╵                                      ~~~~~~

  The package "http" wasn't found on the file system but is
  built into node. Are you trying to bundle for node? You
  can use "platform: 'node'" to do that, which will remove
  this error.

✘ [ERROR] Could not resolve "https"

    node_modules/@prisma/client/runtime/index.js:14870:43:
      14870 │ ...https2 = _interopDefault(require("https"));
            ╵                                     ~~~~~~~

  The package "https" wasn't found on the file system but is
  built into node. Are you trying to bundle for node? You
  can use "platform: 'node'" to do that, which will remove
  this error.

✘ [ERROR] Could not resolve "zlib"

    node_modules/@prisma/client/runtime/index.js:14871:41:
      14871 │ ...ar zlib = _interopDefault(require("zlib"));
            ╵                                      ~~~~~~

  The package "zlib" wasn't found on the file system but is
  built into node. Are you trying to bundle for node? You
  can use "platform: 'node'" to do that, which will remove
  this error.

✘ [ERROR] Could not resolve "tls"

    node_modules/@prisma/client/runtime/index.js:16816:43:
      16816 │ ...r tls_1 = __importDefault2(require("tls"));
            ╵                                       ~~~~~

  The package "tls" wasn't found on the file system but is
  built into node. Are you trying to bundle for node? You
  can use "platform: 'node'" to do that, which will remove
  this error.

✘ [ERROR] Could not resolve "constants"

    node_modules/@prisma/client/runtime/index.js:22922:30:
      22922 │       var constants = require("constants");
            ╵                               ~~~~~~~~~~~

  The package "constants" wasn't found on the file system
  but is built into node. Are you trying to bundle for node?
  You can use "platform: 'node'" to do that, which will
  remove this error.

✘ [ERROR] Could not resolve "_http_common"

    node_modules/@prisma/client/runtime/index.js:27212:25:
      27212 │     var common = require("_http_common");
            ╵                          ~~~~~~~~~~~~~~

  The package "_http_common" wasn't found on the file system
  but is built into node. Are you trying to bundle for node?
  You can use "platform: 'node'" to do that, which will
  remove this error.

✘ [ERROR] Could not resolve "console"

    node_modules/@prisma/client/runtime/index.js:29146:29:
      29146 │     var { assert } = require("console");
            ╵                              ~~~~~~~~~

  The package "console" wasn't found on the file system but
  is built into node. Are you trying to bundle for node? You
  can use "platform: 'node'" to do that, which will remove
  this error.

[mf:err] BuildError [1]: Build failed with exit code 1
    at ChildProcess.<anonymous> (/Users/bduffey2/projects/movies-remix/node_modules/@miniflare/core/src/plugins/build.ts:73:25)
    at ChildProcess.emit (node:events:390:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)

@bduff9 Have you built the Prisma client with dataProxy set to previewFeatures in the Prisma schema?
Deploying to Cloudflare Workers#5. Set up Prisma
generator client {
  provider        = "prisma-client-js"
  previewFeatures = ["mongoDb", "dataProxy"]
}

Cloudflare Workers is not running in pure Node, but in a sandboxed environment on the V8 engine, so you cannot run code that depends on Node's native API.
If you build the Prisma client with dataProxy set in previewFeatures, the code of Prisma client will automatically be designed to run in a browser or V8 engine and should be able to run on Cloudflare Workers.
https://www.prisma.io/docs/concepts/components/prisma-data-platform

@aiji42 I had not seen that link so thanks for sharing.  I will review it more closely but I did just try to add the dataProxy previewFeature and rebuilt it.  Alas, it gives me the same error as above.

@bduff9 Did you run the build command for the Prisma client?
npm prisma generate

@aiji42 Yep, sure did.

how about cloudflare pages?

Has anyone managed to resolve this for cloudflare pages?

npm run dev can be started normally using remix-cf-buffer with Prisma Data Proxy, but there will be a warning message

https://github.com/aiji42/remix-esbuild-override/tree/main/examples/prisma-cloudflare

Thank you @aiji42
I used this method on remix cloudflare-pages and unfortunately the run still has error messages

Add patches to the project directory
npm i patch-package
npm i remix-esbuild-override esbuild-plugin-alias @esbuild-plugins/node-globals-polyfill
npm i @prisma/client
npm i -D prisma

update prisma/schema.prisma
`
generator client {
provider = "prisma-client-js"
previewFeatures = ["dataProxy", "referentialIntegrity"]
}
datasource db {
provider = "mongodb"
url      = env("DATABASE_URL")
}
model posts {
id       String @id @default(auto()) @map("_id") @db.ObjectId
markdown String
slug     String
title    String
}
`
add "postinstall": "patch-package && remix-esbuild-override" to package.json

@yelban
I have read the prisma implementation and these codes are bundled but never actually executed. So you can ignore these warnings.
https://github.com/prisma/prisma/blob/c1d4f6ea4a0499759dcc1e43cc6c846ccb8051a8/packages/engine-core/src/data-proxy/utils/request.ts#L83
https://github.com/prisma/prisma/blob/c1d4f6ea4a0499759dcc1e43cc6c846ccb8051a8/packages/engine-core/src/data-proxy/utils/request.ts#L28
https://github.com/prisma/prisma/blob/c1d4f6ea4a0499759dcc1e43cc6c846ccb8051a8/packages/engine-core/src/data-proxy/utils/getJSRuntimeName.ts#L6
If it still bothers you, a patch to the nodeFetch code would be good.

@aiji42
This is great news, thank you for taking the time to confirm the code and have a great day!

Hey everyone. We have released some changes a few minutes ago in<EMAIL_ADDRESS>tl;dr;

Instead of PRISMA_CLIENT_ENGINE_TYPE, use prisma generate --data-proxy to enable the Data Proxy
import { PrismaClient } from '@prisma/client/edge' for a Workers-compatible Prisma Client
Please be aware that .env aren't bundled into the generated Prisma Client any longer (see docs)
You can also remove any package location aliasing in your build scripts
Warnings around eval are now also fixed

Thanks everyone, and your feedback is welcome.

Hey everyone. We have released some changes a few minutes ago in<EMAIL_ADDRESS>tl;dr;

Instead of PRISMA_CLIENT_ENGINE_TYPE, use prisma generate --data-proxy to enable the Data Proxy
import { PrismaClient } from '@prisma/client/edge' for a Workers-compatible Prisma Client
Please be aware that .env aren't bundled into the generated Prisma Client any longer (see docs)
You can also remove any package location aliasing from your build scripts
Warnings around eval are now also fixed

Thanks everyone, and your feedback is welcome.

I got [pages:err] ReferenceError: process is not defined error with @prisma/client/edge with 3.15.0 and 3.15.1

Ok i fixed the process is not defined error with the following code in remix.config.js
const { withEsbuildOverride } = require("remix-esbuild-override");

withEsbuildOverride((option) => {
  option.define = {
    process: JSON.stringify({
      env: {
        DATABASE_URL:
          "prisma://your-data-proxy-url",
      },
    }),
  };

  return option;
});

Hey @raymclee, I think this is an issue since that seems to have happened at runtime.


Making a rust-implemented python class compatible with the python's pydantic library.

Hi
I am attempting to create a python class using rust that is compatible with python's pydantic library and to set the context, the public API of pydantic requires the implementation of a custom __get_validators__ method and within which, it should yield one or more classmethods of the same class.
An example from the pydantic's docs
class PostCode(str):

    @classmethod
    def __get_validators__(cls):
        # one or more validators may be yielded which will be called in the
        # order to validate the input, each validator will receive as an input
        # the value returned from the previous validator
        yield cls.validate

    @classmethod
    def validate(cls, v):
        # NOT IMPORTANT
        return cls(f'{m.group(1)} {m.group(2)}')

My implementation in rust is as follows:
#[pymethods]
impl PyNRIC {
    #[new]
    pub fn new(string: String) -> PyResult<PyNRIC> {
        // not important
    }

    #[classmethod]
    pub fn __get_validators__(cls: &PyType) -> PyResult<&PyIterator> {
        let func = cls.getattr(intern!(cls.py(), "validate"));
        match func {
            Ok(func) => {
                if let Ok(funciter) = func.iter() {
                    return Ok(funciter)
                } else {
                    return Err(PyErr::new_err("`validate` method cannot be iterated!"))
                }
            },
            Err(err) => Err(err),
        }
    }

    #[classmethod]
    pub fn validate(cls: &PyType, value: &PyString) -> PyResult<PyNRIC> {
        let v: String = value.extract()?;
        PyNRIC::new(v)
    }
}

The classmethod __get_validators__ defined for PyNRIC attempted to get the attribute of cls, via the .getattr method. This should translate to python to be getattr(cls, "validate") and ideally, returns the classmethod validate.
However, when I run the python script, I get an error that is due to func.iter() returning an error.
What should I do to yield a classmethod from another classmethod?

However, when I run the python script, I get an error that is due to func.iter() returning an error.

The result of your call to getattr is a single classmethod, not an iterable which is why this fails. I am not sure from reading the pydantic docs, but maybe you could try just returning a Vec<&PyAny> instead? For example
#[classmethod]
pub fn __get_validators__(cls: &PyType) -> PyResult<Vec<&PyAny>> {
    let func = cls.getattr(cls.py(), intern!("validate"))?;
    Ok(vec![func])
}

Thanks for your idea, I managed to make it work via:
#[classmethod]
    pub fn __get_validators__(cls: &PyType) -> PyResult<&PyTuple> {
       let py = cls.py();
       let func = cls.getattr(intern!(py, "validate"))?;
       Ok(PyTuple::new(py, vec![func]))
    }
#[classmethod]
    #[pyo3(text_signature="(value)")]
    pub fn validate(cls: &PyType, value: &PyAny) -> PyResult<PyNRIC> {
        let v: String = value.extract::<String>()?;
        PyNRIC::new(v)
    }

Which is actually very python instead of rust lol. I guess I can make it better if there's a way to call classmethods within the same implementation block and so on, i.e. need to do what these #[classmethod] does to the codes.

Just out of curiosity, do you know why you had to manually convert the Vec into a PyTuple? Returning a Vec should convert it into PyList behind the scenes, so what it is the difference between tuples and lists? Mutability?

Which is actually very python instead of rust lol. I guess I can make it better if there's a way to call classmethods within the same implementation block and so on, i.e. need to do what these #[classmethod] does to the codes.

While I understand the aim, I suspect that we would have to break out quite a bit of functionality to make the slots which #[classmethod] fills available as separately manageable objects to Rust code. And I also suspect that there would be very little difference w.r.t. performance or ergonomics compared to calling getattr.

cc @samuelcolvin this may interest you to see Pydantic Custom Data Types being implemented in Rust :)

@jymchng just so you're aware, pydantic V2 which should be released soon is implemented in rust, see pydantic-core. The way custom validators work has changed completely, in future you'll just need to implement __pydantic_core_schema__ or __get_pydantic_core_schema__.
Feel free to ask on pydantic-core if you have any more questions.

@jymchng just so you're aware, pydantic V2 which should be released soon is implemented in rust, see pydantic-core. The way custom validators work has changed completely, in future you'll just need to implement __pydantic_core_schema__ or __get_pydantic_core_schema__.
Feel free to ask on pydantic-core if you have any more questions.

Hi @samuelcolvin, thanks for your reply. I am aware of pydantic V2.0, and pydantic-core which is implemented in Rust. Definitely looking forward to using it once V2.0 is released! 😄


Open file from localhost

Hi!
How to run https://viewer.ohif.org/local on my localhost?
I am run default code!
type: yarn run dev
I try localhost:3000/local and see text to load file but dont work!
Thanks!

I am able to reproduce here: https://viewer-dev.ohif.org/local
Our dialog service added a DraggableArea div that appears to be blocking interaction at that route. I'll convert this to a bug and assign it out. Thanks for the bug report!

Great job, @galelis! Thanks!
@dannyrb , I did a round of tests and everything looks fine. The issue was fixed.
I"m moving this issue to Done. Thanks


Allow OuiFilterGroup popups size to content

Description

Issues Resolved

Check List

[ ] New functionality includes testing.
[ ] New functionality has been documented.
[ ] All tests pass

[ ] yarn lint
[ ] yarn test-unit

[ ] Update CHANGELOG.md
[X] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

So we are officially dropping support for IE11?

Who? Eye-eee what?
According to the .browserslistrc file, we dropped it long ago.


Bugfix: missing initialization code for extstore maint thread objects

The extstore maintenance thread takes permanent ownership of its mutex.
Grabbing an uninitialized mutex can result in undefined behavior. If
the mutex uninitialized data happens to match an existing mutex, this
can cause a deadlock.

Whoops, good catch! That structure is calloc'ed to zero so it's not going to cause problems, but better to be correct there.

The code should actually be added before the pthread_create... sorry


.github: Add building binaries to check workflow

PR Checklist
PR Structure

[ ] This PR has reasonably narrow scope (if not, break it down into smaller PRs).
[ ] This PR avoids mixing refactoring changes with feature changes (split into two PRs
otherwise).
[ ] This PR's title starts with name of package that is most changed in the PR, ex.
services/friendbot, or all or doc if the changes are broad or impact many
packages.

Thoroughness

[ ] This PR adds tests for the most critical parts of the new functionality or fixes.
[ ] I've updated any docs (developer docs, .md
files, etc... affected by this change). Take a look in the docs folder for a given service,
like this one.

Release planning

[ ] I've updated the relevant CHANGELOG (here for Horizon) if
needed with deprecations, added features, breaking changes, and DB schema changes.
[ ] I've decided if this PR requires a new major/minor version according to
semver, or if it's mainly a patch change. The PR is targeted at the next
release branch if it's not a patch change.

What
Add build_release_artifacts script to check workflow.
Why
We don't check if binaries are successfully built before release action. But it's possible that something can be broken, i.e. the windows build was broken during the last Horizon release. It's better to ensure everything is working in every PR.
Known limitations
[TODO or N/A]

Tests will pass after https://github.com/stellar/go/pull/4544 is merged into master.


Is there a guide how to deploy to azure as an app service with SQLite ?

Normally it is easy but with the the env variables I am confused.

Environment variables have to be setup in Azure app services as application settings in the configuration tab.


test: use Verify for yaml validation

this could be a more simple way to write tests validation azure-pipeline YAML's

we should remove PublicApiExporter.csproj as part of this


Remove autoloaded lib path

This no longer works in production because rails 5 has disabled autoloading in production.
Move any code we need in production to app/ so it is loaded when the app boots.

👍


Remove exit-after-deploy flag for devspace up

This flag has been obsolete since devspace deploy was introduced.

@LukasGentele I think we should keep the flag since devspace deploy does not behave exactly the same as devspace up (e.g. in helm deployments the dev override config flag is only used in the up command)

Ok, makes sense. Thanks for clarifying.


Pre-flight check

Please everyone who supposed to be in this project comment on this issue.
The last member should close this issue.

@Partvish @SzurMarton @kerekesaron

Test comment

Random text


Assertion Failed PokePointer OnValidate

Describe the bug
On import of the MRTK Foundation NuGet package two Assertion failed statements are logged.  The source is the PokePointer OnValidate.
        protected void OnValidate()
        {
            Debug.Assert(line != null, this);
            Debug.Assert(visuals != null, this);
            touchableDistance = Mathf.Max(touchableDistance, 0);
            sceneQueryBufferSize = Mathf.Max(sceneQueryBufferSize, 1);
        }

Assertion failed
UnityEngine.Debug:Assert(Boolean, Object)
Microsoft.MixedReality.Toolkit.Input.PokePointer:OnValidate()
UnityEditor.AssetDatabase:LoadAssetAtPath(String)
Microsoft.MixedReality.Toolkit.Editor.ScriptableObjectExtensions:GetAllInstances()
Microsoft.MixedReality.Toolkit.Editor.SceneInfoUtils:RefreshSceneInfoFieldsInScriptableObjects()
Microsoft.MixedReality.Toolkit.Editor.SceneInfoUtils:InitializeOnLoad()
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes()

To reproduce
Steps to reproduce the behavior:

Import the latest 2.3 test Foundation NuGet package via NuGet for Unity
Observe the console

Your setup

Unity Version 2018.4.14
MRTK Version v2.3 test packages NuGet

We should maybe re-evaluate this OnValidate via the info in https://github.com/microsoft/MixedRealityToolkit-Unity/issues/4202#issuecomment-495765433 and https://github.com/microsoft/MixedRealityToolkit-Unity/pull/4899


Support updating existing tasks

Right now the API only supports creating tasks. In a continuous deployment setup of Automaat, you'd want to be able to (for example) have your tasks defined as YAML in Git, and then deployed to your Automaat instance using your CI pipeline once a task change is pushed to your base branch.
I think it makes sense to use the OnConflict object that already exists for creating/updating global variables:
https://github.com/blendle/automaat/blob/fd2db24dc8dfa9f541dd25fa569a13f66e9772f5/src/server/schema.graphql#L156-L159
For tasks, there are some considerations, that will probably require an extra OnConflict directive.
Here are the thoughts I currently have:

The same conflict directives (ABORT, UPDATE) apply to tasks.
The default if unset is the same as global variables (and the same as the current behaviour of tasks), which is to abort.
Updating a task means that the following should happen:

The task is matched using the task name (which is unique).
Any mutable task properties are updated (everything except its ID and name*)
All steps matching the task step names are updated.
All steps with new task step names are added.
All task steps in the database that aren't part of this mutation are removed.
Same thing happens for variables.

In addition to the existing two directives, I think it makes sense to add an ARCHIVE directive, that works specifically for tasks (for now).

It's purpose is to keep a record of previous tasks and their configurations.
When this directive is given, an existing task with the same name has its archived flag set.
This task is no longer returned in API responses.
It is also no longer invalid to have two or more tasks with the same name, as long as only one is non-archived.
Other than that, this directive creates as new task, as if it didn't exist before.
The upside of this is that we can keep the job -> task connections for archived tasks.

Another solution to the above point would be to simply remove the relationship between jobs and tasks. However, that would mean we can no longer show a history of jobs for any given task. The reference is already weak, so tasks are allowed to be removed without removing the jobs they created, this just means you get a null value back for the reference from a job back to a deleted task.
One more point to cover when we allow updating tasks is that it can no longer be assumed that the configuration of a job matches that of a task (meaning, a job could have been triggered when a task had different variables or steps configured). This is fine, but I think it makes sense to at least make sure there are created_at/updated_at fields available, so that we can easily detect if a task was changed after a job was created, which could be used in the future to signal that the representation of a job might not match that of an existing task.
All of this could also be avoided by making tasks immutable, and simply creating new ones and archiving old ones for every change you make. But I think that's a bit too extreme of a solution in this case (something like event sourcing would help here, but that's way out of scope).
* because we are re-using the createTask mutation, we can't ask for a task ID because none might exist yet, so we also can't rename the task. We might also supply an updateTaskName mutation that takes and ID, so that you can change the name as well, but I'll leave that out of the scope for now. You can always rename a task using the database itself, until we find a nice way to use this API.

A few more notes:

I think we can delay the introduction of ARCHIVE for now, as long as updating works.
updateTaskName would be nice, but can also wait for a bit.
We should already add the created_at/updated_at as part of this change.
We should also take into account the variable advertisements (3d45e615ffad14eedadc9d9019f4efe1c7a82bca) and apply the same logic as steps/variables (remove if unset in update, update otherwise)

Thinking on this some more, I think the semantics on this could be (for starters) as straight-forward as this:

When the conflict directive is set to UPDATE

Delete all steps related to a task (which will cascade to also delete variable_advertisements)
Delete all variables related to a task
Update the task description and labels, if they changed
Create new task steps and variables

When the conflict directive is set to ABORT

Create the task if its name doesn't exist yet, otherwise abort

This should cover all use-cases, except for task renaming, which will have to be its own mutation request, for now, and can be tackled later.

Actually, one problem I just realised with the above approach is that this would mean any CI-based deployment pipeline would recreate the steps/variables for all tasks on every deploy.
Technically, that's not a problem, but it does feel a bit draconian. 🤔 💭
Of course, we could consider that out of scope, and provide some helpful pointers on how to only trigger an update for tasks that have actually changed (using your VCS' history).

This was solved in 9bc4164c1c668fe76acf88b2d4010c03359f3bd8.
Here's the description from the commit:

This change introduces the possibility to update tasks.
The implementation is similar to global variables introduced in
3932d55:
A new onConflict directive can be passed along with the task details.
It can be either UPDATE or ABORT, it defaults to ABORT if unset.
If set to ABORT, the behavior will be similar to the existing
behavior, and an error is returned if a similarly named task already
exists.
If set to UPDATE, the following semantics apply:

If a task with a similar name does not yet exist, a new task is
created (this also means that task names currently can't be renamed
via the API, but they can be modified in the database directly).

If a similarly named task name does exist:

its properties (description, labels) are updated,
its steps are matched using their names (you can update step
names, but it will remove the old step, and create a new step,
instead of updating the existing one),
step properties (description, processor, position,
advertisedVariableKey) are updated,
missing steps are removed,
new steps are added,
the same rules apply to task variables, you can update their
description, selectionConstraint, defaultValue and exampleValue.

There is no support in the client(s) yet for creating or updating tasks,
but using the exposed GraphQL API playground, you can achieve the same
results.


Android secureDevice

@ggozad I am trying to figure out when, or I guess how this functionality disappeared. On our application running on Android with an insecure device we used to get prompted to secure our device (I assume this happened in the unlockCredentials method in SecureStorage.java). In the init method I notice there is an else if statement that would potentially run this code if the initial if statement didn't return false (line 77 of SecureStorage.java). I also, now notice for the android version I can potentially just force a call to this secureDevice method that appears like it'll call the unlockCredentials call. Am I missing something or did this method used to fire in the past and get updated somewhere along the way? What is the recommended way of invoking this message?

@ggozad if secureDevice is intended to be used for invoking this modal why does it exist as a prototype method rather than a static one? Wouldn't I want to attempt to 'secure the device' before initializing my secure storage?
.. Also why are these callbacks required? and in the case of the secureDevice method what do they mean? I could swear that this modal used to pop up on its own before but using an insecure device is not our normal use case so I hadn't tested this in a month or so.

Hey!
This has indeed changed a couple versions ago. Here's the rationale (which is also somehow described in the README, but feel free to improve the wording in a PR).
When initializing SecureStorage if the device is not secure the failure callback is going to be called. This gives the opportunity to the app to explain what is going on instead of prompting directly to change the screen lock without any explanation. Before the screen lock setting were invoked immediately without any explanation which was confusing to users. Several people requested this to change so that they can explain why the users should change their lock settings or perhaps opt-out of using secure-storage altogether.
Let me know if this explains.


WIP: Allow event based process handler to set transition messages

@will-chan Here's the code change to allow go-machine-service to set the transitioning message.  I haven't really tested this code so YMMV.

I'll tested it out.  Thanks.

@will-chan I updated the PR to reload, once the build is done I'll merge.


Fix for pointless evaluation of every command as JS

Made it so the compiler only evaluates a line as JS if it's got a JS literal in it
A couple of the changed areas are just from changing indentation because of my auto indentation VSCode extension

implemented fixed in 2.1.6


!!! no internal routing support, rebuild with pcre support !!!

[uWSGI] getting INI configuration from uwsgi.ini
*** Starting uWSGI 2.0.19 (64bit) on [Thu Sep  8 06:15:48 2022] ***
compiled with version: 8.3.0 on 01 May 2021 13:22:19
os: Linux-3.10.0-1160.53.1.el7.x86_64 #1 SMP Fri Jan 14 13:59:45 UTC 2022
nodename: cf-core-588f6579bf-f95v4
machine: x86_64
clock source: unix
detected number of CPU cores: 8
current working directory: /app/ml
detected binary path: /usr/local/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
setgid() to 33
setuid() to 33
your memory page size is 4096 bytes
detected max file descriptor number: 1048576
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address <IP_ADDRESS>:3000 fd 3
Python version: 3.7.10 (default, Mar 12 2021, 20:19:07)  [GCC 8.3.0]
Python main interpreter initialized at 0x55d7de703280
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 218712 bytes (213 KB) for 2 cores
*** Operational MODE: preforking ***

Could you describe the problem you are facing?


get_inline() should return multiple inlines when Meta.use_sites or Meta.use_i18n are True

When defining a MySEOMetadata metadata model, if it's Meta.use_sites is set to True or it's Meta.use_i18n is set to True, then rollyourown.seo.admin.get_inline(SEOMetadata) should return an inline which allows for adding multiple items, so the webmaster can edit metadata for each site/language right in the item admin page.
In rollyourown.seo.admin, line 111 (as of v1.0, current Pypi's stable version), something like:
def get_inline(metadata_class):
    attrs = {
        'max_num': None if check_if_using_sites_or_i18n(metadata_class) else 1,
        'extra': 1,
        'model': metadata_class._meta.get_model('modelinstance'),
        'ct_field': "_content_type",
        'ct_fk_field': "_object_id",
        'formset': MetadataFormset,
        }
    return type('MetadataInline', (generic.GenericStackedInline,), attrs)

+1
Completely agree. Indeed, it seems a contradiction that I can set different "metadata" by language, but then I can not allocate more than one, to each model instance.
Is there some kind of workaround to assign different "metatags" by language to each instance from the admin interface?
I take this opportunity to thank you for your work. It's really good!


[test] Change resources dir for GROMACS test

This is the first effort in the series of extending GROMACS test cases

@jenkins-cscs retry none


[SPARK-47008][CORE] Added Hadoops fileSystems hasPathCapability check to avoid FileNotFoundException(s) when using S3 Express One Zone Storage

What changes were proposed in this pull request?

Why are the changes needed?

Does this PR introduce any user-facing change?

How was this patch tested?

Was this patch authored or co-authored using generative AI tooling?

can you fill the PR description please?


TINKERPOP-1236: SelectDenormalizationStrategy for select().by(starGraph) in OLAP.

https://issues.apache.org/jira/browse/TINKERPOP-1236
This is massive. We have been plagued by select("a","b").by("name").by("age")-style traversals not working in OLAP because they are PathProcessor traversals are grab ReferenceElements out of the LABELED_PATH. However, you can compile these to work:
select("a").by("name") -> select("a").map(values("name"))
select("a","b").by("name").by("age") -> select("a").map(values("name")).as("a").select("b").map(values("name")).as("b").select(last,"a","b")

When we are able to drop path labels, we will be able to open up where(as("a").outE().count().is(gt(10))-style traversals to OLAP as well. Note that this type of WhereTraversalStep typically is used in conjunction with MatchStep and MatchPredicateStrategy handles it appropriately so we are not missing out too much.
CHANGELOG
* `select("a","b").by("name").by("age")`-style traversals now work in OLAP with new  `PathProcessorStrategy`.

mvn clean install
VOTE +1.
(Giraph integration will not be effected by this if SparkGraphComputer tests pass -- which they do).

Sorry. Pushed something that should have gone into master/ around GraphFilter exceptions. Anywho, if this PR gets merged into master/, all is good.

This is a failure from another PR that wasn't full integration tested. This is not related to this PR.
shouldSerializeTree(org.apache.tinkerpop.gremlin.structure.SerializationTest$GraphSONTest)  Time elapsed: 0.206 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>
	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.failNotEquals(Assert.java:834)
	at org.junit.Assert.assertEquals(Assert.java:645)
	at org.junit.Assert.assertEquals(Assert.java:631)
	at org.apache.tinkerpop.gremlin.structure.SerializationTest$GraphSONTest.shouldSerializeTree(SerializationTest.java:385)

Running org.apache.tinkerpop.gremlin.neo4j.structure.NoMultiNoMetaNeo4jGraphStructureStandardTest
Tests run: 799, Failures: 1, Errors: 0, Skipped: 266, Time elapsed: 216.4 sec <<< FAILURE! - in org.apache.tinkerpop.gremlin.neo4j.structure.NoMultiNoMetaNeo4jGraphStructureStandardTest
shouldSerializeTree(org.apache.tinkerpop.gremlin.structure.SerializationTest$GraphSONTest)  Time elapsed: 0.152 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>
	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.failNotEquals(Assert.java:834)
	at org.junit.Assert.assertEquals(Assert.java:645)
	at org.junit.Assert.assertEquals(Assert.java:631)
	at org.apache.tinkerpop.gremlin.structure.SerializationTest$GraphSONTest.shouldSerializeTree(SerializationTest.java:385)

Results :

Failed tests:
  SerializationTest$GraphSONTest.shouldSerializeTree:385 expected:<1> but was:<0>
  SerializationTest$GraphSONTest.shouldSerializeTree:385 expected:<1> but was:<0>

Strategy application code looks and new select traversals look to cover the different permutations that will require expansion into map steps by the new strategy.
VOTE: +1

VOTE: +1


golang-google-cicd to 0.0.18

Promote golang-google-cicd to version 0.0.18

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:
If they are not already assigned, you can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


List supported methods in same groups and order as webmozart/assert does

just an idea to ease comparison with https://github.com/webmozarts/assert to figure out which methods are still missing

What about removing this list altogether? It's just hard to maintain. Some assertions are already supported out of the box thanks to assert PHPDoc tags.

yeah, fine with me, I only wanted to use it as an example to show what is still missing so that one of the other open issues can be closed. I'll just modify this PR then to remove it and post in that issue directly :)

adapted

Thank you. We could do the same thing in https://github.com/phpstan/phpstan-beberlei-assert


make global metrics compute correctly for val and test

https://stackoverflow.com/questions/49359489/how-are-metrics-computed-in-keras


Add files via upload

By Kalo
about the game-
This game is a puzzle based maze game where you push a box into an activator to open up a wall. the ultimate goal is to reach the teleporter. sounds simple, but when there are multiple boxes and activators. your brain will have to think deep and hard about your next move.
how to play
use WASD to control you player and push the boxes into there places to open a wall which will eventually lead to the teleporter to the next level.

Thanks for your PR!
Please complete this:
Code
Check off the items that are true.

[ ]  The game was made using the Sprig editor.
[ ]  The game is placed in the in the /games directory.
[ ]  The code is significantly different from all other games in the Sprig gallery (except for games labeled "demo").
[ ]  The game runs without errors.
[ ]  The name of the file/game contains only alphanumeric characters, -s, or _s.
[ ]  The game name is not the same as the others from gallery

(I accidentally closed it. So I'm just re-commenting what you said)
Check off the items that are true.
The game was made using the Sprig editor.
The game is placed in the in the /games directory.
The code is significantly different from all other games in the Sprig gallery (except for games labeled "demo").
The game runs without errors.
The name of the file/game contains only alphanumeric characters, -s, or _s.
The game name is not the same as the others from gallery
All items are true

Thanks for your PR!
Please complete this:
Code
Check off the items that are true.

[ ]  The game was made using the Sprig editor.
[ ]  The game is placed in the in the /games directory.
[ ]  The code is significantly different from all other games in the Sprig gallery (except for games labeled "demo").
[ ]  The game runs without errors.
[ ]  The name of the file/game contains only alphanumeric characters, -s, or _s.
[ ]  The game name is not the same as the others from gallery

(I accidentally closed it, so I'm just recommending)
all items are true

Sorry for the delay! Nice, where did you hear about Sprig?

My friend asked me if I wanted to start a hack club with him through the school. Naturally, because I'm interested in engineering and computer science I said of course. Through that friend, I learned about the sprig.

No, what I used for inspiration was a game I was developing on Unity. It was in 3D but the concept was you would have walls that would open if you put a box on a pad. But this is slightly different because in the Unity game, there were things like pistons, levers/buttons, fans, and other elements that would move the box, and there were different types of boxes. Some you could lift with the player others were too heavy and needed something like a piston to move it. Others had no gravity and needed a fan to blow it into place. However, I did not have enough time to finish the project seeing how midterms were starting. then after that, I forgot about the concept then remembered it after some brainstorming. It would have been cool if I added more of the original features from the original concept. However, due to my current skill as the sprig editor, I was limited in what I could add. I was also limited by time because we would like to have a sprig we can use by Thursday which is our next meet.


Porter Import

CNAB thick bundles are used for transmitting across air-gapped networks. Duffle currently has some import/export capabilities, and I think we should add these in Porter as well. This issue tackles the import side of the equation.
In Duffle's case, the importbrings the bundle into the local bundle cache. Porter doesn't really have that concept, and instead works from a directory with a porter.yaml, a tag, or a cnab file.
For importing with Porter, I propose that our imports always publish to a registry, similar to what would happen with a porter publish. The porter publish of a bundle is the logical conclusion of a development cycle for a bundle. The invocation image, along with any referenced images, end up in a registry, along with the bundle metadata in the form of a bundle.json. In most cases where a thick bundle containing other images will be used, those will likely need to end up in a registry somewhere...not just a local docker daemon's cache of images. So our import can fulfill this need by essentially rehydrating the bundle into a registry. Then people can use it like a thin bundle, that is just based in the new registry.
The UX might look something like:
$ porter import -f <path-to-thick-bundle> myrepo/my-cool-bundle:0.1.0

This should load the tgz file, publish the invocation image and any referenced images to the "myrepo" registry with appropriate names from the bundle and finally update the bundle.json to reference these and publish the bundle.json to the specified tag, just like a porter publish.

Sounds great, though I would like to see us do this instead:
porter publish --thick-bundle /tmp/mybuns.tgz myrepo/my-buns:0.1.0

The import verb by itself doesn't explain well what is going to happen when you run the command. But after reading the steps you outlined, this sounds like a perfect fit for the publish verb we have already. Publish in porter already means "we will do all the steps necessary to prepare a bundle for distribution and then publish it to a registry".
What do you think?

Not sure the flag should really be --thick-bundle, but I wanted to see what you thought about using the publish verb.

We have publishing from an archive today, albeit with the effect of writing a new bundle.
The next logical step would be to build off of the relocation mapping support/wiring recently done by @jeremyrickard and utilize this to push the same/original bundle to the new bundle tag after we push the updated images directly from the archived OCI Layout.  In essence, we wish to maintain the offline/air-gapped functionality we currently have (can publish from an archive w/o access to original image registry) but maintain the content digest of the original bundle for signing/security guarantees (basically, don't create/write a new bundle to the given tag, but use what cnab-to-oci and forthcoming signing functionality offers).

Created https://github.com/deislabs/porter/issues/739 to track the work mentioned above.  We can close this ticket.


404 after changing password on password expiration page

As can see in the pic, if I clear browser's cookie and cache, the first time I log in (right after using default password to set my own password) will show this error msg page. Tested in Chrome only.

This may look a minor issue on the local, cause the error cannot be recreated unless I clear the browser’s cache and cookie, so we do not see it that often.
But when I do the vagrant up for vm, for both Oracle and PostgreSQL on centos 6, I can see this error when the first time I login, after changing the default password, it does the same thing, it does not redirect to the homepage, but shows an error page:
<IP_ADDRESS> is for PostgreSQL:

<IP_ADDRESS> is for Oracle:

This error is hard to recreate, you either clean cache and cookie on local, re-build an re-run to see it, or create a new vm and vagrant up with Oracle or PostgreSQL to see it, either way takes a lot of time.

The issue may be described in http://stackoverflow.com/questions/11790756/redirect-with-jsessionid-path-parameter-results-in-404-error. In the PasswordExpiredFilter, we're calling HttpServletRequest.getRequestURI() to get the URL that the expired password change page should return to. We're passing that URI into a query parameter for the expired password change page. The semicolon might be getting encoded.

Take a look at the HttpServletResponse.encodeRedirectURL method. According to the javadoc:
Encodes the specified URL for use in the sendRedirect method or, if encoding is not needed, returns the URL unchanged. The implementation of this method includes the logic to determine whether the session ID needs to be encoded in the URL. Because the rules for making this determination can differ from those used to decide whether to encode a normal link, this method is separated from the encodeURL method.
All URLs sent to the HttpServletResponse.sendRedirect method should be run through this method. Otherwise, URL rewriting cannot be used with browsers which do not support cookies.

Okay, will do, thanks for the suggestions!

We now use encodeRedirectURL for the redirect in question, and we set the session tracking method to COOKIE.


Instillation Process Hanging @Please wait, configuring the system...

When installing in my online production environment the process is hanging at "Please wait, configuring the system...". I then tried installing it in a local test environment and got the errors below.

"Warning: Constant ROOT already defined in C:\xampp\htdocs\parfumvault\inc\opendb.php on line 3"
"Warning: Constant ROOT already defined in C:\xampp\htdocs\parfumvault\install.php"

To Reproduce
Steps to reproduce the behavior:

Follow the steps to clone from the source.
Create a blank MySQL DB.
Enter Credentials.
Click "Save!".

Expected behavior
The database tables are created and instillation process proceeds as intended.
Screenshots

Production Environment

Production Environment Console

Test Environment
Please complete the following information:

Platform: Production->Linux | Test->XAMPP(Windows)
Browser Edge
PV Version 9.4

Platforms like XAMPP etc are not supported. For windows environments, docker is recommended instead.


Re-enable auto-populate form for authors

After django-membersuite-auth adds primary_org and title or position to PortalUser.

This fix is (only, I think) in the django-membersuite-auth code.  I can make the change faster than I can explain it.  I don't think any Hub code will need to be changed, so I'm going to remove the "contractor" label.

To clarify the problem, when users submit a resource, clicking the "I am an author" button now only auto-fills name and email, not title and organization. It should autofill all 4 fields.

@rerb - should this get re-assigned to Tylor or Brian?

Good one for Tylor.

On Dec 7, 2017, at 12:50 PM, monika-aashe<EMAIL_ADDRESS>wrote:
@rerb https://github.com/rerb - should this get re-assigned to Tylor or Brian?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/AASHE/hub/issues/439#issuecomment-350043862, or mute the thread https://github.com/notifications/unsubscribe-auth/AAlK8E--kG5gsjGTHko3Q2rGm-KYKoePks5s-CVtgaJpZM4NDESU.

--
Connect with us:   Website http://www.aashe.org/ | Facebook
https://www.facebook.com/aasheorg | Twitter
https://twitter.com/AASHENews | LinkedIn
http://www.linkedin.com/company/aashe
Email Confidentiality Notice
http://www.aashe.org/email_confidentiality_notice

I have this feature fixed locally. I'll need to update the tests before I can issue a pull request.

This should be fixed in production. Because it look's at the Hub's 'Author' table, it only works if the user has previously authored a resource in the hub, which I haven't. If someone could give the 'I am an Author' button a click, and confirm that this can be closed, that would be swell!

@dodget - I tried accessing a new submission and clicked on "I am an author", however it only populated my email (not my organization or title).
There was an issue with AASHE orgs not showing up in the dropdown at one time, so this may still be the same issue. Without the ability to masquerade as someone else, I don't think I'll be able to test how it works otherwise. (my personal AASHE account was merged in the AMS so I can't use that).

Ah, thanks Monika. I should have updated the issue. Julian tested it this morning and found a bug. We rolled back the changes to the Hub from yesterday.
I issued a fix, and submitted a new Pull Request, which should be merged and deployed soon.

This should be good to go, and is functioning properly in production.

Yes, looks good in production when I try loading my author info!


feat(tutorial): complete step 5

Closes #
{{short description}}
Changelog
New

{{new thing}}

Changed

{{change thing}}

Removed

{{removed thing}}

I'm sorry, missed that. Follow the link
https://carbon-tutorial-flauksas.mybluemix.net/#/


parking mode

I want to achieve side parking. In addition to customizing a suitable parking environment, how should I control the vehicle to achieve side parking?

I am not sure what you mean by side parking. Could you elaborate?

I am not sure what you mean by side parking. Could you elaborate?
Such as


Remove portability error when emitting declarations for incremental mode

Fixes #37960

@sheetalkamat  This still seems to be an issue as of ts 4.8.3 when working with a pnpm mono repo.

@weswigham Is there a blocker for getting this merged? There are still repos that are needing to patch TypeScript (as described in #37960) to get around this issue.

@weswigham can you confirm whether this PR changes behavior with respect to main? Sounds like at least a couple of people are still seeing it.

After looking into this again, I just don't think this is a good idea - while the declaration files for incremental aren't necessarily there to be shipped, they can be, and the original issue requestors weren't even using incremental in the first place. IMO, this error is just a known caveat of using incremental or composite (or declarations), and the correct fix is just doing what is asked in the error and adding an explicit type annotation at the indicated location (in so doing, you usually are forced to realize the transitive typing dependency yourself and choose how to resolve it!). If we ever swap our incremental metadata from declaration files to something less-human-consumable, maybe we can relax this rule then.


DOC: Update mailing list link

Summary of changes
Per https://groups.google.com/d/msg/pypa-dev/rUNsfIbruHM/LCEx-CB5AgAJ
the pypa-dev Google Group is now decommissioned.
Pointing to distutils-sig instead.
Signed-off-by: Sumana Harihareswara<EMAIL_ADDRESS>Pull Request Checklist

[x] Changes have tests (Not applicable)
[x] News fragment added in changelog.d. See documentation for details

Excellent. Thanks.


SAM Release Candidate on Linux always goes to /index instead of the proper help page

When pressing the help button on Linux, the url sent to the default browser always goes to /index.html, rather than the help page associated with the page where the button is pressed. Paul said the correct behavior is closer to what happens on Windows where it goes to the specific page, just using the browser.
This occurs both on the open source version, and the 2020.11.23 release candidate.

Same issue on 2018.11.11, 2020.2.29 and 2020.11.29 using Chrome or FireFox as default browser - opens to index:

One potential issue is noted here: https://github.com/clearlinux/distribution/issues/1843
In the terminal window from starting 2020.11.29 with Chrome as default browser:
[9020:9020:1125/010455.479777:ERROR:edid_parser.cc(102)] Too short EDID data: manufacturer id
[9020:9020:1125/010508.954255:ERROR:browser_switcher_service.cc(238)] XXX Init()
[9438:9438:1125/010534.435651:ERROR:edid_parser.cc(102)] Too short EDID data: manufacturer id
Opening in existing browser session.

Also, Linux is set to open index.html and has been for some time:

Note https://docs.wxwidgets.org/3.0/classwx_web_view.html
wxWEBVIEW_WEBKIT (GTK)
Under GTK the WebKit backend uses WebKitGTK+. The current minimum version required is 1.3.1 which ships by default with Ubuntu Natty and Debian Wheezy and has the package name libwebkitgtk-dev. Custom schemes and virtual files systems are supported under this backend, however embedded resources such as images and stylesheets are currently loaded using the data:// scheme.


post deploy script with MySQL

I am trying to move from a postgres db to a centralized bosh deployed MySQL db cluster.  I am running into an issue on the post deploy scripts with MySQL.  I am currently configured to ssl_mode=false.
The post deploy logs show errors with reset-admin-password
   lvl=eror msg=ShowSQL logger=sqlstore.xorm show=show
   Error: Could not read user from database. Error: User not found

I can produce the same error running manually
var/vcap/packages/grafana/bin/grafana-cli admin reset-admin-password \
  --homepath=/var/vcap/packages/grafana \
  --config=/var/vcap/jobs/grafana/config/grafana.ini \
  BigOlLongPassword

INFO[12-04|21:50:15] Connecting to DB                         logger=sqlstore dbtype=mysql
EROR[12-04|21:50:15] ShowSQL                                  logger=sqlstore.xorm show=show
INFO[12-04|21:50:15] Starting DB migration                    logger=migrator
INFO[12-04|21:50:15] [SQL] SELECT `TABLE_NAME` from `INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_SCHEMA`=? and `TABLE_NAME`=? []interface {}{"grafana", "migration_log"} - took: 1.877493ms logger=sqlstore.xorm
INFO[12-04|21:50:15] [SQL] SELECT `id`, `migration_id`, `sql`, `success`, `error`, `timestamp` FROM `migration_log` - took: 393.097µs logger=sqlstore.xorm
INFO[12-04|21:50:15] [SQL] SELECT COUNT(id) AS Count FROM `user` - took: 365.055µs logger=sqlstore.xorm
INFO[12-04|21:50:15] [SQL] SELECT `id`, `version`, `email`, `name`, `login`, `password`, `salt`, `rands`, `company`, `email_verified`, `theme`, `help_flags1`, `is_admin`, `org_id`, `created`, `updated`, `last_seen_at` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{1} - took: 530.159µs logger=sqlstore.xorm

Error: Could not read user from database. Error: User not found

However, if I run via curl it seems to work fine.
curl -X PUT -H "Content-Type: application/json" -d '{
  "oldPassword": "BigOlLongPassword",
  "newPassword": "NewBigOlLongPassword",
  "confirmNew": "NewBigOlLongPassword"
}' }' http://admin:BigOlLongPassword@localhost:3000/api/user/password
{"message":"User password changed"}

Here is my operator
- type: replace
  path: /instance_groups/name=grafana/jobs/name=grafana/properties/grafana/database?
  value:
    host: ((mySQL_proxy_ip))
    log_queries: true
    type: mysql
    port: 3306
    password: ((/database/grafana_db_password))
    name: grafana
    user: grafana
    ssl_mode: false

I'm running cf-MySQL v36.16.0 with a single MySQL Proxy and 3 back-end clustered cells.  Grafana is configured to connect to the MySQL proxy the same as my other deployments using the cluster.
I have tried this with prometheus v23.4.0 and v23.3.0
Any ideas?

Closed due to inactivity; Please feel free to re-open if issue still persists


Contract Recompilation

Usage related changes

npx hardhat test, npx hardhat run, npx hardhat starknet-invoke, npx hardhat starknet-call and npx hardhat starknet-deploy commands recompile contracts before they are executed only when necessary. (If there's a change in a contract or when an artifact is not available)
The commands stop on failed recompilation
Creates a file cairo-files-cache.json inside folder cache which tracks for changed contracts based on their hash.

Development related changes

The function handleCache() can be called before starknet actions.
Cache saving gets done on starknetCompileAction()

Checklist:

[x] Formatted the code
[x] No linter errors
[x] Tried to avoid introducing linter warnings
[x] Performed a self-review of the code
[x] Rebased to the last commit of the target branch (or merged it into my branch)
[x] Documented the changes
[x] Updated the test directory
[x] Created a PR to the plugin branch of starknet-hardhat-example: https://github.com/Shard-Labs/starknet-hardhat-example/pull/61)

[x] Modified test.sh to use my example repo branch
[x] Restored test.sh to to use the original branch (after the example repo PR has been merged)

[x] All tests are passing

@taco-paco approves :) let's rebase and try to merge!

🍾 🥳


raw html response from file

Hello!
Is that possible to respond with raw html file from an actual file? My goal is to emulate response delays while adding some specific response headers when dev server is pointed to few specific locations.
p.s. Thanks for the interesting plugin!

The plugin supports the full node.js development capability. For responses that require complete customization, you can use the response option for configuration.
export default defineMock({
  response(req, res, next) {
    // req is the Node.js http request object
    // res is the Node.js http response object
    // next is a function to call to invoke the next middleware
    // do something
  }
})

In this method, you can get the request information through the req parameter, such as req.url, etc., and match specific resources through the URL. Then add response headers through res.setHeader(key, value).
Finally, call res.end(body) to respond to the request, or if no resources are matched, call the next() method to hand the request processing over to other middleware.
The response method provides development capabilities equivalent to Connect middleware. Please refer to the official documentation.
I hope this answer can help you. If you have any other questions, please ask and I will do my best to assist you.

@pengzhanbo thanks for such a detailed reply! I've managed to accomplish my task (though it took me a while to notice that this middleware is different than I've used in BrowserSync where I could simply modify header and pass through request with next()
import { defineMock } from 'vite-plugin-mock-dev-server'
import fs from 'fs'
import { fileURLToPath } from 'url'
import { dirname, resolve } from 'path'

const __filename = fileURLToPath(import.meta.url)
const __dirname = dirname(__filename)

const turboStreamResponse = (req, res) => {
  const page = resolve(__dirname, '../src/') + req._parsedUrl.pathname
  fs.readFile(page, (err, data) => {
    if (err) throw err
    res.status = 200
    res.setHeader('Content-Type', 'text/vnd.turbo-stream.html')
    res.end(data)
  })
}

export default defineMock([
  {
    url: '/_partials/product/list-2.html',
    delay: 1000,
    response(req, res, next) {
      turboStreamResponse(req, res)
    },
  },
  {
    url: '/_partials/product/list-3.html',
    delay: 1000,
    response(req, res, next) {
      turboStreamResponse(req, res)
    },
  },
  {
    url: '/_partials/facet/form_response.html',
    delay: 3000,
    response(req, res, next) {
      turboStreamResponse(req, res)
    },
  },
  {
    url: '/_partials/_dummy_turbo_response.html',
    delay: 1000,
    response(req, res, next) {
      turboStreamResponse(req, res)
    },
  },
])

Works like charm!


Feature/callout

I had the need for a Callout component as well so I went ahead and made something that I hope can be a starting point for a Warp Callout component.
Examples
First a couple of examples

Usage
You need to provide the Callout with:

Title: A String value to show in the callout
arrowHeight (optional): Height of the arrow to draw, default value is 8 px
arrowWidth (optional): Width of the arrow to draw, default value is 18 px
arrowEdge (optional): Edge where to draw the arrow, default value is .top
cornerRadius (optional): Radius of corners, default value is 8

I have added a CalloutView to the example app that illustrates how to use the toast view
Design
The Callout feature is located in "Sources/Callout" and is "wrapped" in the Warp namespace.
It consists of:

A Callout SwiftUI view where we render the actual content (take the title, put it in a Text, style it and add a CalloutShape as the .background to the  Text)
A CalloutShape Shape where we do the calculations and drawing needed to actually draw the callout shape. This seems a bit hairy at first with a lot of draw commands. I've tried documenting it so it is - I hope - easier to dive into in six months 😅

Missing Features
I have not yet implemented the "popover" variant that adds a button and a shape. I can do so if you'd like me to, I just didn't have the need for it myself when I made this.
What I Would Like Your Feedback On

As in #19, the format
Are we good with the CalloutShape being what it is now? (quite a lot of manual drawing)
Do I need to lock arrowWidth, height etc. so they can't be changed from the outside but is just defined in the component?
Component design...is it "user-friendly" and understandable as a "component iOS developer consumer"

As last time, have fun...and thank you for your feedback 😄

@mohsen-schibsted There we go, we can now support various sizes and types of Callouts. I've updated the example.
A note on CalloutType
I can't figure out if this too clever
public enum CalloutType {
    public enum PopoverType {
        case dismissable(onTapped: () -> Void)
        case nondismissable
    }

    case inline
    case popover(type: PopoverType)
}

I mean, it gets the job done and it is quite elegant I think, but I don't know if it is too difficult to figure out how to use it.
Here's how it looks on the callsite
Warp.Callout(
    type: .popover(
        type: .dismissable(onTapped: {
            isVisibleValue.wrappedValue = false
        })
    ),
    title: "Some title",
    arrowEdge: .top
)

Or
Warp.Callout(
    type: .popover(
        type: .nondismissable
    ),
    title: "Some title",
    arrowEdge: .top
)

or if you just want the default inline variant you don't need to pass in any type, unless you want, and in that case it looks like so:
Warp.Callout(
    type: .inline,
    title: "Some title",
    arrowEdge: .top
)

What do you think?

@mohsen-schibsted There we go, we can now support various sizes and types of Callouts. I've updated the example.
A note on CalloutType
I can't figure out if this too clever
public enum CalloutType {
    public enum PopoverType {
        case dismissable(onTapped: () -> Void)
        case nondismissable
    }

    case inline
    case popover(type: PopoverType)
}

I mean, it gets the job done and it is quite elegant I think, but I don't know if it is too difficult to figure out how to use it.
Here's how it looks on the callsite
Warp.Callout(
    type: .popover(
        type: .dismissable(onTapped: {
            isVisibleValue.wrappedValue = false
        })
    ),
    title: "Some title",
    arrowEdge: .top
)

Or
Warp.Callout(
    type: .popover(
        type: .nondismissable
    ),
    title: "Some title",
    arrowEdge: .top
)

or if you just want the default inline variant you don't need to pass in any type, unless you want, and in that case it looks like so:
Warp.Callout(
    type: .inline,
    title: "Some title",
    arrowEdge: .top
)

What do you think?

I think it is totally clever and understandable. The thing is I think Callout type .popover is always dismissable. There is always gonna be an X there to close it. So there won't be a nondismissable .popover. Shadows always come with a close button according to this.

Shadows always come with a close button according to this.

🤔 you're right. I just saw some popovers without close buttons somewhere but that must've been a mistake...and it make things easier.
I'll align so that popovers always has an onDismiss callback 👍

@mohsen-schibsted
Can you help me figure out if the horizontal padding should be 12 or 16 px?
There seems to be two opinions in the Figma design
In the Components Overview it says 16px

And in the actual Warp Components page it says 12px

🤔

@mohsen-schibsted
Can you help me figure out if the horizontal padding should be 12 or 16 px?
There seems to be two opinions in the Figma design
In the Components Overview it says 16px

And in the actual Warp Components page it says 12px

🤔

I can see in the place that it is 12, there is a gap which is 8 too 😅 so probably 16 is the correct one. I will ask our designers too.

LGTM, the height when the arrow is on the top or bottom seems a bit low compared to design, but the overall component works as expected. So feel free to fix that then merge or merge and then we will fix that later on design review.

Got the vertical padding fixed...as discussed on Slack 😄


Issue 5332 - Undefined reference to zero length array

Always emit globals, even if they are zero-length static arrays.
http://d.puremagic.com/issues/show_bug.cgi?id=5332

0 sized globals are a problem, as mentioned in the comments. A better solution is perhaps to emit 1 byte of 0 for 0 sized arrays.

Ok


Change random value to prevent test error

test_mean_absolute_error sometimes fails. I changed random value to prevent error.

LGTM!


Concentration

CurseForge link
No response
CurseForge Mod Distribution
Unknown
Modrinth link
https://modrinth.com/mod/concentration
Source/other link
https://github.com/DeeChael/Concentration
Mod file size
54.01 KiB
License
(any other license)
What it does
Borderless fullscreen
Why should it be in the modpack
Unlike Cubes Without Borders, already supports Sodium 0.6 betas
Why shouldn't it be in the modpack

Untested, not sure about the difference
Supporting Sodium 0.6 betas in 1.21.1 does not imply a faster update to 1.21.2
Not in CurseForge

Additional details
No response

it also has no crash with pojavlauncher when entering sodium settings


rbd: Handle maximum snapshots on a single rbd image

We can have only a maximum of 510 snapshots on rbd images, due to the limitations mentioned in https://github.com/ceph/ceph-csi/issues/1098. In CephCSI we are setting a limit of maximum 450 snapshots on an rbd image (keeping a buffer to avoid issues) During the SnapshotCreate RPC call we are creating a temporary snapshot and we create a clone from the snapshot and we delete the snapshot, Even if we delete the snapshot it will be in the trash as it's still linked to the cloned images, when we list all the snapshots snap ls --all on an rbd image, it will show all the snapshots which are in the trash also. to remove the snapshots from the trash we need to remove the linking from cloned and the snapshots.
As the cloned image is having the deep-flatten feature and once we flatten the cloned images which are created from the parent image, the temporary snapshots which are in the trash will be garbage collected, This will allow as to create more number of snapshots on a single rbd image.
closes #1098
updates: #1188

/retest ci/centos/containerized-tests

@humblec @nixpanic E2E tests are getting timeout as the default timeout for a Travis CI instance is 50Min and our E2E tests are taking more time. we need to split out cephfs and rbd into separate tests or move to centos CI.
for now, decreased the snapshot count to 5 to allow CI to pass. PTAL

split out cephfs and rbd into separate tests

That would be my preference. We can then run tests in parallel and hopefully speed things up.
I am still working to get the tests running in CentOS CI. Not sure when it is stable enough to replace some of the Travis CI jobs.

/retest ci/centos/containerized-tests


Update Ruler to Foundry VTT 0.7.9

Which class should be updated?
Ruler
For which version should the class be updated?
Foundry VTT 0.7.9

Fixed by #315


Removal of special comments in border

My special comments, if used with border, are getting removed.
Original:
.buggy {
  color: #999 /*!theme-color*/;
  border: 1px solid #999 /*!theme-color*/;
  background-color: #999 /*!theme-color*/;
}

Minified:
.buggy{color:#999 /*!theme-color*/;border:1px solid #999;background-color:#999 /*!theme-color*/}

Looks like a bug with postcss-ordered-values. You can workaround this for now by passing {orderedValues: false} as an options object, or --no-orderedValues from the command line.

Thanks! Workaround does its job.

@jorenvanhee Fixed by postcss-ordered-values 2.1.1. Thanks for the report. 👍

👍  Thanks!


Remove non-public data from repo

Currently there is some DVC-tracked example data that we do not plan to make public. This should be removed and replaced with the public data. If needed, we can start a new repo to track this internal data and associated experiments.

Closed by b205c50.


test: migration json adapter

part of MBL-413
Changes

Added tests for migration JsonAdapter
Added extensions to help testing migration JsonAdapter

The failing tests are already fixed in #399

Closing this as base branch has to be updated to feature/cdp and there were significant changes required to write tests without data models. A new PR has been created to address this. Please refer to #402 for further updates.


Enable content-type specific rendering for attachments

Hi all,
The test is as attached!  Any questions, please don't hesitate to ask or confirm with me why I did something a certain way.
Not having the requirements and versions from the get go made that a bit of a guessing game - especially as jsonfield and django-jsonfield both exist, share the API and close in version numbers. If it's OK with you, I'll submit another PR to add the requirements once and for all.
Given this is a "real life" kind of test, here are some things I would bring up/make new tickets for but didn't feel needed changing as part of this PR:

This unique_together constraint on the Webhook model is currently doing nothing as it is defined at the class level and needs to be moved in to the inner class Meta options. A schema migration would then be required to add the new index to Postgres.

signals.get_supported_events is an unused function and can therefore likely be removed, I'm not sure if this is just because this is a test or not. If it was ever active it would have hindered scaling, as doing a file walk on every inbound request would be I/O expensive.

There is a bug in the logger formatting in test_app.signals, the number of string formatting elements should equal that of the number of arguments.

Cheers!
Darian

One more thing: I added the responses library for easily mocking out HTTP reqs made by the requests library. Adding depdencies is not something I do lightly and in real life would likely be done with regards to the maintainability of the project and what the teams consensus is on usefulness. Here, for me, it made sense though.

Closing down as it's served its purpose


Error when trying to "fisher u"

I am getting a problem when running fisher u
after some activity the line test: unexpected argument at index 2: '3	40416	stopped	sleep 0.02' is printed repeatedly.
fisher u
▸ Updating Fisherman
Aye! Fisherman 1.3.1 updated (3s)
Updating plugins...
▸ spin
▸ debug
▸ git-is-touchedtps://github.com':   ⠧
test: unexpected argument at index 2: '2	40416	running	fish -c "$commands" > /dev/stdout ^ $tmp &'
▸ git-branch-name
▸ git-is-repo
▸ autoinit
▸ git-is-staged
test: unexpected argument at index 2: '2	40416	running	fish -c "$commands" > /dev/stdout ^ $tmp &'
▸ git-is-stashed
▸ git-is-dirty
▸ shellder
▸ bass
▸ fzf
▸ legacy for 'https://github.com':   ⠏
test: unexpected argument at index 2: '3	40416	stopped	sleep 0.02'
test: unexpected argument at index 2: '3	40416	stopped	sleep 0.02'
test: unexpected argument at index 2: '3	40416	stopped	sleep 0.02'
test: unexpected argument at index 2: '3	40416	stopped	sleep 0.02'
test: unexpected argument at index 2: '3	40416	stopped	sleep 0.02'
test: unexpected argument at index 2: '3	40416	stopped	sleep 0.02'

Hey @brenogil I am working on a patch to fix a little bug in the update, but this is not it.
What's your fish version? Also, can you drop by http://join.fisherman.sh?

Hello, Just joined
fish --version
fish, version 2.2.0

@brenogil Thanks! Problem was lingering legacy and autoinit deprecated deps in the fishfile.
They had to be removed manually. After doing so, the problem sink away.
Closing as fixed.


Add KubeOne demo asciicast to README.md

What this PR does / why we need it:
This PR adds the KubeOne demo asciicast to the README file.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #273
Release note:
NONE

/assign @kron4eg

That's a really nice and smooth demo. :+1:

/override pull-kubeone-e2e-digitalocean-upgrade-1.13.5-1.14.1


How to calculate the value of pathway?

Hi,
The KEGG-decoder.py is very helpful to census pathways of the genome.
While I am a little confused about How to calculate the value of pathway.
For example:
#norBC   	if ('K04561' in ko_match and 'K02305' in ko_match):   		out_data['nitric oxide reduction'] = 1
#nifKDH
#	if ('K02586' in ko_match and 'K02591' in ko_match and 'K02588' in ko_match):
#		out_data['nitrogen fixation'] = 1
if ('K02586' in ko_match):   		out_data['nitrogen fixation'] += 0.33   	if ('K02591' in ko_match):   		out_data['nitrogen fixation'] += 0.33   	if ('K02588' in ko_match):   		out_data['nitrogen fixation'] += 0.33
For nitric oxide reduction, the value of nitric oxide reduction is one when both K04561 and K02305 must be present.
While for nitrogen fixation, the value of nitrogen fixation is the added value of each KO.
Best
chunxu

Hi Chunxu,
This a personal preference of mine - I was unhappy with searches for norB without norD as I felt it was overestimating the number of organism with a putatively functional nitric oxide reductase. In early versions of the tool, nitrogen fixation was treated the same way, but I was convinced to provide a partial calculation.
Cheers
Ben

Intentional distinction between the observation of these functions


build: don't run tests against edge

Since Edge is based on Chromium now, we don't get much out of running unit tests against it.

My thinking is that even though the tests run fairly quickly, we still don't get much out of them given that the browser engine is the same as Chrome.


"Encoding::UndefinedConversionError at /marvin/ "\xE2" from ASCII-8BIT to UTF-8"

I'm getting encoding errors on the administration pages.
https://github.com/rtomayko/tilt/issues/75
https://github.com/padrino/padrino-framework/issues/519

When I used a different gemset and ran bundle install, this issue was resolved. Not sure what was causing it, but it's fixed.

This block in boot.rb seems to have solved the problem.
Padrino.after_load do
Encoding.default_internal = nil
end


Call for Maintainer(s)

Obviously this repo has not been maintained in a while. I changed jobs a few months back and am no longer doing Rails work and thus have not had time in quite a while to maintain it. I still think this project has value, and therefore would like to hand it over to someone else. I can help a bit if necessary with the transition.
Any takers?

Definitely. Can you give me a call<EMAIL_ADDRESS>?


Activity local dispatch

What changed?

Why?

How did you test it?

Potential risks

This is neat, but requires some nontrivial SDK changes - was there any proposal around this? I think it's a good idea but we'll have to fit in the SDK work somewhere

This is neat, but requires some nontrivial SDK changes - was there any proposal around this? I think it's a good idea but we'll have to fit in the SDK work somewhere

Sorry I don't have a written proposal for this. The server side change is quite simple and a detailed proposal seems unnecessary. I am not sure about the plan on SDK side though, and a proposal may be necessary for SDK changes.
I think the discussion in this PR already covers the contract for the two new added fields. But if things are still unclear, I am happy to fill in the contract part in SDK change proposal.


Error when performing upgrades on v1.0.0

We have a bug in our upgrade path when upgrading from v1.0.0 forwards:

The v1.0.0 osm-bootstrap attempts to write a mesh config on startup @ version v1alpha1. It does this prior to starting it's servers, which include the crd conversion webhook.
In an upgrade, the new one comes up, which now writes the new version v1alpha2. Similarly, it does not start it's servers until this is successfully written.
This triggers a call from K8s to the conversion webhook. However if the old pod is down, the call fails, because the new pod has not yet started its server. ie: there are no servers to respond to the conversion webhook.
The old pod can attempt to come back up, but it also fails, due to trying to path the mesh config CRD, but the patch omits v1alpha2, which fails k8s validation.

Therefore no bootstrap pods can come up, which the remainder of the control plane depends upon.

It looks like if enableReconciler is set to true it can lead to issues as well

expanding on my last comment: the reconciler attempts to keep things at the current version. If 2 OSM versions are up for a brief period of time, one which has written the new CRD's/webhook/etc, the old version will try to rewrite them.
@jaellio this also breaks cert rotation for those webhooks

Doesn't the reconciler also re-create the mutatingwebhookconfiguration if it's deleted?

The issue seems to be due to the way that the CRD patching is coupled with the cert rotation handler code -> we pass in the patchCrds method in crdconversion.go as onCertChange - thus, the first time the certificate gets issued to the conversionwebhook, patchCrds is called before the server is started.
One potential solution is to not immediately call patchCrds the first time the certificate is issued - the actual rotation handler logic will be the same, since that is configured to handle future cert changes. But the first time setCert  is called before the server starts, we don't call patchCrds - instead we call it directly in crdconversion.go once the server starts.
This way, if the old osm-bootstrap pod is down, the conversionwebhook could respond to the server on the new bootstrap pod. If both osm-bootstrap pods are still up, k8s can use either the old or new osm-bootstrap service to update the apiversion on the meshconfig.

One potential follow up task to this though could be to "bulletproof" this solution by ensuring that k8s only uses the new osm-bootstrap conversionwebhook server to update the meshconfig. While the apiconversion could in theory still work using the old webhook server, down the road there may be situations where we want to only use the new webhook servers. One idea that @steeling proposed is adding a label to the new service and using a service selector.

actually patchCRDs is not the issue (we can verify that the new CRD gets created), but that immediately upon startup the bootstrap attempts to create the new meshconfig version (via ensureMeshConfig). It's this creation, which happens prior to the patchCrds call that is causing the issue.

@steeling it looks like both ensureMeshConfig and patchCrds are issues. For ensureMeshConfig, we call MeshConfigs.update() if the meshconfig already exists. patchCrds eventually calls CustomResourceDefinitions.Update() - I think both of these update() calls need to happen after the conversionwebhookserver gets started.

Spoke offline, but for posterity, k8s calls this out here https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/#writing-reading-and-updating-versioned-customresourcedefinition-objects
So explicitly, the conversion does not happen when writing a CRD.
More definitively, even if it did, the conversion would have already taken place from the ensureMeshConfig call, which writes in the new version

Discussed this with @steeling over a call, but another option is to get rid of the crdconversion webhook (and server) entirely. If we look at the conversionHandler methods for the crds in crdconversion.go, each crdconversion handler (except the meshconfig) does nothing if the apiVersions are the same between the previous and current CRD in the upgrade. If the new CRD has additional fields, those fields will get added automatically. Even in the case of the meshconfig, all we do is delete certain unsupportedFields from v1alpha2 to v1alpha1. However, these additional fields will anyway automatically be dropped, because they are not defined in the v1alpha1 CRD spec anymore.
This can be done by setting the conversion strategy to None in the crd spec: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#customresourceconversion-v1-apiextensions-k8s-io
The init-osm-bootstrap pod will apply the new CRD and thus update the conversion strategy of the original meshconfig CRD to not depend on the conversionwebhook server anymore.

To clarify a bit the points above:
our current webhooks do nothing that the implicit conversion wouldn't do anyways, when strategy is set to None. Further:

Currently, the conversion webhook that is used will unintuitively be from the old pod, since the new pod needs the conversion to happen prior to the webhook starting.
In a future case, where there are multiple objects being converted, or what is currently the case for a mutating and validating webhook: during an upgrade the webhook that is hit can be from either an old or a new version.

There's a lot more nuances here, especially with the CRD cases. I'm going to have a doc out soon with concrete proposals on how we can improve our upgrade story, and how to better handle CRDS.
For now, I'm in agreement with @nshankar13 that we should remove the conversion webhook, and explicitly set strategy: None on all of our CRD's.

Discussed this with @steeling over a call, but another option is to get rid of the crdconversion webhook (and server) entirely. If we look at the conversionHandler methods for the crds in crdconversion.go, each crdconversion handler (except the meshconfig) does nothing if the apiVersions are the same between the previous and current CRD in the upgrade. If the new CRD has additional fields, those fields will get added automatically. Even in the case of the meshconfig, all we do is delete certain unsupportedFields from v1alpha2 to v1alpha1. However, these additional fields will anyway automatically be dropped, because they are not defined in the v1alpha1 CRD spec anymore.
This can be done by setting the conversion strategy to None in the crd spec: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#customresourceconversion-v1-apiextensions-k8s-io
The init-osm-bootstrap pod will apply the new CRD and thus update the conversion strategy of the original meshconfig CRD to not depend on the conversionwebhook server anymore.

The conversion webhook is necessary when there are schema changes between the versions of the resource and we want to transparently handle these without user intervention. For e.g., consider a field foo that has been dropped in the new version in favor of a new field baz. We want a framework in place where if the value of foo can be translated to the value baz, that's possible. Otherwise, updating API versions risks breaking existing deployments.
If there's an alternative proposal that is capable of introducing new API changes in a way that doesn't break existing deployments without the need for a conversion webhook, that's an option worth discussing especially if it simplifies the upgrade path.

Currently the conversion webhook does nothing however, except cause bugs and headaches. I recommend that, if and when, we ever need to drop a field, we can revisit how to go about that, and whether a conversion webhook is even the right choice, given some of the caveats I mentioned above

Sure we can do a proposal, and punt on the decision till that's out.
As a quick point to get some data, I'm curious if we tried to quantify the effort if that would shed some light on the decision? Let's say we had a PR out to rip that code out, how much work would you anticipate it would be to revert the PR in the future? My estimate is on the order of days, which to me indicates we'd be safe going forward with current plans.
^^ regardless of estimate happy to wait, but I think it's a useful exercise to try to quantify the chance of making the wrong decision, ie: (probability of revert) X (1/# of months till needed) < # of days to implement revert

For e.g., consider a field foo that has been dropped in the new version in favor of a new field baz. We want a framework in place where if the value of foo can be translated to the value baz, that's possible. Otherwise, updating API versions risks breaking existing deployments.

@shashankram @steeling I'm wondering if it would be possible to incorporate this logic as part of the helm pre-install hook / init-bootstrap container instead of relying on the conversionwebhook. This wouldn't necessarily simplify the complexity of the code / implementation itself (for instance, the convertMeshConfig method in config_meshconfig_conversion.go), but at least as part of a pre-install hook we can circumvent issues relating to race conditions and timing with the k8s API.
The main issue though is that implementing this conversion logic ourselves in a pre-install job or as part of the init-osm-bootstrap pod over the course of multiple releases, for multiple CRDs could get messy, and would probably be simpler with the conversion webhook.

The current implementation of conversion webhooks is essentially equivalent to a None conversion strategy. We've got the webhooks in source control, so it doesn't seem like it would be too difficult to revert. If removing code and changing our conversion strategy will fix a bug while effectively being a no-op, that seems like the pretty clear winner here to me, especially as we're trying to get a patch release out

Fixed in #5065


[FLINK-9440][streaming] Expose cancelation of timers through timer service interface

What is the purpose of the change
This PR is enhancing PR #6077 and #6062 via commit 3813ffd. The purpose is to expose timer cancelation that has been optimized in the previously mentioned PRs to the user.
Brief change log
Introduced TimerService::deleteProcessingTimeTimer(long) and TimerService::deleteEventTimeTimer(long).
Verifying this change
Existing tests in KeyedProcessOperatorTest and KeyedCoProcessOperatorTest have been enhanced to cover the new functionality.
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (yes)
The serializers: (no)
The runtime per-record code paths (performance sensitive): (no)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
The S3 file system connector:  no)

Documentation

Does this pull request introduce a new feature? (yes)
If yes, how is the feature documented? (JavaDocs)

CC @aljoscha or @tillrohrmann

@tillrohrmann thanks for the fast review! Will merge.


Different name for ID field in struct

Is it possible to define a different name for the ID field in the entity struct.   I'd like to match this up with my proto definition somewhat.

Hey @aakhan1,
We don't support this. However, the struct-tags option is used to add meta data for other third-party tools/libraries integration - you should check if the package you use supports this.
Closing as we don't have plan to add this functionality.