Extend Prisma Client

Problem
Right now we don't provide guidance on how use the Prisma Client within a higher-level model or domain.
Use cases
1. Adding a computed field: The canonical example is getting a full name from a first and last name. We also have some use cases in: https://github.com/prisma/prisma/issues/3394 and https://github.com/prisma/prisma/issues/5998
2. Multi-step actions: Right now people put all their Prisma Client calls inside their GraphQL resolvers or RESTful controllers. This leads to "fat controllers" that are hard to test and lead to code duplication across controllers. The reason is because the Prisma client is often lower-level than your business domain and expressing your business logic requires multiple steps.
Some Examples:

team.signup: signing up for Slack requires you to create a user and a team at the same time
document.update: when you update a document, you also update its search index and fire off an email to subscribers

From a top-level view of your application, you'd consider these to be a single action (e.g. team.signup and document.update), but they break down into multiple steps. We should have a way to turn multiple steps into single actions without limiting the rich capabilities of the Prisma Client API. https://github.com/prisma/prisma/issues/5258 https://github.com/prisma/prisma/issues/5258
3. Custom Validation: Validate fields before they hit the database. Using the example above, for a team.signup(team_name, owner_email) action, you can validate that the owner's email address is valid and the team name doesn't have any special characters before you go to the database. Lots more use cases in: https://github.com/prisma/prisma/issues/3528
Existing Solutions

Middleware: Is one way to solve the multi-step actions triggering other actions, but you wouldn't really want to trigger other Prisma Client actions within this middleware. It's also global configuration for the entire instance of the client. Models can be more flexible.
Doing it in your resolver or controller: This works fine for simple applications. When you start sharing this logic, you need a way to abstract shared business logic into a model.

Prior Art
In Rails you have a difference between Active Record and the Active Record Query Interface. Prisma Client is an awesome Active Record Query Interface but Active Record is currently DIY. We should also have a story for some of the Active Record use cases described above.
Suggested Next Steps

[ ] Create an example script with the Prisma Client we have today demonstrating the use cases above. E.g. A model with computed fields, multi-step actions and custom validation.
[ ] Do we lose the rich querying capabilities of the Client? What can we do about that? Can we have both? If so, how could we have both?
[ ] How easy was this script to write with our existing generated type definitions? Anything we can do to improve this common workflow?
[ ] Document how to do currently this so we can point users to this documentation whenever they ask about it. Create new issues for larger future improvements.

What I'd like to avoid: Going too deep into implementing a solution before understanding how one would do this with today's Prisma Client in a hacky way perhaps.
Related

Extend the Prisma Client: https://github.com/prisma/prisma/issues/5222
Virtual Fields: https://github.com/prisma/prisma/issues/3394
CRUD Wrapper Service: https://github.com/prisma/prisma/issues/5273
Document how to use Prisma in a Wrapper Function: https://github.com/prisma/prisma/issues/5258
Convert the Models from Types to Classes: https://github.com/prisma/prisma/issues/5998

Computed fields are also related to https://github.com/prisma/prisma/issues/5998, which would provide a very easy and flexible way to implement them.

@tobiasdiez that's a good one. Added that to the Related list. Thanks!

This might also be related: #6759
Or more generally, orchestrating your app's initialization/setup as it relates to the database.

Might be! I could see two Prisma Client in one higher-level model. One with read access, one with right access.

It seems to me that prisma/ent could deal with the usecase 1 and 2. Why don't you re-start from it?

Related - https://github.com/prisma/prisma/issues/6349

Are there already plans to implement this soon?

@matthewmueller can we as a community help with the examples explaining the status quo. If yes, in which form do you prefer these, e.g comments here or as a external repository?

Yes, that would be great! The way I'm thinking about this is a realistic, yet minimal example. Perhaps a signin form where you need to take multiple actions or responding to a github comment that sends out emails.
Just looking to put together some patterns of higher-level models to see where we fall short and provide ideas on how to improve the Client to support these use cases.

Hey folks, so I compiled a list of patterns that you can use to extend the Prisma Client. This is a first draft. Please let me know how helpful you find this and if there's anything I should add, change, clarify, etc.

Preview URL
Pull Request

@matthewmueller - coming from ActiveRecord, I've found myself wrapping prisma in a model that represents the instance of a record. The docs have a good bit on how to wrap the prisma client delegates into a class that gets you some reusable static methods, but might benefit from an example using instances.
Maybe I'm the crazy one, but here's the gist of the pattern I find myself using with Prisma and classes:
import type { Admin as AdminRecord } from "@prisma/client";

import prisma from "../prismaClient";

import Customer from "./Customer";

export default class Admin {
  id: string;
  createdAt: Date;
  updatedAt: Date;
  email: string;
  private customerId: string;

  constructor(record: AdminRecord) {
    this.id = record.id;
    this.createdAt = record.createdAt;
    this.updatedAt = record.updatedAt;
    this.email = record.email;
    this.customerId = record.customerId;
  }

  adminRecord() {
    return prisma.admin.findUnique({ where: { id: this.id } });
  }

  async customer() {
    const response = await prisma.customer.findUnique({
      rejectOnNotFound: true,
      where: { id: this.customerId },
    });
    return new Customer(response);
  }

}

import type { Customer as CustomerRecord } from "@prisma/client";

import prisma from "../prismaClient";

import Admin from "./Admin";

export default class Customer {
  id: string;
  createdAt: Date;
  updatedAt: Date;
  name: string;

  constructor(record: CustomerRecord) {
    this.id = record.id;
    this.createdAt = record.createdAt;
    this.updatedAt = record.updatedAt;
    this.name = record.name;
  }

  customerRecord() {
    return prisma.customer.findUnique({ where: { id: this.id } });
  }

  async admins() {
    const response = await this.customerRecord().admins();
    return response.map((admin) => new Admin(admin));
  }

  static create(params: {
    name: string;
    email: string;
  }) {
    const { name, email } = params;
    const data = {
      name,
      admins: {
        create: [
          {
            email,
          },
        ],
      },
    };
    return prisma.customer.create({ data });
  }
}

There's more boilerplate here than would be ideal (setting many properties in the constructor), challenges optimizing queries that span multiple tables and therefore multiple models, lack of lazy relations, etc. But for now this makes it easy to work with data from the prisma client outside of models. Ex:
// let's say that context is set elsewhere, and it's our starting point for a request:
const admin = context.admin;
const customer = await admin.customer();
const allAdmins = await customer.admins();

...which with lazy relations could end up looking very much like ActiveRecord:
const allAdmins = context.admin.customer.admins();

(I know this last part on lazy relations is out of scope for this issue, and others have mentioned it in https://github.com/prisma/prisma/issues/1984, https://github.com/prisma/prisma/discussions/3899 and https://github.com/prisma/docs/issues/327, but I think fundamentally an API like this is what people coming from ActiveRecord and similar ORMs are looking for)

There's a library called https://github.com/stephenh/joist-ts that I think does a great job of code-generating files and types, similar to Prisma, but has a data mapper / active record feel. cc @stephenh

@matthewmueller what is now the plan given that your PR https://github.com/prisma/docs/pull/2602 has been merged? While the added guides are definitely helpful some of the existing solutions (especially for computed fields) are somewhat suboptimal and don't really scale to more complex examples.

Here's a good example or idea:
const mockUser = {
  firstName: 'John',
  lastName: 'Doe',
  email<EMAIL_ADDRESS>}

class DbClient {
  schemas: any;

  constructor(schemas) {
    this.schemas = schemas;
  }

  get users() {
    const schemas = this.schemas;
    return {
      findAll() {
        return [mockUser].map(u => Object.assign(schemas.users, u))
      }
    }
  }
}

const userSchema = {
  get fullName() {
    return this.firstName + ' ' + this.lastName
  }
}

const dbClient = new DbClient({
  users: userSchema
})

const users = dbClient.users.findAll()

console.log(users, users[0].fullName)

@tobiasdiez, would love to learn more about why some of these solutions (especially computed fields) are suboptimal. Do you mind sharing a bit more?

We added some new documentation on how to build some of these use cases yourself:

Custom Validation: https://www.prisma.io/docs/concepts/components/prisma-client/custom-validation
Computed Fields: https://www.prisma.io/docs/concepts/components/prisma-client/computed-fields
Excluding Fields: https://www.prisma.io/docs/concepts/components/prisma-client/excluding-fields
Custom Models: https://www.prisma.io/docs/concepts/components/prisma-client/custom-models

We do plan to implement these features into the Prisma Client eventually, but this is meant to help you along in the meantime. If you'd like to chat about any of these topics or have any questions, feel free to book some time with me.

I have been following this discussion for some time and I would like to contribute my thoughts.
I've been trying to build a Prisma Middleware (using prisma.$use) that basically tracks changes to the database. While that is a rather complex topic by itself I found that possibly the hardest thing to do was to handle all of the cases how Prisma could possibly modify something. The possibility of nesting queries introduces a lot of cases that (considering you'd want to do it properly) you all need to cover. While it's probably very much debatable if the project I tried to pull off is in the correct spot in the Prisma Middleware (would probably be better doing this at a lower level). I still think it showed me what Prisma really needs (in my opinion).
What I would love to see would be hooks based on models and operations that would also get called if the operation is nested.
E.g. it would be cool if you could do
prisma.$foo.user.onCreate((data, select, include, next) => {
    // Do something, perhaps modify the data

    const result = next(data, select, include);

    // Possibly modify the result, e.g. adding computed fields
    // select or include could also be used to check if a computed field needs to be computed

    return result
})

As with the Prisma Middleware you could perform changes to the data that gets inserted, modify the result or you could even make additional calls to Prisma in the Middleware. The only difference is that you don't need to worry about covering every possible case of the query structure. Additionally, the typings for these hooks could be part of the Prisma client so it would be a lot more type safe than todays prisma.$use.
Some other things that would generally help would be:

custom directives for both models and fields
finding a good way for hooking into the client generation and migration. There should be a possibility of doing both separately so that you could

add custom columns into the database (hidden from the client) that help you compute computed fields
add computed fields that don't have an actual column in the database
possibly add models

Regarding the second point there should probably also be some predefined directives that make a field either client-only or database-only but I do think it would be best if you could also do this programmatically. This would also allow you to add fields to either all models programmatically or only some of them, e.g. based on the model directives I mentioned before.
I have no idea if any of this is feasible at all. To my understanding, much of the Prisma client is not actually written in Typescript so this could potentially come at a performance cost. Also this is obviously something that would require major work so for now it will remain a fantasy for me.

My team has been using Prisma for a year now. Our use case is complex and involves many of the use cases mentioned here and then some.
In the JS/TS ecosystem there are multiple strong opinionated ORMs with plugins for just about everything. We specifically use Prisma for its simple API and strong types which lends it well to a functional paradigm.
Documentation on how to compose the Prisma client with other specialized libraries for things such as validation is a great direction. There are some things that could improve the composability of the client. Outside that I'd prefer the core team to keep delivering features specific to managing and interacting with the database than make an ActiveModel style ORM that tries to do it all.

@tobiasdiez, would love to learn more about why some of these solutions (especially computed fields) are suboptimal. Do you mind sharing a bit more?

Adding helper methods that compute additional fields works well to add one or two fields. But in a more complex project, you end up with a lot of helper methods, that devs have to remember, import separately, etc. It would be nice if one could create a custom model class and then say "Prisma please use this class as the model for users". Something like the following rewrite of the example from https://www.prisma.io/docs/concepts/components/prisma-client/computed-fields:
import User as PrismaUser from prisma

// Somewhere add a config that prisma automatically wraps all methods normally returning `User` with this class
class User extends PrismaUser {
    constructor(private user: PrismaUser) {
         // So that methods/properties defined on `PrismaUser` work
         super(user)
   }

    function computeFullName(): string {
         return this.user.firstName + ' ' + this.user.lastName,
    }
}

async function main() {
  const user = await prisma.user.findUnique({ where: 1 })
  user.computeFullName() // This now works, because `findUnique` returns a `User` and not a `PrismaUser`
  user.firstName // Still works
}

Currently one can achieve something like this using Objects.assign and manually wrapping return values of prisma functions. But this becomes tiresome and complicated.
Alternatively, if prisma would return a class User (instead of an object with type User), then one could use module augmentation to get

import { User } from "prisma"
declare module "prisma" {
  interface User {
    computeFullName(): string
  }
}
User.prototype.computeFullName = function () {
  return this.user.firstName + ' ' + this.user.lastName,
};

async function main() {
  const user = await prisma.user.findUnique({ where: 1 })
  user.computeFullName() // This now works, because we extended `User`
  user.firstName // Still works
}

@tobiasdiez
Your idea is just what I needed before, however, I found out that class-based ORM introduces another problem: type safety.
In an example of this document, if you fetch users that don't have firstName or lastName using the select option, you'll get an unexpected result from computeFullName. Unfortunately, you can't notice that before running the code.
That's why now I don't think introducing class into Prisma is best to deal with the use cases above.
By the way, if you just want to use the syntax object.method, Bind-this operator (currently Stage-1 Proposal) could help you.
import { User } from "prisma"

function computeFullName(this: User) {
  return this.firstName + ' ' + this.lastName,
};

async function main() {
  const user = await prisma.user.findUnique({ where: 1 })
  user::computeFullName()
}

I'm thinking we should use something like Firebase does when fetching data from their store. In Firsbase we use withConverter to cast the result to different instances e.g.
class Post {
  constructor(readonly title: string, readonly author: string) {}

  toString(): string {
    return this.title + ', by ' + this.author;
  }
}

const postConverter = {
  toFirestore(post: Post): firebase.firestore.DocumentData {
    return {title: post.title, author: post.author};
  },
  fromFirestore(
    snapshot: firebase.firestore.QueryDocumentSnapshot,
    options: firebase.firestore.SnapshotOptions
  ): Post {
    const data = snapshot.data(options)!;
    return new Post(data.title, data.author);
  }
};

const postSnap = await firebase.firestore()
  .collection('posts')
  .withConverter(postConverter)
  .doc().get();
const post = postSnap.data();
if (post !== undefined) {
  post.title; // string
  post.toString(); // Should be defined
  post.someNonExistentProperty; // TS error
}

One thing i found out difficult to build is dynamic typing, if we started including different entities in queries, we need a way to use the types more easily rather than building them out manually e.g.
 const uses = await prisma.user.findUnique({where : { id }, include: { posts: true, comments: true }});
/*
Prisma here knows that the user type is going to be User & { posts: Post[]; comments: Comment[] } but there is not an exported type by default so we have to build those/
*/

type UserWithCommentsAndPosts = User & { posts: Post[]; comments: Comment[] };

const findPostWithComment (user: UserWithCommentsAndPosts) => ....

doc for FirebaseDataConverter

I'm using the custom model approach to add "computed fields" to my prisma models.
In a nutshell I'm "extending" the find & create methods that prisma provides, in order to inject my computed fields. This works, but my biggest complaint is that I was unable to reuse the method names - so I'm not actually extending findUnique() - I'm providing a new method named find() that uses findUnique() under the hood. Using prisma's findUnique() inside of my findUnique() appears to create an infinite loop... There's also more boilerplate than I'd love.
I think it would be great if custom classes/methods could be passed to new PrismaClient(). That would provide maximum flexibility, while still defaulting to all of the existing prisma functionality if nothing is passed. I do not think prescribing this stuff in the schema file would be a good approach. This could be something like:
export default new PrismaClient({
  user: {
    findUnique: (user: User): User => doWhateverToUser(user)
  }
})

or:
export default new PrismaClient({
  user: {
    beforeFindUnique: (args: Prisma.UserFindUniqueArgs): Prisma.UserFindUniqueArgs => doWhateverToArgs(args)
    afterFindUnique: (user: User): User => doWhateverToUser(user)
  }
})

or if just for computed fields:
export default new PrismaClient({
  user: {
    computedFields: (user: User): User => applyComputedFieldsToUser(user)
  }
})

Current Use Example:
Currently using this setup in a monorepo.
packages/orm:
schema.prisma:
generator client {
  provider = "prisma-client-js"
  binaryTargets = [ "native", "rhel-openssl-1.0.x" ]
}

datasource db {
  provider = "mysql"
  url = env("DATABASE_URL")
}

model User {
  id                String          @id @default(uuid())
  email             String          @unique
  password          String?
  firstName         String
  lastName          String
  createdAt         DateTime        @default(now())
  updatedAt         DateTime?       @updatedAt
  deletedAt         DateTime?
}

models/user/types.ts:
import { User as PrismaUser } from '@prisma/client'

export interface User extends PrismaUser {
  name: string,
}

models/user/index.ts:
import {
  Prisma,
  PrismaClient,
  User as PrismaUser,
} from '@prisma/client'

import { User } from './types'

const userModel = (model: PrismaClient['user']) => ({
  add: async (args: Prisma.UserCreateArgs): Promise<User> => {
    const user = await model.create(args)

    return applyComputedFields(model)(user)
  },

  find: async (args: Prisma.UserFindUniqueArgs): Promise<User|undefined> => {
    const user = await model.findUnique({
      ...args,
      include: {
        teams: { include: { team: true } },
        ...args.include,
      },
    })

    if (!user) {
      return undefined
    }

    return applyComputedFields(model)(user)
  },

  get: async (args: Prisma.UserFindManyArgs = {}): Promise<User[]> => {
    const users = await model.findMany({
      ...args,
      include: {
        teams: { include: { team: true } },
        ...args?.include,
      },
    })

    return Promise.all(users.map(applyComputedFields(model)))
  },

  name: (user: PrismaUser): string => `${user.firstName}${(user.firstName && user.lastName && ' ') || ''}${user.lastName}`,
})

const applyComputedFields = (model: PrismaClient['user']) => async (user: PrismaUser): Promise<User> => {
  const self = userModel(model)

  return {
    ...user,
    name: self.name(user),
  }
}

export default (model: PrismaClient['user']) => Object.assign(model, userModel(model))

export * from './types'

index.ts:
import { PrismaClient } from '@prisma/client'

import userModel, { User } from './models/user'

const prisma = new PrismaClient()

const models = {
  user: userModel(prisma.user),
  // ...more models...
}

export default Object.assign(prisma, models)

export const {
  user,
  // ...more models...
} = models

export type {
  User,
  // ...more model types...
}

packages/app:
import orm, { User } from '@monorepo/orm'

const user: User|undefined = await orm.user.find({ where: { email<EMAIL_ADDRESS>} })

This functionality already exists:
ES6 "Proxy" contains two traps for get/apply, these traps can be combined and wrapped around PrismaClient; Now whenever .findMany etc are called you can compose your own pre and post logic in an easy way.
Agree that maybe it might be better to have this as part of PrismaClient but if it is it should just use ES6 Proxy because then it can be fully implemented without touching the internals.
const proxyify = <T extends object>(value: T, table?: string, operation?: string): T => {
	return new Proxy(value, {
		apply: function trap(obj, props, args) {
			if (typeof obj !== 'function') return;
			if (operation) {
				console.log(args, table, operation);
				// pre logic.
			}
			const returned = obj(...args);
			if (returned instanceof Promise) {
				/* post logic feel free to use finally */
				return returned;
			}
			// post logic.
			return proxyify(obj(...args));
		},
		get: function trap<K extends keyof T & string>(obj: T, key: K) {
			const operations = [
				'findMany',
				'findUnique',
				'update',
				'count',
				'upsert',
				'aggregate',
				'aggregateRaw',
				'deleteMany',
				'createMany',
				'create',
				/* ...etc or you can generate this list yourself through various ways. */
			];
			const isOperation = operations.includes(key);
			return proxyify(obj[key] as any, table || key, isOperation ? key : undefined);
		},
	});
};
const client: PrismaClient = proxyify(new PrismaClient());

This is a simple example in our internal use we have an API we're written to easily allow pre/post logic by adding another parameter to proxify I.E
proxify(new PrismaClient(), {
    user: {pre: () => {/* do something*}, post: () => {/* do something */}},
}

@ShanonJackson I haven't used ES6 Proxies yet. Is that also type-safe?

Hey all,
I've built a new Prisma Generator to emit custom models based on Prisma recommendations(as mentioned in the docs).
Currently, you could either WRAP or EXTEND. More grouping behaviors will be added soon.
Feel free to try it here: https://github.com/omar-dulaimi/prisma-custom-models-generator

Everyone passionate about extending Prisma, please check our new proposal in #15074 by @millsp

Hi,
My opinion is that extending specific models is not that important, since business specific tasks should be handled one layer above Prisma. But you added it so hurray.
However, extending the base functionality of the client with generic functions is of primary importance to me, for example to have a findByPrimaryKey or findPaginated functionality. The real problem is that generated types are not extending one generic Delegate interface, but every model has its own.
See my question on StackOverflow that explains the problem.

has someone had any issues with $-methods while using ES6 proxies or even tried them?
I'm getting errors like:
proxyOfPrismaClient.$disconnect() // $disconnect is not a function
Even when using very simple or even transparent proxies.
I can't find any info on why this might happen.

@random42 we will soon publish and expansion of our guide to show how to do that with client extensions.
@JuanGalilea It is possible that we have a bug there, please create a new issue and provide us with a repro.
Thanks.

We're closing this issue as the points from the OP have been implemented in Client Extensions. If something is still missing for you, please open a feature request, a bug report, or a discussion. Thanks.


muilti tx payment - allow to add native currency as accepted fee currency

Consider to allow native currency to be added to list of accepted currencies.
AcceptedCurrencies are also used in XCM trader, so sufficient tests are needed to ensure that having HDX in this list would not have any side effect.
this storage is also used to populate prices in on_initialize, so for HDX it needs to be handled explicitly, because you would not get price of HDX from spot price provider.
Fallback price should be always set to 1 regardless of price provided.

Regarding your comment on HDX price - something to think about during this change is if we want to use stable price instead of HDX price as part of this change.


How to disable additional code when minifying js

Laravel Mix Version: 6.0.18
Node Version (node -v): 14.16.1
NPM Version (npm -v): 6.14.12
OS: Ubuntu 20.04

I use web components and compile each js file separately, but with default settings it adds a lot of additional functions, like _classCallCheck, _defineProperties, _createClass, _inherits and etc. I would like keep only removing spacing and replacing names to short during minifying and nothing more.
I compile via the ts function and was trying to get it via terserOptions or using .babelrc but unfortunately have no result.
How I can get it?

I've discovered that they were polyfills from Babel, and I've found a way to avoid them.
In webpack.mix.js
// makes babel is dependent on package.json browserslist, so will skip additional polyfills         laravelMix.babelConfig({             "presets": [                 [                     "@babel/preset-env",                     {}                 ]             ]         });
In package.json
"browserslist": [     "last 3 Firefox versions",     "last 3 Chrome versions",     "last 3 Safari versions",     "last 3 FirefoxAndroid versions",     "last 3 ChromeAndroid versions",     "last 3 iOS versions"   ]


Chore: Adding alias as dev for solo command

I dunno, this feels like it might conflict with other commands? Does anyone else have opinions here?

Writing "solo" is not so difficult that you would need to add an alias for it.

Of course it's not hard to write solo while running the command but something like php artisan run:dev  feels like you are running the app!

I think I'll hold off on this for now! Thanks for the idea though


Add Details and Books of genre Magical Realism ,Cyberpunk and Utopian

Related Issue
[Cite any related issue(s) this pull request addresses. If none, simply state “None”]
Fixes:  #4578
Description
issue #4578
Type of PR

[ ] Bug fix
[X] Feature enhancement
[ ] Documentation update
[ ] Other (specify): _______________

Screenshots / videos (if applicable)

Checklist:

[X] I have made this change from my own.
[ ] I have taken help from some online resources.
[X] My code follows the style guidelines of this project.
[X] I have performed a self-review of my own code.
[X] I have commented my code, particularly in hard-to-understand areas.
[X] I have made corresponding changes to the documentation.
[X] My changes generate no new warnings.
[X] I have tested the changes thoroughly before submitting this pull request.
[X] I have provided relevant issue numbers and screenshots after making the changes.

record a video from home page to the end you made changes @haseebzaki-07


Vagrant failed to bring the VM image up

I decided to build a fresh SWGEmu only machine.  Machine is an i5 3320M 2.6 ghz processor with 8 gigs ram running 64 bit Win 7 with a Samsung SSD pro 512 gig drive.
I've downloaded the latest GitHub, Virtual Box and Vagrant LordKator's instructions.
Virtualization and hyper V are enabled in the bios (although I still get the warning error and select N I don't want to stop and fix it)
I have gotten this same error approximately 6 or 7 times.  I keep trying different things including the 'destroy' and 'uninstall' commands at the end of the bash statement.  Nothing works.  I was able to get the server to build by manually adding the VM box into Oracle.  I thought I had it licked but after it pulled the latest repository the server would bounce between a 'ready for log in state' and a 'not ready for login' every 15 seconds or so.  I was never able to successfully log into the server.  I verified the local IP / port was correct.
Rather than continue to bang my head against the wall I decided to pull the full bash window text, post it here and see what if anything obvious I'm missing.
thanks in advance for any help.
Indy.
VMfail.txt

Just saw the tip to download 1.9.1 vagrant.  Going to try that.  If successful I'll comment and we can close this issue.

That got it!  I'm back baybee!


.IncludeMany and OrderBy

I have the following code:
var resultWithO2M = Database.Query<AssetType>()
                 .IncludeMany(x => x.Assets, NPoco.Linq.JoinType.Left)
                 .OrderBy( x => x.Id)
           .ToList();

It generateds SQL like below:
SELECT "AT"."id" as "Id", "AT"."id_asset_category" as "IdAssetCategory"
--... ommited for brevity
FROM asset_types "AT"
  LEFT JOIN assets "A32" ON "AT"."id" = "A32"."id_asset_type"
ORDER BY "Id" ASC

IMO the  ORDER BY Should be : "AT"."Id" (especially since my assets table also has an Id field)
The query seems to require the OrderBy to function properly. Maybe OrderBy shold be automatically added when using IncludeMany otherwise you will duplicate the Master table in the relationship depending on the natural order the database returns rows in.

Just realized this is probably related to #496

I faced the same problem and was wondering why so basic thing is not implemented here. Also if you want, for example, get top 10 items,  the includemany will fail. Generated SQL will return top 10 from left join and that means that if the first item from our top 10 will have 15 nested assets you will have 1 item with 10 assets, so limitation completely fails.

The query seems to require the OrderBy to function properly. Maybe OrderBy shold be automatically added when using IncludeMany otherwise you will duplicate the Master table in the relationship depending on the natural order the database returns rows in.

We also had this issue with IncludeMany, took a bit of debugging to work out that NPoco required contiguous blocks of results associated with each parent object.

Yeh, SQL Server does this automatically, whereas others don't. 😞


Extract python's commands generation from the model

It should be in a visitor of the plot model.

Done.


Don't error on 204 - no content (nothing playing)

Creates a currentlyPlaying.statusCode and playerDetails.statusCode int
.error = false on a 204 response (no content) for differentiation between an actual error and nothing playing/no active Spotify sessions

Thanks!


yambar: 1.10.0 -> 1.11.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://repology.org/project/yambar/versions.
meta.description for yambar is: Modular status panel for X11 and Wayland
meta.homepage for yambar is: https://codeberg.org/dnkl/yambar
meta.changelog for yambar is: https://codeberg.org/dnkl/yambar/releases/tag/1.11.0
Updates performed

Version update

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 1.11.0 with grep in /nix/store/6q0qcm68m6ip3m0yg15f3437h07n85mm-yambar-1.11.0
found 1.11.0 in filename of file in /nix/store/6q0qcm68m6ip3m0yg15f3437h07n85mm-yambar-1.11.0

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

2 package rebuild(s)

First fifty rebuilds by attrpath

yambar

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/6q0qcm68m6ip3m0yg15f3437h07n85mm-yambar-1.11.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A yambar https://github.com/r-ryantm/nixpkgs/archive/14527e418974d171938672fdf5396b5e0915d197.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/14527e418974d171938672fdf5396b5e0915d197#yambar

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/6q0qcm68m6ip3m0yg15f3437h07n85mm-yambar-1.11.0
ls -la /nix/store/6q0qcm68m6ip3m0yg15f3437h07n85mm-yambar-1.11.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review --extra-nixpkgs-config '{ allowInsecurePredicate = x: true; }' run on x86_64-linux 1

2 packages built:

yambar
yambar.man

Maintainer pings
cc @AndersonTorres for testing.

Result of nixpkgs-review pr 307650 run on aarch64-linux 1

2 packages built:

yambar
yambar.man


Add architecture ppc64le to travis build

Add support for architecture ppc64le.
This is part of the Ubuntu distribution for ppc64le. This helps us simplify testing later when distributions are re-building and re-releasing. For more info tag @gerrith3
Added ppc64le arch and excluded<EMAIL_ADDRESS>for Travis build.

Do you have a specific problem on IBM Power? Otherwise I can't see a reason why we should add another 64bit little-endian Ubuntu variant to our test matrix. Travis CI is running at/beyond its limit anyway, which is why the unit tests run on Github Actions at the moment. Also, ppc64le support on Travis appears to be experimental/beta.

Never mind. I've seen that you've opened similar pull requests in multiple Lua projects, some of which are pure Lua where testing on another architecture only worsens climate change.


Config option for adding extra Jira fields

It would be useful to have some easy way how to populate extra Jira fields with NEWA YAML config.
Those fields should include basic fields [1] and extended fields for Jira customized projects.
For example jira-project-config.yaml:
...
extra_fields:
  - pool_team: <team_name>
...

Such a config will add pool_team option to Jira tickets generated with NEWA.
[1] https://community.atlassian.com/t5/Jira-questions/List-of-Jira-fields-and-description/qaq-p/1558852

This is being worked on in https://github.com/RedHatQE/newa/pull/105

Implemented in https://github.com/RedHatQE/newa/pull/105


Unable to compile cargo-leptos on M1 pro chip using nix-shell

Unable to compile cargo-leptos using nix shell on  a macbook M1 pro:
Error:
note: ld: framework not found SystemConfiguration
       >           clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
       >
       >
       > error: could not compile `cargo-leptos` (bin "cargo-leptos") due to previous error

On macos you need to manually provide some of the darwin only packages, in a process similar to the one described by this reddit post.
https://old.reddit.com/r/rust/comments/ptagz8/cargo_build_fails_ld_framework_not_found_security/

Closing, please reopen if you're still having this issue

I'm also hitting this error (with cargo-leptos-0.2.2) M1 Mac w/ Nix:
ld: framework not found SystemConfiguration
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)

I've tried adding the following to my flake without success so far:
buildInputs = [
  # for cargo-leptos
  darwin.apple_sdk.frameworks.Security
  darwin.apple_sdk.frameworks.SystemConfiguration
];

Still working on this and will follow up with another comment if I figure it out.


Configure IG to use cluster internal service address for RS

IG is acting as a Reverse Proxy to protect the RS (Resource Server).
All external access to the RS must go via IG, to achieve this there must be no Ingress that talks directly to rs.
Currently, this is not the case, there is an ingress: securebanking-openbanking-uk-rs. We would like to remove this Ingress but are unable to do so because it is being used by IG to access RS. This means that IG is calling out externally, traffic is leaving the cluster and entering again via the rs ingress (which is wrong)
Update IG to use the cluster internal service address for RS.

Note: for a customer deployment, IG may need to be able to talk to an RS running externally. For this case, we need to address: https://github.com/SecureApiGateway/SecureApiGateway/issues/789 which is scheduled for v2.

RS Ingress is also used by the functional tests in order to fetch test PSU data (such as accountIds).
An alternative way to get this data needs to be found so that we can remove the RS ingress.


🐛 Bug Report: Memos Identifier invalid

Reproduction steps
When I add the necessary information for memos from usememos.com it successfully directs to the server and completes the login, but upon returning to the memos server, it errors out with a message saying the value is not found in the claims field or is empty.
In the case of above,  it really doesn't matter what I put in there, I've tried name, profille, preferred_username and it returns the same value.
These are my settings and the required identifier from the app:

As this is the required field, I'm not really sure what the correct identifier for this would be.
This page gives some breakdown of the configuration for three services, but not this app yet. :)
https://www.usememos.com/docs/advanced-settings/sso
In every instance, it says to use the preferred_username which in this case doesn't work.
Expected behavior
It should pass the login auth to the memos app.
Actual Behavior
It actually returns to the app with this error.  In this case, I used openid as the identifier.

I think you've entered the wrong "user endpoint" URL. It should be https://<pocket-id>/api/oidc/userinfo.
Here is my configuration that is working:

Yup!  That worked!  Not sure how I missed it.  Thank you!


rewrites changes in firebase.json are not taken into account on localhost

I made changes in rewrites rules, it's work correctly remotely when its deployed but locally, I still have previous rules applied.
previous rules:
"rewrites": [
  {
    "source": "**",
    "destination": "/index.html"
  }
],

new rules:
"rewrites": [
  {
    "source": "/api/user{,/**}",
    "function": "getUserData"
  },
  {
    "source": "**",
    "destination": "/index.html"
  }
],

I have clear all caches, change browser, removed node_modules and run yarn, restart server many time, I still get the old configuration.
I use "react-scripts": "4.0.2", and yarn start with env var HTTPS=true on Linux

Can be closed, CRA is not responsible of Firebase configuration


Address FIXME comments

Address FIXME comments. Resolves #430. Resolves #431.

@tomvothecoder This is ready for review. I ran the unit tests and the complete run test.
A few FIXMEs remain; I didn't see a good way to fix them
$ git grep -in fixme
acme_diags/acme_diags_driver.py:290:            # FIXME: error: Module has no attribute "run_diag"
acme_diags/plot/__init__.py:24:        # FIXME: error: Module has no attribute "plot"
tests/system/test_diags.py:136:        # FIXME: "Type[TestAllSets]" has no attribute "results_dir"

Also, it looks like #434 changed how some of the plots look, so I followed the steps at https://e3sm-project.github.io/e3sm_diags/_build/html/master/dev_guide/testing.html#complete-run-test to update the expected images.


Is there any documentation for running infer through Docker

The "Getting started with Infer" lists Docker as the recommended way of installing Infer on Linux.
I had trouble installing infer from source in the past, so I wanted to jump at the opportunity to try it again.
But I'm not clear on how to actually run the program. You can of course run it in the Docker instance, but I can't access my project from in there.

You can mount a volume pointing to your project inside the Docker instance. See for instance #345, or the Docker documentation.


error when Logic table have the same name as Actual table .

i just use database sharding not table sharding, but when Logic table have the same name as Actual table, some error occurs
Caused by: java.sql.SQLException: Column name pattern can not be NULL or empty.

here is my config of yaml
shardingRule:
  tables:
   # same name as Actual table， but when i use ms_ds${1..2}.t_user1, it will be ok
   # but when i change table name in mysql to t_user1，then ms_ds${1..2}.t_user1 does not work either
    t_user:
      actualDataNodes: ms_ds${1..2}.t_user
      databaseStrategy:
        inline:
          shardingColumn: id
          algorithmExpression: ms_ds${id % 2 + 1}

      keyGeneratorColumnName: id

i think it may be a bug

Can you fill some necessary information with template below?

Bug Report
For English only, other languages will not accept.
Before report a bug, make sure you have:

Searched open and closed GitHub issues.
Read documentation: ShardingSphere Doc.

Please pay attention on issues you submitted, because we maybe need more details.
If no response more than 7 days and we cannot reproduce it on current information, we will close it.
Please answer these questions before submitting your issue. Thanks!
Which version of ShardingSphere did you use?
Which project did you use? Sharding-JDBC or Sharding-Proxy?
Expected behavior
Actual behavior
Reason analyze (If you can)
Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
Example codes for reproduce this issue (such as a github link).

@terrymanu
all my config, my  version is 3.1.0
dataSources:
  ds1: !!com.alibaba.druid.pool.DruidDataSource
    driverClassName: com.mysql.jdbc.Driver
    url: jdbc:mysql://<IP_ADDRESS>:13306/shop
    username: root
    password: root

  ds1_sl1: !!com.alibaba.druid.pool.DruidDataSource
    driverClassName: com.mysql.jdbc.Driver
    url: jdbc:mysql://<IP_ADDRESS>:13307/shop
    username: root
    password: root

  ds1_sl2: !!com.alibaba.druid.pool.DruidDataSource
    driverClassName: com.mysql.jdbc.Driver
    url: jdbc:mysql://<IP_ADDRESS>:13308/shop
    username: root
    password: root

  ds2: !!com.alibaba.druid.pool.DruidDataSource
    driverClassName: com.mysql.jdbc.Driver
    url: jdbc:mysql://<IP_ADDRESS>:13406/shop
    username: root
    password: root

  ds2_sl1: !!com.alibaba.druid.pool.DruidDataSource
    driverClassName: com.mysql.jdbc.Driver
    url: jdbc:mysql://<IP_ADDRESS>:13407/shop
    username: root
    password: root

  ds2_sl2: !!com.alibaba.druid.pool.DruidDataSource
    driverClassName: com.mysql.jdbc.Driver
    url: jdbc:mysql://<IP_ADDRESS>:13408/shop
    username: root
    password: root

shardingRule:
  tables:
    t_order:
      actualDataNodes: ms_ds${1..2}.t_order${1..3}
      tableStrategy:
        inline:
          shardingColumn: id
          algorithmExpression: t_order${id % 3 + 1}

      databaseStrategy:
        inline:
          shardingColumn: buyer_id
          algorithmExpression: ms_ds${buyer_id % 2 + 1}

      keyGeneratorColumnName: id

  defaultKeyGeneratorClassName: io.shardingsphere.core.keygen.DefaultKeyGenerator

  masterSlaveRules:
    ms_ds1:
      masterDataSourceName: ds1
      slaveDataSourceNames:
        - ds1_sl1
        - ds1_sl2
      loadBalanceAlgorithmType: ROUND_ROBIN

    ms_ds2:
      masterDataSourceName: ds2
      slaveDataSourceNames:
        - ds2_sl1
        - ds2_sl2
      loadBalanceAlgorithmType: ROUND_ROBIN

#props:
#  sql.show: true

mysql is

and i got the same error
Caused by: java.sql.SQLException: Column name pattern can not be NULL or empty.
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:545) ~[mysql-connector-java-6.0.6.jar:6.0.6]

Bug Report
For English only, other languages will not accept.
Before report a bug, make sure you have:

Searched open and closed GitHub issues.
Read documentation: ShardingSphere Doc.

Please pay attention on issues you submitted, because we maybe need more details.
If no response more than 7 days and we cannot reproduce it on current information, we will close it.
Please answer these questions before submitting your issue. Thanks!
Which version of ShardingSphere did you use?

3.1.0

Which project did you use? Sharding-JDBC or Sharding-Proxy?

Sharding-JDBC

Expected behavior

run without exception

Actual behavior

Caused by: java.sql.SQLException: Column name pattern can not be NULL or empty.

Reason analyze (If you can)

if the table in mysql has the same name as actualDataNodes it happens, i dont kown why

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

plz see below

Example codes for reproduce this issue (such as a github link).

plz see below

i have found this may cause the error in TableMetaDataLoader.java，the columnNamePattern arg is hardcode to null as below
connection.getMetaData().getColumns(catalog, null, actualTableName, null)
private List<ColumnMetaData> getColumnMetaDataList(final Connection connection, final String catalog, final String actualTableName) throws SQLException {
        List<ColumnMetaData> result = new LinkedList<>();
        Collection<String> primaryKeys = getPrimaryKeys(connection, catalog, actualTableName);
        try (ResultSet resultSet = connection.getMetaData().getColumns(catalog, null, actualTableName, null)) {
            while (resultSet.next()) {
                String columnName = resultSet.getString("COLUMN_NAME");
                String columnType = resultSet.getString("TYPE_NAME");
                result.add(new ColumnMetaData(columnName, columnType, primaryKeys.contains(columnName)));
            }
        }
        return result;
    }

em,-:(，i use a low version of mysql-connector-java, then everything is ok!


Verify vSphere Roles Have Required Permissions for CSI Driver

vsphere-csi-driver has updated their documentation to require some new permissions for the CSI driver. We should verify that our documented roles have the correct permissions.
Documentation here.
Specifically, we should verify we have Cns.Searchable StorageProfile.View.

We removed CSI driver, closing.


Ergonomics: errors could be better

Right now, if you make a Cargo.toml, and you mkdir src, and then you cargo build:
$ cargo build
  Compiling guessing_game v0.1.0 (file:/home/steve/tmp/guessing_game)
error: couldn't read src/guessing_game.rs: couldn't open file (no such file or directory (No such file or directory); path=src/guessing_game.rs; mode=open; access=read)

@wycats would like this to improve. :smile:

This is a pretty generic issue that isn't necessarily actionable any more. I think that we can definitely improve on particular errors here and there, but it would be good to open up sub-issues about these errors at this point I think.


Update snackbar position for tablets/desktops

Hi awesome libs, i'm using it for my apps
I saw you follow the guidelines very carefully, so i made this change to display the snackbar in the middle of the screen like in the web page(http://www.google.com/design/spec/components/snackbars-toasts.html#snackbars-toasts-specs, Tablet/desktop)
http://material-design.storage.googleapis.com/publish/material_v_3/material_ext_publish/0B57Y8yNEHsZPRWxUaHo3bGNUeXM/components_toasts_tabletdesktop1.png
Cheers

Hi i found an issue using the SnackbarManager,
After rotate a device while the snackbar is displaying , make the snackbar detached, but when try to show a new one (using the SnackbarManager) the isShow and !isDismissing return true, so the show method never fired cos replace the current one, but is not there

@gedu you are right, good catch. Will post it as an issue. Thanks!


update

Docs Build status updates of commit 30f9bfd:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

dynamics-gp/installation/email-troubleshooting-guide.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Resizing through largest breakpoint kills animation

At about 1025px (the widest breakpoint) the animation breaks. The invisible arrows reappear as if it wasn't animated at all. Test case uploaded to slack.
Browser: Chrome on Mac.

Not sure that this is still an issue. Closing.


ENH: Avoid unnecessary work with missing data.

Coverage increased (+0.009%) to 86.139% when pulling<PHONE_NUMBER>06f0173a67650f3f5f5177df4eea3f on zero-means-zero into 1984d13c2f557c0e07ec8cee58971455f8a3f7ea on master.

Changes Unknown when pulling 972f05b8f22623dce05ce20294c3f4ba6cbbd1a1 on zero-means-zero into ** on master**.

Coverage increased (+0.01%) to 86.141% when pulling 972f05b8f22623dce05ce20294c3f4ba6cbbd1a1 on zero-means-zero into 7fe1a56730bb36c3c12eeeffe5c69285f927d60a on master.

Coverage increased (+0.01%) to 86.141% when pulling 972f05b8f22623dce05ce20294c3f4ba6cbbd1a1 on zero-means-zero into 7fe1a56730bb36c3c12eeeffe5c69285f927d60a on master.

Coverage increased (+0.01%) to 86.141% when pulling 972f05b8f22623dce05ce20294c3f4ba6cbbd1a1 on zero-means-zero into 7fe1a56730bb36c3c12eeeffe5c69285f927d60a on master.

Coverage increased (+0.01%) to 86.141% when pulling 972f05b8f22623dce05ce20294c3f4ba6cbbd1a1 on zero-means-zero into 7fe1a56730bb36c3c12eeeffe5c69285f927d60a on master.

Coverage increased (+0.01%) to 86.141% when pulling 972f05b8f22623dce05ce20294c3f4ba6cbbd1a1 on zero-means-zero into 7fe1a56730bb36c3c12eeeffe5c69285f927d60a on master.


BitNet model outputs repetitive gibberish ('Breis') regardless of input during text generation

Problem: The model generates repetitive, nonsensical outputs like "Breis" regardless of the input provided. This happens even with different generation settings (e.g., temperature, top_k, top_p).
from transformers import AutoModelForCausalLM, AutoTokenizer
Load the model and tokenizer from Hugging Face
model = AutoModelForCausalLM.from_pretrained("1bitLLM/bitnet_b1_58-3B")
Loading checkpoint shards:   0%|          | 0/3 [00:00<?, ?it/s]
from transformers import AutoConfig
Load model configuration
config = AutoConfig.from_pretrained("1bitLLM/bitnet_b1_58-3B")
print(config)
LlamaConfig {
"_name_or_path": "1bitLLM/bitnet_b1_58-3B",
"architectures": [
"BitnetForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"bos_token_id": 1,
"eos_token_id": 2,
"head_dim": 100,
"hidden_act": "silu",
"hidden_size": 3200,
"initializer_range": 0.02,
"input_bits": 8,
"intermediate_size": 8640,
"max_position_embeddings": 2048,
"mlp_bias": false,
"model_type": "llama",
"num_attention_heads": 32,
"num_hidden_layers": 26,
"num_key_value_heads": 32,
"pad_token_id": 32000,
"pretraining_tp": 1,
"rms_norm_eps": 1e-05,
"rope_scaling": null,
"rope_theta": 10000.0,
"tie_word_embeddings": true,
"torch_dtype": "float16",
"transformers_version": "4.45.1",
"use_cache": true,
"vocab_size": 32002,
"weight_bits": 1
}
from tokenization_bitnet import BitnetTokenizer
Load the custom tokenizer
tokenizer = BitnetTokenizer(
vocab_file="bitnet_tokenizer/tokenizer.model",
special_tokens_map_file="bitnet_tokenizer/special_tokens_map.json",
tokenizer_config_file="bitnet_tokenizer/tokenizer_config.json",
unk_token='',
bos_token='',
eos_token='',
)
Example input for inference
input_text = "?"
inputs = tokenizer(input_text, return_tensors="pt")
Perform inference
outputs = model.generate(**inputs, max_length=20, temperature=0.7, top_k=50, top_p=0.9)
print(tokenizer.decode(outputs[0]))
The output:
? suppis Breis Breis Breis Breis Breis Breis Breis Breis

I have the same issue.

The listed models are "proof-of-concept" at most, they are not meant for real use, someone would need to train a new model from beginning with BitNet in mind for coherent output.

The listed models are "proof-of-concept" at most, they are not meant for real use, someone would need to train a new model from beginning with BitNet in mind for coherent output.

  I will see about training it potentially.

As others have said, this isn't a problem with BitNet.


Add D-Bus API for configuring NTP servers of systemd-timesyncd

Add new time package that currently provides methods that configure NTP and FallbackNTP options of systemd-timesyncd service. The service is restarted when the values are changed. Example usage through gdbus:
gdbus call --system  --dest io.hass.os
--object-path /io/hass/os/Time/Timesyncd
--method org.freedesktop.DBus.Properties.Set
io.hass.os.Time.Timesyncd NTPServer
"<['pool.ntp.org', 'time.google.com']>"
A lineinfile helper has been implemented to adjust Systemd unit files, the inspiration comes from Ansible's module of the same name, although the behavior is slightly different (hopefully still quite intuitive).
In the future, the time package could also handle system timezone and other time-related tasks.

@coderabbitai full review


Bump Maven Wrapper from 3.8.6 to 4.0.0-alpha-2

Bumps Maven Wrapper from 3.8.6 to 4.0.0-alpha-2.
Release notes of Maven 4.0.0-alpha-2 can be found here:
https://maven.apache.org/docs/4.0.0-alpha-2/release-notes.html

@guylabs given you are already familiar with some of the Maven 4 incompatibilities, would you mind taking a look what is going on?
Note that we will not upgrade to any alpha version in this repo anyway, but it might still be worth to explore what is going on.

Yes we have our set of nightly tests where we do test all against Maven 4.x against the Gradle Enterprise Maven extension. But in this case a external plugin is failing and is not compatible with Maven 4.x yet:
Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.4.0:shade (default) on project common-custom-user-data-maven-extension: Execution default of goal org.apache.maven.plugins:maven-shade-plugin:3.4.0:shade failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-shade-plugin:3.4.0:shade: java.lang.NoSuchMethodError: org.apache.maven.model.Plugin.getGoals()Ljava/lang/Object;

Therefore if you are fine with it, I'd close this pull request and do not upgrade to it until they are in release candidate phase with Maven 4.0 and until the plugins used in this project are compatible too.

@runningcode Can someone on the Solutions team please check with the shade-plugin project to see if the issue is known and being addressed?

The deprecated usage of the getGoals() plugin was removed in the shade plugin here: https://github.com/apache/maven-shade-plugin/commit/8177c6b627c0098459446084ad2df00b9f108ea7
It was released in 3.4.1 of the shade plugin.


Can the "Applies to" be updated to include Windows Server 2019

This page also applies to Server 2019.
Also, should Windows 8 removed?

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

ID: 7dc50ab2-5b70-2b78-5345-cb261071fcc0
Version Independent ID: c081e16d-cf9d-f9a7-e86c-80a38e33d211
Content: Hyper-V Virtual Machine Connection
Content Source: WindowsServerDocs/virtualization/hyper-v/learn-more/hyper-v-virtual-machine-connect.md
Product: windows-server
Technology: compute-hyper-v
GitHub Login: @KBDAzure
Microsoft Alias: kathydav

As long as the page documentation still applies to Windows 8.1 and Windows 8, I don't think it should be removed before Windows 8.1 and Windows 8 are no longer supported. There might still be valid Enterprise use of those Windows versions out there.

@doctordns : Unless there is anything else you would like to change to complete a resolution of this issue, I think we can safely say that this ticket is resolved.

#sign-off

So far as I can see, this is not resolved, in that Server 2019 has not been added?

Fair enough. Opening a new PR to resolve that issue.

Should Server 2022 be added?

Should Server 2022 be added?

Way too early, I don't think it will be added before the version is publicly released to everyone.

The reason I ask is that Insiders Builds now have the Server 2022 branding as 20H1.

I would not count on information being added before the release (RTM) version has been published, unless you are referring to Insiders Preview content pages.


Investigate using bower / yeoman and how that would interact with this folder structure

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/8206409-investigate-using-bower-yeoman-and-how-that-would-interact-with-this-folder-structure?utm_campaign=plugin&utm_content=tracker%2F1241729&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1241729&utm_medium=issues&utm_source=github).

I do this in a not-so-automated way.
For a start, I keep the dependencies in a bower.json file.
For less/css I just include things directly from bower_components/..../.../abc.less into my site.less file.
For javascript, I add bower_componets paths to the javascript concat.
See my theme here: https://bitbucket.org/burnbright/bootstrap-boilerplate-theme/src

Fixed in Helix

bower install foo

We'd manually update the gruntfile with the files we need


Fix name of function in docs

Incorrect function name given in https://www.finalelua.com/docs/mixin/FCMCtrlCheckbox
I assume the website docs will regenerate after this is merged, right?

They should.


Redirect back instead of (403) in middleware

Just modified to redirect back instead of throwing (403) error.

In my opinion, you can't just modify the behaviour of this package. Aborting with 403 is the proper response. If you wanted to redirect to the previous page, you can catch the exception thrown by the abort() function.

But do we have to catch the exception in the exception handler ?
Is there no way I can pass a third parameter like we do here..
Entrust::routeNeedsRole('admin/advanced*', 'owner', Redirect::to('/home'));

@Zizaco what do you advice on the above.. thanks


undefined is not a function for validation

Love this plugin, everything works well except the validation part. It works perfectly in the demo but not in my code for some reason.
I get Uncaught TypeError: undefined is not a function bootstrap-wizard.js:273
line 273 is:
var vret = windowv;
any reason anyone can think of why this could be happening?

Hi @jamiehall84 you are facing this issue as you have not written validation function mentioned in form element. Code is trying to find that function and is not able to find that function so it is raising "TypeError..."
For example:
<input type='text' ... data-validate='functionToValidate'>
if you don't write function functionToValidate then it will raise error.
Try it and let me know


sqlx::query_file_as! macro hashing broken on Ubuntu 22.04.1 LTS

Bug Description
A clear and concise description of what the bug is.
When a .sql file is saved from a linux machine, the sqlx::query_file_as! macro stops working and throws
'failed to find data for query...'
[..]
'note: this error originates in the macro $crate::sqlx_macros::expand_query (in Nightly builds, run with -Z macro-backtrace for more info)'
line 122: https://github.com/launchbadge/sqlx/blob/d7277f41ebcaab1072da74efc163b40b47ce63be/sqlx-macros/src/query/data.rs
Minimal Reproduction
If I pull from a branch where a MacOs user has saved the file, it will compile just fine.
As soon as I save the .sql file from a linux machine (Nano, Vim, Nvim, Code), even without making an actual change to the sql, the hashing will break and the code will no longer compile.
Info

SQLx version: 0.6.1
SQLx features enabled:  ["offline", "postgres", "runtime-tokio-rustls", "chrono", "json", "uuid"]
Database server and version: Postgres 13.4
Operating system: Ubuntu 22.04.1 LTS
rustc --version: 1.62.1

Likely a similar issue to #1494 and I described a workaround there: https://github.com/launchbadge/sqlx/issues/1494#issuecomment-943667930

@abonander I've seen that thread but we're not hashing using git.
For me in place of the hash I would just see the contents of the sql itself in the error message.

The ultimate problem is likely that something is changing the line endings in the .sql file, it may be Git or the editor you're using.

I added a .gitattributes file following the instructions of #1494 but unfortunately doesn't seem to fix the issue.
Do I need extra steps once the file is added?
I've tried prepare (won't work because fails) I've tried git add --renormalize . (nothing happens)

Try using a tool to compare the line endings of the file on Mac vs Linux.

@abonander
The line endings are the same "i/lf    w/lf  "
And they are actually the same on both the compiling branch the non-compiling branch.
As such is it possible that eol is not the issue?

Are they the exact same byte for byte?

@abonander
Using the od -c -b  tool on linux
I can see that the bytes on both branches are the same, yes.
Here is an example of a line in bytes. The pattern being \n followed by either 2x040 or 4x040 depending on the line.

0000000   w   i   t   h       t   s       a   s       (  \n           s
167 151 164 150 040 164 163 040 141 163 040 050 012 040 040 163
0000020   e   l   e   c   t  \n                   (   u   n   n   e   s
145 154 145 143 164 012 040 040 040 040 050 165 156 156 145 163

@abonander
here is the error I get if I run it without the Offline mode:

error[E0308]: mismatched types
  --> routes/admin/src/payment_details.rs:27:27
   |
27 |       let payment_details = sqlx::query_file_as!(
   |  ___________________________^
28 | |         PaymentDetailResponse,
29 | |         "sql/admin/payment_details.sql",
30 | |         store_id,
31 | |         p
32 | |     )
   | |_____^ expected enum `std::option::Option`, found struct `std::string::String`
   |
   = note: expected enum `std::option::Option<std::string::String>`
            found struct `std::string::String`
   = note: this error originates in the macro `$crate::sqlx_macros::expand_query` (in Nightly builds, run with -Z macro-backtrace for more info)
help: try wrapping the expression in `deliveries::_::_serde::__private::Some`
   |
605|         deliveries::_::_serde::__private::Some($crate::sqlx_macros::expand_query!(record = $out_struct, source_file = $path, args = [$($args)*]))
   |         +++++++++++++++++++++++++++++++++++++++                                                                                +

error[E0308]: mismatched types
  --> routes/admin/src/payment_details.rs:27:27
   |
27 |       let payment_details = sqlx::query_file_as!(
   |  ___________________________^
28 | |         PaymentDetailResponse,
29 | |         "sql/admin/payment_details.sql",
30 | |         store_id,
31 | |         p
32 | |     )
   | |_____^ expected enum `std::option::Option`, found `f64`
   |
   = note: expected enum `std::option::Option<f64>`
              found type `f64`
   = note: this error originates in the macro `$crate::sqlx_macros::expand_query` (in Nightly builds, run with -Z macro-backtrace for more info)
help: try wrapping the expression in `deliveries::_::_serde::__private::Some`
   |
605|         deliveries::_::_serde::__private::Some($crate::sqlx_macros::expand_query!(record = $out_struct, source_file = $path, args = [$($args)*]))
   |         +++++++++++++++++++++++++++++++++++++++

We ended up just removing the file queries and sticking with query_as().

I fixed this error by upgrading sqlx-cli to 0.6.3 (through cargo install sqlx-cli). Might be related to https://github.com/launchbadge/sqlx/issues/2101


Add JMS queue/connection listeners

Add job listeners to close a JMS queue/connection at the end of a job.

implemented in 1d9a865a15ada2acc70ef5aaaf9fc12a36cc2151


The Sources of the component eclipse/birt/f4668e... are broken

In the UI, the detail view of  eclipse/birt/f4668e5d39c486406eca158527b4d7ff511d6a1e only lists one single file LICENSE, although in the corresponding git commit and the downloadable sources are more files, e.g. ./pom.xml.
Is this only a UI bug?
Is there a way to curate sources, e.g. if the maven sources were empty or incomplete?
Screenshot:

Edit:
also in the Current definition.yml is only this file in the files: section:

@dabutvin i think this is a service issue, since the file list is returned from the APIs.
Thoughts?

@dabutvin do you have any feedback on this?


docker cp autocompletion doesn't support both usage formats

Official docker cp documentation
In the file docker/contrib/completion/zsh/_docker line 616 the autocomplete declaration only supports the following docker cp usage format:
docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-

It would be awesome if it also supported the other format of:
docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH

It's annoying that the autocompletion doesn't work when you want to copy a file to a running container. I don't think this would be overly complicated to solve for someone who understands zsh autocompletion.

ping @sdurrheimer PTAL.

https://github.com/docker/docker/issues/17029#issuecomment-149025245
I'm still not sure how to do that properly.

@sdurrheimer Is there a way to compute a combined list and use that in completion?

I know that you can build two separate contexts using tags, this is how my scp autocomplete works:

The issue, I think I don't know haha, is that the current autocompletion is building two separate contexts for each situation?
(cp)
    local state
    _arguments $(__docker_arguments) \
        $opts_help \
        "($help -L --follow-link)"{-L,--follow-link}"[Always follow symbol link]" \
        "($help -)1:container:->container" \
        "($help -)2:hostpath:_files" && ret=0
    case $state in
        (container)
            if compset -P "*:"; then
                _files && ret=0
            else
                __docker_complete_containers -qS ":" && ret=0
            fi
            ;;
    esac
    ;;

My Reference How to build zsh autocomplet.
I think your can just use something like the example for _alternatives for this situation to build the two context:
local -a options
options=$(docker ps --format "{{.Names}}")
_alternative "args:docker containers:($options)" 'files:filenames:_files'

I'm not sure but maybe that helps?

Combined list is not a problem. What is more complicated is to keep the state that the first argument will be a contrainer path or a host path in order to complete the second argument.
I could makes suggestion for both all the time, but this would let people do docker cp container:path container:path which is incorrect.

If we are not worried about the constrained list being the problem then we should only have to add the proper term inside the "($help -)" to make the command mutually exclusive. From the docs:

If the name given for one of the mutually exclusive sets is of the form ‘(name)’ then only one value from each set will ever be completed; more formally, all specifications are mutually exclusive to all other specifications in the same set. This is useful for defining multiple sets of options which are mutually exclusive and in which the options are aliases for each other.

They have an example on there as well that looks like it might solve this problem. I tried to figure out how to do this on my own but in the examples in the docs they have actual command line arguments like '-c' and '-d' which makes ours a bit more tricky since we are trying to make the arguments mutually exclusive based on their tags. Does that seem like it might be in the right direction?

Came across this problem in Mac Terminal bash, and file path autocompletion in ssh scp works well, wondering if this can be a reference to the solution here?

Let me close this ticket for now, as it looks like it went stale.


[BUG]: error TS1127: Invalid character in MenuService

I'm submitting a

[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Enhancement
[ ] Feature request
[ ] Documentation issue or request

Description
Received the following error :
ERROR in ../node_modules/ngx-editor/lib/modules/menu/menu.service.d.ts:6:5 - error TS1127: Invalid character.   #private;
I was following the instructions in the ReadMe and simply installed the package and imported NgxEditorModule in the app Module.
import { NgxEditorModule } from 'ngx-editor';

and got the above error.
Version Information
ngx-editor: 7.0.0 (received the same error on v6+)
angular: 9.0.0

Browser

[x] Chrome - 88.0.x
[ ] Mozilla Firefox - x.x.x
[ ] Opera - x.x.x
[ ] Microsoft Edge - x.x.x

NOTE: Replace x.x.x with your version information

What is the typescript version you have? You might want to check in your compiler options for private fields.
See https://www.typescriptlang.org/docs/handbook/classes.html#ecmascript-private-fields

I have also removed them in v8.0.0-beta.7. Feel free to continue the discussion if you have more question or need any help.

@sibiraj-s  v8.0.0-beta.7 worked for me! Thanks!

Glad that helped.

@sarrasarra1. Noticed an issue in OpenBase. Just letting you know that this issue is fixed.


Fix blank name for document symbol

Motivation
Closed https://github.com/Shopify/ruby-lsp/issues/1613

Implementation

Automated Tests

Manual Tests

I'll update the other occurrences once @vinistock verifies the approach.

@vinistock saw your comment on the issue, will switch to that.

Not working as expected, setting back to draft for now.

Ah, it's related to the selection range... think I have a fix.

On second thoughts, this is a bit awkward to handle and I don't think it's worth the effort to perfect the behaviour for incomplete syntax in all situations, as long as we're not causing errors.


Merrymellow Marsh should have two secondary NPCs with meaningful character development

Add two more secondary NPCs with meaningful character development (not the four employees), for a total of two.

Closing due to removal of freeroam mode (#1257)


secondary development for non-edu versions

We're interested in the fantastic open-source work you've done, but we're considering purchasing Go2 Air. However, we're unsure if there's the capability for secondary development on Air. The official customer service mentioned that non-education versions don't provide development interfaces. Have you tried developing on Air? If we use your repository, can it solve this problem?

Hi, it depends what you want to develop? Can you provide more details on your product?--Отправлено из мобильной Яндекс Почты20.04.2024, 18:23, "Polaris" @.***>:
We're interested in the fantastic open-source work you've done, but we're considering purchasing Go2 Air. However, we're unsure if there's the capability for secondary development on Air. The official customer service mentioned that non-education versions don't provide development interfaces. Have you tried developing on Air? If we use your repository, can it solve this problem?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

I want to develop AI-related applications based on the official APIs provided.

from the hardware side, there is not so big difference. EDU has foot sensors, an audio module (bi-directional), and a Nvidia jetson. Pro doesn't have a jetson and foot force. Air does not have a jetson, foot force, and an audio module. Other things are the same.  From the software side. the difference between official and non-official ros2 SDK is webrtc protocol, in our case we use it, but it has some limitations with speed (twice lower than dds on the original SDK) and it does not have low_level control (because it was not implemented on webrtc).

Thanks!

Thank you very much for your response. Our specific AI project involves indoor mobile navigation. Based on high-level motion control, can the AI navigate stairs at different heights?

Thank you very much for your reply. We're excited about the SDK features of the go2's Air, as we don't intend to delve into low-level motion development (down to the angle of leg motors). We're focusing on large-scale models and reinforcement learning in embodied intelligence (indoor Vision Language Navigation). We'd like to ask you again: Can the air navigate stairs at different heights based on high-level motion control? We appreciate your help tremendously.

Thank you very much for your reply. We're excited about the SDK features of the go2's Air, as we don't intend to delve into low-level motion development (down to the angle of leg motors). We're focusing on LLMs and reinforcement learning in embodied intelligence (indoor Vision Language Navigation). We'd like to ask you again: Can the air navigate stairs at different heights based on high-level motion control? We appreciate your help tremendously.

ofc it can, Air is a great product, also I have developed a sim env https://github.com/abizovnuralem/go2_omniverse, where you can test your algorithms. It will be an easy start for you with these two repos.

Very impressive sim env! does this works with latest unitree firmware? the one with the "extra agile" mode?

yes


1.0.0 no where to be found on MVN repos

Seems like I forgot to push it from staging to release repo :(
I fixed it. 1.0.0 should be in the public mvn repo in a few minutes.


Community page refactor

Proposed changes

Info stats and footer refactor for Community Page
Litmus API Docs added to Sidebar
All the occurrences of Ubuntu font removed

Summarize your changes here to communicate with the maintainers and make sure to put the link of that issue
Types of changes
What types of changes does your code introduce to Litmus? Put an x in the boxes that apply

[x] New feature (non-breaking change which adds functionality)
[ ] Bugfix (non-breaking change which fixes an issue)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation Update (if none of the other choices applies)

Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

[x] I have read the CONTRIBUTING doc
[ ] I have signed the commit for DCO to be passed.
[ ] Lint and unit tests pass locally with my changes
[ ] I have added tests that prove my fix is effective or that my feature works (if appropriate)
[ ] I have added necessary documentation (if appropriate)

Dependency

Please add the links to the dependent PR need to be merged before this (if any).

Special notes for your reviewer:

@whitetiger1399 PTAL https://github.com/litmuschaos/litmus/pull/3039#discussion_r673860976 and https://github.com/litmuschaos/litmus/pull/3039#discussion_r673895221 also https://github.com/litmuschaos/litmus/pull/3039#discussion_r673940258