Refactor C++ interface into Map class

A few things remain to finish this implementation:

Make async task dispatch safe for multiple instances
Make debug flags trigger tile rebuilding when necessary (not strictly necessary?)
Create and access a RenderState instance for each GL thread (separate PR)

Items to consider:

There are other possible approaches to managing multiple Tangram instances. An alternative would be to require an object handle as an argument to all of the main interface functions, e.g.

auto mapHandle = Tangram::init();
Tangram::loadSceneAsync(mapHandle, sceneFilePath);

where mapHandle is an integer or a void pointer. I spent a little time trying this and it seems very possible, but often more verbose. The advantages of this would be that the internal operation of Tangram could be totally hidden from the calling context and it would then be much easier to write a pure C interface to the library.

This current implementation has the drawback of exposing the types and declarations for all the members in Tangram::Map to the calling application. This could be addressed by wrapping the actual map data structure in another class such that the outer class only needs to hold an opaque pointer to the implementation class.

The main interface in this implementation is now the Tangram::Map class, but it resides in files called "tangram.h" and "tangram.cpp". For consistency with the rest of our source files, we may want to rename these to "map.h" and "map.cpp".

I'm realizing it's going to be another big heap of work to get multiple instances working in a truly safe way on all of our platforms. 2 issues so far:

RenderState is accessed from a global scope right now, but we actually need a separate RenderState for each GL thread. There happens to be a perfect solution for this in the C++11 thread_local storage specifier, but this feature isn't supported in AppleClang until the upcoming Xcode 8 (even though upstream Clang has supported it since 3.5). An alternative approach is to create and switch between multiple instances in our own code - I've implemented most of that solution and it's a huge pain and probably slower, but should technically work.

On Android we render with a GlSurfaceView which has a separate thread used just for GL rendering. Our JNI code right now uses global variables to track which thread the JNI environment should attach to, and that will simply be broken if we have multiple GlSurfaceViews with multiple rendering threads.

It may be sensible to merge the changes for the Map class refactoring and then incrementally fix support for rendering with multiple instances.

@blair1618 : we can probably easily convert RenderState to a class/struct and instantiate one RenderState instance for each of the GL threads instead of keeping it global and adding thread safety within it.
It could be a separate work/PR only for that and will probably make things simpler on that end.

Yeah, the thread_local specifier is the most elegant solution for RenderState but it's not the only way. I've tried just using an unordered_map of thread_ids to RenderState instances here: https://github.com/tangrams/tangram-es/commit/128d1c196a223e6d122e560101e5a7b7736f5dd1

Yes thread_local seems the most appropriate. In https://github.com/tangrams/tangram-es/commit/128d1c196a223e6d122e560101e5a7b7736f5dd1 the render state access might be a bottleneck, we could probably pass it around to our gl objects (by accessing the thread id once at the beginning of the render loop).

I'm worried about the speed of RenderState::get() lookups too, I plan to benchmark it.

Looks good for me.

To clean up the Map class declaration, we can use a private implementation class like I've done here: https://github.com/tangrams/tangram-es/commit/6be9f398605f468adfc89b0dc0c90c9ad0861672
This could either go into this PR or a quick follow-up, but it's a closely-related change that (I think) should be considered necessary for maintainability.
Also, I can't decide what to name the inner class! Considered "Base", "Bridge", "Detail", "Impl", "Inner", ...

So I get a crash on android by performing a gesture while the scene is being loading. Can reproduce this with the default scene file (though harder to hit because its faster to load) as well as with a remote scene file. You can try reoriented the device to trigger a context loss just as you do a gesture motion.
Last few lines on the logs show some more information. Looks like MapController is null
7-18 17:25:45.579 12923-13804/com.mapzen.tangram.android D/Tangram: TANGRAM tileWorker.cpp:67: Passed new TileBuilder to TileWorker
07-18 17:25:45.669 12923-13803/com.mapzen.tangram.android D/Tangram: Failed to open asset at path: fonts/sans-serif-400normal.ttf
07-18 17:25:45.679 12923-13803/com.mapzen.tangram.android I/Alfons: LOADED Font: Roboto Regular size: 52
07-18 17:25:46.159 12923-12923/com.mapzen.tangram.android D/Activity: performCreate Call secproduct feature valuefalse
07-18 17:25:46.159 12923-12923/com.mapzen.tangram.android D/Activity: performCreate Call debug elastic valuetrue
07-18 17:25:46.169 12923-12923/com.mapzen.tangram.android E/ViewRootImpl: sendUserActionEvent() mView == null
07-18 17:25:46.179 12923-13387/com.mapzen.tangram.android D/Tangram: TANGRAM tangram.cpp:49: initialize
07-18 17:25:46.189 12923-13387/com.mapzen.tangram.android D/Tangram: TANGRAM tangram.cpp:72: finish initialize
07-18 17:25:46.189 12923-13387/com.mapzen.tangram.android D/Tangram: TANGRAM tangram.cpp:143: Loading scene file: scene.yaml
07-18 17:25:46.259 12923-12923/com.mapzen.tangram.android I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@20b96fd3 time:50440299
07-18 17:25:46.289 12923-13387/com.mapzen.tangram.android D/Tangram: WARNING sceneLoader.cpp:1524: Can't find data source touch for layer touch
07-18 17:25:46.359 12923-12923/com.mapzen.tangram.android D/Activity: performCreate Call secproduct feature valuefalse
07-18 17:25:46.359 12923-12923/com.mapzen.tangram.android D/Activity: performCreate Call debug elastic valuetrue
07-18 17:25:46.369 12923-13059/com.mapzen.tangram.android D/Tangram: TANGRAM tangram.cpp:49: initialize
07-18 17:25:46.369 12923-13059/com.mapzen.tangram.android D/Tangram: TANGRAM tangram.cpp:72: finish initialize
07-18 17:25:46.379 12923-12923/com.mapzen.tangram.android D/Activity: performCreate Call secproduct feature valuefalse
07-18 17:25:46.379 12923-12923/com.mapzen.tangram.android D/Activity: performCreate Call debug elastic valuetrue
07-18 17:25:46.389 12923-12923/com.mapzen.tangram.android D/AndroidRuntime: Shutting down VM
07-18 17:25:46.389 12923-12923/com.mapzen.tangram.android E/AndroidRuntime: FATAL EXCEPTION: main
                                                                            Process: com.mapzen.tangram.android, PID: 12923
                                                                            java.lang.NullPointerException: Attempt to invoke virtual method 'void com.mapzen.tangram.MapController.dispose()' on a null object reference
                                                                                at com.mapzen.tangram.MapView$1.onCancelled(MapView.java:80)
                                                                                at com.mapzen.tangram.MapView$1.onCancelled(MapView.java:62)
                                                                                at android.os.AsyncTask.finish(AsyncTask.java:630)
                                                                                at android.os.AsyncTask.access$600(AsyncTask.java:177)
                                                                                at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)
                                                                                at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                at android.os.Looper.loop(Looper.java:145)
                                                                                at android.app.ActivityThread.main(ActivityThread.java:5835)
                                                                                at java.lang.reflect.Method.invoke(Native Method)
                                                                                at java.lang.reflect.Method.invoke(Method.java:372)
                                                                                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
                                                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
07-18 17:25:46.399 12923-13263/com.mapzen.tangram.android D/Tangram: TANGRAM tangram.cpp:49: initialize
07-18 17:25:46.399 12923-13263/com.mapzen.tangram.android D/Tangram: TANGRAM tangram.cpp:72: finish initialize
07-18 17:25:46.399 12923-13263/com.mapzen.tangram.android D/Tangram: TANGRAM tangram.cpp:143: Loading scene file: scene.yaml
07-18 17:25:46.479 12923-13263/com.mapzen.tangram.android D/Tangram: WARNING sceneLoader.cpp:1524: Can't find data source touch for layer touch
07-18 17:25:47.989 12923-12923/com.mapzen.tangram.android I/Process: Sending signal. PID: 12923 SIG: 9

The lifecycle management of MapController from MapView has been updated - this should correct the crashes that occurred during rapid Activity re-creation.

@blair1618 Do you plan to merge private-map-impl with this or you will create a subsequent PR following this?
With respect to this PR, once the last few comments and issues are addressed, its good to be merged from my side.

@tallytalwar The private Map implementation is one more commit on top of these with about 200 LOC changed - I can submit it in a PR immediately following this one.

Anything else to discuss? If not I'll merge this tonight so we can move ahead with subsequent improvements.

Go for it. I am good with it now :D.


Implement N4392: C++ Latches and Barriers

See: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4392.pdf

latch has been implemented by merging #1476.

It looks like that we can't implement barriers as specified by the Concurrency TS (recent version: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0159r0.html). The TS specifies a barrier as "a thread coordination mechanism that allow a set of participating threads to block until an operation is completed". A barrier relies on being (repeatedly) invoked by the same threads. In HPX this is not possible as (especially in the remote case) new threads are constantly created. For this reason the barrier functionality can only be approximated in HPX.


shader_prepass is broken on main

Bevy version

4d54ce14

AdapterInfo {
  name: "AMD Radeon RX 580 Series (RADV POLARIS10)",
  vendor: 4098, device: 26591,
  device_type: DiscreteGpu,
  driver: "radv", driver_info: "Mesa 23.0.3",
  backend: Vulkan
}

I ran cargo run --example shader_prepass, the example runs, but I get the following error. Also, when I press space bar, nothing happens (unlike previous commits, where it displayed the prepass buffers.
2023-05-09T11:51:41.379744Z ERROR bevy_render::render_resource::pipeline_cache: failed to process shader:
error: Entry point fragment at Fragment is invalid
 = Argument 1 varying error
 = Capability MULTISAMPLED_SHADING is not supported

Should be fixed by https://github.com/bevyengine/bevy/pull/8504


Error: Generic error: mwcmqs listener is already running
wallet713>
How to reproduce:  Start MQS and put host on sleep. When it awake the connection will be broken, but status is not stopped.

Fix is in the branch. Keeping open until the merge.
Testing:

Run QT wallet and start MQS listener.
Put laptop to sleep fo some time
Awake the laptop, the MQS listener should stopped because of the error, it is expected. The MQS listener status should be shown correctly as offline.
Verify if you can start the MQS listener by pressing 'Start' button


Adding filtering by Author to Express Entry List

There is no current filter by author in the express entry list.

Looks like @aembler slid this change in before you in 9748bc69b17b72f5e2455b75f372a28ecba1db66


unexpected error: modulenotfounderror?

Here is the screenshot. THANKS!

can you do pip install click and try again?

thanks for your solution! it's really helpful.
I  did spike-sorting and get a .kwik file.
but I cannot open it with kwik-gui. Here is the screenshot.

thanks a lot!

maybe try pip install phycontrib and try again?
Otherwise, do python -c "import phycontrib" and send me the terminal output with the error messages.

problem solved using python -c "import phycontrib" and installed some modules
thanks for you suggestion.

Hi I had a similar issue as above, but instead I got: "ImportError: No module named 'click'". I ran "pip install click", but it did not seem to fix the issue.

Any advice? I am new to python and github in my lab

@hra2 perhaps you have competing installations of Python on your computer?
Try something like c:\users\jddlab\miniconda3\bin\pip install click maybe?

@rossant Thank you for the quick response! So I was actually able to resolve this issue by running klusta from the C:\Users\jddlab\Miniconda3\Scripts folder in the command prompt. I was successfully able to output the hybrid_10sec.kwik.
However, I have run into a new problem. Trying to run "phy kwik-gui hybrid_10sec.kwik" has left me with the following error: "Error: No such command 'kwik-gui'."

I tried to follow the advice you gave on this forum: https://groups.google.com/forum/#!topic/klustaviewas/fKmJePftt4w
But none of the suggestions solved the issue
Any thoughts?

This might be due to the old version of phy, could you uninstall it and install the latest version following the instructions here? https://github.com/cortex-lab/phy/


Integrate with Semaphore 2

What happened
✅ Integrate with semaphore 2
Insight
N/A
Proof Of Work

@olivierobert This is working now. There are things that I am not sure and might need more input
About the pipeline, we could go with the simpler pipeline like -> https://nimble.semaphoreci.com/workflows/b061737d-00ae-407e-9dfe-228fa861f31c. With the simpler one, the yml file is much simpler.
But with the current one (as in the screenshot), we have more steps and when it fails , it is easier to see which step is failed. But this also comes with more complicated configurations. You can check the config if it's too complicated or not 🤔 💭

For how we testing the addons. I'm still not sure about it. It's something we have to look further on. I feel like maybe after the web variant test is finish, we can just apply the addon template and run the addon template.
With semaphore 2, we can do in parallel, something like
web variant test +-> apply addon 1 --> test addon 1
                 |
                 +-> apply addon 2 --> test addon 2

But not quite sure yet. Just an idea 😄💡


Fix for deprecated helpers

@vdbelt thanks for your fix. Will release it this week.

https://github.com/spatie/laravel-activitylog/releases/tag/3.6.3


New version: GR v0.71.1

Registering package: GR
Repository: https://github.com/jheinen/GR.jl
Created by: @jheinen
Version: v0.71.1
Commit: eb612a063d6ad092bc93d0161a84c067cde7f654
Reviewed by: @jheinen
Reference: https://github.com/jheinen/GR.jl/commit/eb612a063d6ad092bc93d0161a84c067cde7f654#commitcomment-90985922
Description: Plotting for Julia based on GR, a framework for visualisation applications

[noblock]
@jheinen, seems like a spurious failure, close & reopen to re-trigger ci ?


Try @parcel/optimizer-swc and @parcel/optimizer-esbuild?

Hey, cool to find this repo! I saw you already have a test that uses @parcel/optimizer-css, but one thing you could try to improve performance of Parcel builds would be to swap Terser for a faster JS minifier as well. We offer two plugins to choose from: @parcel/optimizer-swc and @parcel/optimizer-esbuild. We will likely switch the default to SWC in a future release as it offers a good tradeoff between speed and bundle size, but for now these are plugins you can opt into.

Great suggestion! Once I circle back to more/better configurations, I'll switch this over (or add it as another bundler altogether)


About jsonstore example (multi-threaded/mutexes)

Hi,
Drogon jsonstore example uses mutexes in order to protect items. However, the example does not calls setThreadNum() function . According to the documentation, the default is one thread.
So, why do we need to use mutexes in this example?
Thank you very much
Alex

You are right, we don't need a mutex in this case.

Thank you


[ipam] allocate subnets

IPAM at present manages allocation of IP addresses in a given subnet (or, with #675, multiple given subnets). But determining these subnets is in itself an allocation problem, i.e. a user often won't care what specific subnet is used for an application, just that is distinct from others and sufficiently large to accommodate all their containers.
Dealing with this pushes us in the direction of symbolic subnets / application names. And probably consensus to manage their mapping to real subnets.

I'm thinking the weave run UX should allow just a subnet name, and if that name is not currently associated with a subnet then weave will allocate a new one.
This implies that weave will choose a moderate size of subnet in order to allow many to be used at once.  For example, the 256 subnets between 10.0/16 and 10.255/16.
If the user needs to put specific requirements on a subnet, such as the size, they should pre-allocate it with a separate command, e.g. weave subnet

Proposed amendment to 'alllocate' URL scheme to allow symbolic names for subnets
Current: POST /ip/name
Proposed: POST /ip/subnetname/name
('claim' does not need to change, as the full address being claimed is known)

What if a user typos a subnet name on weave run?  It would be safe to refuse (subnet not found), and have an explicit weave subnet create command.

For the purpose of the docker plugin, it is necessary to be able to

Allocate a subnet, supplying a name for it
Allocate an IP on a subnet, supplying the subnet name

NB the libnetwork driver SPI assumes that trying to create a network (subnet, for weave) that already exists will result in an error; so, subnet creation should be explicit rather than implicit.

so, subnet creation should be explicit rather than implicit.

We can have both.

so, subnet creation should be explicit rather than implicit.
We can have both.

OK: it must be possible to explicitly allocate a subnet, and that must fail if it has already been allocated.

What is blocking this? It is the one thing that stops plugin (k8s, docker) work from progressing.

Somewhat related to #179.
Also, high-level description/UI from #242:

root@a:~# weave run --name=pong.foo -d -ti ubuntu
root@a:~# weave run --name=pong.bar -d -ti ubuntu
root@a:~# weave run --name=.foo -ti ubuntu
TODO: flesh this out
>
> Name suffixes identify applications and thus subnets. Subnets are automatically allocated from a different free IP range than the default range (the range can also be specified as an extra argument to `weave launch`). All subnets are /24, though this too can be changed with a `weave launch` option. There's also a way (TBD) to have subnets of different size. Btw, some interesting scenarios arising here when different weave peers are launched with different options.
>
>The magic `.` prefix indicates that the container should be anonymous, i.e. be given a random name, not registered in DNS but still be part of the given application and hence being able to resolve unqualified names in it.

Also, more from #242

exposing apps instead of subnets

root@:~# weave expose foo
>
>Note that this may perform a subnet allocation, if the app name is presently unknown. It will also perform an IP allocation in that subnet since we need that for the masquerading setup.

In earlier comments it is assumed that we need to attach a user-supplied name to a subnet, but that is not a requirement of the Docker Network plugin interface. Docker calls RequestPool() and the plugin returns with its own internal name for the pool, which Docker associates with the user-supplied name for the network in its own store.
However, this is still not hugely useful in "local scope" (without a KV store), because details of the new network are not propagated to other hosts. In "global scope" it would work, although we do not document how to request Weave IPAM (docker network create --driver=weave --ipam-driver=weave ...).

An idea for how to pick a free subnet, without requiring additional consensus:

Given the desired size of subnet (e.g. /16), go through all the IP ranges I currently own and find a range that is big enough and currently free of any allocated addresses.
If I don't own free space big enough, go through the process to request space from a peer, similar to what happens when I want to allocate a single IP address and I've run out, then try again.


can we run only example.py --symbol for production

I ran the example.py  XBTUSD and see that the script stopped running after two days.
Error message:
Traceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.6/site-packages/websocket/_app.py", line 278, in run_forever
    dispatcher.read(self.sock.sock, read)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/websocket/_app.py", line 63, in read
    callback()
  File "/home/ubuntu/.local/lib/python3.6/site-packages/websocket/_app.py", line 251, in read
    op_code, frame = self.sock.recv_data_frame(True)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/websocket/_core.py", line 330, in recv_data_frame
    frame = self.recv_frame()
  File "/home/ubuntu/.local/lib/python3.6/site-packages/websocket/_core.py", line 364, in recv_frame
    return self.frame_buffer.recv_frame()
  File "/home/ubuntu/.local/lib/python3.6/site-packages/websocket/_abnf.py", line 361, in recv_frame
    self.recv_header()
  File "/home/ubuntu/.local/lib/python3.6/site-packages/websocket/_abnf.py", line 309, in recv_header
    header = self.recv_strict(2)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/websocket/_abnf.py", line 396, in recv_strict
    bytes_ = self.recv(min(16384, shortage))
  File "/home/ubuntu/.local/lib/python3.6/site-packages/websocket/_core.py", line 434, in _recv
    return recv(self.sock, bufsize)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/websocket/_socket.py", line 94, in recv
    "Connection is already closed.")
websocket._exceptions.WebSocketConnectionClosedException: Connection is already closed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/logging/__init__.py", line 994, in emit
    msg = self.format(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 840, in format
    return fmt.format(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 577, in format
    record.message = record.getMessage()
  File "/usr/lib/python3.6/logging/__init__.py", line 338, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
  File "/usr/lib/python3.6/threading.py", line 884, in _bootstrap
    self._bootstrap_inner()
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/ubuntu/datahub/src/indicators/bitmex-liquidations/bitmex_liquidation/api.py", line 111, in <lambda>
    self.wst = threading.Thread(target=lambda: self.ws.run_forever(ping_interval=5),
  File "/home/ubuntu/.local/lib/python3.6/site-packages/websocket/_app.py", line 280, in run_forever
    self._callback(self.on_error, e)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/websocket/_app.py", line 315, in _callback
    callback(self, *args)
  File "/home/ubuntu/datahub/src/indicators/bitmex-liquidations/bitmex_liquidation/api.py", line 147, in _on_error
    logger.info('on_error()', error)
Message: 'on_error()'
Arguments: (WebSocketConnectionClosedException('Connection is already closed.',),)
2020-04-14 23:05:13,037 - Websocket Closed

@Pechi77 hum probably bitmex closed the connection. A simple way is to catch this exception in on_error and restart the websocket. If you can make a quick PR, that'd be appreciated :)

@philipperemy Okay, thank you for your quick response :)

I am planning to run another corn job, whenever this goes down, restart with sub process, what do you think ?

@Pechi77 if you have a mechanism to detect when it drops, then it works too!

Okay


Week8

Hi Lianne,
I think it's going to simplify things quite a bit to use the sf package for everything instead of sp, which is a harder to use, doesn't play as nicely with ggplot2, and basically outdated at this point (I learned how to do geospatial stuff with sp too though!). My slager:week8 branch implements the sf code up through kriging, but not yet including CV.  Any chance you can clone my branch and test if it runs okay and generally looks to your satisfaction?  If this seems fine, I'll go ahead and use sf for the cross validation as well.  I'm just calling this a draft pull request for now.  You can clone my version and test it up through CV by using this code:
git clone -b week8 https://github.com/slager/ENVH556_2021course
Dave

Dave,
I appreciate you implementing this with the sf package.  I had read that it was better than sp but wasn't in a place to implement it.  The changes look good.  I will try to get to testing this tomorrow.  I assume I clone this into a different project so it doesn't get mixed up with the current version. Thanks for your work.

Hi Lianne,
Yes, you could either clone it into a different directory, or for something like this where it's just testing, you could even copy/paste this into a new .Rmd file in your own working directory to see if it works. I should add that I couldn't get the kriging to work with sp, so perhaps you could double-check that it seems to be working with sf.
Dave
https://raw.githubusercontent.com/slager/ENVH556_2021course/week8/Week8LabGeostatistics.Rmd

The code works well until the chunk at line 580, the kriging CV.  The bubble plot fails so I commented it out.  But even so there is an error with the krige.cv calls.  Here is one error message:
object has comment, which is lost in outputCRS object has comment, which is lost in outputCRS object has comment, which is lost in outputDiscarded datum Unknown based on Bessel 1841 ellipsoid in Proj4 definition

Ok good, I didn't expect it to work past line 580 because bubble() is an sp function. I just pushed a commit that fixes the CV section with a ggplot version of bubble(). I also fixed what I think were some typos involving using different object names for universal kriging. Maybe you can check if it seems to still look good and if so I'll start digging into the snapshot code.
https://github.com/slager/ENVH556_2021course/blob/0f2295dee935a6f585263b75f784bf83cd6d2ec5/Week8LabGeostatistics.Rmd#L580

I tested your new sf implementation of kriging and I see that it appears to work and that there are distinct differences between the OK and UK residuals.  What puzzles me is that in the previous implementation there were some apparent differences in the residuals based on the 5-fold vs LOO implementations.  I don't see these differences in the plots any more so I'm wondering how the sf implementation is different and how it handles the folds.  Also I don't see that any of the plots correspond completely w.r.t. residual patterns and signs.  In particular, the OK residuals along the river were positive in the previous implementation while there is a strong distinct negative pattern along the river in the current implementation.  So something is really different.

Not sure if it's the cause of the discrepancy, but there was a typo at https://github.com/liannesheppard/ENVH556_2021course/blob/64f7718f96aeef5f2625c4858986c32580f180d4/Week8LabGeostatistics.Rmd#L552 where there was a mismatch between what was being saved in the line above and what was being plotted.  I fixed that in https://github.com/slager/ENVH556_2021course/blob/0f2295dee935a6f585263b75f784bf83cd6d2ec5/Week8LabGeostatistics.Rmd#L623

I just pushed another commit that makes it more explicit how the sign of the residual plots get colored. It still looks like  the ordinary kriging has more positive residuals near the river, whereas the residuals from the universal kriging are more clumped throughout.
I think it makes sense to me the way it is now, that the residuals would differ more by kriging type than by CV type.  Do you think that's right?
As for sp vs. sf, it shouldn't actually matter because krige.cv can read in either an sp or sf object (I didn't change how those functions were called).
Any more thoughts on this?

I think this pull request is now ready for merging.  I have basically the whole lab working correctly with sf and projections, except for a few things noted in the email.  It should have no conflicts with the main branch. I could create additional pull request in future on a different feature branch if needed.

Lianne,
I fixed a bug in my krige.cv.sf wrapper function.  You should see the differences you were expecting in the cross validations now.
Dave


feat(devtools): logs panel

copilot:all

Current dependencies on/for this PR:

main

PR #3050

PR #3071   👈

This comment was auto-generated by Graphite.


Make Duplicate Action less prominent

I enabled the localization on a schema, and now the Actions look like this:

I think editors will want to retain the "Publish" button as the main action, and leave the rarely used "Duplicate (including translation)" button in the drop down...
Any way to change this default behaviour through the config?
Thanks!

I had the same issue when I had the equivalent of the following in sanity.config:
plugins: [
  documentI18n({ includeDeskTool: false, ...otherI18nOptions}),
  deskTool(),
  ...otherPlugins
],

It helped me to use:
plugins: withDocumentI18nPlugin([ deskTool(), ...otherPlugins], {
  includeDeskTool: false,
  ...otherI18nOptions
}

because that way the DocumentActions actually get added properly.


GraalVM Native Image

Delivering an executable as an artifact would be pretty nice.

[x] Get a successful build with native-image -jar ./thorium/build/libs/thorium.jar
[x] Figure out how to use the Gradle plugin

Native builds are now possible running
./gradlew nativeBuild

in main.


mismatch between api and documentation

the Taxumap object requires a "microbiome_data" but the description indicates "relative_abundances" are required. This should be made consistent

Changed documentation to "microbiome_table"


Passing data to the view controllers

Is it possible to pass data to the view controllers inside the scroll menu? Every option I've tried has not worked.

here the same i always get a nil returned , though in my parentcontroller where the pagemenu is added there everything goes fine.
is there someone who can help me out with this?

Did it via NSURLDefaults.

I just had the same problem it seems: I tried to keep references to the ViewControllers which I added into the PageMenu but their ivars were always set to nil when I tried to access them.
What worked for me was accessing the ViewControllers through the PageMenu's controllerArray each time I wanted to perform anything on them.

I just had the same problem it seems: I tried to keep references to the ViewControllers which I added into the PageMenu but their ivars were always set to nil when I tried to access them.
What worked for me was accessing the ViewControllers through the PageMenu's controllerArray each time I wanted to perform anything on them.

How?


Endpoint logs: Postgres client ERROR messages about idx_btree_tiers_system_name_deleted  already exists

Environment info

NooBaa Version: VERSION
Platform: Kubernetes 1.14.1 | minikube 1.1.1 | OpenShift 4.1 | other: specify

oc version
Client Version: 4.7.8
Server Version: 4.7.8
Kubernetes Version: v1.20.0+7d0a2b2
noobaa version
INFO[0000] CLI version: 5.9.0
INFO[0000] noobaa-image: noobaa/noobaa-core:master-20210628
INFO[0000] operator-image: noobaa/noobaa-operator:5.9.0
In the endpoint logs observed the below
[32mJul-13 6:54:19.185[35m [Endpoint/10] [36m   [L0][39m core.util.postgres_client:: creating index system_name_deleted in table buckets
[32mJul-13 6:54:19.186[35m [Endpoint/10] [36m   [L0][39m core.util.postgres_client:: creating index owner_secret in table clusters
[32mJul-13 6:54:19.188[35m [Endpoint/10] [31m[ERROR][39m core.util.postgres_client:: postgres_client: T00000000|Q00000013: failed with error: error: relation "idx_btree_tiers_system_name_deleted" already exists
at Parser.parseErrorMessage (/root/node_modules/[4mnoobaa-core[24m/node_modules/[4mpg[24m/node_modules/[4mpg-protocol[24m/dist/parser.js:287:98)
at Parser.handlePacket (/root/node_modules/[4mnoobaa-core[24m/node_modules/[4mpg[24m/node_modules/[4mpg-protocol[24m/dist/parser.js:126:29)
at Parser.parse (/root/node_modules/[4mnoobaa-core[24m/node_modules/[4mpg[24m/node_modules/[4mpg-protocol[24m/dist/parser.js:39:38)
at Socket. (/root/node_modules/[4mnoobaa-core[24m/node_modules/[4mpg[24m/node_modules/[4mpg-protocol[24m/dist/index.js:11:42)
[90m    at Socket.emit (events.js:315:20)[39m
[90m    at Socket.EventEmitter.emit (domain.js:467:12)[39m
[90m    at addChunk (internal/streams/readable.js:309:12)[39m
[90m    at readableAddChunk (internal/streams/readable.js:284:9)[39m
[90m    at Socket.Readable.push (internal/streams/readable.js:223:10)[39m
[90m    at TCP.onStreamRead (internal/stream_base_commons.js:188:23)[39m {
length: [33m117[39m,
severity: [32m'ERROR'[39m,
code: [32m'42P07'[39m,
detail: [90mundefined[39m,
hint: [90mundefined[39m,
position: [90mundefined[39m,
internalPosition: [90mundefined[39m,
internalQuery: [90mundefined[39m,
where: [90mundefined[39m,
schema: [90mundefined[39m,
table: [90mundefined[39m,
column: [90mundefined[39m,
dataType: [90mundefined[39m,
constraint: [90mundefined[39m,
file: [32m'index.c'[39m,
line: [32m'863'[39m,
routine: [32m'index_create'[39m
}
[32mJul-13 6:54:19.188[35m [Endpoint/10] [31m[ERROR][39m core.util.postgres_client:: postgres_client: T00000000|Q00000014: failed with error: error: relation "idx_btree_accounts_email_deleted" already exists
at Parser.parseErrorMessage (/root/node_modules/[4mnoobaa-core[24m/node_modules/[4mpg[24m/node_modules/[4mpg-protocol[24m/dist/parser.js:287:98)
at Parser.handlePacket (/root/node_modules/[4mnoobaa-core[24m/node_modules/[4mpg[24m/node_modules/[4mpg-protocol[24m/dist/parser.js:126:29)
at Parser.parse (/root/node_modules/[4mnoobaa-core[24m/node_modules/[4mpg[24m/node_modules/[4mpg-protocol[24m/dist/parser.js:39:38)
at Socket. (/root/node_modules/[4mnoobaa-core[24m/node_modules/[4mpg[24m/node_modules/[4mpg-protocol[24m/dist/index.js:11:42)
[90m    at Socket.emit (events.js:315:20)[39m
[90m    at Socket.EventEmitter.emit (domain.js:467:12)[39m
[90m    at addChunk (internal/streams/readable.js:309:12)[39m
[90m    at readableAddChunk (internal/streams/readable.js:284:9)[39m
[90m    at Socket.Readable.push (internal/streams/readable.js:223:10)[39m
length: [33m114[39m,
severity: [32m'ERROR'[39m,
code: [32m'42P07'[39m,
detail: [90mundefined[39m,
hint: [90mundefined[39m,
position: [90mundefined[39m,
internalPosition: [90mundefined[39m,
internalQuery: [90mundefined[39m,
where: [90mundefined[39m,
schema: [90mundefined[39m,
table: [90mundefined[39m,
column: [90mundefined[39m,
dataType: [90mundefined[39m,
constraint: [90mundefined[39m,
file: [32m'index.c'[39m,
line: [32m'863'[39m,
routine: [32m'index_create'[39m
}
[32mJul-13 6:54:19.189[35m [Endpoint/10] [31m[ERROR][39m core.util.postgres_client:: postgres_client: T00000000|Q00000015: failed with error: error: relation "idx_btree_systems_name_deleted" already exists
at Parser.parseErrorMessage (/root/node_modules/[4mnoobaa-core[24m/node_modules/[4mpg[24m/node_modules/[4mpg-protocol[24m/dist/parser.js:287:98)
at Parser.handlePacket (/root/node_modules/[4mnoobaa-core[24m/node_modules/[4mpg[24m/node_modules/[4mpg-protocol[24m/dist/parser.js:126:29)
at Parser.parse (/root/node_modules/[4mnoobaa-core[24m/node_modules/[4mpg[24m/node_modules/[4mpg-protocol[24m/dist/parser.js:39:38)
at Socket. (/root/node_modules/[4mnoobaa-core[24m/node_modules/[4mpg[24m/node_modules/[4mpg-protocol[24m/dist/index.js:11:42)
[90m    at Socket.emit (events.js:315:20)[39m
[90m    at Socket.EventEmitter.emit (domain.js:467:12)[39m
[90m    at addChunk (internal/streams/readable.js:309:12)[39m
[90m    at readableAddChunk (internal/streams/readable.js:284:9)[39m
[90m    at Socket.Readable.push (internal/streams/readable.js:223:10)[39m
[90m    at TCP.onStreamRead (internal/stream_base_commons.js:188:23)[39m {
length: [33m112[39m,
severity: [32m'ERROR'[39m,
code: [32m'42P07'[39m,
detail: [90mundefined[39m,
hint: [90mundefined[39m,
position: [90mundefined[39m,
internalPosition: [90mundefined[39m,
internalQuery: [90mundefined[39m,
where: [90mundefined[39m,
schema: [90mundefined[39m,
table: [90mundefined[39m,
column: [90mundefined[39m,
...
Actual behavior

As per discussion with Noobaa team, it was mentioned these are ok and not real ERROR.. Asked Noobaa team to change to WARN or INFO level if these are not real errors. Hence this defect.
2

Expected behavior

Steps to reproduce

oc get pods
NAME                                               READY   STATUS    RESTARTS   AGE
noobaa-core-0                                      1/1     Running   0          3h23m
noobaa-db-pg-0                                     1/1     Running   0          3h24m
noobaa-default-backing-store-noobaa-pod-269857ea   1/1     Running   0          6d21h
noobaa-endpoint-8cbcd8545-mn5dt                    1/1     Running   0          3h21m
noobaa-operator-854c5fc67d-dd46k                   1/1     Running   3          3h21m
endpoint-log.txt
More information - Screenshots / Logs / Other output

@jackyalbo @jeniawhite
This is still visible in the 20210724 noobaa build . We decided to have the Label changes from Error to WARN or INFO
Jul-27 11:59:55.291 [Endpoint/9] [ERROR] core.util.postgres_client:: postgres_client: T00000000|Q00000604: failed with error: error: relation "idx_btree_endpointgroup
reports_start_time_aggregated_time_aggre" already exists
at Parser.parseErrorMessage (/root/node_modules/noobaa-core/node_modules/pg/node_modules/pg-protocol/dist/parser.js:287:98)
at Parser.handlePacket (/root/node_modules/noobaa-core/node_modules/pg/node_modules/pg-protocol/dist/parser.js:126:29)
at Parser.parse (/root/node_modules/noobaa-core/node_modules/pg/node_modules/pg-protocol/dist/parser.js:39:38)
at Socket. (/root/node_modules/noobaa-core/node_modules/pg/node_modules/pg-protocol/dist/index.js:11:42)
at Socket.emit (events.js:315:20)
at Socket.EventEmitter.emit (domain.js:467:12)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
at Socket.Readable.push (internal/streams/readable.js:223:10)
at TCP.onStreamRead (internal/stream_base_commons.js:188:23) {
length: 145,
severity: 'ERROR',
code: '42P07',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'index.c',
line: '863',
routine: 'index_create'
}

This is really weird. Can you rsh to this endpoint. and copy /root/node_module/noobaa/src/util/postgres_client.js and upload or send it to me?

It is in this directory /root/node_modules/noobaa-core/src/util
sh-4.4# ls -lrt postgres_client.js
-rwxrwxr-x. 1 root root 54744 Jun  9 23:01 postgres_client.js
postgres_client.zip

Somehow it doesn't allow the js file to upload directly, hence zip needs to be done..

Ok so I think this file is pretty old - I think at lease a month old.. It doen't have even the performance fixes.
Can you check you are using the right build?

using the latest build of 0724
noobaa version
INFO[0000] CLI version: 5.9.0
INFO[0000] noobaa-image: noobaa/noobaa-core:master-20210724
INFO[0000] operator-image: noobaa/noobaa-operator:5.9.0
Looks like the core,db didn't get upgraded in the OCS method as we try to change csv file only for the operator.. i thought it was one step.. So let me see tomorrow and then will update

I am no longer seeing this error as just installed 0801. Would wait for a day or two and then will try to close it if non occurring

Hi @rkomandu
If this is not reproducible, can we close the issue?

Please close it as HPO is discontinued and hence we won't have containerized Noobaa validation with ODF.


fscapture: Update to version 9.3

What is Portable.db?

I don't know, but it doesn't hold settings, fsc.db does this. After I installed the app, the Portable.db file remains unchanged.


Add Flask integration

Automatically start the Flask instrumentor included in the SDK when starting the AppSignal client.
Part of: https://github.com/appsignal/appsignal-python/issues/9
[skip changeset]

I'm happy to make a separate issue for it, but I think it should be possible to add the params of the request relatively easily 👀
The instrumentation supports request hooks: https://opentelemetry-python-contrib.readthedocs.io/en/latest/instrumentation/flask/flask.html#request-response-hooks -- from that WSGI environ that the request hook takes, it should be possible to re-constitute a Flask Request object and ask if it's contents are JSON -- and if they are, set the JSON contents as the appsignal.request.params in the span.

I'm happy to make a separate issue for it, but I think it should be possible to add the params of the request relatively easily 👀 (I have now jinxed it)

I'm okay with making a separate issue for it, to merge this PR quicker.


Implement optimized version of PinotByteBuffer.

We can directly work on the address of the underlying memory chunk by-passing all the chain of function calls and do get/set at the absolute address computed as starting virtual address of underlying memory + offset.
Two implementations are provided:

PinotNativeUnsafeByteBuffer
PinotNonNativeUnsafeByteBuffer

Benchmark
Mode
Cnt
Score
Unit

BenchmarkPinotByteBufferOptimized.pinotNativeUnsafeByteBufferReadRandom
avgt
5
0.961
ns/op

BenchmarkPinotByteBufferOptimized.pinotNativeUnsafeByteBufferReadSequential
avgt
5
0.357
ns/op

BenchmarkPinotByteBufferOptimized.pinotNativeUnsafeByteBufferWriteRandom
avgt
5
210873617
ns/op

BenchmarkPinotByteBufferOptimized.pinotNativeUnsafeByteBufferWriteSequential
avgt
5
18528396.13
ns/op

BenchmarkPinotByteBufferOptimized.pinotByteBufferReadRandom
avgt
5
21692687.27
ns/op

BenchmarkPinotByteBufferOptimized.pinotByteBufferReadSequential
avgt
5
9.684
ns/op

BenchmarkPinotByteBufferOptimized.pinotByteBufferWriteRandom
avgt
5
382048235.7
ns/op

BenchmarkPinotByteBufferOptimized.pinotByteBufferWriteSequential
avgt
5
41911001.94
ns/op

Codecov Report

Merging #5058 into master will increase coverage by 0.13%.
The diff coverage is 69.53%.

@@             Coverage Diff              @@
##             master    #5058      +/-   ##
============================================
+ Coverage     58.53%   58.67%   +0.13%
  Complexity       12       12
============================================
  Files          1183     1185       +2
  Lines         63213    63515     +302
  Branches       9297     9317      +20
============================================
+ Hits          37003    37267     +264
+ Misses        23501    23467      -34
- Partials       2709     2781      +72

Impacted Files
Coverage Δ
Complexity Δ

...che/pinot/core/segment/memory/PinotByteBuffer.java
79.72% <ø> (ø)
0 <0> (ø)
:arrow_down:

...re/segment/memory/PinotNativeUnsafeByteBuffer.java
69.53% <69.53%> (ø)
0 <0> (?)

...segment/memory/PinotNonNativeUnsafeByteBuffer.java
69.53% <69.53%> (ø)
0 <0> (?)

.../org/apache/pinot/client/PinotClientException.java
33.33% <0%> (-33.34%)
0% <0%> (ø)

...a/manager/realtime/RealtimeSegmentDataManager.java
50% <0%> (-25%)
0% <0%> (ø)

...inot/client/JsonAsyncHttpPinotClientTransport.java
62% <0%> (-14%)
0% <0%> (ø)

...e/impl/dictionary/LongOnHeapMutableDictionary.java
57.31% <0%> (-13.42%)
0% <0%> (ø)

...r/dociditerators/RangelessBitmapDocIdIterator.java
72.22% <0%> (-11.12%)
0% <0%> (ø)

...pinot/broker/api/resources/PinotClientRequest.java
23.4% <0%> (-8.52%)
0% <0%> (ø)

.../impl/dictionary/FloatOnHeapMutableDictionary.java
70.73% <0%> (-6.1%)
0% <0%> (ø)

... and 26 more

Continue to review full report at Codecov.

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

This is nice ! Please also test if this compile and running with different java 8+ versions and JDKs.

@siddharthteotia

Re-implemented in #10528


Update the rust-minidump dependencies

This makes the minidump-writer crate not depend anymore on the tracing crate (it becomes only a dev dependency) which reduces the footprint of the crate when it's being vendored.

@gabrielesvelto I don't have admin on this repo, it would be nice if you could setup mergify or something so that we don't have to manually merge PRs once they've been reviewed, I always forget on this repo since every other repo I maintain has that setup so I don't have to think about it.

I'm not familiar with it but I'll try looking how you did it in your repos, I'm always happy to reduce the number of manual chores.

Here's the typical one we use https://github.com/EmbarkStudios/cargo-deny/blob/main/.mergify.yml

@JohanLorenzo is an expert in this

@JohanLorenzo I will, this can be useful here, in the rust-minidump repo as well as in the dump_syms one.


Chapter 1 / Homework 1And2

My first PR... Did i make it or not?! :o

 Here is an overview of what got changed by this pull request:

Issues
======
- Added 1

See the complete overview on Codacy


Show HTML code dynamically

Right now, it says "import HTML code" but we should be able to display the HTML code properly.

HTML code is being dynamically inserted now. Close #8


/ui/login/loginname times out with organization-only IDPs

Describe the bug
When an IDP is defined on the organization only (not on the instance), /ui/login/loginname times out unless username-password is also allowed.
This works fine when the identity provider is set on the instance.
To Reproduce
Steps to reproduce the behavior:

Organization settings:

Change Username Password allowed to true in the organization settings, then this is shown:

Expected behavior
With Username Password allowed set to false, the user should directly be sent to the IDP login (as done when the IDP is set on the instance).
Desktop

OS: macOS
Browser Chrome

Additional context
ZITADEL 2.9.1 running in docker-compose

Container logs (not sure if related):
zitadel-terraform-zitadel-1  | time="2022-10-20T08:26:54Z" level=info msg="query failed" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/query.go:60" error="timeout: context canceled"

Found the issue, I set the wrong issuer in the IDP config. I guess no action required

@DavideWalder thank you ❤

It would be nice to get more descriptive logging indicating that there is an issuer mismatch or something. We struggled for a couple of hours today after an extra slash was in the issuer


Bad performance between pods on different nodes

Is there an existing issue for this?

[X] I have searched the existing issues

What happened?
I get around 6-7 gbit/s when i run iperf3 on 2 pods, each on seperate nodes connected over 10gbe. I have MTU 9000 set on the host. On the hosts i get 9.9gbit/s as expected, but when iperf3 is running in pods I have decreased performance. Additionally, when I run one of the iperf3 on the host and the other on the pod I also have 9.9gbit/s (server on host and in pod has same result).
It looks to me like when traffic stays in Cilium it is slow.
Cilium Version
1.15.2
Kernel Version
5.10
Kubernetes Version
1.26.12
Regression
No response
Sysdump
cilium-sysdump-20240320-125239.zip
Relevant log output
No response
Anything else?
Here is my helm config
upgradeCompatibility: 1.15.2
rollOutCiliumPods: true
kubeProxyReplacement: true
socketLB:
  hostNamespaceOnly: true
k8sServiceHost: <IP_ADDRESS>
k8sServicePort: 6443
routingMode: native
autoDirectNodeRoutes: true
ipv4NativeRoutingCIDR: <IP_ADDRESS>/8
bpf:
  masquerade: true
  hostLegacyRouting: false
hubble:
  enabled: false
MTU: 9000

Cilium Users Document

[ ] Are you a user of Cilium? Please add yourself to the Users doc

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Hi @CrimsonFez Do you have comparison numbers for socket-LB full mode enabled? Based on your config, socket-LB is disabled for pods.

I was doing pod to pod test.
I'm dumb.........
I set my pod cpu limits too low.


_FillValue and missing_value not allowed for the same variable

Problem description
Currently opening the file which has a variable with both _FillValue and missing_value defined, results in a ValueError "'Discovered conflicting _FillValue and missing_value...", which can be overridden by setting decode_cf=False
Code in xarray/conventions.py have comments that missing_value is deprecated, however this seems not to be true anymore, see ticket #67 in http://cfconventions.org/cf-conventions/cf-conventions.html
Also, see description of meanings of _FillValue and missing_value here:
https://github.com/Unidata/netcdf4-python/issues/94
"Note that missing_value and _FillValue are very different. _FillValue is used by the C library to fill in values in variables that have not yet been written to. missing_value is meant to represent values set by the user to represent data points that do not exist."
Expected Output
Accept both _FillValue and missing_value and if both present, mask output only for _FillValue
Output of xr.show_versions()
0.9.6

I can certainly see a case for taking a more relaxed approach to _FillValue and missing_value, e.g., masking on both rather than raising an error. I'm not sure that it's actually more user friendly to ignore missing_value for masking.
This part of xarray is very old (added in https://github.com/pydata/xarray/pull/245), before almost anyone outside Climate Corporation was using it. So I'm certainly open to revisiting this, but let's make sure we get the decision right this time.
Does anyone else with lots of experience with different netCDF files have opinions here? Maybe @dopplershift?

I'm fine with masking both missing_value and _FillValue.

Given the definitions of these two, as I understand them, I think it makes sense to mask both values.

A practical downside to masking both values is that we won't be able to round-trip the two part fill/missing value. Once everything is a NaN, that's all we get.  That said, I'm personally fine with masking both.


Deleting the CAA pod does not result in shutdown being called

kubectl delete of the CAA pod does not issue a SIGTERM and as a result the shutdown routine is never invoked.

Please assign this to Snir Sheriber

@snir911 would be great to have your views on this. The entrypoint.sh script might require changes to handle SIGTERM.

Thanks, I'll have a look next week


Using a Pytree state as a state

I am trying to use a Pytree state as a state
But I get one state (not a list) of ys
MWE :

import jax
import jax.numpy as jnp
from dataclasses import dataclass
from functools import partial
from diffrax import diffeqsolve, ODETerm, Tsit5, SaveAt, PIDController
from jax import tree_util
# Define and register the MyStruct class
@partial(jax.tree_util.register_dataclass, data_fields=['x', 'y'], meta_fields=['op'])
@dataclass
class MyStruct:
    x: jax.Array
    y: jax.Array
    op: str

# Define the ODE function for MyStruct
def ode_fn_struct(t, state, args):
    x = state.x
    y = state.y
    dx_dt = -x + y
    dy_dt = x - y
    dstate_dt = MyStruct(x=dx_dt, y=dy_dt, op=state.op)
    return dstate_dt

# Initialize the state as an instance of MyStruct
initial_state_struct = MyStruct(x=jnp.ones(3), y=jnp.arange(3), op='add')

# Define the ODE function for jnp.stack
def ode_fn_stack(t, state, args):
    x = state[:, 0]
    y = state[:, 1]
    dx_dt = -x + y
    dy_dt = x - y
    dstate_dt = jnp.stack([dx_dt, dy_dt], axis=-1)
    return dstate_dt

# Initialize the state as a stacked array
x_init = jnp.ones(3)
y_init = jnp.arange(3)
initial_state_stack = jnp.stack([x_init, y_init], axis=-1)

# Common parameters for both solutions
t0 = 0.0
t1 = 10.0
saveat = SaveAt(ts=[0.0, 1.0, 2.0, 5.0, 10.0])
solver = Tsit5()
step_size = PIDController(rtol=1e-5, atol=1e-6)

# Solve the ODE using MyStruct
ode_term_struct = ODETerm(ode_fn_struct)
solution_struct = diffeqsolve(
    ode_term_struct, solver, t0=t0, t1=t1, dt0=0.1, stepsize_controller=step_size,
    y0=initial_state_struct, saveat=saveat
)

# Solve the ODE using jnp.stack
ode_term_stack = ODETerm(ode_fn_stack)
solution_stack = diffeqsolve(
    ode_term_stack, solver, t0=t0, t1=t1, dt0=0.1, stepsize_controller=step_size,
    y0=initial_state_stack, saveat=saveat
)

# Print the solutions
print("Using MyStruct:")
print("Time points:", solution_struct.ts)
print("Time solution_struct X:", solution_struct.ys.x)
print("Time solution_struct Y:", solution_struct.ys.y)

# Unpack solution_struct.ys.y and ys.x to get the individual states
print("\nUsing jnp.stack:")
print("Time points:", solution_stack.ts)
for i, state in enumerate(solution_stack.ys):
    print(f"State at t={solution_stack.ts[i]}: x={state[:, 0]}, y={state[:, 1]}")

print(f"Time points: {solution_struct.ts}")
print(f"Shape of solution_struct.ys.x: {solution_struct.ys.x.shape}")
for i, state in enumerate(solution_struct.ys):
    print(f"State at t={solution_struct.ts[i]}: x={state.x}, y={state.y}, op={state.op}")

What would be a best practice way to unpack the states to a list of states

As a general statement, equinox/jax likes to operate on pytrees of arrays rather than arrays/lists of pytrees (with some exceptions) so many things will return 1 pytree object with each member variable being "stacked" rather than a "stack" of pytrees. So if your pytree is now containing stacked member variables, practically you can just extract things as you normally would from a pytree. So if you wanted a list of individual states you could just do
l = [jax.tree_map(lambda x: x[i], solution_struct.ys) for i in range(len(solution_struct.ts))]

or something to that effect.

Thank you, this works.


Add proper IPFS logo mutator

Should logo be allowed to be constructed with NewDomain if it can be mutated with instructions?

I think we should be able to mutate the logo with an instruction, I'm just not too keen on adding an instruction just to edit the logo.

would be irrelevant if we make logo as metadata value

let's change the scope of this ticket to make logo a metadata value, not a field in the Domain struct

closed in favor of #4230


METRON-1803: Integrate Cypress with Travis

Contributor Comments
[DISCUSS] thread on the dev mailing list:
<EMAIL_ADDRESS>JIRA Ticket: https://issues.apache.org/jira/browse/METRON-1803
This PR adds Cypress.io to our project. It makes us able to run E2E tests, UI integration tests. Also higher level UI tests with mocked services.
As part of this PR I added tests to cover the following functionalities of PCAP UI panel:

checking running jobs on navigating to PCAP tab
submitting PCAP job request
requesting job status
process status in percentage
getting PCAP JSON
rendering PCAP table
showing PCAP details
navigating across pages
downloading PDML
cancelli PCAP query job
showing filter validation messages
showing date validation messages

Please consider while reviewing that these tests are not meant to cover all the details of the functionalities above. The aim here is to extend the test coverage build up by a large number of Unit Tests with higher level UI tests.
New folders
Integration folder
That contains the actual Cypress tests. The folder name comes from the Cypress naming convention, however, no real integration tests implemented here yet (at least no other than the integration of UI components to a whole application). We could change the name of the folder anytime we like to, but only one folder applicable.
Fixture folder
The tests are running on mocked data. This makes us able to integrate them with Travis without the need to having PCAP related services available from our CI.
Each file in the Fixture folder represents a response to a particular request. This makes it fairly easy to create and maintain.
How to run tests on your local machine
To run Cypress tests locally please do the following:

pull this branch to your workspace
move to metron-interface/metron-alerts folder
run: npm ci
run: scripts/start-server-for-e2e.sh
run: node_modules/cypress/bin/cypress run
or run: node_modules/cypress/bin/cypress open
if you like to use the dashboard.

Travis integration
As part of this PR I modified the package.json in metron-alert to make Cypress running in Travis. If you like to see the integration working please check to logs of build step #3.
Failing Cypress tests brakes the build.
Example of build broken by failing Cypress test:
https://travis-ci.com/tiborm/metron/builds/86869264
Pull Request Checklist
Thank you for submitting a contribution to Apache Metron.
Please refer to our Development Guidelines for the complete guide to follow for contributions.
Please refer also to our Build Verification Guidelines for complete smoke testing guides.
In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following:
For all changes:

[x] Is there a JIRA ticket associated with this PR? If not one needs to be created at Metron Jira.
[x] Does your PR title start with METRON-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
[x] Has your PR been rebased against the latest commit within the target branch (typically master)?

For code changes:

[x] Have you included steps to reproduce the behavior or problem that is being changed or addressed?

[x] Have you included steps or a guide to how the change may be verified and tested manually?

[x] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via:
mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh

[x] Have you written or updated unit tests and or integration tests to verify your changes?

[x] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?

[x] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent?

For documentation related changes:

[x] Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via site-book/target/site/index.html:
cd site-book
mvn site

Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.
It is also recommended that travis-ci is set up for your personal repository such that your branches are built there before submitting a pull request.

Thanks for pointing out what it looks-like when a build fails.  The Travis output does not seem to indicate which test failed and why.  Did I miss it? How are we going to know why it failed?
[ERROR] npm ERR! errno 1
[ERROR] npm ERR<EMAIL_ADDRESS>cypress:run: `cypress run`
[ERROR] npm ERR! Exit status 1
[ERROR] npm ERR!
[ERROR] npm ERR! Failed at the<EMAIL_ADDRESS>cypress:run script.
[ERROR] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[ERROR]
[ERROR] npm ERR!
[ERROR] npm ERR! code ELIFECYCLE
[ERROR] npm ERR! errno 1
[ERROR] npm ERR<EMAIL_ADDRESS>cypress:ci: `run-p --race start cypress:run`
[ERROR] npm ERR! Exit status 1
[ERROR] npm ERR!
[ERROR] npm ERR! Failed at the<EMAIL_ADDRESS>cypress:ci script.
[ERROR] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[ERROR]
[ERROR] npm ERR!  Exit status 1
[ERROR] npm ERR!
[ERROR] npm ERR! Failed at the<EMAIL_ADDRESS>testCI script.
[ERROR] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[ERROR]
[ERROR] npm ERR!  SUCCESS [03:59 min]
[INFO] metron-alerts ...................................... FAILURE [05:50 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 09:50 min
[INFO] Finished at: 2018-10-04T12:14:48+00:00
[INFO] Final Memory: 26M/268M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:npm (npm testCI) on project metron-alerts: Failed to run task: 'npm run testCI' failed. (error code 1) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :metron-alerts

@nickwallen is this what you're looking for? I have some questions about what I'm looking at here. Are the checkmarks only indicating that a test has run, not that it has passed?  I'm assuming the numbered item indicates it is the test that has failed. So if requesting job status also failed, I imagine it would also add 2) requesting job status?
[INFO] ℹ ｢wdm｣: Compiled successfully.
[INFO] ────────────────────────────────────────────────────────────────────────────────────────────────────
[INFO]
[INFO]   Running: pcap/pcap.spec.js...                                                            (1 of 1)
[INFO]
[INFO]
[INFO]   PCAP Tab
[INFO]
[INFO]     1) checking running jobs on navigating to PCAP tab
[INFO]
[INFO]     ✓ checking running jobs on navigating to PCAP tab (3822ms)
[INFO]
[INFO]     ✓ submitting PCAP job request (4689ms)
[INFO]
[INFO]     ✓ requesting job status (6310ms)
[INFO]
[INFO]     ✓ process status in percentage (7122ms)
[INFO]
[INFO]     ✓ getting pcap json (7203ms)
[INFO]
[INFO]     ✓ rendering pcap table (8214ms)
[INFO]
[INFO]     ✓ showing pcap details (7887ms)
[INFO]
[INFO]     ✓ navigating accross pages (7209ms)
[INFO]
[INFO]     ✓ downloading pdml (7402ms)
[INFO]
[INFO]     ✓ cancelling (kill) pcap query job (7101ms)
[INFO]
[INFO]     ✓ showing filter validation messages (4208ms)
[INFO]
[INFO]     ✓ showing date validation messages (3419ms)
[INFO]
[INFO]
[INFO]   12 passing (1m)
[INFO]   1 failing
[INFO]
[INFO]   1) PCAP Tab checking running jobs on navigating to PCAP tab:
[INFO]      CypressError: Timed out retrying: expected 'http://localhost:4200/api/v1/pcap?state=RUNNING' to include '?state=HAPPY-HOLYDAY'
[INFO]       at Object.cypressErr (http://localhost:4200/__cypress/runner/cypress_runner.js:68040:11)
[INFO]       at Object.throwErr (http://localhost:4200/__cypress/runner/cypress_runner.js:68005:18)
[INFO]       at Object.throwErrByPath (http://localhost:4200/__cypress/runner/cypress_runner.js:68032:17)
[INFO]       at retry (http://localhost:4200/__cypress/runner/cypress_runner.js:61785:16)
[INFO]       at http://localhost:4200/__cypress/runner/cypress_runner.js:53903:18
[INFO]       at tryCatcher (http://localhost:4200/__cypress/runner/cypress_runner.js:7091:23)
[INFO]       at Promise._settlePromiseFromHandler (http://localhost:4200/__cypress/runner/cypress_runner.js:5113:31)
[INFO]       at Promise._settlePromise (http://localhost:4200/__cypress/runner/cypress_runner.js:5170:18)
[INFO]       at Promise._settlePromise0 (http://localhost:4200/__cypress/runner/cypress_runner.js:5215:10)
[INFO]       at Promise._settlePromises (http://localhost:4200/__cypress/runner/cypress_runner.js:5290:18)
[INFO]       at Async._drainQueue (http://localhost:4200/__cypress/runner/cypress_runner.js:2023:16)
[INFO]       at Async._drainQueues (http://localhost:4200/__cypress/runner/cypress_runner.js:2033:10)
[INFO]       at Async.drainQueues (http://localhost:4200/__cypress/runner/cypress_runner.js:1907:14)
[INFO]       at <anonymous>
[INFO]
[INFO]
[INFO]
[INFO]
[INFO]   (Results)
[INFO]
[INFO]   ┌────────────────────────────────────┐
[INFO]   │ Tests:        13                   │
[INFO]   │ Passing:      12                   │
[INFO]   │ Failing:      1                    │
[INFO]   │ Pending:      0                    │
[INFO]   │ Skipped:      0                    │
[INFO]   │ Screenshots:  1                    │
[INFO]   │ Video:        false                │
[INFO]   │ Duration:     1 minute, 27 seconds │
[INFO]   │ Spec Ran:     pcap/pcap.spec.js    │
[INFO]   └────────────────────────────────────┘
[INFO]
[INFO]
[INFO]   (Screenshots)
[INFO]
[INFO]   - /home/travis/build/tiborm/metron/metron-interface/metron-alerts/cypress/screenshots/pcap/pcap.spec.js/PCAP Tab -- checking running jobs on navigating to PCAP tab (failed).png (1280x720)
[INFO]
[INFO]
7====================================================================================================
[INFO]
[INFO]   (Run Finished)
7[INFO]
[INFO]       Spec                                                Tests  Passing  Failing  Pending  Skipped
[INFO]   ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
[INFO]   │ ✖ pcap/pcap.spec.js                         01:27       13       12        1        -        - │
[INFO]   └────────────────────────────────────────────────────────────────────────────────────────────────┘
[INFO]     1 of 1 failed (100%)                        01:27       13       12        1        -        -
[INFO]
 3 6 6 1 1 4 4 6npm ERR! code ELIFECYCLE

@mmiklavc The log output with multiple errors looks exactly as you described.
The test file size is like that because it contains the copy of a full response. This makes the mock creation and maintenance very easy. (Just copy/pasting within seconds.) It's also closer to the actual behaviour of the app. A test might pass with 1 or 2 records but could fail if we have 50.
The response files are reused across tests.

I just made some more improvement on this:

I was able to remove one big fixture file
removed unused support and plugin files (also found configs to prevent cypress to regenerate them)

@tiborm - Taking another pass at this, am I correct that this is the meat of this change? https://github.com/apache/metron/blob/6a2a643efb34466137958ca208646276e8698ddf/metron-interface/metron-alerts/cypress/integration/pcap/pcap.spec.js. This is the test file. Everything else summing up to the current 19k lines is either changes to package files in npm or test requests/response data.

@mmiklavc Yes, that's the main file. Cypress.conf.json contains 4 line of configs and package.json 3 lines of changes required by the integration. Anything else is test response data.

@mmiklavc @justinleet I created a ticket to track the migration of protractor tests to cypress.
https://issues.apache.org/jira/browse/METRON-1848
All the existing tests are collected and listed for migration. As part of the migration, my plan is to keep E2E nature of the existing tests. This means I will ensure the tests are able to run against an actual service if available. Otherwise, the runner turns the mocks responses on.

I think I'm good on this @tiborm. I also ran the tests locally and everything passed as expected. I did notice that this adds 2 minutes to the metron-alerts build - I expect that is because this change is completely additive and is not replacing any Protractor tests at this time. Nice work, thanks for the contribution. +1

You are right @mmiklavc, this is an additional step to our build process. So it makes our build slightly slower. However, the two minutes come from the nature of PCAP. It has a built-in 10-second delay every time we check the job status. What makes these particular tests slower. With mocking out the time I was able to speed them up by 50%. I think it's also a good practice for the upcoming tests to keep them fast with this trick.

 For some reason, some tests are failing with mocked time but just on Travis. I wasn't able to figure out why.

For some reason the Travis check shows as still in progress on my end even though it shows as passed when I click details. I'm still +1 on this. Thanks @tiborm.


[Event Request] page 6655 "Return Shipment Statistics" - OnCalculateTotalsOnAfterAddLineTotals

We would like to add a parameter to the existing event OnCalculateTotalsOnAfterAddLineTotals in the following procedure:
local procedure CalculateTotals()
var
    ReturnShptLine: Record "Return Shipment Line";
    IsHandled: Boolean;
begin
    IsHandled := false;
    OnBeforeCalculateTotals(Rec, LineQty, TotalNetWeight, TotalGrossWeight, TotalVolume, TotalParcels, IsHandled);
    if IsHandled then
        exit;

    ReturnShptLine.SetRange("Document No.", "No.");
    if ReturnShptLine.Find('-') then
        repeat
            LineQty += ReturnShptLine.Quantity;
            TotalNetWeight += ReturnShptLine.Quantity * ReturnShptLine."Net Weight";
            TotalGrossWeight += ReturnShptLine.Quantity * ReturnShptLine."Gross Weight";
            TotalVolume += ReturnShptLine.Quantity * ReturnShptLine."Unit Volume";
            if ReturnShptLine."Units per Parcel" > 0 then
                TotalParcels += Round(ReturnShptLine.Quantity / ReturnShptLine."Units per Parcel", 1, '>');
            OnCalculateTotalsOnAfterAddLineTotals(
                Rec, //A108F0039.Event
                ReturnShptLine, LineQty, TotalNetWeight, TotalGrossWeight, TotalVolume, TotalParcels)
        until ReturnShptLine.Next() = 0;
end;

Event Signature:
[IntegrationEvent(false, false)]
local procedure OnCalculateTotalsOnAfterAddLineTotals(ReturnShipmentHeader: Record "Return Shipment Header"; var ReturnShipmentLine: Record "Return Shipment Line"; var LineQty: Decimal; var TotalNetWeight: Decimal; var TotalGrossWeight: Decimal; var TotalVolume: Decimal; var TotalParcels: Decimal)
begin
    //A108F0039.Event Parameter ReturnShipmentHeader
end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.


Changes to library semantics

Though I honestly think functools.singledispatch and if/elif/else statements are much better for this kind of behavior, I made a few changes to the library and documentation so as to make it (hopefully) a bit more functional
Switching
I made two large changes to the library

The switch class now has a self.fall_through flag that can be set on instantiation as well as a self.called flag that is set to True once a match has been found
cases are now evaluated based on whether switch_instance.fall_through == True && switch_instance.called == True. This makes it able to return values from cases as well as use functions that evaluate to True or False as possible switch conditions

This way, we don't need to keep a mapping of values and functions on which to dispatch. Also, it doesn't prevent one from using it the way, you, @mikeckennedy initially intended with the exception that return values are specific to each case and not the instance of switch itself
meaning_of_life = 42

with switch(42, fall_through=False) as s:
    s.case(42, lambda: print('hello, world') # this will execute
    s.case([42, 0], lambda: None) # this will NOT execute

with switch(42, fall_through=True) as s:
    s.case(42, lambda: print('hello, world') # this will execute
    s.case([42, 0], lambda: None) # this WILL execute

    # the following line would be difficult to replicate as the library is currently written
    # one would need to reference the variable as nonlocal or global in the
    # function passed to s.case and using a lambda would not be possible

    less_than_50 = s.case(lambda n: n < 50, lambda: True) # this will execute

assert less_than_50 == True

Hi, I can't get to this right away. Today and tomorrow are flat-out. But I will and thank you for submitting it.

Cool beans!

Hi @knowsuchagency sorry about not being able to use your PR. I went through them in order and after accepting the first, saw yours was solving the same features but in a pretty different way.
I really appreciate the contribution.


Implement curl instrumentation and push it upstream

"Copy" features from legacy agent
Research how to instrument curl_multi_* funtions
Implement to be fully compatible with otel and push upstream

otel issue:
https://github.com/open-telemetry/opentelemetry-php/issues/1420
PR:
https://github.com/open-telemetry/opentelemetry-php-contrib/pull/313


Add in error message langterms now so that they are included in translation

Seems good - where are these langterms being used?

One will be used when the course image catalog is down, the other will be when you try to set an image but it doesn't work

I just want to include them because I'm sending in the file for translation today and figured that we could save some time this way

Ohh, gotcha gotcha. So they're not actually in use yet, I was confused. Yep, LGTM!


Show a Toast for HMR

This is just to try out the experience with HMR if we show toasts (might be annoying). Let's try it out before deciding on merging/closing.
Related #5906

You got an extra commit 'Annotate WebSocket with Flow' in this PR (I always do that too :))

@janicduplessis Yeah, I sent that as a PR to master, but isn't merged yet :(

You can rebase -i and delete the commit.

@janicduplessis I need that commit. Otherwise Flow will give me error.

Ahhh ok that's good then.

Code looks good to me @satya164...I'll try to try this out later today to see how it feels.

@skevy Awesome :)

@skevy Did you try this?

I think we should be able to enable HMR on the 0.22 cut but among other things we some kind of visual indicator in, like what @satya164 implemented here. Would be awesome being able to dismiss the indicator (5906)

@martinbigio I'll do some testing with both PRs and will try to get this merged ASAP.

Thanks @satya164!

Merging this for now. Currently the Toast is shown for short period (2s) and doesn't seem to annoy much. Let's come up with better plans if we wanna change.

@facebook-github-bot shipit

@facebook-github-bot shipit

@facebook-github-bot shipit


use Java 1.7 conventions

Build compiled fine, but fails whilst trying to execute Sonar
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:<IP_ADDRESS>6:sonar (default-cli) on project scott-parent: Unable to execute SonarQube: Fail to get bootstrap index from server: Failed to connect to localhost/<IP_ADDRESS>:9000: Connection refused (Connection refused) -> [Help 1]

Sorry about that, I've just finished integrating sonar into the build pipeline, but it seems that for forks it does not work as it should.
The PR looks really great, thanks! I'll review it today.

Awesome, thanks! :fireworks:


"EISDIR: illegal operation on a directory" when attempting to download propeller via NPM.

Could this be because there is no package.json on the the master branch ? I would like to install propeller via npm so I can use webpack to package it up and such.

Hello,
We just released npm package https://www.npmjs.com/package/propellerkit for Propeller's latest version 1.1.0.
Now you can download Propeller via NPM.


fix: updated deps

:tada: This PR is included in version 2.7.16 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Release 1.3.0

CLI

Add support for web target #92
Add CI job to build calculator app #104

Changed

Bump min Go version to 1.14 to align with Fyne requirements
Update README for matching modern go command line #114

Base images (release 22.06.23)

Add web base image
Update freebsd to v12.3
Update Go to v1.18.3
Update Fyne CLI to v2.2.2-rc1

The following images have been tagged and released on docker hub for testing:

fyneio/fyne-cross:1.3-base
fyneio/fyne-cross:1.3-base-llvm
fyneio/fyne-cross:1.3-base-freebsd
fyneio/fyne-cross:1.3-android
fyneio/fyne-cross:1.3-freebsd-amd64
fyneio/fyne-cross:1.3-freebsd-arm64
fyneio/fyne-cross:1.3-linux-386
fyneio/fyne-cross:1.3-linux-arm64
fyneio/fyne-cross:1.3-linux-arm
fyneio/fyne-cross:1.3-web
fyneio/fyne-cross:1.3-windows

Checklist:

[x] Tests included.
[x] Lint and formatter run with no errors.
[ ] Tests all pass.

Where applicable:

[x] Public APIs match existing style.
[x] Any breaking changes have a deprecation path or have been discussed.

Yes, there was a problem building freebsd images due to v12.2 EOL. The freebsd have been updated to v12.3 now, in the upcoming version we should plan to upgrade to 13.x.
Need to double check why the web CI is failing but apart that the PR should be ready for testing.

Sorry for the Fyne delay, we have v2.2.2 due in 2 days which might be helpful - it has some more cool fixes :)

@Jacalz @alexrudd do you have any clue on the web CI build failing with permission issues ?
Note: it works correctly locally on a linux host

@Jacalz @alexrudd do you have any clue on the web CI build failing with permission issues ? Note: it works correctly locally on a linux host

I am able to reproduce the problem locally with the exact same command line. The issue seems related to the right on the /go directory. If I enable cache outside of the image, things pass. Maybe the right on /go/pkg should be 777 instead.

@Jacalz @alexrudd do you have any clue on the web CI build failing with permission issues ? Note: it works correctly locally on a linux host

I am able to reproduce the problem locally with the exact same command line. The issue seems related to the right on the /go directory. If I enable cache outside of the image, things pass. Maybe the right on /go/pkg should be 777 instead.

Thanks @Bluebugs . I missed for some reasons the -no-cache flag. Fixed in 39f789c

Updated to Fyne CLI v2.2.2

Sure thing. Let's wait for the Go 1.18.4 release, then I'll update the PR.

1.18.4 has been released. This should be good to go now 🙂

Good catch @Bluebugs, thanks.
Fixed in 733cb90


"Explore" not working anymore

Hi,
is the "Explore" not working? I used it without problems last week but since a couple of days it is not showing anything.
I am referring to this -> https://objaverse.allenai.org/explore
Previously i could browse the different objects but now it is empty.
I have tried different browsers and PCs as well but nothing.
Thanks
Thanos

+1


use argparse & small refactoring

no functionality changed

usage: hydra-check [-h] [--url] [--json] [--short] [--arch ARCH]
                   [--channel CHANNEL]
                   PACKAGES

positional arguments:
  PACKAGES

options:
  -h, --help         show this help message and exit
  --url              only print the hydra build url, then exit
  --json             output json
  --short            write only the latest build even if last build failed
  --arch ARCH        system architecture to check
  --channel CHANNEL  Channel to check packages for

Other channels can be:
    unstable  - alias for nixos/trunk-combined (Default)
    master    - alias for nixpkgs/trunk
    staging   - alias for nixos/staging
    19.03     - alias for nixos/release-19.03
    19.09     - alias for nixos/release-19.09
    20.03     - alias for nixos/release-20.03
    nixpkgs/nixpkgs-20.03-darwin    - verbatim jobset name

Jobset names can be constructed with the project name (e.g. `nixos/` or `nixpkgs/`)
followed by a branch name. The available jobsets can be found at:
* https://hydra.nixos.org/project/nixos
* https://hydra.nixos.org/project/nixpkgs


fixes for the wasm build

Description of changes
While working on #854 I realized that the wasm build was not actually generating valid TypeScript (largely due to changes I made for #757). This PR fixes the issues & adds CI to avoid this mistake in the future.
Detailed summary:

Fixes the bad TypeScript by adjusting various tsify annotations
Adds CI to check that the generated TypeScript is valid
Adds #![cfg_attr(feature = "wasm", allow(non_snake_case))] in a few files to suppress annoying VSCode warnings
Removes the cedar-wasm/src/{validator, authorizer}.rs files since it's simpler to expose the FFI functions directly rather than introduce a trivial wrapper

Issue #, if available
Checklist for requesting a review
The change in this PR is (choose one, and delete the other options):

[X] A change (breaking or otherwise) that only impacts unreleased or experimental code.

I confirm that this PR (choose one, and delete the other options):

[X] Does not update the CHANGELOG because my change does not significantly impact released code.

I confirm that cedar-spec (choose one, and delete the other options):

[X] Does not require updates because my change does not impact the Cedar formal model or DRT infrastructure.

Still need to investigate the new wasm-example failure, but the PR is otherwise ready for review.


Send missed BlockNew msgs to consensus on startup

This PR fixes a bug with the validator where it fails to send BlockNew updates for all blocks since the chain head when the engine connects, if the engine connects after the validator has received some blocks.

This change only affects the validator's behavior when the engine restarts. When this happens, the validator will send updates for all blocks it has in memory that are not on the current chain. It sends the block in the order that the engine expects to receive them. From the engines perspective, these blocks will appear to have just arrived at the validator. You are correct that this is an unbounded number of blocks.
If the validator restarts, all the in memory blocks will be lost and so there will be no blocks to send to the engine (other than chain head and any new blocks that arrive).


Mark slow tests

This allows skipping tests with pytest -m 'not slow'. Now, I can get a
run of all non-slow tests down to 90s in my machine (also using -n 4).

Well, I only marked those taking longer than 10 seconds. That does not mean that I consider the others to be fast. :snail:

marking tests with slow will require constant updating. May I recommend you put timeout on other tests and once in a run that timeout is hit you mark that test as well with slow.

@BOR4 that's an interesting idea.  I created an issue about that https://github.com/raiden-network/raiden-contracts/issues/666 .


feat(private egress): update template and add log

What type of PR is this?
/kind feature
What this PR does / why we need it:
To support private egress feature change in agentbaker. We plan to make it in three parts:
Part 1, adds data model, and test baseline
Part 2(this PR), update provision script to log value from data model, verify test basline change
Part 3, update real logic in provision script
Which issue(s) this PR fixes:
Requirements:

[X] uses conventional commit messages

[ ] includes documentation
[X] adds unit tests
[ ] tested upgrade from previous version

Special notes for your reviewer:
Release note:
none

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 3 (0.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall First build on doliu/pe1 at 60.612%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

pkg/agent/baker.go
0
3
0.0%

Totals

Change from base Build<PHONE_NUMBER>:
60.6%

Covered Lines:
2576

Relevant Lines:
4250

💛  - Coveralls


chore(master): release 0.2.0

:robot: I have created a release beep boop
0.2.0 (2022-11-09)
Features

add mafic -v for version checking (#5) (3dbf5ab)
add node selection/balancing (#18) (f5fc457)

Reverts

"ci: ignore test bot from snyk analysis" (92c7482)

Documentation

add documentation for contributing (#6) (81fde97)
contributing: use level 3 headers for commits (452edf2)
contributing: what a shambles (c4be211)
readme: add fancy new shields.io badges (#2) (1af8fa1)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/ooliver1/mafic/releases/tag/v0.2.0 :sunflower:


Do you have a working example of Coroutine HTTP client used as a websocket client ?

What did you do? If possible, provide a simple script for reproducing the error.

I would like to use a Coroutine HTTP client as a websocket, from the documentation, it seems to be possible.

What did you expect to see?

What did you see instead?

What version of OpenSwoole are you using (show your php --ri openswoole)?

What is your machine environment used (show your uname -a & php -v & gcc -v) ?

You can also try the following OpenSwoole support channels:

Documentation - Documentation for Open Swoole
Slack - Slack channel of Open Swoole
Discord - Discord server of Open Swoole

Openswoole website examples have got some errors that I fixed on my side.


Handle request_id globally

Description
Improving #715 to return request id in all WS responses including errors.
Affected Dependencies
n/a
How has this been tested?

Unit tests
Manually tested MC flow

Checklist

[x] I have followed the Contribution Guidelines and Code of Conduct
[x] I have commented my code following the OpenMined Styleguide
[x] I have labeled this PR with the relevant Type labels
[x] My changes are covered by tests

@vvmnnnkv can you also make it optional for backward compatibility and preventing any changes in pysyft?


Life Essence is... enchantable?

I'm not sure if you meant to do this, and I'll fully admit I haven't tested this without PiTweaks yet to make sure, but JEI says Life Essences can take both Unbreaking and Mending enchantments.  Mending is Forever... and it wouldn't surprise me in the slightest if Manabound works on it too.
Immersive Engineering dealt with this on its hammer by making the damage attribute an NBT tag instead of using the damage property.  Even with PiTweaks installed, and forcibly adding Unbreaking and Mending to an IE hammer, I can't repair it or slow the damage it takes that way.

Hm, Mending shouldn't be possible and probably won't work but Unbreaking was intentional.

Okay, looking into it more, it's the fact that the item is damageable that automatically makes it enchantable (and the fact that it only stacks up to one). Those automatic enchantments that are allowed include Mending and Unbreaking, or anything else that is classified as "BREAKABLE".
I've modified it to only work with the Unbreaking enchant specifically.

In the interim, you can actually use CraftTweaker to change the recipe for the ritual if you need a temporary solution as documented here.


Running with released Linux distributions

Hi,
I'm running Ubuntu Vivid, which is pretty cutting edge (it's still in beta) but the tools here are still not up-to-date enough to build and run Choco. My downstream customers are running Ubuntu Trusty or RHEL and Java 7.
Can you please publish on Maven Central built using java 7, and in class file format 51.0 instead of 52.0 so that it can be included in products?
Thank you.
S.

Addendum: I'm a long time user of choco 2, but that's not on Maven Central. I was willing to update all our software to 3 so we can avoid carrying our own binaries.

Hi Shevek,
Thank you for your feedback.
We understand your request,and we certainly moved too fast to java 8 but it has been done some months ago and we don't feel like maintaining two versions of the same code for two different JVMs.
Maybe an alternative would be to downgrade the source target to java 7... But it seems like a kind of regression to me.
CP

Shevek,
I've downgrade the code to Java 7 and it did not demand me much time. So far, the Java 8 features on Choco's source-code are: (a) lambda expressions, (b) default methods, (c) stream, and (d) method references.

What is the chance of maintaining the default branch use Java 7? I don't really want to maintain a branch of choco on top of all our other work, but until java 8 has general acceptance (e.g. appears in default Linux distributions) we cannot make practical or industrial use of this code.

@cprudhom If @alessandroleite can put up a PR for the work, would you accept it?

Well, as I said, I don't want to spend time maintaining two versions of the code, and downgrading to java7 looks like a regression to me. If we found a way to easily maintain the two versions, I would certainly do it.

Maybe I could consider, for each release, branching the master branch, and modifying the code in order to be java7 compliant, and push it to MCR. Would it be an acceptable solution?

Any solution which lets us have a Maven Central dependency which runs in Java 7 is perfect. Thank you.

The project should replace (a) lambda expressions by functions or similar approaches (e.g., Guava's functions -- https://code.google.com/p/guava-libraries/wiki/FunctionalExplained); and (b) default methods and other Java's 8 features by aspect (i.e., AspectJ).


Inconsistence between type and interface

This is probably me not understanding the subtleties of type vs interface, but they contain very weird differences indeed. I would expect the following code to work with either of them, but it does not work for interface:
type JsonLeaf = number | string | boolean | null

interface JsonTree {
    [key: string]: JsonLeaf | JsonTree | JsonTree[]
}

interface InterfaceWithCustomProps {
    anotherProp: string
}

interface InterfaceWithNestedProps {
    someProp: InterfaceWithCustomProps // Does not work with interface.
    // someProp: {[key: string]: string} // Works with interface.
}

interface ChildInterface extends JsonTree, InterfaceWithNestedProps { }

type ChildType = JsonTree & InterfaceWithNestedProps // Works in every case.

See in playground.

This is indeed one of the differences between extends and the & type operator. A class or interface declaration inherits index signatures from its base type(s) and validates that the constraints are satisfied by newly introduced members. However, the & type operator doesn't perform this validation because & is always permitted between any two types (even if the outcome is a type for which no values exist).

This is indeed one of the differences between extends and the & type operator. A class or interface declaration inherits index signatures from its base type(s) and validates that the constraints are satisfied by newly introduced members. However, the & type operator doesn't perform this validation because & is always permitted between any two types (even if the outcome is a type for which no values exist).

I should add that you get an error because you don't have JsonTree nodes all the way down, so to speak. When you extend JsonTree everywhere it works as expected:
type JsonLeaf = number | string | boolean | null;

interface JsonTree {
    [key: string]: JsonLeaf | JsonTree | JsonTree[];
}

interface InterfaceWithCustomProps extends JsonTree {
    anotherProp: string;
}

interface InterfaceWithNestedProps extends JsonTree {
    someProp: InterfaceWithCustomProps;
}

interface ChildInterface extends InterfaceWithNestedProps { }

Thanks a ton for the clarification.


criteria modifier '<=' / 'lessThanOrEqual' is not working as expected!!!

my lbound date is 2016-01-23 00:00:00 and rbound date is 2016-01-25 00:00:00
so it shold send datas from 25th also but it is not doing so it only send me data after 2016-01-23 00:00:00 and datas strictly before 2016-01-25 00:00:00. I mean
datas with 2016-01-23 01:35:01 and 2016-01-24 23:10:55 are shown.....
but i am expecting data with 2016-01-25 03:44:00 also,but i am not getting tha in response.
getList:function(req,res){   var criteria={     createdAt:{       '>':sails.moment(new Date(req.body.lbound)).format('YYYY-MM-DD HH:mm:ss'),        '<=':sails.moment(new Date(req.body.rbound)).format('YYYY-MM-DD HH:mm:ss')     }   };   List.find(criteria).exec(function(err,rows){       if(err){         console.log(err);         res.negotiate();       }       else{         console.log(rows);         res.ok(rows);       }     }); }

That was not the issue.
I figured Out the my mistake.....


Can't use it, im getting this error all the time

I believe you need to use an xcodeproj file, not workspace


Two models with the same tag contexts -> problems finding records by tags

I used acts-as-taggable-on to add tags to two of my models:
class Widget < ActiveRecord::Base
  acts_as_taggable_on :keywords, :locales
end

class Product < ActiveRecord::Base
  acts_as_taggable_on :keywords, :locales
end

As you see the contexts are the same on both models and I assume that this is what creates my issues.
The problem is that I can't seem to find products (or widgets) by keywords. Finding by locales works AFAICS.
>> Product.first.keyword_list
  Product Load (0.4ms)  SELECT `products`.*  FROM `tags` INNER JOIN `taggings` ON `tags`.`id` = `taggings`.`tag_id` WHERE `taggings`.`taggable_id` = 10887 AND `taggings`.`taggable_type` = 'Product' AND (taggings.context = 'keywords' AND taggings.tagger_id IS NULL) /**/
=> ["foo", "bar", "baz", "biz"]

>> Product.tagged_with(["foo", "bar", "baz", "biz"], on: :keywords)
  ActsAsTaggableOn::Tag Load (0.9ms)  SELECT `tags`.* FROM `tags` WHERE (lower(name) = 'foo' OR lower(name) = 'bar' OR lower(name) = 'baz' OR lower(name) = 'biz') /**/
  Product Load (0.3ms)  SELECT `products`.* FROM `products` WHERE `products`.`deactivated_at` IS NULL AND (1 = 0) /**/
=> []

>> Product.first.locale_list
  Product Load (0.6ms)  SELECT `products`.*  FROM `tags` INNER JOIN `taggings` ON `tags`.`id` = `taggings`.`tag_id` WHERE `taggings`.`taggable_id` = 10887 AND `taggings`.`taggable_type` = 'Product' AND (taggings.context = 'locales' AND taggings.tagger_id IS NULL) /**/
=> ["us"]

>> Product.tagged_with(['us'], on: :locales).first
  ActsAsTaggableOn::Tag Load (0.7ms)  SELECT `tags`.* FROM `tags` WHERE (lower(name) = 'us') /**/
  Product Load (0.5ms)  SELECT `products`.* FROM `products` JOIN taggings products_taggings_9b2c6f7 ON products_taggings_9b2c6f7.taggable_id = products.id AND products_taggings_9b2c6f7.taggable_type = 'Product' AND products_taggings_9b2c6f7.tag_id = 23 AND products_taggings_9b2c6f7.context = 'locales' WHERE `products`.`deactivated_at` IS NULL LIMIT 1 /**/
=> #<Product id: 10887, name: "Jon M. Chu - Justin Bieber: Never Say Never", url: "https://itunes.apple.com/us/movie/justin-bieber-nev...", cached_slug: "jon-m-chu-justin-bieber-never-say-never", description: "foobar", created_at: "2012-11-07 15:15:08", updated_at: "2012-11-16 23:59:47", price: 999, currency: "USD", visible: true, admin_user_id: 850, merchant_id: nil, deactivated_at: nil, source: "itunes", images_count: 1, source_id: "425624519-us">

Does anyone have a spontaneous idea what the problem might be or how I can debug it further?
I dug around in the acts-as-taggable-on source but didn't get very far.
All ideas are appreciated! :)

I am having issues, very specifically, with having an context named "keywords".  It causes a number of issues and might be some kind of method name collision somewhere.  I renamed my context to "foowords" and everything worked perfectly for me.  YMMV.

key_words should work.


DM anybody who says IQ in their first 300 messages discussing IQ as a new poster is not disallowed, but is linked to significant risk of getting banned. Maybe participate in some other discussions first

Issue created by CharlesF#0306.

working on this:

add a flag for every user canSayIQ
if they say IQ:

check if the flag is set and they have less than 300 messages (then PM them)
if the flag is not set and they have more than 300 messages, set the flag

This way, you won't have to do expensive "Get all messages from this user" queries when a user has a majillion messages in the server. Since the server has a lot of regulars this seems prudent

These are good implementation thoughts but I think I actually don't want this feature, gonna close this as "won't fix"


document session object lifetime

Add missing info about session creation moment, mention possible concurrency issues.

fixes #4317

@davidism could you maybe have a look at this minor doc change or invite someone who can review it?

Thanks for making a PR! I rebased this to 2.0.x since it's a docs update, and expanded on the added docs.


NHS.UK frontend tweaks and updates

Hey all,
Hopefully this helps...

Installed the latest version of NHS.UK frontend (version 3.1.0) (I don't know if you'll need anything from this specific release but just general house keeping)

Imported the Sass version of the NHS.UK frontend styles, you can now access any of the variables, mixins or other Sass features available in the library (also removed the colour variables that had been put in manually) https://github.com/nhsuk/nhsuk-frontend/blob/master/docs/installation/installing-with-npm.md#importing-styles

Using the Frutiger font, which is the NHS brand font, this is covered by a NHS Digital license on any nhs.uk subdomain (which I presume the service will eventually get - don't worry about dev URLs). Arial is the fall back font. https://www.england.nhs.uk/nhsidentity/faq/do-we-have-to-use-fruitger-and-arial-fonts-for-everything/

Use the NHS favicons and add the metadata for different browsers/devices.

This is great, much appreciated!

Looks good to me, thanks! :tada: I'll give merge this now :)