fix: set lock timeout when migrating history schema

What kind of change does this PR introduce?
Bug fix
What is the new behavior?
Adds lock timeout when altering schema_migrations table.
Additional context
Add any other context or screenshots.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

4 of 4 (100.0%)  changed or added relevant lines in 3 files are covered.
5 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.02%) to 58.86%

Files with Coverage Reduction
New Missed Lines
%

internal/gen/keys/keys.go
5
11.76%

Totals

Change from base Build<PHONE_NUMBER>:
-0.02%

Covered Lines:
6195

Relevant Lines:
10525

💛  - Coveralls


no_unnecessary_fat_arrows: function contains super

If you have a function which uses super, the fat arrow is necessary but the rule tells you to remove it.

Can you explain with some code? I am assuming you are writing inside an instance function (otherwise CS would complain) and AFAIK you don't need fat arrows to call super .

class A extends B
  method: ->
    asyncFn ->
      super()

method gets compiled to
A.prototype.method = function() {
    return asyncFn(function() {
      return A.__super__.method.call(this);
    });
  };

Since this is used, looks like the fat arrow is needed

Yeah seems like a bug. I'm guessing if super is called somewhere you need to make sure fat arrows are propagated back up to the main func. I'm not intimately familiar with this rule/code so it may take me some time to find a solution. PRs accepted.

It might be worth filing an issue in coffeescript to see if this is really the intended behavior. I can't see how that code could ever turn out well without fat arrows

Sorry this is already supported. A team member must have been using an out of date coffeelint

:+1: Relatedly there is an issue about this in jashkenas/coffee-script#1606


High CPU usage on Windows

I recently updated my tev binary (Windows, pre-built) from v1.17 to v1.19 and experience a consistent high CPU load of tev (1 thread, 100%).  This happens even if I just start the application in idle with no images loaded yet.
I think it is connected to the IPC communication as I observed some interesting behaviour there:
Background
I have an app that starts the tev process, connects to it over TCP, sends a CreateImage, then an UpdateImage packet. I can also repeat this process on the click of a button.
Steps
When I open an image the first time, the tev instance opens correctly, but doesn't show the image. Tev runs with 100% CPU load on one thread. Even if I reopen the image (different name, so new CreateImage, UpdateImage combo) from my GUI it doesn't show either. If I close the tev window, the process stays there, with 100% CPU load on one thread.

Thoughts
I'm inclined to rule out my side of the IPC implementation, as it works fine with v1.17 (every time) and v1.19 (the second time). Even if this is unrelated to IPC, the high CPU load is still indicating a blocking call (possibly some mutex) somewhere.
PS: It doesn't matter if the instance is the primary or a secondary. The CPU load is high in both cases.

Breaking in a debugger stops at https://github.com/Tom94/tev/blob/master/src/main.cpp#L363 if that's of any help.
Unfortunately I'm not being able to build v1.17 myself as it complains about:

Fetched in submodule path 'dependencies/nanogui', but it did not contain 3a744201965d9191052b33f845026b5d68c79007. Direct fetching of that commit failed.

So git bisect grinds to a halt :/

Ouch, I must have force pushed onto the submodule at some point… good lesson to never do that again in the future. Sorry about breaking bisect.
In any case: thanks for reporting this! I’m currently abroad without access to a Windows machine, so it’ll be a couple of days until I can have a closer look.
Breaking on the sleep call seems correct FWIW (and should mean that that thread isn’t responsible for the 100% CPU usage… unless something is seriously wrong with sleep_for)

For future reference:
The 'missing' commit is actually related to swapping out the underlying nanogui repository. 3a74420 is the head of
https://github.com/Tom94/nanogui/tree/tev. Git doesn't realize changes in .gitmodules, you have to manually delete the (initialized) submodule from the .git/config, the .git/modules/ folder and delete the dependencies/nanogui folder. Then, a git submodule update --init --recursive will reclone the correct 'old' nanogui.
I did manage to get v1.17 to build and also experience the same issue there with my own build binary (remember, not with yours). Oddly enough, a colleague can replicate the problem with v1.19, when it is started through our application, but not when he starts it from explorer / cmd.
Profiling
Profiling the CPU usage on multiple commits always returns this as being the hot path:

It seems to point to code that hasn't changed in tev for 4 years, and also the underlying nanogui replicates that behaviour with the old and new version.
I see some locking calls in the constructor of istringstream, possibly connected to locales, just like here. Still puzzled what's the cause for this and why it would occur so sporadically.

Wow, thanks a bunch for the detailed investigation!
My best guess is a regression in the MSVC runtime and/or STL that wasn't there yet when I built the v1.17 release.
In any case -- I'm not sure we need to figure this out to solve the problem. Does it go away when you replace the istringstream dance with C++17's std::from_chars (https://en.cppreference.com/w/cpp/utility/from_chars)?
Scalar value = 0;
std::string str = TextBox::value();
std::from_chars(str.data(), str.data()+str.size(), value);
return value;

If so, I wouldn't mind updating tev's nanogui fork with this change/fix. The latext tev already requires C++20 to compile, after all.

Yes the below snippet made this part significantly more performant. I'm additionally avoiding the string copy (alloc + dealloc). It might be useful to push this upstream to Wenzel, in case he is willing to accept the C++17 requirement.
Scalar value = 0;
const std::string& str = TextBox::value();
std::from_chars(str.data(), str.data()+str.size(), value);
return value;

But the overall issue persists and the hotpath is pointing at the sleep_for. Apparently it internally uses sleep_until with some clock::now() 🔥 and + arithmetic involved.
So I started looking at the value of the fpsBox. I played with your v1.19 binary and found an odd threshold that triggers the CPU load: with a value of <14 the CPU usage stays 0, and with 15 and above it uses a full core continuously. 😲
Then I updated my VS (+ all SDKs) to the newest version. Issue persists and I could replicate the 14/15 threshold with my own build (master branch btw). It does not happen with the v1.17 binary.
Profiling
Again some profiling, this time I recorded the timings between continuous hits on the breakpoint at the sleep_for.

It seems like when the value is 15 and above, the thread never actually sleeps (<1ms between consecutive triggers). With 14 it at least sleeps for some 140ms (should be 72, but there might be debugger overhead).
The value that is fed to sleep_for is correct. I don't know about the type, is it maybe selecting a wrong overload. Either way something rounds to zero somewhere...

Hmmm... I'm not sure whether ditching istringstream is worth it if it doesn't solve some underlying issue. The main advantage of istringstream is that it gracefully ignores leading whitespace -- plus, being locale-aware might be desired for nanogui? Perhaps worth asking in any case. IIRC, the latest nanogui version already requires C++17, so no problem on that front.
The timing issue with sleep_for is worrying to say the least. Thanks again for the continued digging! I'll try to reproduce it when I'm on my Windows machine. If nothing else helps, we could resort to waiting for a condition variable while playback is paused, rather than spinning idly... but it'd be quite unsatisfying to just work around the problem like that. :p

Unfortunately I'm unable to reproduce the problem on my Windows machine.
Regardless, in the hopes that rounding is to be blamed I experimentally changed the sleep interval to be based on an integer amount of microseconds, rather than floating point seconds. Could you try the above branch (fix-high-cpu-usage) and report back whether it makes a difference?

I'm experiencing the exact same issue, and unfortunately fix-high-cpu-usage does not seem to help.
For me the issue only happened over IPC when the process that sends data over the TCP socket is the same one that started tev. If I start tev myself and then connect to it over TCP everything works fine.
Adding a delay between spawning tev and sending the CreateImage command also turns out to fix the issue, so there is probably a race condition there.

That's a good datapoint; thanks for sharing!
Would it be possible to get a minimal reproducing example (e.g. single cpp source file w/o dependencies) that I can compile locally and debug with?

@KarelPeeters I'm somewhat happy to hear that the problem did non only affect me. This bug was driving me crazy and I started to question many things. Thanks for also looking into it.
@Tom94 On my end, building the fix-high-cpu-usage branch seems to solve the problem. Both, when starting from explorer and as a child process for IPC connection. I did profile the breakpoint hits inside the play loop and it correctly triggered in the set FPS frequency (with 1-2 ms debugger delay).
Unfortunately I can't provide a minimal example from my end (way to many dependencies). But if you eg. build something with Python I can offer to test if it does trigger the bug on my system.

I can reproduce the issue from both python and rust by starting tev and then immediately connecting to it, for example in Python:
import subprocess
import time
import numpy as np
from ipc import TevIpc

print("Starting tev")
subprocess.Popen("cmake-build-release\\tev.exe")

# Adding this solves the issue
# time.sleep(1)

print("Connecting to tev")
with TevIpc() as tev:
    channels = ["R", "G", "B"]
    tev.create_image("test", 32, 32, channels)
    tev.update_image("test", np.random.rand(8, 8, 3), channels)

# keep this process alive
while True:
    time.sleep(1000)

This reliably causes tev to get stuck with a full thread worth of CPU usage, with not even the initially empty image shown. I'm using the release build of fix-high-cpu, the debug build appears to work fine.
I can investigate some more later today if necessary, but first I have to figure out how to get this to happen inside of a debugger or profiler.

Did some quick tests with @KarelPeeters script and summarize my results with the table below. For me, adding the delay does not change any behaviour, which is consistent with my earlier findings that it is unrelated to IPC (at least on my machine).

Version
Starting from explorer
Subprocess + IPC
Subprocess + IPC with delay

v1.19
🔥
🔥
🔥

v1.20
✔
✔
✔

fix-high-cpu-usage Debug
✔
✔
✔

fix-high-cpu-usage Release
✔
✔
✔

Interestingly enough, I redownloaded the v1.19 binary, and while it still produces the high CPU load, the fps threshold at which it starts to work normally again changed from 14/15 to 7/8. Why v1.20 does not exhibit the bug is beyond me.
Using integer microseconds (in fix-high-cpu-usage) seems to do the trick for me. It probably uses a different implementation in the MSVC++ std lib than the floating point seconds 'path'. I suspect @KarelPeeters to have a different version / MSVC++ Redistributable than me. That still does not explain why it is connected to IPC for him and why he can disable the bug by introducing this delay.
@KarelPeeters When testing your script, I did notice sometimes that a svhost.exe (responsible for inter-machine network communication) was causing a one core CPU load instead of tev.exe. But I couldn't pinpoint when exactly it happened and when not. Are you using Resource Monitor to monitor CPU usage and looking at the exact process list? If you were to just look at Task Manager CPU graph, you might be able to mistake 'your' (IPC) bug with 'my' 'sleep_for' bug. We will know more once you can also reproduce it inside a debugger.

I can also not reproduce the issue, both on master and fig-high-cpu-usage.
I hit the merge button in any case, but will re-open the issue since things don't seem to be resolved on @KarelPeeters end.

I (was) experiencing the same issue as @KarelPeeters, but it seems to not happen anymore on version 1.25 (Windows release binary).
Specifically, as long as a tev process was started, which was immediately followed by establishing of TCP connection and sending of CreateImage command, it resulted in the observed issue (no command(s) received, one core being stuck running at 100% utilization).
If a delay was applied after establishing of TCP connection and before sending of CreateImage command, everything worked fine.
Therefore the observable issue is that it was possible to establish a TCP connection with tev and send a CreateImage command before tev was "ready" to receive it. That is also why the delay applied in  @KarelPeeters example above (that is, delay after startup of the tev before establishing of TCP connection) has the same effect - it results in additional time for tev to initialize whatever it needs to receive commands via TCP.
I was able to replicate this issue on Windows release executable versions 1.18 to 1.24. Versions 1.17 and 1.25 work fine.
After a bit of digging with my colleague, we think that the cause may be Windows SDK, as the Ipc implementation did not fundamentally change over time (and it - among other things - interacts with the filesystem). The version of Windows SDK was changed in the CI explicitly between versions 1.17 and 1.18, and it could? have changed again between 1.24 and 1.25 under the hood of the current windows-2022-based CI build.

Errr... I can't even participate in the discussion because Tev refuses to start on my end.
$ tev spectrogram.png
SUCCESS  Initialized IPC, listening on <IP_ADDRESS>:14158
INFO     Launching with 8 bits of color and LDR display support.
SUCCESS  Loaded C:\spectrogram.png via STBI after 0.078 seconds.
GLFW error 65543: WGL: A forward compatible OpenGL context requested but WGL_ARB_create_context is unavailable
ERROR    Uncaught exception: Could not create an OpenGL 3.2 context!

It seems you should mention hardware requirements to meet.


Code of main.gd is too big - use objects as funcs

Code of main.gd is too big and it hard to track changes in it - use objects as funcs.
This what I mean by "use objects as funcs":
Now we have func jump() in main.gd this funs have args: path_to_scene:String, node_name:String, dialog_name:String, change:= true, state:= 0, from_save:= false. So we need change jump() in to jump.gd like this:
#jump.gd
extends Object

func _init(path_to_scene:String, node_name:String, dialog_name:String, change:= true, state:= 0, from_save:= false)->void:
     # jump()

And then use it in main.gd:
#main.gd
...
func jump(path_to_scene:String, node_name:String, dialog_name:String, change:= true, state:= 0, from_save:= false) -> void:
    var jump = load(path/to/jump.gd)
    jump.new(path_to_scene, node_name, dialog_nam, change, state, from_save)
...

Is done for define(), savefile(), loadfile() using static functions in resources-save branch

Now I think that it should be just as nodes in Rakugo.tscn - for safety reasons

it does not make sense for it to have a mailstone

I just realize that I can do better than splinting up main.gd to separated objects funcs.
I can split this to list of classes that next class always extends previous.
I only need to be smart in extending it.


StateMachine Component

I have a proposal, only half thought through, but I’d love to get some feedback.
StateMachine Component
Currently, in React Automata we wrap components with withStatechart to connect them to an instance of the state chart.
Statechart → wrapper → Component

As an experiment, I wonder if it might be easier if this extra level of abstraction could be removed.
Statechart → StateMachineComponent

While inheritance over composition is generally not a best practice, I think there is a case to make for creating an abstract React class for state machine management.
import { Machine } from 'xstate'

const StateMachine = Machine({ ... })

class SomeComponent extends StateMachineComponent<Props, States> {
  state = {}
  stateMachine = StateMachine
}

A StateMachineComponent might include:

additional lifecycle methods like componentWillTransition & componentDidTransition
a built in this.transition that acts like this.setState but targets this.stateMachine
methods that get called by actions, as they do with a wrapped withStatechart

Note that this would also resolve the issue of reusable state machines in #59.

An example of how using a StateComponent creates a significant simplification over withStatechart.
https://codesandbox.io/s/3yo97l1xrp
class StateMachineComponent extends React.Component {
  _currentState

  _handleActions = (actionList: string | string[]) => {
    if (actionList) {
      if (Array.isArray(actionList)) {
        for (const action of actionList) {
          if (this[action]) {
            this[action]()
          }
        }
      }
    }
  }

  transition(event) {
    const value = this._currentState
      ? this._currentState.value
      : this.stateMachine.initialStateValue
    const nextState = this.stateMachine.transition(value, event)
    this._currentState = nextState
    this._handleActions(nextState.actions)

    if (this.value !== nextState.value) {
      this.value = nextState.value
    }
  }
}

Thank you very much for your proposal, and for building a concrete example @ShMcK.
There are some scenarios where inheritance seems to simplify the code, but it should always be avoided as there are alternative approeaches that we can apply so I'm closing this for now.


[policy] Include starter implementations for the first X exercises so that new-to-the-language practitioners are driven by test failures, not compilation errors.

I am new to Java but have prior programming experience. The problems I have completed so far on the Java track either have either come with a nearly blank starter implementation, or no starter implementation at all.
For my code to be compilable (and therefore testable), I have had to reverse engineer all the tests at once to deduce method signatures and 3rd party dependencies, even if most tests are ignored to begin with. It was quite challenging to infer some of the return values given that I am a beginner in Java.
It would be really helpful if the starter implementations contain sufficient information to be compilable, i.e. they contain required methods with appropriate signatures and dummy return values, and import statements. This way the focus can be on writing code that passes one test at a time.

First, thank you for taking the time to provide this feedback, @rstockbridge.
This topic has also come up in other language tracks: exercism/xrust#117, exercism/xhaskell#181.  There's been a mix of opinions.
In exercism/xrust#117:
@IanWhitney said

For me, I like not having the signature. I'm entirely new to Rust and static typing and I've found that I like puzzling out what I have to implement by looking at the tests.

@kytrinyx said:

I'm also on the fence. In the Go track we've provided stub files early on, and then we phase them out after the first few. For the most part reverse engineering function signatures doesn't seem to be difficult in Go ... I can't speak to how much busywork that adds here.

...
A proposal incorporating your request with those observations:

the first ~10 exercises, we provide complete stubs.

the subsequent ~10 exercises, we stub a portion of the interface and comment-out the bodies of the tests that cover the other part.
After that, include no starter code.

that said, if there are "interesting" interface aspects, mention these in the HINT.md file (gets merged into the README.md for the exercise).

Thoughts?

This proposal sounds excellent 😄 - a good balance of helping beginners get started while still leaving some things to be figured out. Obviously it makes most sense to implement this after #142 is complete.

We've been using the new GitHub Projects feature to express priorities: https://github.com/exercism/xjava/projects/2
I've added this to our "Epics" column... once we determine the (re)ordering of the track, we'll break that down into individual user stories according to the proposal.

Awesome, sounds good!

I believe this qualifies as a "policy" — a decision that affects future work.  Labeled accordingly.

A "policy" is not a decision set-in-stone.  It's a direction chosen at a point in time with the information/thinking on-hand.  All decisions should be challenged.  To make a meaningful contribution, please include a new perspective and argue how it mixes in the values expressed and changes the decision.

@exercism/java so...... how far into the track should we provide these starters?

I think maybe provide complete starter implementations for the first five exercises? That way the exercises are still relatively easy when people have to start doing it all themselves.
And maybe for the next 10 exercises we provide incomplete starter implementations and comment out the bodies of the tests that cover the other parts like you suggested. But we should include a HINT.md or something to make it obvious that they need to uncomment that code.
After that we could provide no starter implementation. Apart from that there are some exercises, list-ops for example, where I think the most difficult part of the exercise is just figuring out what the signatures of the methods are meant to be, which doesn't seem quite right. So maybe provide incomplete starter implemetation in those cases?

@FridaTveit Your suggestions are excellent - seems like the right balance of getting people started but also requiring them to become more independent.

Agreed!

I'm going to close this issue now we have a centralized policies document. That document links back to this issue if we ever need to pull it back up for reevaluation!


Add batching to mutations

Atomicity can be important for some applications. Since batches has additional limitations to be used successfully, we should provide an alternative path for mutations that can be batched.
Batched statements have the following restrictions:
No light weight transactions
No mix of batched and unbatched statements
Avoid the word 'batch' as it could be unclear of the desired use case
No range queries
# Atomic directives override the serial execution order of mutations and allow
# mutations to be executed in an all-or-nothing manner. IfExists, IfNotExists,
# and ranged partition updates and deletes are forbidden.
directive @atomic

mutation @atomic {
  insertCart(value:{cartId: "..."}) {
    applied
  }
  insertUser(value:{userId: "..."}) {
    applied
  }
}

Alternative we can redefine all functions with an atomic_ prefix that only allow sane use of atomic statements. This would be safer but adds a lot of extra definitions to the schema.

I like the idea of the directive instead of the prefix, keeping the schema simple would be great. 👍

I think having @atomic directive at MUTATION location makes sense from the design perspective, it's clean and unintrusive.
I'll give it a try to see how graphql java can intercept it.

In GraphQL java, it's possible to obtain the parent operation and directive using:
environment.getOperationDefinition().getDirectives().get(0).getName() // "atomic"
environment.getOperationDefinition().getSelectionSet().getSelections() // all mutations

Let's see how hard it will be to refactor existing data fetchers to handle it.


Cannot find any devices for Logitech G502 Proteus Spectrum

When I start my piper0.3-1 and my G502 is pluggedin I get devices not found error message.

You need Linux 5.2 for Logitech wireless devices with the newest release.
See https://github.com/libratbag/libratbag/issues/805

Hello, I've got the same problem:
uname -r
5.2.11-arch1-1-ARCH

lsusb
Bus 001 Device 003: ID 046d:c332 Logitech, Inc. G502 Proteus Spectrum Optical Mouse

ratbagctl list
No devices available.

Can you run the daemon with verbosity and share the logs?
Disable the ratbagd service and
sudo ratbagd --verbose=raw

staeffn% sudo systemctl stop ratbagd.service

staeffn% sudo ratbagd --verbose=raw
ratbag debug: New device: Logitech Gaming Mouse G502
ratbag debug: Using data directory '/usr/share/libratbag'
ratbag debug: device assigned driver hidpp20
ratbag debug: hidraw info: bus 0x03 vendor 0x46d product 0xffffc332
ratbag debug: Logitech Gaming Mouse G502 is device '/dev/hidraw2'.
ratbag debug: Parsing HID report descriptor
ratbag debug: Parsing HID report descriptor
ratbag debug: New device: Microsoft Microsoft® SiderWinderTM X4 Keyboard
ratbag debug: Using data directory '/usr/share/libratbag'
ratbag debug: No data file found for 045e:0768
ratbag debug: New device: Microsoft Microsoft® SiderWinderTM X4 Keyboard
ratbag debug: Using data directory '/usr/share/libratbag'
ratbag debug: No data file found for 045e:0768
ratbag debug: New device: C-Media Electronics Inc.       USB PnP Sound Device
ratbag debug: Using data directory '/usr/share/libratbag'
ratbag debug: No data file found for 0d8c:013c

It seems to find something, when I run ratbagctl list again it still says no devices though.
ratbagctl list
No devices available.

I had a Proteus Spectrum and was having this sort of annoying problem, to the point where I just returned it.
People are saying to use 5.2 kernel but I found far more consistent and positive results reverting to the LTS 4.19 kernel.

Just tried it with fedora, kernel:
5.2.11-200.fc30.x86_64
Same result, no device detected.
sudo ratbagd --verbose=raw
ratbag debug: New device: Logitech Gaming Mouse G502
ratbag debug: Using data directory '/usr/share/libratbag'
ratbag debug: device assigned driver hidpp20
ratbag debug: hidraw info: bus 0x03 vendor 0x46d product 0xffffc332
ratbag debug: Logitech Gaming Mouse G502 is device '/dev/hidraw3'.
ratbag debug: Parsing HID report descriptor
ratbag debug: Parsing HID report descriptor
ratbag debug: New device: Microsoft Microsoft® SiderWinderTM X4 Keyboard
ratbag debug: Using data directory '/usr/share/libratbag'
ratbag debug: No data file found for 045e:0768
ratbag debug: New device: Microsoft Microsoft® SiderWinderTM X4 Keyboard
ratbag debug: Using data directory '/usr/share/libratbag'
ratbag debug: No data file found for 045e:0768
ratbag debug: New device: C-Media Electronics Inc.       USB PnP Sound Device
ratbag debug: Using data directory '/usr/share/libratbag'
ratbag debug: No data file found for 0d8c:013c

ratbagctl list
No devices available.

@staeffn can you try using a 4.19 kernel?

uname -r
4.19.16-200.fc28.x86_64

ratbagctl list
cheering-viscacha:   Logitech Gaming Mouse G502

the 4.19 kernel works, did they change smth with the newer kernels?

Which version of libratbag are you running?

libratbag-ratbagd.x86_64                       0.10-1.fc30

What? Weren't you running arch? That seems like a fedora package.
Either way, that version should work.
Are you running wired or wireless (sorry, I can't keep track of all G502 models :sweat_smile:)? I think that might be a bug I introduced in https://github.com/torvalds/linux/commit/27fc32fd9417968a459d43d9a7c50fd423d53eb9, sorry about that. I think a fix for this is already scheduled.

That's the fedora installation right now. If it's just a bug I'll probably just sit it out until it gets fixed. Thanks a lot for your efforts!
And it's a wired g502 spectrum, I think there's also a wireless version, not entirely sure though.

I think there's also a wireless version, not entirely sure though.

There are like 3 or 4 versions of the G502 :upside_down_face:.
I am pretty sure that behavior is happening because your mouse causes the kernel driver to error out and so the device isn't exported to userspace. This is a bug I introduced in the kernel, I am really sorry about that.

I have the same issue with my Logitech G203 on openSUSE Tumbleweed (kernel 5.2.11)

Are you able to downgrade your kernel? Does your distribution offer a LTS kernel perhaps?

Are you able to downgrade your kernel? Does your distribution offer a LTS kernel perhaps?

Probably yes, but I prefer to wait the fix. It's not so urgent... I can live with the mouse with its default settings :-)

Okay, and sorry about that. You need this https://github.com/torvalds/linux/commit/addf3382c47c033e579c9c88f18e36c4e75d806a, which should be present from v5.3-rc6.

You need Linux 5.2 for Logitech wireless devices with the newest release.


Missing donate button

Thanks for a great tool. I just test it in docker.. and I already love it, so I am asking.. where is the donate button? I can't donate much, but at least something. Also every penny counts :-)

Thank you so much!
It's OK. I enjoy to develop applications that everyone love it. Make the world a little bit better.
If you want to support my work, share with your friends and to the world. And don't forget to give me a star on Github. ⭐🐻

Since a few of users would like to buy me a coffee, I eventually added Sponsor Button.
Thank you for your support!


Feat: Pokemon Searching

Players should be able to search by Type in the teambuilder. Additionally, the should be able to search by move, generation, and tags (mythical, legendary, etc)
Note: When searching by Frustration or Return, treat it as searching for Shadow and Shadow Eligible.

[ ] Search by type
[ ] Search by Move
[ ] Search by Gen
[ ] Search by Tag
[ ] Transform Frustration&Return


Enable proxy for openstack

Closes #4040

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "enable-proxy-for-openstack" git@github.com:michalmedvecky/machine.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354363272
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.


Posts in events

@onurakpolat @xla could you please do a quick review?

@nilsen340 please more context into description next time ;)
Other than that :+1:

@onurakpolat I've fixed what we discussed earlier and also added user parsing on the event fetch. This is what made events sometimes miss users, as if events were fetched before users there would be no user to add to the event object. Feel free to have another look at it.

:+1:


Incorrect inclusion of javax/jakarta validation annotations with groups property set

The javax/jakarta annotations contain a groups property that can be used to enable different combinations of validation on a model depending on which group is currently active - https://jakarta.ee/learn/docs/jakartaee-tutorial/current/beanvalidation/bean-validation-advanced/bean-validation-advanced.html#_grouping_constraints.
When executed against a model, swagger-core currently treats any of the supported javax/jakarta annotations as applying a constraint to the schema, even where the annotated field/attribute specifies groups and is therefore is not mandatory on all requests. By default, swagger-core should only set fields as mandatory/constrained based on annotations where no groups are specified, but provide a way of the end-user adding other validation groups into the constraints where they want to treat certain groups as always being enabled.
Replication Steps
        @Test
        public void shouldIncludeOnlyNonGroupedJakartaValidatedFieldsAsMandatoryByDefault() {
            ResolvedSchema schema = ModelConverters.getInstance(false).resolveAsResolvedSchema(new AnnotatedType().type(CustomClass.class));
            String expectedJson = "{\"schema\":{\"required\":[\"nonGroupValidatedField\"],\"type\":\"object\",\"properties\":{\"nonGroupValidatedField\":{\"type\":\"string\"},\"singleGroupValidatedField\":{\"type\":\"integer\",\"format\":\"int32\"},\"multipleGroupValidatedField\":{\"type\":\"number\"},\"otherGroupValidatedField\":{\"type\":\"string\"},\"singleGroupValidatedField2\":{\"type\":\"string\"}}},\"referencedSchemas\":{\"CustomClass\":{\"required\":[\"nonGroupValidatedField\"],\"type\":\"object\",\"properties\":{\"nonGroupValidatedField\":{\"type\":\"string\"},\"singleGroupValidatedField\":{\"type\":\"integer\",\"format\":\"int32\"},\"multipleGroupValidatedField\":{\"type\":\"number\"},\"otherGroupValidatedField\":{\"type\":\"string\"},\"singleGroupValidatedField2\":{\"type\":\"string\"}}}}}";
            SerializationMatchers.assertEqualsToJson(schema, expectedJson);
        }

        private interface ValidationGroup {

        }

        private interface OtherValidationGroup {

        }

        private static class CustomClass {

            @NotNull
            public String nonGroupValidatedField;

            @Min(value = 1, groups = ValidationGroup.class)
            public Integer singleGroupValidatedField;

            @DecimalMin(value = "1.0", groups = {ValidationGroup.class, OtherValidationGroup.class})
            public BigDecimal multipleGroupValidatedField;

            @Pattern(regexp = ".*", groups = OtherValidationGroup.class)
            public String otherGroupValidatedField;

            @NotEmpty(groups = ValidationGroup.class)
            public String singleGroupValidatedField2;
        }

The above replicate a validator being run in default mode, e.g. Validation.buildDefaultValidatorFactory().getValidator().validate(new CustomClass());, which is the default way that frameworks such as Spring invoke validators. Users using something similar to
Validation.buildDefaultValidatorFactory().getValidator().validate(new CustomClass(), ValidationGroup.class); would add the annotations with ValidationGroup in the groups property into the enforced validation.

There is already a PR for this issue: https://github.com/swagger-api/swagger-core/pull/4797


Compatible with 1.14?

Hi! Is this compatible with 1.14? :)
Thanks! :D

It should be compatible with 1.14.  If it does not work on 1.14, I will update it to be supported!
I will do some testing on this very soon.  I'm currently busy with college work, so I can't confirm if it really works with 1.14 as of now.  I will keep you updated!
~Simon

I'm seeing on bStats that many people are using 1.14 on their servers.  I am currently working on bettering the plugin, so I will put official 1.14-tested, updated plugin in the coming days!

1.14 support is confirmed in GetMeHome v2.0.0!  Let me know how it works out.


Updated logger to support MVVMCross 8

Hi I've attempted to update the project to MVVMCross 8 so it can be used with the latest version.
Also mentioned in bug:  #524
The update to the plugin is straight forward, but I can't seem to get the iOS example project running. I did run against a different project and it was able to starts where as before it was throwing errors.
As for backwards compatibility, it will not break if you use it targeting mvx 7, but it will not use the IMvxLog.

Hi,
I would like to ask if this change will be available in a future either stable or pre release version of nuget package?
Thanks.

@philvbprogrammer Thanks for approving my changes, but for some reason the PR got closed. Can you merge this and create a new release of the package?

but for some reason the PR got closed.

From over here it looks like it got closed because you closed it ;)
(may have been accidental, I guess?)

Can you merge this and create a new release of the package?

In principle it would be great to get this into master (and a new release), but right now I can see two hurdles:

There are conflicts in BLE.Client. Those should be fixed first by either merging the current master into your branch or (maybe preferable) rebasing your branch on current master.
You mention in the original comment that the iOS sample is not running. This should be fixed as well. What exactly happens when the sample starts up?

Once both of these have been dealt with, this can hopefully be merged.

@janusw thanks for the reply, I've resolved the merge conflicts.
I will have a look at the iOS and MacOs Samples soon.

I've confirmed that the sample app starts and I scan for devices on Android, iOS, UWP and macOS.
Let me know if there is anything else.

@janusw thanks for the reply, I've resolved the merge conflicts.

I've confirmed that the sample app starts and I scan for devices on Android, iOS, UWP and macOS.

Awesome, thanks! Please give me a few days to have a look at this ...

Thanks for the contribution!

@frankfolsche One belated review item that I missed earlier: I just noticed that the MvvmCross version in MvvmCross.Plugins.BLE.UWP was apparently not updated. Could you maybe take care of that in a follow-up PR?

@frankfolsche One belated review item that I missed earlier: I just noticed that the MvvmCross version in MvvmCross.Plugins.BLE.UWP was apparently not updated. Could you maybe take care of that in a follow-up PR?

Great news that it's merged I've created a new PR for UWP:
https://github.com/xabre/xamarin-bluetooth-le/pull/611


Add support for openocd on stm32g0 and stm32g4 targets

Is your enhancement proposal related to a problem? Please describe.
stm32g0 and stm32g4 soc support has recently been added on openocd.
openocd support can now be enabled on these targets when flashing  debugging
Describe the solution you'd like
Identify openocd SHA1 that enable G4/G0 support.
Enable openocd support on zephyr G4 and G0 supported platforms.
Update board docs
Check everything is fine flash/debug
Request needed change on https://github.com/zephyrproject-rtos/openocd
Close related issues (https://github.com/zephyrproject-rtos/openocd/pull/11)
Additional context
Will avoid need to update pyocd local version to support G4 packages.

Actually, I can see the PR https://github.com/zephyrproject-rtos/openocd/pull/11
for G4 but no G0 support

@FRASTM
This is on openocd main repo: http://openocd.zylin.com/#/c/4807/
zephyrproject-rtos/openocd is a fork that needs to be updated

To install and use your local openocd:

install tools needed to compile OpenOCD
sudo apt-get install git autoconf libtool make pkg-config libusb-1.0-0 libusb-1.0-0-dev

Download the latest source code for OpenOCD with
git clone http://openocd.zylin.com/openocd

Change into the code directory and run the bootstrapper with:
cd openocd-code
./bootstrap

Run make and sudo make install

You are now ready to Flash your board with
west flash --openocd /usr/local/bin/openocd


lock key with : character

Redisson version
3.17.4
code
RLock lock = redissonClient.getLock("xxxx:xxxxx");
throw exception
WRONGTYPE Operation against a key holding the wrong kind of value. channel: [xxxx] command: (EVAL), promise: java.util.concurrent.CompletableFuture@4518f29f[Not completed], params: [if (redis.call('exists', KEYS[1]) == 0) then redis.call('hincrby', KEYS[1], ARGV[2], 1); redis.call(..., 1, xxxx, 20000, f3cd76a5-06cd-4c5c-8e85-41106bc62f8f:334]
I can't modify the key, How can I resolve this issue?

Maybe the key of lock is exist.
Change another key or delete the key in redis.


How to pass data dynamically to charts

Hey, guys, this is rather a question than an issue. Can you advise how to pass data to the charts? Currently all the data is hardcoded and I can't find a way to pass the data to the charts.js file.
Thanks.

Hello @finkbg ,
As you can see in src/views/Dashboard/Dashboard.jsx, line 29 for example we have the code:
<Line data={dashboardPanelChart.data} options={dashboardPanelChart.options}/>

which is kind of dynamically. And then, if you go to src/variables/charts.jsx, you will find how we create the dashboardPanelChart data (line 113). To make it more dynamically you would have (i assume) to change line 125 (the labels - i am guessing you want to make them dynamically) and then line 140 (the data - i am guessing you want to make the data dynamically for the labels).
Hope that information helps you. Please let us know if we can help you with anything else.
Best,
Manu

Hey @EINazare,
Thanks for the suggestion. I am doing this already. The question here is how do I use some props (for example, API url and user id/token) to fetch some data through a REST API and feed it to the charts. I know I have to fetch the data and somehow pass it to charts.js, I just can't find a way to do it.
Thanks.

Hello @finkbg ,
Is any of these links useful for you:

softwareengineering
stackoverflow

I haven't worked with REST API, not sure what it is, but i think you might need to make an ajax call.
Anyway, the second link, i think is exactly what you are looking for.
Hope this helps you. Let me know if i can help you with anything else.
Best,
Manu

@EINazare,
First, thank you for putting this together - I have access modified line 113 to allow me to pass parameters into the .data function, however, there is no way for me to do this without knowing the canvas object. The only way i can think to get around this is to make this a class with some state modifier function then have a .data function to pass to the Line graph that actually draws the graph. What are your thoughts? do you have an easier way? Here is my current code:
`export const DashboardPanelChart = {
data: (canvas, labels, names, dataList) => {
const ctx = canvas.getContext("2d");
var chartColor = "#FFFFFF"; // eslint-disable-line no-shadow
var gradientStroke = ctx.createLinearGradient(500, 0, 100, 0);
gradientStroke.addColorStop(0, '#80b6f4');
gradientStroke.addColorStop(1, chartColor);
var gradientFill = ctx.createLinearGradient(0, 200, 0, 50);
gradientFill.addColorStop(0, "rgba(128, 182, 244, 0)");
gradientFill.addColorStop(1, "rgba(255, 255, 255, 0.14)");
return {
  labels,
  datasets: dataList.map((data, i) => {
    label: names[i];
    borderColor: chartColor;
    pointBorderColor: chartColor;
    pointBackgroundColor: "#2c2c2c";
    pointHoverBackgroundColor: "#2c2c2c";
    pointHoverBorderColor: chartColor;
    pointBorderWidth: 1;
    pointHoverRadius: 7;
    pointHoverBorderWidth: 2;
    pointRadius: 5;
    fill: true;
    backgroundColor: gradientFill;
    borderWidth: 2;
    data;
  }
  )
};

},`

Hi, @finkbg where you able to solve this? I'm looking for the exact same thing.

Hey @EINazare,
Thanks for the suggestion. I am doing this already. The question here is how do I use some props (for example, API url and user id/token) to fetch some data through a REST API and feed it to the charts. I know I have to fetch the data and somehow pass it to charts.js, I just can't find a way to do it.
Thanks.


Error Attribute Libcamera

Can't run example code (tuning_file.py), because libcamera give an error
I try to use the camera to take screenshots but I get an attribute error.
This didn't happen before, after several days without using the camera now this error has come out.
Console output: AttributeError: type object 'libcamera._libcamera.ColorSpace' has no attribute 'Jpeg'
I'm using RPI 4 and camera pi noir v2.1. I try this code in Thonny.

Hi, the libcamera API has changed so you need to update Picamera2 to match. Updating to the latest version (currently 0.3.3) should fix this.
Moving forward, we're telling people that they can install Picamera2 using sudo apt install -y python3-picamera2. You will need to uninstall the pip version first, however. Then you can update your software with sudo apt update and sudo apt upgrade and you'll always get compatible versions of libcamera and Picamera2.

whats the command to uninstall the pip version?

I think it's pip3 uninstall picamera2

thank you soo much it worked

Great! I think I'll close this one now - please feel free to post a new issue if anything else comes up. Thanks!

@davidplowman

Hi, the libcamera API has changed so you need to update Picamera2 to match. Updating to the latest version (currently 0.3.3) should fix this.
Moving forward, we're telling people that they can install Picamera2 using sudo apt install -y python3-picamera2. You will need to uninstall the pip version first, however. Then you can update your software with sudo apt update and sudo apt upgrade and you'll always get compatible versions of libcamera and Picamera2.

Hello,
sudo apt install -y python3-picamera2 gives me the following message:
rhinosd@raspberrypi:~ $ sudo apt install -y python3-picamera2
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-picamera2 is already the newest version (0.3.3-1).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
python3-picamera2 : Depends: python3-libcamera but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Obviously the next thing I should do is install python3-libcamera. However, the solution to another issue I have with my Arducam conflicts with doing this. Here is a link that outlines what I am experiencing: https://forum.arducam.com/t/how-is-it-possible-to-get-autofocus-working-along-with-picamera2-for-imx519/3460/6
"If you have python3-libcamera installed, this will cause you to use the official libcamera, which has no focus control"
They explicitly mention that to not use install python3-libcamera. How can I use PiCamera2, Arducam, and implement their functionalities via Python? Perhaps it's out of your purview as it may be a question for Arducam. However, I feel as though more synergy between PiCamera2 and Arducam is in order. Could that be something that is addressed with them?

Hi, yes I think it's a question for Arducam, really. Probably the best solution would be for them to implement autofocus properly as part of the libcamera framework, but obviously there would be more work involved in this.


How to Set/Change layer/model name

Hello,
how can I set the name of Sequential model, or how can I change the layer name?
Let's say I have this model:
def create_base_network(input_dim):
    model = Sequential(name="base")
    model.add(Convolution2D(32, 3, 3, border_mode='valid', name='conv1_1',
                            input_shape=input_dim))
    model.add(BatchNormalization(mode=2, axis=-1))
    model.add(Activation('relu'))
    model.add(Convolution2D(32, 3, 3, border_mode='valid', name='conv1_2'))
    model.add(BatchNormalization(mode=2, axis=-1))
    model.add(Activation('relu'))
    return model

Then I create siamese network, with upper model as core:
input_a = Input(shape=input_dim)
input_b = Input(shape=input_dim)

base_network = create_base_network(input_dim)

processed_a = base_network(input_a)
processed_b = base_network(input_b)

distance = Lambda(euclidean_distance, output_shape=eucl_dist_output_shape)([processed_a, processed_b])

model = Model(input=[input_a, input_b], output=distance)

Then I save the model, and If I try to load the model and get the layer by name "base", there's no layer. There's only "sequential_1".
So my question is, where should I put the name="base" attribute if I want to get the "core" layer?
Or is there any way to rename the layer? I tried model.layers[2].name = "my_desired_name".
But If I save the model and then load again, there's error with loading,
I'd be glad for any help or advice how to solve this.
Thanks anyway!

I would like to know about this too. I realized you can't load two models and form a neural network, as Keras errors out because the two models have the same name.

Hi, did you figure it out?

how to name model ?

It is easy! Just rename the model when you load model, like this
model_sf = load_my_model('conv-net2.h5', 'conv-net2.json')
model_sf.name = 'model_1'  # "model_1 : rename as you like"

@Narts Did you find any solution?!

I would also be interested in a solution, as this still seems to be an issue. While the model summary shows me model names (used as layers in a bigger model) correctly before saving the model, the names of the layers that have a Sequential model underlying are not preserved when saving and re-loading. The names of layers having other models (not Sequential) underlying, however, are preserved.

I used the following code and it is working for me.
Model
I1 = Input(shape=(304, 304, 3))
model1 = ResNet50(weights='imagenet', include_top= False, input_tensor= I1, pooling=None)
model1.layers.pop()
model1.outputs = [model1.layers[-1].output]
model1.layers[-1].outbound_nodes = []
output1 = Model(inputs=I1, outputs=[model1.get_layer('activation_49').output])
I2 = Input(shape=(304, 304, 3))
model2 = ResNet50(weights='imagenet', include_top= False, input_tensor= I2, pooling=None)
for layer in model2.layers:
layer.name = layer.name + str("_2")
model2.layers.pop()
model2.outputs = [model2.layers[-1].output]
model2.layers[-1].outbound_nodes = []
output2 = Model(inputs=I2, outputs=[model2.get_layer('activation_98_2').output])
...

@shpavisaslan
I'm getting AttributeError: can't set attribute when trying to set layer.name
Any idea why?
tensorflow 1.4.0
keras 2.0.8-tf
win10

The following is a stupid way I used to implement Siamese CNN, but it works:
The trick is to give different name to the output layers and never name any other layers
def get_body(x_input=None, img_shape=(256, 128, 3), name=''):
assert x_input is not None
x = Conv2D(64, (10, 10),
activation='relu', input_shape=img_shape,
kernel_initializer=W_init,
kernel_regularizer=l2(2e-4))(x_input)
x = MaxPooling2D()(x)
......
x_fea = Flatten()(x)
x_output = Dense(4096,
activation="sigmoid",
name=name+'output_layer')(x_fea)
return x_output
left_head = Input(shape=img_shape)
left_body = get_body(x_input=left_head, img_shape=img_shape, name='left_')
right_head = Input(shape=img_shape)
right_body = get_body(x_input=right_head, img_shape=img_shape, name='right_')
body = Lambda(lambda x: K.abs(x[0] - x[1]))([left_body, right_body])
spirit = Dense(1, activation='sigmoid', bias_initializer=b_init)(body)
life = Model(inputs=[left_head, right_head], outputs=spirit)

You can add an identity layer and name it accordingly  e.g:
model.add(Lambda(lambda x: x, name="new_layer_name"))

The identity layer simply returns as output whatever went in.

Since your Lambda has no trainable parameters, you can name it any random thing and it will behave the same every time.
@Schlampig I didn't have to do this for every layer in the neural net, just the Lambdas. It would seem limiting or even harmful to not share parameters for two sides of a siamese network. I just added a random name to each Lambda layer since my Lambdas were just mathematical functions with no trainable parameters and would work the same regardless of identity.

@adizhol just found out how to resolve can't set attribute error - use
model._name = '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
Just checked, new model name is persisted after model serialization and deserialization, so it's quite a way to go.

Sequential(layers=[Add your layers here],name="set_name_here")

@adizhol just found out how to resolve can't set attribute error - use
model._name = '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
Just checked, new model name is persisted after model serialization and deserialization, so it's quite a way to go.

But isn't that the attribute names with a single leading underscore supposed to be internal to the class?
Albeit model._name is accessible from outside the class, maybe we need an idiomatic way to set the model name in any of functional API / subclassing / Sequential model.

+1 for a way to rename a layer (and model too, I guess): For a complex model constructed via functional API, the actual creation of the output layer might be buried somewhere in a reusable code block... I wanna override the name after the initial creation; not pass a name parameter down some potentially long chain of building functions.
As @carusyte mentioned, surely ._name is not intended as an external API: Maybe the .name attribute is readonly purely to prevent accidents?

How about model = Model(model.inputs, model.outputs, name='new name')?

I just posted a short guide in Medium. Hope you find it helpful.
https://nrasadi.medium.com/change-model-layer-name-in-tensorflow-keras-58771dd6bf1b


Should string literals be null terminated?

Original issue here: microsoft/win32metadata#937
This could make it easier to work with the ANSI/UTF8 APIs but wouldn't work for the more commonly used wide string APIs.

Would have to carefully handle types such as windows::Win32::UI::Input::KeyboardAndMouse::wszOVERSCORE

Yes, I'm not sure that's practical without the metadata indicating that certain strings are definitely null terminated or perhaps simply including the null terminator in the string literals for such strings in the win32 metadata. I guess I could transfer this issue to the win32 metadata repo as well. 😁

Agreed. Given the disparity of null terminated string constant behavior in the various languages, metadata needs to be a bit more explicit.


Isolated CANbus fix from faraz/long_planner commit 2228395f2fcb2b8b78…

…887fd1fcf7b46edd42b9f6

Can you explain what this change is accomplishing? Is it preventing a large queue of CAN messages in the transceiver by dropping CAN bus messages if they arrive at a rate faster than 50hz?
BTW Currently, we are using v2.1.0 of python-can. Recent changes to v2.2.0 have improved the Notifier class.
Also the CAN library suggests setting a rate to match the can bus baud rate. Each of the CAN implementations needs this in some way. The baud rate isn't being set currently.
CAN v2.2 has deprecated the 'socketcan_native' alias. We should switch the interface to 'socketcan' instead and test with v2.2.


Logname and timestamp format

Hi @greole,
could you change the naming of all automatically generated logs/errorlogs to start with "log._. If you currently get errorlogs from a shell scripts, the log name starts with the script name and it is easy to accidentally delete the script when you want to clean the logs. Also it would be nice to have the timestamp without the ":" between the hours, minutes and seconds for handling in Linux.

For newer version of obr we could read the log format string from .obr/config.


Remove dependency analysis from ci reports

Description
Removed the dependency analysis reports from CI as they are not useful (at the moment) and increase the file size of the ZIP from roughly 3MB to 200MB

Failure job with dependency analysis
https://github.com/bumble-tech/appyx/actions/runs/3312319396

Failure job without dependency analysis
https://github.com/bumble-tech/appyx/actions/runs/3312440201

Check list

[ ] I have updated CHANGELOG.md if required.
[ ] I have updated documentation if required.

One of the consequences of this is that downloading the report can actually take quite a while. It seems that github doesn't necessarily provide great bandwidth when downloading artifacts, so having them smaller is quite important.


[jest-haste-map] Does not parse docblock starting with /*

Unlike React Native packager, jest doesn't parse @providesModule when the docblock starts with just /* instead of /**.

Internal example https://fburl.com/480109335


Many new methods to deal with common Operator operations

Many new methods to deal with common things we found while implementing Operators.
This is almost certainly not perfect and i assume some signatures should change etc. but before it gets too big I'd like to get it in now so it can be improved upon later.

I think I forgot to remove the finalizer_name method which should not be needed anymore now.
This is a TODO for me.


apm not able to install (npm errors)

Tried on terminal as well its the same output.
apm is working on my laptop but not on my desktop.. the only difference is my desktop is wired and my laptop has a wifi, it makes no sense really. I like atom, but WHY NPM  :(
I really like atom packages and almost everything about this editor.. but sadly npm is breaking it for me on my desktop. please help.

Are you sure you arent behind a proxy? This is an issue with your internet not atom. Are you still experiencing this?

Thanks for reaching out. however I have now switched to a different editor, so I won't be trying to debug this again.


Added a todo app project in Angular 5

Closing this and creating a new request aligning to Contributing.md


range slider for numeric fields

filtring of numeric fields should have a feature to filter using range slider

Agree, it should.
Thanks for the request!

Same what about custom date field range

jsGrid doesn't have built-in date field. There is an implementation as an example in docs. So it's usually up to the user to implement it.


image/pdf create objects shows up in collection backend view

Image and pdf records/objects show up in collection backend view after successful ingests.


Dataproc image version supporting Spark 2.3.2

Hi,
I'd like to know what are the plans regarding Spark 2.3.2 support or Spark 2.4.0 ?
Regards,

Both Spark 2.3.2 and 2.4.0 are out today https://cloud.google.com/dataproc/docs/release-notes#december_10_2018


Don't hide recommended

We wanted to keep showing Recommended unconditionally.


Error handling errors

Throwing an error while getting a model (in my case it's a timeout exception) results in an error like this:
File ".../python3.9/site-packages/clingo/solving.py", line 479, in model
    _handle_error(
File ".../python3.9/site-packages/clingo/_internal.py", line 60, in _handle_error
    if code == _lib.clingo_error_unknown and handler is not None and handler.error is not None:
AttributeError: '_SolveEventHandler' object has no attribute 'error'

My guess is that in Control.solve you're supposed to pass a _CBData object as a handler to SolveHandle, but you're passing a _SolveEventHandler.

I had a quick glance. It looks like the argument to the SolveHandle constructor should simply be data. Do you have a small example to reproduce the issue?


Add NBT suport

Adding the NBT tags you see when holding an item with NBT and typing /bs read does nothing. It also doesn't work when copying it from the ItemDataStorage file.

Trying to add it


Could not connect to MySQL data source

When all was configured according to the document, I run
python3 -m tdvt.tdvt --run test4dmp
to test mysql connector(via jdbc), however, the following error occur
hyperd server version 9.1.0 build version master.<IP_ADDRESS>90.r3a6612de
LoadDatasource TableauException:
Unable to establish connection: Data source "MySQL" is not licensed) 无法建立连接: 数据源“MySQL”未得到许可。

any wrong with my config?

Were you able to connect using your connector with Tableau desktop?
BTW, better name your Connector something else than "MySQL", since we have builtin MySQL connector in Tableau.


Letter spacing doesn't work with Text

Text("MARCH", style = MaterialTheme.typography.subtitle2)

// MaterialTheme.typography.subtitle2:
subtitle2 = TextStyle(
    letterSpacing = 2.sp,
    fontSize = 14.sp,
    fontFamily = JosefinSans
)

This looks like:

I'm on windows, not sure if this is the case for other platforms too.

Fixed as of 0.2.0-build129.

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.


Add configuration to let open new tab on search

When I start a search using the integrated search field, the result is displayed directly in the window. It would be great to have a configuration item where you can set the search results to open in a new tab or window.

makes sense


Aim to represent codelists a smarter way

pyandi.download.codelists() should perhaps attempt to unify codelist codes across different versions, and store them as such.

Done in bbd034d47033ce0797fc095378c00b486923adde.


SPFX Application Customizer breaks Anonymous Links for PDF Files

Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested

[ ] 💥 Internet Explorer
[X] 💥 Microsoft Edge
[X] 💥 Google Chrome
[X] 💥 FireFox
[ ] 💥 Safari
[ ] mobile (iOS/iPadOS)
[ ] mobile (Android)
[ ] not applicable
[ ] other (enter in the "Additional environment details" area below)

Additional environment details

browser version:

Firefox 101.0 (64-Bit)
Edge 102.0.1245.33 (64-Bit)
Chrome 102.0.5005.63 (64-Bit)

SPFx version: 1.12.1
Node.js version:  v14.18.1

Describe the bug / error
I saw someone raised the same issue here, but it was marked closed.
Following the steps from Build your first SPFX Framework extension, I successfully packaged and deployed the hello world dialog popup example.  After, creating an anonymous link for a PDF file breaks for users who are not signed into SharePoint.
This behavior does not happen every time and with enough attempts, I can successfully view the PDF.  On average, it would fail 6-8 times out of 10 attempts.  This experience is not intuitive for end users who will normally stop attempting to access the PDF after the first or second try.
Steps to reproduce

Follow the steps from Build your first SPFX Framework extension
Ensure skipFeatureDeployment is set to true in the package-solution.json file
gulp build/bundle/package-solution --ship and then deploy to SharePoint Apps repository
Verify the Hello World Dialog Popup Appears on SharePoint pages
Upload a PDF file preferably with 20+ pages
Create an Anonymous link for the PDF file
Launch browser in incognito mode and attempt to access the PDF with the anonymous link
The PDF viewer is a blank white screen, with dots running along the top to represent its loading (never finishes).  Sometimes the PDF will successfully load, I am guessing its based on what asynchronous calls come first.

Expected behavior
If the extension detects the user does not have adequate permission, it should be disabled and allow the page to continue loading the resources the anonymous user has access to view.

Thank you @Anonimiss for reporting this one!
We're actively investigating the issue.
In a meanwhile there are few workarounds I can think of:

use the public CDN feature, and have the script on the public CDN that doesn't require authentication
grant access to the folders for this solution in the App Catalog site collection similar to this one: https://www.crowcanyon.help/article/431/

Thank you for your workarounds, @AJIXuMuK.
I first tried granting access to the folders in the App Catalog.  Most pages I found referenced using the everyone group for doing this. Even with the everyone group, and all users group having read permissions, I was still facing the same issue.
Enabling the Microsoft 365 Public CDN looks to have solved my issue.  I will continue to mess around with it, but the results are very promising!
Thanks again for the workaround.


Installing old terraform versions fails on arm64 Mac

When I try to install Terraform 0.14.10 it fails:
Downloading terraform version 0.14.10 from https://releases.hashicorp.com/terraform/0.14.10/terraform_0.14.10_darwin_arm.zip
Error: terraform version 0.14.10 not found

There isn't an arm release of this version so naturally the download fails, but if it downloaded the amd64 version I could run it under Rosetta 2.

I now see the README describes support for an environmental variable to work around this problem, but perhaps it shouldn't require finding this repo and reading that to make it work.

I've been meaning to add help scripts to output information on the plugin configuration options via the CLI, which should help with this problem.
I suppose that's not very visible in the moment, though, since it requires running a separate command - do you think it would be worth adding some extra help text in the error handling here to suggest that the user may want to investigate the plugin's configuration options?

Hey everyone,
I had racked my brains and figured it out when reading the function and using a set -x
To works:
ASDF_HASHICORP_OVERWRITE_ARCH_terraform=amd64 asdf install terraform x.x.x

Not Works:
ASDF_HASHICORP_OVERWRITE_ARCH_TERRAFORM=amd64 asdf install terraform 0.14.10
ASDF_HASHICORP_OVERWRITE_ARCH=amd64 asdf install terraform 0.14.10

As mentioned when defining only the variable ASDF_HASHICORP_OVERWRITE_ARCH it is ignored and it is always false due to the function
get_arch() {
  local -r machine="$(uname -m)"
  local -r upper_toolname=$(echo "${toolname}" | tr '[:upper:]' '[:lower:]')
  local -r tool_specific_arch_override="ASDF_HASHICORP_OVERWRITE_ARCH_${upper_toolname}"

  OVERWRITE_ARCH_TOOL=${!tool_specific_arch_override:-"false"}
  OVERWRITE_ARCH=${OVERWRITE_ARCH_TOOL:-$(ASDF_HASHICORP_OVERWRITE_ARCH)}

  if [[ $OVERWRITE_ARCH != "false" ]]; then
    echo "$OVERWRITE_ARCH"
  elif [[ $machine == "arm64" ]] || [[ $machine == "aarch64" ]]; then
    echo "arm64"
  elif [[ $machine == *"arm"* ]] || [[ $machine == *"aarch"* ]]; then
    echo "arm"
  elif [[ $machine == *"386"* ]]; then
    echo "386"
  else
    echo "amd64"
  fi
}

Only ASDF_HASHICORP_OVERWRITE_ARCH_TERRAFORM=amd64 asdf install terraform 0.12.31 worked for me. @mayconritzmann Thanks for the hint

FWIW you can also run asdf under Rosetta 2 using arch -x86_64 asdf install terraform 0.12.31 for the same basic effect.

Incase you using terraform with terragrunt, you can install it like;
ASDF_HASHICORP_OVERWRITE_ARCH_TERRAFORM=amd64 asdf install terraform 0.14.11
ASDF_TERRAGRUNT_OVERWRITE_ARCH=amd64 asdf install terragrunt 0.28.9


Fix anchor icon color + formatting

Hi @sarahmaddox, I made a little color adjustment to make the heading anchor use default coloring for a link. It now has on hovering effect.

This change is

Improves on https://github.com/kubeflow/website/pull/1009

Nice.
/lgtm
/approve


CC Can't support export xls?

export xls not supported for cc

What is CC?
Do you mean CE (community edition)?
It supports export in XLS but you need to install Office support as a separate extension (free - https://github.com/dbeaver/dbeaver/wiki/Optional-extensions).

yeah,
but exception error
An error occurred during the org.eclipse.equinox.internal.p2.engine.phases.CheckTrust phase.
session context was:(profile=DefaultProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.CheckTrust, operand=, action=).
Error reading signed content.
Exception in opening zip file: D:\Program Files (x86)\DBeaver\plugins\org.jkiss.bundle.apache.poi_3.16.0

Do you use IBM Java?
Could you try to download Windows installer (with bundled Java)?

hello
for install the office extension without internet connection, you should download all the files at this adress https://dbeaver.jkiss.org/update/office/latest/ and reproduce the structure of folder in a specific folder :+1:
1 folder with the files .jar and . xml and .xz
and in this folder add the folder features and plugins with the specific files.
after in dbeaver, do this :
help
install new softaware
add
type a name and click on local and find the folder with all the files
choose office extension
next
next
finish
be careful, you should have the administrator privileges on the folder dbeaver

Or you can just download EE version (which bundled wit all DBeaver extensions including Office).

EE version need buy it? hwo long can used?

Yes, DBeaver EE is a commercial product. The license for DBeaver EE is perpetual but includes only one year of support and upgrades.


Options Trading Strategy Brainstorm

Which options trading strategies might be best for a trading bot?

1 DTE CALL/PUT spreads?
1 DTE iron condors?
https://www.investopedia.com/articles/trading/08/flock-to-iron-condors.asp
covered calls / married puts?
https://www.investopedia.com/trading/options-strategies/

I would start with spreads on SPX for 2DTE, 1DTE or 0 DTE.

Bullish put credit spreads provide better P/L statistically than Bearish call credit spreads or condors.

Some short term strategies use the short term momentum of the underlying and then sell a CALL or PUT spread depending upon the direction.  For example, SPX is trending down COB Friday:

I've never been a fan of covered calls.  I'm thinking that married puts risk would be hard to scale.  I use married puts in my IRA sometimes but there always seems to be a mismatch in the put versus the number of shares.

Here’s an approach that I dabbled with the you may or may not find useful for shorter term trading.  The SPY chart shows an indicator that I developed for TradeStation that does a prediction “x” bars in advance using a Kalman filter of ATR.  I haven’t tested this on short timeframes but the indicator is normally 70%+ accurate.  The chart is a 5 minute chart and is saying that after 30 minutes of trading the next day, SPY should be trading between 414.03 & 415.87.   I would expect that a lot of the missed predictions would be due to gaps at the open (you can see this on the chart).  I haven’t really evaluated this for shorter timeframes.  Might be a fun group project…
I’ve used this as a check in my longer term options positions (versus relying solely on delta as an estimation of POP).  I’ve occasionally looked at ways to improve the prediction but without much luck.  I have used this in longer term Iron Condors as the algorithm appears to predict on a weekly & monthly basis with the same accuracy.  One pit fall is that the predictions are often (not always) far OTM.  I haven’t found a good, automated, way to monitor delta versus the prediction without getting blurry eyed from looking up quotes so I’ve put this on the shelf.
I didn’t develop the python code for this.  My development process to date has been brute force on my desktop without using Git.  I’ve basically done my own development environment.  I have indicators in TradeStation that I’ve developed over the years and export the data as .txt file from my platform.  I then have a folder that contains the data and use pandas or brute force parsing to get into the data.
I don’t think that I mentioned on our zoom that I do have a computer science degree and have been thinking about taking a Masters in Data Sciences at UBC next year.  So, I guess it’s about time that I dive into Git/GitHub.  I was think that I would develop a repo for my Kalman work (I’ve dubbed it KATR) and some of my work on trading channels.
In the meantime please let me know if you would like to look at the KATR indicator code.  The code is in TradeStation EasyLanguage but I’m sure you could decode it.

Kalman filters are interesting, I haven't looked into them in detail yet.
Feel free to post into a new folder at the root level of the project
directory.  I'd love to read through your code.  FYI- Python has become the
language most data scientists use, although many academics continue to use
R.
-Joe W.
On Sun, May 23, 2021 at 1:50 PM jwwjcw @.***> wrote:

Here’s an approach that I dabbled with the you may or may not find useful
for shorter term trading. The SPY chart shows an indicator that I developed
for TradeStation that does a prediction “x” bars in advance using a Kalman
filter of ATR. I haven’t tested this on short timeframes but the indicator
is normally 70%+ accurate. The chart is a 5 minute chart and is saying that
after 30 minutes of trading the next day, SPY should be trading between
414.03 & 415.87. I would expect that a lot of the missed predictions would
be due to gaps at the open (you can see this on the chart). I haven’t
really evaluated this for shorter timeframes. Might be a fun group project…
I’ve used this as a check in my longer term options positions (versus
relying solely on delta as an estimation of POP). I’ve occasionally looked
at ways to improve the prediction but without much luck. I have used this
in longer term Iron Condors as the algorithm appears to predict on a weekly
& monthly basis with the same accuracy. One pit fall is that the
predictions are often (not always) far OTM. I haven’t found a good,
automated, way to monitor delta versus the prediction without getting
blurry eyed from looking up quotes so I’ve put this on the shelf.
I didn’t develop the python code for this. My development process to date
has been brute force on my desktop without using Git. I’ve basically done
my own development environment. I have indicators in TradeStation that I’ve
developed over the years and export the data as .txt file from my platform.
I then have a folder that contains the data and use pandas or brute force
parsing to get into the data.
I don’t think that I mentioned on our zoom that I do have a computer
science degree and have been thinking about taking a Masters in Data
Sciences at UBC next year. So, I guess it’s about time that I dive into
Git/GitHub. I was think that I would develop a repo for my Kalman work
(I’ve dubbed it KATR) and some of my work on trading channels.
In the meantime please let me know if you would like to look at the KATR
indicator code. The code is in TradeStation EasyLanguage but I’m sure you
could decode it.
[image: SPY 5 Min]
https://user-images.githubusercontent.com/58279021/119274554-7c735880-bbde-11eb-954e-0fe6d6d641c2.jpg
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/flooidio/tradebot/issues/6#issuecomment-846615174,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEAV4CAO7O3GZG4Z5XLV4W3TPFL6PANCNFSM45HLZBMQ
.

--
-Joe Wojniak
CONFIDENTIALITY NOTICE: The contents of this email message and any
attachments are intended solely for the addressee(s) and may contain
*confidential *and/or privileged information and may be legally protected
from disclosure.

I write indicators in TradingView and TOS but would be definitely interested in learning EasyScript.  We should be able to port the code over to python. I don't know much about Kalman filter.  Sounds very interesting.  The red and blue lines seem to mirror the underlying price movement. Is this a leading or lagging indicator?

KATR.txt

KATR is lagging in the sense that it is based on ATR; however, it is more predictive versus leading.  When I first developed this I was looking for a way to combine weekly (or monthly) bars to sell 120 day+ spreads hoping to find an edge.  The reason I scrapped it is that the predictions range from 0 to about 20 delta options.  So if I sell a put based on this the best I can do is normally a 20 delta.  So, without connecting the delta with the prediction in some meaningful way it becomes tedious to look for trades.  However, my (very recent) thought was that if there is a focus on one symbol at a lower timeframe there may be some edge in these predictions.  This may or may not help with short 0/1 DTE trades.

With respect to back testing an options strategy there are several entry "triggers" that could be considered.

Find the delta then the strike price and monitor the option.  I would guess this is the most common.
Use an indicator such as ATR, KATR, STD, etc.  This would start with a price target then a strike price could be found.
Machine Learning projections.  These signals would be based upon any number of statistics from the underlying or from the options chain.
There are other indicators that may be appropriate but they would all be signal based.  For example, (I'm not endorsing the idea) a moving average crossover or key reversal.  Signals would not always be present.  If any of these type signals were found to be productive they would be included in a machine learning algo.

Once in a trade there may be some benefit to monitoring the Greeks...
It's not clear to me which approach would have the best results and it may be appropriate to sample each?  For the really short term trades I would expect machine learning would be superior but that is just a gut feeling (and I'm biased).
If we are looking at specific entries in a very short term expiration and focused on a signal symbol (SPY) then it looks like the data from https://datashop.cboe.com/options-intervals is not too expensive.  I've included a sample download (attached) that we could possibly play with as input data.  From there a bot could be generated and/or manual trading could be used.
I would think that starting with 1 or 2 DTE would be a good way to go.  Then use pandas to filter the input.  Thoughts?
J
Sample 30 min option quotes.xlsx
J

If we use this type of historic data for testing we would need to match quote dates with expiration dates and select only the expiration dates that are 1 or 2 days away from the quote dates.  These files will be huge so we could cut the dataset down to only the selected days to expiration as a first step.  Next step could be to specify puts or calls and further reduce the data.  We can always come back to this step and do the other.
The assumption is that we are selling premium. At this point we could then find the desired opening time (10:30 or 11:30 in the sample data) to make the sale.  We could then locate the desired option to sell based upon whatever algorithm we select.  In the case of delta multiple items could be found so we would need to select a specific item based on some criteria (lowest delta?).  Once the option is selected we would have the bid price and all the other stats to play with.
At this point we could manage the trade and/or just pick out at time to close the trade (15:30 or 16:00).  This should yield some basic stats to work with.  I think all the above is very do-able with pandas.
Provided all the above tests well we could turn to the development of a bot.
Thoughts?
J

I think we can structure it as a machine learning problem, which then finds the optimum result.  This simply requires features (KATR, delta, price, a technical indicator of the underlying, etc.) and the outcome- for example, closing the trade when X% profit is achieved.  We have a data collector running, storing the options chain data from TDAmeritrade.  Historical data could help us start exploring data relationships and early model development while live data is being stored.  I'm not sure what critical mass is for machine learning-- in most cases thousands of records is a good place to start.  In the case of options, I think we'd want thousands of expired contracts.  I'll check ^SPX to see how many weekly contracts there are.


Rename global to globalObject

Jest 26 can't load modules with global:
https://github.com/facebook/jest/issues/10565
(yes, even if you don't export it... I was skeptical, too, but it's true)

:tada: This PR is included in version 1.4.1-next.1 :tada:
The release is available on:

npm package (@next dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Bring demo app to iOS 6

FLAnimatedImage supports iOS 6+ but the demo player is at 7+ because of some adjustments that need to happen before lowering the deployment target.
See previous (closed) issue: https://github.com/Flipboard/FLAnimatedImage/issues/7

We've dropped support for iOS 6 and 7 because 8+ is required for Carthage support, so this is obsolete.


option to ignore diacritics (feature request)

It would be nice to have the option to have Leap ignore diacritics on letters, for example treating ṣ and š as if they were s, or ḥ and ḫ as if they were h, or ē and è and é as if they were e, ī as i, ā as a, ū as u, etc. This feature would be analogous to the existing option to ignore case differences.
E.g., if my buffer has the word ṣiḥḥah in it somewhere after the cursor, I would like to be able to type shh to jump to the first ḥ in ṣiḥḥah.
Thanks for considering it -- and for writing this very useful plugin! I have been enjoying using it and find it even more elegant than Sneak.

This is already possible:
leap.opts.equivalence_classes = { " \r\t\n", ""sṣš", "aàáâã", "uúûüű", ... }

Note: Obviously it has some performance penalty if you define huge eqivalence classes, since it increases the number of comparisons to be made per input character, but for a few diacritics it shouldn't be a problem.

Great, thank you! I didn't realize that. To save a bit of time for future Graeco-Arabists using NeoVim and Leap to write up their research (you never know, there might be another one!), I got exactly the behavior I wanted by adding this to my plugin/leap.lua file:
require('leap').opts.equivalence_classes = { " \r\t\n", "aäàáâãā", "dḍ", "eëéèêē", "gǧğ", "hḥḫ", "iïīíìîı", "nñ", "oō", "sṣš", "tṭ", "uúûüűū", "zẓ" }

Thanks again for the quick reply!


rename components for consistency

Description

Related Issues

Checklist

[ ] Is this code covered by new or existing unit tests or integration tests?
[ ] Did you run make test successfully?
[ ] Do new classes, functions, methods and parameters all have docstrings?
[ ] Were existing docstrings updated, if necessary?
[ ] Was external documentation updated, if necessary?

Additional Notes or Comments

Codecov Report
Attention: 199 lines in your changes are missing coverage. Please review.

Comparison is base (34830a7) 80.33% compared to head (02430e4) 67.34%.
Report is 105 commits behind head on main.

Files
Patch %
Lines

superduperdb/backends/ibis/query.py
73.05%
45 Missing :warning:

superduperdb/backends/sqlalchemy/metadata.py
47.14%
37 Missing :warning:

superduperdb/backends/mongodb/metadata.py
36.95%
29 Missing :warning:

superduperdb/backends/mongodb/artifacts.py
9.09%
20 Missing :warning:

superduperdb/backends/local/artifacts.py
68.88%
14 Missing :warning:

superduperdb/backends/mongodb/query.py
83.33%
12 Missing :warning:

superduperdb/backends/local/compute.py
54.16%
11 Missing :warning:

superduperdb/backends/dask/compute.py
41.17%
10 Missing :warning:

superduperdb/backends/base/compute.py
70.83%
7 Missing :warning:

superduperdb/backends/base/query.py
85.71%
3 Missing :warning:

... and 8 more

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1378       +/-   ##
===========================================
- Coverage   80.33%   67.34%   -13.00%
===========================================
  Files          95      102        +7
  Lines        6602     7240      +638
===========================================
- Hits         5304     4876      -428
- Misses       1298     2364     +1066

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


wasm_run_flutter on Safari browser: build() fails

Trying to .build() a basic WASM module on Safari seems to return this error, while running the same on Firefox or Chrome works fine
Tried also with .buildSync()
An error occurred: Invalid argument (name): No enum value with that name: "funcref"

I'm investigating, quite strange.
~It might be related to (?)~
  (table (;0;) 27 27 funcref)

UPDATE:
A couple of Issues are around _getTableType + Enum ValueTy and _getType.

Chrome return a Map<String, Object?> null so _getTableType execution is stopped and return a TableTy null, while Safari throw an exception when calling _getType but for some reason continue the execution of _getTableType
till get stopped by a mismatch in t['element'] == 'funcref' while the enum is funcRef

Playing around with the cached built files I found that the issue arise in _wasm_interop_web.dart:
TableTy? _getTableType(Object value) {
  final t = _getType(value);
  if (t == null) return null;
  final ty = ValueTy.values.byName(t['element']! as String);    //here fails on Safari
  return TableTy(
    element: ty,
    minimum: t['minimum']! as int,
    maximum: t['maximum'] as int?,
  );
}

Fixed, "funcref" is not part of Enum ValueTy, because ValueTy has "funcRef", for some reason on Safari the case matters, while on Chrome is able to ignore the case. Will clean up and send a pull request

There is something else strange,
Map<String, Object?>? _getType(Object value) {
  print("Properties of value: ${value.jsify()}");
  if (!js_util.hasProperty(value, 'type')) return null;
  final type = js_util.callMethod<Object?>(value, 'type', const []);
  return (js_util.dartify(type)! as Map).cast();
}

if (!js_util.hasProperty(value, 'type')) return null; throw an exception on Safari, so the code block is continued, on Chrome instead hasProperty 'type' is false so it returns null, and so _getTableType always return null

Could you publish the update of wasm_run_flutter so that it targets wasm_run 0.1.0+2 ? Thank you

Confirmed, works :) updated from +1 to +2


Prefer to give the same process color to processes of different name lengths

For example, currently:

process
color

test
blue

test123
yellow

test12
red

word
blue

For better visibility/differentiation of processes:

process
color

test
blue

test123
yellow

test12
blue

word
red

I'm not 100% sure I understand the request. The idea of the colour palette is to have different colors for different processes so its easy to find logs for a specific process at a glance.
In your example (second table), can you explain whyt test and test12would get the same color but not test123. Also how would this help readability?
In the first table, I assume its just an example if the colour palette would only have three colours and you want to avoid that if a colour is reused, its done for processes that have a different name length?

Issue looks pretty stale.


Consider adding tags on the healthcheck

From @ycrumeyrolle on Friday, October 27, 2017 2:26:30 PM
Every healthchecks may be related to different components or features of the application.
For example we could have tags like "database", "certificate", "critical", "authentication", "payment", ...
Tagging the healthcheck allow to request a subset of the configured healthchecks :
/health expose all the health check results
/health/critical expose only the critical healthchecks
/health/authentication expose only the authentication related healthchecks
...
Copied from original issue: aspnet/Diagnostics#420

We did this. It will be in 2.2.0-preview3


Tweak the stabilty field calculation on spiders.html

The stability calc has been "improved". It's an art more than a science. Anyhow I think it is more useful now.
@jleedev : thanks for the performance improvements, I learnt a trick or two there

Time has passed this on I think ... plus new PR to come.


organizing the A1112 exception of glyf test failure by failure sub-types.

The A1112 exception issues filed so far is organized currently by which font files on which it happens.
It would be useful to organize by failure sub-types across the font collections to tick them off as each failure sub-types are fixed.
https://github.com/Microsoft/Font-Validator/issues/39
https://github.com/Microsoft/Font-Validator/issues/37
https://github.com/Microsoft/Font-Validator/issues/36
https://github.com/Microsoft/Font-Validator/issues/35

okay, across the three current major platforms and the roughly 10 font files mentioned, there are only 3 kinds of A1112 exceptions:
ValidateSimpContInters Exception: Exception GMath: class: Bez2D method: ParamFromSupport details: NOT IMPLEMENTED
ValidateSimpContInters Exception: Exception GMath: class: Equation method: RootsAll details: Degree 3
ValidateSimpContMisor Exception: Exception Glyph: class: Glyph method: ValidateSimpContMisor

Fixed in upcoming v2.1


Traefik role should not listen for Flight port when Flight is not enabled

We currently listen on port 8443, even though Flight is not enabled. This can lead to port conflicts.
https://github.com/timeseer-ai/timeseer-ansible-collection/blob/8d9440eb3c1468d40d7b6add2fea10e778cdef4e/timeseer/docker/roles/traefik/tasks/main.yml#L51

@jhoekx

Validated by listing used ports on internal environments. Port 8443 was no longer listened on.


Subscription fails to resolve

With the setup documented, the subscription fails with the following message:

I've explored both Absinthe and this source codes but was unable to track down the issue.
`mix.exs
# mix.exs
defp deps do
    [
      {:phoenix, "~> 1.6"},
      {:plug, "~> 1.12"},
      {:plug_cowboy, "~> 2.5"},
      {:gettext, "~> 0.18.0"},
      {:cors_plug, "~> 1.5.2"},
      {:dataloader, "~> 1.0"},
      {:absinthe, "~> 1.7"},
      {:absinthe_phoenix, "~> 2.0"},
      {:absinthe_plug, "~> 1.5"},
      {:httpoison, "~> 1.7.0"},
      {:poison, "~> 3.1.0"},
      {:jason, "~> 1.2.1"},
    ]
end

user_socket.ex
defmodule Gateway.UserSocket do
  use Absinthe.GraphqlWS.Socket, schema: Gateway.Schema
  alias Gateway.Auth.Context

  @impl true
  def handle_init(params, socket) do
    token = params["Authorization"] || params["authorization"]

    with {:ok, claims} <- Core.Auth.Guardian.decode_and_verify(token, %{"typ" => "access"}),
         {:ok, user} <- Core.Auth.Guardian.resource_from_claims(claims) do
      socket =
        socket
        |> assign_context(user: user)

      {:ok, %{}, socket}
    else
      _ ->
        {:error, %{}, socket}
    end
  end
end

endpoint.ex
defmodule Gateway.Endpoint do
  use Phoenix.Endpoint, otp_app: :gateway
  use Appsignal.Phoenix
  use Absinthe.Phoenix.Endpoint

  plug(Gateway.Plug.Stripper)
  plug(CORSPlug, origin: "*")

  if code_reloading? do
    plug(Phoenix.CodeReloader)
  end

  plug(Plug.RequestId)
  plug(Gateway.Plugs.ClientIp)
  plug(Plug.Logger)

  plug(Plug.Parsers,
    parsers: [:urlencoded, :multipart, :json],
    pass: ["*/*"],
    json_decoder: Jason
  )

  socket("/api/socket", Gateway.UserSocket,
    websocket: [path: "", subprotocols: ["graphql-transport-ws"]]
  )

  plug(Plug.MethodOverride)
  plug(Plug.Head)

  plug(Gateway.Router)
end

The subscription event is being triggered with:
  def handle_info(
        {%MessageAddedToSession{channel: channel}, %{message: message, session: session}},
        state
      ) do
    Absinthe.Subscription.publish(
      Gateway.Endpoint,
      message,
      message_added_to_session: "#{session.id}"
    )
end

@VictorGaiva Sorry for the long delay in response. I have not ever seen this error. I was wondering if you were able to resolve it, and if not if you had asked in the #absinthe-graphql channel in the Elixir slack?

Absinthe subscriptions fields doesn't accept middleware!

i just faced this error recently and there's an issue on the absinthe core library to track that but the answer is that if you want to apply middleware to field (inside subscription or query), you need to resolve the fields on your own


Fix typo on installation documentation

Yeah, I know it's not the biggest PR you ever received but I observed that while reading the installation page and I throught..."well, why not?" :P

Thanks!


Web Content Accessibility Guidelines (WCAG) Colour Contrast Checked

What feature or new tool do you think should be added to DevToys?
W3C provided a set of Web Content Accessibility Guidelines (WCAG), which include a colour contrast checker currently integrated in  Chrome DevTools and Lighthouse, among others.
It would be great to have an extension or make it part of the core functionality in the DevToys.
Chrome DevTools does a good job when it works, including providing a colour curve of compliance with AA and AAA requirements. Unfortunately, it doesn't always work reliably as it fails to identify the background colour of an element or text block.
Some examples:

https://contrastchecker.com/
https://webaim.org/resources/contrastchecker/

Why do you think this is needed?
A Colour Contrast Checker in the Graphic section of the DevToys.
Solution/Idea
No response
Comments
No response

I just looked through the issues, and it appears that such a feature used to be present in DevToys v1.x (#875). Is it just a matter of porting that functionality to the v2?


References for placehold.it images

Update references for placehold.it images from external to relative.

@KiriHoy I noticed a issue with the code example references, if somebody copied the code snippets in header or footer they should be getting a src reference to https://designsystem.gov.au/assets/img/placeholder/xyz.png not a relative link like /assets/img/placeholder/...
e.g https://designsystem.gov.au/components/header/#default page has a src="http://placehold.it/... and the new changes put this as /assets/img/plac.... This is the danger of find and replace 😄 , fixed for now.
These things are hard to spot, even in QA


Conversion between v1beta1 and v1 CRDs

This issue is for discussing how to implement conversion between v1beta1 and v1 CRDs, as proposed in TEP-0096. This conversation came up in tektoncd/community#587.
One question we will need to answer is how to handle the "resources" field of Task/TaskRun/Pipeline/PipelineRun, since these will be removed in v1.
Copying over a comment from @sbwsg:
We serialize the Finally section of a v1beta1 Pipeline into an annotation if a client requests the v1alpha1 version. When a client submits a v1alpha1 version of a Pipeline with that annotation present the process reverses and the v1beta1 object is recreated with the Finally section in-tact: https://github.com/tektoncd/pipeline/blob/7a0a988cafaa64ff3e08969fa66f8521638d9b52/pkg/apis/pipeline/v1alpha1/pipeline_conversion.go#L142-L177
We don't do this for any other v1beta1-only fields. So, for example, when a v1alpha1 client requests a v1beta1 Pipeline with When Expressions, we simply drop them on the floor. If that client then re-applies the v1alpha1 version the stored v1beta1 version will be updated and the when expressions will be gone.
For a while we were working on an approach where we take the entire v1beta1 object and serialize it into an annotation when clients request v1alpha1, but it proved to be a complex and imperfect workaround.

/lifecycle frozen

Should this be folded into #4983?

probably 🙃

Added it to the linked issues in that epic! I think this still has value remaining open as a subtask, to discuss what we want to do when we update the stored version to v1 and need to implement conversion from v1beta1 to v1.

@afrittoli if you have any context about past pitfalls we ran into when supporting deprecated fields on conversion from v1alpha1 -> v1beta1 this issue is probably the best place for it!

We don't do this for any other v1beta1-only fields. So, for example, when a v1alpha1 client requests a v1beta1 Pipeline with When Expressions, we simply drop them on the floor. If that client then re-applies the v1alpha1 version the stored v1beta1 version will be updated and the when expressions will be gone.

Note that this can happen no matter what we do 🙃. If the user / tool cleans the annotation(s), the situation is the same 👼🏼


fatal assert when calling ArgumentDescriptor::set_access

I'm getting a very strange assertion with this program:
fn main() {
    let argument_descriptor = rafx::api::metal_rs::ArgumentDescriptor::new();
    println!("settings access");
    argument_descriptor.set_access(rafx::api::metal_rs::MTLArgumentAccess::ReadWrite);
    println!("has set access");

    let argument_descriptor = rafx::api::metal_rs::ArgumentDescriptor::new();
    println!("settings access");
    argument_descriptor.set_access(rafx::api::metal_rs::MTLArgumentAccess::ReadWrite);
    println!("has set access");

It prints
settings access
has set access
settings access
validateMTLArgumentAccess:27: failed assertion `access<PHONE_NUMBER>) is not a valid MTLArgumentAccess.'

The bizarre thing is that I cannot reproduce this with an "empty" project. If I take the exact code and all the same dependencies and move them to another project, it works fine. The only difference I can think of at this point is the one that fails is an example of another crate and the in-theory identical project that doesn't crash links that same crate as a downstream binary.
The only thing I can think of that would cause a crash like this would be incorrect bindings or something happening before main() that causes undefined behavior. I use static variables and things like lazy_static extremely sparingly. The app runs fine if I use my vulkan backend instead of the metal backend and all other metal bindings seem to work. (The original project that is crashing calls quite a few metal APIs before reaching this point).
The only thing I saw that looks suspicious is that MTLArgumentAccess is repr(u32) and the docs point out that this is Uint, which would actually be u64 on most systems (i.e. usize)
I tried to find examples of this function actually being used but was unable to get the gfx-hal examples to call it and didn't see it used in the examples of this crate.
Just posting here hoping that someone has an idea!

I believe you fully identified and explained what's going on. We are sending 32bits of data, getting the higher 32 bits as garbage. Fix is coming is #200

I believe you fully identified and explained what's going on. We are sending 32bits of data, getting the higher 32 bits as garbage. Fix is coming is #200

Made these repr(usize) locally and it fixed the problem, thanks for looking at it so quickly!

Made these repr(usize) locally and it fixed the problem, thanks for looking at it so quickly!


[FEATURE] JSON hot format

This feature adds new hot format: JSON.
Comparing to HTTP format, JSON takes request payload and adds certain fields that might appear useful for function and send sends it to function's STDIN.
Closes: #259

check this out: https://play.golang.org/p/bLZskdfB6T
easy peasy

@rdallman you've mentioned the alternative that i've been testing as an alternative to what i've made at this moment, that's why i left that code in place. Don't think that i'm arguing regarding single write event, i think we'll be able to find proper ways to read JSON, no matter if that would be a byte-by-byte read, as you said, protocol dictates structure, not frame. So, feel free to review this one again.

ok. seems like everything still getting shoved in buffers here, not sure if you pushed. lmk when updated

@rdallman there's only one buffer for request body everything else is not buffered and gets written just into STDIN. So, it's obvious why i did this for body - it needs to be encoded properly. Latest changes were pushed.

the docs are still wrong, see https://github.com/fnproject/fn/pull/364#discussion_r143313043 (outdated but still wrong)

if user returns json object but status code is 0 should we rewrite it to 200 probably? this will return a 0 atm :/ empty headers is fine, but status one is weird.

cool, seems much better now. want to test with the examples and your python library and make sure everything is good then we can merge? can optimize the buffer thing out in a bit, need to fiddle with it.

@rdallman python JSON parser is not ready, that would be done later, so i excluded python's example from this PR and will push that later.

works for me

also in future we should probably parse out the response json ourselves since atm for output we are decoding into a [gigantic] buffer and then for logs re-encoding it, and for the http one we can just copy the raw body out of the json response (respString[x:y]) instead of allocating a gigantic string and copying it over. but since we don't care about that for now, moving on...