OpenApi: Error while running the server

Syntax Error is raised when you run openapi_server. This is due to the template being added by the Jina Dev Bot at the top of the file. As __future__ imports must be before all code-relevant lines, even those that have no effect. Also, to note the files are auto-generated using OpenAPI Spec.

from __future__ import absolute_import

SyntaxError: from future imports must occur at the beginning of the file

Also, I was wondering if we could add a FastAPI example with multiple endpoints as mentioned in the OpenAPI Spec for Jina Flow. Plus, FastAPI has Swagger UI for interactive exploration, to call and test the API directly from the browser. Would like to take this task up, if it is required.

@kaushikb11 Thanks for your comments! Would you please elaborate more on the issue and add more code snippets? Plus, we'd love to hear more about your idea to adapt FastAPI-style to jina.

@nan-wang Absolutely!
Context: We aim to run the Server generated using this Swagger Spec in the examples/openapi/ directory.
Expected UI for interactive exploration, to call and test the API directly from the browser.

Here are the steps to reproduce the mentioned issue:
In the examples root directory.

cd openapi/
pip3 install -r requirements.txt
python3 -m openapi_server

We face the issue at this point

What caused the Issue?
TLDR; __future__ imports need to be at the top.

Syntax Error is raised when you run openapi_server. This is due to the template being added by the Jina >Dev Bot at the top of the file. As future imports must be before all code-relevant lines, even >those that have no effect. Also, to note the files are auto-generated using OpenAPI Spec.

The temp minor fix I did to resolve to issue by removing/commenting the template code.
__copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved."
__license__ = "Apache-2.0"

FastAPI
As you could notice there's no use-case example associated with the openapi example like flower-search or hello-world for Users to experiment with Jina. Will explore Jina's Rest API Spec (https://docs.jina.ai/chapters/restapi/index.html) and see if something could be built over it using FastAPI.
The idea is to have a RestAPI example and have the Abstraction with which Backend(any?) Engineers could get started with Jina. Users could use FastAPI's Swagger UI to interact, call, and test the API directly from the browser with params while a Flow is set on block(). Let me know what you think of it and is it something that's required?

Closing due to inactivity
Jina now leverages FastAPI via daemon, https://docs.jina.ai/master/chapters/remote/run-remote-pod-console.html

Closing due to inactivity
Jina now leverages FastAPI via daemon, https://docs.jina.ai/master/chapters/remote/run-remote-pod-console.html


Update deps to 0.14

Looks good.
You need to update to 1.51.0 here: https://github.com/CosmWasm/cosmwasm-template/blob/master/meta/appveyor.yml#L13
That and Simon's comment and good to move forward

Looks good. We do need to update the schemas, but I realized no one has done that in over a year, so that can be a different PR. https://github.com/CosmWasm/cosmwasm-template/tree/master/schema


[BUG] IF statement can't handle nested variables

The IF statement checks the single variable instead of checking both variables combined when using <LIST[<VAR>]>
Maybe this is intended like this in LoliScript, but you still can use <LIST[<VAR>]> on some Functions.
Steps to reproduce the behavior:
Have a list, set a single variable with a number and execute a IF statement with them.
The IF statement should check if the condition is true based on both variables combined, not the second one.
Version
1.1.5

Did you already read this thread? Can you make an actual example of an input and desired output?
https://forum.openbullet.dev/topic/87/nested-ifs-and-operators

Code (Single) = 4
Library (List) = [RU, FR, DE, PT, ES]
IF "<Library[]>" Contains "ES"
SET STATUS FAIL
ELSE
SET STATUS SUCCESS
ENDIF
Result: Success
Expected: Fail
The thread you linked is not related to this.
Anyway I managed to workaround the issue using extra functions.

Okay sorry I did not understand the first time. Anyways I don't see why that code would not work, so thank you for opening the issue.

I tried to replicate the problem but its giving me the expected output.

Closing as i cannot replicate either


[Feature] Redesign Traffic Manager and Event Hub on top of GRPC and remove thrift

@ruthryi   We have hold this feature for 4.2 and wont be doing it for next release. we can close the ticket.

@dushaniw Ack. Thank you


'Head' versions of Rubies are failing a test due to YAML serialization

It happens with the 'head' versions of all types of Ruby that we test with (MRI, JRuby, TruffleRuby) and standard JRuby. It's just one test, and it appears to be to do with serialization of Date:
CFFEntityTest#test_date_fields_set_and_output_correctly [/home/runner/work/ruby-cff/ruby-cff/test/cff_entity_test.rb:78]:
Expected "---\n" +
"name: Some Company\n" +
"date-end: &1  2022-10-02\n" +
"date-start: *1\n"
 to include "date-end: 2022-10-02\n"

Needs investigation. Could be to do with later versions of Psych?

Turns out that this is because in that particular test, Psych detects that we're using the same Date object and serializes date-start using a reference back (*1) to the first occurrence in date-end (&1).
This is easy to fix, but isn't particularly user-friendly - CFF is supposed to be human-readable, after all - so I'll see if this behaviour can be turned off by default.


generateColor gets wrong color during select/unselect path

I have noticed when performing unselect on a path the 'd' node that is passed through to generate color is the object that contains a 'data' sub object with no id. This results in generateColor function not finding the color for the selected/unselected element and it will then just change the color of that path to the next unused color in the list of colors.
This is probably best seen in a pie chart. See: http://jsfiddle.net/lakerz/n8hqk3z1/
Steps to replicate:
1> select a pie segment
2> select a second pie segment
Note that the first segment is now red instead of its original color.
The fix for this should be pretty simple. It should be something along the lines of:
c3_chart_internal_fn.generateColor = function () {
        var $$ = this, config = $$.config, d3 = $$.d3,
            colors = config.data_colors,
            pattern = notEmpty(config.color_pattern) ? config.color_pattern : d3.scale.category10().range(),
            callback = config.data_color,
            ids = [];

        return function (d) {
            var color;
            var id = d.id || (d.data && d.data.id) || d;

            // if callback function is provided
            if (colors[id] instanceof Function) {
                color = colors[id](d);
            }

Ah. That indeed looks like a bug. Wanting to submit a pull request...? :smile:

Thank you for reporting. I think this has been fixed by the commit above and I'll release as v0.4.9 shortly. Thanks.

v0.4.9 has been released, so please let me close.

Thanks @masayuki0812, works perfectly.


Add message to rbenv-global when use .ruby-version

for https://github.com/rbenv/rbenv/issues/1185
I used Ruby 2.5.0 and trying to switch to 2.6.2.
But version did not change even if I use rbenv glabal.
Apparently $HOME/.rbenv/version was not reflected because There is $HOME/.ruby-version the directory I was in.
It took time to identify the cause.So how about outputting a message when version file is under the home directory?

It seems that the version of rbenv was old🙏
Thank you for @jasonkarns
https://github.com/rbenv/rbenv/issues/1185#issuecomment-531576433


Change dropdown hover color to white

Change Dropdown item color in navigation bar (Status) on hover from black to white. Much more readable in steelblue background.
Change from,

Change to,

@simonpasquier

Sorry, didn't notice this earlier. This is for the old UI and will at least need a rebase (the conflicting file doesn't exist anymore, since asset embedding now happens differently), but happy to merge after that.
The new React UI already has different colors here, so should be fine.

Hi @nowke, we are still interested in this. Can you rebase this change? Thanks!

@roidelapluie I have rebased the change.

Thanks! I have merged it as per Julius' comment:

This is for the old UI and will at least need a rebase, but happy to merge after that.


4592 Fix for NetCDF aggregation coverage metadata related issues

Pull Request Checklist:

[x] Positive Test Case Written by Dev

[x] Automated Testing

[x] Sufficient User and Developer Documentation

[x] Passing Jenkins Build

[ ] Peer Code review and approval

Positive Test Case

Create a resource.
Create a netcdf aggregation using a file that has spatial reference. Verify that as part of metadata extraction, spatial coverage was computed.  Verify that you can't edit the 'Spatial Reference" or "Spatial Coverage".
Create another netcdf aggregation using a file that doesn't have spatial reference.

Verify that it's possible to make the resource public with missing spatial reference and spatial coverage. Also verify that you can edit spatial coverage only when  spatial reference is missing. Editing of spatial coverage should not display the option to update the netcdf file.
Verify a message is displayed related to missing spatial coverage in the netcdf file.

If you need netcdf files to test, here is a resource (https://new-testservices.hydroshare.org/resource/bbc1f12196bd4bb3b4659923ac45e22b/) that contains sample netcdf files.

@hyi Can you approve again? I had to fix a pep8 issue.


spirv-fuzz: transformations can (again) lead to invalid shader: ID ... defined in block ... does not dominate its use in block ..."

Same symptoms as #2905 but probably a different route cause.
To reproduce: spirv-fuzz --replay=shrunk.transformations shader.frag.spv -o temp.spv && spirv-val temp.spv
tofile.zip

A test exposing this bug is introduced in #2942.
It seems that determining how dominance changes when adding an edge, without just recomputing dominators, really is a non-trivial problem.  We could fix this issue by speculatively computing new dominators with the additional edge added and then checking whether every use is dominated by its definition.  That would seem really inefficient, and is not super-easy to even try out as far as I can tell.
"An incremental algorithm for maintaining the dominator tree of a reducible flowgraph" by Ramalingam and Reps might provide ideas towards an efficient solution.


The code rate setting does not take effect

I set 500 but I get Its actual value 1M-2M
videoFormat.setInteger(MediaFormat.KEY_BIT_RATE, 500*1000);

Only in a very few mobile phones will appear


Harden image 18fgsa/http-resource

Internal resource based on: https://github.com/cloud-gov/concourse-http-resource
Rather than using python base image, use our base hardened image

worked with @soutenniza to confirm this is no longer in use. all references have been removed and this is no longer a cloud-gov dependency.


Prediction is not accurate

Hi Team,
I am trying to implement the Time LLM for Time series data. I am working on the use case which is related to the air pollution prediction. I am able to run the model and getting the output. How ever the output is not accurate. Do you think any thing i can do to get the near real time prediction?
Appreciate your feedback on this ? Thanks

Hi, what exactly is your air pollution prediction? I'm not very familiar with this field. What specifically do you mean by real-time prediction?


Decrease liquid tokens distribution for vested positions

Vested positions to be applying a penalty factor on the maximum mintable LYDRA under a linear 1 week = 0.0133 penalty on the max amount mintable.
Since we automatically mint LYDRA with staking, this means we will need to mint lower amount the higher the vesting is.
Or in other terms, if a user who stakes a position of 1000 HYDRA for:
for 10 weeks, he will need to receive 1000-((10*0.0133)1000)) = 867 LYDRA (translating to -13.3% lower threshold on what can be minted relative to unvested position)
for 52 weeks, he will need to receive 1000-((520.0133)*1000)) = 308.4LYDRA (translating to a maximum of -69.16% lower threshold on what can be minted)
This should not have any other effect on the system.
@Myra
this is after a lot of thinking on how the RSIbonus will affect idle LYDRA that comes from vested positions. The concern is that the unrestricted LYDRA will contradict with the purpose of the RSIBonus and will most likely offer a "near free" opportunity from a vested position  perspective to tap on. Basically millions of LYDRA may potentially be dumped when RSIBonus spikes, which will not cause any positive impact on HDYRA price.
And since the RSIBonus could potentially spike APR up to 80% we need to make sure its inflationary release is tailored towards attracting new capital which is deployed on the chain and help support the price (and quickly reverse the RSIBonus), opposed to benefit positions which are already present, and thus lead to net negative impact.
By adding this limitation on LYDRA, we will ensure vested positions have lower impact on LYDRA supply. It also falls more in line with the concept of vesting, where vesting is supposed to mean zero impact on circulation.

Duplicate of https://github.com/Hydra-Chain/hydragon-issues/issues/157


ARROW-12958: [CI][Developer] Build + host the docs for PR branches

@github-actions crossbow submit -p pr_number=13913 preview-docs

@github-actions crossbow submit -p pr_number=13913 preview-docs

@github-actions crossbow submit -p pr_number=13913 preview-docs

@github-actions crossbow submit -p pr_number=13913 preview-docs

We will of course also need to add a "clean up"-job on crossbow that removes previews older than n-days (We could use the api to check if the pr is merged/closed but we have an issue with the cb gh-api limit already so I'd rather not spend it on this).
When using archery crossbow submit you have to include the pr number as a parameter -p pr_number=xxx. For submissions via the bot this will be passed through automatically (but the change will only take affect once this is merged, so I had to use -p to test).
@wjones127 @jorisvandenbossche  review please?

🥳 https://crossbow.voltrondata.com/pr/13913/

We should probably document this in https://arrow.apache.org/docs/developers/documentation.html ?
A nit about the URL: perhaps /docs_preview/# or /pr_docs/# would be more idiomatic than /pr/#?

@wjones127 How about something like this: https://github.com/assignUser/test-repo-a/actions/runs/2890950254

@github-actions crossbow submit -p pr_number=13913 preview-docs

@rok https://issues.apache.org/jira/browse/ARROW-17477


Simplified syncing implementation

This PR implements a simplified version of syncing. Compared to the previous version, it doesn't split the block downloads between the peers but downloads multiple copies of each block if necessary.

Closed, implemented in #181


Schedule a meeting with the Equity Working Group for feedback and ideas about ways to incorporate...

Schedule a meeting with the Equity Working Group for feedback and ideas about ways to incorporate equity

<3


french translation

french translation of the en.json

I don't speak french so I'll just assume this is all correct :D
Adding a ticket for myself to update the docs with this stuff: https://github.com/open-eats/OpenEats/issues/57
Thanks!


Increase Code Coverage

Add more unit tests to validate behaviour and to increase code coverage.

Fixed in 5e7aba5b0fab2fedfac84d7ea04d8cabc92ec625


feat: Show total sales of Event

Fixes #184

Add total sales visual in Event Detail
Add the corresponding test

@niranjan94 Is there any field in API to get the currency of tickets. We have to show it in dollars currently just because of generality where on the site, it is actually in INR

@mejariamol @arp95 @Shailesh351 @rohanagarwal94 Please review

@iamareebjamal part of the event API. payment-currency

@iamareebjamal payment-currency will be a three letter ISO 4217 currency code. (Eg. USD, INR, GBP)

@iamareebjamal the circular ring around gives false feeling of some graphical display. :-)

@mejariamol I did not understand. False feeling of some graphical display. You mean as if it is a circular progressbar?

@iamareebjamal yes

I thought this gives a nice touch on otherwise bland landcape. Let's see what others think

How about this?

@iamareebjamal

please move it to the start (Left)
little title saying Sales or something at top will do good.

The graphic won't look good on left. The title can be centralised as well

3rd UI

@arp95 @Shailesh351 @rohanagarwal94 Guys, please review which one is better

i find the 2nd one better.

Yes, 2nd one is better also add "Total sales" lable in it. because it may confuse user what is it.

Looking good to me :+1:

Yes, the 2nd one for me too.


Make DataSim tree where LAT is itself (e.g., repeat)

as in a repeating action

Not worth making the repeater, covered under #38


Improved output messages/status information of ASSET functions

This PR replaces ordinary print statements throughout ASSET with logging calls.
Moreover, steps that use loops also have improved output by using tqdm progress bars.
Any INFO logging is controlled by the usual verbose parameter in the functions. Moreover, the user can use the standard log level setting to enable specific messages, as DEBUG messages were also included.

Hey @kohlerca ,
Thanks for this enhancement of ASSET.
Doctests fail, since the print statements have been removed, so the output of e.g.
https://github.com/NeuralEnsemble/elephant/blob/5b464ecd358e871719b47990c48ac039871cfd63/elephant/asset/asset.py#L85-L88
is no longer printed out.
Fix: adapt example code accordingly (?).

Yes, I think the examples will also look cleaner with the removal of those text messages. For the doctests, just the final SSEs are the relevant output.

@Moritz-Alexander-Kern I think this should also be considered with #567

Hey @kohlerca ,
I have used the following code example to test out the logging feature:
# 1. Simulate two noise synfire chains, shuffle the neurons to destroy the
#    pattern visually, and store shuffled activations in neo.SpikeTrains.
import logging

import neo
import numpy as np
import quantities as pq
from pprint import pprint
from elephant.asset.asset import logger as asset_logger
from elephant import asset

asset_logger.setLevel(logging.DEBUG)
verbosity=True

np.random.seed(10)
spiketrain = np.linspace(0, 50, num=10)
np.random.shuffle(spiketrain)
spiketrains = np.c_[spiketrain, spiketrain + 100]
spiketrains += np.random.random_sample(spiketrains.shape) * 5
spiketrains = [neo.SpikeTrain(st, units='ms', t_stop=1 * pq.s)
                for st in spiketrains]
# 2. Create `ASSET` class object that holds spike trains.
# `ASSET` requires at least one argument - a list of spike trains. If
# `spiketrains_y` is not provided, the same spike trains are used to build an
# intersection matrix with.
asset_obj = asset.ASSET(spiketrains, bin_size=3*pq.ms, verbose=verbosity)
# 3. Build the intersection matrix `imat`:
imat = asset_obj.intersection_matrix()
# 4. Estimate the probability matrix `pmat`, using the analytical method:
pmat = asset_obj.probability_matrix_analytical(imat, kernel_width=50*pq.ms)
# 5. Compute the joint probability matrix `jmat`, using a suitable filter:
jmat = asset_obj.joint_probability_matrix(pmat, filter_shape=(5, 1), n_largest=3)
# 6. Create the masked version of the intersection matrix, `mmat`, from `pmat`
#    and `jmat`:
mmat = asset_obj.mask_matrices([pmat, jmat], thresholds=.9)
# 7. Cluster significant elements of imat into diagonal structures:
cmat = asset_obj.cluster_matrix_entries(mmat, max_distance=11, min_neighbors=3, stretch=5)
# 9. Extract sequences of synchronous events:
sses = asset_obj.extract_synchronous_events(cmat)
# The ASSET found the following sequences of synchronous events:
pprint(sses)

The code snippet demonstrates the usage of logging messages with either the logger.setLevel() or the verbose parameter as input to asset.
Playing around with both the log level and the verbose parameter simultaneously, it seems to me, the current implementation introduces unnecessary complexity and even potential confusion (?).
Maybe we can remove the verbose parameter, since the messages are now controlled by the loglevel? Or use verbose to set the loglevel? Any advice?
Ideas welcome, lets develop this approach. :slightly_smiling_face:

For the output control, in my opinion, everything should be controlled by the logger object. I kept the verbose parameter as this is already present, but I have no objection to removing it.
For verbose, there are some considerations:

first, logging always has a slight performance cost. When you call the API function, you exist the current scope, the logging function checks the current log level to make the decision on outputting or not, and then the function returns to the original scope. Therefore using a simple flag would avoid this, as logging would not be attempted. I don't think this performance cost is a problem here, and I agree that this creates confusion as the control on the existence/absence of output in the module would be removed from logging.

the other use of verbose is to control the progress bars, as they are switched off when it is False. But I guess we could take the logging INFO level or higher and use it to control their display (a brief note in the ASSET class would be enough for the user).

the last issue is a breaking change of removing the parameter. Currently, the code is expected to have the parameter present in the function calls when the user wants detailed output (as default is False). But we could put a deprecation filter that would advise using logging from now on, and avoid breaking the execution of legacy code. I would not attempt to use verbose to change any status of the logger, as this would have undesired effects. Then I would rather infer verbose as True or False based on a given level set for the logger.

build wheels

Hello @kohlerca! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file elephant/asset/asset.py:

Line 175:24: E127 continuation line over-indented for visual indent
Line 589:5: E303 too many blank lines (2)
Line 2398:25: E127 continuation line over-indented for visual indent
Line 2430:29: E127 continuation line over-indented for visual indent
Line 2546:9: E303 too many blank lines (2)

In the file elephant/test/test_asset.py:

Line 546:5: E301 expected 1 blank line, found 0
Line 552:13: E128 continuation line under-indented for visual indent


YAML prompts and validation

Hi, I was going to write some app from scratch to do what you already did, so I am trying out your great app.
EDIT: Sorry for the wall of text, it's mostly some ideas and where I am going with your app, can be helpful for you or others.
I find it cumbersome that code in steps.py need to be modified for a specific use-case...
Also, I've seen many use JSON output for structured output that could simplify the prompting, save tokens, and insert directives in the .yaml on how to process the resulting JSON without having to touch the python code.
Not sure if JSON is widely supported by llm...
I was thinking that having a single processing function that will take the prompts and the validation from a config file would be much better.
So for the yaml file :

Include in the yaml file the REGEX to process the answer or a other prompt to validate ?
like :

    - role: validator
      valid_regex: "PASS","highly relevant", "very relevant"
      fail_regex: "not relevant", "irrelevant", "not very relevant", "somewhat relevant", "poorly relevant", "FAIL"

    - role: validator
      llm_size: "nano", "micro", "small" # if MICRO is defined, say we prefer it, will overwrite llm_size in prompt_yaml
      prompt_yaml: "my_fast_validation_prompt.yaml" # just pass answer, not including old chat log to save tokens

That way, prompts could be all processed with a single pipeline and :

Could help mitigate when using an other language and require translation of the prompts/answers : .en.yaml, .fr.yaml, .ch.yaml ...
Could pass the answer to an other validator that is smaller (local on consumer gpu)
Could pass the text to an other prompt to have it generate specialized question if it falls in a certain domain of expertise, like to a LARGE model with complex questions...
Could use less tokens for multi-shots prepping, could revert to multi-shot if rate of FAILURE gets higher.
Could rate the difficulty of the question, is it easy general knowledge or hard expert level ?
Could be used to split or merge questions, reformulate question, create questions outside of the text that would require external tools to fetch from the internet... Or more ?

This kind of pipeline could be possible :
prompt_domain_knowledge.yaml - > fast_prompt_general_domain_related_questions.yaml -> revelant_check.yaml \>
                                                                             -> multi_shot_complex_prompt_on_high_fail.yaml ->
                                                             -> specific_domain_questions_maker.yaml                                   -> validator.yaml - > fast_validation.yaml
                                                             -> expert_question_maker_70b.yaml                /> question_difficulty.yaml
                                                             -> unanswered_questions_tool_fetch.yaml

I was looking at your prompts, and they are quite long. I have ollama that stops responding once in a while and must kill run_augmentoolkit.py to restart the run.  -> EDIT: Seem better after setting ctx from 8k to 16k.
I have had success with short prompts and that could save lots of tokens. Maybe some miss, but if we get a high rate of rejection, could change prompts for question generation that are more advanced/cost more. Also, I am thinking of specifying the knowledge domain of the questions to be from a list, so I don't get questions like Which French book focuses on rethinking the concept of  that are just a waste of tokens.
Sidetrack notes
Also thinking of some preprocessing post-processing using a MICRO llm like 2-3b for a few checks, like validating that it's knowledge I want to extract. A LARGE llm could also be used to generate a summary about a specific idea of the text that would be trained using a question like Give me a general explication about ... and What does "this concept" relate to and how could you explain it to me in a {simple|expert} way? Then mix some(most|random?) related concepts together and have a 405b try to make sens of it in a big and coherent way to explain expert knowledge for non expert to learn it or ask questions about what he doesn't understand ... like good teaching material. It would require some way to accumulate related knowledge, add a field to dataset ? (not there yet).
End sidetrack notes
Any way, what got me here is that I got a false reject using dolphin 8b:
## Final Judgment on Answer Relevance:
#### Relevance Assessment: The answer is highly relevant to the question asked.
#### Explanation of Judgment: The answer accurately summarizes Karine's completed certificate and her current pursuit, making it a direct and accurate response to the question.
Answer relevancy validation failed! Tossing

EDIT: Found that it's in def parse_answer_relevancy_validation_step(thought_process):
I am processing some data, grep the Explanation of Judgment and looking for keywords to add like
elif (
              "relevant" in determination
               or "Relevant" in determination
               or "answer provides" in determination # new
               or "provides a clear" in determination # new
               or "comprehensive explanation" in determination # new
               or "no reason to consider it irrelevant" in determinationkeywords  # new... waiting for a longer run to get logs for more
        ):

Will change from dolphin to hermes 8b. EDIT: hermes does a really better job and appends Relevant or Irrelevant like 90%+ of the time while dolphin was like 25% !
I think that instead of looking for all sort of keywords, a MICRO LLM could parse Relevance Assessment and Explanation of Judgmen to return a json with a "Assessment": "True" or "Assessment": "False" to prevent bad identification. That would be cheap as few tokens and low price on such small LLM, could be local with 4Gb NVRAM...
I was looking to fix this, then I started thinking where would be the best place  hence, having it direcly in the YAML seems the best way.
EDIT: Faults related to the LLM.  Curently using hermes/dolphin/mistral/qwen  in different quants to play around with a few pdf. Having the assessment validated by a micro llm seems a good approch that could mitigate llms that don't follow the directive to append  Relevant or Irrelevant.
So while thinking about it, some brainstorming :
SOME MAJOR SIDETRACK
prompts could be ordered by a number before them 01_check... 02_get...
prompts could be sequential, meaning it requires a valid certain valid prompt before.
so prompts should be able to set variables...
    - role : store
      store_variablename : "text"
# example
    - role : store
      store_expertise : "medical knowledge"
    - role : store
      store_expertise_level : "Specialized knowledge", "Advanced knowledge", "Domain expertise","Cutting-edge knowledge"
    - role : store
      store_credibility : "academic paper", "endorsed by medical association", "reviewed by peers"

and an other prompt could :
 - role : require
      store_expertise : "medical knowledge"
- role: system
  content: |
   ...
- role: user
  content: |
      Text : """{text}"""
      Question : ....

Some quick examples that would need more work:
 - role : require
      store_expertise_level : "Specialized knowledge"
- role: system
  content: |
   ...
- role: user
  content: |
      Text : """{text}"""
      Task : Define the credibility of this text and why would it be credible ? Answer as a bullet list with short sentenses using the format :
      """
      CREDIBILITY_LEVEL:
           - level of credibility (possible answers = high, medium, low)
      CREDIBILITY_REASONS :
           - First reason of credibility
           - Second reason of credibility
           - Third reason of credibility
     """
 - role : store
      store_credibility_level : "high"
      store_credibility_reasons : "academic paper", "endorsed by medical association", "reviewed by peers"

This kind of thing would make it more flexible. Should YAML be used that way, not sure if it's the best solution.
I hope this helps.
P.S. My idea is to get similar knowledge domain data, concepts across multiple publication and gather them (using vector RAG?) to try to generate coherent and valid deeper knowledge on a subject from publications/notes/books that may not be available online... That knowledge must be explainable, hence it must be able to cite source material, author...
Ok, back to debugging to fix my Answer relevancy validation failed! tests.

While YAML "scripting" the pipeline may still be a goal, I think I figured out how to do it. Will open issue again on this if needed or submit code for pull request if I get it to work.
Also, using JSON is so much better, I can have a JSON template as well as JSON with values for fail or pass, and support multiple language by changing the JSON file or translating it on the fly.


Improving the typing of useAsyncFn

Is your feature request related to a problem? Please describe.
Since #589 was merged we can type the arguments of async functions passed to useAsyncFn.
But not quite perfectly yet:
In order to make the following code pass type-checking:
// @ts-ignore
useAsyncFn(async (pad: Pad, sentence: string) => {
  await doStuff(pad, sentence);
});

I have to transform it the following way, wrapping my arguments in an object passed as the first arg:
interface Arg {
  pad: Pad;
  sentence: string;
}

useAsyncFn(async (...args: Arg[]) => {
  const { pad, sentence } = args[0];
  await doStuff(pad, sentence);
});

This seems to be due to the fact that https://github.com/streamich/react-use/pull/589/files#diff-8cd4968b81985f0efc2053eabc37db6dR7 imposes that args extends any[] which requires the function to accept:

any number of args (0-n)
all args are of the same type.

Describe the solution you'd like
I'd like to be able to pass functions with any type and number of arguments to useAsyncFn and enforce these arguments.
Describe alternatives you've considered
Workaround 1 as above:
interface Arg {
  pad: Pad;
  sentence: string;
}

useAsyncFn(async (...args: Arg[]) => {
  const { pad, sentence } = args[0];
  await doStuff(pad, sentence);
});

Workaround 2 without wrapping in an object, all args have the same type:
type Arg = Pad | string;

useAsyncFn(async (...args: Arg[]) => {
  const [pad, sentence] = args;
  await doStuff(pad as Pad, sentence as string);
});

If anyone is interested I've created a wrapper hook for Workaround 1:
import { useAsyncFn } from 'react-use';

/**
 * A wrapper around useAsyncFn until its arguments can be properly typed
 * See https://github.com/streamich/react-use/issues/1111
 *
 * @param callback to be called in useAsyncFn
 * @param deps that should trigger recreating the callback
 */
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
export function useTypedAsyncFn<T>(callback: (input: T) => Promise<any>, deps: any[]) {
  return useAsyncFn(async (...args: T[]) => {
    await callback(args[0]);
  }, deps);
}

@foucdeg I think this is resolved. Could you please check again and close this issue?
const [state, fetch] = useAsyncFn(async (n: number, s: string) => {
  // ...
});

fetch(); // err: Expected 2 arguments, but got 0.ts(2554)
fetch("foo", 42); // err: Argument of type 'string' is not assignable to parameter of type 'number'.ts(2345)
fetch(42, "foo"); // works

It is indeed, thanks!


Hallo,can you add a Simplified Chinese translation file？I made one.

Hallo,can you add a Simplified Chinese translation file？I made one.
https://github.com/lvzhenbo/youtube-dl-gui-Simplified-Chinese-translation-file

Read the localization guide from here please.


fuse: panic in handler for Getxattr while trying to list the content of the folder

Describe the bug
Not sure if I'm doing it right!
I decided to test a small cluster with swarm; 3 masters, 3 volumes and 3 filers.
When I mount to the filer 1, it works. But if I try to mount to the filer 2 or 3 I get the exception below when I try to ls -l test folder.
ls -la test/
2020-03-08 22:28:00.759638 I | fuse: panic in handler for Getxattr [ID=0x3 Node=0x1 Uid=1000 Gid=1000 Pid=151052] "system.posix_acl_access" 0 @0: runtime error: invalid memory address or nil pointer dereference
goroutine 50 [running]:
github.com/seaweedfs/fuse/fs.(*Server).serve.func2(0x22ab8a0, 0xc00053a000, 0xc0004ffec0, 0xc0004ffdaf)
	/home/travis/gopath/pkg/mod/github.com/seaweedfs/fuse@v0.0.0-20190510212405-310228904eff/fs/serve.go:861 +0x1a2
panic(0x1b8ed20, 0x331a7a0)
	/home/travis/.gimme/versions/go1.13.8.linux.amd64/src/runtime/panic.go:679 +0x1b2
github.com/chrislusf/seaweedfs/weed/filesys.(*WFS).maybeLoadEntry.func1(0x22dc380, 0xc0000f4120, 0x3, 0xc00017a8f0)
	/home/travis/gopath/src/github.com/chrislusf/seaweedfs/weed/filesys/xattr.go:129 +0x35a
github.com/chrislusf/seaweedfs/weed/filesys.(*WFS).WithFilerClient.func1(0xc00005f880, 0xc000156090, 0xc00003fc60)
	/home/travis/gopath/src/github.com/chrislusf/seaweedfs/weed/filesys/wfs.go:98 +0x6b
github.com/chrislusf/seaweedfs/weed/util.WithCachedGrpcClient(0xc00036a8a8, 0xc00003fc60, 0xf, 0xc00036a8b8, 0x1, 0x1, 0x18ed317, 0xc0000f2280)
	/home/travis/gopath/src/github.com/chrislusf/seaweedfs/weed/util/grpc_client_server.go:69 +0xc6
github.com/chrislusf/seaweedfs/weed/filesys.(*WFS).WithFilerClient(0xc00017b2b0, 0xc00036a930, 0x5, 0x0)
	/home/travis/gopath/src/github.com/chrislusf/seaweedfs/weed/filesys/wfs.go:96 +0x9c
github.com/chrislusf/seaweedfs/weed/filesys.(*WFS).maybeLoadEntry(0xc00017b2b0, 0x7ffc7a9d47b1, 0x1, 0x7ffc7a9d47b2, 0x4, 0x0, 0x3387801, 0xc00052a600)
	/home/travis/gopath/src/github.com/chrislusf/seaweedfs/weed/filesys/xattr.go:120 +0x1c3
github.com/chrislusf/seaweedfs/weed/filesys.(*Dir).maybeLoadEntry(0xc00014d500, 0x5, 0xc00052a600)
	/home/travis/gopath/src/github.com/chrislusf/seaweedfs/weed/filesys/dir.go:422 +0x8e
github.com/chrislusf/seaweedfs/weed/filesys.(*Dir).Getxattr(0xc00014d500, 0x22b8ca0, 0xc000098840, 0xc00053a000, 0xc00028e460, 0x3387a01, 0x1f79ad8)
	/home/travis/gopath/src/github.com/chrislusf/seaweedfs/weed/filesys/dir.go:70 +0x8c
github.com/seaweedfs/fuse/fs.(*Server).handleRequest(0xc00039c000, 0x22b8ca0, 0xc000098840, 0x2272100, 0xc00014d500, 0xc000416980, 0x22ab8a0, 0xc00053a000, 0xc0004ffec0, 0x0, ...)
	/home/travis/gopath/pkg/mod/github.com/seaweedfs/fuse@v0.0.0-20190510212405-310228904eff/fs/serve.go:1131 +0x2388
github.com/seaweedfs/fuse/fs.(*Server).serve(0xc00039c000, 0x22ab8a0, 0xc00053a000)
	/home/travis/gopath/pkg/mod/github.com/seaweedfs/fuse@v0.0.0-20190510212405-310228904eff/fs/serve.go:882 +0x2fd
github.com/seaweedfs/fuse/fs.(*Server).Serve.func1(0xc00039c000, 0x22ab8a0, 0xc00053a000)
	/home/travis/gopath/pkg/mod/github.com/seaweedfs/fuse@v0.0.0-20190510212405-310228904eff/fs/serve.go:424 +0x7c
created by github.com/seaweedfs/fuse/fs.(*Server).Serve
	/home/travis/gopath/pkg/mod/github.com/seaweedfs/fuse@v0.0.0-20190510212405-310228904eff/fs/serve.go:422 +0x35e
ls: test/: Input/output error
total 0

System Setup
Commands for masters
ports:
  - 9333:9333
command: "master -ip=master1 -port=9333 -peers=master1:9333,master2:9334,master3:9335 -defaultReplication=002"
...
ports:
  - 9334:9333
command: "master -ip=master2 -port=9333 -peers=master1:9333,master2:9333,master3:9335 -defaultReplication=002"
...
ports:
  - 9335:9333
command: "master -ip=master3 -port=9333 -peers=master1:9333,master2:9334,master3:9333 -defaultReplication=002"

Commands for volumes
ports:
  - 8080:8080
command: '-v=2 volume -ip=volume1 -port=8080 -max=5 -mserver="master1:9333,master2:9334,master3:9335" -dataCenter=dc1 -rack=rack1'
...
ports:
  - 8081:8080
command: '-v=2 volume -ip=volume2 -port=8080 -max=5 -mserver="master1:9333,master2:9334,master3:9335" -dataCenter=dc1 -rack=rack1'
...
ports:
  - 8082:8080
command: '-v=2 volume -ip=volume3 -port=8080 -max=5 -mserver="master1:9333,master2:9334,master3:9335" -dataCenter=dc1 -rack=rack1'

Commands for filers
ports:
  - 8881:8888
command: '-v=4 filer -master="master1:9333,master2:9334,master3:9335"'
...
ports:
  - 8882:8888
command: '-v=4 filer -master="master1:9333,master2:9334,master3:9335"'
...
ports:
  - 8883:8888
command: '-v=4 filer -master="master1:9333,master2:9334,master3:9335"'

Mount command
./weed mount -outsideContainerClusterMode -filer=localhost:8882 -dir ~/test -filer.path=/test &

Debian 10.3
output of weed version: version 30GB 1.58 linux amd64
if using filer, show the content of filer.toml

/ # cat /etc/seaweedfs/filer.toml
[leveldb2]
enabled = true
dir = "/data/filerldb2"

Expected behavior
Expected to list the files.
Additional context
It seems to work when I mount only the filer 1. It is possible to have several filers ?
Can it be mounted to several filers in case on of them fails or the node becomes unreachable?
Something like: ./weed mount -filer=ip1:8880;ip2:8881;ip3:8882
./weed mount -outsideContainerClusterMode -filer=localhost:8880 -dir ~/test -filer.path=/test &

duplicate with https://github.com/chrislusf/seaweedfs/issues/1221

you can use 1.59 release now.

Currently, only one filer is supported. Multiple filers? maybe later. Not sure whether it would be useful or not.

@chrislusf Not sure why you think having multiple filers is not useful. What happens if the filer goes down or the whole server goes offline.
I like your project, it looks very promising! But it is currently missing some resilience features.
Ceph FS can be mounted with a list of monitors and stays available when some of them goes offline.
In other words, I can put the server offline (even reboot) to make some maintenance without affecting the whole system due to redundancy.

Filer is stateless if using shared store, just like a web app. Put load
balancer in front if needed.

Not sure I got the idea. weed mount needs a filer. Ok I can load balance the filer nodes but in my tests only one one filer works. I mean, if I have 3 filer nodes on 3 different severs (as describes above, all connected to 3 masters), when I "weed mount filler1" and create some files and then I mount "weed mount filer2" on another node I don't see any files.
Am I dong it wrong ? Mounting with one IP is fine, I can load balance between filers but I expect all 3 filers give the same information.

You are using embedded filer store, which is not shared. If you want filer to failover, you need to use a different filer store.
https://github.com/chrislusf/seaweedfs/wiki/Filer-Stores

@chrislusf Thanks Chris! I assumed the filer should replicate metadata for redundancy. It means the problem is how to scale a "shared" filer store (underlying database).
I like seaweed for it simplicity and such an option would be really awesome (filer (with local leveldb2) replication)!

Is there any example how to setup filer with PostgreSQL ?


Lucio has ow2 healing penalty on crossfade/amp

Created by: Jedi-Bob
lucio currently has a 60% reduction received from heal aura in normal crossfade and amp it up

Created by: Jedi-Bob
he receives full healing from amp as of the latest patch he just doesn't receive it from regular crossfade

Created by: MaxwellJung
The math to fix this is a bit complicated, so don't expect this to be fixed any time soon.

moved from ow1_emulator_backup#545


Starting game from build on Windows machine fails in esbuild's issue with glob syntax

Love the game and what a treat the Typescript code is well organized and even commented in places.
Following the instructions in README.md on a Windows 10 machine with the latest (Stable) VSCode, after running npm start the output in the Terminal and when browsing to http://localhost:1234 is:
PS C:\projects\github\duszki> npm start

`npm` WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
><EMAIL_ADDRESS>start
> esbuild */index.ts --define:DEBUG=true --target=es2020 --preserve-symlinks --bundle --sourcemap --outdir=. --outbase=. --color=false --servedir=. --serve=1234
> Network: http://<IP_ADDRESS>:1234/
> Local:   http://<IP_ADDRESS>:1234/
> Network: http://<IP_ADDRESS>:1234/
X [ERROR] Could not resolve "*/index.ts"
It looks like you are trying to use glob syntax (i.e. "*") with esbuild. This syntax is typically
handled by your shell, and isn't handled by esbuild itself. You must expand glob syntax first
before passing your paths to esbuild.
1 error

I'm assuming the glob has to do with wildcard star expansion.  Any ideas on what needs to be modified in the package.json or else-where to get this to build?
If the following lines are changed from starting with "*/index.ts" to "src/index.ts" the browser will start with an index directory, and the game can be run by clicking into "src".  (Partial fix).  The lines to change in package.json, "scripts" section:

"start": "esbuild src/index.ts --define:DEBUG=true --target=es2020 --preserve-symlinks --bundle --sourcemap --outdir=. --outbase=. --color=false --servedir=. --serve=1234",
"build": "esbuild scripts/index.ts --define:DEBUG=true --target=es2020 --preserve-symlinks --bundle --sourcemap --outdir=. --outbase=. --color=false",

Hi @tronster, thanks for the report! I'm happy to know that you're enjoying the game <3.
I've only ever tested our setup inside WSL on Windows, hence the use of a Bash-like * glob. As you note, changing */index.ts to point directly to src/index.ts is the right fix.
Background: The * is there due to the fact that the repo was generated from our template, https://github.com/piesku/goodluck. The template has multiple examples, each one in its own directory and with its own index.ts entry point. Ideally, when a new project is bootstrapped from the template and all examples are removed, we'd automatically change */index.ts to src/index.ts.


Implement Ord and PartialOrd for Uuid

Useful as it allows a UUID to be used as a key for a BTreeMap, which wasn't possible before.
This is accomplished by using the underlying byte array's builtin Ord/PartialOrd implementations.

Thanks! Could this actually use #[derive]?

@alexcrichton Probably - I was just unsure how deriving an Ord impl works. Does it just use the struct members' implementations? If so, I'd be glad to just use that.
(I'm assuming you can just forcepush the pull request branch?  And yeah #[derive] will basically "do the right thing" for aggregate structures (delegating to the implementation for each field)

@alexcrichton done! thank you for your help.

Thanks!

@alexcrichton Could you please publish a new release with this change? :)

Certainly! 0.2.1 published

Awesome, thanks!


KAFKA-15661: KIP-951: protocol changes

Separating out the protocol changes from https://github.com/apache/kafka/pull/14444 in an effort to more quickly unblock the client side PR.
https://cwiki.apache.org/confluence/display/KAFKA/KIP-951%3A+Leader+discovery+optimisations+for+the+client
https://issues.apache.org/jira/browse/KAFKA-15661
Testing
./gradlew core:test --tests kafka.server.KafkaApisTest

@chb2ab lgtm, thanks for raising this!

Hey there. If this is KAFKA-15661, then the title of the PR should be
KAFKA-15661: KIP-951: Server side and protocol changes

@chb2ab CMIIW, but @jolshan i think scope of the PR is just protocol changes, not server-side changes. Intention is to merge the protocol-changes soon, so client-side changes can also be reviewed utilising the change.
I see 2 options to make this happen

Merge PR https://github.com/apache/kafka/pull/14444, if its ready.
If 1. isn't feasible, then only merge the protocol changes with the current PR.

Going through PR 14444, it seems close, @jolshan what do you think? Is it possible to merge in next 1-2 days?

I still need to go over the changes in #14444. This would still probably be faster.

@chb2ab sorry for the confusion. I realized that marking the version unstable will probably cause issues if the ibp suggests using that version. Since the tagged fields are the only difference, let's remove the unstable version flag. Sorry for the back and forth. After that, I will check the tests again and hopefully this will be good to go.
https://github.com/apache/kafka/pull/14627#discussion_r1373924152

@jolshan np, I reverted that change.

I will just watch the build now. Thanks @chb2ab


feat: visibility for type aliases

Description
Problem
Part of #4515
Summary
Additional Context
Documentation
Check one:

[ ] No documentation needed.
[x] Documentation included in this PR.
[ ] [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist

[x] I have tested the changes locally.
[x] I have formatted the changes with Prettier and/or cargo fmt on default settings.

mod foo {
    struct Foo {
        inner: Field
    }
    pub type Bar = Foo;
}

fn main() {
    // The `foo::Foo` raises a warning because we can't construct from a type alias currently
    // if we could then this would be entirely legal.
    let _: foo::Bar = foo::Foo { inner: 0 };
}

This PR currently allows us to expand the visibility of types by defining a type alias.

This PR currently allows us to expand the visibility of types by defining a type alias.

I kinda like this feature :sweat_smile:

It's interesting because the above code in Rust gives an error:
mod foo {
    struct Foo {
        pub inner: i32,
    }
    pub type Bar = Foo;
}

The error is:

Type Foo is more private than item Bar

However, if I make Foo be pub(crate):
mod foo {
    pub(crate) struct Foo {
        pub inner: i32,
    }
    pub type Bar = Foo;
}

that error no longer happens 🤔
I don't understand why Rust doesn't give an error in this case. Foo is still more private than Bar.
For now I'll make both cases give an error in Noir, but let me know if it should be like in Rust instead.


improve model saving

Add epoch number to the saved model name, that is model.torch.
Save model i.e. model_epoch123.model
remove previously saved model (with smaller epoch number).

@kamil-kaczmarek Did this ever get done?

Hey @carbonox-infernox,
We did not implement it.


Gluster 7.0

It seems I am unable to build gogfapi against libgfapi from gluster 7.0.
Is this anything you have in your pipeline?

@kshlm Any chance you could look at this? :)


[FEATURE] Support Environment Variables

Requirements
Overview
FlagD supports multiple options that affect how consumers interact with it. Options like what port or service provider is being used needs to be in sync with an OpenFeature provider in order to provide a seamless experience.
Criteria

[ ] Define all the options that require environment variables
[ ] Add the defined environment variables to flagD
[ ] Include the environment variable names in the help message
[ ] Include documentation for what environment variables are supported.

This may be possible with Viper if a prefix is set.


Several issues

Hey,
First of all, input-moment is a very nice looking and easy to use component (end-user wise).
But I got several problems with your component

Using input-moment in a  won't work, as the time/date switch buttons cause the form to submit
I wasn't able to use it without copying the /src to my own /app folder, as the compiled sources require moment.js globally (or not? it kept on complaining)
Why did you add Array.prototype.chunk to the array prototype, instead of just exporting and using a 'chunk(array, chunkSize)' function?

Thanks a lot for the feedback.

fixed in https://github.com/wangzuo/input-moment/commit/bf7eec0cd962edb478b0107db4c75dbcdb50ba89

yes, moment.js is not included in the dist version.

fixed in https://github.com/wangzuo/input-moment/commit/370f6c253937607e123bf3b5bd65a9cf391f558a with lodash/array/chunk


Does not work in Guard 2.13.0

on executing guard init
16:57:31 - ERROR - Could not load 'guard/xctool-test' or '~/.guard/templates/xctool-test' or find class Guard::Xctooltest
16:57:31 - ERROR - Error is: No such file or directory @ rb_sysopen - /Users/user1/.guard/templates/xctool-test

The library is created for guard 1.8, so it probably will not work for 2.x. Please consider to send a PR to fix this!

done :+1:


Missing pictures in APN detail guide for 4G module

Pictures are missing in your guide for manually adding the APN details guide as per below link.
https://helium.nebra.com/outdoor-hotspot/lte-config

@Almanaka We are working on the documentation and it will be updated soon.


feature in test_fc6_16_overlap0.5_resnet do not have overlap

The appearance features for the test set, i.e., in the test_fc6_16_overlap0.5_resnet.tar, do not have an overlap of 0.5. For example, for the 0001558.mp4, the features are:
video_test_0000062.mp4_1.0_17.0.npy
video_test_0000062.mp4_17.0_33.0.npy
video_test_0000062.mp4_33.0_49.0.npy
...
The flow features in the test_fc6_16_overlap0.5_denseflow.tar are all right with an overlap of 0.5. So, the number of features are different for the test_fc6_16_overlap0.5_resnet.tar and test_fc6_16_overlap0.5_denseflow.tar.
I wish you could mend this problem and upload the right overlap appearance features for the  test set. Thanks!

test_fc6_16_overlap0.5_resnet.tar set unit_size=16. test_fc6_16_overlap0.5_denseflow.tar set unit_size=6. That's why the npy file numbers differ. Check it here https://github.com/jiyanggao/CTAP#feature-download

The appearance features for the test set, i.e., in the test_fc6_16_overlap0.5_resnet.tar, do not have an overlap of 0.5. For example, for the 0001558.mp4, the features are:
video_test_0000062.mp4_1.0_17.0.npy
video_test_0000062.mp4_17.0_33.0.npy
video_test_0000062.mp4_33.0_49.0.npy
...
The flow features in the test_fc6_16_overlap0.5_denseflow.tar are all right with an overlap of 0.5. So, the number of features are different for the test_fc6_16_overlap0.5_resnet.tar and test_fc6_16_overlap0.5_denseflow.tar.
I wish you could mend this problem and upload the right overlap appearance features for the test set. Thanks!

Did you find any solution?

The appearance features for the test set, i.e., in the test_fc6_16_overlap0.5_resnet.tar, do not have an overlap of 0.5. For example, for the 0001558.mp4, the features are:
video_test_0000062.mp4_1.0_17.0.npy
video_test_0000062.mp4_17.0_33.0.npy
video_test_0000062.mp4_33.0_49.0.npy
...
The flow features in the test_fc6_16_overlap0.5_denseflow.tar are all right with an overlap of 0.5. So, the number of features are different for the test_fc6_16_overlap0.5_resnet.tar and test_fc6_16_overlap0.5_denseflow.tar.
I wish you could mend this problem and upload the right overlap appearance features for the test set. Thanks!

Did you find any solution?


Fix header items not fitting in

Fixes

Fixes #711 by @zackkirda
Description

Currently, the mobile header uses flex-wrap to wrap the elements and push the search bar to the second row. This prevents us from using the normal flex mechanism to ensure that the other row fits into the screen.
This PR sets the width of the search bar using the CSS calc property to calculate the width that's left after buttons and paddings. It also removes the margins from the header menu buttons and handles the spacing from the parent (header) using gap property.

This works fine until the width of 379px. Below that, because the width of the content switcher is hard-coded to 5rem (90px), there is not enough width in the header to fit all components, so the filter button goes to the second line:

Another problem I have is with the inner pages on smaller widths, as there is no Figma mockup showing the header on the inner pages. This is what it currently looks like:

@panchovm, I have 2 questions:

What should I do for the widths lower than 394px?
Does the inner page header look OK?

Testing Instructions

Run the app, and try decreasing the screen size down to 350px (or lower?). Try different pages, and with the header scrolled/ not scrolled. All element should fit into one row, or two rows on a search page when the header hadn't been scrolled.
Checklist

[x] My pull request has a descriptive title (not a vague title like Update index.md).
[x] My pull request targets the default branch of the repository (main) or a parent feature branch.
[x] My commit messages follow best practices.
[ ] My code follows the established code style of the repository.
[ ] I added or updated tests for the changes I made (if applicable).
[ ] I added or updated documentation (if applicable).
[ ] I tried running the project locally and verified that there are no visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

Here my comments
Header with content switcher
Content switcher width
The label in content switcher has a 5 rem width. It should be auto as the filter button keeps fixed and content switcher changes its width.

Content switcher padding
Content switcher should have a padding-right of 12px too look balanced compared to left padding where icon is.

Filter button size
Filter button is not square and it should be square. When scrolling down it goes as square, but 48px instead of 40px as the mockup. Buttons size match the search bar height and we might need to review in the case that values do not have the visual effect expected. I'm open to review this from the design.

It seems that header does not fit well in smaller viewports, even with the above changes applied. I am testing 320px as some devices are and actions move to a second row. I suggest that we review the header again once changes are done and see if hiding openverse label works well.
Header without content switcher (internal pages)
We do have a header for internal pages where content switcher is not visible. Go to see the page version of modal. Adding a screenshot.

@panchovm , I think I've fixed the problems you listed :) Now, I need to adjust the header for under 370px...

@obulat @panchovm Maybe we should hide the Openverse text on very small (less than around 350px seems to work for me) screens. That seems like an easy fix that looks okay:

I noticed the following:
Buttons alignment
Based on @zackkrida screenshot and what I tested, the content switcher and filters should be fixed on the right side with a 8px of spacing between Content switcher and Filters buttons. This to prevent uneven spaces between components on bigger displays. Here is how it should behave.

And agree with Zack about hiding Openverse text on small screens.
Spacing between buttons and search bar
The space between buttons and search bar seems minor than the mockup. It should be 16px. Adding a screenshot

Logo position
When opening the menu, logo position changes and it shakes slightly. This might not be related to what this PR solves, feel free to dismiss the comment and I can create an issue.

Keyboard navigation
I think @sarayourfriend commented this days ago, when navigating with the keyboard, the order does not follow the visual LTR logic. Instead of jumping from logo to content switcher, it goes to the search bar.

The label in content switcher has a 5 rem width. It should be auto as the filter button keeps fixed and content switcher changes its width.

This also changes from language to language by the way, and we shouldn't bank on it being 5 rem. In Portguese for example it's four full-width characters longer and visually ~40% longer.

All content
Todo o conteúdo

That might not be the translation we end up using the end, but just something to keep in mind that we can't rely on visible text labels to be a specific width.
Removing the Openverse word from the logo button gives back a lot of space, which is great 👍

To @sarayourfriend's point we should likely add the truncate class to content switcher.

Done:

[x] Buttons alignment: buttons are aligned to the right in the below-md screens. Only on screens that are below 370px is the content switcher center-aligned.
[x] Openverse text is hidden on screens smaller than 370px.
[x] Spacing between the first and the second row on mobile header set to 16px.
[x] Logo and Openverse text do not change position when opening mobile menu; I extracted the component combining VLogoLoader and OpenverseText to make this easier, and called it VLogo, please help me come up with a better name :)

Not done:

[ ] Keyboard navigation. Unfortunately, fixing this would require more thought and effort. I was thinking that we could move all the complexity to the components of VHeader, and have the header as a simple render function component without a template that would place the SearchBar either second or last based on isHeaderScrolled value.
[ ] Change the content switcher static width of 20rem. It is only set on desktop screens, and I believe @dhruvkb set it so that the popup doesn't jump either horizontally or vertically when scrolled. I also had thought about i18n problems with it, but what is a better solution for popover shifting?

The extraction of the logo and text you added is relevant to @sarayourfriend in #687, cool!

Keyboard navigation. Unfortunately, fixing this would require more thought and effort. I was thinking that we could move all the complexity to the components of VHeader, and have the header as a simple render function component without a template that would place the SearchBar either second or last based on isHeaderScrolled value.

Olga, I would suggest opening a separate issue for this. It will mainly affect sighted keyboard users on mobile (an extremely small cohort) who will be temporarily confused by the unexpected tab order... but it's likely to be something they've experienced on other websites before.
For folks relying on a screen reader, they won't notice the bad order because in all likelihood they're not relying on the visual context of the page to know what to expect from their reader. I'm not saying it's impossible, just saying it's unlikely.
Given the component is broadly accessible (and we've fixed the focus mangement issues with the modals) I'm less concerned about the wonky tab order being addressed in this PR and holding up the other fixes that will have a broader positive impact once merged.

I made a small PR for the content switcher truncation issue: https://github.com/WordPress/openverse-frontend/pull/738

Here what I noticed:
The content switcher should never be center-aligned, both buttons are always fixed on the right side. Sorry for not being clear enough about this before.
The non-scrolled version of content switcher looks good, but it seems that it broke the scrolled version. The previous square version now has more padding on the right side.

The content switcher should never be center-aligned, both buttons are always fixed on the right side. Sorry for not being clear enough about this before.
The non-scrolled version of content switcher looks good, but it seems that it broke the scrolled version. The previous square version now has more padding on the right side.

Both issues fixed, thank you, @panchovm !


How to enable background record of location?

If the user closes the application or if it shuts off the screen, it is possible to keep recording the user location?

Continuous location updates will be released tomorrow. However it won't ship with support for background location updates. I'm not sure how to handle this scenarios with Flutter plugin yet, as the logic is very different on iOS vs Android, and the OS will restart the app with a special argument containing the location.
Note: Background location updates is a confusing term, as it means the application was killed by the OS while being in background and while listening for location updates. For apps that are still active but just offscreen (in background), you will be able to continue to record the location.

Released in 0.2.1.
Let me know if that works for you and feel free to reopen otherwise.


Iss 507 support filter clause

This PR adds the support for the SelectAggregate method and it's siblings SelectSum, SelectMax, SelectMin, SelectAvg, SelectCount methods, this is better than using SelectRaw.
All these methods accepts an optional filter parameter to filter the aggregated column based on a specified conditions, this will translate to the Aggregation Filter clause on supported compilers like PostgreSQL, and SQLite with a fallback to CASE WHEN statement for the unsupported ones.
Related #507

👍 Thanks, this is really taking this library to the next level!
Thanks @ahmad-moussawi you rock!

missing the alias

Missing alias for this feature

@kenzouno1 what do you mean exactly by missing alias? is this what you are looking for?
var query = db.Query("Transaction")
                .SelectSum("Amount as Total_2020", q => q.WhereDatePart("year", "date", 2020))
                .SelectSum("Amount as Total_2021", q => q.WhereDatePart("year", "date", 2021))
                .SelectSum("Amount as Total_2022", q => q.WhereDatePart("year", "date", 2022))

check more examples here
https://github.com/sqlkata/querybuilder/blob/master/QueryBuilder.Tests/MySqlExecutionTest.cs#L237

That's exactly what I'm looking for. Thank you


[test]: describe tests for useCreateBreakpoint

As part of the task, we need to describe the tests, similar to the tests that already exist

e9c04e5 - Implemented here


[FEATURE] Update to Current Latest Version (v21.0.0)

Related to https://github.com/Poing-Studios/godot-admob-android/discussions/117

Released on Version v2.0.1
https://github.com/Poing-Studios/godot-admob-android/releases/tag/v2.0.1

This Issue will stay hold because a serious bug was encountered that caused the build to break for versions from 3.4.4 onwards:

This bug is related to Godot's source code, and should only be resolved in the future, that said, we will keep the version of Mobile Ads SDK to 20.4.0 (since after this version it will break) until we think it's really necessary to update to 21.0.0
As soon as we switch to version 21.0.0, we will no longer be able to generate version for Godot 3.4.4 backwards because of this bug, read more here: https://github.com/Poing-Studios/godot-admob-android/discussions/117#discussioncomment-3015011


Review PR#173 and some updates

@WilliamBerryiii , I created this local PR which added some format updates as well as the TOC control for each of your article.

@liydu Looks great! Thanks for the clean up/additions.


[Warcraft III] Low FPS on heavy maps without cachedDynamicBuffers

Hello, i've been trying to diagnose some issues with Warcraft 3 and i was advised to post my findings in here. Some images are also below.
My game stutters a lot at 15 FPS whilst playing heavier maps. The problem is mitigated a lot when enabling d3d9.cachedDynamicBuffers
Without cachedDynamicBuffers:

With cachedDynamicBuffers:

Software information
Warcraft 3 1.28.5 DXVK 2.3, Max Settings at 1440x900
System information

GPU: NVIDIA GTX 1050 (Pascal)
Driver: 550.54.14
Wine version: wine-ge-proton-8-26
DXVK version: 2.3

Apitrace file(s)
https://mega.nz/file/YoVXhR4Q#SSKU4w4HbqCztBEtPA4paG1PJjssW2Lewuy9VpAb8P8
Log files
game.log

Thank you for the report. I will attempt to verify this on my own rig soon ish.
Can you give an name example of a heavy map where this occurs?

I got around to testing this now on my RX 7900xtx and x7950 setup with and without rebar. Trying the same Warcraft 3 version i do see that the fps is quite bad with that map (i think likely it is just the map itselft) but i cannot reproduce that the config have any affect on it,

most probably it seems to be the shader cache having an issue with rendering the game itself can you clear the shader cache if possible and retry the setup?

It is very unlikely that the shader cache impact performance.


How do I make the server pagination to show less?

My remote pagination is showing everything. How do I limit them like the default pagination does?
this is my options

options: {
hideSizePerPage: true,
page: 1,
sizePerPage: 25,
onSearchChange: this.searchChange.bind(this),
onPageChange: this.pageChange.bind(this),
paginationSize: 30
}

@ttran94 sorry for lately reply, try to use options.paginationSize and assign a quantity which you want to limit. Let me know if this configuration doesn't help you, thanks


Time difference for 4 phases of run more than 500ms

The below error has been seen many times in previous rounds and we are seeing it in about 5-10% of our power runs. In the interest of time we are just doing reruns, but from all our results, increasing the delta from 500ms to 1s should solve the issue. Below is an example log.
[2023-08-12 09:03:56,445 power_checker.py:753 INFO] [x] Check client sources checksum
[2023-08-12 09:03:56,445 power_checker.py:753 INFO] [x] Check server sources checksum
[2023-08-12 09:03:56,445 power_checker.py:753 INFO] [x] Check PTD commands and replies
[2023-08-12 09:03:56,445 power_checker.py:753 INFO] [x] Check UUID
[2023-08-12 09:03:56,445 power_checker.py:753 INFO] [x] Check session name
[2023-08-12 09:03:56,445 power_checker.py:740 ERROR] [ ] Check time difference
[2023-08-12 09:03:56,445 power_checker.py:741 ERROR] 	The time difference for 4 phase of ranging mode is more than 500ms.Observed difference is<PHONE_NUMBER>677246ms

[2023-08-13 12:36:04,668 power_checker.py:753 INFO] [x] Check client sources checksum
[2023-08-13 12:36:04,668 power_checker.py:753 INFO] [x] Check server sources checksum
[2023-08-13 12:36:04,669 power_checker.py:753 INFO] [x] Check PTD commands and replies
[2023-08-13 12:36:04,669 power_checker.py:753 INFO] [x] Check UUID
[2023-08-13 12:36:04,669 power_checker.py:753 INFO] [x] Check session name
[2023-08-13 12:36:04,669 power_checker.py:740 ERROR] [ ] Check time difference
[2023-08-13 12:36:04,669 power_checker.py:741 ERROR] 	The time difference for 4 phase of ranging mode is more than 500ms.Observed difference is<PHONE_NUMBER>93457ms

[2023-08-13 12:36:04,859 power_checker.py:753 INFO] [x] Check client sources checksum
[2023-08-13 12:36:04,859 power_checker.py:753 INFO] [x] Check server sources checksum
[2023-08-13 12:36:04,859 power_checker.py:753 INFO] [x] Check PTD commands and replies
[2023-08-13 12:36:04,859 power_checker.py:753 INFO] [x] Check UUID
[2023-08-13 12:36:04,859 power_checker.py:753 INFO] [x] Check session name
[2023-08-13 12:36:04,859 power_checker.py:740 ERROR] [ ] Check time difference
[2023-08-13 12:36:04,859 power_checker.py:741 ERROR] 	The time difference for 4 phase of ranging mode is more than 500ms.Observed difference is<PHONE_NUMBER>726807ms

Hopefully addressed here.


Unreachable plug appears as On and unable to set wallSwitch

Hi.
I have a plug that as of now it is not plugged but appears as On. I have "No Response" setting enabled and tried to set wallSwitch for the specific device but it is not accepting the setting.
Log when tried to set wallSwitch:
[deCONZ] Smart plug 7: warning: ui error: wallSwitch: invalid key
Information of the device:
"manufacturer": "_TZ3000_g5xawfcq",
  "model": "TS0121",
  "name": "Smart plug 7",
  "resources": [
    "/lights/7",
    "/sensors/8",
    "/sensors/9"
  ],
  "settings": {
    "expose": true,
    "logLevel": 2,
    "serviceName": "Outlet"
  },
  "type": "lights",
  "zigbee": true

Is there any way to set the plug to appear as no response or at least off when not plugged in?

I have a plug that as of now it is not plugged

Generally speaking, it's a bad idea to power down Zigbee routers.

but appears as On

That's because deCONZ still reports it as on.  Unfortunately, you cannot change that while the device is powered down (unless you hack the database).

I have "No Response" setting enabled

That's not yet implemented, see https://github.com/ebaauw/homebridge-deconz/wiki/Configuration.

tried to set wallSwitch for the specific device but it is not accepting the setting.

Looks like I only implemented that for Lightbulb services, and not for Outlet and Switch services.

I know it is not the best idea to disconnect Zigbee routers, but it is due some changes I am performing at home.  Will try to connect in another location for the moment.
With wallSwitch maybe helps a bit when some plug is disconnected for some time.
Thank you for all the work.

In v1.0.1.


⚠ Bofrost.at has degraded performance

In 8ff1113, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1696 ms

Resolved: Bofrost.at performance has improved in f97e772.


Mobirise 5 Theme loads https://r.mobirise.com/script.js

Each Website based on "Mobirise 5 Theme" seems to load this Script: https://r.mobirise.com/script.js which of course is not hosted locally but on a Mobirise-Server.
So each website-visit calls a ping-back to r.mobiries.com, which is not GDPR compliant in Europe.
I figured out that "/assets/theme/js/script.js" is responsible for loading https://r.mobirise.com/script.js
_0x3886a9(0x1b0,'8U&Q') returns the string "https://r.mobirise.com/script.js"
So by just search for _0x3886a9(0x1b0,'8U&Q') and replace it with " " this behaviour can be solved.
I have no Idea what the contents of https://r.mobirise.com/script.js is good for. Currently I didn't notice any breaking changes by just removing to load it. But of course another option would be to host this script locally and not replace it with " " but with "local-hosted-script.js"
Any Ideas what this is for?
Maybe it is interesting to include this in the white-label Extension. But possibly the obfuscation could change with each updated theme.

Link to Mobirise Forum Post: https://forums.mobirise.com/discussion/30489/mobirise-5-theme-loads-https-r-mobirise-com-script-js


HDDS-10288. Checksum to support direct buffers

What changes were proposed in this pull request?
While we accept Java 8 as the minimum supported JVM, most Ozone production clusters are running on a newer platform like JDK11.
We can leverage Java 9+ interface using reflection to checksum direct buffers directly in native memory.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-10288
How was this patch tested?
Added unit test. Ran it in JDK 11 to ensure same checksum output between on-heap and off-heap.
Perf test is done with HDDS-9843.

Previous benchmarks ran against various checksum implementations in #1910
BPC     Impl            J11-1   J11-2   J8-1    J8-2
------------------------------------------------------
1048576	pureCRC32	11.469	11.03	11.673	11.27
1048576	pureCRC32C	11.111	10.98	11.955	11.395
1048576	hadoopCRC32C	15.926	16.686	17.126	18.884
1048576	hadoopCRC32	21.064	20.656	19.65	19.343
1048576	zipCRC32	118.338	116.067	113.645	111.888
1048576	zipCRC32C	117.705	131.284	0	0

These are JMH throughput numbers - higher is better. The Java zipCRC* implementations are 10x faster than the pure CRC32. So please take care if we switch any implementations to benchmark again and ensure the new one is actually faster!

I merged the PR. We can change the checksum later if we find the alternatives prove to be more efficient.


The debugger panel only shows up on the last session

When running multiple instances of a game to test multiplayer, the debugger panel only shows up on the last session.
Here is a small recording of the problem:
https://github.com/limbonaut/limboai/assets/351420/06a2ce31-88ba-4068-9732-49b8b5b1a108

Thanks for reporting


Difference between $("css selector") and $(By.linkText("text"))?

I need to locate a element, I used the following two ways:
$("body.c1 div.c1.c2.c3  div.c4   div.c.c7 ul.cc.c6.c8  li.LoginUrl a")
		.click()

But I have problem with this way, because some CSS styles will change from time to time. So I switched to the following:
$(By.linkText("login")).click()

Since login text is always will be appeared even changing in css style.
Problem: Some tests failed when using the second way, although it would have to do the same work as the first way. All tests worked well using first way.
What is the difference between them?
htmL

login

You best bet is probably an XPath using the onclick attribute.
$(By.xpath("//a[starts-with(@onclick, \"$('#login')\")]")).click();
This has been tested.
Java
public class TestDemo {
	@Test
	public void findLoginLink() {
		File file = new File("src/test/resources/test.html");
		Selenide.open("file:///" + file.getAbsolutePath());

		$(By.xpath("//a[starts-with(@onclick, \"$('#login')\")]")).should(Condition.exist);
		$(By.xpath("//a[starts-with(@onclick, \"$('#login')\")]")).click();
	}
}

HTML

login

@hana9090  $("css selector") searches by CSS selector, and $(By.linkText("text")) search by text. If link text never changes then the second way $(By.linkText("login")).click() is definitely better.
If some tests fail, you need to analyze why they fail. Probably you have multiple links with the same text?

@JasonTolotta
Thanks
but  I got this error:
Element should be visible {By.xpath: //a[starts-with(@onclick, "$('#loginModal')")]}

@asolntsev
I checked if I have another same text, but I couldn't  see the same text.
but they are a combination from same text, such like: login new account, login special account and finally the login which we are searching for.

@hana9090
The tag a has the attribute onclick
onclick="$('#login').modal('show'); return false;"
I noticed in the error that the XPath value it is trying to locate does not match, unless this element is in a different DOM structure.
Error Message: Element should be visible {By.xpath: //a[starts-with(@onclick, "$('#loginModal')")]}
Note: $('#loginModal') should be $('#login').modal

Hi Jason!
What is the final status? Is the issue resolved, or you still have the
problem?
On Jun 16, 2016 3:22 AM, "JasonTolotta"<EMAIL_ADDRESS>wrote:

@hana9090 https://github.com/hana9090
The tag a has the attribute onclick
onclick="$('#login').modal('show'); return false;"
I noticed in the error that the XPath value it is trying to locate does
not match, unless this element is in a different DOM structure.
Error Message: Element should be visible {By.xpath:
//a[starts-with(@onclick, "$('#loginModal')")]}
Note: $('#loginModal') should be $('#login').modal
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/codeborne/selenide/issues/347#issuecomment-226357183,
or mute the thread
https://github.com/notifications/unsubscribe/AARE3ZydEsOeP4jonVvNTlZqqg8unuGVks5qMJdJgaJpZM4Ivsys
.

@asolntsev
I haven't got anything new from @hana9090 on this issue, so I would say this can be closed.

ok, closing the issue...


Fix broken cache eviction in clockcache

Description
The clockcache is a simple approximation of an LRU cache. Instead of
maintaining an exact ordering of which elements were least recently
used, the cache simply keeps track of whether each element is "used".
When an item is inserted into the cache, it is counted as unused. When
an item is fetched from the cache, it is counted as used.
The eviction algorithm looks through the elements of the cache one by
one, trying to find one to evict. If the item is used, it marks it as
unused. If it is unused, it can evict the item. The next time an
eviction is required, it can continue with the next element.
Through a bug in index manipulation, if the next item to be evicted was
at index 1 of the storage array, the next eviction would not continue to
index 2. Instead, after successfully evicting an item from index 1, it
would attempt (on the next eviction) to evict the item at index 1
(again).
The above, combined with the fact that items just inserted are marked as
unused, meant that it was possible to end up in a situation where each
insert evicted the previously inserted item.
This caused much woe, and thrashing.
Merge requirements
Please take into account the following non-code changes that you may need to make with your PR:

[x] CHANGELOG entry for user-facing changes
[ ] Updated the relevant documentation

The commit I added to simplify the evict method has very different performance characteristic on AMD Ryzen processors (AWS cloud instance):
name            old time/op    new time/op    delta
Eviction/500       647ns ± 1%    1304ns ± 0%  +101.48%  (p=0.008 n=5+5)
Eviction/5000     7.58µs ±11%   11.56µs ± 2%   +52.53%  (p=0.008 n=5+5)
Eviction/50000    64.8µs ±10%   102.8µs ± 5%   +58.61%  (p=0.008 n=5+5)

name            old alloc/op   new alloc/op   delta
Eviction/500       0.00B          0.00B           ~     (all equal)
Eviction/5000      0.00B          0.00B           ~     (all equal)
Eviction/50000    0.40B ±150%     3.00B ± 0%  +650.00%  (p=0.008 n=5+5)

name            old allocs/op  new allocs/op  delta
Eviction/500        0.00           0.00           ~     (all equal)
Eviction/5000       0.00           0.00           ~     (all equal)
Eviction/50000      0.00           0.00           ~     (all equal)

Just wondering if you managed to benchmark version of code that does not split array?

Is https://github.com/timescale/promscale/pull/1603#issuecomment-1232919086 benchmark before the fix or after the fix. If its after the fix, then we are loosing perf in Eviction, right?

Is #1603 (comment) benchmark before the fix or after the fix. If its after the fix, then we are loosing perf in Eviction, right?

This benchmark is after the fix. I was curious why we're losing performance, so I took a deeper look at this to better understand it.
I think that I understand it now. What follows is a bit of a brain dump into understanding what's going on. The bottom line is: buggy code can look fast, but if it's buggy, it doesn't matter how fast it is.
My first hypothesis was: maybe the code being emitted is different enough to be causing a problem (because we broke some "complier magic" like bounds check elimination), so I took to the disassembler (using go tool objdump -s 'clockcache.*evict().*' -S dist/promscale after running make build).
This was before the fix:
...
				self.next = next + 1
  0x1007ace64		910004e1		ADD $1, R7, R1
  0x1007ace68		f9002c01		MOVD R1, 88(R0)
...

And after the fix:
...
				self.next = (startLoc + next + 1) % self.Len()
  0x1007ace74		940003ff		CALL github.com/timescale/promscale/pkg/clockcache.(*Cache).Len(SB)
  0x1007ace78		f94017e1		MOVD 40(RSP), R1
  0x1007ace7c		f94013e2		MOVD 32(RSP), R2
  0x1007ace80		8b020021		ADD R2, R1, R1
  0x1007ace84		b4000480		CBZ R0, 36(PC)
  0x1007ace88		91000421		ADD $1, R1, R1
  0x1007ace8c		9ac00c3b		SDIV R0, R1, R27
  0x1007ace90		9b008761		MSUB R0, R1, R27, R1
  0x1007ace94		f94027e2		MOVD 72(RSP), R2
  0x1007ace98		f9002c41		MOVD R1, 88(R2)
...

That function call is probably not helping, so I replaced self.Len() with len(self.storage):
				self.next = (startLoc + next + 1) % len(self.storage)
  0x1007ace64		8b0200e1		ADD R2, R7, R1
  0x1007ace68		f9401802		MOVD 48(R0), R2
  0x1007ace6c		b4000462		CBZ R2, 35(PC)
  0x1007ace70		91000421		ADD $1, R1, R1
  0x1007ace74		9ac20c3b		SDIV R2, R1, R27
  0x1007ace78		9b028761		MSUB R2, R1, R27, R1
  0x1007ace7c		f9002c01		MOVD R1, 88(R0)

There are more instructions (7 vs 2), but in a branch of code which is not hit very frequently, so I don't think that it could be exactly here that is causing the problem, but there's only one way to find out.
So I used -cpuprofile on BenchmarkEviction (go test -bench='BenchmarkEviction' -run='^$' -cpu=1 -count=5 -cpuprofile master.out.
Then, using pprof's list on the evict function, we can see where time is spent in the function:
Before fix:
(pprof) list evict
Total: 47.50s
ROUTINE ======================== github.com/timescale/promscale/pkg/clockcache.(*Cache).evict in /home/ubuntu/promscale/pkg/clockcache/cache.go
    22.28s     22.28s (flat, cum) 46.91% of Total
         .          .    161:	//     based off an induction variable e.g. `next := range slice`,
         .          .    162:	//     if the value is merely guarded by e.g. `if next >= len(slice) { next = 0 }`
         .          .    163:	//     the bounds check will not be elided. Doing the walk like this lowers
         .          .    164:	//     eviction time by about a third
         .          .    165:	startLoc := self.next
      20ms       20ms    166:	postStart := self.storage[startLoc:]
         .          .    167:	preStart := self.storage[:startLoc]
         .          .    168:	for i := 0; i < 2; i++ {
      30ms       30ms    169:		for next := range postStart {
    20.91s     20.91s    170:			elem := &postStart[next]
     620ms      620ms    171:			old := atomic.SwapUint32(&elem.used, 0)
     680ms      680ms    172:			if old == 0 {
         .          .    173:				insertPtr = elem
         .          .    174:			}
         .          .    175:
      20ms       20ms    176:			if insertPtr != nil {
         .          .    177:				self.next = next + 1
         .          .    178:				return
         .          .    179:			}
         .          .    180:		}
         .          .    181:		for next := range preStart {

After fix:
Total: 50.66s
ROUTINE ======================== github.com/timescale/promscale/pkg/clockcache.(*Cache).evict in /home/ubuntu/promscale/pkg/clockcache/cache.go
    26.45s     26.45s (flat, cum) 52.21% of Total
         .          .    161:	//     based off an induction variable e.g. `next := range slice`,
         .          .    162:	//     if the value is merely guarded by e.g. `if next >= len(slice) { next = 0 }`
         .          .    163:	//     the bounds check will not be elided. Doing the walk like this lowers
         .          .    164:	//     eviction time by about a third
         .          .    165:	startLoc := self.next
      40ms       40ms    166:	postStart := self.storage[startLoc:]
         .          .    167:	preStart := self.storage[:startLoc]
         .          .    168:	for i := 0; i < 2; i++ {
      10ms       10ms    169:		for next := range postStart {
    12.51s     12.51s    170:			elem := &postStart[next]
     370ms      370ms    171:			old := atomic.SwapUint32(&elem.used, 0)
     400ms      400ms    172:			if old == 0 {
         .          .    173:				insertPtr = elem
         .          .    174:			}
         .          .    175:
      50ms       50ms    176:			if insertPtr != nil {
         .          .    177:				self.next = (startLoc + next + 1) % self.Len()
         .          .    178:				return
         .          .    179:			}
         .          .    180:		}
      10ms       10ms    181:		for next := range preStart {
    12.09s     12.09s    182:			elem := &preStart[next]
     520ms      520ms    183:			old := atomic.SwapUint32(&elem.used, 0)
     430ms      430ms    184:			if old == 0 {
         .          .    185:				insertPtr = elem
         .          .    186:			}
         .          .    187:
      20ms       20ms    188:			if insertPtr != nil {
         .          .    189:				self.next = next + 1
         .          .    190:				return
         .          .    191:			}
         .          .    192:		}
         .          .    193:	}

The first thing to note is that practically no time is spent on the line of code that we were looking at in the disassembler. What is also interesting is that where time is spent in the function is different. The explanation for this is relatively simple: the bug that we had would effectively ensure that self.next is 1 very often. If self.next is small, then we will predominantly be looking at items after the split point in self.storage, so we spend all of our time in for next := range postStart, and (practically) none in for next := range preStart.
With this insight, I had another theory: because the location we check for an entry to evict is different in the broken and fixed versions, maybe we spend more time looking for an item to evict in the fixed code. I instrumented the code to tell me how many items in self.storage we looked at during eviction. That turned out not to be it. (The explanation is simple. In the eviction test, whenever we insert an item, we mark all items as used, so we have to do a full pass through self.storage anyway).
The final attempt, which yielded fruit, was the realisation that the memory location that we're looking at is always the same in the broken version. In the broken code, most of the time self.next is 1. What I did next was to modify the fixed code to set startLoc to always be 1 (instead of self.next). Then I ran the BenchmarkEviction code, and saw that it is the same speed as the broken version.
The patch:
diff --git a/pkg/clockcache/cache.go b/pkg/clockcache/cache.go
index 43448ca7..1a36818f 100644
--- a/pkg/clockcache/cache.go
+++ b/pkg/clockcache/cache.go
@@ -162,7 +162,7 @@ func (self *Cache) evict() (insertPtr *element) {
 	//     if the value is merely guarded by e.g. `if next >= len(slice) { next = 0 }`
 	//     the bounds check will not be elided. Doing the walk like this lowers
 	//     eviction time by about a third
-	startLoc := self.next
+	startLoc := 1
 	postStart := self.storage[startLoc:]
 	preStart := self.storage[:startLoc]
 	for i := 0; i < 2; i++ {

The result when comparing between current master and this PR with the above patch:
name          old time/op    new time/op    delta
Eviction/500     336ns ± 1%     338ns ± 1%  +0.64%  (p=0.043 n=10+10)

name          old alloc/op   new alloc/op   delta
Eviction/500     0.00B          0.00B         ~     (all equal)

name          old allocs/op  new allocs/op  delta
Eviction/500      0.00           0.00         ~     (all equal)

(If you're curious, the +0.64% is because we're using self.Len() instead of len(self.storage)).
I believe that this explains what changed in our code to cause this change in performance. What it doesn't explain is why this change causes a ~20% change in eviction performance. I suspect that the answer has to do with "magical CPU stuff", like branch prediction, or cache access patterns. I would like to be able to answer this, but I cannot (yet).

Just wondering if you managed to benchmark version of code that does not split array?

This was the benchmark result: https://github.com/timescale/promscale/pull/1603#issuecomment-1232979484


Steps to set timescaleDB on existing postgresDB

Hi,
can you please provide the exact steps to setup timescaleDB in the existing Postgres database Docker container?

You can try installing it from source, if you want to use an existing Postgres Docker container.
Here is how you can do that: https://docs.timescale.com/latest/getting-started/installation/ubuntu/installation-source

I assume this is resolved. Please re-open if this issue is not resolved.


Change Turbolinks unmount event from before-visit to before-render

fixes #706

This change is

Coverage remained the same at 99.329% when pulling 666237a217764fc09bf43e51a4bcb3769e46808c on szyablitsky:master into 75cf8106e6d7660da7d5283a274245ecdd5fae62 on shakacode:master.

Coverage remained the same at 99.329% when pulling 91254202b188b50e0ecc7bc25a9391593d5c0c90 on szyablitsky:master into 75cf8106e6d7660da7d5283a274245ecdd5fae62 on shakacode:master.

Coverage remained the same at 99.329% when pulling 91254202b188b50e0ecc7bc25a9391593d5c0c90 on szyablitsky:master into 75cf8106e6d7660da7d5283a274245ecdd5fae62 on shakacode:master.

@volkanunsal @szyablitsky Do we have consensus on merging this one?

Reviewed 2 of 2 files at r1, 1 of 1 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.

Comments from Reviewable

Looks good to me. 👍

Imagine I have to explain this to a beginner or in an insturctional video. What do I say? That needs to go in the docs.

@justin808 it is explained here https://github.com/shakacode/react_on_rails/pull/709/files#diff-66873aa717656c99137530d5cf817527R101

Coverage remained the same at 99.329% when pulling 6feb06753b0e9698767079bb59f1aeac53dabeee on szyablitsky:master into 75cf8106e6d7660da7d5283a274245ecdd5fae62 on shakacode:master.

Coverage remained the same at 99.329% when pulling 6feb06753b0e9698767079bb59f1aeac53dabeee on szyablitsky:master into 75cf8106e6d7660da7d5283a274245ecdd5fae62 on shakacode:master.

Coverage remained the same at 99.329% when pulling 6feb06753b0e9698767079bb59f1aeac53dabeee on szyablitsky:master into 75cf8106e6d7660da7d5283a274245ecdd5fae62 on shakacode:master.

Coverage remained the same at 99.329% when pulling 284c0963cb4e3d0b2f2051bf53a16e63d47b60ed on szyablitsky:master into 75cf8106e6d7660da7d5283a274245ecdd5fae62 on shakacode:master.

A few comments...
My main concern is that this may not need to be configurable. I'm not convinced on why the default should be one way or another and why you'd change it.
We should provide a thorough explanation here:
https://github.com/shakacode/react_on_rails/blob/master/docs/additional-reading/turbolinks.md

Reviewed 4 of 6 files at r3, 2 of 2 files at r4.
Review status: all files reviewed at latest revision, 5 unresolved discussions.

CHANGELOG.md, line 9 at r4 (raw file):

*Please add entries here for your pull requests.*
### Added
- Added an option to change Turbolinks unmount event from `before-visit` to `before-render`. To allow fixing "flickering" components when they are unmounted too early [#709](https://github.com/shakacode/react_on_rails/pull/709) by [szyablitsky](https://github.com/szyablitsky)

Please reference the github "issue" as well.

docs/additional-reading/turbolinks.md, line 102 at r4 (raw file):

## Unmount event
By default Turbolinks 5 will handle `turbolinks:before-visit` event for unmounting rendered components before visiting next page. If you use the same component on different pages this can cause the temporary disappearance of component during page load and even moving the parts of the page. To fix this issue switch unmount event to `turbolinks:before-render`.

@volkanunsal @szyablitsky What is the disadvantage to always using before-render? Why did we change this to before-visit?

docs/additional-reading/turbolinks.md, line 102 at r4 (raw file):

To fix this issue switch unmount event to turbolinks:before-render.
To fix this issue set the client side option turbolinksUnmountOnBeforeRender to true.

docs/api/javascript-api.md, line 37 at r4 (raw file):

   * Available Options:
   * `traceTurbolinks: true|false Gives you debugging messages on Turbolinks events
   * `turbolinksUnmountOnBeforeRender: true|false Binds unmount to before-render event

true binds unmounting to the before-render event, false keeps the default behavior of before-visit

node_package/src/ReactOnRails.js, line 62 at r4 (raw file):

   * Available Options:
   * `traceTurbolinks: true|false Gives you debugging messages on Turbolinks events
   * `turbolinksUnmountOnBeforeRender: true|false Binds unmount to before-render event

true binds unmounting to the before-render event, false keeps the default behavior of before-visit

Comments from Reviewable

Coverage remained the same at 99.329% when pulling 052b662c97d0dba79f16a10445149140145f2b22 on szyablitsky:master into 75cf8106e6d7660da7d5283a274245ecdd5fae62 on shakacode:master.

Coverage remained the same at 99.329% when pulling 052b662c97d0dba79f16a10445149140145f2b22 on szyablitsky:master into 75cf8106e6d7660da7d5283a274245ecdd5fae62 on shakacode:master.

Coverage remained the same at 99.329% when pulling 052b662c97d0dba79f16a10445149140145f2b22 on szyablitsky:master into 75cf8106e6d7660da7d5283a274245ecdd5fae62 on shakacode:master.

Removed option and set unmount event back to turbolinks:before-render.

@volkanunsal Are you good with this change? I'd prefer not to have an extra option if it's not necessary.

The reason I settled on before-visit initially is because it solved the
error message introduced by before-render at the time I tested it for #610.
We still don't fully understand why the double render error was being
thrown by React.
--
Volkan Unsal
Product Engineer
volkanunsal.com

I'm ok with removing the configuration option.

Reviewed 5 of 6 files at r5.
Review status: all files reviewed at latest revision, 5 unresolved discussions.

Comments from Reviewable

Fixed in 6.5.1.


wrong parse of properties with objects in them

In controller.ts made two errors. As result files not valid for TS.

In interface
shoreSideOwner.email?: string;
In one of the methods for queryParamBase
shoreSideOwner.email: params.shoreSideOwner.email

Valid: shoreSideOwner:{email?: string}; and shoreSideOwner:{email: params.shoreSideOwner.email}

Could you, please, share the relevant part of the schema?


a question about token from url

hello, I use the Axiso as the Ajax framework to request data, but in my project，all requests need a token from the url to be signed.this leads me to have to be instantiation axios object  in client, and then ,my page can not render in server, so hot to resolve this case that i must instantiation axios object in client with a token from url?

Please follow the issue template. Which clearly says questions should be posted on https://spectrum.chat/next-js.


First part of the porting the current ./test/run test suite to Go

Image info tests are running, therefore I think it's time for reviewing. Please note that this is meant to be a part of the integration test suite (therefore run on a pristine Fedora VM, not on Travis CI).
Changes from the Python version:

osbuild is called from PATH, not from the submodule.
--arches argument is gone. Instead only the tests for the current arch are run.
Go's flag package doesn't support arguments with multiple values, therefore I just dropped it for now. We can revisit this later.
--distros argument is gone. Instead only the tests for the host distro are run.
The same reason as the previous point, we can also revisit this later.
--cases argument is now a positional argument. (osbuild-image-tests CASES... ), when no CASES are given, all the tests are run
For diffing the actual output from image-info and the expected output Go's cmp library is now used. I think this approach is much simpler (no need for two temporary files) and I even like its output more.

I think it is ok, however, to start out mimicking the current behaviour and then build on that to move it over to using the weldr API.

Yeah, that was exactly the plan, start by re-implementing the suite without touching the testcases and then switch from osbuild to osbuild-composer. I think this approach is much less error-prone. :-)


[release-0.26] Consumer manager use factory merged errors (#1044)

ConsumerGroup Manager-use factory merged errors channel (fix for #1043)

This is a cherry-pick of #1044

/lgtm