Connection recovery of publisher and consumer?

Hi guys,
I am trying to write myself integration tests for our company wrapper NuGet regarding ack and nack functionality (basically I want to test that my wrapper doesn't do something wrong).
The test is doing the following things:
// subscribe
// start pushing msgs (0-10) <- in parallel
// start consuming <- await
// acknowledge msg(0) <- await

// restart docker pulsar service

// start consuming (expect to start from 1-10) <-- however this takes ages to "recover" I am not sure if it does have such configuration

The question is: Do I need to make recovery on my side or there is some configuration that I can tweak on your side so connections that are lost can be retried faster?
P.S. Also what I noticed is that sometimes my message that is consumed starts from 1 rather than 0, could this be caused due to some awkward ordering of pulsar message or message(0) is lost? 👻
Thanks in advance!

I gave pulsar service 10-15 seconds after the restart, then initially (before I dropped the timeout) I gave a consumption timeout of 15 seconds before my test fails and again it was very indeterministic whether it will start consuming again for this period or not - sometimes it does sometimes it doesn't. Unfortunately, I cant provide you with deterministic example, but I think it shouldn't take more than 10 seconds for client to recover if docker + pulsar service are ready.
Also what I notice is that sometimes client completely "falls apart" by throwing System.TimeoutException: Could not GetPartitionedTopicMetadata within the configured timeout, however, I think this might be related to the pulsar service itself or the local standalone cluster that I am running since I notice it usually throws exceptions
PulsarError.txt (search for "ERROR")

Thank you, I think the issue is that pulsar is down for too long, so retries can get up to 1 minute. You can tweak OperationTimeout setting on PulsarClient construction. You should also add logging (like in examples or integration tests in this repo), since the retries should be visible there at Warning level. Also, please check if you are using the latest library version.

Okay, good to know. I am using last version of the library what about the message being lost or not coming in order how can I trace that?

Yes, you can trace that, just enable logging in debug mode and check ack logs.

Closing as inactive


add 'BAT_EXPOSURE > 0' filter

The main change is to replace return table with  return table[table['BAT_EXPOSURE']>0] to remove those observations with no BAT data from the return of from_heasarc().
There are many extra spaces in the batlib.py file, and these unnecessary spaces are cleared by my editor automatically.

This change would break too many things and probably not do what you want.
The swiftmaster table documentation says of this column:

BAT_Exposure

The BAT exposure in seconds on source. The BAT can run simultaneously several modes. The main modes are the EVENT and SURVEY modes and they are alternated within an observation (never run simultaneously). Within an observation the EVENT mode is used when detecting a burst, otherwise the BAT collect data in the SURVEY mode. The bat_exposure on source is calculated as the sum of the effective exposure on source of the EVENT and SURVEY modes.

This description is either wrong or describes something not useful.  BAT is typically in survey mode when it is stably pointing, and it provides event data when requested to by ground command or by on-board processes (e.g. 20 minutes worth surrounding a GRB, 10 s worth when a false trigger occurs).  BAT can provide simultaneous event and survey data.
I don't know what the circumstances are where the bat_exposure column reads zero.  Spot checking an example
SDSSJ113528.93+00462 |<PHONE_NUMBER>7 | 11 35 14.89 | +00 45 06.7 | 2023-06-28 22:23:35

The HEASARC archive does not have any BAT data.  However, BAT was operating at the time, so it may be an archive problem.
There might be cases where bat_exposure is 0 because there is no BAT survey data, but there might be other data that is useful for other analyses.  (e.g. BAT rates data, instrumental values, XRT, UVOT...).  Furthermore, the from_heasarc routine is used for other tables, not just swiftmastr,  and those other tables will not necessarily have the BAT_EXPOSURE column.  Therefore we don't want to filter our data so deep in the code.
Depending on your use case it is probably best to go to a higher level in your code, in order to exclude those observations for which there is no data of the specific type you are using.
Therefore I recommend against this pull request.
(For your comment about extra spaces, I agree and submitted #13 )

Besides the excess whitespace and np.int problems (addressed in #13), if the user wants BAT_EXPOSURE > 0, this can be applied as a query parameter instead of a code change.
As an example, to get BAT_EXPOSURE > 0 and, for comparison, BAT_EXPOSURE == 0:
table_batnonzero = ba.from_heasarc(name=None, bat_exposure='>0', start_time="2023-01-01 .. 2023-01-31")
table_batzero = ba.from_heasarc(name=None, bat_exposure=0, start_time="2023-01-01 .. 2023-01-31")
print(f"{len(table_batnonzero)=} {table_batnonzero['BAT_EXPOSURE'].min()=}")
print(f"{len(table_batzero)=} {table_batzero['BAT_EXPOSURE'].max()=}")

len(table_batnonzero)=1000 table_batnonzero['BAT_EXPOSURE'].min()=219.0
len(table_batzero)=18 table_batzero['BAT_EXPOSURE'].max()=0.0

Thanks, I will close this commit.


Database rename: Env variables

What did we change?
Why are we doing this?
How was it tested?

[x] Locally
[ ] Development Environment
[ ] Not needed, changes very basic
[x] Husky successfully run
[x] Unit tests passing and Documentation done


How the circom model compiled?

I would like to compile model_55de10 and model_9998a from the Circom source code.
I noticed that the Circom code is only located in the model_55de10 directory and is configured as follows:
component main {public [RATE_OF_DECAY, ..., scaling]} = Reward(256,40);

However, the settings.json file in model_55de10 specifies that the size parameter should be 1024. Should I change Reward(256,40) to Reward(1024,40) to properly compile model_55de10?
Additionally, are there any specific compilation arguments I should use? Currently, I am using circom reward.circom --wasm to generate the WASM file, but it appears that the output doesn’t match the WASM file provided in the repository. Would adding --O2 or other options produce a more accurate match?
Thanks!

Hello, thank you for opening this issue. We will be releasing updated circuits for both 256 and 1024 models shortly, and recommend compiling for those targets afterwards. Notifications will be providing guidance in the Discord chat relating to this release.


Slow browse page in poor connection circumstances

Issue found while visiting the Scottish Government's Device Lab
https://drive.google.com/file/d/0B-GzTJBVVSNzSzNxT00zODZyUVk/view?usp=sharing
Can be reproduced with the Chrome Dev tools network throttling.
We could consider making the /browse page work offline-first, so the navigation is all cached locally on the device.

Closing old issues.


added range cape check to reduce arrow & dart cost

Description:
added master range cape effect to work on zuk
Changes:
passed a boolean for if a master range cape is worn to the cost object, checked if true & then modified the cost per hour for darts & arrows
Other checks:

[Y ] I have tested all my changes thoroughly.
fixes
#3827
#3618

should this be added to lib/data/similaritems.ts ?

should this be added to src/lib/data/similaritems.ts ?
make ranger master act as an assembler

iirc the range max cape shouldnt act as an assembler, otherwise the ammo saving bonuses might stack, would probably need it coded into future commands as a separate ammo saving systems

would probably need it coded into future commands as a separate ammo saving systems

I believe this already exists in the "specialRemoveItems" function which is called in inferno.ts, however it only accounts for the Assembler:
https://github.com/oldschoolgg/oldschoolbot/blob/10a15038ed377c1a6f5f0a43c466973b030c7e96/src/extendables/User/Bank.ts#L142
I would probably recommend making this function more generalized for BSO additions by adding the Ranged Master Cape percentage in this cost function instead of making a new condition for just the inferno.

would probably need it coded into future commands as a separate ammo saving systems

I believe this already exists in the "specialRemoveItems" function which is called in inferno.ts, however it only accounts for the Assembler:
https://github.com/oldschoolgg/oldschoolbot/blob/10a15038ed377c1a6f5f0a43c466973b030c7e96/src/extendables/User/Bank.ts#L142
I would probably recommend making this function more generalized for BSO additions by adding the Ranged Master Cape percentage in this cost function instead of making a new condition for just the inferno.

unless im mistaken (which i might be, just recently started looking over the project)
that would only apply for regular m k trips & would still need a manual patch for fixing the inferno.
currently there is an already built system for m k trips for range cape saving


forest_fuzz: Instead of crashing between ops, crash in the middle of an op.

Attempting to reproduce the bug I'm seeing in jamii-compaction, with no luck. But still a nice improvement to the fuzzer.
Pre-merge checklist
Performance:

[ ] Compare zig benchmark on linux before and after this pr.# benchmark results before
...

# benchmark results after
...

OR

[x] I am very sure this PR could not affect performance.

The diff is not as bad as it looks, I just dedented Model.

I really like the trick with gating the crashes on ticks. On the whole this LGTM.


Feature request - support flake8-use-pathlib plugin

Would love to see support for the flake8-use-pathlib plug-in for enforcing use of pathlib over os.
https://gitlab.com/RoPP/flake8-use-pathlib
https://pypi.org/project/flake8-use-pathlib/
For justification on why using pathlib is "better" than os.
https://realpython.com/python-pathlib/
https://treyhunner.com/2018/12/why-you-should-be-using-pathlib/
https://treyhunner.com/2019/01/no-really-pathlib-is-great/
os.path operations and their pathlib equivalents
https://docs.python.org/3/library/pathlib.html#correspondence-to-tools-in-the-os-module

[ ] PL100: os.path.abspath("foo") should be replaced by foo_path.resolve()
[ ] PL101: os.chmod("foo", 0o444) should be replaced by foo_path.chmod(0o444)
[ ] PL102: os.mkdir("foo") should be replaced by foo_path.mkdir()
[ ] PL103: os.makedirs("foo/bar") should be replaced by bar_path.mkdir(parents=True)
[ ] PL104: os.rename("foo", "bar") should be replaced by foo_path.rename(Path("bar"))
[ ] PL105: os.replace("foo", "bar") should be replaced by foo_path.replace(Path("bar"))
[ ] PL106: os.rmdir("foo") should be replaced by foo_path.rmdir()
[ ] PL107: os.remove("foo") should be replaced by foo_path.unlink()
[ ] PL108: os.unlink("foo") should be replaced by foo_path.unlink()
[ ] PL109: os.getcwd() should be replaced by Path.cwd()
[ ] PL110: os.path.exists("foo") should be replaced by foo_path.exists()
[ ] PL111: os.path.expanduser("~/foo") should be replaced by foo_path.expanduser()
[ ] PL112: os.path.isdir("foo") should be replaced by foo_path.is_dir()
[ ] PL113: os.path.isfile("foo") should be replaced by foo_path.is_file()
[ ] PL114: os.path.islink("foo") should be replaced by foo_path.is_symlink()
[ ] PL115: os.readlink("foo") should be replaced by foo_path.readlink()
[ ] PL116: os.stat("foo") should be replaced by foo_path.stat() or foo_path.owner() or foo_path.group
[ ] PL117: os.path.isabs should be replaced by foo_path.is_absolute()
[ ] PL118: os.path.join("foo", "bar") should be replaced by foo_path / "bar"
[ ] PL119: os.path.basename("foo/bar") should be replaced by bar_path.name
[ ] PL120: os.path.dirname("foo/bar") should be replaced by bar_path.parent
[ ] PL121: os.path.samefile("foo", "bar") should be replaced by foo_path.samefile(bar_path)
[ ] PL122: os.path.splitext("foo.bar") should be replaced by foo_path.suffix
[ ] PL123: open("foo") should be replaced by Path("foo").open()
[ ] PL124: py.path.local is in maintenance mode, use pathlib instead

I'll make a PR for this today, super useful plugin
(and hopefully get more expose for pathlib than another attempt for a couple of years back: https://github.com/sbrugman/pathlad)

Awesome. We should be well-positioned to implement this via checker.resolve_call_path. (I doubt we can autofix these though... maybe some subset of them?)

Done by @sbrugman! #2090


Improve reset password alert

After requesting to reset the password, from the profile page, an alert appears to the user. We should refactor from an alert to a modal.

i want to work on this issue @ruilopesm  can you assign to me?

@pinak22dhir thanks for reaching to us. Assigned ✅

@ruilopesm you only want alert option  to add in javascript. file


Adding multiple roles in a middleware

Hi,
How can I add multiple roles in a middleware i.e:
Route::group([
    'prefix'     => '/brands',
    'middleware' => ['role:super-admin, admin']
    ], function(){
    Route::get('/', 'Admin\BrandController@index')->name('brand.index');
});

This is possible in the blade files like so @admin('emails,super-admin'), but I don't seem to be able to recreate in the routes.
Any help is much appreciated.
Thanks in advance.

You mean multiple role in route middleware ?

Yes! I've tried everything but I don't seem to find a solution without assigning the roles to the user - I would rather assign multiple roles to the route if that's possible.
Thank you so much.

Solved in new version 3.0.0 :)


Token Problem

Describe the bug
First of all, you have done a great job, congratulations. However, while working on the VenisAI application, we encountered an error and we could not fix this error, and my 3.5 million tokens were used up for nothing. So, I used 3.5 million tokens to fix the error, but the error was not fixed. I ask for your support in this matter. I also have a suggestion for this beautiful project of yours. It would be better if the token is not lost in case of errors encountered during operation.
Link to the Bolt URL that caused the error
https://bolt.new/~/sb1-h3e2le
Steps to reproduce
I ask for your support in this matter. I also have a suggestion for this beautiful project of yours. It would be better if the token is not lost in case of errors encountered during operation.
Expected behavior
I ask for your support in this matter. I also have a suggestion for this beautiful project of yours. It would be better if the token is not lost in case of errors encountered during operation.
Screen Recording / Screenshot
No response
Platform

OS: [e.g. macOS, Windows, Linux]
Browser: [e.g. Chrome, Safari, Firefox]
Version: [e.g. 91.1]

Additional context
No response

First of all, you have done a great job, congratulations. However, while working on the VenisAI application, we encountered an error and we could not fix this error, and my 3.5 million tokens were used up for nothing. So, I used 3.5 million tokens to fix the error, but the error was not fixed. I ask for your support in this matter. I also have a suggestion for this beautiful project of yours. It would be better if the token is not lost in case of errors encountered during operation.

@venisassist great suggestion, we are implementing this now! Also checkout #678 for tips on how to be more efficient with tokens. If you want a credit for lost tokens, please reach out to<EMAIL_ADDRESS>


Deprecate 'return_str' parameter in NLTKWordTokenizer and TreebankWordTokenizer

Resolves #2879
As per the discussion on #2879, I have deprecated the use of the 'return_str' parameter in the tokenize method of both NLTKWordTokenizer and TreebankWordTokenizer.
I have currently done this in a way that raises a DeprecationWarning if a non-default value is passed to the parameter.

@tomaarsen thanks for the review! I have amended the commit to contain your suggestions

I have a nit comment, I would suggest refactoring the if's in Treebank and WordTokenizer to be:
if return_str:
  ..........

instead of
if return_str is not False:
  ..........

It is more readable and faster. Also, it is more pythonic and follows the PEP8 standard.

Thanks @adamjhawley, @12mohaned, @tomaarsen


Updated button.md to reference Pressable instead of Touchable Opacity…

Updated button.md to reference Pressable instead of Touchable Opacity and TouchableWithoutFeedback

Hi @athakur3!
Thank you for your pull request and welcome to our community.
Action Required
In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.
Process
In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.
Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.
If you have received this in error or have any questions, please contact us at<EMAIL_ADDRESS>Thanks!

Signed!

looks good @athakur3, just curious why recommend the new Pressable over TouchableOpacity or TouchableWithoutFeedback?
since TouchableOpacity or TouchableWithoutFeedback remain a simpler start
where we recommend Pressable for a more extensive approach

looks good @athakur3, just curious why recommend the new Pressable over TouchableOpacity or TouchableWithoutFeedback?
since TouchableOpacity or TouchableWithoutFeedback remain a simpler start where we recommend Pressable for a more extensive approach

@leotm You're right in saying that it's more extensive. But, going with the "future-proof" reference, I assume that we are eventually going to migrate to Pressable API.
Hence this. Let me know if I'm wrong in my assumption.

gotcha ^ makes sense if that implies we're going to deprecate both, SWIM (Someone Who Isn't Me) will know

Yay! Thanks for merging that! My first open source contribution to Meta 😄

Welcome to the community! 🎉


Move login_ip / login_last elsewhere

In gitlab by @A-Lawrence on Feb 27, 2016, 21:36
It's pointless storing these data changes - we might as well just have a log of loginIPs.  Maybe in the form of an activity entry?

In gitlab by @A-Lawrence on Aug 20, 2016, 19:39
Removed ~98471 label


[FLINK-24443][table-runtime] Reenable IntervalJoinITCase.testRowTimeInnerJoinWithEquiTimeAttrs

What is the purpose of the change
Fixed and reenabled IntervalJoinITCase.testRowTimeInnerJoinWithEquiTimeAttrs
Brief change log

Fixed and reenabled IntervalJoinITCase.testRowTimeInnerJoinWithEquiTimeAttrs

Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:

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

Documentation

Does this pull request introduce a new feature? no
If yes, how is the feature documented? not applicable

@flinkbot run azure


Rename grid member variables

Added trailing underscore to grid-struct member variables to indicate they are member variables.

Ah, I see. Yep, I'll fix this tomorrow morning. ... Pretty strange, because I didn't touch the gitigmore in either of these PRs.

/azp run


proposal: x/tools/go/packages: add Goroot to Packages struct

Please export Goroot in Package.  It is available in go list -f '{{ .Goroot }}'.
The only way to programmatically get it right now is to use a workaround to get the package dir, then compare to runtime.GOROOT().

Why not just rely on the rule described in https://github.com/golang/go/issues/32819? It's technically not documented yet, but the rule already exists in practice and can be relied upon. Two of my tools use it already, and it's cheaper than having to query the packages.

Why not just rely on the rule described in https://github.com/golang/go/issues/32819? It's technically not documented yet, but the rule already exists in practice and can be relied upon. Two of my tools use it already, and it's cheaper than having to query the packages.

Thanks for highlighting the undocumented convention.  It unfortunately doesn't catch the case where "a module name without a dot happens to build today" (quoted from your issue).
Either way, it's cleaner to rely on a bool on a *Package when you already have the instance, or need it for other purposes as well.

Thanks for highlighting the undocumented convention.  It unfortunately doesn't catch the case where "a module name without a dot happens to build today" (quoted from your issue).
Either way, it's cleaner to rely on a bool on a *Package when you already have the instance, or need it for other purposes as well.

If you do absolutely need such low level details, I'd suggest to try just using go list -e -json args... directly. go/packages is an abstraction layer that supports other build systems by design, so it can't expose cmd/go details which are too specific. See https://github.com/golang/go/issues/38445, for example, which are fields that exist in one way or another in most build systems.

If you do absolutely need such low level details, I'd suggest to try just using go list -e -json args... directly. go/packages is an abstraction layer that supports other build systems by design, so it can't expose cmd/go details which are too specific. See https://github.com/golang/go/issues/38445, for example, which are fields that exist in one way or another in most build systems.

If you do absolutely need such low level details, I'd suggest to try just using go list -e -json args... directly.

I indeed reach out to go list for some things -- it's rather unfortunate that everything exported in that JSON payload isn't made available in x/tools/go/packages... that is exactly what motivates issues like #38445 (which was linked to in the top-post), and now this one.
So either the developer needs to find a workaround to x/tools/go/packages, or needs to bypass it while reaching into go list with JSON processing. It would instead be great if they were each equivalent.  Nobody wants to have to rewrite x/tools/go/packages (or maintain a fork) to add functionality from go list into a high level Go-typed abstraction. It sounds like you made a similar argument in #38234, but unfortunately 2/3 of your requests still remain open after quite some time.

go/packages is an abstraction layer that supports other build systems by design, so it can't expose cmd/go details which are too specific.

I'm not sure what you mean by this: is it designed to support some specific build systems (which ones? Bazel? Any others?) or that it is designed to support third-party build systems in general?  What details are "too specific" vs. not?  Why would you want to shut down this proposal vs. the three resulting from your issue #38234?
I am using x/tools/go/packages for a build tool that extracts certain resource files from a program's (recursive) import dependencies; for the purposes of this issue, skipping GoRoot packages because they never contain such files and thus avoids unnecessary directory scans that can improve build times.  The same tool can benefit from #38445 which is why I commented there in November last year.

If you do absolutely need such low level details, I'd suggest to try just using go list -e -json args... directly.

I indeed reach out to go list for some things -- it's rather unfortunate that everything exported in that JSON payload isn't made available in x/tools/go/packages... that is exactly what motivates issues like #38445 (which was linked to in the top-post), and now this one.
So either the developer needs to find a workaround to x/tools/go/packages, or needs to bypass it while reaching into go list with JSON processing. It would instead be great if they were each equivalent.  Nobody wants to have to rewrite x/tools/go/packages (or maintain a fork) to add functionality from go list into a high level Go-typed abstraction. It sounds like you made a similar argument in #38234, but unfortunately 2/3 of your requests still remain open after quite some time.

go/packages is an abstraction layer that supports other build systems by design, so it can't expose cmd/go details which are too specific.

I'm not sure what you mean by this: is it designed to support some specific build systems (which ones? Bazel? Any others?) or that it is designed to support third-party build systems in general?  What details are "too specific" vs. not?  Why would you want to shut down this proposal vs. the three resulting from your issue #38234?
I am using x/tools/go/packages for a build tool that extracts certain resource files from a program's (recursive) import dependencies; for the purposes of this issue, skipping GoRoot packages because they never contain such files and thus avoids unnecessary directory scans that can improve build times.  The same tool can benefit from #38445 which is why I commented there in November last year.

is it designed to support some specific build systems (which ones? Bazel? Any others?)

Yes, Bazel is the main other one.

Why would you want to shut down this proposal vs. the three resulting from your issue

They are similar, and I'm not shutting down anything. I'm just saying that if you want a lot of the fields from go list -json, your best bet right now is to just use it directly. go/packages will never expose all the details that go list does.

is it designed to support some specific build systems (which ones? Bazel? Any others?)

Yes, Bazel is the main other one.

Why would you want to shut down this proposal vs. the three resulting from your issue

They are similar, and I'm not shutting down anything. I'm just saying that if you want a lot of the fields from go list -json, your best bet right now is to just use it directly. go/packages will never expose all the details that go list does.

Hi, I'm the maintainer of go/packages. We don't want to shut down the proposal, but go/packages was originally designed to be build system agnostic (as in supporting other build systems like Bazel). GOROOT is a concept specific to the go command build system, so adding GOROOT to Packages would be breaking the abstraction. It's arguable that being build system agnostic  was the wrong decision to make, (and I've come around to that position) but I think we'd need to think harder to have a strategy about how to reorient go/packages around only one build system if we wanted to do things like this.
For now, it's much easier to use go list to get this information. This is partially why #38445 is still open

Hi, I'm the maintainer of go/packages. We don't want to shut down the proposal, but go/packages was originally designed to be build system agnostic (as in supporting other build systems like Bazel). GOROOT is a concept specific to the go command build system, so adding GOROOT to Packages would be breaking the abstraction. It's arguable that being build system agnostic  was the wrong decision to make, (and I've come around to that position) but I think we'd need to think harder to have a strategy about how to reorient go/packages around only one build system if we wanted to do things like this.
For now, it's much easier to use go list to get this information. This is partially why #38445 is still open


Imperative Transactions

Adds api for imperatively creating, using, and committing transactions.
I started playing with how we might implement transactions over the gRPC api, and I'm feeling pretty confident that something like this will be necessary. Thinking is that the gRPC service will need to maintain a map of active transactions (zero or one per Store) and if a transaction exists for a Store, run all subsequent requests for that Store against its transaction. Once EndTransaction is called for a Store, that Store's transaction is removed from the map and subsequent calls return to normal (using implicit transactions).
For sure a reach with my current grasp on Go, but hopefully this gets the idea across.

Idea is you can do this:
newPerson := &Person{Name: "Foo", Age: 42}
txn := model.StartWriteTxn()
err := txn.Create(newPerson)
shouldCommit = err == nil
_ = model.EndWriteTxn(txn, shouldCommit)

Nice! Your Go skills are looking good :)
It would be cool if the txn could live in the client-stream, such that you wouldn't need to maintain the state in some central map, keyed by an ID or something similar. That would be in line with your comment about bi-di streams over WS.

If we eventually have a stream-based API, I think is possible to also use the original func-based one: like, generate one func(txn *Txn) error per stream, and run the message-loop of the stream-api inside that func. When the stream is closed, Discard/Commit txn.
To be more concrete (apart from whatever txn style we like): We should tie the underlying txn (in any of their styles) with some scoped thing that depends on the client. I mean, making impossible to leak an open transaction if the client closes the connection, or whatever.
An open txn is blocking not only other local/client txn (which isn't that bad), but also allowing to sync new changes from the external world that could pile up. Anyway, that's job for the next steps... :)

That makes sense @jsign. It's easier to wrap my head around the grpc client to server part (with the server running the transaction), but I'm having a harder time understanding what the native (obj c/java/swift) to grpc client part would look like... Somehow, we have to allow the user to say "I want to make these actions within a transaction", and somehow map each action to a grpc request object. It's not clear to me how to do that. Ideas?

When the user wants to use an implicit transaction, they would just call an sdk method directly (CreateModel(), for example), but in the case of a transaction we have to somehow compile a list of methods to call on the server side (as opposed to calling a series of grpc client methods).

I think in either case, the context of the transaction can be "held" by the server, while the client streams calls, right?

Well, we definitely should think about things that run on transactions as being interactive, since batching things and sending them only works for batch things (like creating multiple things). But other more useful workflows such as open a transaction, do some query, and make an insert considering that query result.
Native to Grpc: I'd imagine
(On the native side)
1. txn := sdk.OpenTxn()
2. res = txn.Query...
3. txn.Create( something)
4. txn.Delete(..)
5. txn.Commit()

Wher in 1., the sdk created a stream-grpc call that holds alive until commit. That t has the underlying grpc connection which sends and receives the 2., 3., 4. calls back and forth.
On the Go side, that stream-grpc call is looping inside an explicit txn, receiving the 2., 3., 4. things and replying appropriately.
Makes sense?. I might be missing something since as you say is somewhat hard to imagine.

I think you are both making sense, it's just really hard to imagine exactly how the implementation will work. Sounds like there will be some bi-directional streaming as well as a more robust native sdk class structure (adding a Txn class, for example). Will be good to start making a client and experimenting.

I suppose we could make it work like the Go version works, where everything is done in a transaction, and we provide helper methods for implicit transactions. That would actually never use the implicit methods on the server.

The more I think about the bi-directional streaming, receiving and sending inside the server's Txn function, the more I like it. Makes tons of sense. Gonna try to get the POC on that built. Thanks for the vision @jsign

Will leave this open for now, but if things go as planned with the bi-directional streaming, I'll just close it.

Not needed anymore, was able to implement transactions using bi-directional grpc streams


Add log messages to result model that is build during execution and available to listeners

In the new ListenerV3, it would be nice if result.messages were already populated in end_test and end_keyword.
Currently, the messages have to be collected using log_message to be used in end_test and end_keyword.
An example workaround looks like this:
def start_body_item(self, data, result):
    self.body_items.append(result)

def log_message(self, message: Message):
    result_msg = result.Message(
        message=message.message,
        html=message.html,
        level=message.level,
        timestamp=message.timestamp,
        parent=message.parent,
    )
    if self.body_items:
        self.body_items[-1].body.append(result_msg)

def end_body_item(self, data, result):
    self.body_items.pop()

It's true that the model that's generated during execution doesn't currently contain logged messages. Prior to RF 7.0 that model didn't contain keywords or control structures either, but they were added as part of big listener v3 enhancements (#3296) to make it possible to inspect the model. Messages were left out at that point because that would have required more work (there was a huge amount of work also without it) and it wasn't sure is anyone interested in messages. This issue makes it clear that there's interest, and I can investigate what adding messages would require. This can seen as a pretty big limitation with the listener API so if adding messages is easy, I add this issue to RF 7.2 scope. If it requires more work, it needs to wait for RF 7.3.

This seems to be pretty easy to do. I try to get it done later today. The only design decision is what messages to include. I believe filtering messages based on the normal log level the best solution. That way there are same messages available during execution that are written to output.xml and thus available afterwards.

As I commented earlier, implementing this particular feature wasn't too complicated. Interestingly various bigger and smaller bugs were uncovered during implementation and testing (see the referenced issues above), but now also they are all fixed.


Add commits to PR #434 branch (Galoy connector)

Description
I added some improvements to the error handling based on some testing and I implemented the checkPayment interface for Galoy connector.
Question: How do you all currently circle back to updating the status on pending payments? I added a conditional branch for when our sendPayment status comes back as pending but I believe my change still puts the pending transaction into the txn list in Alby.
Also, where does checkPayment currently get used?

checkPayment is used on the receive screen.  it periodically checks if the payment was received to show an success screen.

checkPayment is used on the receive screen.  it periodically checks if the payment was received to show an success screen.

Converted back to draft because I'd like to add a helper method for all that graphql error handling

@bumi this should be ready to merge in the open #434 branch now.
I improved the error handling and brought in master to resolve merge conflicts. The commit diff looks like a lot here but I've arranged the commits so that it'll resolve itself once we merge this into the PR #434 branch (final diff looks like this)


Purge All Topics / Subscriptions

Hi!
Having found myself in the last few months using the purge functionality repeatedly for multiple topics with multiple subscriptions, I would have found it useful to have a bulk purge option, the idea being to be able to quickly:

purge all subscriptions form a given topic (messages / deadlettered messages or both)
purge all subscriptions from all topics in the current namespace

I've started implementing this and opened the PR to get some feedback from you.
Still to do (in my view):

[x] confirmation prompts
[x] error handling / logging
[x] The authority for the spelling of DLQ must be the official documentation for Service Bus dead-letter queues. There is it spelled dead-letter queues and DLQ so I think we should primarily use dead-letter queues and if there is a space constraint, DLQ and update the UI in Service Bus Explorer accordingly.
[x] Currently there are two versions of the ServiceBus SDK used in ServiceBusExplorer. Since we are trying to move away from the old one, please remove all references to the Microsoft.ServiceBus.Messaging namespace
[x] resolve the code duplication between the new BulkServiceBusPurger and the original single subscription purge done in the HandleSubscriptionControl (lines 366 - 424)
[x] implement same functionality for Queues
[ ] other issues that I did not notice

Looking forward to your feedback.
Best,
Razvan

:white_check_mark: Build ServiceBusExplorer 5.1.0-purge-all.22.build.809 completed (commit https://github.com/paolosalvatori/ServiceBusExplorer/commit/643bf849fe by @)

Disclaimer: I haven't gone through the PR thoroughly yet.
I would suggest the following for the UI/UX side of things

Rename "Deadletter Queue Messages" to "Dead-Letter Queue Messages" or "DLQ Messages" to be consistent with an already established nomenclature on the main form.
Purging all messages should be at the bottom.
Rename "Everything" to "All Messages"

@razvangoga, regarding

Still to do (in my view):

If you still plan to work on the PR, please mark it as a draft. Otherwise, I'd suggest raising a follow-up issue once the PR is completed, to highlight what's missing. Thank you for the PR.

Rename "Deadletter Queue Messages" to "Dead-Letter Queue Messages" or "DLQ Messages" to be consistent with an already established nomenclature on the main form.
I called it Deadletter because it is so in the Subscriptions context menu

:white_check_mark: Build ServiceBusExplorer 5.1.0-purge-all.23.build.810 completed (commit https://github.com/paolosalvatori/ServiceBusExplorer/commit/9baad47375 by @)

If you still plan to work on the PR, please mark it as a draft. Otherwise, I'd suggest raising a follow-up issue once the PR is completed, to highlight what's missing. Thank you for the PR.

I plan to finish at least all the points I listed originally. It's a functionality I need.
Just wanted to open it as soon as possible, to get feedback / direction from you - better imho than just dropping a monster PR on your lap

I called it Deadletter because it is so in the Subscriptions context menu

the names are all over the place :(

:white_check_mark: Build ServiceBusExplorer 5.1.0-purge-all.25.build.811 completed (commit https://github.com/paolosalvatori/ServiceBusExplorer/commit/7df5b1fd6c by @)

@SeanFeldman any recommandations / preferences on this :

resolve the code duplication between the new BulkServiceBusPurger and the original single subscription purge done in the
HandleSubscriptionControl (lines 366 - 424)

The authority for the spelling of DLQ must be the official documentation for Service Bus dead-letter queues. There is it spelled dead-letter queues and DLQ so I think we should primarily use dead-letter queues and if there is a space constraint, DLQ and update the UI in Service Bus Explorer accordingly.
Good that you thought about the duplication of code, create a new class in the UIHelpers folder, called ServiceBusEntityHelper or similar where you put code that is shared between the classes.
Currently there are two versions of the ServiceBus SDK used in ServiceBusExplorer. Since we are trying to move away from the old one, please remove all references to the Microsoft.ServiceBus.Messaging namespace and move BulkServiceBusPurger into the ServiceBus project. If you think it is better you can merge BulkServiceBusPurger with ServiceBusPurger.
There is a rarely used type of dead-letter queue called the transfer dead-letter queue. That is what the third number after the queues names in the tree-view in the SBE GUI shows. I think you should add support for that type also, even though it is so rare.

There is a rarely used type of dead-letter queue called the transfer dead-letter queue. That is what the third number after the queues names in the tree-view in the SBE GUI shows. I think you should add support for that type also, even though it is so rare.

I'll take a look, but I modeled the bulk purge on the existing single purge, and there only Messages and DLQs are handled (unless i missed something)

:white_check_mark: Build ServiceBusExplorer 5.1.0-purge-all.26.build.812 completed (commit https://github.com/paolosalvatori/ServiceBusExplorer/commit/1b02097cd8 by @)

@razvangoga, you are right about transfer dead-letter queues. Let us forget about them.
I'll also add to the project readme that we want to see new Service Bus and Event Hubs code using the latest SDKs also known as Track 2.

@ErikMogensen while I agree with you in principle about removing the old SDK, at the moment it looks to be used quite extensively (based on where the Microsoft.ServiceBus.Messaging namespace is used).

This would be a big expansion in scope for this PR and I would split it out in it's own issue.

@razvangoga, I didn't mean that you should replace the old Service Bus SDK, that would be a huge PR and probably split into several PRs. I just meant in the BulkServiceBusPurger class since that is a new class.
I saw you replaced deadletter with dead-letter, thanks! My intention was that was going to go into a separate PR, but it is great that you fixed it.

@razvangoga, I didn't mean that you should replace the old Service Bus SDK, that would be a huge PR and probably split into several PRs. I just meant in the BulkServiceBusPurger class since that is a new class.

Ah, ok that makes sense - sure i'll do it like that. I'll merge the BulkPurger and SinglePurger classes (as you suggested) and keep to using only the new SDK. I'll then redirect / replace also the single purge requests to the new Purger. Ok?

Sounds good @razvangoga!

:white_check_mark: Build ServiceBusExplorer 5.1.0-purge-all.27.build.813 completed (commit https://github.com/paolosalvatori/ServiceBusExplorer/commit/e764df27e5 by @)

:white_check_mark: Build ServiceBusExplorer 5.1.0-purge-all.32.build.814 completed (commit https://github.com/paolosalvatori/ServiceBusExplorer/commit/e39215b991 by @)

I think I'm done with the changes - can you take a look? I'll keep testing it tomorrow

:white_check_mark: Build ServiceBusExplorer 5.1.0-purge-all.33.build.815 completed (commit https://github.com/paolosalvatori/ServiceBusExplorer/commit/46a907130e by @)

:white_check_mark: Build ServiceBusExplorer 5.1.0-purge-all.34.build.816 completed (commit https://github.com/paolosalvatori/ServiceBusExplorer/commit/3fe59eeed7 by @)

@paolosalvatori i'm finished - only if there is any more feedback from your side
The UI change is not big:

I've added this purge section to the Queues root node ,Topics root node and on each Topic node. The purge actions are done on all queues / subscriptions under that tree node.
Bigger are the changes to the ServiceBusPurger class to support these bulk operations.

I am learning things from the code and by the reviews 😸
I built and tested the PR. Unfortunately I found that the right side of the tool is not shown properly when Windows font scaling is set to something larger than 100%.

Windows scaling is set in Settings.

This happens if you modify the Window forms GUI and Visual Studio is not running as a DPI-unaware process. For more information about this, see the Visual Studio documentation.
I think the least painful way to fix it is to revert the changes to the GUI part of the WinForms classes and redo them while Visual Studio is running as a DPI-unaware process.
Another thing, which may very well go into another PR, is that the Purge menu item on the popup menu is not shown for queues and for "containers".  By "containers" I mean the folders that are shown in the tree if you create a queue or topic with a / in the name. The text before the / will appear as a folder in the GUI like this

:white_check_mark: Build ServiceBusExplorer 5.1.0-purge-all.37.build.817 completed (commit https://github.com/paolosalvatori/ServiceBusExplorer/commit/80e852297c by @)

@SeanFeldman added all missing ConfigureAwaits
@ErikMogensen I think I fixed the scaling issue by restarting VS without automatic scaling and resaving the main form moving one of the components in bottom components area (where the tooltips, context menus etc are). This makes VS rewrite the resx file associated with the form. I'm on 150% scaling and it looks good. Let me know if it soes not do the same for you and i'll pull in the original MainForm files
For single queues the menu would not make sense since (aside from the ALL option) since you already have the purge msg / dlq options. I can and the ALL option under.
For the folders thing - i had no ideea such a feature even existed... i'll take a look, it may just be another context menu where the buttons need to be added

:white_check_mark: Build ServiceBusExplorer 5.1.0-purge-all.38.build.818 completed (commit https://github.com/paolosalvatori/ServiceBusExplorer/commit/ca194606e1 by @)

:white_check_mark: Build ServiceBusExplorer 5.1.0-purge-all.39.build.819 completed (commit https://github.com/paolosalvatori/ServiceBusExplorer/commit/70b866132e by @)

:white_check_mark: Build ServiceBusExplorer 5.1.0-purge-all.40.build.821 completed (commit https://github.com/paolosalvatori/ServiceBusExplorer/commit/3becdbc495 by @)

Hi, i've added support also for the containers / folders.

For the folders thing - i had no ideea such a feature even existed... i'll take a look, it may just be another context menu where the buttons need to be added

Thanks, for adding that also.
I think most users are unaware of it. It is a great feature when you are using the Premium Service Bus version, since you have to dearly pay for each namespace and you can separate test environments in folders. That enables you to support multiple environments in one namespace.
Hopefully the RBAC support in Service Bus enables you to set permissons on folder level. The now removed ACS authentication, supported that.

It may be helpful to add a hint inside the UI on queue / topic creation to let users know that this option exists.
Was everything ok with the scaling fixes?

:white_check_mark: Build ServiceBusExplorer 5.1.0-purge-all.41.build.822 completed (commit https://github.com/paolosalvatori/ServiceBusExplorer/commit/8b84e4f7e1 by @)

Yes, the scaling looked fine. Good thing centering on parent.

in this case, i'm done with the PR.. if all is ok, let's close it like this 👍

Thanks @razvangoga for the great PR and thanks @ErikMogensen and @SeanFeldman for reviewing it as usual. I implemented the support for the possibility to organize queues and topics under relative paths years ago by introducing folders. As Erik said, is a powerful technique that only a few customers use.

@paolosalvatori  great! thanks - what happens now? when will this new version be available?

@razvangoga, you celebrate having gotten a large PR approved 😃
I would say that the date for the next release depends upon there is time to release it (this is driven by volunteers) and the criticality of having a new release.

🍻 if there is anything i can do to help speed it up, let me know :)
i have a practical need for it : it takes me now a couple good minutes and a lot of right clicking to completely purge my dev namespace - anything i can do to reduce that (and thus speedup my dev feedback cycle) would be great (+ the repeatability of it all)
Best,
Razvan

As far as I know there are just a few differences between the released version and a version you build yourself, The released version is slightly more tested, has a correct version number, is packaged in a chocolatey package and is downloadable from GitHub.

I approved squashed and merged the latest PRs, @SeanFeldman @ErikMogensen whenever you want we can make a new release


Ongoing fixes for 4.2.0 release

I'm putting my ongoing fixes to get 4.2.0 to release here.

Do we think this pull request is worth reviving?

Going to close this for now


Exported chain windows -> linux issue

The current implementation for fitted models save in Windows is
"fitted_operation_path": "fitted_operations\operation_8.pkl"
However, it raises a file-not-found error in load stage for the Linux environment (/ sign is required).
The workaround is to replace it manually, but the appropriate fix is required.

Resolved in https://github.com/nccr-itmo/FEDOT/pull/586


PluginService using registry

TODO:

[x] migration guide

I think we'll also need some docs explaining to esm users that they need to register their scales, controllers, plugins, etc. now

Cool. Looks good to me. I think just some docs is all that's left

Can you add scaleService to the migration guide as well? @stockiNail suggested it's missing (https://github.com/chartjs/Chart.js/pull/7592#issuecomment-655319811)

@sgratzl @sebiniemann we're about to release alpha.2 with tree shaking after this PR is merged. Do you want to test it out at all before we do that?

@benmccann I'm already very busy this week, but I'd like to try it out in our test system afterwards.


Incorrect IP address for every vm

Good morning,
I'm still using the proxmox terraform provider to deploy my golden image.
terraform {
  required_providers {
    proxmox = {
      source = "telmate/proxmox"
    }
  }
}

resource "random_pet" "prefix" {}

provider "proxmox" {
    pm_api_url = "https://<IP_ADDRESS>:8006/api2/json"
    pm_debug = true
    pm_tls_insecure = true
    pm_user = "terraform@pve"
    pm_password = "my password"
}

resource "proxmox_vm_qemu" "masternodes" {
  count = var.master_node_count
  name = "${random_pet.prefix.id}-m-${count.index + 1}" #count.index starts at 0, so + 1 means this VM will be named test-vm-1 in proxmoxx
  target_node = var.proxmox_host
  clone = var.template_name
  agent = 1
  os_type = "cloud-init"
  cores = 2
  sockets = 1
  cpu = "host"
  memory = var.master_node_ram
  scsihw = "virtio-scsi-pci"
  bootdisk = "scsi0"
  disk {
    slot = 0
    # set disk size here. leave it small for testing because expanding the disk takes time.
    size = "${var.master_node_disk}"
    type = "scsi"
    storage = "local-lvm"
    iothread = 1
  }

  # if you want two NICs, just copy this whole network section and duplicate it
  network {
    model = "virtio"
    bridge = "vmbr0"
    tag = var.node_vlan
  }
  # not sure exactly what this is for. presumably something about MAC addresses and ignore network changes during the life of the VM
#  lifecycle {
#   ignore_changes = [
#      network,
#   ]
#  }

  ipconfig0 = "ip=dhcp"

  # sshkeys set using variables. the variable contains the text of the key.
  sshkeys = <<EOF
  ${var.ssh_key}
  EOF
}

The problem is, that PVE generates a new MAC address for the interfaces, but all VMs gets the same ip from the DHCP Server. For example: I deploy four servers and every has the ip <IP_ADDRESS>.
The DHCP server has a lease-time of 600 seconds. Guest Agend is installed
Any idea why I got everytime the same IP?

Could this be a systemd-networkd issue not a proxmox issue?  Ubuntu server for instance switched to using systemd-networkd April of 2020 - what this means is that for the DHCP request of MAC address is not being broadcast but the machine-id is being broadcast.  If you have a single template that you deploy from -- you are broadcasting the same machine-id each time -- the DHCP server will think it is the same machine asking for an IP address and give the same one out each time.
Two ways to attack this -- in your /etc/netplan config file you can add the item dhcp-identifier: mac  and also delete your the file /etc/machine-id  before you finish making your template -- that way the machine-id will be generated uniquely for each image on first boot.

I solved the problem with sysctl -w net.ipv4.ip_forward=1 on the pve host.

I solved the problem with sysctl -w net.ipv4.ip_forward=1 on the pve host.

where do you guys copy and paste this code? it's at least 2y old and breaks a lot o thing
  # not sure exactly what this is for. presumably something about MAC addresses and ignore network changes during the life of the VM
  lifecycle {
    ignore_changes = [
      network,
    ]
  }

remove it and be sure that you template has a cloud init agent installed and it has a machine-id "clean"

I found this in an older howto. I removed it now.

@fabian-born
Hello, I have the same problem with multiple VM per DHCP and I can't find solution.
Please can you share with me how can I use that command sysctl -w net.ipv4.ip_forward=1 with Terraform & Proxmox?
Thank you.

I get it.
Create your cloud-init and after install qemu-guest-agent run
virt-customize -a $IMAGE_NAME --run-command "echo -n > /etc/machine-id"


Forgot to ignore .vscode

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

Project coverage is 100.00%. Comparing base (a4f1252) to head (7913676).

Additional details and impacted files
@@            Coverage Diff            @@
##              main        #6   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            4         4
  Lines          265       265
=========================================
  Hits           265       265

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


Feedback - Problems after update from 1.33 to 1.40

So I updated the plugin, first that comes up is this:

I am not using comfy UI, so...
I guess the comfy UI selection here is for standalone or the a1111 extension?

Next thing is breaking it for me.
I can't select a model from the drop down menu.

Even after refreshing the a1111 model list where I have around 20 models ready to chose from.
I had no issues with 1.33 so I am switching back for the meantime.

Version 1.4 of the drop-down menu supports searching, remove it and enter keywords to select.

Thanks for the feedback! As cdmusic pointed out, we’ve made the large menus searchable in v1.4.0. Just type the model name and it’ll pop up.
Also both the searchable menu and the on start up comfyui error message have be resolve in v1.4.1


Bug/#2123 Removed duplicate code that's in BootStrapUtil

Changes for issue #2123

Was this PR opened by mistake on the source instead of the fork?


Strange behavior in output as shown in Initial State

I loved setting this up, but I'm seeing some strange behavior in the plots that I need help understanding (and hopefully fixing). Here are two images that show what I'm seeing from the SenseHAT data...
Humidity from SenseHAT (every 60 seconds):

Temperature from SenseHAT (every 60 seconds):

Notice the periodic pattern in these? I'm 99% sure that neither the temperature nor humidity in my sensor location are varying like that.
Here's a third image, based on Dark Sky data for wind speed and gusts (every 10 minutes):

Notice the strange "periodic stair step" pattern? It's another thing I can't explain, but would love to fix. I included it here because it's coming from DarkSky rather than the SenseHAT.
I'm reading SenseHAT data every minute and DarkSky data every 10 minutes but I don't think that's the source of the problem, because the cycles and stair-steps aren't in increments of 10.
Any ideas or suggestions will be greatly appreciated.
Andy
P.S. - Is there any way to add a moving average curve in Initial State? I've tried 'smooth' but it isn't very useful for getting rid of the erratic behavior of these curves.

Shared.

For inside temperature, I believe you are seeing the cycle of your HVAC system cooling your room. Honing in on the inside temperature near the peak outside temperature, you see the inside temperature quickly rise from 78.8 to 79.73 over 17 minutes. This is when your HVAC system is off. Once the temperature gets to 79.73, the AC kicks on again and it takes it 65 minutes to cool the room back to 78.8. It takes 65 minutes to cool b/c it is so hot outside and the HVAC system is working harder. At night, you see that the time it takes the AC to go back to the low point of temperature is faster (e.g. 12 minutes). That is b/c the HVAC system doesn't have to work as hard to cool the inside b/c the outside is cooler. Inside humidity changes when your HVAC is on or off so, you are seeing that change at the same frequency as your inside temperature.
This is a great example of the natural temperature fluctuations your inside room is experiencing as your HVAC systems moderates the temperature of your room.
As for wind speed and wind gust, I am pretty sure that is just real data coming from Dark Sky related to your location.

I may try turning the thermostat up, just to see if it changes the pattern. Stay tuned. And thanks!


⚠ Bofrost.nl has degraded performance

In 06dbfe0, Bofrost.nl (https://www.bofrost.nl) experienced degraded performance:

HTTP code: 200
Response time: 1902 ms

Resolved: Bofrost.nl performance has improved in a4b41c9.


fix(world-modules): SystemSwitch properly calls systems from root

Fixes https://github.com/latticexyz/mud/issues/2089
Not sure why tests didn't pick this up, we need to make a case for it

We should merge https://github.com/latticexyz/mud/pull/2216 into this


Routing-Controllers + class-validator bug?

When using the automatic validation from routing-controllers for some reason the email "patch@patch" is valid when we are using these validators and the "patch" validator group
@IsEmail({
        allow_display_name: false,
        allow_utf8_local_part: true,
        require_tld: true
    }, {
        groups: ["post", "patch", "login"]
    })
    @IsOptional({
        groups: ["patch"]
    })
    public email;

Doing it the manual way like so works however
let user = new UserValidation();
user.email = "patch@patch";
validate(user, {groups: ["patch"]}).then(console.log);

Experiencing the same kind issue @pleerock

Hi!
I have opened an issue with this in routing-controllers and closing this issue here.


cannot find package "github.com/micro/go-micro/selector/cache"

cannot find package "github.com/micro/go-micro/selector/cache"

I believe cache selector is now the default selector which is simply in github.com/micro/go-micro/selector

Feel free to reopen the issue if you have any more questions.


403 Forbidden response from flipper ui

I am sorry in advance for maybe a noobish question but I am stuck
After deploying flipper (with ui) to production and trying to flip feature I got 403 Forbidden from every action
I am running two thins, http and ssl one with force ssl option on
I see ui just fine but I can't trigger any action getting 403 Forbidden
Going back to development environment (with single ssl thin) and actions work fine
Any hints?
uncomfortable solution is to flip on development and copy flipper.pstore to production
Gems included by the bundle:

actionmailer (4.1.14)
actionpack (4.1.14)
actionview (4.1.14)
activemodel (4.1.14)
activerecord (4.1.14)
activerecord-sqlserver-adapter (4.1.1)
activesupport (4.1.14)
addressable (2.3.8)
ar-octopus (0.8.5)
arel (<IP_ADDRESS>40414130214)
bcrypt (3.1.10)
builder (3.2.2)
bundler (1.10.3)
coffee-rails (4.1.0)
coffee-script (2.4.1)
coffee-script-source (<IP_ADDRESS>)
concurrent-ruby (1.0.0)
daemons (1.2.3)
devise (3.5.2)
devise_ldap_authenticatable (0.8.5)
erubis (2.7.0)
eventmachine (1.0.8)
exception_notification (4.1.1)
execjs (2.6.0)
faraday (0.9.2)
flipper (0.7.4)
flipper-ui (0.7.4)
hashie (3.4.3)
i18n (0.7.0)
json (1.8.3)
jwt (1.5.2)
mail (2.6.3)
mime-types (2.99)
mini_portile (0.6.2)
minitest (5.8.4)
multi_json (1.11.2)
multi_xml (0.5.5)
multipart-post (2.0.0)
net-ldap (0.11)
oauth2 (1.0.0)
omniauth (1.2.2)
omniauth-google-oauth2 (0.2.9 b861c83)
omniauth-oauth2 (1.3.1)
orm_adapter (0.5.0)
protected_attributes (1.1.3)
rack (1.5.5)
rack-protection (1.5.3)
rack-test (0.6.3)
rails (4.1.14)
railties (4.1.14)
rake (10.5.0)
responders (1.1.2)
sass (3.4.19)
sass-rails (5.0.4)
sprockets (3.5.2)
sprockets-rails (2.3.3)
thin (1.6.4)
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.1)
tiny_tds (0.7.0)
tzinfo (1.2.2)
tzinfo-data (1.2015.7)
uglifier (2.7.2)
warden (1.2.3)

warden was updated to latest 1.2.6 with no luck
access constraint was updated and it works fine from localhost (remote flipping still fails but I guess I will need to leave with it)
class CanAccessFlipper
def self.matches?(request)
current_user = request.env['warden'].user
(current_user.present? && current_user.respond_to?(:is_admin?) && current_user.is_admin?) || request.remote_ip == '<IP_ADDRESS>'
end
end

Could you add some logging to get some more information? Check to see which of the conditionals is returning false maybe (ie: request ip or current user or is admin). Also, not much I can do to help without more information. I'd probably need you to paste in here anything related to flipper in your app.

Hi,
Hey everyone,
I got the same issue here.
According to the logs, the only thing that I got was:
Started POST "/flipper/features" for <IP> at <TIMESTAMP>

I have the same issue right now. We can reproduce it only on production/staging. By some reasons, I can not reproduce it locally, even if I run application with RAILS_ENV=staging. Also there are no logs :-(

I ran staging locally, and I have this in logs:
W, [2016-04-12T17:29:59.801209 #16401]  WARN -- : attack prevented by Rack::Protection::AuthenticityToken
W, [2016-04-12T17:30:01.924352 #16401]  WARN -- : attack prevented by Rack::Protection::AuthenticityToken
W, [2016-04-12T17:30:04.102610 #16401]  WARN -- : attack prevented by Rack::Protection::AuthenticityToken

Looks like middleware related issue...

I was expecting to find this middleware somewhere in rails.. But it was a wrong path. It turned out it comes from FlipperUI: https://github.com/jnunemaker/flipper/blob/master/lib/flipper/ui.rb#L30-L40
Now I need to investigate why it does not work for me..

Went crazy with error..I want to provide the information, that I found out her:

I can happen in case if session does not work properly (because session saves csrf token, see  implementation of https://github.com/sinatra/rack-protection/blob/master/lib/rack/protection/authenticity_token.rb)
In my case it's can be reproduced on staging and production only... Even locally with RAILS_ENV=production cannot be reproduced (in my previous post, I did it occassionaly by deleting cookies, what actually resets sesion)
It does not work in Google-Chrome, but works perfectly in Firefox

Hope, those fact I provided can be useful for somebody else, who'll get this error and try to track it down.

Without more information there isn't anything I can do. If anyone could setup an example app where this happens or figure out what there problem is and post here I'm happy to add docs. The key really is that you have a session before flipper. If you are getting a 403, I'd put good money on rack protection. Closing, but please drop any more thoughts or help here and I'll keep following along.

I had a similar problem.
Soved it by modifying nginx config.
See sidekiq discussion: http://stackoverflow.com/questions/37270614/forbidden-sign-out-using-sidekiq-devise-activeadmin-on-production-server-with
Shameless copypaste from that thread:
In Nginx server configuration you need:

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;

Don't have much to add, other than we're experiencing the same thing, and it looks to be as you thought with an existing session.
Our setup:
We use basic auth on the flipper stuff and Devise/warden on the non-flipper stuff. These two "apps" are constrained by subdomain routes, but once you've logged into the devise "app" (subdomain A), the flipper UI (with basic auth) (subdomain B) starts throwing this forbidden error at us.
Opening flipper UI up in private browsing window avoids the issue (as you'd expect as it doesn't have the existing devise session from subdomain A).
The warden cookie's domain is set to work on all subdomains of our domain.

@shimms how are you authenticating the flipper ui?

Custom middleware which performs basic_auth if the subdomain is matched, otherwise continues normal processing:
class AdminAuth < Rack::Auth::Basic
  def call(env)
    # perform auth if admin domain
    return super if request_subdomain(Rack::Request.new(env)) == ENV.fetch('ADMIN_SUBDOMAIN')

    @app.call(env)  # skip auth
  end

  private

  def request_subdomain(request)
    request.env['HTTP_HOST'].split('.').first
  end
end

Flipper mounted as:
constraints :subdomain => ENV.fetch('ADMIN_SUBDOMAIN') do
  ...
  mount Flipper::UI.app(Teamsquare::Application.features) => '/'
  ...
end

I ran into this issue today, and solved it by clearing my cookies for the site in question. Thanks to @greyblake for mentioning the CSRF issue, that helped.

I'm having this same issue in Safari in production environment only (no issue in staging or development), accessing with Firefox instead seems to be a workaround.
I think I had similar issues with sidekiq-web, and have the following code in my routes.rb as a fix:
Sidekiq::Web.set :session_secret, Rails.application.secrets[:secret_key_base]

Is there any way to set this same option for Flipper UI, or should this already be happening automatically?

I'm having exactly the same issue mentioned here with Google Chrome in production environment.
Also seeing this on my server logs:
WARN -- : attack prevented by Rack::Protection::AuthenticityToken

Tried to disable the related rack protection with:
mount Flipper::UI.app(Flipper, {:rack_protection => {}}) => '/flipper'

and also tried to use the same cookie currently used by my application with:
mount Flipper::UI.app(Flipper) { |builder|
  builder.use Rack::Session::Cookie, :secret => Rails.application.secrets[:secret_key_base],
              :key => Rails.application.config.session_options[:key]
} => '/flipper'

and tried to set headers on my nginx proxy:
proxy_set_header  X-Forwarded-Proto $scheme;
proxy_set_header  X-Forwarded-Ssl on;
proxy_set_header  X-Forwarded-Port $server_port;
proxy_set_header  X-Forwarded-Host $host;
proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header  Host $http_host;
proxy_set_header  X-Real-IP $remote_addr;

also cleared my browser data as suggested before but nothing seems to work 😞 I'm really frustrated with this issue.
I exported the Chrome HTTP request toggling one of the flags that I have as CURL and imported it on Postman app, it works like a charm. Also works on Firefox. Looks like Chrome is doing something wrong.
The only difference that I could spot between chrome and firefox requests was the Host header, it is present on firefox request but is not on chrome.

I almost certain that is a nginx related issue. I could trace it down to HTTP_ORIGIN header being passed wrong (?) by nginx because I set a blank Rails project on my local machine with flipper and enabled production mode and could not reproduce the issue, also locally running my application in production mode can not reproduce the issue.
Currently I'm using cloudflare -> nginx proxy -> puma socket and I could make it work on Google Chrome doing a dark evil magic simple trick like this:
# routes.rb
constraints CanAccessFlipperUI do
    mount Flipper::UI.app(Flipper) => '/dolphin_evil_flags'
end

# flipper.rb
class CanAccessFlipperUI
  def self.matches?(request)
    # the trick (do not use in production, is unsafe)
    request.set_header('HTTP_ORIGIN', nil)

    current_user = request.env['warden'].user
    current_user.present? && current_user.id.to_s == '1'
  end
end

I know it's far from ideal and can potentially be a security breach but I'm still debugging my nginx stack (specially headers) to find out how to fix this issue once by all.

We ran into this problem on https://dev.to, but our stack runs on Heroku so there is no nginx proxy to configure. We worked around it by disabling CSRF protections in the Rack middleware running Flipper UI, and relying upon protections in our main Rails application (https://github.com/forem/forem/pull/9360/files).
mount Flipper::UI.app(Flipper,
    { rack_protection:
      { except: %i[authenticity_token form_token json_csrf remote_token http_origin session_hijacking] } }
), at: "flipper"

@joshpuetz ugh. So sorry. Super weird. I use flipper ui on multiple heroku apps with no issues. I'd love to no more about what caused your problem. I'd be happy to even meet up for a short zoom or something if there was anything I could do to help.

I just got the same error on a brand new Mac. Downloaded our code base and tried this, never seen it on my older Mac. Same OS, 2018 vs 2020 MBP, so not so different.

If you are using haproxy in front of your nginx/rails, this option in haproxy configuration may help.
From haproxy documentation:

If you’d like to inform the backend server whether HTTPS was used, you can append an X-Forwarded-Proto request header by adding the http-request set-header directive:

http-request set-header X-Forwarded-Proto https if { ssl_fc }
http-request set-header X-Forwarded-Proto http if !{ ssl_fc }

At least this helped me to solve forbidden error. Adding such header could help with others than haproxy ssl terminators/offloaders also.

If you are using haproxy in front of your nginx/rails, this option in haproxy configuration may help.
From haproxy documentation:

If you’d like to inform the backend server whether HTTPS was used, you can append an X-Forwarded-Proto request header by adding the http-request set-header directive:

http-request set-header X-Forwarded-Proto https if { ssl_fc }
http-request set-header X-Forwarded-Proto http if !{ ssl_fc }

At least this helped me to solve forbidden error. Adding such header could help with others than haproxy ssl terminators/offloaders also.

No longer an issue for me

I had to use @joshpuetz way using rack_protection to get it to work in staging / production environments.

I'm still having the same problem. I was able to create a small application that reproduces it: https://github.com/matheussilvasantos/flipper_ui_broken.

Using Rack::Session::Cookie instead of Rack::Session::Pool for the session middleware fixed the error for me: https://github.com/matheussilvasantos/flipper_ui_broken/commit/b430e4d5ae2953f67e032f1c5962e618a179b460.
I still don't know why, but when you use Rack::Session::Pool, the csrf token isn't set in the session in https://github.com/sinatra/sinatra/blob/master/rack-protection/lib/rack/protection/authenticity_token.rb#L135.
I don't know why one would use Rack::Session::Pool. It was already there when I started working on the code.

I've just found the problem for my scenario. https://github.com/jnunemaker/flipper/pull/606 fixes it for me.

Letting you know that we have the same issue as above @joshpuetz. Disabling rack_protection concerning CSRF checks did cure this situation for us. Our application is behind Cloudflare and Nginx reverse proxy.
Didn't know good ways how to debug it, so I'm currently setting it aside, but I'm interested in solving it. If you have good hints how to make Rack or whatever needed to spit out more logs to understand the situation, let me know. I don't know too much about Rack internals, my experience with it is very basic.

I wonder if I should change builder.use Rack::Protection, rack_protection_options to use Rack::Protection::AuthenticityToken. @ikropotov do you think that would have helped you? I thought that by setting rack protection options to rack_protection_options = options.fetch(:rack_protection, use: :authenticity_token) that is what I was doing but now I'm thinking it doesn't work that way.

@jnunemaker I work with @ikropotov so I can try to answer that.
I'm not positive because I haven't tested that, but yes I think that would have helped us. Because like @ikropotov said, initially Rack::Protection::HttpOrigin was failing, but even when I just excluded that middleware with { except: %i[http_origin] } the issue was still occurring and a different Rack Protection middleware started causing an issue.
Looking at this, I think when you use builder.use Rack::Protection, rack_protection_options, you are adding Rack::Protection::AuthenticityToken (because it is not a default) but also adding all the default Rack Protection middlewares:
Rack::Protection::FrameOptions
Rack::Protection::HttpOrigin
Rack::Protection::IPSpoofing
Rack::Protection::JsonCsrf
Rack::Protection::PathTraversal
Rack::Protection::RemoteToken
Rack::Protection::SessionHijacking
Rack::Protection::XSSHeader

I'm not sure which Rack protections you want/intend to apply though.

I was experiencing this issue and determined it was caused by how nginx & AWS ALB handle client IP's
The IPSpoofing class of RackProtection checks to make sure the value of X-Client-IP and X-Real-IP are contained in the list of IP's found in the X-Forwarded-For header. After ensuring that this condition was met, everything worked as normal.

I had this issue and resolved it by effectively copying what I had for sidekiq, hopefully it helps someone in the future.
mount Flipper::UI.app(Flipper) { |builder|
    builder.use ActionDispatch::Cookies
    builder.use ActionDispatch::Session::CookieStore, key: Rails.application.config.session_options[:key]
    builder.use Rack::Auth::Basic do |username, password|
      ActiveSupport::SecurityUtils.secure_compare(username, "hello") &
        ActiveSupport::SecurityUtils.secure_compare(password, "world")
    end
  } => "/flipper"`

Adding `builder.use ActionDispatch::Cookies` was what stopped the 403's for me.

Sorry to add to this thread, but I also was getting 403 responses when trying to create a Flipper feature in production via the web UI; there was WARN -- : attack prevented by Rack::Protection::HttpOrigin message in my logs for each attempt to create a Flipper feature.
What fixed it for me was changing the Referrer-Policy header set by NGINX from no-referrer to strict-origin-when-cross-origin. (When the Referrer-Policy header was no-referrer, the Origin header sent with my requests to create a new Flipper feature flag was set to null, which is what caused the rack-protection HttpOrigin check to fail.)

I really need to just lock rack protection down to the minimum it seems.

@jnunemaker Yeah, that might be a good idea.
Alternatively, for what it's worth, in my particular case, I have NGINX configured to respect the Referrer-Policy header, if it is set by the "upstream" server that NGINX is proxying. The no-referrer value that I mentioned that NGINX was setting for the Referrer-Policy header for Flipper responses was just the default/fallback value that I was having NGINX add to the response headers if the upstream server has not itself already set such a header.
So, in my particular situation, I would not have encountered a 403 response when trying to create a new Flipper feature if Flipper would set a Referrer-Policy header that is compatible with the requirements of the Rack::Protection::HttpOrigin check. That could be accomplished via the following change:
diff --git a/lib/flipper/ui/action.rb b/lib/flipper/ui/action.rb
index 0ff4053e..e0a6a618 100644
--- a/lib/flipper/ui/action.rb
+++ b/lib/flipper/ui/action.rb
@@ -38,6 +38,7 @@ module Flipper
         style-src-elem 'self';
         connect-src https://www.flippercloud.io;
       CSP
+      REFERRER_POLICY = 'strict-origin-when-cross-origin'.freeze

       # Public: Call this in subclasses so the action knows its route.
       #
@@ -138,6 +139,7 @@ module Flipper
       def view_response(name)
         header Rack::CONTENT_TYPE, 'text/html'
         header 'content-security-policy', CONTENT_SECURITY_POLICY
+        header 'referrer-policy', REFERRER_POLICY
         body = view_with_layout { view_without_layout name }
         halt [@code, @headers, [body]]
       end

That all being said, as you suggested, it's very possible that an easier and/or more generally reliable solution might instead be to dial down Flipper's usage of rack-protection to only perform checks deemed essential (which presumably might not include the Rack::Protection::HttpOrigin check that was an issue for me and a few others who have commented in this thread).

Like @MiralDesai I was getting this error in --api Rails apps, even in development.
In that case it's due to an error being raised in Rack::Protection::Base#session here:
raise "you need to set up a session middleware *before* #{self.class}"

and then being rescued in in Rack::Protection::AuthenticityToken#accepts? here:
rescue StandardError
  false

I'm able to fix that problem by changing the example Rails routes code from:
Flipper::UI.app(Flipper)

to:
Flipper::UI.app(Flipper, rack_protection: {})

which changes the options from the default { use: :authenticity_token } to {}. This just turns off AuthenticityToken protection, which iiuc isn't needed in --api Rails apps.


How to torch.jit.trace a peft model

Feature request
Need an example of how to trace a peft model.
Motivation
Hi, I'm trying to deploy a Lora-finetuned llama model on Nvidia Triton server. For that I need to traced_model = torch.jit.trace(model, model_input_dict, strict=False), however I encountered issues like Tracing failed sanity checks! ERROR: Graphs differed across invocations!
and terminal output was like:
/python3.10/site-packages/transformers/models/llama/modeling_llama.py:598: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  if input_shape[-1] > 1:
/python3.10/site-packages/bitsandbytes/autograd/_functions.py:300: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  if prod(A.shape) == 0:
/python3.10/site-packages/bitsandbytes/autograd/_functions.py:322: UserWarning: MatMul8bitLt: inputs will be cast from torch.float32 to float16 during quantization
  warnings.warn(f"MatMul8bitLt: inputs will be cast from {A.dtype} to float16 during quantization")
/python3.10/site-packages/bitsandbytes/functional.py:2016: TracerWarning: Converting a tensor to a Python number might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  nnz = nnz_row_ptr[-1].item()
/python3.10/site-packages/bitsandbytes/functional.py:1714: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  assert prod(list(shapeA)) > 0, f'Input tensor dimensions need to be > 0: {shapeA}'
/python3.10/site-packages/bitsandbytes/functional.py:1717: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  if shapeA[0] == 0 and dimsA == 2:
/python3.10/site-packages/bitsandbytes/functional.py:1719: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  elif shapeA[1] == 0 and dimsA == 3:
/python3.10/site-packages/bitsandbytes/functional.py:1741: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  shapeA[-1] == shapeB[-1]
/python3.10/site-packages/bitsandbytes/functional.py:1826: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  new_row_stats.shape[0] == row_stats.shape[0]
/python3.10/site-packages/bitsandbytes/functional.py:1829: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  new_col_stats.shape[0] == col_stats.shape[0]
/python3.10/site-packages/transformers/models/llama/modeling_llama.py:120: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  if seq_len > self.max_seq_len_cached:
/python3.10/site-packages/transformers/models/llama/modeling_llama.py:350: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  if attn_weights.size() != (bsz, self.num_heads, q_len, kv_seq_len):
/python3.10/site-packages/transformers/models/llama/modeling_llama.py:357: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  if attention_mask.size() != (bsz, 1, q_len, kv_seq_len):
/python3.10/site-packages/transformers/models/llama/modeling_llama.py:367: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  if attn_output.size() != (bsz, self.num_heads, q_len, self.head_dim):
/python3.10/site-packages/bitsandbytes/functional.py:2019: TracerWarning: Converting a tensor to a Python number might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  A.shape[0], A.shape[1], nnz_row_ptr[-1].item(), device
/python3.10/site-packages/bitsandbytes/functional.py:1901: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  assert values.numel() == nnz
/python3.10/site-packages/bitsandbytes/functional.py:1902: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  assert rowidx.numel() == nnz
/python3.10/site-packages/bitsandbytes/functional.py:1903: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  assert colidx.numel() == nnz

Your contribution
I saw some suggestions on the internet like adding a decorator like @torch.jit.script, but I don't know exactly where to add.

I have never tried to jit-trace a PEFT model, but since there are some quite dynamic parts of the code, I'm not surprised that it would fail. If this is an option for you, could you try to run model = model.merge_and_unload() beforehand and see if tracing works with the merged model?

yes I've tried merge_and_unload(), after that I received another trace error regarding MatMul4Bit operation in quantized model. I've opend up an issue in bitsandbytes repo: https://github.com/TimDettmers/bitsandbytes/issues/1009, hope this could be solved soon.
Anyway, my current work around solution is to init model class and load weights on triton, without using torchscript.

Okay, thanks for the feedback. I think there is nothing left to do for this issue, so I'll close it. Feel free to re-open if anything new comes up.


Formatter fails -- No such file or directory

Installed the gem. I'm using Apitome. I'm not able to run the initial rake task to generate the docs I need. Looks like it can't find one of the template files on this line 10 of general_markup_writer.rb
module RspecApiDocumentation
  module Writers
    # Base class for writers that write HTML
    class GeneralMarkupWriter < Writer
      INDEX_FILE_NAME = 'index'

      # Write out the generated documentation
      def write
        File.open(configuration.docs_dir.join(index_file_name + '.' + extension), "w+") do |f|
          f.write markup_index_class.new(index, configuration).render
        end

        index.examples.each do |example|
          markup_example = markup_example_class.new(example, configuration)
          FileUtils.mkdir_p(configuration.docs_dir.join(markup_example.dirname))

          File.open(configuration.docs_dir.join(markup_example.dirname, markup_example.filename), "w+") do |f|
            f.write markup_example.render
          end
        end
      end

      def index_file_name
        INDEX_FILE_NAME
      end

      def extension
        raise 'Parent class. This method should not be called.'
      end
    end
  end
end

Trace
/Users/ME/.rvm/gems/ruby-2.0.0-p451@anthem.com/gems/mustache-0.99.5/lib/mustache/settings.rb:155:in `read': No such file or directory - /Users/ME/Documents/Projects/Client-Work/anthem.com/inside of the gem/rspec_api_documentation/html_index.mustache (Errno::ENOENT)
    from /Users/ME/.rvm/gems/ruby-2.0.0-p451@anthem.com/gems/mustache-0.99.5/lib/mustache/settings.rb:155:in `template'
    from /Users/ME/.rvm/gems/ruby-2.0.0-p451@anthem.com/gems/mustache-0.99.5/lib/mustache.rb:108:in `render'
    from /Users/ME/.rvm/gems/ruby-2.0.0-p451@anthem.com/gems/rspec_api_documentation-4.0.0/lib/rspec_api_documentation/writers/general_markup_writer.rb:10:in `block in write'
    from /Users/ME/.rvm/gems/ruby-2.0.0-p451@anthem.com/gems/rspec_api_documentation-4.0.0/lib/rspec_api_documentation/writers/general_markup_writer.rb:9:in `open'
    from /Users/ME/.rvm/gems/ruby-2.0.0-p451@anthem.com/gems/rspec_api_documentation-4.0.0/lib/rspec_api_documentation/writers/general_markup_writer.rb:9:in `write'
    from /Users/ME/.rvm/gems/ruby-2.0.0-p451@anthem.com/gems/rspec_api_documentation-4.0.0/lib/rspec_api_documentation/writers/writer.rb:13:in `write'
    from /Users/ME/.rvm/gems/ruby-2.0.0-p451@anthem.com/gems/rspec_api_documentation-4.0.0/lib/rspec_api_documentation/api_documentation.rb:27:in `block in write'
    from /Users/ME/.rvm/gems/ruby-2.0.0-p451@anthem.com/gems/rspec_api_documentation-4.0.0/lib/rspec_api_documentation/api_documentation.rb:26:in `each'
    from /Users/ME/.rvm/gems/ruby-2.0.0-p451@anthem.com/gems/rspec_api_documentation-4.0.0/lib/rspec_api_documentation/api_documentation.rb:26:in `write'
    from /Users/ME/.rvm/gems/ruby-2.0.0-p451@anthem.com/gems/rspec_api_documentation-4.0.0/lib/rspec_api_documentation/api_formatter.rb:38:in `each'
    from /Users/ME/.rvm/gems/ruby-2.0.0-p451@anthem.com/gems/rspec_api_documentation-4.0.0/lib/rspec_api_documentation/api_formatter.rb:38:in `stop'
    from /Users/ME/.rvm/gems/ruby-2.0.0-p451@anthem.com/gems/rspec-core-3.0.1/lib/rspec/core/reporter.rb:137:in `block in notify'
    from /Users/ME/.rvm/gems/ruby-2.0.0-p451@anthem.com/gems/rspec-core-3.0.1/lib/rspec/core/reporter.rb:136:in `each'
    from /Users/ME/.rvm/gems/ruby-2.0.0-p451@anthem.com/gems/rspec-core-3.0.1/lib/rspec/core/reporter.rb:136:in `notify'
    from /Users/ME/.rvm/gems/ruby-2.0.0-p451@anthem.com/gems/rspec-core-3.0.1/lib/rspec/core/reporter.rb:131:in `stop'
    from /Users/ME/.rvm/gems/ruby-2.0.0-p451@anthem.com/gems/rspec-core-3.0.1/lib/rspec/core/reporter.rb:113:in `finish'
    from /Users/ME/.rvm/gems/ruby-2.0.0-p451@anthem.com/gems/rspec-core-3.0.1/lib/rspec/core/reporter.rb:56:in `report'
    from /Users/ME/.rvm/gems/ruby-2.0.0-p451@anthem.com/gems/rspec-core-3.0.1/lib/rspec/core/runner.rb:108:in `run_specs'
    from /Users/ME/.rvm/gems/ruby-2.0.0-p451@anthem.com/gems/rspec-core-3.0.1/lib/rspec/core/runner.rb:86:in `run'
    from /Users/ME/.rvm/gems/ruby-2.0.0-p451@anthem.com/gems/rspec-core-3.0.1/lib/rspec/core/runner.rb:70:in `run'
    from /Users/ME/.rvm/gems/ruby-2.0.0-p451@anthem.com/gems/rspec-core-3.0.1/lib/rspec/core/runner.rb:38:in `invoke'
    from /Users/ME/.rvm/gems/ruby-2.0.0-p451@anthem.com/gems/rspec-core-3.0.1/exe/rspec:4:in `<main>'
/Users/ME/.rvm/rubies/ruby-2.0.0-p451/bin/ruby -I/Users/ME/.rvm/gems/ruby-2.0.0-p451<EMAIL_ADDRESS>-S<EMAIL_ADDRESS>--format RspecApiDocumentation::ApiFormatter failed
You have new mail in /var/mail/ME

Closing due to age.

Still happening. I figured out that it happens when having multiple groups. In the code below, when I uncomment the public group definition, I get this error.
RspecApiDocumentation.configure do |config|
  config.format = [:api_blueprint]
  config.filter = :private
  config.docs_dir = Rails.root.join("doc", "api", "private")

  #config.define_group :public do |c|
  #  c.format = [:api_blueprint]
  #  c.filter = :public
  #  c.docs_dir = Rails.root.join("doc", "api")
  #end
end

/Users/kurko/project_name/vendor/gems/rspec_api_documentation/lib/rspec_api_documentation/writers/general_markup_writer.rb:10:in `initialize': No such file or directory @ rb_sysopen - /Users/kurko/project_name/doc/api/private/index.apib (Errno::ENOENT)
        from /Users/kurko/project_name/vendor/gems/rspec_api_documentation/lib/rspec_api_documentation/writers/general_markup_writer.rb:10:in `open'
        from /Users/kurko/project_name/vendor/gems/rspec_api_documentation/lib/rspec_api_documentation/writers/general_markup_writer.rb:10:in `write'
        from /Users/kurko/project_name/vendor/gems/rspec_api_documentation/lib/rspec_api_documentation/writers/writer.rb:13:in `write'
        from /Users/kurko/project_name/vendor/gems/rspec_api_documentation/lib/rspec_api_documentation/api_documentation.rb:27:in `block in write'
        from /Users/kurko/project_name/vendor/gems/rspec_api_documentation/lib/rspec_api_documentation/api_documentation.rb:26:in `each'
        from /Users/kurko/project_name/vendor/gems/rspec_api_documentation/lib/rspec_api_documentation/api_documentation.rb:26:in `write'
        from /Users/kurko/project_name/vendor/gems/rspec_api_documentation/lib/rspec_api_documentation/api_formatter.rb:38:in `each'
        from /Users/kurko/project_name/vendor/gems/rspec_api_documentation/lib/rspec_api_documentation/api_formatter.rb:38:in `stop'

It happens even though I define the group separately. I'm still investigating.

I think the issue is related to having the sub group be above the main group. As part of the generation each group will rm their folder. Can you make the bottom group have doc/api/public and see what happens?

@oestrich yes, precisely that. It deletes all folders in the beginning of the process. The solution is simple and if you give me a thumbs up I will open a PR:
      INDEX_FILE_NAME = 'index'

      # Write out the generated documentation
      def write
        if render_options.fetch(:index, true)
+         FileUtils.mkdir_p(configuration.docs_dir)
          File.open(configuration.docs_dir.join(index_file_name + '.' + extension), "w+") do |f|
            f.write markup_index_class.new(index, configuration).render
          end
        end

        if render_options.fetch(:examples, true)
          index.examples.each do |example|
            markup_example = markup_example_class.new(example, configuration)
            FileUtils.mkdir_p(configuration.docs_dir.join(markup_example.dirname))

            File.open(configuration.docs_dir.join(markup_example.dirname, markup_example.filename), "w+") do |f|
              f.write markup_example.render
            end
          end
        end
      end

Closing due to age.

The solution is simple and if you give me a thumb up I will open a PR:

Sorry about that, I was just looking at the age of the initial issue when I went on a closing spree last week. 👍 to your PR.


Improve format_reason for certain oddly formed badarg stacktraces

I'm not sure how these weird stacktraces are formed, but @jaredmorrow found one, so here's a band-aid.

+1, gives a more sane output for the badarg failure we saw


ResourceManager bug with *.ttf files

To reproduce:

Place any *.ttf font file inside resources/ folder
Launch app with love
see error

fixed

Fixed and refactored for pattern and subdirectory loading.


chore: upgrade charts

updated chart jx3/jx-build-controller from 0.0.31 to 0.0.32
updated chart jx3/jx-pipelines-visualizer from 1.1.9 to 1.1.10

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign ccojocar
You can assign the PR to them by writing /assign @ccojocar in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

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


Support for qdrant local multimodal vector store

Might help with the image matching issues.

Requires:
pip install llama-index-vector-stores-qdrant
pip install qdrant_client


Feature/application connector

Resolves #15.
Implemented application connector, with read methods for this registry data: currentApp, currentUser, themes, pages.
Parent data source is something which I would like to take more time to think about, since it has some unique quirks when compared to other ones. It can be done in next iteration.
Also, did kind of a switch to async-await.

We should later include operators like startsWith or contains for name, etc.


KeyError exporting GN instances with child

Describe the bug
I'm using the new Geometry Nodes instances functionality, and the code blows up if an object that creates instances also has a child object.
From what I understand, the code doesn't expect an "instancier" object to also have child objects, and therefore throws a KeyError when it tries to look up the child in the previously enumerated children types of the object.
To Reproduce
Export glTF GN instances bug.zip as glTF using saved settings.
Alternatively:

Create a new .blend file, and add the the following GN tree to the default cube:

Add a child object to the cube:

Export as glTF with "Geometry Nodes Instances (Experimental)" ticked. It will fail with a KeyError:

  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\addons_core\io_scene_gltf2\__init__.py", line 1287, in execute
    res = gltf2_blender_export.save(context, export_settings)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 37, in save
    json, buffer = __export(export_settings)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 55, in __export
    __gather_gltf(exporter, export_settings)
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 202, in __gather_gltf
    active_scene_idx, scenes, animations = gltf2_blender_gather.gather_gltf2(export_settings)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather.py", line 31, in gather_gltf2
    scenes.append(__gather_scene(blender_scene, export_settings))
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 37, in wrapper_cached
    result = func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather.py", line 68, in __gather_scene
    vtree.filter()
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_tree.py", line 540, in filter
    self.filter_tag()
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_tree.py", line 532, in filter_tag
    self.recursive_filter_tag(r, None)
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_tree.py", line 570, in recursive_filter_tag
    self.recursive_filter_tag(child, parent_keep_tag)
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_tree.py", line 570, in recursive_filter_tag
    self.recursive_filter_tag(child, parent_keep_tag)
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_tree.py", line 565, in recursive_filter_tag
    if self.nodes[uuid].children_type[child] == VExportNode.CHILDREN_IS_IN_COLLECTION:
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
KeyError: '94eee068-b5cb-4eb9-b101-fb99a7678d80'

Unmute the Realize Instances node and re-export. It will succeed.

Version

OS: Windows
Blender Version 4.2

This bug is also triggered by using non-GN instancing, where adding a child and outputting instances is the historic way to create instances.
glTF non-GN instances bug.zip

Confirmed


DataLoading

Has anyone gotten data loading to successfully work with Django & Strawberry? I can't seem to find any decent examples of it :/

Hi @rishindoshi ,
Dataloading works fine using the strawberry's documentation. What are the issues you are facing with it?

seemed like django wasn't playing well with promises but this package helped me out a ton:
https://github.com/jkimbo/graphql-sync-dataloaders

It would probably be nice to add this to our documentation, to help people using sync django :)