Manually Adding Directories

Is it possible on the 'Ready To Connect' to allow users to manually add their League directories. Would be useful for people who saved previous versions of the folder to access old league files.

The "Ready To Connect" window is a formality. The purpose of this window is to enable a config option to enable the Replay API in the game client. You can manually enable this config option and when the game client starts, League Director should just connect to the game client automatically.
You can see here, the window adds a list of game clients that listen for an itemChanged event. The item change event triggers the setGameEnabled on click. You can find the method definition here. It just adds EnableReplayApi=1 to Game.cfg under the [General] category. Example:
C:\Riot Games\League of Legends\Config\Game.cfg
[General]
...
EnableReplayApi=1

The "Ready To Connect" window is a formality. The purpose of this window is to enable a config option to enable the Replay API in the game client. You can manually enable this config option and when the game client starts, League Director should just connect to the game client automatically. You can read more about this here: https://developer.riotgames.com/replay-apis.html
You can see here, the window contains a list of game client items that listen for an itemChanged event. The item change event triggers the setGameEnabled on click. You can find the method definition here. It just adds EnableReplayApi=1 to Game.cfg under the [General] category. Example:
C:\Riot Games\League of Legends\Config\Game.cfg
[General]
...
EnableReplayApi=1

Well more like it in the means of viewing .rofl files in older patches...
Example of something like copying a 8.23 League folder and saving a .rofl replay file under \deploy. SkinSpotLight supports this as it has an option to select if user is viewing an older patch, however League Director doesn't detect if using a seperate League folder. Hence, why I was wondering if there was a way to select a different directory in the case where it's looking for the "League of Legends.exe" from the process.

I understand what you are doing, and it is probably easy enough for you to fix this by just making sure your old copies of the game all have EnableReplayApi=1 set in their game.cfg files.
It does not matter if league director does not find your old copies of the game in the welcome screen, as it will automatically connect regardless once the replay starts up provided you have configured the api on.
Note that the API is only available from patch 9.4 onwards so older version of the game won't work at all.

I understand what you are doing, and it is probably easy enough for you to fix this by just making sure your old copies of the game all have EnableReplayApi=1 set in their game.cfg files.
It does not matter if league director does not find your old copies of the game in the welcome screen, as it will automatically connect regardless once the replay starts up provided you have configured the api on.
Note that the API is only available from patch 9.4 onwards so older version of the game won't work at all.

Ah got it. thanks for the clarification!

Latest version has better detection of game clients, provided you have launched the game before it should find it. Let me know if this is not the case (and where you have copied the game install to).
https://github.com/RiotGames/leaguedirector/releases/latest


Modifier key states are inverted in WASM demo

Describe the bug

In the raw input display of the web egui demo app, the states of the modifier keys are inverted. When a key is first pressed, its state remains false and then changes to true when it is released. It remains in this inverted mode until a different key is pressed, at which point the modifier display its correct state until it changes again. This behavior is not observed when running the demo app locally on Linux.
To Reproduce
Steps to reproduce the behavior:

Go to https://www.egui.rs/#demo
Open the Backend tab and select the Inspection window
Open the Input > Raw input collapsible
Press the modifier keys (Ctrl, Alt, Shift, Cmd) with and without other keys and observe the displayed states

Expected behavior

The Modifiers UI should display true when a key is pressed and false when it is not, as it does in the desktop demo.
Screenshots

Desktop (please complete the following information):

OS:  Fedora Linux 37
Browser  Firefox
Version  109.0.1

Additional context

As mentioned, I could not reproduce the issue locally by building for desktop. I only see it in the web demo, which I am not able to build myself. But I don't see any commits addressing that since the last deployment of the web demo in 1384fa3287afdbf0c9993b015d03fa56258d8156, so I am opening the issue so someone more experienced with wasm can take a look at it.

I can't reproduce in my browser.
You should be able to build the web demo by running sh/build_demo_web.sh. You can serve it with sh/start_server.sh.

So I built the wasm app from master and I have the same behavior as the online demo. But I also tested on a Windows machine (also with Firefox 109.0.1, as well as Edge) and it's working normally. It also works fine on a Debian 11 virtual machine with Firefox 102.7.0esr. However, I tried on a Fedora virtual machine (on a different computer) and got the same issue. Then I tried on Chromium 109 on the same Fedora VM and it worked normally. So apparently this a problem with Firefox 109 specifically on Linux. It's probably not egui's fault, so I think this issue can be closed.

It would probably be good to file an issue with Firefox though


Processing CI events for Community edition.

Processes CI events for Community edition. Hits Hasura local instance rest API (one per mutation). Since Hasura rest is very strict about params (all params need to be consumed) there are some rest endpoints that may seem redundant (e.g., cicd_build_with_start_end and cicd_build for build entity with and without start/end time).

@tovbinm to prevent an explosion of rest endpoints for all the various ways that arguments might be supplied, how do you feel about the CLI being more restrictive about required inputs to limit the number of necessary endpoints in Hasura?

@ypc-faros  Please update README on how to use with Faros Community Edition + refer to Faros CE GitHub repo


Add a persistence provider that abstracts persistence across server/ client

So is this basically an abstraction over the serializer component?

No, over react cookie + either localStorage (client) or session (server)

@lemonmade is this covered by the universal provider pattern or something else all togther?

I don’t think we need this much nowadays


"aggregated" granularity

There are four Beacon granularities: boolean, count, aggregated and record, where aggregated is supposed to return "summary, aggregated or distribution-like responses".
https://github.com/ga4gh-beacon/beacon-framework-v2/blob/efed363fd3624aa58aeaa895abbff149cdf47bcc/common/beaconCommonComponents.json#L113
But it's not clear how to implement the aggregated granularity, since it's mentioned nowhere else in the spec, and a typical Beacon endpoint has three response types rather than four, which map to the boolean, count and record granularites. See for example, the individuals endpoints:
https://github.com/ga4gh-beacon/beacon-v2-Models/blob/main/BEACON-V2-Model/individuals/endpoints.json#L273-L276

AFAIK aggregated is a representation for Boolean OR count responses; both represent "aggregated" responses on different levels.
There is an argument for having some indication that a given Beacon only can deliver aggregate responses, or that a user only can access aggregate style Beacons (security ...). However, this information is already provided if the Beacon indicates a maximum level of count responses.
A different information level for an "aggregate" label would be for the description of the underlying dataset(s), where frequently only aggregate data (e.g. allele frequencies) exist so that no individual information is accessible per se (apart from theoretically possible re-identification attacks using allelic profiling).
My suggestion would be to

remove the aggregated option which seems unnecessary/irritating in this context
think about adding some flag / parameter for the aggregation status of a Beacon and its collections (datasets...), maybe:

aggregatedDataUse: ALL | SOME | NONE  => but this is very open for discussion


insta scrape save?

Hi! i downloaded and ran a few cases but where does the images save ? also, it was stalling in the command line and would not come to completion after 3 hours. is it in a queue or if the hashtag is like millions of post how long should i expect to wait? i tried with a 13 post hastag and it stalled the same for quite a while.
Thanks!
Tayler

Hey @taylerpauls I haven't had the time to update the gem in a bit so some functionality may be broken. I'll see if I can update some of it using some open PRs later tonight if I have the time. It's been a while. As for saving the images, theres no direct way to do it in the gem but you could easily download the images from the returned objects using ruby. I'll leave this issue open and will respond asap when I check out what's broken.


FALCON-1107: Move trusted extensions processing to server side

Ignore any documentation issues as it will be addressed in https://issues.apache.org/jira/browse/FALCON-1106. Thanks!

@sowmyaramesh  :+1: for the patch. It is long one and I did a couple of sweeps through it.  Thank you for porting Falcon-1880 patch to server side extensions.
Please leave a comment describing the end2end testing you did for future reference.

@bvellanki :
This request has the unit tests. I have also done manual testing to ensure it works.
FALCON-1789 implements the REST API and CLI support for extensions and Ying will be uploading the patch soon. She has confirmed that REST API's and CLI's added works. IT tests should be added as part of FALCON-1789. Thanks for the review!

Thanks @sowmyaramesh.   I think we need to document making sure people upgrading are fully aware of the changes in terms of externally visible changes.
+1

@vrangan : I keep that in mind when I update the documents. Thanks!


Migrate to Terraform 0.12.x

@spider-network thanks for your PR. At this time, we need to wait until we add terratest. We're only release 0.12 (HCL2) modules that have testing. We're actively upgrading one module at a time. @aknysh can maybe take a look at this next week.
https://github.com/search?q=topic%3Ahcl2+org%3Acloudposse&type=Repositories

thanks @spider-network
we'll convert the module to 0.12 next week

addressed in https://github.com/cloudposse/terraform-aws-documentdb-cluster/releases/tag/0.3.0


First-class support for comprehensive runtime validation

mobx-keystone is opinionated about structuring data in a tree. This strong assumption enables many useful features such as references, snapshots etc. for which mobx-keystone has first-class support and which makes it such a great library. In my opinion, one feature is missing though: runtime validation of models which collects all errors rather than throwing an exception at the first encountered error.
Validation of user input is a common task in web development. When users enter malformed or otherwise invalid data, it is important to present them with feedback in order to help them correct their mistakes. Libraries such as mobx-keystone and mobx-state-tree offer runtime type checking inspired by io-ts and its predecessors, which follow the principle of domain-driven design. mobx-keystone's runtime types are great as guards against invalid data, but an exception is thrown at the first encountered error which means they cannot be used to build a comprehensive feedback system. But I think there is only a small gap between the current runtime types and ones that can collect all errors.
To give an example: Let's say a model prop must be an integer in the range 0-10 in order to be valid. Right now, I could create a refinement of the integer type to validate the value range. This prop can be edited by a user using a form field, and let's assume the user enters a non-integer number or an integer outside this range. I wouldn't want the app to throw an exception. Instead, I'd like to get an error message that tells the user to enter an integer in the range 0-10. This could be achieved by enforcing a number-typed value (where an exception is thrown if a non-number value is set) while the semantic constraints (integer in the range 0-10) are validated gracefully.
If you (@xaviergonz, and of course also others) are interested in this feature, I'd like to discuss ideas how it could be implemented in mobx-keystone.
I currently see the following requirements to make this sufficiently generic in order to cover a variety of use cases:

Error messages should be customizable.
The data structure of an error should be customizable to support for example:

error codes
error levels
additional structured error information
...

The relationship of errors (using a union type leads to disjunctive errors) should be retained in the error collection in order to be able to present users with correct feedback about alternative errors.
Error information should be aggregated towards the root of the tree, so that the root model contains the complete collection of errors. This is useful, e.g., to determine whether a state tree contains any errors at all and to display all errors in a state tree in a dedicated view (e.g. think of VS Code's error panel).
The path of the error in the state tree (relative to the model from where the error collection of the subtree is accessed) should be available.
It should also be possible to validate computed properties and volatile state of a model.

I think there are a couple of design decisions to be made:

Is it necessary to create a new set of runtime types that collect errors instead of throwing exceptions, or can the current ones be extended?
How would the collected errors be exposed? As a builtin computed model property (e.g. model.$errors similar to model.$ with regard to naming)?
How to make the errors customizable (as mentioned above)?
How to propagate errors from a parent model to its children models? Imagine a composition of models where a parent model adds additional constraints to (some of) its children. When a child model is used in the context of a parent model, the validation errors of the child model that are added by the parent model should also be included in the error collection of the child model.
...?

What do you think? If you're interested in having this feature added to mobx-keystone, I already have some experience with the design of some of the parts that I'd be happy to contribute to the discussion.

Thanks for the proposal. I'll take a look at it this weekend.

Let me start off with a couple of thoughts.

The relationship of errors (using a union type leads to disjunctive errors) should be retained in the error collection in order to be able to present users with correct feedback about alternative errors.

I think errors and their relationships could be represented along the lines of this:

enum TypeCheckKind {
  Error,
  And,
  Or
}

interface TypeCheckError {
  readonly kind: TypeCheckKind.Error
  readonly path: Path
  readonly expectedTypeName: string
  readonly actualValue: any
  readonly custom: any // How to properly deal with custom error data?
}

interface TypeCheckExpression {
  readonly kind: TypeCheckKind.And | TypeCheckKind.Or
  readonly args: ReadonlyArray<TypeCheckError | TypeCheckExpression>
}

Most errors have the TypeCheckKind.And relationship, but errors combined by the or type have the TypeCheckKind.Or relationship.

Error information should be aggregated towards the root of the tree, so that the root model contains the complete collection of errors. This is useful, e.g., to determine whether a state tree contains any errors at all and to display all errors in a state tree in a dedicated view (e.g. think of VS Code's error panel).
How to propagate errors from a parent model to its children models? Imagine a composition of models where a parent model adds additional constraints to (some of) its children. When a child model is used in the context of a parent model, the validation errors of the child model that are added by the parent model should also be included in the error collection of the child model.

Since parent models can impose additional constraints on their children, the complete set of errors is only available at the root of the state tree in the general case. But I'd like each model to have access to its complete set of errors, some of which may be coming from a parent model. Perhaps a context could be used:
const errorContext = createContext<TypeCheckError | TypeCheckExpression | undefined>()

Whenever a model is in the context of errorContext (i.e. errorContext.getProviderNode(this) !== undefined), it means there is a parent model which provides (possibly more comprehensive) error information, so the model uses this error information instead of performing type-checking itself. The error information is propagated from a parent to its nearest children by setting the error context for each of the children, perhaps along the lines of this:
onInit() {
  onChildAttachedTo(
    () => this,
    child => {
      // Not sure if there is a more efficient way of only reacting to attachment/detachment
      // of only the nearest children.
      if (!isNearestParentOf(child, this)) { // imagine this function existed
        return
      }
      const path = getParentToChildPath(this, child)!
      errorContext.setComputed(child, () => {
        const errors = errorContext.getProviderNode(this)
          ? errorContext.get(this)
           : typeCheck(typeOfThisModel, this) // or however this model can be validated
        // filter all errors whose paths begin with `path` and remove this prefix
        return filterTypeCheckErrors(errors, {
          path,
          prefix: true, // `true` when `path` is a prefix, `false` when `path` is an exact match
          strip: true, // `true` when `path` should be left-stripped from the matching errors
        })
      )
      return () => errorContext.unset(child)
    },
    { deep: true, fireForCurrentChildren: true }
  )
}

On second thought, providing the errors via a context may be even simpler:
onAttachedToRootStore() {
  if (!typeCheckContext.getProviderNode(this)) {
    typeCheckContext.setComputed(this, () => this.$errors)
  }
  return () => typeCheckContext.unset(this)
}

@computed.struct
get $errors(): TypeCheckError | TypeCheckExpression | undefined {
  const root = typeCheckContext.getProviderNode(this)
  if (!root) {
    return this.typeCheck() // I guess ...?
  }
  const path = getParentToChildPath(root, this)!
  return filterTypeCheckErrors(typeCheckContext.get(this), {
    path,
    prefix: true,
    strip: true,
  })
}

This way, only the root model again performs the type-checking for the entire tree and provides the errors via the context, but now each child model simply extracts the errors related to itself and its subtree without creating a new context for its direct children itself. But it seems to require a root store in order to switch roles between an error provider and error consumer when a subtree gets attached and detached.

I've been thinking about this a bit and with refinement types it seems like it's so close to being there, but the concept, allowing a value to exist with errors, seems to have a nasty way of "poisoning" the tree for lack of a better term. What I mean is once it's anywhere it kind of seems like it has to be everywhere.
For something to be really pervasively added, I think idea backing it needs to be fundementally sound/useful otherwise it would eat away at a purity that mobx-keystone feels like it has at the moment.
I think I would personally like to see it added as part of draft() or something very similar, something like...
// keep validation APIs in line with dirty-checking
// maybe make a new thing like "ValidatedDraft" or something along those lines
interface Draft {
  ...

  isValid: boolean
  isValidByPath(path: Path): boolean

  errors: TypeCheckError[];
  errorsByPath(path: Path): boolean
}

Not sure if this is possible, but I would then expect something of a custom cloning that "unrefines" all the refinement types in the original back to their base types, allowing the draft to contain the invalid, malformed, work-in-progress data. Your checkFn in the original model would be your validator.
isValid and your errors are just kind of saying "hey, if you tried to commit this draft right now it wouldn't work and this is the error you'd get from the refinement type".
I think Drafts being a one-stop-shop for wiring up anything form-y or input-y feels right, at least to me.

I like the idea of making comprehensive runtime validation a feature of draft. With the current type-checking in place, the original state would strictly enforce the type constraints while the draft would use the same type constraints but collect all errors instead that, e.g., can be provided as user feedback. It sounds like a clean design to me. I hadn't thought about it like this. In my app, errors are regular state because it is non-trivial to reach a valid state. Still, certain actions can only be performed when the state has no errors. In order to collect all errors, I couldn't use refinements, so I created a custom runtime type system similar to mobx-keystone's runtime types. In my case, I would operate exclusively on the draft in order to be able to collect and present errors.
I agree that the extended draft interface should follow the original one, but I think an array of TypeCheckError is not sufficient to represent the error structure. Based on your proposal and using the error interfaces I defined in https://github.com/xaviergonz/mobx-keystone/issues/160#issuecomment-653784032, the extended draft interface could look like this:
interface Draft {
  ...

  isValid: boolean
  isValidByPath(path: Path): boolean

  errors: TypeCheckError | TypeCheckExpression | undefined;
  errorsByPath(path: Path): TypeCheckError | TypeCheckExpression | undefined
}

I noticed another requirement that the runtime validation should satisfy in my opinion. While mobx-keystone's current runtime type-checking only applies to model (state) properties, I think a comprehensive runtime validation should also be able to validate computed properties and volatile state. The design of the current runtime type-checking does not cover this case as the types are specified as part of the model (state) properties definition.
In addition, what happens if I need to refine the model type, e.g. in order to add a constraint that checks the combination of several props? The current runtime type system lets me refine types.model, but I can't refine Model().

I noticed another requirement that the runtime validation should satisfy in my opinion. While mobx-keystone's current runtime type-checking only applies to model (state) properties, I think a comprehensive runtime validation should also be able to validate computed properties and volatile state. The design of the current runtime type-checking does not cover this case as the types are specified as part of the model (state) properties definition.
In addition, what happens if I need to refine the model type, e.g. in order to add a constraint that checks the combination of several props? The current runtime type system lets me refine types.model, but I can't refine Model().

After thinking about it some more, I think that class models mix model prop definition and runtime type-checking in an unnecessarily strict way. Let me elaborate a bit more. A class model is created by inheriting from the class created by Model(...). The Model factory receives an object of props which define the state of the model. When a model is created with runtime types, the model state is defined along with a type definition that is checked at runtime whenever a prop is modified. Runtime types can only be specified for each prop individually which means a refinement across props does not seem possible. How about changing the signature of the Model factory like this?
class MyModel extends Model(/* which object props are model props? */, /* runtime type */) { ... }

For example:
class MyModel extends Model({
  kind: prop(),
  value: prop()
},
types.or(
  types.object({
    kind: types.literal('float'),
    value: types.number()
  }),
  types.object({
    kind: types.literal('int'),
    value: types.integer()
  })
)) { ... }

The runtime type cannot be arbitrary of course. It must be a types.object and the object keys must be fixed even when it is a union of objects like in the example above. The first object { kind: prop(), value: prop() } indicates which of the object keys are model props and can optionally define default values.

First of all, sorry it took me this long to respond.
I tend to agree with @Sladav in that "application state" modelling and "user input" state are not exactly the same (although usually the user input is a less strict version of the application one).
For example, maybe for the application state it doesn't make sense to have two users with the same username, but as a user input it (temporarily until corrected) does.
In the first case it would be a hard constraint, something that if were to ever break would make the application state invalid. That can be already covered via throwing / returning an error before the state becomes invalid (e.g., throwing when a user with an already existing username is about to be added to the list of users), or a refinement type (which is basically a throw error check too).
For the second case (user input state) it is true that mobx-keystone doesn't directly offer a tool for this, but maybe in this case just following a pattern is enough to solve it?
For example, if the programmer followed a pattern like:

given a custom error class

interface MyError {
  error: string; // might be a string that might be translated, already translated, only English, a code...
  path: Path
}

model classes might (optionally) have a member that returns all current and children errors

@computed
get $errors(): Array<MyError> {
  const errors: MyError[] = []

  // local errors
  if (this.name.length > 30) errors.push("name too long", ["name"])

  // children errors, might be done custom (member by member) or by auto aggregation of children
  getChildrenObjects(this, { deep: true }).forEach(child => {
    const childErrors = child.$errors;
    if (childErrors) {
      childErrors.forEach(childError => {
        errors.push({
          ...childError,
          path: [ getParentPath(child).path, ...childError.path ]
        });
      });
      errors.push(...childErrors);
    }
  })
  return errors;
}

It is true however that one way to make this pattern easier would be to wrap the code from the second part (getChildrenObjects etc) into some kind of "getErrors" function and document the pattern to kind of make it more "official". Also I think this pattern would be easily applicable to drafts. Would that be enough?

I also agree with @Sladav and you about "application state" vs. "user input state", but I had only seen it this way for standard user input forms although the idea, of course, extends to more complex editing, too. Unless I'm missing something, I believe the "user input state" is always a relaxed version of the "application state", so as @Sladav suggested for validating "user input state" only the base types should be strictly enforced (an exception is thrown when they are violated) while refinement errors are merely collected for user feedback.
I'm not convinced that the pattern you sketched is sufficiently generic though:

Writing validation logic imperatively does not scale well in my experience; it becomes a pain when validation logic becomes complex. Schema-based validation using, e.g., mobx-keystone's runtime types or io-ts is a much better approach in my opinion. Since mobx-keystone uses schema-based validation for model props already, I think it should also be used for validating entire models and trees.
Using an array of errors does not retain the logical relationship of errors ("and" vs. "or" - https://github.com/xaviergonz/mobx-keystone/issues/160#issuecomment-653784032) which may be relevant to accurately report errors. Instead, it implies only the "and" relationship which is correct in most cases (in my experience) but not always.
With schema-based validation, collecting errors only from children to parents is not sufficient because parent nodes may introduce additional constraints on their children. The solution may be to provide the errors at the root of the tree to its children via a context and each child extracts its corresponding errors.

Related to the above and in continuation of my thoughts in https://github.com/xaviergonz/mobx-keystone/issues/160#issuecomment-661152415, I think specifying runtime types independently for each model prop is not sufficient. What if the "application state" had a coupling of props, e.g. according to the following schema?
types.or(
  types.object(() => ({
    kind: types.literal('float'),
    value: types.number
  })),
  types.object(() => ({
    kind: types.literal('int'),
    value: types.integer
  }))
)

When expressing kind and value as two props, the above type cannot be applied for type-checking. The only way to type-check this data structure is to have a single model prop whose value is this object. In addition, I think that validating not only model props (i.e. state) but also computed properties is needed in the general case. For instance, think of the typical shopping cart example where the total price is computed in a computed property. If, for instance, there was a budget that may not be exceeded by a customer, which could be a model prop, then validation should also check that the budget is not exceeded. Of course, the budget type could be refined to check whether the budget value exceeds the sum of the item prices and their quantities, but this formula is already implemented in the computed property and would need to be reimplemented in the type refinement (yes, the function could be extracted and called in both places, but I hope you get my point).
How about this: Let's give the model decorator a second (optional) argument being the type/schema of the entire model. It could replace tProp entirely or just serve as an additional, more comprehensive type. (I realized that Model is not the right place for providing this type.)
@model(
  "UnionModel",
  types.or(
    types.object( // needs to become tolerant of additional properties
      () => ({
        kind: types.literal("float"),
        value: types.number,
      })
    ),
    types.object( // needs to become tolerant of additional properties
      () => ({
        kind: types.literal("int"),
        value: types.integer,
      }),
      false
    )
  )
)
class UnionModel extends Model({
  kind: prop<"float" | "int">(),
  value: prop<number>(),
}) {}

@model(
  "ComputedPropertyModel",
  types.object(() => ({ value: types.number }), false)  // needs to become tolerant of additional properties
)
class ComputedPropertyModel extends Model({}) {
  get value(): number {
    return 10
  }
}

I've successfully implemented this feature (to some extent) to see if it works (also in terms of Typescript typings). In my opinion, this feature would be valuable on its own already without the distinction between "application state" and "user input state". But with this more comprehensive type/schema in place, I believe we would be one step closer to supporting error collection for "user input state" (only when type-checking is performed in a draft).

About the example above, couldn't you do it like this instead?
@model("Float")
class Float extends Model({
   kind: tProp(types.literal("float")),
  value: tProp(types.number),
}) {}

@model("Int")
class Int extends Model({
   kind: tProp(types.literal("int")),
  value: tProp(types.integer),
}) {}

@model("Root")
class Root extends Model({
  // choose one or the other
  value: tProp(types.or(types.model<Float>(Float), types.model<Int>(Int)))
}) {}

or assuming they don't need to be full models
const floatType = types.object({
   kind: tProp(types.literal("float")),
  value: tProp(types.number),
})

const intType = types.object({
   kind: tProp(types.literal("int")),
  value: tProp(types.integer),
})

const floatOrIntType = types.or(floatType, intType)

@model("Root")
class Root extends Model({
  value: tProp(floatOrIntType)
}) {}

@xaviergonz: Yes that's right, although in both cases the prop value is needed just to be able to express the "or" relationship. If this was the only problem, I could live with it, but this approach doesn't allow me to validate a computed property easily either.
Let's look at a shopping cart, for instance:
const quantityType = types.refinement(types.integer, (n) => n >= 0)
const moneyType = types.refinement(types.number, (n) => n > 0)

@model("ShoppingItem")
class ShoppingItem extends Model({
  quantity: quantityType,
  unitPrice: moneyType,
}) {}

@model("ShoppingCart")
class ShoppingCart extends Model({
  items: types.array(types.model(ShoppingItem)),
  budget: moneyType,
}) {
  @computed
  get totalPrice() {
    return this.items.reduce((total, item) => total + item.quantity * item.unitPrice, 0)
  }
}

I'd like to be able to check (using the same declarative runtime type system) that totalPrice does not exceed budget and get an error (ideally for totalPrice) when it exceeds budget. This requires runtime type-checking beyond model props. With the API sketch from above where a runtime type is passed to the model decorator, it could look something like this:
const shoppingCartType = types.refinement(
  types.object({
    items: types.array(types.model(ShoppingItem)),
    budget: moneyType,
    totalPrice: moneyType
  }),
  (cart) => cart.totalPrice <= cart.budget,
)

@model("ShoppingCart", shoppingCartType)
class ShoppingCart extends Model({
  items: types.array(types.model(ShoppingItem)),
  budget: moneyType,
}) {
  @computed
  get totalPrice() {
    return this.items.reduce((total, item) => total + item.quantity * item.unitPrice, 0)
  }
}

Do you see my point?

If we added a typeCheck() optional method to models (that gets invoked as part of the runtime type checking), would it achieve the same?
@model("ShoppingCart")
class ShoppingCart extends Model({
  items: types.array(types.model(ShoppingItem)),
  budget: moneyType,
}) {
  // would get called as part of the runtime validation
  typeCheck() {
    if (this.totalPrice <= this.budget) {
      return new TypeCheckError(["totalPrice"], "above budget")
    }
  }

  @computed
  get totalPrice() {
    return this.items.reduce((total, item) => total + item.quantity * item.unitPrice, 0)
  }
}

and for non model types then "refinement" would still be used (although could be enhanced with an optional error message)

@xaviergonz: Yes that's right, although in both cases the prop value is needed just to be able to express the "or" relationship.

Actually you can make that value even a root store:
const valueModel = fnModel(floatOrIntType, "FloatOrIntModelName")
const value = valueModel.create({ kind: "float", value: 3.14 })
registerAsRootStore(value) // if needed

// or if no runtime type checking is need

type FloatOrInt = { kind: "float", value: number } | { kind: "int", value: number }
const valueModel = fnModel<FloatOrInt>("FloatOrIntModelName")
const value = valueModel.create({ kind: "float", value: 3.14 })
registerAsRootStore(value) // if needed

// or even just as a plain object
type FloatOrInt = { kind: "float", value: number } | { kind: "int", value: number }
const value: FloatOrInt = toTreeNode({ kind: "float", value: 3.14 })
registerAsRootStore(value) // if needed
typeCheck(floatOrIntType, value) // if desired

If we added a typeCheck() optional method to models (that gets invoked as part of the runtime type checking), would it achieve the same?

Well, for this particular refinement, it would be the same I guess. But in order to validate a more complex computed property, e.g. an array of back-references, I think it would be nice to use the declarative type system instead of writing imperative validation logic. A workaround may be to declare the type separately and call the typeCheck function in your sketched new typeCheck method manually using this type to type-check this (beyond the model props). But that's pretty much the same as my suggested new model decorator argument if that type-check got invoked by model.typeCheck() too, e.g. by intersecting the two types using a types.and(...) type. The model decorator argument could probably also be moved to the Model/ExtendedModel function instead if that makes more sense.
Related to the above, I've been having some trouble experimenting with these ideas when trying to type-check a model when using types.model(SomeModel) (which implicitly happens when calling model.typeCheck()) which only applies the type-checker of the model props to model.$ instead of model, so only the props (before transformations) can be checked.
Or how about something like this?
@model("ShoppingCart")
class ShoppingCart extends Model(
  // TS types are inferred from the runtime types below.
  // Default values and transforms can be provided here.
  {
    items: prop(),
    budget: prop(),
  },
  // Optional runtime types. If omitted entirely or no runtime
  // type is available for a model prop above, TS types need
  // be provided to `prop` above explicitly.
  types.refinement(
    types.object({
      items: types.array(types.model(ShoppingItem)),
      budget: moneyType,
      totalPrice: moneyType,
    }),
    (cart) => cart.totalPrice <= cart.budget
  )
) {
  @computed
  get totalPrice() {
    return this.items.reduce((total, item) => total + item.quantity * item.unitPrice, 0)
  }
}

Model class inheritance would correspond to intersecting the runtime types of the base class and the extension (using a types.and type). The TS types for the model props would be inferred using the same approach that I've taken in #195 https://github.com/xaviergonz/mobx-keystone/pull/195/commits/b8e24b186f34a8cccc97ad0182823efdcd405c39 (using Unionize to determine the type union for each model prop separately). I haven't tested it yet though.
What do you think? I really think that keeping type-checking declarative as much as possible is a good idea.

The last idea seems to require TS types for abstract class properties derived from a mapped type which I don't think is (currently) possible. When the runtime type is provided as the second argument of the Model function, any non-model property needs to be typed as an abstract class property in the abstract class returned by Model(...) so the class that extends from that abstract class is required to implement those properties.
Unless I'm missing something, I'd say that using a decorator to provide the validation runtime type is the best option.

@xaviergonz Not sure if you've missed my comments in #195 or didn't have time yet or perhaps absolutely dislike that PR, but is there any chance you could check it and give some feedback? I really think this is a great feature and that the implementation integrates nicely with the rest of mobx-keystone. I'm still a bit uncertain whether setting the validation type in the @model decorator is the best solution, but it seems to work well for class models. I haven't found an equivalent place to add the validation type to functional models though. I'd very much appreciate your feedback. 🙂


Backport StatusMenu Visibility Fix to 2023.2.3

Closes #112
Summary
Backported StatusMenu visibility to base/2023.2.3. StatusMenu now clears Infopanels before use, so that it is visible.
Local Tests
The fix was tested in prod and infopanel was cleared before StatusMenu use.

@viniarck

@viniarck ok. I updated the changelog and moved the text to patch version 3.


is it possible receive USSD and response?

Example
I am calling *933*Hello#, mobile operator sends to endpoint.
Endpoint responses "Hi there" to mobile operator and I receive "Hi There"
is possible to do USSD with go-smpp?

afaik USSD is just a flag in the message for the transmitter... and if the smsc sends a response back it should land in your receiver


CEP or UXP Identifier Plugin

Create a UXP plugin for Photoshop that:

Lists the user's installed plugins
Identifies which plugins are CEP and which are UXP
For CEP plugins, if the are distributed via the Exchange, display the developer's contact information.
Supplies the user with text such as "Ask your developer to consider migrating this plugin to UXP."

Note:

CEP is no longer supported on Mac M1 running natively, ideally the plugin could also detect this state and inform the user with additional resources about using Rosetta Mode.
One way to get a list of installed plugins is by running a the --list all command.

@zrthxn @ErinFinnegan
I think you can get a full list of CEP plugins from the FS module. Please let me know if you needed any help.


Fix invalidation address and non power of 2 fifos

The first fix addresses L1 cache invalidation in the L2 arbiter. Currently, for each unit connected to the arbiter, the arbiter invalidates each units own current address instead of the address of the arbitrated unit.
Currently the depth of FIFOs are implicitly rounded up to the nearest power of 2. Although the processor currently doesn't contain any FIFOs with a non power of 2 depth, this implicit rounding up can cause problems when extending the processor.
This second change makes the FIFO behave as if it has the specified depth. For example, a FIFO with a configured depth of 11 will state that it is full when it contains 11 entries (even if it actually has capacity for 16).

I've also added a few insignificant changes to reduce the amount of linter warnings.

Everything looks good to me, this pull request can be merged.

These changes have been merged in #26.


Ability to specify merge strategy for packages

Current

There is no way to specify merge strategy of packages

Expected

Would be great to add ability to specify package strategy:

to handle case when the same file differs bewteen local vs package:

overwrite local file
overwrite package file

to handle case when some files exist in local but not in package, or the opposite:

strict copy of package (and remove extra local files)
mix of both local and package files as long as no conflict
partial copy of package (and ignore extra package files)

It could give ability to specify a different strategy per directory and file from package
It could be an additional section of compose.yaml file like :

name: myproject
version: 1.0.0
dependencies:
  - package: compose-example
    source:
      type: git
      ref: 0.0.7
      url: https://github.com/iignatevich/compose-example.git
    strategy:
      - some-dir/path/: remove-extra-local-files
      - some-other-dir/path/: ignore-extra-package-files
      - some-other-dir-again/path/: mix-local-and-package-files
      - some-file/dir/example.go: overwrite-local-file
      - some-file/dir/other-example.go: overwrite-package-file

https://github.com/launchrctl/compose/pull/14

Merged for https://github.com/launchrctl/compose/commit/745982491155a184146b8e53e015d3e6f8322614
Keep issue open to test further

As we start to have real cases, it appears it would be useful to have an additional strategy like so :+1:
      strategy:
        - name: filter-package-files
          path: interaction/filtered-package-file.txt < Only this file will be taken from package (if it does not exists in domain?)
          path: interaction/filtered-package-folder < Only this directory will be taken from package (if it does not exists in domain)

In essence, it's the same as ignore-extra-package-files but works the opposite: instead of listing files to exclude from package, we list only files we take from package. That makes it more reliable because list does not need to be updated when new files are added to package

Would be great to


Chords

Is it possible to do any chords? I.e. multiple notes at the same time?

The only way to do that is by playing multiple Sequences simultaneously.
Each Sequence instance is backed by a single oscillator, so supporting chords within a single Sequence would be pretty much a full rewrite of TinyMusic.


depth = (poses[id_im-1,:3,2].T @ (point3D - poses[id_im-1,:3,3])) * sc ,WHY?

Hello, I would like to ask why the depth is calculated this way?
and What do 'sc' and 'bds_raw' mean?
What does this judgment condition mean?
if depth < bds_raw[id_im-1,0] * sc or depth > bds_raw[id_im-1,1] * sc:
I'm hoping someone can help me.

sc is the downsampling scale of the images and bds_raw is the boundaries of the scene. The condition means we're filtering out those outlier depths which are outside the scene bounding box.

sc is the downsampling scale of the images and bds_raw is the boundaries of the scene. The condition means we're filtering out those outlier depths which are outside the scene bounding box.

Thank you for your reply! I have one more question，after running img2poses on my own dataset to get poses_bounds.npy, when I run run_nerf.py, I get negative numbers in bds_raw, resulting in sc being negative, far being negative, and near being positive. Can you give me some suggestions?
My data set was taken by drones and satellites, far from the ground.

sc is the downsampling scale of the images and bds_raw is the boundaries of the scene. The condition means we're filtering out those outlier depths which are outside the scene bounding box.

Thank you for your reply! I have one more question，after running img2poses on my own dataset to get poses_bounds.npy, when I run run_nerf.py, I get negative numbers in bds_raw, resulting in sc being negative, far being negative, and near being positive. Can you give me some suggestions? My data set was taken by drones and satellites, far from the ground.

maybe you need modify line 66 in llff/poses/pose_utils.py：
cams[ind-1] = 1
should be modified as
cams[perm[ind-1]] = 1


Universal link support

@OEA what is our universal link format, can you please give some examples? Thank you in advance.

Merging PR not to forget it. @OEA You can directly add the examples which Yigit requested.


added training data to the 'Weather' folder

Learning how to contribute.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


FR: Auto-Detect Local Models

I use Msty as a GUI alternative for Ollama
I'd love to be able to use custom embed models that are already installed on my laptop.
It would be great it it could automatically the models i have already installed for both the chat and embed model
here's an example of another plugin

Thank you for the suggestion! Support for custom embedding models is part of our planned improvements. We'll also look into automatically detecting locally installed models when implementing this feature. Stay tuned for updates!

Can you tell me the name of the plugin in the screenshot?

https://github.com/pfrankov/obsidian-local-gpt

Can you tell me the name of the plugin in the screenshot?


Basic setup for translations including couple of Finnish translations

A proposal to start translations

Thanks. Merged this to a new branch

Added Working Hours Tracker project to transifex. Please contribute to translations there:
https://www.transifex.com/projects/p/working-hours-tracker/


[5.2.2] Crafting only gives a skeleton_skull every time

Short summary of issue
Hi,
5.2.2 hasn't really fixed the crafting issue on 1.13.1 mentioned in #8.
Crafting with skeleton_skull/item still does nothing.
Crafting with player_head/item gives you a skeleton skull with every item
Server version
1.13.1
HeadsPlus version
5.2.2
Detailed description (how you found it, what you were doing at the time)

Expected behaviour
Craft a head with skeleton_skull and item.
Actual behaviour
Crafting with skull/item does nothing.
Crafting with player_head/item gives you a skeleton skull
Steps to reproduce
See photo
Any last notes?
Apart from enabling crafting in the config, I've not changed any configs, just downloaded the jar, and started afresh.

I seriously need to learn to not doze off whilst writing code. Damnit.

Should be fixed in the latest version.


GH Actions: various tweaks / PHP 8.2 not allowed to fail

GH Actions: minor simplification
... of the bash date command in the earlier pulled cache busting.
GH Actions: update PHP versions in workflows
PHP 8.2 has been released today 🎉 and the setup-php action has announced support for PHP 8.3, so adding PHP 8.3 to the matrix and no longer allowing PHP 8.2 to fail the build.
Builds against PHP 8.3 are still allowed to fail for now.
🆕 GH Actions: selectively use fail-fast with setup-php
I've seen some recent build failures (elsewhere) due to the setup-php action running into a rate limit and not downloading the required version of Composer. In the case of this action, without parallel-lint being set up, the rest of the workflow would fail anyhow.
The setup-php action runner defaults to showing these type errors in the logs, but not stopping the workflow run.
So, specifically for this job, I'm adding the fail-fast option to setup-php to fail the build if the action runner ran into any errors.
Ref: https://github.com/shivammathur/setup-php#fail-fast-optional

As this PR, while approved, hasn't been merged yet and I found another GH Actions tweak to make, I've added an extra commit to this PR.

Thanks again @jrfnl Can we merge this now?

Thanks again @jrfnl Can we merge this now?

Absolutely!


Custom pool name on pool table balancer frontend

https://www.loom.com/share/4728aee978ef4cb6921bf25706f7a8f7?sid=ec8ad688-7ef0-43c8-9f44-345dee6ba3a4

@ribeirojose the next step IMO would be trying to simplify the data flow. I had some difficulties understanding the states on Vue, so first I focused on making it work to then tackle clean code and DRY on the hooks

@ribeirojose the next step IMO would be trying to simplify the data flow. I had some difficulties understanding the states on Vue, so first I focused on making it work to then tackle clean code and DRY on the hooks

Will review now, but I think the feedback from the folks maintaining the frontend repo will be very useful here as well.


WIP: update the salt script + releases files

This PR wants to solve #200 and emphasises the separation of sha256 for released versions and for the current version of head. This way we can push commits on top of head, continue to ensure reproducible builds, and also keep something to compare the shasum of the released version. The PR process will need updating qubes-firewall.sha256, and the release process need to copy this file into qubes-firewall-release.sha256. WDYT?
I'm unsure whether the salt script has been updated correctly and I'll have to wait for the next version to fix any issues.

I think the approach is fine.

I still have an issue the first time I run the script, because the directory for the kernel is not yet created. So far I'm unsure if I have a bad usage of salt or if just need to create the directory if test -e fails on the release version check:
$ sudo qubesctl --show-output state.apply SaltScript...
[ERROR   ] Command 'test' failed with return code: 1
[ERROR   ] stdout: touch: cannot touch '/var/lib/qubes/vm-kernels/mirage-firewall/version.txt': No such file or directory
cat: /var/lib/qubes/vm-kernels/mirage-firewall/version.txt: No such file or directory
[ERROR   ] retcode: 1
[ERROR   ] Command 'test' failed with return code: 1
[ERROR   ] output: touch: cannot touch '/var/lib/qubes/vm-kernels/mirage-firewall/version.txt': No such file or directory
cat: /var/lib/qubes/vm-kernels/mirage-firewall/version.txt: No such file or directory


Client transition dom

Taking over responsibility for getting @doug-wade's awesome DOM preservation changes shepherded into master, since he's getting pulled in three different directions in his day job.
This is #70 with a few patches to get things working in some cases that didn't come up during the hackathon that spawned it.

BTW - As mentioned in https://github.com/doug-wade/react-server/pull/2: Still need to deal with root container/element attribute differences, but probably should fix redfin#73 first.

Added some commentary to explain the DOM re-use strategy and hopefully help ease review here.

LGTM :+1:


chore: Add husky and lint-staged

Closes #20.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 78.05%. Comparing base (4d5aae7) to head (8f284b4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #26   +/-   ##
=======================================
  Coverage   78.05%   78.05%
=======================================
  Files          16       16
  Lines         237      237
  Branches       56       56
=======================================
  Hits          185      185
  Misses         45       45
  Partials        7        7

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Not pulling block names from resource pack

It appears that The One Probe is not pulling the names of items you are looking at from the language file of the loaded resource packs.

More info please. What version? What block are you looking at exactly? Screenshot perhaps?

Version 1.3.3 of The One Probe. What I am looking at are blocks from the WTF Expedition Mod, which uses a resource pack for some of the textures/overlays. One thing that is interesting is that in single player it is fine, but does not display the name correctly on multiplayer, see this screenshot:
Screenshot
I also installed TUMAT which does something similar to TOP to see if it was an issue with WTF Expedition or TOP.

Um that's weird... The only thing I can think of is that WTF is doing something weird but no idea what atm

Probably fixed in 1.4


"undefined is not an object (evaluating 'ShareMenu.getSharedText')"

On my Android device, I can't avoid getting this error. I've used the sample code, reverted react-native as far back as 0.25.1, cleared npm caches, started from scratch, double-checked the various android-specific files, etc. If I remove the getSharedText call and just use canned text as sharedText state string, everything works fine. Any ideas where this is coming from?

Update - was eventually able to get this running on 0.25.1. Would love to see it work on newer versions of react native.

Hi! I'm totally new with React Native.
I'm trying this on an Android device too and having the same issue, I think.
Cannot read property 'getSharedText' of undefined
I'm trying sharing from web browser but ShareMenu variable is undefined.
I don't understand what you, @zethni , have done

If I remove the getSharedText call and just use canned text as sharedText state string, everything works fine.

Does it worked? Could you explain a little bit?
Thanks :D

@Soleguia
I meant that I could get the share button from this app to show up in the share menu, but still couldn't use the actual share data. I commented out this part:
    ShareMenu.getSharedText((text :string) => {       if (text && text.length) {         that.setState({ sharedText: text });       }     })
And changed the state call in the constructor to:
this.state = {       sharedText: null     };
Ultimately, I started from scratch with the example, putting that folder into a folder and running npm install, which pulled the dependencies including the older version of react-native (0.25.1)

I've made a fresh installation yesterday and the only way to make it run with this was upgrading react-native to 0.33
Are you telling that share only works for 0.25 or lower??? O.o
:(

@Soleguia I may be missing something, but I couldn't get it to work on 0.33...

Should be working with RN 0.33 yes, as per #8

One of the installation instructions is:
new ShareMenuPackage(this)  // <------ add here
I've seen things go wrong here. I know that I'm rather late, but what if you tried
new ShareMenuPackage()  // <------ add here
instead of the upper one, this made it work at various other packages

I updated the documentation. It's basically what @christianversloot said. I just tried with latest React Native and it's working well.

This doesn't seem to work with the automatic installation method

The error shows up in web version. Hope to hear your expertise to resolve it.


Rewritten tutorial to write a very simple AWS Lambda

Description
The prior tutorial branch involved Docker usage that we don't want to involve as a first contact with the framework.  This (minor) rewrite skips the Docker setup, instead leaning on asdf for python version management, and a python example that doesn't have any runtime pip dependencies.
I have also included a tweak to the markdownlint.yaml config file so that Makefile quotes and console output are allowed to have tab characters in them.
Context
Time to first execution is lower.
Type of changes

[ ] Refactoring (non-breaking change)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would change existing functionality)
[ ] Bug fix (non-breaking change which fixes an issue)

Checklist

[x] I am familiar with the contributing guidelines
[x] I have followed the code style of the project
[ ] I have added tests to cover my changes
[x] I have updated the documentation accordingly
[ ] This PR is a result of pair or mob programming

Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

[ ] I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

There's an important outstanding question here, and that's this. What do we want to do about SonarCloud, for someone random trying this out?  I'm quite keen that this should work out of the box.

There's an important outstanding question here, and that's this. What do we want to do about SonarCloud, for someone random trying this out? I'm quite keen that this should work out of the box.

Thanks @regularfry, as discussed, we'll update the SonarCloud onboarding instructions to reflect the current process. Also, please note that the GitHub action that triggers the analysis will not execute if the secrets/variables are not set up. Therefore, the workflow should proceed to the next step not affecting the dev experience.
I may make some suggestions on the wording once we have full clarity on the Sonar onboarding process, as this is still WIP.


[FEATURE] Allow user to set resource constraint for Longhorn components

Is your feature request related to a problem? Please describe (👍 if you like this request)

In the current implementation of Longhorn, there is no setting to control the CPU and memory limits as we believe that Longhorn, as a critical storage layer, should not be limited or killed by OOMKill. The reason is that if Longhorn struggles, the application workloads cannot function well. However, this assumption might not be correct for the edge environment in which the user might want to set limits for the Longhorn system toa void Longhorn reader the system unusable.
There are multiple tickets related to the resource constraint topic currently:

Share manager: https://github.com/longhorn/longhorn/issues/8314
Instance manager: https://github.com/longhorn/longhorn/issues/4009
And I imagine that user would likely want to customized the setting for other components like longhorn-manager, csi-plugin,...
https://github.com/longhorn/longhorn/issues/6351

This ticket serves as the master ticket to combine them all together.
Additional Context
@innobead mentioned that Rook resource constraints strategy is: https://github.com/rook/rook/blob/master/design/ceph/resource-constraints.md . Maybe we can take a look at their approach

Apologies in advance, but could this be expanded to support - broadly - 'pod metadata' (using terminology from the Alertmanager/Prometheus operators)?  For my personal use case, I'd like to be able to attach additional labels to Longhorn managed pods (in addition to constraining pod requests).
Also, I'm more than happy to implement this if you think it's an appropriate first-issue for a newcomer like myself and if there's an appetite for external contributions.

Why such an important feature keeps getting postponed? Devs are now targeting 1.9.0 release.

Hi @derekbit and @ejweber, Please implement this feature as soon as possible. It’s a crucial feature for any company, and it’s been a significant blocker for us for a long time.


FileFolderExtensions.PublishFileToLevel(this File file, FileLevel level) exception

"The property or field 'ForceCheckout' has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested."
var parentList = file.ListItemAllFields.ParentList;
context.Load(parentList,
l => l.EnableMinorVersions,
l => l.EnableModeration,
l => l.ForceCheckout);
var checkOutRequired = parentList.ForceCheckout;
Move the bold line to after the try/catch.

Good catch! Fixed and merged in PR #640. I'll close this issue now.


 :src set the filter error

just like it
<img :src="product.adImage | appendParams " class="img-responsive"/>
i register the filter appendParams
but the error:
Property or method "appendParams" is not defined on the instance but referenced during render
i want to change the image url before render。how can I deal with it?

You could ask your question on forum or gitter. We try to use the issue tracker for bug reports and feature requests.

As for your problem, you could use computed properties. You could take a look this doc


Failed to exchange code for access token

Please, healp. I'm using google Auth2
{
"non_field_errors": [
"Failed to exchange code for access token"
]
}

I get the same problem for github

I am experiencing the same issue for Google OAuth.

Same issue with Google. I tracked it down to this line in allauth, the response is {'error': 'invalid_grant', 'error_description': 'Bad Request'}.  The feared invalid_grant message that can mean anything. Still trying to guess what is the problem in my case.
Strangely, I do can login using allauth directly.

In my case I was getting invalid_grant because was reusing the code to debug. Using a new code gave me {'error': 'redirect_uri_mismatch', 'error_description': 'Bad Request'} on the first try. And that one was because the CALLBACK_URL_YOU_SET_ON_GOOGLE  I used here https://accounts.google.com/o/oauth2/v2/auth?redirect_uri=<CALLBACK_URL_YOU_SET_ON_GOOGLE>&prompt=consent&response_type=code&client_id=<YOUR CLIENT ID>&scope=openid%20email%20profile&access_type=offline wasn't the same I used here:
class GoogleLogin(SocialLoginView): # if you want to use Authorization Code Grant, use this
    adapter_class = GoogleOAuth2Adapter
    callback_url = CALLBACK_URL_YOU_SET_ON_GOOGLE
    client_class = OAuth2Client

Source

same issue here for last 2 weeks

You can also get the response message with a print after this line, like this:
            try:
                token = client.get_access_token(code)
            except OAuth2Error as ex:
                print(ex)  # <--
                raise serializers.ValidationError(
                    _('Failed to exchange code for access token')
                ) from ex

(You can go directly into your virtualenv files and edit it there to debug)
I'd suggest dj-rest-auth display the exception message somehow to simplify debugging.

Hello, I hope this will still be relevant. I changed my callback uri to be postmessage
class GoogleLogin(
    SocialLoginView
):  # if you want to use Authorization Code Grant, use this
    adapter_class = GoogleOAuth2Adapter
    callback_url = "postmessage"
    client_class = OAuth2Client

This is in reference to this stack overflow question and answer: https://stackoverflow.com/a/48121098

same issue here. Was that fixed ?

@andresmrm What was the actual error when you print(ex) ?

Sorry, I can't remember. But it was a much clearer message than
invalid_grant.

Needed to decode the auth code before exchanging it for the access tokens.
google returns the auth code as url-encoded. In my case  it was '/' -> '%2F'.
answered here

Is this issue resolved? I'm still facing this problem not only with Google, but also with Facebook and Microsoft.
Here's the error message, I'm getting:
{
    "non_field_errors": [
        "Failed to exchange code for access token"
    ]
}

class GoogleLogin(SocialLoginView):
   """
   Google Login
   """
   adapter_class = GoogleOAuth2Adapter
   callback_url = reverse_lazy('auth:social_google_login')
   client_class = OAuth2Client

class MicrosoftLogin(SocialLoginView):
   """
   Microsoft Login
   """
   adapter_class = MicrosoftGraphOAuth2Adapter
   client_class = OAuth2Client
   callback_url = reverse_lazy('auth:social_microsoft_login')

class FacebookLogin(SocialLoginView):
   """
   Facebook Login
   """
   adapter_class = FacebookOAuth2Adapter
   client_class = OAuth2Client
   callback_url = reverse_lazy('auth:social_facebook_login')

I'm using -
Django==4.2.5
django-allauth==0.55.2
dj-rest-auth==5.0.1

@mirodil1

Needed to decode the auth code before exchanging it for the access tokens.
google returns the auth code as url-encoded. In my case it was '/' -> '%2F'.
answered here

Any chance you could show me exactly what this "decode the auth code" in code means actually?
When I make a login attempt via my angular application, I get a payload like this back from Google
{
    "idToken": "eyJhbGcixxxxxxx",
    "id": "1xxx",
    "name": "Name",
    "email"<EMAIL_ADDRESS>    "photoUrl": "https://lh3.googleusercontent.com/a/ACg8xxx",
    "firstName": "Name",
    "lastName": "Name",
    "provider": "GOOGLE"
}

So, I send to backend to the GoogleLogin(SocialLoginView):
At which point in this communication do I need to "decode" the auth code? How should the final decoded auth code look like?
I've been jumping around and everyone keeps saying what should be done, but nobody SHOWS the what should be done
😢

For me it was to match the redirect_uri that was going to google
redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Faccounts%2Flogin%2F

with the one expected by django backend

class GoogleLogin(SocialLoginView):

    """
    The frontend will make a POST request to this endpoint with the code
    retrieved from Google to log the user in.

    Returns inner django JWT access and refresh token with other data

    ref- https://dj-rest-auth.readthedocs.io/en/latest/installation.html#social-authentication-optional

    """

    client_class = OAuth2Client
    callback_url = "http://localhost:3000/accounts/login/"

    # callback_url = os.getenv("GOOGLE_OAUTH_CALLBACK_URL")
    adapter_class = GoogleOAuth2Adapter

For myself the issue was that I was getting an implicit code from Google and sending that to a df-rest-auth endpoint configured for the Authorization Code Grant workflow.
After adjusting the endpoint as per https://github.com/iMerica/dj-rest-auth/issues/525#issuecomment-1675885190, and using flow: "auth-code" in react-oauth, I can log in and sign up users through the GoogleLogin endpoint

Hello, I hope this will still be relevant. I changed my callback uri to be postmessage
class GoogleLogin(
    SocialLoginView
):  # if you want to use Authorization Code Grant, use this
    adapter_class = GoogleOAuth2Adapter
    callback_url = "postmessage"
    client_class = OAuth2Client

This is in reference to this stack overflow question and answer: https://stackoverflow.com/a/48121098

this fixed my issue. it should be mentioned in the docs.

At least, please update the documentation. Spent hours trying to debug this and went nearly crazy comparing the redirect_uris.

I can log in and sign up users through the GoogleLogin endpoint

please can you show us your configuration and googleLogin class ?


Hyper config gets overwritten if there's an error

[x] I am on the latest Hyper.app version
[x] I have searched the issues of this repo and believe that this is not a duplicate

OS version and name: macOS 10.13 High Sierra

Hyper.app version: 1.4.8

Link of a Gist with the contents of your .hyper.js: got overwritten by hyper

Relevant information from devtools (CMD+ALT+I on Mac OS, CTRL+SHIFT+I elsewhere):

The issue is reproducible in vanilla Hyper.app: yes

Issue

When I update my ~/.hyper.js, Hyper says 'Plugins Updated' and overwrites my config to the default config.
This doesn't happen each time. I'm not when exactly this happens: sometimes on a regular config update, sometimes on a syntax error, etc. Oddly, when I do put an intentional syntax error in my config then it says 'Hyper Configuration Reloaded' and doesn't complain about the syntax error at all.
This time, I updated a font, and it said 'Plugins Updated' and overwrote the config.
I've completely reinstalled Hyper multiple times, but nothing seems to fix the issue. I'd got it running for a while by installing a much older version, and then updating to the latest version.

I'd like to work on this issue. Can someone give me some pointers on where to start?

Duplicates #2015 (Fixed in v2)


A bunch of miscellaneous improvements.

@hopeseekr Thank you for this PR. Those changes were released in version v2.0.0.


Validator

Problem Statement
Fix duplicates keys .
Related Issue
Fixes #2921 and related to #2929
Checklist

[x] I have read the contribution guidelines
[x] All commits are signed with git commit --signoff
[x] My changes have reasonable test coverage
[x] All tests pass with make test
[x] I ensured my PR is ready for review with make reviewable

@shuheiktgw

Sorry, I'm well aware of this pull request, but I've been sick for the last couple of days and am still recovering from it. I'll take a close look when I'm back!

/ok-to-test sha=9de4494

Thank you, @Skarlso to takes it over 🙇


403 Errors Suddenly

Hey guys - I'm writing up a project for a job interview and the calls had been working just fine. After a debug session, I suddenly got these 403 errors.
System.Net.WebException: 'The remote server returned an error: (403) Forbidden.'
I'm running this out of Visual Studio in ASP.NET MVC app - not sure why it's kicking back at me now!
Thanks in advance for any ideas on what I may be doing wrong here
EDIT: looking at the status page I'm seeing a potential issue there - will check tomorrow if things have settled down!

yeah~ I just got the same errors...
In postman every request gives me the same response:
Checking if the site connection is secure
Enable JavaScript and cookies to continue
api.spacexdata.com needs to review the security of your connection before proceeding.
in my memory some days ago the request in postman will feed back the response in json format directly, but now due to the security check, my website can not parse and update the lasted data, so you know...I have to shutdown my website server for a while..
So my brother, how to solve this problem...

Still getting errors? Likely was from a Cloudflare captcha as a result of the DDOS

I get HTTP Error 429 (too many requests)

Hi @jakewmeyer ! The Forbidden errors went away perfectly fine for me once I just waited for that bigger issue to settle down. :)
Appreciate you getting back to us so quickly!

I get HTTP Error 429 (too many requests)

@iNoles , I was getting this too. The API wasn't happy with me because I had an API call within a loop - lol. Once I fixed that I didn't have any issues!!
If you keep getting the error, save yourself the frustration and just work on other parts of the code and let it cool down?

@iNoles @JaraMohnson Still getting 429? I upped the rate limit to 5000 requests/hour

Smooth over here!! thank you SO much!


Add line number and scoped id to output

This is useful for matching up tests results in different configurations (e.g. we have ~200 configurations we test the Ruby MongoDB driver with) for analysis purposes.

Did not know about that thanks, will check it out.


Mission and vision page for website

This issue tracks the drafting, review and approval of the Mission page for the Catalyst website.
This issue is complete when: the copy of this page is approved and can be moved to GitHub ready for publishing on the website (at that point we need to move the copy to the "code" section of this repo on GitHub).
Google doc for drafting copy: https://docs.google.com/document/d/1Sh2um4hxLErbVdc96_Zw2LaotcYuT3vssCdYrW_aUd8/edit#heading=h.rr8fm2gz946v
Roles
Drafting content: @katiepratt and @Tajuddeen1
Initial review: @LouWoodley
Coordination / project management: @Tajuddeen1
Review: corresponding project sub-teams
Handoff - @katiepratt hands off to @jnywong to prep for website publishing

[x] Draft initial page content (Katie)
[x] Add missing information (Taj)
[ ] Initial review (Lou)
[ ] Send to sub-teams for review (Taj)
[ ] Address edits / suggestions (Katie)
[ ] Coordinate any additional input needed (Taj)
[ ] Final signoff (Katie)
[ ] Handoff to Jenny (Katie)

@katiepratt I have nothing to add

After re-writing the "About" page, and then re-visiting this page, I'm not sure this page adds much to the overall communication of what Catalyst is doing. Perhaps we can discuss the purpose of this page at our next meeting and that might help us understand what needs to be there?


Fix creating namespace

Signed-off-by: Chmouel Boudjnah<EMAIL_ADDRESS>

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@715d704). Click here to learn what that means.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##             main     #186   +/-   ##
=======================================
  Coverage        ?   69.70%
=======================================
  Files           ?       22
  Lines           ?     1393
  Branches        ?        0
=======================================
  Hits            ?      971
  Misses          ?      314
  Partials        ?      108

Impacted Files
Coverage Δ

pkg/cmd/repository/create.go
52.27% <0.00%> (ø)

Continue to review full report at Codecov.

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


CSV: Initial zero truncated.

I am trying to upload a csv as
col1
01203123123
012312333333
The output generated is truncating the initial zero. I want to have this data as string.
I already tried to use raw:true. But looks like its not behaving as what I expect.
this.data = XLSX.utils.sheet_to_json(ws, { raw:true,header: 'A' });

const wb: XLSX.WorkBook = XLSX.read(bstr, { type: 'binary',raw:true });
Adding the raw field here  solved my issue


Added CircleCI Config

Fixes #10
This PR adds linting and unit tests as checks.

Moved commands to Makefile as suggested.


Record push metrics on successful push to Loki

Move the recording of metrics related to pushing a batch to Loki from the creation of the batch to after the successful push of a batch to have the metric better align with the description.
Signed-off-by: Marc Sensenich<EMAIL_ADDRESS>

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

@chaudum / @mstoykov friendly bump on this PR. I believe it may also reduce the difference between loki_distributor_lines_received_total and loki_client_lines from #44

@chaudum / @mstoykov friendly bump on this PR. I believe it may also reduce the difference between loki_distributor_lines_received_total and loki_client_lines from #44

Sorry for the late response.

@chaudum thank you for following up on the review, just wanted to give a ping since notifications can get missed in all of the others we get throughout the day


Dont set cookie header if not present

[fixes #338]
Trying to fix this problem on rubygems.org which uses clearance. The problem is well described in the issue.
Solution
clearance always set the response cookie, even when is emtpy, so when doing a redirect, http->https, it would set an empty cookie, which is not what we want.
I cannot see any problem about not setting the cookie when it is empty. (please let me know if I miss something)
I hope CI passes, as I could not run tests locally ( see error: https://gist.github.com/arthurnn/e4bc23aecdc052870b0d )
review @derekprior

@arthurnn any luck with the tests for this?

sorry man.. will work onthose in the next hours

@derekprior I actually found out that the spec to ensure this behaviour was there already, but the expectation on it was not right. So I just fixed, proving the point. (You can read the comment on commit 7779b12 to understand better what I mean)

looks like a really good find, thanks. I'm going to play with this a bit in some test apps to make sure I'm not missing something, but this looks good.

merged as 3a1244346524d9610105c2e5411bb759c6c05869. Thanks so much for taking a look at this. I'll be release 1.6.1 with this soon.

thats awesome. this will solve a long time issue in rubygems.org..
:heart: thanks a lot for improving the commit message too.. looks great.


Making declared functions,variables as well as operators case insensitive

Sorry for the bad PR before..
This PR adds the feature of using case insensitive variables.
Let me know if the format is okay.
Thanks so much for the work you have done here.

Sorry for the delay!
I have committed a corrected version of this pull request with https://github.com/uklimaschewski/EvalEx/commit/34993afaa7147de41600a6a27412867f83e23e2d.
There were two problems with your original pull requests #58 and #59:
Some import statements were missing and the new tests were not added to AllTests.java.


Updated setup tools for fixing issue with cryptography

Issue discussed here: https://github.com/pyca/cryptography/issues/3959
Travis build succeeded here: https://travis-ci.org/PseudoAj/pirant/builds/294027512

Coverage remained the same at 100.0% when pulling b15c515b7ea2fd6d4679f37c690006497b4f8ee0 on PseudoAj:master into 12ac95cbb91eba97a537bb3c36102dc501015ef4 on aayush26:master.


Add apisix CRDs

CRDs Source: https://github.com/apache/apisix-ingress-controller/tree/1.6.0/samples/deploy/crd/v1

Thanks @eyarz


Add olofIsberg's file

I was too quick to make the  request

As a reminder, you have: created a branch, created a file and made a commit, and opened a pull request


Simplify config IO and structure. Trim dependencies. Add tests.

@dwalluck  While its trivial to split the single to checkstyle out of this , the changes in dependencies was only possible by changing the configuration.

@dwalluck While its trivial to split the single to checkstyle out of this , the changes in dependencies was only possible by changing the configuration.

The dependencies change was affecting performance in the meantime, This commit could always be rebased after merging that one.


Removed old build scripts,

since the AutoFixture project now uses FAKE-based build scripts. The new
scripts have been tested, and been used to deploy new versions of
AutoFixture for more than a handful of versions now.
The old scripts are no longer maintained, and don't work, so it's
confusing for new contributors that they are still around.

:+1:


Bugsnag: java.lang.NullPointerException in DrawableContainer.java:823

Error in mSupply Mobile
java.lang.NullPointerException in DrawableContainer.java:823
Attempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.DrawableContainer$DrawableContainerState$ConstantStateFuture.get(android.graphics.drawable.DrawableContainer$DrawableContainerState)' on a null object reference
View on Bugsnag
Stacktrace
DrawableContainer.java:823 - android.graphics.drawable.DrawableContainer$DrawableContainerState.getChild

View full stacktrace
Created by Sustainable Solutions via Bugsnag

Closed similar for 2.0.0. Might occur on a newer version, or hopefully not!


CUDA kernel failed: invalid device function

train/test produce the following error:
Validation sanity check: 0it [00:00, ?it/s]CUDA kernel failed : invalid device function
void furthest_point_sampling_kernel_wrapper(int, int, int, const float*, float*, int*) at L:228 in pointnet2_ops/_ext-src/src/sampling_gpu.cu

I have run the training and test before successfully on this machine and cannot work out why now it fails - I do not think I have changed anything about the environment.
output of nvidia-smi:
Sun Jul  5 13:14:30 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.40.04    Driver Version: 418.40.04    CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Tesla V100-SXM2...  On   | 00000000:00:1E.0 Off |                    0 |
| N/A   36C    P0    24W / 300W |      0MiB / 16130MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

import torch
torch.version.cuda
> 10.1
torch.cuda.is_available()
> True

versions ($ conda list):
pointnet2                 3.0.0                     <pip>
pointnet2-ops             3.0.0                     <pip>
python                    3.7.7                hcff3b4d_5
pytorch-lightning         0.7.6                     <pip>

(I have also tried changing to other versions of pytorch-lightning - 0.7.1/0.84).
Any help greatly appreciated.

Please make sure your nvcc version is also CUDA 10.1.  You can check with nvcc --version.

thanks for reply, I have
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130

I guess this is the problem?

Yeah, things should work if you install at 10.0 version of pytorch or can get 10.1 compilation tools

I installed 10.1 compilation tools with $ conda install cudatoolkit-dev -c conda-forge, so I now have
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243

I also reinstalled the pointnet2-ops package with
$ pip install --user --force-reinstall --ignore-installed --no-binary :all: pointnet2_ops_lib

but I am still getting the same error.
I have also tried installing the pytorch version with cu100 using $ conda install pytorch torchvision cudatoolkit=10.0 -c pytorch but am getting the same error.

I have met the same problem mentioned here, and the solution I took is to reinstall the pytorch and downgrade to 1.4 version with consistent cuda version 10.0 (as the same as the version from nvcc -V), then reinstalled the pointnet2-ops package. Finally, the error gone away.
Python version: 3.6.12
Pytorch version: 1.4.0
conda install pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=10.0 -c pytorch

Hope my solution can help someone encountering this same issue.

I have met the same problem mentioned here, and the solution I took is to reinstall the pytorch and downgrade to 1.4 version with consistent cuda version 10.0 (as the same as the version from nvcc -V), then reinstalled the pointnet2-ops package. Finally, the error was gone away.
Python version: 3.6.12
Pytorch version: 1.4.0
Cuda version: 10.0
conda install pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=10.0 -c pytorch

Hope my solution can help someone encountering this same issue.

I tried this method and it works correctly, thanks!
I think this bug may result from cudatoolkit version. It seems that cudatoolkit=10.0 works but cudatoolkit=10.1 doesn't work.

Here is the best solution:
https://github.com/mkt1412/GraspGPT_public/issues/8


🐛 BUG: wrangler2 tries to open a browser to authenticate in CircleCI

What version of Wrangler are you using?
2.0.23
What operating system are you using?
Linux
Describe the Bug
When publishing in CircleCI without providing a CLOUDFLARE_API_TOKEN, it tries to open a browser. It timeouts quickly, but I suppose ideally it should not try to open a browser at all.
Demo
version: 2.1

jobs:
  browser:
    docker:
      - image: cimg/node:18.4.0
    steps:
      - run:
          name: "Publish to cloudflare pages (KO)"
          command: |
            npm i<EMAIL_ADDRESS>            mkdir public
            cd public
            echo "Hello browser" >> index.html
            CLOUDFLARE_ACCOUNT_ID=abcd npx wrangler pages publish . --project-name=open-browser-in-circleci --branch=main
workflows:
  release_browser:
    jobs:
      - browser:
          filters:
            branches:
              only: /^main$/

Will produce:

Yeah, sorry about that. We do not try to open the browser if the terminal is non-TTY (non-interactive). But CircleCI actually has a TTY terminal so we get it wrong. For metrics capture we have gone with the is-ci approach, which looks for certain environment variables; so we should probably do the same here.

@rozenmd Verified :smiley: well done!


New-AzureRmResourceGroupDeployment : CantAddAndRemoveCertificatesAtSameTime

I am trying deploy cluster
Facing an issue like below
New-AzureRmResourceGroupDeployment : 12:03:12 PM - Resource Microsoft.ServiceFabric/clusters 'clusterName' failed with
message '{
"error": {
"code": "CantAddAndRemoveCertificatesAtSameTime",
"message": "Can't add and remove certificates at the same request.",
"details": []
}
}'

[ ] New-AzureRmResourceGroupDeployment : 12:03:19 PM - Template output evaluation skipped: at least one resource deployment operation failed

@balakrishna222111 please share the document you are following so we can better assist.

@balakrishna222111 any update on this?

I will close for now. When ready let me know and we can reopen and continue.


Cyoa v1

@abake-enova Nice overall job on this. Take a look through the comments and submit a second iteration when you have a chance. I thought your code was very clean overall and easy to understand. Let me know if you have any questions.

Great! Thanks, I will get started with my second iteration.


Simplify Image url handling

Use case description
After an update, it seem that IlImage does nothing special anymore like ImageUrl that only generate an IlImage.
Acceptance criteria
ImageProvider is still easily usable
Proposed solution
Remove both classes and replace with a string each ImageUrl.
Alternatives considered
Do nothing
Is there an existing similar feature request?

[X] I have searched existing features and found no similar request.

[X] I have browsed the available API and found no way to achieve the use case I described.

Proposition:
val media: Media
media.imageUrl.url(ImageWidth.W1920)

val chapter: Chapter
chapter.imageUrl.url(ImageSize.MEDIUM)

val defaultDecorator = DefaultImageUrlDecorator(IlHost.PROD) // or custom decorator
media.imageUrl.url(defaultDecorator, ImageSize.MEDIUM)


C++23's move_only_function

This issue is a copy of one that already has more votes: https://github.com/lefticus/cpp_weekly/issues/52


Slave lag zero (and other zero values) not picked up by collectd?

There's something being dropped between the mysql plugin and collectd that I'm having a hard time tracking down.
mysql plugin verbose reports the following:
[2016-08-29 17:07:24] mysql plugin: Sending value: slave/slave_lag=0
But this metric never makes it through collectd. It just disappears. Now if the value is greater than 0, collectd passes it through just fine.
I don't see any setting where collectd drops zero valued metrics. I'm seeing this for a few other slave metrics as well. Am I missing something?

I figured it out why slave lag 0 was not being sent.

492 def dispatch_value(prefix, key, value, type, type_instance=None):
493         if not type_instance:
494                 type_instance = key
495
496         log_verbose('Sending value: %s/%s=%s' % (prefix, type_instance, value))
497         if not value:
498                 return
499         try:
500                 value = int(value)
501         except ValueError:
502                 value = float(value)
503
504         val               = collectd.Values(plugin='mysql', plugin_instance=prefix)
505         val.type          = type
506         val.type_instance = type_instance
507         val.values        = [value]
508         val.dispatch()

Line 497, value 0 is caught and a return is issued, causing metrics (slave_lag) with values of 0 to not be sent. If I comment out 497 and 498, the value goes through. This doesn't fully explain to me why 0 is being considered None.

I submitted PR #17 to help address this earlier today

Ok cool. I haven't had time to figure out why it was getting caught there, though.


nrfx uart: Poll API hangs in poll-out

Describe the bug
Using the UART polling API with UARTE as the API backend hangs forever in uart_poll_out.
This hangs in waiting for TX ready, which appears to be checking that the last TX transaction has completed.
however since no TX has happened this hangs forever.
From what I can tell the uart_poll_out function assumes that the async method is used, and does not handle just normal polling.
To Reproduce
Steps to reproduce the behavior:
overlay file:
lpuart: &uart1 {
	status = "okay";
	pinctrl-0 = <&uart1_default_alt>;
	pinctrl-1 = <&uart1_sleep_alt>;
	pinctrl-names = "default", "sleep";
};

&pinctrl {
	uart1_default_alt: uart1_default_alt {
		group1 {
			psels = <NRF_PSEL(UART_RX, 1, 12)>,
				<NRF_PSEL(UART_TX, 1, 13)>;
		};
	};

	uart1_sleep_alt: uart1_sleep_alt {
		group1 {
			psels = <NRF_PSEL(UART_RX, 1, 12)>,
				<NRF_PSEL(UART_TX, 1, 13)>;
			low-power-enable;
		};
	};
};

prj.conf:
CONFIG_UART_1_ASYNC=n
CONFIG_UART_1_INTERRUPT_DRIVEN=n

CONFIG_UART_NRFX_UARTE=y
CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y

main.c
static const char *poll_data = "This is a POLL test.\r\n";

int main(void)
{
	const struct device *lpuart = DEVICE_DT_GET(DT_NODELABEL(lpuart));

	for (int i = 0; i < strlen(poll_data); i++) {
		uart_poll_out(lpuart, poll_data[i]);
	}

	return 0;
}

west build -b nrf52840dk_nrf52840 && west flash --erase
west attach
See main thread hanging in wait_tx_ready.
Expected behavior
Polling working without other API calls.
Impact
Unable to use UART polling API
Logs and console output
Environment (please complete the following information):

OS: N/A
Toolchain Zephyr SDK
Commit NCS 2.6.0

Additional context
Last seen working on NCS 2.4.2

Update: I wasn't aware of the CONFIG_UART_NRFX_UARTE_LEGACY_SHIM option.
CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y is failing.
CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=n is working.

My bad, this was all caused by my in an attempt to fix another issue.
The explanation was caught by a reviewer in the PR even: https://github.com/zephyrproject-rtos/zephyr/pull/71156#discussion_r1555420539


fpm install error

Error after pulling dependency M_strings. Here is the log:
<ERROR>Key fortran is not allowed in package file
STOP 1

OS: Arch Linux
Fortran compiler: gfortran 12.2.1

This error is from dependency M_strings, I already open an issue in that repo. link


setting "for" attribute in label tag

Hi,
Is there any way to set the "for" attribute on a <label> using defineElement? I tried this and it didn't work:
el('label', { 'for': 'username' })
Thanks in advance

make sure u're setting an "id" and not just "name" on the input itself.
https://jsfiddle.net/u0tuag0e/

I see. I was setting the "for" on the wrong element which is why it wasn't working for me.


esm error throwing loadTs is not a function

Issue workflow progress

Progress of the issue based on the Contributor Workflow

[x] 1. The issue provides a reproduction available on GitHub, Stackblitz or CodeSandbox

Make sure to fork this template and run yarn generate in the terminal.
Please make sure the Codegen and plugins version under package.json matches yours.

[ ] 2. A failing test has been provided
[ ] 3. A local solution has been provided
[ ] 4. A pull request is pending review

Describe the bug

As mentioned in a downstream issue in graphql-codegen it looks like loading cosmiconfig-typescript-loader default export is buggy in esm. The "simple" fix would be to use default-import until this is addressed upstream.
To Reproduce

fetch local copy of https://github.com/dotansimha/graphql-code-generator/tree/master/examples/typescript-esm
run npm run codegen

Expected behavior
execution without error
Environment:

OS: Windows
NodeJS: 18.4
graphql version: 16.5
graphql-config version: 4.3.3

Closed via https://github.com/kamilkisiela/graphql-config/pull/1103

@n1ru4l if I'm still getting an issue like this in 4.3.5 is it probably an esbuild bundling issue? Something I need to mark as external?


System.AccessViolationException   at Grpc.Core.Internal.BatchContextSafeHandle.ReleaseHandle()

Using Grpc.Core.2.44.0 for C# as Nuget package for VisualStudio 2019 on Win2012 r2 server. My application running as service targets .net 4.6.1.
The C# program is crashing with AccessViolation error:
Unhandled exception (Process IsTerminating=True): System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at Grpc.Core.Internal.BatchContextSafeHandle.ReleaseHandle()
   at System.Runtime.InteropServices.SafeHandle.InternalFinalize()
   at System.Runtime.InteropServices.SafeHandle.Finalize().

I think we'd need more information to be able to help. Can you provide a working reproduction, additional logs, and/or crash dump (including native stacktrace)?

I updated all the dlls to build with same .net version and issue got resolved. Thanks for your time.


Add a hwprofile layer to hiera

In the new production environment, there are more than one server type.
This means there are different names for interfaces, so they need
different values for e.g. public_interface. Although there's some
correlation between server type and role, this is not reliable.
I'm hoping that the productname will be a sufficiently strong identifier
for these kinds of settings. If not, we'll have to revisit in the
future.

uggh that's ugly, but I totally get it...

is there a custom fact to set productname?

Uh, no? It's just there.

@bodepd Are you suggesting you don't have a productname fact?

I see the fact there on servers.

merging this.


x/net/icmp: ReadFrom+"ip4:icmp" returns corrupted ICMPv4 message on darwin

Unfortunately net.ReadFrom and ReadFromIP unconditionally drop an IPv4 header due to #7037. Also ipv4.PacketConn on darwin enables IP_STRIPHDR by default. So an IPv4 header process runs twice when we pass "ip4:icmp" to ListenPacket on Darwin.

Closed by https://go-review.googlesource.com/#/c/2082/

Closed by https://go-review.googlesource.com/#/c/2082/


Update Composer dependencies (2023-12-24-00-15)

Visual regression test passed!
View the visual regression test report


SSL connection not closed properly after handshake failure

Motivation:
When SSL handshake fails, the connection should be closed. This is not true anymore after 978a46c.
Modifications:

Ensure we always flush and close the channel on handshake failure.
Add testcase.

Result:
Fixes [#7724].

/cc @jianglai


Issues: Terms mapped to deleted OMIMPS terms

Overview
I noticed that mondo.sssom.tsv has several mappings to OMIMPS terms that no longer exist (slack convo).
Detail
As discussed on Slack, OMIM has a way of marking terms as deprecated, but it appears that these terms were just deleted. They are:
OMIMPS:610799, OMIMPS:156850, OMIMPS:616814, OMIMPS:300000, OMIMPS:617711, OMIMPS:105500
Here's a subset of mondo.sssom.tsv where these terms appear:

mondo_id
mondo_label
source_id

MONDO:0000049
obsolete invasive pneumococcal disease, recurrent isolated
OMIMPS:610799

MONDO:0000218
obsolete preimplantation embryonic lethality
OMIMPS:616814

MONDO:0000169
microphthalmia, isolated, with cataract
OMIMPS:156850

MONDO:0017138
Opitz G/BBB syndrome
OMIMPS:300000

MONDO:0020627
epileptic encephalopathy, infantile or early childhood
OMIMPS:617711

MONDO:0030923
frontotemporal dementia and/or amyotrophic lateral sclerosis
OMIMPS:105500

I then looked at each Mondo ID in mondo-edit.obo, and here's what I found:
MONDO:0000049 & MONDO:0000218: Didn't need to look; as you can see, they're already marked obsolete.
MONDO:0000169: This one is marked as an obsoletion candidate already. It's only xref is the deleted OMIMPS term.
MONDO:0017138: This one has many other source xrefs. Let's just delete the xref for OMIMPS:300000.
MONDO:0020627: This one only has the deleted OMIMPS term as its only xref. Perhaps we should obsolete this one? However, it is also part of this subset: subset: gard_rare {source="MONDO:GARD"}
MONDO:0030923: This one only has the deleted OMIMPS term as its only xref. Perhaps we should obsolete this one? However, it is also part of these subsets:
subset: clingen {source="MONDO:CLINGEN"}
subset: gard_rare {source="MONDO:GARD"}
subset: otar {source="MONDO:OTAR"}
Related

#7766

The only term that has yet to be handled in the table above is OMIMPS:617711. All others were tagged as MONDO:equivalentObsolete based on https://github.com/monarch-initiative/mondo/issues/7766


DaisyUI version?

Is this preset version-specific? If yes - please update to v4 https://github.com/saadeghi/daisyui/discussions/2507

This library depends on https://github.com/unscatty/daisy-untailwind
It appears that daisy-untailwind doesn't support daisy v4 yet according to its README.

PRs welcome btw!

Hello there. Yes, currently only versions from 3.6.0 to <4.0.0 are supported. Supporting v4 would need a significant amount of time, which I currently don't have, there are some breaking changes (not a lot) that would need to rewrite some parts of the code to make it work.
I will try to find sometime to tap into v4, but most likely not anytime soon 🫠
PRs welcome!


Question: about envoy network filter

Does Envoy have a network filter that can output the network packets of each proxy request, such as http request/repsonse header details?

I think the tap filter   provides similar functionality.

Correct ^

I think the tap filter provides similar functionality.

thanks a lot, I have already tested the tap filter and it worked well
I will close this issue