Introducing Ecto.Multi

Ecto.Multi is a data structure that stores multiple operations to run inside a transaction. It will also help clean up many cases of Repo.transaction as well as help reduce the use of model callbacks.
Let's see an example:
user_changeset = User.changeset(%User{}, params)
log_changeset = Log.changeset(%Log{}, event: "user updated")

multi =
  Ecto.Multi.new
  |> Ecto.Multi.update(:user, user_changeset)
  |> Ecto.Multi.insert(:log, log_changeset)
  |> Ecto.Multi.run(:charge_credit_card, fn changes_so_far -> {:ok, _} | {:error _} end)

case Repo.transaction(multi) do
  {:ok, %{user: user, log: log}} ->
    ...
  {:error, key_that_errored, %{user: user_changeset}} ->
    ...
end

All operations in Ecto.Multi are tagged and stored in the order they are defined. Duplicated keys should raise. Once built, the underlying Ecto.Multi struct can be given to Repo.transaction which will return {:ok, map_of_structs} or {:error, key_that_errored, map_of_changesets} where key_that_errored is the first key that failed the operation.
API

Ecto.Multi.new() - returns a new Ecto.Multi struct
Ecto.Multi.insert(multi, key, changeset_or_struct, opts) - stores an insert to be performed on transaction
Ecto.Multi.update(multi, key, changeset, opts) - stores an update to be performed on transaction
Ecto.Multi.delete(multi, key, changeset_or_struct, opts) - stores a delete to be performed on transaction
Ecto.Multi.run(multi, key, fun) and Ecto.Multi.run(multi, key, mod, fun, args) - stores a function that will be executed if the previous operations succeed. The function will receive a map with the result of all the previous operations (which must have succeeded up to this point). Returns {:ok, value} or {:error, value}
Ecto.Multi.all|update_all|delete_all(query, opts) - query based operations
Ecto.Multi.to_list(multi) - converts it to a list in the format [user: {:update, args}, log: {:insert, args}, ...]
Ecto.Multi.prepend|append(multi, other_multi) - prepends or appends the operations in other multi

Ecto.Repo.transaction/2 will be changed to accept Ecto.Multi structs with the semantics specified above. It is worth pointing out that, although insert and delete accept "structs", it always return changesets in {:error, key_that_errored, map_of_changesets}. The only exceptions are the run/3 and run/5 functions which will return the value in {:ok, value} and {:error, value}, or :skipped if the operation failed before the function was executed.
Implementation
I was thinking Ecto.Multi could be a struct with a list, that keeps the reverse ordering of operations, and a map, which keeps the key-value mapping. It is better than a keyword list because every time we add a new operation we want to check the key is new and that would be faster against a map.
FAQ
A: Why Ecto.Multi and not something like Ecto.Transaction?
Because Repo.transaction/2 is potentially only one of the many functions that may use it. For example, Mongo does not provide transaction support but supports performing multiple operations at once.
Acknowledgements

@robconery for #1009
@michalmuskala for https://github.com/michalmuskala/transchange and for pushing towards the idea

/cc @solnic @msch @chrismccord @jeregrine

That is awesome! :+1:
Is there a way for Ecto.Multi.run to dynamically add/remove operations from the Ecto.Multi?
My use case is that almost all cases where we use transactions right now we start by first checking if the user a) has access b) has the last state (version column). In case a where the user just doesn't have access returning {:error, :access_denied} works, but in case b we want to return the last state from the DB, while skipping the following inserts/updates/deletes which are the 'actual' changes. Is there a way to do that?
Maybe allowing run to return e.g. {:instead, other_multi} which will skip processing the remaining operations and instead process the operations from other_multi and then return a merged map of the results of operations of both Ecto.Multis?

@MSch theoretically you should be able to just call Repo.transaction with the new multi inside the run function. Though I am not sure if it is an actual improvement over calling Repo.transaction with a function. We could make it complex in the future if necessary but best to ship a simple version for now and build on that based on usage. Thank you!

:+1: This sounds fantastic. It has been great watching the conversation around this unfold.

Feel free to ignore this comment but I'm wondering if this is an Operationset to go along with Changeset? I find the name Multi a tiny bit awkward, especially when talking about it in the plural.

Thanks @josevalim this is exactly what I was looking for

This kind of functionality is often called "session". Maybe that could be a better name?

@solnic wouldn't it be called a transaction? i think multi is a fitting name. maybe sequence? not sure. i actually like operationset

The architectural pattern is Unit of Work if… we still care about Fowler’s stuff http://martinfowler.com/eaaCatalog/unitOfWork.html

On Dec 7, 2015, at 5:11 PM, Dexter Miguel<EMAIL_ADDRESS>wrote:
@solnic https://github.com/solnic wouldn't it be called a transaction? i think multi is a fitting name. maybe sequence? not sure. i actually like operationset
—
Reply to this email directly or view it on GitHub https://github.com/elixir-lang/ecto/issues/1114#issuecomment-162722027.

Hmm. Not sure if the intention of this feature is to provide a mechanism like UoW with dependency resolution for operations where they depend on each other and making sure that execution order is correct? From the examples Jose gave it looks like an explicit way of setting up a pipeline of operations for later execution. That's why I thought about a "Session", since that's what you do. You start a persistence session where one or more operations will be executed, possibly within a transaction, but the session does not imply a transaction as that can be db-specific.

I find the name "Session" confusing, there are too many things called Session. Calling it Ecto.Session would mean almost every time the concept is introduced it will be followed up by a disclaimer like "not your browser's session".
I am mostly ok with "Unit of Work" but it can introduce the mismatch @solnic has presented and that sometimes happens with Repo. If someone takes the definition to its heart, it will be confusing because it isn't a direct match.
My preferences so far are Ecto.Multi or Ecto.OperationSet. Thoughts? Also, feedback on the functionality besides the name is very welcome.
Thanks everyone for the feedback so far!

I like OperationSet more than multi... but I also don't want to be typing
Ecto.OperationSet everywhere.
On Tue, Dec 8, 2015 at 5:41 AM, José Valim<EMAIL_ADDRESS>wrote:

I find the name "Session" confusing, there are too many things called
Session. Calling it Ecto.Session would mean almost every time the concept
is introduced it will be followed up by a disclaimer like "not your
browser's session".
I am mostly ok with "Unit of Work" but it can introduce the mismatch
@solnic https://github.com/solnic has presented and that sometimes
happens with Repo. If someone takes the definition to its heart, it will be
confusing because it isn't a direct match.
My preferences so far are Ecto.Multi or Ecto.OperationSet. Thoughts?
Also, feedback on the functionality besides the name is very welcome.
Thanks everyone for the feedback so far!
—
Reply to this email directly or view it on GitHub
https://github.com/elixir-lang/ecto/issues/1114#issuecomment-162845430.

Ecto.Transaction was also an option, but we decided, we can't use it because this could work also with MongoDB (packing several changesets together), where there are no transactions.
I like UnitOfWork, but I'm not exactly sure we do all the things this pattern describes, so for people familiar with it, it would be quite confusing.
I like OperationSet more than Multi. And when it comes to typing: the situation I see use for this feature is to create sort of a service/use case layer that would extract business logic from the controller, leaving controller only with executing actual operations, talking to db, retrieving params from request, etc.
When used like this, you could easily import the OperationSet module and avoid typing all together.
One of the features I initially imagined for something like this was a way to simulate Repo.transaction call at the end, without actually going to the database. It would be really useful in tests for unit testing the business logic/service/use case/whatever layer in isolation. It should be analogous to how Ecto.Changeset.apply_changes/1 works for a single changeset.

@jeregrine alias Ecto.OperationSet, as: OSet
@josevalim I will do some testing later today with PostgreSQL. As far as naming, I'm perfectly fine with Ecto.Multi. Ecto.Operation also makes a lot of sense.

Oh, I forgot about one thing.
If we decide to go with OperationSet, let's name it Operationset for consistency with Changeset.

OperationSet is not a good name. Set semantics is that the order of its elements is irrelevant, which is the exact opposite of what we have here. I agree that Session is a common name used in different contexts, although it is a common concept in database libraries, esp. in Data Mapper pattern-based ones (not really relevant here, but there's a chance many people are familiar with this name because of that pattern).
As far as functionality goes, I'm not sure why Multi.run is needed. What's the reasoning behind this interface?

@solnic in a conversation with @michalmuskala I do remember we had a use case for running custom code but I can't recall it on top of my mind. Do you have any concern regarding Multi.run?

@josevalim it feels like out of scope of Ecto's functionality. Why would you want to run arbitrary functions using Ecto's interface? I think the result of executing Ecto's operations should be enough to decide what to do next.

I think the use case for run was coming from @chrismccord. If I recall correctly it was basically about deciding based on some external state to either continue or cancel the transaction.
The difference between running a function before call to Repo.transaction or after it, and via Multi.run would be that the later would be running inside the transaction.

@solnic I see. In the starting example:
  Ecto.Multi.new
  |> Ecto.Multi.update(:user, user_changeset)
  |> Ecto.Multi.insert(:log, log_changeset)
  |> Ecto.Multi.run(:charge_credit_card, fn changes_so_far -> {:ok, _} | {:error _} end)

The idea is that you may need some previous information, like the log.id, before continuing. This could also happen with dependent records, maybe you need to insert two records and need both of their ids to introduce the third. run would allow you to access the data so far while still being part of the transaction.

The main driver for the run idea, is so we can wrap up operations that should only be run given the previous being successful, and most importantly, rollback the transaction should the run fail. In the charge_credit_card case say for a shopping system, we would want to rollback an Order insert/update if the charge failed (stripe is down, payment processing error, etc). If we handled this code in the {:ok,  clause of the Repo.transaction, it's too late as we've already committed.

@chrismccord If I understand you right - the charge_credit_card method will call out to stripe, yes? If this throws in the current transaction callback - won't that rollback the entire thing? From what I understand it's only on a successful callback that COMMIT is called.
Then again my mind could be locked in Postgres land. Mongo wouldn't support this.

@chrismccord If I understand you right - the charge_credit_card method will call out to stripe, yes? If this throws in the current transaction callback (not the Multi stuff here) - won't that rollback the entire thing? From what I understand it's only on a successful callback that COMMIT is called.

Yes, calls out to some payment processor for this example and if it fails or raises then it rolls back the whole thing. The issue with manual rollbacks or raises is you have to compose that  yourself and it has turned into a nested series of repo calls and case statements, where all I want is to continue on success or rollback the whole sequence on failure. @robconery just so I'm not missing something, can you turn the following code sample into existing code that raises/rollbacks, so we can compare to what's already there?:
opts =
  Multi.new
  |> Multi.insert(:order, order_changeset)
  |> Multi.run(:products, %{order: order} -> decrement_stock_counts(order) end)
  |> Multi.update(:user, %{user | last_order_placed_at: DateTime.utc()})
  |> Multi.insert(:payment, payment)
  |> Multi.run(:charge_card, fn %{payment: %{trans_id: id} -> {:ok, ...} end)

case Repo.transaction(opts) do
  {:ok, %{user: user, charge_card: log}} ->
    ...
  {:error, :charge_card, %{charge_card: _errors}} ->
    conn
    |> put_flash("There was an error processing your payment")
    |> render("checkout.html")
  {:error, key, %{...}} ->
    ...
end

I agree with @chrismccord. I am already running into the issue where I ask "what if this query is dependent on the results of another query and that query fails? How do I revert the database back to a state that makes sense?" I've been writing transactions in SQL to overcome this pitfall and Ecto.Multi solves that problem.

Ecto.Multi.run is a welcome addition that will help with issues I face on a daily basis. I like that it is shaping up along the lines of distributed transactions (kind of).

@chrismccord Sorry I'm confused - probably as my question is a bit muddled. Let's try again...
If I run Repo.transaction and it fails anywhere in there, doesn't that result in COMMIT never being called? If COMMIT isn't called (in a system other than Mongo) then that's the same as the transaction dying. In fact I think you guys issue a ROLLBACK in there if an exception is thrown.
I was thinking something like this, with the current codebase:
case Repo.transaction fn ->
  charge = Stripe.charge_card(...)
  user = User.insert!(%User{email: "..."})
  log = Logs.insert!(%Log{user_id: user.id, entry: "Logged"})
end

If the call to Stripe.charge fails, that results in a throw which I believe will be caught by Ecto, which will then issue a ROLLBACK so nothing is written.
This can be a problem, of course, if you call out to another app - but I'm just talking about the DB at this point. Nothing manual needs to happen here.
Given this, I guess I'm unclear on what Multi is actually doing? I know I'm missing something, sorry for being dense.

@robconery Multi is doing what we have discussed on #1009. Your code is perfectly fine when you don't expect things to fail but, if you assume things can fail along the way because of data or constraints, then you need to wrap each operation in multiple case blocks with explicit rollbacks. Something like this:
    Repo.transaction fn ->
      case User.insert(%User{email: "..."}) do
        {:ok, user} ->
          case Log.insert(%Log{...}) do
            {:ok, log} ->
              Stripe.charge(...)
              %{user: user, log: log}
            {:error, log_changeset} ->
              Repo.rollback(%{log_changeset: log_changeset})
          end
        {:error, user_changeset} ->
          Repo.rollback(%{user_changeset: user_changeset})
      end
    end

In other words, multi is executing every step one by one and returning exactly which step is failing, accumulating the data along the way.
PS: Mongo can support Multi but, due to lack of transactions, it should not support Ecto.Multi that have run functions in it. This makes it incomplete in Mongo but if you need this feature, you need transactions, then don't use mongo. I am also ok with calling it Ecto.Transaction and just saying it does not work with mongo.

@josevalim Ah - the rollback needs to be explicit! For some reason I thought I saw in your source that you caught the error and let it bubble. That's what we do with Moebius:
https://github.com/robconery/moebius/blob/master/lib/moebius/runner.ex#L36
Then in the transaction method:
https://github.com/robconery/moebius/blob/master/lib/moebius/query.ex#L898
The exact error is returned with the {:error} and so far its working well.
It seems odd to me that you would need to rollback exclusively for each step and changeset. Doesn't a rollback apply to a transaction?

@josevalim Ah - the rollback needs to be explicit! For some reason I thought I saw in your source that you caught the error and let it bubble. That's what we do with Moebius:
https://github.com/robconery/moebius/blob/master/lib/moebius/runner.ex#L36

You can let it bubble. You cannot let it bubble when you want to explicitly pass information to outside of the transaction, which is what the example above is doing.

@josevalim So... if I follow you, you're saying that, with the following code, if Stripe.charge fails the transaction can still COMMIT?
    Repo.transaction fn ->
       user = Repo.insert!(%User{email: "..."})
       log = Repo.insert(%Log{user_id: user.id, entry: "Hi"})
       charge = Stripe.charge(...) #BOOM
    end

If that doesn't fail the transaction when Stripe.charge fails, methinks you have a bug.

No, if any of the code raises, we always rollback. The issue is that, if you are raising on Stripe.charge, causing it to rollback, and then rescuing the error later on, you are using exceptions for flow control. We don't want you to do that, you should explicitly signal it with {:ok, _} | {:error, _}. So you can use exceptions as in moebius but we also want to allow people to do the right thing and work with the regular tuples.

I don't believe I'm using anything for flow control, I'm handling an exception and doing the right thing: rolling back the transaction.  At the final point I am, indeed, pushing back with an {:error} construct :). Or I can make people use rollback at every step which is much cleaner :p.
OK, sounds like I do understand what the Repo is doing... I think. You'll rollback on a throw from Stripe.charge? Sorry if I'm being dense I still don't understand the need for Multi but I also don't want to drive this thread into the ground - so please do carry on. I'll read as comments come in and hopefully catch up.
Cheers and thanks for the comments!

Ah, I see what you are doing. If there is an error, you are returning an :error tuple from from your transaction. I find that confusing because if you get any error inside the transaction block, it will always return :error, even if the error was a programming bug (like undefined function clause error). Is this correct? That's why we introduced rollback. Our flow is this:

If the transaction block errors or throws, we rollback and reraise the error/throw after rollback
If the transaction block succeeds, we return {:ok, value}
If the transaction block rolls back, we return {:error, value}

1 is important because if there is a bug or an error, we are not silently rescueing it and transforming it into :error. It will be raised so it is properly logged with stacktrace and what not.

Yep, we're doing precisely the same thing. Which is no surprise I'm fairly certain I modeled it after your docs :).

@solnic is right, OperationSet is not a good name. Not a fan of Session either. I would suggest one of Ecto.Multi or Ecto.Transaction. Thoughts or other alternatives?

@josevalim how about Ecto.Flow? :)

+1 for Ecto.Transaction

Ecto.Transaction +1
Would we be able to use Ecto.Transaction/Ecto.Multi with a database like MongoDB?

Would we be able to use Ecto.Transaction/Ecto.Multi with a database like MongoDB?

No. I believe it simply can't work with the same semantics on Mongo (or maybe it can now that it ships with PG :P). It is ultimately a question mongo_ecto should answer though.

I like Ecto.Multi more than Ecto.Transaction, but I think I like Ecto.Sequence even more. Thoughts on that?
Overall I like the idea a lot. Can't wait to give it a try

No. I believe it simply can't work with the same semantics on Mongo (or maybe it can now that it ships with PG :P). It is ultimately a question mongo_ecto should answer though.

I believe it can work. It obviously won't give transactional guarantees, but it will allow you to batch multiple operations together.

This flow seems to fit the new with keyword perfectly. It seems setting this functionality up to utilize with and making Ecto require Elixir 1.2 would be the best option. That shouldn't be a problem since this is intended for Ecto 2.0 correct?

Also, from the way this is handled it seems like it's used almost exactly like Streams are used. Perhaps Ecto.Stream is a fitting name that will align to Elixir's brand as well.

@mgwidmann could you clarify? this is definitely not a stream. :) it is not a collection of data of any sorts. Maybe run gives an idea of a callback but even the arguments and expect results does not map to something like a stream.

Was just thinking its built up as a data structure like a stream is and then executed with run like a stream is. Was thinking of it like a stream of transactions to be wrapped together, where transactions are supported of course, otherwise its just a stream of commands to be executed in the DB.
Was just a naming thought :)

Well, working with data structures is common throughout Elixir, not specific to streams. And it is not executed by calling run, it is executed by calling Repo.transaction. run is a function that will be executed later inside the transaction. :)

How about Ecto.Procedure? Agree that we shouldn't bikeshed on the name too
much though.
On Wednesday, 16 December 2015, José Valim<EMAIL_ADDRESS>wrote:

Well, working with data structures is common throughout Elixir, not
specific to streams. And it is not executed by calling run, it is
executed by calling Repo.transaction. run is a function that will be
executed later inside the transaction. :)
—
Reply to this email directly or view it on GitHub
https://github.com/elixir-lang/ecto/issues/1114#issuecomment-165127069.

Two more suggestions: Ecto.OperationChain or, more simply, Ecto.Chain
I presume Multi came from Redis (or another tool, or coincidence). I’ve never much liked it in Redis.
I like OperationSet, which I agree could imply a lack of ordering. Since OrderedOperationSet is too verbose (and OperatioPoset too obscure and ugly) instead I suggest Chain and OperationChain, both of which imply order.
That said, I love terse code, so I could learn to live with Multi, but perhaps not love it.

I think we need a sense of humor on this:
Ecto.Donam

Or maybe...
Ecto.MonadNotMonad

I know! How about Ecto.Multi?????

@robconery nice. How about Ecto.OpNoop or Ecto.IfOopsNoop?
Actually, sorry to have initiated the naming controversy on this thread. :disappointed:
I :heart: Ecto.Multi!

Just I quick question, can new with operator make this snippet better?
    Repo.transaction fn ->
      case User.insert(%User{email: "..."}) do
        {:ok, user} ->
          case Log.insert(%Log{...}) do
            {:ok, log} ->
              Stripe.charge(...)
              %{user: user, log: log}
            {:error, log_changeset} ->
              Repo.rollback(%{log_changeset: log_changeset})
          end
        {:error, user_changeset} ->
          Repo.rollback(%{user_changeset: user_changeset})
      end
    end

If yes, and if I understand correctly the main advantage of using Multi over it is that we're getting key_that_errored, is that right?

No, the biggest win for me is ability to pass the whole operation around as a data structure.
This means you could create it in one place (having the functions pure, and extremely easy to test), and defer actually running everything until the controller. This allows you to separate business logic - manipulating data, from impure operations such as interfacing with database.

Oh, you're right. Didn't think about that, but on the other hand, I think if I'm trying to do many things inside one transaction, probably best place to create that operation is controller, anyway.

Ok, couple of new thoughts/questions:
user_changeset = User.changeset(%User{}, params)
log_changeset = Log.changeset(%Log{}, event: "user updated")

multi =
  Ecto.Multi.new
  |> Ecto.Multi.update(:user, user_changeset)
  |> Ecto.Multi.insert(:log, log_changeset)
  |> Ecto.Multi.run(:charge_credit_card, fn changes_so_far -> {:ok, _} | {:error _} end)

case Repo.transaction(multi) do
  {:ok, %{user: user, log: log}} ->
    ...
  {:error, key_that_errored, %{user: user_changeset}} ->
    ...
end

In this example, can I get reference to user updated in :user operation in :log operation? That's the case I encounter quite often, when subsequent operations needs a data (often id) from previous inserts. Example: let's say our log should state "User with id #{id} created" and first operation is insert not update.
Second question, currently I have this snippet of code in my app:
case Repo.transaction fn ->
  location_params = game_params["location"] || %{}
  case Repo.insert Location.create_changeset(location_params) do
    {:ok, location} ->
      case Repo.insert Game.create_changeset(game_params, location.id) do
        {:ok, game} ->
          case Repo.insert Attendance.host_changeset(game.id, conn.assigns.current_user.id) do
            {:ok, _attendance} ->
              case Repo.update Game.players_count_changeset(game, :inc) do
                {:ok, game} -> %{game | location: location}
                {:error, changeset} -> Repo.rollback(changeset)
              end
            {:error, changeset} -> Repo.rollback(changeset)
          end
        {:error, changeset} -> Repo.rollback(changeset)
      end
    {:error, changeset} -> Repo.rollback(changeset)
  end
end do
  {:ok, game} -> conn |> render("show.json", game: game)
  {:error, changeset} -> conn |> error(changeset)
end

That Game has many validations, and I'd love to validate game_changeset even before transaction, so if user send not valid game_params I don't start transaction or don't create Location, but just respond with error.

In this example, can I get reference to user updated in :user operation in :log operation? That's the case I encounter quite often, when subsequent operations needs a data (often id) from previous inserts.

If they are associations, you should use the association support that exists in changesets today. Other than that, you can always use run.

That Game has many validations, and I'd love to validate game_changeset even before transaction, so if user send not valid game_params I don't start transaction or don't create Location, but just respond with error.

I think Ecto.Multi could do that automatically, yes.

If they are associations, you should use the association support that exists in changesets today. Other than that, you can always use run.

For example, here:
case Repo.insert Location.create_changeset(location_params) do
  {:ok, location} ->
    case Repo.insert Game.create_changeset(game_params, location.id) do
      {:ok, game} ->
        # some code
      {:error, changeset} -> Repo.rollback(changeset)
    end
  {:error, changeset} -> Repo.rollback(changeset)
end

Game belongs_to Location, since I want to store location_id within games (that Location class in facts belongs to other models too, User, for example). AFAIK association support for belongs_to didn't come yet. Btw, there is no problem at all. I see run receives changes_so_far so there is no problem.

I think Ecto.Multi could do that automatically for the first entry, yes.

Not sure what you mean by first entry, but I want to validate changeset of second operation. Actually it'd be great if Multi validated all changesets before starting transaction. (Of course I understand some changesets may become invalid during transaction (constraints), or some changesets can't be validated if created with run since they're dynamic).

We are going to support belongs_to in 2.0, which is the same version Milti will land but you could always flip them. There is nothing stopping you from adding the location association to the game changeset and inserting the game changeset. :)

Not sure what you mean by first entry, but I want to validate changeset of second operation. Actually it'd be great if Multi validated all changesets before starting transaction. (Of course I understand some changesets may become invalid during transaction (constraints), or some changesets can't be validated if created with run since they're dynamic).

This is exactly what Ecto.Multi will do. We will traverse all the operations before starting the transaction, and if we know any is not valid, we won't even start the transaction and return the error right away.

@michalmuskala wow, that's great. I wasn't sure yet how much Multi would improve over Repo.transaction + new with form, but now I start to see some advantages.

A hearty +1.
Regarding the name, Ecto.Multi is as good as any other suggested name, and clearly indicates the intent IMO. Let's go with it.


Make delete docs more verbose.

Potential issues

Some folks reading the delete instructions might not know the best way to clean up after un-mounting.
They might expect un-mounting to also do this when it doesn't.

Added an explicit step for removing and added warning not to try deleting before un-mounting.

@derrickstolee seems one of the CI was cancelled for a timeout maybe? Or the agent machine was restarting? I don't think I have perms to request it re-run but feel free to force merge this if you are comfortable, otherwise, somehow re-queue the CI?

/azp run PR - Windows - Functional Tests (Sparse Mode)


Added Health Check limimation

-　This instance replaced limitation reset 24 hours from the time of the first replacement instance.

@msangapu-msft
Can you review the proposed changes?
When the changes are ready for publication, add a #sign-off comment to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

Thank you for your feedback, but we don't see a need to document this. #please-close


DiabolicUI Minimap is too dark in some areas.

Description
The DiabolicUI Minimap is too dark in some areas, particularly Stormheim. There could be others.
Version Number
1.3.103-Release
Steps to Reproduce
Monitor the map while in Stormheim.
Expected Behavior
The map should be readable at a sensible brightness.
Actual Behavior
Map is too dark to clearly see roads at a glance.
Only DiabolicUI Enabled
The UI-changing Addons I have are: DiabolicUI, Goldpaw Core, Goldpaw Trader/Merchant, Adapt (Almost Default Animated Portraits), Bagnon, SexyMap, Masque, Engraved, rObjectiveTracker and Deadly Boss Mods.
For this test, I disabled SexyMap.
Additional Information
The World Map is affected too. Likely an option to toggle or change this should be included.
Error Log
N/A
Screenshot

Not that dark. But in 1.3.107 I still made it slightly lighter, though. Did the same to the WorldMap. So hopefully that'll help a bit. :) 👍


publish automated builds to dockerhub registry

builds are automated now: https://hub.docker.com/r/alertlogic/erllambda/


Daylight Savings Causes Range Style Issues

This fixes an issue where if the flatpickr is in range mode and the user selects the first date on a month where daylight savings time start or end and the selected date is after the date on which DST changes, the styles are not properly applied to the selected date.
Link to detailed issue: https://github.com/chmln/flatpickr/issues/1106

This doesn't quite fix it. Closing for now.

Initial fix was modifying the selected date instead of adding days to it. Latest commit should resolve this.

Hey @kmagilavy
The fix is even simpler and doesn't require modifying existing dates.
See https://github.com/chmln/flatpickr/commit/3f2a9acbbe10f4af84e74f8571032c9aae4ce7bb
Thanks a bunch for reporting the issue & for the PR.

Thanks for the quick work!


Dashboard export overlay never stops spinning

seems to be a parcel caching error and not a real bug.


RFC: revel devil

The request for comment is to create and evil system so vile and throw it at your system.
 revel devil bitbucket.org/my-toilet
> u are about to launch the revel devil, are u ready

enter yes no or or foo bar,, i dont care.. press z to stop
and then u see < stuff running >>> on shell an sim...

The devil command does a few things such as..

launch fultimple requests for /AOL/win32.exe.favicon
issue dos attatack at random
throw every messed up regex test sofa
laucnh pretend hits to your site.. laucn then as jobs..
the @devil?hit-m-bay-one-more-time=101984
make revel crash ..
make your test db update and mangle data.. ie real stuff changed..

I'm not sure Revel should have these kinds of benchmarking tools built-in when there are more comprehensive tools already in existence, though this is very imaginative.
Also, it's nice that you're giving us an example of how RFCs could be used along side GH issues, but we must use our RFC repo to manage this information in order to maintain clear structure.

Ok what I want now is revel devel .. ie a switch mode

see Revel Devel or revel devel or revel lever
https://github.com/revel/cmd/issues/21
== lever ==


Revert "Don't publish unnessessary files."

This reverts commit 641d3bc6f61726f7302d69005b327582c0123617.

@bitwiseman @simondel
looks the npmignore ignore all file
so i revert this commit for quick fix

#1251 already fixes this


#61 fetch default mappings from github

We can hold our default category mappings in https://github.com/electrolux-oss/infrawallet-default-category-mappings/blob/main/default_category_mappings.json to avoid releasing new NPM packages just because of a mappings update.
When the backend starts up, it first tries to fetch default mappings from GitHub, if it fails, then it seeds the database using the local JSON file.

@emillg  The new implementation is ready for review. Now the database is no longer needed. We have a singleton CategoryMappingService that fetches the mappings from GitHub.
It is a scheduled task and runs every 4 hours. After getting the mappings from GitHub, the service transforms the mappings to a 1:1 mapping to improve the performance. If no mapping is found, the service performs a regular expression search. If there is a match, it updates this 1:1 mapping.


Error: fatal: bad revision

Hello,
When I try
fluxctl --k8s-fwd-ns=flux sync

I got
Synchronizing with git@bitbucket.org:XXX/can-docker-gitops.git
HEAD of master is 3c5f564
Waiting for 3c5f564 to be applied ...
== Error ==

Error: fatal: bad revision 'eks-staging-can..3c5f564'

We don't have a specific help message for the error above.

and
ts=2019-03-29T12:28:40.950134623Z caller=loop.go:90 component=sync-loop err="exit status 129"

when I try to add a tag:
git tag -a -f eks-staging-can %ID%
git push --tags

then I got
ts=2019-03-29T12:14:48.345991395Z caller=loop.go:90 component=sync-loop err="fatal: ambiguous argument 'eks-staging-can': both revision and filename"

I gave in the config:
--git-path=common
- --git-label=eks-staging-can

I also tried to delete Flux and deploy again - same result.
Can you please advise?
Thx M

This is a known issue when you have a file in git that is the same as your tag, it has been resolved in #1829 but has not made it into a release yet.
The current workaround would be to change your --git-label to something that is not a file in git.

ah, ok thanks
I have changed label and it started working
suggestion - please update documentation here: https://github.com/weaveworks/flux/blob/master/site/faq.md
--set git.label=cluster-name
--set git.path=k8s/cluster-name

if you do, you will end up in my situation


[morx] Support AAT action type to insert glyphs

Thanks Sascha!

Thanks Sascha! Welcome back :+1:

FWIW, I already implemented Insertion in HarfBuzz.  So, looking forward to the tests!


There is no default CRI socket

/kind bug
What steps did you take and what happened:
In CAPA v1alpha1 the containerd socket was selected if no other CRI socket was specified. This is planned for CAPV 0.4.2 (v1alpha1) as well. However, in the new Kubeadm Bootstrapper there is no longer a default CRI socket. CRI auto-detection did not land until Kubernetes 1.14, which means the Kubeadm Bootstrapper generates bootstrap data that will cause Kubernetes 1.13-based machine images to fail unless a CRI socket is explicitly selected.
This was fixed in CAPV v1alpha2 so that containerd is the default socket, and there are plans to do the same for CAPA.
What did you expect to happen:
Since the CAPI image builder creates machine images based on containerd, it makes since for this bootstrap provider to default to the containerd socket if no other CRI socket is selected.
Anything else you would like to add:
I believe this should be treated as a regression from CAPA and CAPV v1alpha1.

@akutz I worry a bit here that we may be optimizing for v1.13 here vs optimizing for v1.14+, especially as we near the end of support for upstream v1.13 with the release of v1.16.
That said, I do think this highlights a certain class of regressions that were introduced in v1alpha2 compared to v1alpha1, which is that the bootstrapping provider no longer has direct communication with the infrastructure provider in order to set defaults that are infrastructure provider specific. This affects not just the provider examples needing to explicitly set the cri runtime (in the case of v1.13 clusters), but also needing to specify cloud provider arguments (for all deployed k8s versions). This is something that we should start addressing in the v1alpha3 cycle, since this will likely require API and component contract changes.
In the meantime, I think the approach taking by CAPV for specifying the CRI configuration in the examples is likely the right approach for v1alpha2 and should also be followed for other providers that have a need to support k8s v1.13 and also default to containerd as the CRI runtime.

/priority important-soon
/milestone Next

@akutz do you still need this for 1.13 support in v1alpha2?

Closing for #131. When a defaults mechanism is provided, it will solve this issue.


Sticky scroll: unexpected line becoming sticky

Testing #156175

Here I found it weird that the last line would become a sticky line actually.

 But I think what I will do is stick to the top only outline element when they span more than a certain number of lines.

Fixed with : https://github.com/microsoft/vscode/pull/156306/commits/9f331b70b668621f90ba9517b6fe335d8f6b4ef0


Publish to PyPI

Update trove classifiers in setup.py (how does this work with Poetry?)
Update HISTORY file
Add ENCRYPTED pypi password to travis.yml

Published manually. No history since it's the first release.

See issue #17 for Travis configuration


Update CLI installation instructions

Now that we have Homebrew and APT packages available, we need to update the documentation on how to install the CLI.
For apt on Ubuntu:
$ echo "deb [trusted=yes] https://apt.fury.io/depscloud/ /" | sudo tee /etc/apt/sources.list.d/depscloud.list
$ sudo apt-get update
$ sudo apt-get install depscloud-cli
$ deps --help

For brew on OSX:
$ brew tap depscloud/tap
$ brew install depscloud-cli
$ deps --help

The binary can still be downloaded through the releases section, but this will be the preferred way.

Requires completion of https://github.com/deps-cloud/deps.cloud/issues/41


Exporting diagram to XML

Hi! Awesome library! Thank you for the contribution. I wanted to know if you were thinking of adding an XML export / import to the library. Thank you!

Hi, do you mean BPEL?

yes!

Same question! Would be awesome addition.

@nraffa-five1 @vetertann Thanks for providing feedback. I try to understand your use cases better. Why do you need to export the diagram to BPEL? Do you mind to share your use cases?

My use case is that I need to export the BPMN 2.0 Diagram so that my user can edit it if he doesn't like it. This is because at first the diagram gets automatically generated but I would like to offer the possibility of export. A PNG picture file wouldn't help much as they can't edit that, that is why I need the generation of XML code for the BPMN 2.0 Diagram. Thank you!

@csgoh same as above, first I pass a simple DAG and create BPMN model, then I need user to further work with the model, add gates and/or rename something ,some details that were not in the initial design. Your library nails layout with lanes, which is great.

@nraffa-five1 @vetertann It sounds like you guys want to export to the BPMN XML specification, not BPEL. They have completely different file formats and serve different purposes. Let me find some time to add the functionality. 😄

That would be awesome! Let me know if I can support you in any way! I would love to understand how does that mapping happen under the hood.

Same here, and that would be awesome!

Still working on it. Stay tuned. ☕

oh damnnnn!! ❤ thank you so much, you rock!

@nraffa-five1 @vetertann ProcessPiper v0.8.0 now supports the export to .bpmn function. Give it a try. See this page  for more information

Oh woooowww, you are amazing @csgoh !!! Thank you so much! I will give it a try, but seeing it on the first glimpse, it works amazing!

@csgoh  Run first tests, works like a charm, with PERFECT layouting. Incredible, even Camunda's Fluent Builder fails to do this, not talking about lanes and colors... This is amazing, really, thank you!

Hi @csgoh ! Yes of course, I will do that. Thank you very much. I will let you know what I find :)

@martisaw Thanks for your feedback. At this point of time, I have no plan to make the business process model executable. ProcessPiper is about visualising the business process, it was never intended to be used for execution.

@nraffa-five1 Can you try exporting a bpmn model to Flowable with the latest version v0.8.1?


Stuck in software loop

Version 3.1.2
Farmbot is stuck in a loop (see below). I have installed latest OS version, Farmbot was working, stopped working after sending toggle of endstop on/off.
If you haven't had this issue beforehand, I could offer my bot as testing device.
[FILTERED]
6:23 pm
summer-fire-798 is starting serial services
6:23 pm
setting previous mcu commands.
6:22 pm
[FILTERED]
6:22 pm
summer-fire-798 is starting serial services
6:22 pm
setting previous mcu commands.
6:21 pm
[FILTERED]
6:21 pm
summer-fire-798 is starting serial services
6:21 pm
setting previous mcu commands.
6:19 pm
[FILTERED]

Thanks for letting us know, @bautze . We will take a look. I have a suspicion it might be related to farmbot_os/292.
CC: @ConnorRigby

This happens when farmbot can't communicate with it's Arduino. Have you tried a reboot?

I also had this issue a few times. I felt like its coming everytime I try to change hardware parameters. Even after many reboots it came up again.

The hardware parameter save button can cause the bot to be pretty unstable the way it is right now. We have a fix for that in our staging environments that should fix it hopefully.
any steps i can do to reproduce the loop you guys are seeing?

Tried like 30min to reproduce, no success yet. My Farmbot was unplugged over night, don't know what could have changed or if its just rare.

Yes I tried reboot, did not change anything. To reproduce, I would recommend clean install of latest version, then doing first-time set-up, moving a bit around, sending toggle request to device config and that did the trick for me. The bot then thinks it is at -1, -1, -1. In case it is related, I should maybe wait for new fix and then try if I see it again.

Something that might be helpful is if logging level would be higher as default setting for the moment, this way we could maybe provide more info.

Toggles shouldnt cause it i wouldnt think.
This problem comes from the bot not being able to negotiate communications with the arduino firmware.

Sounds reasonable as toggling not working would be a consequence of the communication issue.

Is is working for you right now @bautze ?
My setup seems to work fine, saving hardware parameters are still bugged, of course, but It does no more stuck in loops.

No, still not working, what did you do to make it work?

Last thing I did yesterday, was flashing to an older OS Version, and then back to V3.1.2. When it was done I immediately shut it down. Now starting almost 24h later I have no problems anymore. Cant imagine this would help.

I did a clean install of V3.1.3, it did not accept my configuration, I pressed the reset button on the ramps, then the configuration went through and Farmbot booted. Afterwards, all device hardware configuration was gone, toggle buttons are yellow, impossible to set devices. Log output:
8:05 pm [FILTERED]
8:05 pm reading all mcu params.
8:05 pm (red) [FILTERED]
8:04 pm apiculate-glitter-455 is starting serial services
8:04 pm apiculate-glitter-455 is synced!

Would it help for debugging if I used staging.farmbot.io ? (Do you have a higher loglevel there?)
What does [FILTERED] stand for ?

Sorry for pushing.

[FILTERED] Just means it might be a sensitive message, so we dont push it to the logs for security purposes.
Pressing the reset button on the ramps board is usually a pretty bad idea, and can cause the bot and ramps to be out of sync pretty bad.
When you dont hit the reset button and boot up your bot, are you able to use toggle buttons on the settings? If so you have a good connection between your arduino and bot. The fix for the other (non toggles) is in development right now and should be ready really soon.
https://staging.farmbot.io does not have anything helpful for end users and we don't suggest using it unless you are a developer.

I pressed, since after flashing latest OS on SD-card, I did not manage to get out of configuration (<IP_ADDRESS>) and my bot did not connect to the webapp. This was the last option I saw and apparently afterwards, it connected. I understand that this is usually a bad idea.
When my bot is up and running, I do not manage to toggle buttons. To me this seems odd, as I would expect it to work after a fresh reinstall of the OS (via dd). Everything is connected just the way it was when it last worked (V3.1.1).
Do you know, how I could check (maybe on the pi via ssh) if my arduino is responding properly?

Fixed by Version 3.1.4


Control type validation is case-sensitive

The following control types can be defined in the HUD schema: Checkbox, Color, Colour, ColorPicker, ColourPicker, DropDown, DropDownMenu, Select, Combobox, Number, Integer, IntegerUpDown and Crosshair.
If the control type defined in the schema is not following the exact capitalization, an error will be thrown (see below). The control type should be case-insensitive so to not cause issues for users who are creating their own JSONs.

Also, methods such as MoveCustomizationFiles do not consider all control types of the same group. For example, the editor will allow Combobox but not Select, DropDown and DropDownMenu which are just different names for the same control type.

Fixed in 6ff95c37176fedb1587d6c0ab0b9a744a608afdd


Link Deploys of EFG and EFG_TRAIN

This is by no means a finished solution.  Still figuring this out.
Part of the EFG road map.
What
The stipulation on the deployment of the newly hosted EFG app is that EFG_Training must be deployed every time EFG (prod) is deployed.  Doing this within
the current 'Deploy_App' Jenkins job would prove quite complicated so we opted for a separate deploy job in Jenkins.
How
Created a new job template specifically for EFG/EFG_Training.
Statically set choice parameters as opposed to a generated list from a rake task.
Defined new post build task 'Trigger-Parameterized-Build'.  This will trigger the same Jenkins job it's defined in with the TARGET_APPLICATIONparameter set to 'EFG_TRAINING'.

I've added an additional commit: f4cd16688d96d7ac6582b1146e9f82b14e1eed9a
I haven't squashed this so we can see the changes I've made more clearly.

The way that I thought it would work is that we have a separate Deploy_EFG job, which then triggers the Deploy_App job, which can also be used to deploy efg-training as a standalone deployment. This was to avoid Deploy_EFG triggering itself, which would then trigger itself, which would then trigger itself... and so on.
I guess we should actually only include this job in Staging and Production. If people think there's a better way, maybe by just manually building in the efg-training deploy job into the builder shell itself, then go for it.


When testing, store() method store file in storage/framework/testing instead of storage/app/public

Laravel Version: 5.5.4
PHP Version: 7.1
Database Driver & Version: Sqlite

Description:
I am testing avatar upload, as said in docs:
       Storage::fake('public');
        $this->json('POST', 'api/v1/users/' . $user->slug . '/avatar', [
            'file' => $file = UploadedFile::fake()->image('avatar.jpg')
        ]);

        $this->assertEquals($file->hashName(), auth()->user()->avatar);

        Storage::disk('public')->assertExists('avatars/' . $file->hashName());

This works great, but in my controller, just after upload, I resize pic with Intervention, so, I must do:
$file = request()
            ->file('file')
            ->store(config('images/avatar'), 'public');

        Image::make(storage_path('app/public/' . $file))
            ->resize(...);

when testing, my controller blows because store() method upload avatar in storage/framework/testing/images/avatar.
I wouldn't like to add extra logic in controller like ìf (env === 'testing) ... ` to manage this case.
Is there a way to disable store() behaviour?

I didn't get what's wrong.
First: What config('images/avatar') returns?
Second: Are you storing the image twice? Calling store and Image::make?
Are your tests correctly?

When Accessing web app, file is saved to storage/app/public/images/avatar
When testing app via PHPUnit, file is saved to  /framework/testing/disks/public/images/avatar
Image::make(storage_path('app/public/' . $file)) doesn't create another file, it create an Intervention instance to manipulate image.
So when testing, it tries to find storage_path('app/public/' . $file), but file doesn't exists.
I should do:
if (testing){
     return Image::make(storage_path('storage/framework/disks/public' . $file))
}
return Image::make(storage_path('app/public/' . $file))

But it is not a good practice to do that.

Please ask on the forums, this repo is for bug reporting only. You can use https://laracasts.com/discuss or https://laravel.io/forum which are forums with a very large community of developers helping each other.

The file locations during tests is different than on production, your assertions has to take that into account.


May I know how to build the model for myself?

Thanks!

The training code has been updated.
Please enjoy it. thanks!


Fix getId/id return type for entities

Changes are non BC, modification of mapping does not result in any new SQL statements
Fixes https://github.com/Sylius/InvoicingPlugin/issues/206

@lchrusciel review please

@diimpp Sorry for that, especially that the PR have been opened for a long time, but I'm closing it as these are the changes that we don't want to have in this plugin. Of course, feel free to share your thoughts about that if you want to.

@GSadee same change to the RefundPlugin was accepted. https://github.com/Sylius/RefundPlugin/pull/199
There are tests and many other fixes besides getId(): ?int.
How come you're closing this?

@GSadee don't you see related bug report as well? https://github.com/Sylius/InvoicingPlugin/issues/206

I've rebased PR to the current master, I can remove getId(): ?int typehint in favor of getId(), but it means no getId(): string as well.

@GSadee @Zales0123 @CoderMaggie hey guys, closure of this PR needs to be re discussed.
There are bugs, that this PR closes and very similar PR for RefundPlugin was merged. I've answered above for all raised points.
https://github.com/Sylius/InvoicingPlugin/pull/208

Hello @diimpp! I once again, after @GSadee, apologise for such a long response time. Going straight to the problems about the review here.

I would definitely bump the idea of extracting some changes from this PR. It's named Fix getId/id return type for entities but there are definitely more things done here. You doubted in this comment that extracting these changes would make any difference, but the conversation around them clearly shows, that the opinions and comments touch different areas of application (e.g. configuration vs implementation) - which can be a clue that these are separate changes and should be processed separately :)
I would resign from changing the return type of getId() methods. You're both (@diimpp and @GSadee) right - this is not defined in the ResourceBundle so should not be here as well (first premise) and because of that can be configured to be e.g. UUID rather than int and we should not block it (second premise) :dancer:
I'm having a big dilemma with default types in mapping configuration 💥 On the one hand, indeed in most of the places in Sylius we define them. I don't know is it because when Sylius started to be developed it was not yet clear in Doctrine? Or maybe our approach was different? 🤷♂ No clue. On the other hand, we trust Symfony and Doctrine as our main dependencies and have a great test suite, that would protect us from any differences if those happens :) So I would personally be for not defining them... but I have no strong opinion about that. Maybe @lchrusciel has some opinion?

Cheers and sorry one more time for such a delay in answer 🖖

@Zales0123 Hi, thank you for update.

Please feel free to re-use any commits or changes from this PR.
You need to decide on the strategy, there are all three options already in the codebase with no type hints, with string and int type hints. There is open bug with overly strict int type hint as well, which is open for more than a year now. (Side point, both of you suggesting somebody might want to change ID field type to string/UUID, but think about this from regular developer view point -- you install bundle from packagist and you're going to change ID mappings of 3rd party code without and public contract or official support? Obviously not, acceptable solution is to introduce publicId property with any data type and not to touch original mappings, so this case is not important for consideration)
Explicit doctrine mappings are form of documentation as well as already selected approach for sylius/sylius:1. Look at this from end-developer view point, who just does another task for the acme company and doesn't care for doctrine or sylius defaults -- those explicit mappings helps such developer.
I remember there was some weird field on some entity either in this plugin or refund plugin, where I couldn't detect field content from the codebase and mappings were missing. I ended up experimenting on mysql5.7,8 to see which defaults would be real. What about postgresql in this case? There is just too much uncertainty for plugin's end user.


Gonzales 3.2 - Fix force pseudo nesting

Fixes the force-pseudo-nesting - rule to work with the latest version of gonzales.
Note: Travis will fail as there are broken tests on gonzales-3-develop branch. Verify by checking force-pseudo-nesting rule test success.
DCO 1.1 Signed-off-by: Dan Purdy<EMAIL_ADDRESS>

:+1:


remove 'tools' folder level

solves #102

Hello @JuliaSprenger! Thanks for opening this PR.

In the file bep032tools/__init__.py:

Line 1:50: W292 no newline at end of file

Do see the Hitchhiker's guide to code style

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

24 of 26 (92.31%)  changed or added relevant lines in 9 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-1.9%) to 71.053%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

bep032tools/generator/BEP032Generator.py
2
3
66.67%

bep032tools/generator/BEP032Templater.py
4
5
80.0%

Totals

Change from base Build<PHONE_NUMBER>:
-1.9%

Covered Lines:
864

Relevant Lines:
1216

💛  - Coveralls


Is there an existing issue for this?

[X] I have searched the existing issues.

Which plugins are affected?
Core, Database
Which platforms are affected?
Windows
Description
Using "runTransaction()" generates an error in Windows and closes the application immediately. The same code normally works for Flutter Web.
Reproducing the issue
DocumentReference dbVersionsRef = db.collection("any/collection").doc(docID);
await db.runTransaction((transaction) async {
// do something
});
Firebase Core version
3.3.0
Flutter Version
3.24.0
Relevant Log Output
No response
Flutter dependencies

Expand Flutter dependencies snippet

Replace this line with the contents of your `flutter pub deps -- --style=compact`.

Additional context and comments
No response

I got a same issue! Windows apps automatic close

I encountered the same issue with Firebase transactions in Flutter. The app crashes without any error message when performing a transaction after any .get() operation has occurred in the program. Here's what I found:

Issue Description:

The app crashes silently when executing a Firebase transaction if any .get() operation has been performed earlier in the program's execution.
It doesn't matter where in the program the .get() operation occurs; as long as it happens before any transaction, subsequent transactions will crash.
The crash occurs without any error message, making it difficult to debug.
Commenting out all lines with .get() prevents the crash.

Workaround:
I discovered that adding an empty transaction at the start of the program, before any .get() operations, prevents the crash. Here's the workaround I'm currently using:
void main() async {
  // Execute an empty transaction at the start of the program
  await FirebaseFirestore.instance.runTransaction((transaction) async {});

  // Now .get() operations can be performed anywhere in the program without causing subsequent transaction crashes
  // For example:
  CollectionReference collection = FirebaseFirestore.instance.collection('testCollection');
  DocumentSnapshot document = await collection.doc('document_id').get();

  // ... other code ...

  // Later in the program, transactions will work fine
  final FirebaseFirestore db = FirebaseFirestore.instance;
  final sfDocRef = db.collection("testCollection").doc("testDoc");
  db.runTransaction((transaction) async {
    final snapshot = await transaction.get(sfDocRef);
    final newPopulation = snapshot.get("counter") + 1;
    transaction.update(sfDocRef, {"counter": newPopulation});
  }).then(
    (value) => print("DocumentSnapshot successfully updated!"),
    onError: (e) => print("Error updating document $e"),
  );

  runApp(MyApp());
}

Additional Observations:

The issue seems to be related to how the Firebase SDK handles the global state after any .get() operation.

Environment Details:

Flutter version: 3.24.3
Firebase Core version: ^3.5.0
Cloud Firestore version: ^5.4.4
Platform: Windows

While the empty transaction workaround allows me to proceed with development, it's clearly not an ideal solution. It's particularly concerning that this issue affects the basic flow of Firestore operations and requires a global workaround.
I hope this information helps in identifying and resolving the root cause of the problem. Please let me know if you need any additional information or if there are any specific tests I can run to help diagnose this issue further.

Our company is stuck on version 5.0.1 of cloud_firestore. After this version, runTransaction stopped working on the Windows platform. It is an essential feature for data integrity. I don’t understand why they are releasing new versions with additional features when basic features that used to work are no longer functioning.


Issue when using Nuclearcraft and Tinkers Construct

I have only Tinkers Construct, Mantle, and NuclearCraft in the mods folder among others, but if either Tinkers(and Mantle) or NuclearCraft are removed, the game loads perfectly fine. With both mods in folder game crashes almost immediaetely, and never makes it to the main menu screen.
Crash report:
https://gist.github.com/DefenderofTheTimelines/36cd1e8c36867b67aadada930f40a321 using NC 2.11c
https://gist.github.com/DefenderofTheTimelines/31056159148011222405eef05493a6c4 using NC 2.11f and other mods.
Mod List to create issue:
Mantle
Tinkers Construct
NuclearCraft
Versions:
Minecraft: 1.12.2
Forge: <IP_ADDRESS>59
Mantle: <IP_ADDRESS>
Tinkers Construct: <IP_ADDRESS>
NuclearCraft: 2.11f & c
Error:
java.lang.NoClassDefFoundError: slimeknights/tconstruct/library/client/MaterialRenderInfo

Let the Tinkers authors know as well, here is that issue.
https://github.com/SlimeKnights/TinkersConstruct/issues/3641

Fixed!


App reloads on EOS <=> ETH change

A page reload is triggered when moving between EOS and ETH. Should transition without a page load

@pingustar To check out


Embedded worker causes fatal error.

Following code causes A fatal error occurred while checking for simple syntax problems.
[Embed(source="/../assets/lib/Worker.swf", mimeType="application/octet-stream")]
private static var BackgroundWorker_ByteClass:Class;

Thanks! I'll take a look.

java.lang.NullPointerException at java.io.File.(File.java:277) at org.apache.royale.utils.FilenameNormalization.normalize(FilenameNormalization.java:73)

Judging by this part of the error, it looks like there's a null path somewhere in the compiler. With that in mind, this issue may need to be fixed in the Royale compiler dependency.

That said, I'd still like to test with your binary SWF to see if I can reproduce. You should be able to attach it in a comment on this issue, or you can send it to me privately somehow. A private message on the Starling Forums would be acceptable.

I've discovered that if you change var to const, it should resolve this issue.

Cool! yes, I confirm, it resolves the issue. Although it needs to be added to wiki, I think.

That should be a temporary workaround. I'll be pushing a commit that fixes the issue later today.


pip install littlechef version cannot deploy_chef

Hi, pip installed littlechef's install script is still point to the old opscode.com url, Please help to fix it, thanks~

+1


Expired SSL Cert on www.nwebsec.com

Just FYI, not sure if this project is still maintained, but it looks like the SSL cert expired in Feb of this year for nwebsec.com

I'm seeing this as well, it is May 5, 2019 and the cert expired February 27, 2019. Isn't anyone paying attention to the website?

Thanks for the ping, yes I had missed the warnings about the cert expiring. It's now behind a "managed" solution so someone else will be paying attention to this next time.


Alternative way of pulling parents with .parentNode

Non-breaking fix to #251

:+1: Nice.

Could you test this on your <svg> example and see if it fixes the issue?

Just got in the car, but I can give it a shot later tonight.
On Thursday, November 5, 2015, Nicolas Bevacqua<EMAIL_ADDRESS>wrote:

Could you test this on your  example and see if it fixes the issue?
—
Reply to this email directly or view it on GitHub
https://github.com/bevacqua/dragula/pull/253#issuecomment-154199561.

@bevacqua confirmed this works.

Deployed into 3.5.4


Add NFT Pool from PTIP-8 to Polygon Community Pool Page

Looks like this has already been done! 👍 thanks @rdp3


Community guides

Code of conduct
Contributing
Issue/PR templates

How to use: section is outdated.
Also whole Readme needs review and update.

How to use: section is outdated.
Also whole Readme needs review and update.


fix #1666: will should application details (and load metrics afterwards)

also enabled gzip compression for REST service overall.

+1


.svn dirs are not excluded

When generating multiple sprites Glue thinks my .svn dir is a dir with images included. It should be excluded from processing.
$ glue images/sprites/src/ --img=images/sprites/ --css=css/sprites/ --cachebuster -u /images/sprites/
Processing '.svn':
Error: No images found.

Fixed on master, https://github.com/jorgebastida/glue/commit/daf500580824e2dad934cdd8d0298b6a1a049423


Pass cancellationtoken along and stop process on cancel

Codecov Report

Merging #126 (d2b5ab4) into main (09de1b4) will decrease coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #126      +/-   ##
==========================================
- Coverage   93.80%   93.74%   -0.06%
==========================================
  Files          77       77
  Lines        1291     1295       +4
==========================================
+ Hits         1211     1214       +3
- Misses         80       81       +1

Impacted Files
Coverage Δ

...Executors/ExplicitPrivateKeySecureShellExecutor.cs
100.00% <ø> (ø)

...Executors/ImplicitPrivateKeySecureShellExecutor.cs
100.00% <ø> (ø)

...oy.Services/ScriptExecutors/LocalScriptExecutor.cs
100.00% <ø> (ø)

...ices/ScriptExecutors/SshPassSecureShellExecutor.cs
100.00% <ø> (ø)

...er/AgentDeploy.Services/ProcessExecutionService.cs
100.00% <100.00%> (ø)

...ervices/ScriptExecutors/SecureShellExecutorBase.cs
93.87% <100.00%> (+0.12%)
:arrow_up:

...tDeploy.Services/Scripts/ScriptExecutionService.cs
100.00% <100.00%> (ø)

...eploy.ExternalApi/Websocket/WebsocketConnection.cs
68.62% <0.00%> (-1.97%)
:arrow_down:

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 4527f16...d2b5ab4. Read the comment docs.


feat(declarative-modelling): Add modification from mapping

In order to handle modify operation from a mapping it is needed to extend decl._operate_modify and its decl._resolve function.
WIP

The problem left to solve is documented in accessors.py#L445-452.
Rewrite the documentation section

This has been superseded by the !new_object support introduced in #387.


2024-12-03_01-35-53_master-next_aws-cli

Automatically created.

Backport failed for kirkstone-next, because it was unable to cherry-pick the commit(s).
Please cherry-pick the changes locally and resolve any conflicts.
git fetch origin kirkstone-next
git worktree add -d .worktree/backport-10572-to-kirkstone-next origin/kirkstone-next
cd .worktree/backport-10572-to-kirkstone-next
git switch --create backport-10572-to-kirkstone-next
git cherry-pick -x ffb2b5aaf5a0538724c509f83088ce2807398b48

Successfully created backport PR for scarthgap-next:

#10575

Successfully created backport PR for styhead-next:

#10576


TextColor has already been defined ERROR

I'm using it.neokree:MaterialTabs:0.11 and it.neokree:MaterialNavigationDrawer:1.3.2 in my app but when I start syncing gradle it gives me a strange error!
Error:Attribute "textColor" has already been defined
Error:Execution failed for task ':app:processDebugResources'.

com.android.ide.common.internal.LoggedErrorException: Failed to run command:
F:\Digital Science\Android\Developer Softwares\Android Studio\SDK\build-tools\21.1.2\aapt.exe package -f --no-crunch -I F:\Digital Science\Android\Developer Softwares\Android Studio\SDK\platforms\android-21\android.jar -M F:\Digital Science\Android\Unfinished Projects\Android Studio Projects\Workplace\FarhangiGolestan\app\build\intermediates\manifests\full\debug\AndroidManifest.xml -S F:\Digital Science\Android\Unfinished Projects\Android Studio Projects\Workplace\FarhangiGolestan\app\build\intermediates\res\debug -A F:\Digital Science\Android\Unfinished Projects\Android Studio Projects\Workplace\FarhangiGolestan\app\build\intermediates\assets\debug -m -J F:\Digital Science\Android\Unfinished Projects\Android Studio Projects\Workplace\FarhangiGolestan\app\build\generated\source\r\debug -F F:\Digital Science\Android\Unfinished Projects\Android Studio Projects\Workplace\FarhangiGolestan\app\build\intermediates\res\resources-debug.ap_ --debug-mode --custom-package com.example.sorush.farhangigolestan -0 apk --output-text-symbols F:\Digital Science\Android\Unfinished Projects\Android Studio Projects\Workplace\FarhangiGolestan\app\build\intermediates\symbols\debug
Error Code:
1
Output:
F:\Digital Science\Android\Unfinished Projects\Android Studio Projects\Workplace\FarhangiGolestan\app\build\intermediates\res\debug\values\values.xml:127: error: Attribute "textColor" has already been defined

and it opens an xml file from library

You are using another library that have textColor attribute

So is there any solutions?

You should check what library have the same attribute and you must choose what library use. You cannot have two attribute in different package on the same project due to android limitation.


Restore details to socket.io error message

Reverts #6557 (except for a few unrelated cleanup changes in there).
When I made that change I thought my goal was going to be to make the message field more robust for aggregation, but since then I've realized it's best to leave message alone and find other strategies to help us aggregate errors.
@micahgodbolt I'm hoping to beat the 0.43 release (ironically, just like I was trying to beat 0.42 with the original PR... -_-)

Plan is to backport this to 0.42 once it's in, too, to minimize the aberration in this logging.

@markfields  i haven't cut the branch yet, no worries


Feat: Get version from build info

What type of PR is this?
Feature
What this PR does / Why we need it?
Some users might want to install ocm-backplane(bp-cli) via
$ go install github.com/openshift/backplane-cli/cmd/ocm-backplane@latest

this will result in ocm-backplane version output a blank result, and also a warning message to ask for upgrade when login.
This PR follow a similar logic as https://github.com/golangci/golangci-lint/blob/ee37ef317f56c821d8333505c95d49bc26efbc7f/cmd/golangci-lint/main.go#L30 to get the version info of the binary:

if the Version is given by Gorelease (the user download the binary), it will print the Version.
if the Version is blank (the user self build by go install), it will print the version info from the buildinfo.

Which Jira/Github issue(s) does this PR fix?
https://issues.redhat.com/browse/OSD-19781
Special notes for your reviewer
You can have a test using my repo
https://github.com/feichashao/backplane-cli/releases/tag/v0.1.37
$ go install github.com/feichashao/backplane-cli/cmd/ocm-backplane@latest
$ /Users/feichashao/go/bin/ocm-backplane version
0.1.37

Unit Test Coverage
Guidelines

If it's a new sub-command or new function to an existing sub-command, please cover at least 50% of the code
If it's a bug fix for an existing sub-command, please cover 70% of the code

Test coverage checks

[x] Added unit tests
[ ] Created jira card to add unit test
[ ] This PR may not need unit tests

Pre-checks (if applicable)

[x] Ran unit tests locally
[ ] Validated the changes in a cluster
[ ] Included documentation changes with PR

Codecov Report
Attention: Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.

Project coverage is 45.79%. Comparing base (1699359) to head (18e8111).

Additional details and impacted files

@@            Coverage Diff             @@
##             main     #484      +/-   ##
==========================================
+ Coverage   45.71%   45.79%   +0.07%
==========================================
  Files          72       73       +1
  Lines        5954     5962       +8
==========================================
+ Hits         2722     2730       +8
  Misses       2888     2888
  Partials      344      344

Files
Coverage Δ

pkg/info/info.go
100.00% <100.00%> (ø)

pkg/utils/util.go
50.75% <50.00%> (+0.37%)
:arrow_up:

Hi @samanthajayasinghe , improved testing and rebased. Please help another review, thanks!

/lgtm


Update docker tests to use testify

It displays diff with go-spew which is way better than our current failure output.
It also removes t.Parallel as without it tests run in 0.018s.. and t.Parallel really freaks me out
I intend to follow-up for each and every tests (starting with providers). For providers I'll also do the builders for each .
Signed-off-by: Vincent Demeester<EMAIL_ADDRESS>

I'll close this one for now 👼


Extend Protocol With Warnings

(Ideally the specification should be refined before a good estimate can be made)
Summary
Sometimes an operation does not need to fail with an error, as it can still succeed, but it needs to report a warning.
Currently, we report these warnings in the logs, but for most users the logs are not visible, until they open the terminal or browse the log directory. We want the warnings to be visible in the IDE.
Value

The runtime or language-server or the project-manager can report warnings to the user that will show up in the IDE which leads to better UX.

Specification

Refine the specification - what should this protocol look like? How will the warnings be handled in the IDE? (As this may influence the protocol design).
Implement the protocol.
Start sending the warnings where needed - usually most of the logger.warn calls should do that (but the logger call should also stay as we want this in logs too).

Acceptance Criteria & Test Cases

The specification above was completed.
The feature has been tested to the extent reasonably possible.
Ensure that there is a task in the IDE to integrate this feature.

This should also implement the other part of #1930, that is the warning that is currently just printed to the logs (which are not well visible from the IDE), should be sent to the IDE.


Add security policies

I will review it

On 27 Sep 2016, at 22:51, Wolfram Richter<EMAIL_ADDRESS>wrote:
@wrichter commented on this pull request.
In CloudForms-Internals/policies/Policy_DROWN Vulnerability.yaml:

 failure_sequence: 3

 MiqEventDefinition:

   name: vm_compliance_check

   description: VM Compliance Check

   guid: 42b1bd96-317e-11e3-88e1-005056b80000

   event_type: Default

   definition:

   default:

   enabled:

 MiqAction:

   name: d4ea28d8-f051-11e2-97c5-000c297e26aa

   description: Send Email to Security Team

   guid: d4ea28d8-f051-11e2-97c5-000c297e26aa

   action_type: email

   options:

     :from<EMAIL_ADDRESS>

Do we need to adjust these email addresses to whichever hailstorm domain this appliance is running in?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

It is trivial to ansibilize and make dynamic, just need to understand if these email addresses are actually used or if those are default values which are overwritten at runtime anyway

So please, feel free to ansibilize then :-)

On 28 Sep 2016, at 11:04, Wolfram Richter<EMAIL_ADDRESS>wrote:
It is trivial to ansibilize and make dynamic, just need to understand if these email addresses are actually used or if those are default values which are overwritten at runtime anyway
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.


Handle breaks errors in the solver

Something to be aware of when handling this, there are some cases where mod devs will declare
depends on somemodid >=1.0.0 and breaks somemodid >= 2.0.0
instead of depends on somemodid >=1.0.0 & <2.0.0

#309


Question - How can I test the call of a method with toHaveBeenCalled()?

When I tried to run the test with toHaveBeenCalled, I got an error saying that the argument must be a mock or a spy. How can I create a spy to test a method call?
the test function is:
  test('updates a product', async ({ expect }) => {
    const updateData = { title: 'Updated Product' }
    mockProductRepository.update = async () => true

    const result = await productService.updateProduct(1, updateData)

    expect(result).toEqual(true)
    expect(mockProductRepository.update).toHaveBeenCalledWith(1, updateData)
  })

te error is:

Not sure if this is directory related to Japa, since the mocking capabilities are part of the expect library. However, how do you create the mockProductRepository object?

I just create a object with the methods, like I use to do with jest.
const mockProductRepository = {
  getAll: async () => ({}) as Paginated<Product>,
  update: async () => true,
  delete: async () => true,
}


v1.9 backports 2021-04-22

#14492 -- Agent: Include Cilium version in output of 'cilium status --verbose' (@romanspb80)
#15649 -- daemon/cmd: fix Cilium version status output (@aanm)
#15668 -- Fix channel panic from ipcache kvstore reconnect (@jomenxiao)
#15742 -- kvstore/etcd: fix etcd rate limit (QPS) not working (@ArthurChiao)
#15763 -- bpf: Fix defines in policy.h (@pchaigno)
#15550 -- Hash IPSec keys in the bugtool. Unit test are also added. (@h3llix)
#15706 -- ipcache: Expose correct source in Cilium API (@gandro)

NOTE: pkg/wireguard one-line change dropped from #15706.

#15801 -- policy: Add underscore to the set of allowed characters in FQDN patterns (@jrajahalme)
#15808 -- bpf: fix map_array_get_16 backend retrieval (@borkmann)
#15785 -- daemon: Fix the init of the endpoints' datapath config (@pchaigno)
#15804 -- pkg/k8s: reset k8s event lag metric on pod add (@aanm)

Once this PR is merged, you can update the PR labels via:
$ for pr in 14492 15649 15668 15742 15763 15550 15706 15801 15785 15808 15804; do contrib/backporting/set-labels.py $pr done 1.9; done

Not backported:

#15688 -- pkg/client/client.go: Set EnabledProtocols when pointer is nil (@johngv2)

The EnabledProtocols variable doesn't exist in v1.9 yet. @johngv2 Can you take a look
and see if it makes sense to port the related changes?

#15780 -- Fix the initialization of host endpoint labels (@pchaigno)

Non-trivial to port. At least AddFunc in pkg/k8s/watchers/node.go missing.
@pchaigno Could you take a look?

test-backport-1.9

@nathanjsweet @aanm Could you take a look at what to do with #15688?

@joamaki I think you are right! IMHO, #15688 will need to be ported when/if #15143 is.

Both relevant PRs: #14124 (which introduced the masquerading flags) and the #15143 (that changed the former) are only in master. As the changes in #15688 consider the previous PR are applied, I think would be better keep it on master for now. Probably they will become v1.10 together. Does it makes sense?

@johngv2 it does, and yes, they will be part of 1.10


Lodash Security Vulnerability

There is a high-severity security bug in Lodash that was recently published:
https://github.com/lodash/lodash/pull/4336
It appears as though this tool isn't updated to use this patch yet.

TBH anyone that is affected by this has poor architecture and a poor sense of security.  PR is welcome.  I occasionally version bump deps.

Thanks for clarifying. I was going based on a GitHub security alert, but after running NPM audit, it seems to be a non-issue.


[feate] Added support for postgresql based on dev-1.4.0

What is the purpose of the change

Added postgresql support for linkis metadata.

Related issues/PRs

Related issues: #4190

Brief change log

Modify MybatisConfigurationFactory.java for support multiple data sources.
Modify linkis-cg-linkismanager.properties, linkis-mg-gateway.properties and linkis-cg-linkismanager.properties  for support multiple data sources.
To better distinguish between different data sources, change the original mapper file path. For example, move resources/mapper/common/contextHistoryMapper.xml to resources/mapper/common/mysql/contextHistoryMapper.xml
Add mapper files for postgresql. For example, resources/mapper/common/postgresql/contextHistoryMapper.xml
Some test classes were added or modified.

How to use postgresql

pom.xml

remove test in postgresql's dependency.

linkis.properties

Add database connection informations.
Add linkis.server.mybatis.pagehelper.dialect=postgresql. The configuration detault value is mysql.

linkis-cg-linkismanager.properties, linkis-mg-gateway.properties and linkis-cg-linkismanager.properties

Select mapper files that postgresql can execute.

If you want to use postgresql in test classes, You should change the properties used by the test class.

Add database connection informations.
Select mapper files that postgresql can execute.
Note: Please use the existing postgresql database to test.

Checklist

[x] I have read the Contributing Guidelines on pull requests.
[ x] I have explained the need for this PR and the problem it solves
[ x] I have explained the changes or the new features added to this PR
[ x] I have added tests corresponding to this change
[ x] I have updated the documentation to reflect this change
[ x] I have verified that this change is backward compatible (If not, please discuss on the Linkis mailing list first)
[ x] If this is a code change: I have written unit tests to fully verify the new behavior.

Please resolve the conflict

ping @peacewong


tcp.Mux.Serve() closes all net.Listener instances silently on error.

Steps to reproduce:
In the file influxdb/tcp/mux.go, tcp.Mux.Serve() will silently close all the net.Listener instances in the Mux structure if there is an error on a net.Listener.Accept() call.
Expected behavior:
The error should be logged for diagnosis.  A customer has seen behavior which indicates that this may be happening, but the absence of error-logging hinders investigation.
Actual behavior:
The error is discarded.
Environment info:

InfluxDB version: 1.8.3

Pull request:
https://github.com/influxdata/influxdb/pull/20278


test_dask.py::test_query_{2|7} fails with NotImplementedError: Dask currently only supports a single boolean for ascending.

For example: https://github.com/coiled/benchmarks/actions/runs/6533623804/job/17739345124#step:10:757
cc @phofl

This has just been fixed in main I think
On Mon, Oct 16, 2023 at 8:42 AM Hendrik Makait @.***>
wrote:

For example:
https://github.com/coiled/benchmarks/actions/runs/6533623804/job/17739345124#step:10:757
cc @phofl https://github.com/phofl
—
Reply to this email directly, view it on GitHub
https://github.com/coiled/benchmarks/issues/1088, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACKZTHG7YVMUPK64EWBIULX7U2VZAVCNFSM6AAAAAA6CHC5IGVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE2DKMRVGI2DOOA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

--
https://coiled.io
Matthew Rocklin CEO, Dask Maintainer

#1084


Customize nanobar and link color

Clean info and rearrange commits
Move style from skeleton.css to header.ejs

Hi Adi, I notice another PR that is much better than mine! If there is any conflict and can not merge please consider his at higher priority!

Hi @yukimuon, okay I'll do that. Your PR also good as well. Big thanks for this improvement.


[Question] Dismiss _error, but not field errors

Hi. I have a form with validation on submit:
<form onSubmit={handleSubmit(onSubmit)}>
In validation I am doing this:
throw new SubmissionError({
  ...errors.list,
  _error: 'Please check all fields',
});

So in my form I have errors under each field and common error under all form. Can I hide only _error and keep all fields "red" when I start typing something in any form field?

I have a similar problem, I'm disabling the form's submission button if the form is invalid, but the form goes in invalid state not only for validation errors but also for form-level error. It will be nice to have a way to clear only form-level error!


Server generation is much slower when using "--model-package"

Problem statement
When I generate a server via go-swagger and specify a value for "--model-package" different than "models", the time it takes to complete the command increases from ~2 seconds to ~10 seconds.
Is this expected behavior?
Environment
swagger version: master@083ebeb8e282762884e1135644a5706b6fe057a9
go version: 1.12.0
OS:   Linux

The issue was on my end. I had forgotten to replace the --principal models.User with --principal <my-model>.User and somehow this was making the generation much slower. Perhaps because of the goimports that are being run on the generated file?
Anyway I am closing this issue, sorry for the false alarm.


BR: letters with accent appear smaller

From author:
BR linguist noticed this issue with BR pages: “when we use letters with accents, the letter appears slightly smaller than the regular text. In H1, H2, QA how-to section, and in the menu at the bottom of the pages they look OK. This happens with á, ú, ã, õ, but not with é and à.”
The prints are from https://www.adobe.com/br/express/feature/video/convert/mp4-to-gif
and https://www.adobe.com/br/express/feature/video/convert/mov-to-mp4

I assume this is a typekit font config issue: https://github.com/adobe/blog/blob/main/styles/lazy-styles.css
@auniverseaway which kit should be use to include all necessary unicode ranges ? We should also include KR and JP...

Oups, complete wrong project...


auto-sd-paint-ext:WARNING: Interrupted!

I installed the Krita extension and ran stable diffusion on Colab while using ngrok/cloudflare as a tunnel. After pressing "start inpaint," I received the following error message:
auto-sd-paint-ext:INFO: img2img: {'restore_faces': False, 'face_restorer': 'None', 'codeformer_weight': 0.5, 'inpainting_fill': 1, 'inpaint_full_res': False, 'inpaint_full_res_padding': 0, 'mask_blur': 0, 'invert_mask': False, 'inpaint_mask_weight': 1.0, ...}
auto-sd-paint-ext:INFO: img size: 1024x1536 -> 768x1152, aspect ratio: 0.67 -> 0.67, 0.00% change
Error completing request
Arguments: ('', 4, '..., <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=1024x1536 at 0x7F70ED4CEBF0>, None, None, None, None, <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=1024x1536 at 0x7F70ED4CEBF0>, <PIL.Image.Image image mode=L size=1024x1536 at 0x7F70EC24B400>, 15, 16, 0, None, 1, False, False, 4, 1, 7.5, 0, 0.35, -1, -1, 0.0, 0, 0, False, 1, 1152, 768, 1.0, 1, False, 0, False, '', '', '', [], 0) {}
Traceback (most recent call last):
File "/content/sd-webui/modules/call_queue.py", line 56, in f
res = list(func(*args, **kwargs))
File "/content/sd-webui/modules/call_queue.py", line 37, in f
res = func(*args, **kwargs)
File "/content/sd-webui/modules/img2img.py", line 169, in img2img
processed = modules.scripts.scripts_img2img.run(p, *args)
File "/content/sd-webui/modules/scripts.py", line 370, in run
script = self.selectable_scripts[script_index-1]
TypeError: unsupported operand type(s) for -: 'str' and 'int'
auto-sd-paint-ext:WARNING: Interrupted!

Related to #145

I will close since this seems to be the exact same compatibility with latest A1111 issue as #135. So I will use #135 to track.


Reinitialize hardware after system clock change

Reinitialize UART and SPI after system clock change.
Document that you must change the system clock before initializing any I2C drivers.

Also now fixes a bug introduced in #325 which overran the framebuffer, resulting in Thonny not being able to interrupt Micropython

I've seen a couple of hangups from Thonny where I've needed to press the hardware reset button, but they seem to have got better lately.
This all looks great, though, and it probably goes without saying but bonus points and huge props for updating the documentationl

Thanks!
Before a4acf4b, I could never get Thonny to reconnect if I ran the new version of the list app from Thonny  and pressed the up or down arrow once (or more).  With the fix it worked reliably for the duration of me testing my changes, at least!


Re-merge top navbar

Latest update split the window chrome from the top navbar of Inbox, and now the app literally looks like Inbox is shoved into an Electron window – was there a reason for the UI regression?

I've just started using Inboxer on windows 10 and noticed this is split by default.
I guess this could be changed alongside a correction for above?
Does this help? - https://github.com/sidneys/electron-titlebar-windows
(I've never used electron otherwise would try to make a PR)

I want to close this project. Take a look at the explanation: #101
If you still need this project, please, fork the repo.


Get many errors like these. How to fix?

[5/4/2021, 6:48:57 AM] [FTP Motion] [FTP Server] [Bunyan] [Process Letter] Socket Write Error { error: 'write ECONNRESET' } [5/4/2021, 6:48:57 AM] [FTP Motion] [FTP Server] [Bunyan] Client error [5/4/2021, 6:48:57 AM] [FTP Motion] [FTP Server] [Bunyan] Satisfy Parameters Error { error: 'write ECONNRESET' } [5/4/2021, 6:49:58 AM] [FTP Motion] [FTP Server] [Bunyan] [Process Letter] Socket Write Error { error: 'write EPIPE' } [5/4/2021, 6:49:58 AM] [FTP Motion] [FTP Server] [Bunyan] Client error

Notification works, but get these errors. I'm using homebridge-camera-ui

Odd that you’re getting those if the notifications still work. I assume you see those when your camera does the upload?

Yes. Notification works. I see in camera-ui recordings and notifications since I use ftp-motion. And yes, I think too, that the errors will appear in the time the camera did the upload.

I’ll see if I can figure out the cause, but honestly if things are working otherwise, easiest thing is to just ignore these log messages.


ln.delete(dobject, force=True) still asks for confirmation

it's called delete_data_from_storage

Got it, thank you! Sorry, I still thought of the original design.


[WIP] Allow for structs with arc pointers to be constructed in objc mode

Adding bridging of ctor and destructor in objc language mode

Closing for https://github.com/apple/swift/pull/64381


Notification preferences module should be designed

Description:
We should add an ability for user to configure his own notification preferences for emails, slack notifications, etc.
This is an epic level feature as of right now.

The feature should be described in more detail.

moved into another repo


PR for #60

changed node version in Dockefile

Codecov Report

Merging #62 into master will decrease coverage by 96.39%.
The diff coverage is 0%.

@@           Coverage Diff            @@
##           master    #62      +/-   ##
========================================
- Coverage     100%   3.6%   -96.4%
========================================
  Files           2      2
  Lines         113    111       -2
========================================
- Hits          113      4     -109
- Misses          0    107     +107

Impacted Files
Coverage Δ

src/index.js
3.77% <0%> (-96.23%)
:arrow_down:

src/commands.js
0% <0%> (-100%)
:arrow_down:

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 55f6ec6...aeea139. Read the comment docs.

@kr1sp1n running tests locally code coverage is 100%. Any idea whats going on when run from coveralls?

@firefoxNX Please merge with the latest master. Thanks!

@firefoxNX Btw, some changes in your PR like code formatting should not be part of it. I would prefer a separate PR for stuff like this, ok?

sure will open another PR


Small bug tooltip in month view

Version 2.0.5.
I tried to display a custom tooltip in a month view, like this:
				eventTooltipContent: function(oEventRecord)
				{
					return oEventRecord.title+'<br>'+oEventRecord.desc;
				},

But the funtion received an empty oEventRecord object in the Month view. I believe it's a small bug/typo on line 8182:
var oEventRecord = to.getEventWithId($(this).attr("id"));
"id" should be "data-id". Then everything works like expected.

Thank you @GerrGIT 👍


livekit-server --version has exit code 1 in v1.3.5

Describe the bug
After installing version 1.3.5 via homebrew, running
livekit-server --version

or
livekit-server --help

exits with code 1 instead of 0.
Server

Version: [1.3.5]

Client

SDK: [e.g. js, ios]
Version: [0.x.x]

To Reproduce
Steps to reproduce the behavior:

Run brew install livekit
Run livekit-server --version or livekit-server --help
Notice the failure exit code 1

Expected behavior
Exit code 0
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.

Hi @Jake-Gather , I do not have a mac machine. But, I try to reproduce it with a binary release and docker image and it works. Here is the screenshot.

I am on an M1 Mac and others on my team have reproduced the issue on their M1 Macs.

Looks like it does return 1 in this version. Thanks for the report. This appears to be a change in behavior in the CLI package that we are using (urfave/cli/v2)
% livekit-server --version
livekit-server version 1.3.5

% echo $?
1


Fix: endpoint/resource ratelimit distinction and handling

What type of pull request is this?

[X] Non-breaking code change
[ ] Breaking code change
[ ] Documentation change/addition
[ ] Tests change

Description

Changes

Added reset_after optional arg to BucketLock.defer_unlock
Added detection of "The resource is being rate limited." error message and handling of supplied reset_after value

Checklist

[X] I've formatted my code with Black
[X] I've ensured my code works on Python 3.10.x
[X] I've tested my code

Changing label as this isnt a bug, its a missing feature due to discord introducing something new


Empty dashboard

Hi,
Installed and configured unpoller, I see data in prometheus, but in grafana I can't see any data.
Docker log:
unpoller         | 2023/03/10 13:57:36 [INFO] UniFi Measurements Exported. Site: 2, Client: 54, UAP: 5, USG/UDM: 1, USW: 2, DPI Site/Client: 2/0, Desc: 196, Metric: 2124, Err: 3, 0s: 571, Req/Total: 37.8ms / 55.3ms
unpoller         | 2023/03/10 13:58:06 [INFO] UniFi Measurements Exported. Site: 2, Client: 54, UAP: 5, USG/UDM: 1, USW: 2, DPI Site/Client: 2/0, Desc: 196, Metric: 2124, Err: 3, 0s: 567, Req/Total: 40.3ms / 56.5ms
unpoller         | 2023/03/10 13:58:36 [INFO] UniFi Measurements Exported. Site: 2, Client: 54, UAP: 5, USG/UDM: 1, USW: 2, DPI Site/Client: 2/0, Desc: 196, Metric: 2124, Err: 3, 0s: 562, Req/Total: 39ms / 57ms
unpoller         | 2023/03/10 13:59:06 [INFO] UniFi Measurements Exported. Site: 2, Client: 54, UAP: 5, USG/UDM: 1, USW: 2, DPI Site/Client: 2/0, Desc: 196, Metric: 2124, Err: 3, 0s: 555, Req/Total: 47.1ms / 71.4ms

Prometheus:

Grafana:
I selected my prometheus server while adding the dashboard, but I can't get any data. Grafana-Prometheus itself works, because from Node-Explorer on another dashboard I see data:

Configs:
prometheus:
$ cat config/prometheus.yml
# my global config
global:
  scrape_interval:     60s # Set the scrape interval to every 15 seconds. Default is every 1 minute.

  # scrape_timeout is set to the global default (10s).
  # Attach these labels to any time series or alerts when communicating with
  # external systems (federation, remote storage, Alertmanager).
  external_labels:
      monitor: 'codelab-monitor'
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  - job_name: 'prometheus'
    static_configs:
      - targets: ['prometheus:9090']
  - job_name: 'node_exporter'
    static_configs:
      - targets: ['node_exporter:9100']
  - job_name: 'ubuntu_1.54'
    static_configs:
      - targets: ['<IP_ADDRESS>:9100']
  - job_name: 'unifipoller'
    scrape_interval: 30s
    static_configs:
    - targets: ['unpoller:9130']

docker-compose:
version: '3.3'
volumes:
  prometheus-data:
    driver: local
  grafana-data:
    driver: local
services:
  prometheus:
    image: prom/prometheus:latest
    container_name: prometheus
    restart: unless-stopped
    volumes:
      - ./config:/etc/prometheus/
      - prometheus-data:/prometheus
    networks:
      - prometheus-network
    ports:
      - "9090:9090"
  grafana:
    image: grafana/grafana:latest
    container_name: grafana
    restart: unless-stopped
    volumes:
      - grafana-data:/var/lib/grafana
    networks:
      - prometheus-network
    ports:
      - "3000:3000"
  unpoller:
    image: ghcr.io/unpoller/unpoller:latest
    restart: unless-stopped
    ports:
      - '9130:9130'
    container_name: unpoller
    environment:
      UP_INFLUXDB_DISABLE: "true"
      UP_POLLER_DEBUG: "false"
      UP_UNIFI_DYNAMIC: "false"
      UP_PROMETHEUS_HTTP_LISTEN: <IP_ADDRESS>:9130
      UP_PROMETHEUS_NAMESPACE: unifipoller
      UP_UNIFI_CONTROLLER_0_PASS: easytoguess
      UP_UNIFI_CONTROLLER_0_SAVE_ALARMS: "true"
      UP_UNIFI_CONTROLLER_0_SAVE_ANOMALIES: "true"
      UP_UNIFI_CONTROLLER_0_SAVE_DPI: "true"
      UP_UNIFI_CONTROLLER_0_SAVE_EVENTS: "true"
      UP_UNIFI_CONTROLLER_0_SAVE_IDS: "true"
      UP_UNIFI_CONTROLLER_0_SAVE_SITES: "true"
      UP_UNIFI_CONTROLLER_0_URL: https://<IP_ADDRESS>:9443
<EMAIL_ADDRESS>    networks:
      - prometheus-network
  node_exporter:
    image: quay.io/prometheus/node-exporter:latest
    container_name: node_exporter
    command:
      - '--path.rootfs=/host'
    pid: host
    ports:
      - "9100:9100"
    restart: unless-stopped
    volumes:
      - '/:/host:ro,rslave'
    networks:
      - prometheus-network
networks:
  prometheus-network:
    driver: bridge

Had the same problem. The reason is, the Grafana dashboards are assuming "unpoller" as prefix, whereas unifipoller seems to have changed the default prefix to "unifipoller".
Solution that worked for me: change the prefix per env var:
UP_PROMETHEUS_NAMESPACE: unpoller

With that, Grafana dashboards work.

Also ran into this. Cheers for the fix!


ClockViewModel not works on macOS

[Enter feedback here]
I tested on macOS and found DataTime Property can't changed by every second if set the timer as local variable in Constructor:
public ClockViewModel()
        {
            this.DateTime = DateTime.Now;

            // Update the DateTime property every second.
            Timer timer= new Timer(new TimerCallback((s) => this.DateTime = DateTime.Now), null, 0, 1000);
        }

And if set it to a field, it works:
 public class ClockViewModel : INotifyPropertyChanged
    {
        Timer timer;
        DateTime dateTime;
        ...
    }

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

ID: 9905cd00-f3a1-7bdd-d678-ef6c71fb53b7
Version Independent ID: 9905cd00-f3a1-7bdd-d678-ef6c71fb53b7
Content: Data binding and MVVM - .NET MAUI
Content Source: docs/xaml/fundamentals/mvvm.md
Product: dotnet-mobile
Technology: dotnet-maui
GitHub Login: @davidbritch
Microsoft Alias: dabritch

Also tested on Windows 11, VS 2022 17.3.0 Preview 1.1 but then setting the timer to a field does nothing (both mac and Windows).
Debugging the ClockViewModel.cs shows that PropertyChanged is null therefore not firing the DateTime change.

Hi @reddvid Thank you for reporting this bug.
After fixing the bug with the timer, you'll need to modify the XAML code to use the correct property. This is the next step in the article after the timer is introduced:
    <Label Text="{Binding DateTime, StringFormat='{0:T}'}"
           FontSize="18"
           HorizontalOptions="Center"
           VerticalOptions="Center" />

Hi @reddvid Thank you for reporting this bug.
After fixing the bug with the timer, you'll need to modify the XAML code to use the correct property. This is the next step in the article after the timer is introduced:
    <Label Text="{Binding DateTime, StringFormat='{0:T}'}"
           FontSize="18"
           HorizontalOptions="Center"
           VerticalOptions="Center" />

Yes, I found the mistake. Thanks!