[MRG/REVIEW] Support Pipfile / Pipfile.lock with pipenv

To help you review this PR
I've added a new buildpack, it will allow repo2docker to detect Pipfile / Pipfile.lock and use them to install Python packages with pipenv. Here is a repo that made me want this functionality.
There are 48 files changed in this PR, but most of them are relating to tests of the functionality added. Other than these tests, we have changes to...
.gitignore - When running tests locally I ended up with some artifacts, this change helped me avoid these.
.travis.yml - I declared the need for another build job for our CI to run tests against this buildpack.
docs/source/config_files.rst - I documented the new build pack
repo2docker/app.py - I added an import statement, sorted the imports alphabetically, and added the buildpack in the ordered list that decides what buildpack has priority assuming it decides it can do something through the detect function a buildpack should have.
repo2docker/buildpacks/init.py - Allow repo2docker.buildpacks module expose the new buildpack.
repo2docker/buildpacks/pipfile/init.py - The logic of the buildpack, this is the key part to review I think.
The rest of the files are for the tests within the tests/pipfile folder. I added quite a bit of tests I'd say!

About
This PR aims to close #174. The goal is to make repo2docker consider Pipfile and Pipfile.lock dependency files using pipenv.
Code strategy
The strategy adopted was to mimic sections for how a requirements.txt configuration file was treated but give these new Pipfile.lock or Pipfile files a higher precedence.
Documented process
I wrote in this discourse topic as I was speaking to a rubber duck to help myself think clearly along the way.
What to review
The files

Some documentation within docs/source/config_files.rst.
The actual functionality introduced all resides in repo2docker/buildpacks/python/__init__.py. All three functions are modified a bit, namely detect(), python_version(), and get_assemble_scripts().
Loads of added tests that can give clarity of what I wanted to accomplish in /tests/venv/pipfile.
Small additions to a .gitignore file catching some scrap generated after running all the pytest.

Concerns

Not using PyEnv that is streamlined to work alongside Pipenv.

Not using PyEnv to manage the Python version concerns me, I choose to parse Pipfile.lock (JSON), Pipfile (TOML), and runtime.txt with Regex within python_version() that is overriding the CondaBuildPack's function and influences the installed Python version.
Not using PyEnv, we ignore patch versions of Python, just like runtime.txt does, but the Pipfile format supports python_full_version specifications.

Not entering pipenv shell, missing out on automatic loading of .env files for example.

Not managing to install dependencies in a Pipfile with Python 3.5 or lower.
Step 40/47 : RUN ${KERNEL_PYTHON_PREFIX}/bin/pipenv lock --python >${KERNEL_PYTHON_PREFIX}/bin/python
---> Running in c7ae30385795
Creating a virtualenv for this project…
Pipfile: /home/erik/Pipfile
Using /srv/conda/bin/python (3.5.5) to create virtualenv…
⠙ Creating virtual environment...Already using interpreter /srv/conda/bin/python
Using base prefix '/srv/conda'
New python executable in /home/erik/.local/share/virtualenvs/erik-zof0I2Qp/bin/python
ERROR: The executable /home/erik/.local/share/virtualenvs/erik-zof0I2Qp/bin/python is not >functioning
ERROR: It thinks sys.prefix is '/home/erik' (should be '/home/erik/.local/share/virtualenvs/erik->zof0I2Qp')
ERROR: virtualenv is not compatible with this system or executable

✘ Failed creating virtual environment
[pipenv.exceptions.VirtualenvCreationException]:   File "/srv/conda/lib/python3.5/site->packages/pipenv/vendor/click/decorators.py", line 17, in new_func
[pipenv.exceptions.VirtualenvCreationException]:       return f(get_current_context(), *args, **kwargs)
[pipenv.exceptions.VirtualenvCreationException]:   File "/srv/conda/lib/python3.5/site->packages/pipenv/cli/command.py", line 319, in lock
[pipenv.exceptions.VirtualenvCreationException]:       ensure_project(three=state.three, >python=state.python, pypi_mirror=state.pypi_mirror)
[pipenv.exceptions.VirtualenvCreationException]:   File "/srv/conda/lib/python3.5/site->packages/pipenv/core.py", line 574, in ensure_project
[pipenv.exceptions.VirtualenvCreationException]:       pypi_mirror=pypi_mirror,
[pipenv.exceptions.VirtualenvCreationException]:   File "/srv/conda/lib/python3.5/site->packages/pipenv/core.py", line 506, in ensure_virtualenv
[pipenv.exceptions.VirtualenvCreationException]:       python=python, site_packages=site_packages, >pypi_mirror=pypi_mirror
[pipenv.exceptions.VirtualenvCreationException]:   File "/srv/conda/lib/python3.5/site->packages/pipenv/core.py", line 935, in do_create_virtualenv
[pipenv.exceptions.VirtualenvCreationException]:       extra=[crayons.blue("{0}".format(c.err)),]
[pipenv.exceptions.VirtualenvCreationException]: /home/erik/.local/share/virtualenvs/erik->zof0I2Qp/bin/python: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared >object file: No such file or directory

Failed to create virtual environment.

Opinionated

pipenv will be used to do the installation as compared to using it to create a requirements.txt file and then do the installation with pip.
The first among environment.yml, Pipfile.lock, Pipfile, and requirements.txt will be used to install packages.
The first among Pipfile.lock, Pipfile, and runtime.txt will be used to decide python_version().
setup.py is ignored if a Pipfile(.lock) exists, as they can declare such installations. This can for example be seen in this repo.

Why didn't I use PyEnv?

At the point pipenv install would run that in turn triggers PyEnv to setup the right Python version, a Python version would have already been installed. So using PyEnv would have required deeper changes that I wasn't ready to tackle without better understanding about repo2docker.
Installing PyEnv wasn't something I could do with pip or similar, but it required adding apt-get packages etc. first which was a hassle.

This pull request has been mentioned on Jupyter Community Forum. There might be relevant details there:
https://discourse.jupyter.org/t/an-unfolding-story-of-my-first-contribution-to-repo2docker/839/1

This pull request has been mentioned on Jupyter Community Forum. There might be relevant details there:
https://discourse.jupyter.org/t/an-unfolding-story-of-my-first-contribution-to-repo2docker/839/1

This pull request has been mentioned on Jupyter Community Forum. There might be relevant details there:
https://discourse.jupyter.org/t/an-unfolding-story-of-my-first-contribution-to-repo2docker/839/1

This pull request has been mentioned on Jupyter Community Forum. There might be relevant details there:
https://discourse.jupyter.org/t/an-unfolding-story-of-my-first-contribution-to-repo2docker/839/1

This pull request has been mentioned on Jupyter Community Forum. There might be relevant details there:
https://discourse.jupyter.org/t/an-unfolding-story-of-my-first-contribution-to-repo2docker/839/1

This pull request has been mentioned on Jupyter Community Forum. There might be relevant details there:
https://discourse.jupyter.org/t/an-unfolding-story-of-my-first-contribution-to-repo2docker/839/1

This pull request has been mentioned on Jupyter Community Forum. There might be relevant details there:
https://discourse.jupyter.org/t/an-unfolding-story-of-my-first-contribution-to-repo2docker/839/1

This pull request has been mentioned on Jupyter Community Forum. There might be relevant details there:
https://discourse.jupyter.org/t/an-unfolding-story-of-my-first-contribution-to-repo2docker/839/1

This pull request has been mentioned on Jupyter Community Forum. There might be relevant details there:
https://discourse.jupyter.org/t/an-unfolding-story-of-my-first-contribution-to-repo2docker/839/1

This pull request has been mentioned on Jupyter Community Forum. There might be relevant details there:
https://discourse.jupyter.org/t/an-unfolding-story-of-my-first-contribution-to-repo2docker/839/1

This pull request has been mentioned on Jupyter Community Forum. There might be relevant details there:
https://discourse.jupyter.org/t/an-unfolding-story-of-my-first-contribution-to-repo2docker/839/1

This pull request has been mentioned on Jupyter Community Forum. There might be relevant details there:
https://discourse.jupyter.org/t/an-unfolding-story-of-my-first-contribution-to-repo2docker/839/1

This pull request has been mentioned on Jupyter Community Forum. There might be relevant details there:
https://discourse.jupyter.org/t/an-unfolding-story-of-my-first-contribution-to-repo2docker/839/1

This pull request has been mentioned on Jupyter Community Forum. There might be relevant details there:
https://discourse.jupyter.org/t/an-unfolding-story-of-my-first-contribution-to-repo2docker/839/1

I think we should make a new build pack for Pipfile support instead of modifying an existing one.
I think we should continue to use conda to install the version of Python needed as pipenv doesn't solve this and we already have conda.
I need to think about python_full_version and python_version. Right now I think we should extract the Python version from the Pipfile(.lock) and install it via conda. However the python_full_version might be incompatible with conda package version strings? To be checked.

Having lots of tests is great and good work on creating lots of them already! You mentioned in the discourse post that it takes a while to run all of them. That's right. We've been trying to move more and more things to tests/unit to test small parts of repo2docker in isolation. Then the tests in tests/venv and so on can be more like integration tests.
The advantage of the unit tests is that they run very fast and don't need a docker daemon.
For example a small tests to check that version parsing does something useful is
https://github.com/jupyter/repo2docker/blob/eb551eb248e17132fd36f121ba89c0572931b94e/tests/unit/test_env_yml.py#L10-L17
I'd take a look around https://github.com/jupyter/repo2docker/tree/master/tests/unit to see how different things are tested. A lot can be done with temporary directories (for example "Does detect() work correctly and give precedence to the right things?"), the next level up is to use mocks to stub out other stuff that is expensive and not what you are trying to test (for example the docker client can be a mock). As we get more into mocks the complexity of the test increases (you need to understand how mocks work), you can test more things in less run time, you are really only testing things in isolation. So it is all trade offs all the way down :)

One more thing to keep at the back of our minds: we want to eventually have separate kernel and server environments. This was also mentioned in the mamba PR and is definitely needed for updating conda itself.

I think we should make a new build pack for Pipfile support instead of modifying an existing one.

I lean towards thinking it should be one buildpack, but it becomes two I'd like to rename the current PythonBuildPack to RequirementsBuildPack or something. I figure requirements.txt and Pipfile have a lot in common, a lot more than environment.yml and Pipfile, or environment.yml and requirements.txt. Can you help me overcome my confirmation bias towards the current implementation by providing a reason?

I think we should continue to use conda to install the version of Python needed as pipenv doesn't solve this and we already have conda. I agree with not using pyenv.

Ideally I'd like to see repo2docker function with pipenv managing Pipfile, Pipfile.lock, with PyEnv to manage the Python version without any special management. Perhaps that isnt possible, I understand it can be quite complicated to mess with the Python version at the point in time pipenv is about to install things.
Hmmm... I wonder if PyEnv can be run to parse a Pipfile(.lock) first and then later, Pipenv will install the packages but when PyEnv is run earlier, it only cares about the Python version... Speaking of which, that is what condabuildpack does right? Hmmm....

I need to think about python_full_version and python_version. Right now I think we should extract the Python version from the Pipfile(.lock) and install it via conda. However the python_full_version might be incompatible with conda package version strings? To be checked.

I saw that requirements.txt only extracted major+minor version and ignored the patch version or any beta/alpha etc. So, I did the same thing for Pipfile and Pipfile.lock parsing, for python_version or python_full_version - only the major and minor version is extracted. Which is a silent failure to comply with the specification in the Pipfile / Pipfile.lock :'( I dislike this also... :hankey:
I think the requirements.txt and requirements3.txt should be named to indicate that

One more thing to keep at the back of our minds: we want to eventually have separate kernel and server environments. This was also mentioned in the mamba PR and is definitely needed for updating conda itself.
I don't know yet what it means for this PR but its worth taking a look at how we handle Python 2 kernels/environments. https://github.com/binder-examples/python2_runtime#specifying-a-python-2-environment-with-runtimetxt in particular requirements.txt vs requirements3.txt. The text in the README could be improved. What it is trying to tell you is that requirements.txt will be installed in your kernel environment and if you need to install things in the notebook server's environment (that always uses Python 3) you should write those things in requirements3.txt.

Ah! This is very complicated to me and I'm struggling to grasp things still. Hmmm... Do I get it right if I think these are files that the users provide in git repositories to be built, and requirements3.txt will always be in "the jupyter server environment" (notebook environment) while requirements.txt will always be in "the kernel environment"?

I'll read up on the not-build-a-dockerfile tests!
I'll also make sure the pip-version used aligns like it does it the current master branch!
I'll try learn more about PyEnv, I don't like how my lack of understanding is the key reason for not using it.
I'd also love to learn if we can manage to get the .env files influence the environment etc like Pipenv does for us if we could run pipenv shell - this requires further learning also.

Can you help me overcome my confirmation bias towards the current implementation by providing a reason?

I think the code will be a lot easier to follow as it won't contain if requirementstxt: ...do stuff ... elif pipfile: ...do something else... and it fits with the rest of our build packs where each of them deals with one kind of scenario (a requirements.txt is found or a environment.yml is found, or ... etc). It also means we won't have to change the existing PythonnBuildPack with the added work of makingn sure nothing gets broken while we modify it. I don't think that the code to handle the requirements.txt case and the Pipfile case have that much in common, except for needing to have a Python interpreter provided for them (via innheriting from CondaBuildPack)
I won't offer an opinion on the pros and cons of renaming PythonBuildPack except that that should be a new PR. Changing it or not isn't part of the minimal changes needed to implement this feature so it should go in a new PR to keep the diffs manageable.
The main take away on having two environments is: the notebook server needs Python >= 3.6 so if the user wants an old version of Python we need to create a separate environment for the user's Python and packages. We will need to do this more and more in the future (is my guess).
I would extract as much version information as possible from the Pipfile and see how it maps to conda packaged versions of Python. We invented runtime.txt so it is a file that only repo2docker uses -> we shouldn't follow its lead if we can do something better.
I wouldn't use PyEnv to install the Python interpreter. The main motivation is that it will add another way of providing Python that we will need to understand, maintain, and support. I don't see any benefit from using PyEnv if we already have a well tested conda based setup. Following the spirit of minimal change per PR I'd delay that discussion to a new PR as well.

@betatim thanks for helping my mind come to ease, I'll adjust!
To make the minimally viable change, I'll also not extract environment information in this PR but leave that as a future PR, sounds ok?

To make the minimally viable change, I'll also not extract environment information in this PR but leave that as a future PR, sounds ok?

Is this the .env support? If yes I think that sounds like a good plan. It is also a cool feature that helps remove the need for the special, invented here start file.

Yepp that is what i vaguely referred to! It is automatic if we use pipenv shell but that seems complicated to do in a Dockerfile giving us errors, and also what would that mean really anyhow

Figuring out how to combine pipenv shell with launching jupyter kernels sounds like enough work for a whole new PR :)

I've also been wondering about the long term prospects of Pipfile now that pyproject.toml is a thing and much more 'officially' sanctioned. I'm reading to understand this more, here are some links I'm reading.

https://github.com/pypa/pipfile/issues/27
https://github.com/pypa/pipfile/issues/3
https://caremad.io/posts/2013/07/setup-vs-requirement/
https://snarky.ca/clarifying-pep-518/

and lots more.
I don't understand the difference well yet, but will try and keep reading.

Pweh okay here comes an update! I made changes to extract the additions in this PR to a separate buildpack.

I extracted the pipfile logic to a separate buildpack called PipfileBuildPack. I added it after CondaBuildPack (environment.yml) but before PythonBuildPack (requirements.txt).
I have still only added full e2e tests and made the CI trigger a new job for the Pipfile buildpack and the tests I've added to it.

Questions of my own
Q1: Relative paths from Pipfile in a binder directory
In the added tests/pipfile/setup-py-explicit-in-binder-dir test. It has a Pipfile referencing a local python package (Setup.py) with path=".." rather than path=".". I think it makes sense but I'd like some confirmation.
See for example: https://github.com/jupyter/repo2docker/blob/5367f805411d6df5bdb721ac268244850de076a9/tests/pipfile/setup-py-explicit-in-binder-dir/.binder/Pipfile
Q2: Python 2 stuff
See this comment: https://github.com/jupyter/repo2docker/pull/649#pullrequestreview-236425118

Stopping by to let you know that we merged #699 which means we are now using black as code formatter. The motivation for doing this is to have a uniform style that will make it easier to read code.
You can install black with pip install black and run it on your code with black . in the top level directory of this repo. Travis enforces this style for all new PRs. For existing PRs (like this one) the best course of action is to rebase your branch on the latest master.
We also have a pre-commit hook to run black automatically which I'd install if you contribute to repo2docker more frequently.
We added a few sentences to the contributing docs https://repo2docker.readthedocs.io/en/latest/contributing/contributing.html#code-formatting. Feedback welcome (not on the choice of black though, that is final :) )

@betatim rebasing this PR caused a huge amount of formatting conflicts as I have a commit history changing within the PythonBuildPack before extracting it all to PipfileBuildPack. So I merged the new master instead and then applied black formatting.
My first impression of using black is very positive!

@betatim is the CI testing every single commit leading up to the final status of the PR?

Update
Black formatting issue resolved
I've learned that running black will not autoformat the verify files without .py file extension, while pre-commit run --all-files will. This caused the issue where I thought I had complied but didn't according to CI. The issue is discussed briefly here but was closed as it would incur too much of a performance hit.
Regarding notes in https://github.com/jupyter/repo2docker/pull/649#issuecomment-491607215

Q1: I asked for confirmation, but I think its OK
Q2: I'm now OK about the supporting requirements3.txt

PR Status: MRG

@yuvipanda I'm almost done reading through http://andrewsforge.com/article/python-new-package-landscape/ and that provided great insights and overview!

PEP 517 and PEP 518—accepted in September 2017 and May 2016, respectively—changed this status quo by enabling package authors to select different build systems. Said differently, for the first time in Python, developers may opt to use a distribution build tool other than distutils or setuptools. The ubiquitous setup.py file is no longer mandatory in Python libraries.
--- NOTE: pyproject.toml is related to these PEPs

To conclude though, we need some new lines in this picture:

I just finished adding a section to the first post of this PR that helps you overview the changes to the code, see: https://github.com/jupyter/repo2docker/pull/649#issue-272182372
I'm really looking forward to get this merged as there are some binder-unaware repositories that I want to make a PR to, where I simply update the README to include a mybinder badge ^^

With a Pipfile like:
[[source]]
url = 'https://pypi.python.org/simple'
verify_ssl = true
name = 'pypi'

[requires]
python_version = '2.7'

[packages]
requests = '*'

I was expecting to get a kernel that runs Python 2 and has requests installed. However the build crashed :-/ If instead I set the Python version to 3.6 I also get a warning that I am using Python 3.7 but asked for 3.6. Related to single quotes? I copy&pasted https://github.com/pypa/pipfile#pipfile

Thanks a lot @betatim for your review!!! As usual they are very helpful! :heart: Now I'm feeling unblocked to continue working on this as I'm eager to do!

I've struggled a lot (8 hours) to get go from Pipfile / Pipfile.lock to some installed python2 setup, but WOW this is hard while starting out from being inside one of two environments already.
It is hard to summarize the challenge, but pipenv leads to the creation of virtual envs, and they don't like to be created unless everything is alright, and I start to doubt I can ever get that to happen from within the realms of a buildpack assuming the other infrastructure of repo2docker is like it is. Hmmm...
What would you say about this PR if I focus on a well functional python3 only BuildPack that strips away all python2 related support @betatim?
I could for example:

make it fail hard if we find Pipfile etc but python2 is declared (how do I propagate a failure btw? - like "this is a repo we know we will fail to manage!")
or... make it silently do nothing when it finds Pipfiles but knows of the issues of python2 it cannot overcome so it simply ignores them, like we do currently for both py2 and py3.

After 13 hours now, I'm thinking I may be more stubborn than a goat. But....
I made it! Usage of Python 2 should work now I think. :goat:  :crescent_moon: :cactus:

I did a quick iteration on the documentation of Pipfiles - @betatim I think this PR may be close to complete now.
Hmmm okay I realize there may be a changelog etc I should note things in.

Wieeee!

Merging this now. 👏 for the stamina to see this through!!

Wieee thanks for your excellent review @betatim ! :heart:
I merged it to mybinder.org deploy it and it works on mybinder.org now!

Noice! Do you want to make a new repository on https://github.com/binder-examples/ that demos this? Then we can send a tweet out as well.

@betatim yes that would be awesome! :D

yahoooo!


Fix toggling after scrolling resulted in blank space

Fix #63334.
Previously, the data used by update_scrollbars() and _update_dimensions() in their calculations depended on each other, which caused some problems.
Now, the calculation of child_max_size is put into get_minimum_size(), as the containers call update_minimum_size() before calling queue_sort().

CC @jasonwinterpixel @AaronRecord

Guess I should've tested https://github.com/godotengine/godot/pull/63295 more thoroughly 🙃
Thanks for the fix, will try and review when I get a chance

I really don't like the naming of a lot of the variables in this code 🙃
Like here, with min_size and minsize:
https://github.com/godotengine/godot/blob/aa135e448ed133ee39c298f5996f39beba75e128/scene/gui/scroll_container.cpp#L39-L62
And here, where the terms min and max seem to be used interchangeably:
https://github.com/godotengine/godot/blob/aa135e448ed133ee39c298f5996f39beba75e128/scene/gui/scroll_container.cpp#L426-L428
if I understand the code correctly it'd be better to rename child_max_size to largest_child_min_size

I left a few small suggestions but otherwise the changes look good 🙂

if I understand the code correctly it'd be better to rename child_max_size to something like largest_child_min_size Also _update_dimensions should probably be renamed to something like _resposition_children

I think it's better to add a note. It can be confusing to have big and small at the same time.

The case where *_scroll_mode is SCROLL_MODE_SHOW_NEVER was previously missed.
Now, the result of update_scrollbars is the same as before. The max/page/value of the ScrollBar will all be set to the appropriate value.
Please review it again.

Thanks!


docker 运行错误

2023-11-21 10:08:40 2023-11-21 10:08:40.1233|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request starting HTTP/1.1 POST http://localhost:10000/api/elsa/workflow/definitions application/json;charset=UTF-8 728
2023-11-21 10:08:40 2023-11-21 10:08:40.1233|DEBUG|Elsa.Services.Locking.DistributedLockProvider|Acquiring a lock on 1b803cc701da4ce0b391a17b86017537
2023-11-21 10:08:40 2023-11-21 10:08:40.1233|DEBUG|Elsa.Services.Locking.DistributedLockProvider|Lock acquired on 1b803cc701da4ce0b391a17b86017537
2023-11-21 10:08:40 2023-11-21 10:08:40.1233|DEBUG|Elsa.Services.Workflows.WorkflowLaunchpad|Found 0 workflows with correlation ID 1b803cc701da4ce0b391a17b86017537
2023-11-21 10:08:40 2023-11-21 10:08:40.1233|DEBUG|Elsa.Services.Workflows.WorkflowLaunchpad|Triggering workflows using HttpEndpoint
2023-11-21 10:08:40 2023-11-21 10:08:40.1314|WARN|Volo.Abp.AspNetCore.Mvc.AntiForgery.AbpValidateAntiforgeryTokenAuthorizationFilter|The antiforgery token could not be decrypted.
2023-11-21 10:08:40 2023-11-21 10:08:40.1314|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request finished HTTP/1.1 POST http://localhost:10000/api/elsa/workflow/definitions application/json;charset=UTF-8 728 - 400 0 - 8.3158ms

10:08:40.1314|WARN|Volo.Abp.AspNetCore.Mvc.AntiForgery.AbpValidateAntiforgeryTokenAuthorizationFilter|The antiforgery token could not be decrypted.

刷新网页重试。


[MRG] Python 3.7 as the default in the docs

The latest version of repo2docker (0.8.0) seems to be using Python 3.7 as the default.
This change updates the docs to reflect that.

Thank you for this. Sorry we missed updating the docs :-(
(restarted travis, it timedout fetching packages from a apt-get mirror)


java.lang.IllegalStateException: Cannot update oldest data, last time=1626696600, new time=1626696300

Hi Team,
The application is getting crashed because of the following error  "java.lang.IllegalStateException: Cannot update oldest data, last time=1626696600, new time=1626696300"
is there any Check or way to avoid the crash

is there any Check or way to avoid the crash

@supriyakhankarnw18 If you want to update not the last bar, you have to use setData instead of update, since update might be used to update the latest bar or to add a new one.

@timocov  we want to update it only. but there might be some cases where we can get such data. we just want that in any case application should not get crashed

@supriyakhankarnw18 not quite sure that got your point.

we just want that in any case application should not get crashed

the application won't crash if you will use the api properly. If you're trying to use update not for latest bar it will crash for sure.

@timocov You can do some validation on library's end , so that it won't crash.

@supriyakhankarnw18 this is exactly what we do and that's why you get you app crashed. Almost any incorrect usage of the library will cause the crash of the app. Otherwise you will never get the fact of incorrect usage (if the library will be silent).
Please consider use the library in correct way.


Game cycling broken

Call me stupid, but I've enabled game cycling and its the default timing, am I getting something horribly wrong? The function doesn't work at all, and I tested my theory by putting a alternate account on the same discord to see if it cycled, but it didn't. Is anyone else having this same issue?
(If you want my config, I'll give you it but ofc without the token)

Did you put games in the game config file?

Don't forget you can't see the games actually rotating. Only other people can see it. Idk if that is the problem, but if it isn't then I'll need the config (without token).

If the comments above are not the reason why it doesn't work, then feel free to re-open


Fix date in article because it affects sort order

hey @adrianbr thanks for opening up your first PR! can you say little more about what issue you're experiencing with the blog? the page doesn't really have a sort so would love to understand what you're experiencing! thnk you!

@mirnawong1 the page sorts by time of article. We created an article in Dec 2023 and I guess they wanted to update the date to  Jan 2024 but instead they did jan 2023, which causes the article to be burried  and not visible among the latest articles


Preventing NullPointerException in ActionBar

I signed it!

As agreed in https://github.com/googlesamples/android-architecture/pull/30, closing.


Feature request: Invert match filter

From PistolsAtDawn:

If it isn't too difficult, could we have the ability to filter out keywords while using the filter search (i.e. filter out beta versions with "-beta" or something like that)? Please don't put much time into this if it looks at all difficult. It's most definitely not necessary.

After some consideration, I'm closing this as "won't do". It's not undoable, but the amount of work and added complexity to both code and UI is not worth the minor gain of this feature, I'm afraid.


Support composer gcp-build on gcp + cloud-run

gcp-build composer script handling is an excellent tool to add custom steps to deployment in Google Cloud. It's already handled by AppEngine, and I see no reason it shouldn't be handled by CloudRun.
All it does is run extra script in case composer.json go gcp-build scripts variable set.
Example: https://github.com/GoogleCloudPlatform/buildpacks/blob/559569a89fe05b1ca6bd4eb6c2fb6412df8b10a7/builders/testdata/php/appengine/gcp_build_no_dependencies/composer.json#L2

@sl0wik This change will only modify php specific builder. Afaik, we need to make similar change to standard gcp/base builder to be able to use composer-gcp-build with pack build --builder=gcr.io/buildpacks/builder:latest, as you mentioned you were trying in issue description.

@kritkasahni-google you are right, I will update this PR.

@sl0wik I already sent out a change internally to fix it, you will see the commit in repo soon.

@sl0wik @kritkasahni-google looks like the fix was made in 1b1d9b3 . Thanks for the PR!


"Magic" firmware updater

(Thought I opened this earlier, but apparently not)
Tool to update firmware from flash, may need more testing but seems to work. In releases, generates a magic-[version].blit containing the firmware from that build. Metadata is also generated to refer to the correct version.
Author is set to "pimoroni" since you probably don't want it to look like firmware updates are coming from some random person :smile:. Could maybe do with a unique splash...
(Hmm, there's a bit of name inconsistency here "fw-flash"/"firmware updater"/"magic")

This going out in releases is just... :cake: ... beautiful! Thank you.
I guess we could solve the name inconsistency by standardizing on "firmware-update" across the board.
The "magic" origins could be alluded to with some clever cover art. :laughing:

It's all firmware-update/firmware-update-vBLAH now. I'll leave clever cover art to someone with more art skills than me...
Just realised you can do make firmware-update.flash to flash the firmware now...

Thank you! I'm giving cover art some thought. Will see what I can whip up tomorrow eve.


Fix hook failing in VisualStudio

Description
This PR fixes Visual Studio failing to run our git hook by using /bin/sh as a shebang, meaning only Posix shell (no more if [[ something ]])
While working on this I noticed some output messages were mixing Windows and Unix path separators, producing things like that:
$ ggshield.exe install -m global -t pre-commit -f
pre-commit successfully added in C:\Users\User/.git/hooks/pre-commit

I took the opportunity to migrate the code in install.py to use Path, fixing that issue while doing so.
Best reviewed commit-by-commit.
Issue
Fixes #467

Codecov Report

Merging #476 (4230543) into main (5203ea2) will decrease coverage by 0.03%.
The diff coverage is 78.94%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@            Coverage Diff             @@
##             main     #476      +/-   ##
==========================================
- Coverage   93.48%   93.46%   -0.03%
==========================================
  Files          78       78
  Lines        3592     3595       +3
==========================================
+ Hits         3358     3360       +2
- Misses        234      235       +1

Flag
Coverage Δ

unittests
93.46% <78.94%> (-0.03%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

ggshield/cmd/install.py
84.90% <78.94%> (-1.10%)
:arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


Minor bug in the example

I think I've found a bug in the example code. To make it work, in the second file I had to change line 6 to:
todos?: String[];
With a capital S.
I also had to add a line for the import of React.

Alex T fixed it up!  Thanks @a-tarasyuk!


Name in header isn't updated

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Verify the header of a user who is on OOS  until Jan 16th

Expected Result:
Show OOO till16 Jan, she updated it to that yesterday (and it shows it in the notification)
Actual Result:
Shows as Jan 9
Workaround:
unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] MacOS / Desktop

Version Number: Version 1.2.52-4
Reproducible in staging?: Needs reproduction
Reproducible in production?: Needs reproduction
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:

Expensify/Expensify Issue URL:
Issue reported by: @mallenexpensify
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1673476578716469
View all open jobs on GitHub

I take a look at this and see if I can reproduce

Thanks @yuwenmemon , I'll post if it happens again. @alex-mechler can you too plz?

Not sure why I was tagged here, I haven't reported this 😅

Oh, I was so confused. Yeah, the personal details are not being updated in the client. Something's up with that push notification.

@dangrous is there a reason why we only send a Push Notification to the user who is updating the Display Name here?

Looking at the design doc for the original refactor of this command - maybe we just didn't think of that?

Yeah I don't think that was ever in scope (updating everyone else when I change my display name) - there's lots of places we could do something like that (ex: updating a person's pronouns, timezone, and here we're talking about display name)

Updating names/statuses, timezones and others seems like something we'd need, right?  Especially if/once we actually have status updates.  Possibly too if we show someone is on/offline.

Not sure why I was tagged here, I haven't reported this 😅

Sorry @alex-mechler , I got this mixed up with the 3x Chronos message GH

Okay so fixing this is pretty simple I think. We should simply send pushes to anyone on your personalDetailsList (i.e. the value of Get?rvl=personalDetailsList) whenever you update your details. The thought is: if they're on your personalDetailsList, then you're on theirs (since you share a policy, domain, chat, etc.).
Right?

However, we need accountIDs rather than emails as the current query provides us. So we'd probably need to write a new Auth command for this.

Aah interesting - @yuwenmemon if you move forward implementing this, we may want to revisit paying contributors who reported things like Pronouns & Timezone not updating automatically when a user updates them?
I think I remembered discussing somewhere the concept of 1 channel message instead of many individual account messages - I will link the convo if I find it

Well, it would just be when updating your personal details, which in most use cases is a rare event. I would think a domain room, where you may be on a chat with 1000 other people and conversing quite frequently for instance, would be a bigger concern for "overusing" Pusher.
I will bring this up in Slack though to see if there are any other considerations with something like this though.

Aah interesting - @yuwenmemon if you move forward implementing this, we may want to revisit paying contributors who reported things like Pronouns & Timezone not updating automatically when a user updates them?

What have we been saying in the past, that it's not a bug?

Raised in Slack here.

Well, that got a lot of traction! 😅
I found myself thinking about the solution for this again today. I don't think we'd actually need a new Auth command for this. Any NewDot user will already have their personalDetails Onyx prop filled with all the emails of who they need to update. So maybe we can actually just send all those emails along with your updated display name? It's kind of weird... but the personalDetails Onyx prop is essentially a cache of the result of Get?rvl=personalDetailsList.
Gonna ask for thoughts about this in #engineering-chat.


add abstrat methods to ParticleGridCEM

stellar_mass_formed now returns the total stellar mass at the input times
ism_metallicity returns an array of nans.

@paranoya this is ready to be merged

This hotfix can be safely merged


Use where condition in Laravel MongoDB along with GeoSpatial whereRaw function

I am able to search for records using Geospatial query but how to add a where condition for filtering the records in laravel mongodb.
Below is my code to fetch the records without where condition.
$whereObj = ['loc' => ['$near' => ['$geometry' =>
    ['type' => "Point",'coordinates' => [$data['lng'],$data['lat']]],
    '$maxDistance' => 8000]]];

$list = Places::whereRaw($whereObj)->get();

I tried adding a query object in the above $whereObj but i don't get any results when its executed.
Below is the code with where condition to filter data.

$whereObj = ['loc' => ['$near' => ['$geometry' =>
        ['type' => "Point",'coordinates' => [$data['lng'],$data['lat']]],
        '$maxDistance' => 8000]], 'query' => ['status' => 'ACTIVE']];

$list = Places::whereRaw($whereObj)->get();

If I run the below query in mongo shell it works.
db.Places.find(
  {
    loc : {
      $near : {
        $geometry : {
          type : "Point" ,
          coordinates : [77.612865, 12.970787]
        },
        $maxDistance : 2000
      }
    },
    query : {status : 'ACTIVE'}
  }
);

'property_name' => [
	'$nearSphere' => [
		'$geometry'    => [
			'type'        => 'Point',
			'coordinates' => [
				$latitude,
				$longitude
			]
		],
		'$maxDistance' => $rangeInKm * self::meters_per_km
	]
]


sinkv2(ticdc): impl kafka ddl sink producer and add tests

What problem does this PR solve?

Issue Number: ref https://github.com/pingcap/tiflow/issues/5928
What is changed and how it works?
Rely on https://github.com/pingcap/tiflow/pull/6464.

Impl ddl sink producer
add tests

Check List
Tests

Unit test

Questions
Will it cause performance regression or break compatibility?
No
Do you need to update user documentation, design documentation or monitoring documentation?
No
Release note
None

Codecov Report

Merging #6499 (009fc1f) into master (f0e21a6) will increase coverage by 0.0361%.
The diff coverage is 76.8267%.

Flag
Coverage Δ

cdc
66.1171% <71.7579%> (+0.0401%)
:arrow_up:

dm
52.0576% <ø> (-0.0152%)
:arrow_down:

engine
64.1234% <90.1515%> (+0.0224%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.
@@               Coverage Diff                @@
##             master      #6499        +/-   ##
================================================
+ Coverage   59.4618%   59.4980%   +0.0361%
================================================
  Files           762        766         +4
  Lines         87377      87692       +315
================================================
+ Hits          51956      52175       +219
- Misses        30815      30896        +81
- Partials       4606       4621        +15

/merge


[VSCode/MacOS] No sign in or share button

Product and Version [VS/VSCode]: MacOS
OS Version [macOS/Windows]: High Sierra 10.13.3
Live Share Extension Version: 0.2.151
Target Platform or Language [e.g. Node.js]: Node.js
Steps to Reproduce / Scenario:

Installed Live Share extension
Reload VSCode
UI stays the same with no ability to sign in or share.

The settings.json has liveshare options in it and there are logs being created for the liveshare extension, however the UI provides no way to login preventing use of LiveShare. Running LiveShare: Launcher from the command pallete says "Launcher successfully setup" though nothing actually happens.

I was able to login however for macOS everything is in the command pallete and does not have a separate UI icon. Docs should be updated to indicate this as it was not apparent. The other thing I had to do was run killall -9 "Google Chrome" as VSCode would not open up my browser until after that was done.


Reverse delete algorithm for MST-audio.md

Description 📜
I've included an audio clip on the reverse delete algorithm for a minimum spanning tree, along with an example and implementation for the same. I've also added a documented summary of the audio clip.
Fixes #5770

Type of change 📝

[x] Audio (Should be in mp3 format Includes speech clarity, Concise ,Low distortion)
[ ] Vi#deo (Animations, screen-recordings, presentations and regular explanatory films are all possibilties etc)
[ ] Doc#umentation (Content Creation in the form of codes or tutorials)
[ ] Other (If you choose other, Please mention changes below)

Domain of Contribution 📊

[ ] Android Dev #(Flutter)
[ ] Android Dev #(Java)
[ ] Android Dev #(Kotlin)
[ ] Backend Dev #(Java)
[ ] Backend Dev #(.NET)
[ ] Backend Dev #(PHP)
[ ] Backend Dev #(Python)
[ ] C/#CPP
[ ] Competitive #Programming
[ ] Cyber #Security
[x] DSA
[ ] Data#base
[ ] Datascience with #Python
[ ] Datascience with #R
[ ] Frontend Dev #HTML/CSS/JS
[ ] Frontend Dev #React/Angular/Vue
[ ] Go#lang
[ ] Interview #Prep
[ ] Java_#Domain
[ ] JavaScript_#Domain
[ ] ME#RN
[ ] Machine #Learning
[ ] Open #Source
[ ] Python_#Domain
[ ] Ru#st
[ ] Statis#tics
[ ] UI/#UX

Checklist ✅

[x] I follow Contributing Guidelines & Code of conduct of this project.
[x] I have performed a self-review of my own code or work.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] My changes generates no new warnings.
[x] I'm GWOC'21 contributor

Screenshots / Gif (Optional) 📸

Please review my PR @Muskan-creator

Looks good only change pr title same as issue's title

Looks good only change pr title same as issue's title

Please check if it's fine now.

Looks good only change pr title same as issue's title

Hey @Muskan-creator! Could you please merge my PR soon? I have to create 2 more requests and I'm running a little short on time right now.

Hey @nimisha-yadav ! Could you please merge my PR. Muskan seems to be occupied. I'm not able to create other pull requests because of this.


CI/CD to PyPI

Not sure if this is something you guys are interested in, but it's very easy to set up continuous deployment from this repo to PyPI, so you don't have to rebuild and upload manually. You just need to grab an API token from PyPI to use in a workflow .yml file. Here's one I set up recently (move down to the build and deploy section). To update it, you just increment the version in your pyproject.toml file and it will update on PyPI within a few seconds.
If you're interested, I'm happy to submit a PR to get it rolling! Cheers

Not sure if this is something you guys are interested in, but it's very easy to set up continuous deployment from this repo to PyPI, so you don't have to rebuild and upload manually. You just need to grab an API token from PyPI to use in a workflow .yml file. Here's one I set up recently (move down to the build and deploy section). To update it, you just increment the version in your pyproject.toml file and it will update on PyPI within a few seconds.
If you're interested, I'm happy to submit a PR to get it rolling! Cheers

that would be very good. i think @nakedmcse what do you think? I also think that it would be good to set up automatic deploymnet to npm for this repo https://github.com/waifuvault/waifuVault-node-api there is info here: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry but i don't really get it

I also think that it would be good to set up automatic deploymnet to npm for this repo https://github.com/waifuvault/waifuVault-node-api there is info here: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry but i don't really get it

I think this is a better explanation of automatic deployment to npm

I also think that it would be good to set up automatic deploymnet to npm for this repo https://github.com/waifuvault/waifuVault-node-api there is info here: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry but i don't really get it

I think this is a better explanation of automatic deployment to npm

oh seems simple thanks

Setting up automated deployment sounds good.  My concern is the key - password: ${{ secrets.PYPI_API_TOKEN }} - how is the API token secured ?

I THINK the way it's typically done - and the way I did it in my other project linked above - is to store the API token as a "GitHub Secret" in the repo. Only repo admins/owners can set/view/edit Secrets. It's like an environment variable, and you access it within a GitHub Action with the syntax you mentioned:  ${{ secrets.PYPI_API_TOKEN }}
One of you would need to create a token on PyPI and set it as a Secret in the repo before we could implement the GH Action.

Excellent! I will put together a draft yml for you and submit a PR here in a few hours

I approved and merged your yaml.  I'm about to push a commit that updates the version to see what happens.

Had to update the version number of the updater in the yaml, so you will need to sync your branch, but it works.
Thank you Ben.

AH! I used<EMAIL_ADDRESS>when apparently the correct syntax for using a specific release tag is<EMAIL_ADDRESS>either way, v1 is not deprecated for this action, so should be fine. thanks for catching that! i see the latest version was pushed to PyPI. Yay
closing the issue, thanks!


QnABot version 6.1.0 breaks creating buttons in appContext for lex-web-ui when greater than 5 buttons are configured

Describe the bug
QnABot in lex.js used to automatically create the proper structure in the session attribute, appContext, to support greater than 5 buttons when using lex-web-ui. The function copyResponseCardtoSessionAttribute(response) was removed in 6.1.0. Why? This allowed easy support of greater than 5 buttons which is common when using QnABot even with LexV2. Users could add more than five buttons in the designer UI and they would render in lex-web-ui. Such a silly limitation in lex but QnABot was able to work around it however this feature was removed from QnABot.
To Reproduce
Install 6.1.0. Create a question and answer with 6 buttons. The six buttons are no longer passed in appContext as they were in prior versions of QnABot.
Expected behavior
Six or more buttons are passed in appContext such that lex-web-ui can render them.
Please complete the following information about the solution:

[ 6.1.0]

Additional context
Add any other context about the problem here.

Thanks Bob, we will look into this

@bobpskier Thanks for bringing this to our attention. This will be fixed in the next upcoming patch release v6.1.1

@michaelin-96 Thanks!


Is there a way to install UI Gradients as a gem

I am planning to use it on a project, I would want to know if there's a way to install this awesome gradient library inside a SASS project as a gem
This is just a question :)

@SedueRey Hi, unfortunately there is no way I know of where you can get is a gem. But that sounds like a good idea. It will be handy to provide all these gradients in a library of sorts.

I will take a look on how to do this, I don't ever knew how to program in Ruby but if it's necessary it could be great :D
In JavaScript would be trivial so this, I will take a look

@SedueRey  Ok that is great. Maybe it would be easier if you just made a stand alone sass library and then make it available for distribution via a ruby gem. This way, it will be easier to add support for other channels too, like bower, npm etc.
Do let me know if you need any help on this. I would love to help you out.

Yeah, it would be easier for me at all :D ... I'll tell you if I need anything.


TRACE regalloc2::ion::moves                   >  -> allocation p11i
 TRACE regalloc2::ion::moves                   > apply_allocations: vreg VRegIndex(195) LR LiveRangeIndex(1) with range CodeRange { from: progpoint2-post, to: progpoint3-post } has alloc p11i
 TRACE regalloc2::ion::moves                   > applying to use: Use { operand: Def: v195i reg, pos: progpoint2-post, slot: 1, weight: 35640 }
 TRACE regalloc2::ion::moves                   > applying to use: Use { operand: Use: v195i fixed(p11i), pos: progpoint3-pre, slot: 1, weight: 35447 }
 TRACE regalloc2::ion::moves                   > get_alloc_for_range: LiveRangeIndex(0)
 TRACE regalloc2::ion::moves                   >  -> bundle: LiveBundleIndex(2)
 TRACE regalloc2::ion::moves                   >  -> allocation p13i
 TRACE regalloc2::ion::moves                   > apply_allocations: vreg VRegIndex(196) LR LiveRangeIndex(0) with range CodeRange { from: progpoint1-post, to: progpoint2-pre } has alloc p13i
 TRACE regalloc2::ion::moves                   > applying to use: Use { operand: Def: v196i reg, pos: progpoint1-post, slot: 1, weight: 35640 }
 TRACE regalloc2::ion::moves                   > get_alloc_for_range: LiveRangeIndex(4)
 TRACE regalloc2::ion::moves                   >  -> bundle: LiveBundleIndex(4)
 TRACE regalloc2::ion::moves                   >  -> allocation p14i
 TRACE regalloc2::ion::moves                   > apply_allocations: vreg VRegIndex(196) LR LiveRangeIndex(4) with range CodeRange { from: progpoint2-pre, to: progpoint3-pre } has alloc p14i
 TRACE regalloc2::ion::moves                   > get_alloc_for_range: LiveRangeIndex(0)
 TRACE regalloc2::ion::moves                   >  -> bundle: LiveBundleIndex(2)
 TRACE regalloc2::ion::moves                   >  -> allocation p13i
 TRACE regalloc2::ion::moves                   > prev LR 0 abuts LR 4 in same block; moving p13i -> p14i for v196
 TRACE regalloc2::ion::data_structures         > insert_move: pos progpoint2-pre prio Regular from_alloc p13i to_alloc p14i to_vreg VReg(vreg = 196, class = Int)
 TRACE regalloc2::ion::moves                   > get_alloc_for_range: LiveRangeIndex(3)
 TRACE regalloc2::ion::moves                   >  -> bundle: LiveBundleIndex(3)
 TRACE regalloc2::ion::moves                   >  -> allocation p10i
 TRACE regalloc2::ion::moves                   > apply_allocations: vreg VRegIndex(196) LR LiveRangeIndex(3) with range CodeRange { from: progpoint3-pre, to: progpoint3-post } has alloc p10i
 TRACE regalloc2::ion::moves                   > get_alloc_for_range: LiveRangeIndex(4)
 TRACE regalloc2::ion::moves                   >  -> bundle: LiveBundleIndex(4)
 TRACE regalloc2::ion::moves                   >  -> allocation p14i
 TRACE regalloc2::ion::moves                   > prev LR 4 abuts LR 3 in same block; moving p14i -> p10i for v196
 TRACE regalloc2::ion::data_structures         > insert_move: pos progpoint3-pre prio Regular from_alloc p14i to_alloc p10i to_vreg VReg(vreg = 196, class = Int)
 TRACE regalloc2::ion::moves                   > applying to use: Use { operand: Use: v196i fixed(p10i), pos: progpoint3-pre, slot: 0, weight: 35447 }
 TRACE regalloc2::ion::redundant_moves         >    redundant move eliminator: clear p10i
 TRACE regalloc2::ion::redundant_moves         >    redundant move eliminator: clear p13i
 TRACE regalloc2::ion::moves                   > parallel moves at pos progpoint2-pre prio 1
 TRACE regalloc2::ion::moves                   >  p13i -> p14i
 TRACE regalloc2::ion::moves                   >   resolved: p13i -> p14i (Some(VReg(vreg = 196, class = Int)))
 TRACE regalloc2::ion::redundant_moves         >      -> redundant move tracker: from p13i to p14i to_vreg Some(VReg(vreg = 196, class = Int))
 TRACE regalloc2::ion::redundant_moves         >        -> from_state None to_state None
 TRACE regalloc2::ion::redundant_moves         >       -> src_vreg None
 TRACE regalloc2::ion::redundant_moves         >       -> dst_vreg Some(VReg(vreg = 196, class = Int))
 TRACE regalloc2::ion::redundant_moves         >       -> existing_dst_vreg None
 TRACE regalloc2::ion::redundant_moves         >       -> elide false
 TRACE regalloc2::ion::redundant_moves         >    redundant move eliminator: clear p14i
 TRACE regalloc2::ion::redundant_moves         >      -> create mapping p14i -> Copy(p13i, Some(VReg(vreg = 196, class = Int)))
 TRACE regalloc2::ion::moves                   > parallel moves at pos progpoint2-pre prio 1
 TRACE regalloc2::ion::moves                   > parallel moves at pos progpoint2-pre prio 1
 TRACE regalloc2::ion::redundant_moves         >    redundant move eliminator: clear p11i
 TRACE regalloc2::ion::moves                   > parallel moves at pos progpoint3-pre prio 1
 TRACE regalloc2::ion::moves                   >  p14i -> p10i
 TRACE regalloc2::ion::moves                   >   resolved: p14i -> p10i (Some(VReg(vreg = 196, class = Int)))
 TRACE regalloc2::ion::redundant_moves         >      -> redundant move tracker: from p14i to p10i to_vreg Some(VReg(vreg = 196, class = Int))
 TRACE regalloc2::ion::redundant_moves         >        -> from_state Copy(p13i, Some(VReg(vreg = 196, class = Int))) to_state None
 TRACE regalloc2::ion::redundant_moves         >       -> src_vreg Some(VReg(vreg = 196, class = Int))
 TRACE regalloc2::ion::redundant_moves         >       -> dst_vreg Some(VReg(vreg = 196, class = Int))
 TRACE regalloc2::ion::redundant_moves         >       -> existing_dst_vreg None
 TRACE regalloc2::ion::redundant_moves         >       -> elide false
 TRACE regalloc2::ion::redundant_moves         >    redundant move eliminator: clear p10i
 TRACE regalloc2::ion::redundant_moves         >      -> create mapping p10i -> Copy(p14i, Some(VReg(vreg = 196, class = Int)))
 TRACE regalloc2::ion::moves                   > parallel moves at pos progpoint3-pre prio 1
 TRACE regalloc2::ion::moves                   > parallel moves at pos progpoint3-pre prio 1
 DEBUG cranelift_codegen::timing               > timing: Ending Register allocation: 33ms
 DEBUG cranelift_codegen::timing               > timing: Starting VCode emission, (during Compilation passes)
 TRACE cranelift_codegen::machinst::buffer     > MachBuffer: first 1 labels are for blocks
 TRACE cranelift_codegen::machinst::vcode      > emitting block Block(0)
 TRACE cranelift_codegen::machinst::vcode      >  -> entry block
 TRACE cranelift_codegen::machinst::buffer     > MachBuffer: bind label MachLabel(0) at offset 0
 TRACE cranelift_codegen::machinst::buffer     > enter optimize_branches:
 b = []
 l = [MachLabel(0)]
 f = []
 TRACE cranelift_codegen::machinst::buffer     > leave optimize_branches:
 b = []
 l = [MachLabel(0)]
 f = []
 TRACE cranelift_codegen::machinst::abi        > Epilogue: [Ret]
 TRACE cranelift_codegen::machinst::buffer     > enter optimize_branches:
 b = []
 l = []
 f = []
 TRACE cranelift_codegen::machinst::buffer     > leave optimize_branches:
 b = []
 l = []
 f = []
 DEBUG cranelift_codegen::timing               > timing: Starting VCode emission finalization, (during VCode emission)
 DEBUG cranelift_codegen::timing               > timing: Ending VCode emission finalization: 0ms
 DEBUG cranelift_codegen::timing               > timing: Ending VCode emission: 1ms
 DEBUG cranelift_codegen::isa::riscv64         > disassembly:
block0:
  lh a3,0(a0)
  mv a4,a3
  lh a1,2(a0)
  mv a0,a4
  ret

 DEBUG cranelift_codegen::timing               > timing: Ending Compilation passes: 43ms
 INFO  cranelift_filetests::test_compile       > Generated 20 bytes of code:
block0:
  lh a3,0(a0)
  mv a4,a3
  lh a1,2(a0)
  mv a0,a4
  ret

 DEBUG cranelift_codegen::timing               > timing: Ending Processing test file: 48ms
1 tests

@cfallin and I looked through this, and it looks like the problem is the current splitting heuristic in RA2: it's splitting at the location of the first conflict, which happens to be that first load, rather than at the point where a fixed constraint exists (the return instruction). Splitting early means that we get an allocation of a3 somewhat arbitrarily to v1, however the other half of the split which contains the second load and the return now also conflicts with the ultimate requirement for v1 to be in a0, thus a second split is introduced after the second load. That second split introduces the allocation of v1 to a4, which is why we see the move from a3 to a4 between the first two loads, and ultimately the move from a4 to a0 to satisfy the abi.
One possible solution here would be to augment the split point heuristic to look at the region after the conflict and move the split point to right before the first fixed use, which would in cases like this ensure that we weren't setting ourselves up for additional splits that would require additional moves.


OSD-10204 Refactor ocm_agent_requests_total metric

Signed-off-by: Aniket Joshi<EMAIL_ADDRESS>What type of PR is this?
Refactor
What this PR does / why we need it?
This PR change refactors existing logic of ocm_agent_requests_total metric to exclude unnecessary path requests count for more clarity.
Which Jira/Github issue(s) this PR fixes?
OSD-10204
Fixes #
Special notes for your reviewer:
Pre-checks (if applicable):

[x] Tested latest changes against a cluster
[ ] Ran make generate command locally to validate code changes
[ ] Included documentation changes with PR

/lgtm
/approve


mostAcceptable fails with empty accept header

array_merge is called on an empty $this->accept

I get this as well, when trying to use the "Content-Type" header instead of a format suffix (*.json) to select format:
Warning: array_merge() expects at least 1 parameter,
0 given in ApiRequest.php on line 573

Does Tonic support using the Content-Type header to select format?


MinCount/MaxCount cannot be retrieved

In a schema with an Array type:
test: {
     type: Array,
     minCount:1,
     maxCount: 3
}

Both minCount and maxCount do not appear in the schema:

How can they be retrieved?

@davidecantini Internally, SimpleSchemaGroups are used, and the options are divided into those that are related to type and those that aren't. So they end up as part of the group. It's a bit confusing, but I was trying not to change things too drastically from the previous major version.
Anyway, to answer your question, you can use getDefinition to get the options back to a more useable form.
const definition = schema.getDefinition('test', ['minCount', 'maxCount']);

The second argument, an array of props you need, is a speed optimization but can be omitted.
See https://github.com/aldeed/node-simple-schema/blob/3eca0e858ba318d4764d3dea29380c8555531159/lib/SimpleSchema.js#L155-L162

Thanks. So by retrieving definition as you suggest:
const definition = schema.getDefinition('test', ['minCount', 'maxCount']);
we get:

I would expect it to return the two properties already: I mean, of course it's easy to get them from there, but it's more about avoiding to make assumptions on the internal representation (i.e. d.type[0]).

@davidecantini Good idea. Do you mind submitting a separate issue for that suggestion?


Added SCSS file import to component style tag

Hi, I'll not merge this one yet. I'm currently working on template customisations so every user can choose custom templates by himself in the plugin settings.

Since v2.1.0 you can set custom templates for the plugin in the IDEs settings section


We need more practical tutorials for the frontend layer

Nuxt/Vue examples
Personally I need Nextjs examples.

Whats your take on building Frontend SDKs?

Hi @Qodestackr thanks for reaching out. We have a couple of Vue examples:

Sample Vue
Sample Gift Store

Is there anything in particular you need with a NextJS example? Since NextJS is still React, this sample should guide you. However, if there's something required, we can look into providing a NextJS example.
Regarding building SDKs, we are open to receiving contributions from the community.


add webhook unit tests

Motivation
Fixes #69
Add unit tests for webhook methods
Checklist

[ ] Code follows coding conventions held in this repo
[ ] Automated tests have been added
[ ] Tests are passing
[ ] Docs have been updated (if applicable)
[ ] Temporary settings (e.g. variables used during development and testing) have been reverted to defaults

How to test
If manual testing is required, what are the steps?

Do we want to remove https://github.com/Kentico/kontent-management-sdk-net/blob/fix/69_webhook_tests/Kentico.Kontent.Management.Tests/ManagementClientTests/WebhookTests.cs as well as JSON responses from original tests?

We can remove them once all tests are re-written to unit tests.

Let's remove old tests in separate pull request.


Update app-custom-theme.md

Signed-off-by: Paulo Peixoto<EMAIL_ADDRESS>Hey, I just made a Pull Request!
Added documentation for using custom icons.
After study and validation at @madeiramadeirabr.
Co-Authored by: @accezar, @ericksposito @Monnylly

:heavy_check_mark: Checklist

[ ] A changeset describing the change and affected packages. (more info)
[x] Added or updated documentation
[ ] Tests for new functionality and regression tests for bug fixes
[ ] Screenshots attached (for UI changes)
[x] All your commits have a Signed-off-by line in the message. (more info)

Just a heads up, we are going to have some conflict between our PRs as was working on the same thing here: https://github.com/backstage/backstage/pull/12696

Thanks for suggestions @jhaals!

Congrats on your first PR merged @padupe! Happy to count you as a contributor.

Thanks @suuus 🚀

Hey there still seems to be a small gap in this documentation, well at least from my understanding. I see how I can create a custom icon and import it into app.tsx file and add it with the createApp() logic. But how do I refer to that icon within a newly created plugin? Is there any docs on that? I could use some help in that area.


Add API For COPY-Based INSERT

Let Michael know when you're done.

Closing in conjunction with #125


Update Italian translation

@nlogozzo I noticed the release notes in metainfo are translated in this PR. But it's kinda pointless, since you clear them every release. Don't you want to start a tradition of keeping release notes history starting the first release under Denaro name? :)

I noticed the release notes in metainfo are translated in this PR. But it's kinda pointless, since you clear them every release.

It is kind of pointless since they get cleared every release, but there's nothing wrong with it so that's why I accepted it.

Don't you want to start a tradition of keeping release notes history starting the first release under Denaro name? :)

I've never really kept a history of release notes in the metadata file to 1. prevent it from being super long and 2. anyone can go back to the releases on the repo page and see past changes.

Okay 👍🏻


Update dependencies + improve ESLint/TS configs + delete orphan pages

See commits for more details.

just curious about ; change and why some pages were removed

@B2o5T – Because they are old pages that don't exist in English anymore. When we delete (or move) an English page, Crowdin doesn't delete the translated versions from their previous locations. :/


feat: Add baggage span processor

Summary of changes
Adds the baggage span processor. I've added under new root dir processors, not sure if that's the best place for it or it should go somewhere else. Happy to take direction.

Closes #934

Something that I want to confirm, this is still going to require that the user annotate the active/current span in addition to using baggage.
It's also going to transfer these attributes across service boundaries. Is that the effect that you want?
If so, I think it is important to highlight that this will potentially cause message and HTTP headers to impact performance since there isn't anything built in to say prevent the headers from growing unwieldy. (No per-header compression e.g.)
In addition to that baggage usage means library instrumentation will include all items in outbound headers to 3rd parties, which will raise concerns for privacy.
I realize that these concerns I am highlighting are not specific to this implementation but issues with Baggage; however, I think it would be important to highlight these concerns so that Baggage users are not caught off guard.
          span.add_attributes('user_id' => user.id, 'cart_id' => cart.id)
          ctx = OpenTelemetry::Baggage.build do |builder|

            builder.set_value('user_id', user.id)
            builder.set_value('cart_id', cart.id)
          end

          tracer.in_span('checkout') do |span|
              # yada yada yada
          end

Something that I want to confirm, this is still going to require that the user annotate the active/current span in addition to using baggage.
It's also going to transfer these attributes across service boundaries. Is that the effect that you want?
If so, I think it is important to highlight that this will potentially cause message and HTTP headers to impact performance since there isn't anything built in to say prevent the headers from growing unwieldy. (No per-header compression e.g.)
In addition to that baggage usage means library instrumentation will include all items in outbound headers to 3rd parties, which will raise concerns for privacy.
I realize that these concerns I am highlighting are not specific to this implementation but issues with Baggage; however, I think it would be important to highlight these concerns so that Baggage users are not caught off guard.
          span.add_attributes('user_id' => user.id, 'cart_id' => cart.id)
          ctx = OpenTelemetry::Baggage.build do |builder|

            builder.set_value('user_id', user.id)
            builder.set_value('cart_id', cart.id)
          end

          tracer.in_span('checkout') do |span|
              # yada yada yada
          end

Yes, it is known that baggage entries are transported to 3rd parties and you're correct this is a fault of baggage not this processor in particular. I haven't added a README yet, but will add warnings there, in the class implementation and any module functions to make it as clear as possible. I'll add a note regarding unbounded header size too.

Do any other languages have an implementation in contrib, or more broadly, do any other languages have non-spec processors that live in contrib?
(Fwiw I'm fine with this PR just kinda curious if y'all are setting precedent here, which, again, is fine if so)

Do any other languages have an implementation in contrib, or more broadly, do any other languages have non-spec processors that live in contrib?

We (Honeycomb) have started opening PRs to add this to contrib in other languages, so: technically "no" but also maybe "yes" soon.

Huzzah. Ty @robbkidd , Sounds good to me. Ping if this gets stuck in the mud happy to help w/approvals but otherwise will leave to the folks more tuned in with uh..the world (I'm on pto for a little while)

Well, I succeeded in adding a new set of jobs for Processors to the CI matrix! 🙌🏻
Now to wait for the matrix ... ⏳

Horrah! BaggageSpanProcessor tests pass. 🎉

Added this follow-up enhancement issue to track adding a key predicate function to control what keys are copied to newly created span attributes.

https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues/956

My only request for an actual change is to consolidate the CI jobs.
The other comments are optional changes/food for thought.

Thanks for your feedback @arielvalentin. I've worked through and addressed your comments. Let me know if there's anything else.

@arielvalentin - I've pulled in the change jruby <IP_ADDRESS> update and updated the new processors workflow. Is there anything else you need / want before accepting this PR?


Improve design for "Insert at cursor" and "Copy" buttons

From offline discussion with the team, we agreed that the current design leaves room for improvements because it does not feel idiomatic. Not a blocker for GA but worth looking into in the future. FYI @taylorsperry

Thank you! Agree this could be better . . . after GA :) cc @danielmarquespt


Hypr showing bar tittle bar even when disabled

Hi,  been using hypr for a week,  runs well on my macbook, question,  so i use polybar and the bar is more down because of a small bar which is caused by the built in bar in hypr,  i disabled the commands in the configs with # but it still shows the bar without any text? does anybody know how to solve it

you need to explicitly disable the bar with enabled=0

ohhhhhhhhhh, thanks and one more thing,  when i have Poly bar exec on start of hypr,  the windows go above it,  I've looked in my config and changed what can be done,  but still windows overlap  the bar

allow the window manager to manage the bar. it's a setting in polybar


Saluki doesn't compile

Getting compilation errors for soluku:
make  File "state.ml", line 53, characters 31-38:  Error: Unbound value Map.set

The bap-plugins repository follows the main bap repository and now requires Core_kernel v0.11. If you want to use Saluki with bap 1.5 then either checkout the bap-1.5 release using git or use the opam source bap-saluki command, to obtain the 1.5 version directly from opam (provided you're using opam)


fix: PR workflow should separate test and lint

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

:exclamation: No coverage uploaded for pull request base (dev@1ffedff). Click here to learn what that means.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@          Coverage Diff           @@
##             dev     #476   +/-   ##
======================================
  Coverage       ?   58.20%
======================================
  Files          ?      301
  Lines          ?     9903
  Branches       ?     1238
======================================
  Hits           ?     5764
  Misses         ?     4139
  Partials       ?        0

Flag
Coverage Δ

unit
58.20% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

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


🐛 [BUG] - Welcome to Sprint Next:Setup storage is not working

Description
Onboarding screen, I filled the Name, Workspace Name and Profile photo then Click  nothing happened
Reproduction URL
https://app.sprint.rest/app/aij0q2l23u/suites
Reproduction steps
1. Go to 'https://app.sprint.rest/'
2. Type Name and Workspace Name
3. Upload a Photo
4. Click Next:Setup storage
5. See nothing

Screenshots
![DESCRIPTION](LINK.png)

Logs
No response
Browsers
Chrome
OS
Mac

It seems working, but not sure. I will check it again.


Get GraphiQL introspection / autocomplete / documentation working

Right now I'm not seeing any of the autocomplete or documentation in the GraphiQL desktop app.

Starlette's implementation may hold some clues: https://github.com/encode/starlette/blob/master/starlette/graphql.py

The demo at https://graphql.org/swapi-graphql kicks off a POST on first load with this body:
{"query":"\n    query IntrospectionQuery {\n      __schema {\n        \n        queryType { name }\n        mutationType { name }\n        subscriptionType { name }\n        types {\n          ...FullType\n        }\n        directives {\n          name\n          description\n          \n          locations\n          args {\n            ...InputValue\n          }\n        }\n      }\n    }\n\n    fragment FullType on __Type {\n      kind\n      name\n      description\n      fields(includeDeprecated: true) {\n        name\n        description\n        args {\n          ...InputValue\n        }\n        type {\n          ...TypeRef\n        }\n        isDeprecated\n        deprecationReason\n      }\n      inputFields {\n        ...InputValue\n      }\n      interfaces {\n        ...TypeRef\n      }\n      enumValues(includeDeprecated: true) {\n        name\n        description\n        isDeprecated\n        deprecationReason\n      }\n      possibleTypes {\n        ...TypeRef\n      }\n    }\n\n    fragment InputValue on __InputValue {\n      name\n      description\n      type { ...TypeRef }\n      defaultValue\n    }\n\n    fragment TypeRef on __Type {\n      kind\n      name\n      ofType {\n        kind\n        name\n        ofType {\n          kind\n          name\n          ofType {\n            kind\n            name\n            ofType {\n              kind\n              name\n              ofType {\n                kind\n                name\n                ofType {\n                  kind\n                  name\n                  ofType {\n                    kind\n                    name\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  ","operationName":"IntrospectionQuery"}

Mine does the same thing - and gets a response back as well.
Here's the response from mine against my https://github-to-sqlite.dogsheep.net/github.db demo database: https://gist.github.com/simonw/81da97ce97240e54b2b359411122cfa9
And here's the response from the swapi-graphql demo: https://gist.github.com/simonw/d93b20b5cbeb9cd058f4810e5190a3eb

The SWAPI one starts like this:
{
    "data": {
        "__schema": {
            "queryType": {
                "name": "Root"

Mine starts like this:
{
    "__schema": {
        "queryType": {
            "name": "Query"
        },
        "mutationType": null,

Looks like I'm missing the "data" top-level key.

That fixed it!


don't format files under special folder like node_modules when --black

Currently we will use TypeSpec-Project-Sync.ps1 to help generate SDK. The script will download files into TempTypeSpecFiles so when black the files we meet the follow warning:

It makes generation very slow if black globs all the files under TempTypeSpecFiles.

fix https://github.com/Azure/autorest.python/issues/1913


Which kind of search is slow? What do you mean for "larger collections"?

Hey there @davideicardi - leaving this issue open was my mistake, as there have been multiple improvements since February to improve some of the performance issues we were seeing.
To summarize, the search is this one: here
Back in February, there were many inefficient queries that were pulling rows sequentially from C* and hammering disk, making searches over large tables (in the docs API world tables are called "collections", they are 1-1 conceptually) perform really slowly. This was resulting in searches over a table with ~1000000 rows to time out, but that has since been fixed.
I am going to close this issue, thanks for your question and feel free to ask more!


jest not working with sequelize model with associations using sequelize-mock

this is my test.js using jest
jest.mock('../models/cartype', () => () => {
const SequelizeMock = require("sequelize-mock");
const dbMock = new SequelizeMock();
return dbMock.define('cartype', {
cartypename: 'check1'
})
});
this is my sequelize model which i am trying to mock
'use strict';
module.exports = (sequelize, DataTypes) => {
const cartype = sequelize.define('cartype', {
cartypename: {
type: DataTypes.STRING,
allowNull: false,
},
}, {});
cartype.associate = function(models) {
// associations can be defined here
cartype.hasMany(models.car, {
foreignKey: 'cartypeid',
as: 'cartypeid',
});
};
return cartype;
};
here is my decribe of jest
describe("Test Sequelize Mocking", () => {
it("Should get value from mock", async () => {
const cartype = await cartypeController.list();
expect(cartype.cartypename).toEqual('check1');
})
})
i am getting error as below while mocking with sequelize-mock
NODE_ENV=test jest
FAIL server/test/function.test.js
● Test suite failed to run
car.belongsTo called with something that's not a subclass of Sequelize.Model
32 | onDelete: 'CASCADE',
33 | }),
34 | car.belongsTo(models.cartype, {
| ^
35 | foreignKey: 'cartypeid',
36 | onDelete: 'CASCADE',
37 | }),
at Function. (node_modules/sequelize/lib/associations/mixin.js:93:13)
at Function.belongsTo (server/models/car.js:34:9)
at associate (server/models/index.js:30:19)
at Array.forEach ()
at Object.forEach (server/models/index.js:28:17)
at Object.require (server/controllers/cartypeController.js:1:17)
at Object.require (server/test/function.test.js:2:27)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 8.89s
Ran all test suites.
Note: This command was run via npm module 'win-node-env'
npm ERR! Test failed. See above for more details.
anyone able to help please do
Thanks in advance

I am having this same issue - my mock is fine but when i run this code:
Here i keep getting location is undefined below is how my model is setup.
    const data = await this.chargingDetail.create(chargingDetailData, {
      include: [
        {
          association: this.chargingDetail.associations.location
        }
      ]
    })

this.chargingDetail is my model - when using sequlize-mocks I keep getting the error that location is undefined.
export default {
  name: 'charging_detail',
  build: ChargingDetail,
  associate: (chargingDetail, models) => {
    chargingDetail.belongsTo(models.ChargingLocation, { as: 'location' })
    chargingDetail.belongsTo(models.ChargingAccount)
  },
  stub: () => ({
    ...chargingDetailAndLocationData,
    associate: (chargingDetail, models) => {
      chargingDetail.belongsTo(models.ChargingLocation, { as: 'location' })
      chargingDetail.belongsTo(models.ChargingAccount)
    }

  })

I resolved this by not using the internal API in my includes statement and instead using the Model.

i tried mocking car also as below
const functions = require('./functions');
const cartypeController = require('../controllers/cartypeController')
jest.mock('../models/cartype', () => () => {
const SequelizeMock = require("sequelize-mock");
const dbMock = new SequelizeMock();
return dbMock.define('cartype', {
cartypename: 'check1'
})
});
jest.mock('../models/car', () => () => {
const SequelizeMockCar = require("sequelize-mock");
const dbMockCar = new SequelizeMockCar();
return dbMockCar.define('car', {
vinno: 'YUIJHK652563',
woac: 'true',
YOM: '2017-05-10',
RTONO: 'GA-02-B-3189',
noofseats: '5',
rateperday: '500',
isActive: 'true'
})
})
describe("Test Sequelize Mocking", () => {
it("Should get value from mock", async () => {
const cartype = await cartypeController.list();
expect(cartype.cartypename).toEqual('check1');
})
})
but stil the test fails and i get this
FAIL  server/test/function.test.js
● Test suite failed to run
booking.belongsTo called with something that's not a subclass of Sequelize.Model

  18 |       onDelete: 'CASCADE',
  19 |     })
> 20 |     booking.belongsTo(models.car, {
     |             ^
  21 |       foreignKey: 'carid',
  22 |       onDelete: 'CASCADE',
  23 |     })

my models of car and cartype
car:
'use strict';
module.exports = (sequelize, DataTypes) => {
const car = sequelize.define('car', {
vinno: {
type: DataTypes.STRING,
allowNull: false,
},
woac: {
type: DataTypes.BOOLEAN,
},
YOM: {
type: DataTypes.DATE,
},
RTONO: {
type: DataTypes.STRING,
allowNull: false,
},
noofseats: {
type: DataTypes.INTEGER,
},
rateperday: {
type: DataTypes.INTEGER,
},
isActive: {
type: DataTypes.BOOLEAN,
},
}, {});
car.associate = function (models) {
// associations can be defined here
car.belongsTo(models.systemadmin, {
foreignKey: 'systemadminid',
onDelete: 'CASCADE',
}),
car.belongsTo(models.cartype, {
foreignKey: 'cartypeid',
onDelete: 'CASCADE',
}),
car.belongsTo(models.carmodel, {
foreignKey: 'carmodelid',
onDelete: 'CASCADE',
}),
car.belongsTo(models.carbrand, {
foreignKey: 'carbrandid',
onDelete: 'CASCADE',
})
car.hasOne(models.booking, {
foreignKey: 'carid',
as: 'carid',
});
};
return car;
};
cartype:
'use strict';
module.exports = (sequelize, DataTypes) => {
const cartype = sequelize.define('cartype', {
cartypename: {
type: DataTypes.STRING,
allowNull: false,
},
}, {});
cartype.associate = function(models) {
// associations can be defined here
cartype.hasMany(models.car, {
foreignKey: 'cartypeid',
as: 'cartypeid',
});
};
return cartype;
};
any suggestions thanks in advance

I resolved this by not using the internal API in my includes statement and instead using the Model.
EDIT: to clarify:
    const data = await this.chargingDetail.create(chargingDetailData, {
      include: [
        {
          association: {model: <ModelInstance>, as: <my alias> }
        }
      ]
    })

But I have associations for my model in my models itself I am using sequelize and node

Please format code for reading

associate

Did you resolve the issue? how to query data along with association i'm also using jest with sequelize-mock

this is my test.js using jest
jest.mock('../models/cartype', () => () => { const SequelizeMock = require("sequelize-mock"); const dbMock = new SequelizeMock(); return dbMock.define('cartype', { cartypename: 'check1' }) });
this is my sequelize model which i am trying to mock
'use strict'; module.exports = (sequelize, DataTypes) => { const cartype = sequelize.define('cartype', { cartypename: { type: DataTypes.STRING, allowNull: false, }, }, {}); cartype.associate = function(models) { // associations can be defined here cartype.hasMany(models.car, { foreignKey: 'cartypeid', as: 'cartypeid', }); }; return cartype; };
here is my decribe of jest
describe("Test Sequelize Mocking", () => { it("Should get value from mock", async () => { const cartype = await cartypeController.list(); expect(cartype.cartypename).toEqual('check1'); }) })
i am getting error as below while mocking with sequelize-mock
NODE_ENV=test jest
FAIL server/test/function.test.js ● Test suite failed to run
car.belongsTo called with something that's not a subclass of Sequelize.Model
32 | onDelete: 'CASCADE', 33 | }),
34 | car.belongsTo(models.cartype, { | ^ 35 | foreignKey: 'cartypeid', 36 | onDelete: 'CASCADE', 37 | }),
at Function. (node_modules/sequelize/lib/associations/mixin.js:93:13) at Function.belongsTo (server/models/car.js:34:9) at associate (server/models/index.js:30:19) at Array.forEach () at Object.forEach (server/models/index.js:28:17) at Object.require (server/controllers/cartypeController.js:1:17) at Object.require (server/test/function.test.js:2:27) Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 8.89s Ran all test suites. Note: This command was run via npm module 'win-node-env' npm ERR! Test failed. See above for more details.
anyone able to help please do Thanks in advance

Did you resolve the issue? how to query data along with association i'm also using jest with sequelize-mock


Short Trips Fix

Increase the radius for alternate MAX boarding locations
Introduce validity score to help filter out unlikely journeys
Remove journeys inferred based on identical subsequent boarding locations
Fix normalization bug on MAX line/direction selection
Improve code readability

@ifabrisarabellapark This is the short trips fix Irene. One thing to note is that the additional checks and computations introduced in this PR increase the runtime of the inference process.


Occasional crash in FullScheduleFragment.kt & StopScheduleFragment.kt  due to UI updation from background thread

In FullScheduleFragment.kt the line
GlobalScope.launch(Dispatchers.IO) {             busStopAdapter.submitList(viewModel.fullSchedule())    }
In StopScheduleFragment.kt the line
GlobalScope.launch(Dispatchers.IO) {busStopAdapter.submitList(viewModel.scheduleForStopName(stopName))  }
sometimes crash. Resolved by calling submlitList using Dispatchers.main:
GlobalScope.launch(Dispatchers.IO) {
val fullSchedule = viewModel.fullSchedule()
launch(Dispatchers.Main) {busStopAdapter.submitList(fullSchedule)}
}

yes, my app sometimes crash too because of this. i think you have solved the problem.

👍


[9.x] Fix array to string conversion when using custom validation messages for size rules

Description
This PR is a follow up on #36885. I've tried ealier this year, but i think i haven't described correctly the issues or used wrong examples and it was rejected, so i'll try it again. When using custom validation messages for size rules, if you define your custom validation messages in `resources/lang/en/validation.php, then laravel thrown an exception when accessing those messages:

This exception comes from the following line, while replacing the :message:
https://github.com/laravel/framework/blob/96d2b48e45b9d113b95ce0edf542b3ffc76c5176/src/Illuminate/Support/MessageBag.php#L268
I'm sending this to master because if some user currently uses the custom validation messages, then the response he gets when using $validator->errors() is the following:
{
    "file":[
        {
           "file":"The file must be between 20 and 50 kilobytes.",
           "string":"Some custom message here"
        }
    ]
}

and this PR changes it to:
{
    "file":[
        "Some custom message here"
    ]
}

So, this changes the way you access validation errors from $validator->errors()->toArray()['file'][0]['string'] to $validator->errors()->toArray()['file'][0] or $validator->errors()->first('file), which is a breaking change.
Steps to reproduce

Define custom validation messages in resources/lang/en/validation.php:

'custom' => [
    'file' => [
        'between' => [
            'numeric' => 'The :attribute must be between :min and :max.',
            'file' => 'The :attribute must be between :min and :max kilobytes.',
            'string' => 'Some custom message here',
            'array' => 'The :attribute must have between :min and :max items.',
        ],
    ],
],

Create a test route in web.php to test the validation message:

Route::get('/test', function() {
   return Validator::make(['file' => 'filename.png'], ['file' => 'between:20,50'])->errors()->first('file');
});

Go to localhost:8000/test

Here https://github.com/laravel/framework/pull/36885#issuecomment-814896474 taylor said that "an email is never a file or a numeric. It's basically string". I agree and i really should have described it better. But, with the file attribute, you could have two or more places in your project that uses file sometimes as string (filename) and sometimes as a file (uploaded file). So, if you use custom validation messages, then you get the array to string conversion. That's why i'm submitting this PR again.


Caching of 301 Responses

Hi guys,
I'm using okhttp3 with Picasso and my images are not cached if they are accessed from redirected URIs.
It looks like Okhttp is caching initial call and redirect URI separately. When I turn off wifi and data, Okhttp is looking for URL of the first call and comparing it with the request. get method of  Cache class is where the cached data is being ignored.
    Response response = entry.response(snapshot);

    if (!entry.matches(request, response)) {
      Util.closeQuietly(response.body());
      return null;
    }

I'm not sure if it is a bug or it is by design. If it is not bug, I would like to hear your advises to solve this problem.
Thanks

OkHttp caches 301s. Could you provide an executable test case to demonstrate the problem?

@swankjesse I created a sample project, I tried to keep it similar to code base I have in my project.
Open the app, hit Download button when you are online. It will show the image. Kill the app, turn off data/wifi and then try it. It won't show the image. The image URL is not the one I'm using, this image is from FB but afaik it also returns 301.
https://github.com/GokhanArik/OkhttpCacheTest

Yep. For me the Facebook image redirects with a 302. That redirect isn’t cached but the followup image is. You can hack a very dangerous, very bad interceptor to force a 301 and see that that caches completely.
https://gist.github.com/swankjesse/1d3ef753ae38d0fcea910cfa137b60a4

When I run your code I see that it is being cached. However, I still can't get it working in my project. I don't see the image when I'm offline. And I saw few people reporting the same issue before. I updated the URL if you want to check it again. This image doesn't prevent caching.

And here is the video of the behavior.
https://www.youtube.com/watch?v=ZMIzu-tuJGk

No action for us to take on this. You might have to do your own response header rewriting to get caching to work.


Invoker use outdated docker API to pause container for docker version 18.09

Environment details:

local deployment,native ubuntu
docker18.09, ubuntu16.04

Steps to reproduce the issue:
wsk action invoke /whisk.system/utils/echo -p message hello --result
Provide the actual results and outputs:
[2019-04-06T07:06:53.148Z] [INFO] [#tid_9fd179fb06e529c352277487058e6acf] [InvokerReactive]  [marker:invoker_activation_start:33]
[2019-04-06T07:06:53.149Z] [INFO] [#tid_9fd179fb06e529c352277487058e6acf] [WhiskAction] [GET] serving from datastore: CacheKey(guest/sleepy) [marker:database_cacheMiss_count:34]
[2019-04-06T07:06:53.149Z] [INFO] [#tid_9fd179fb06e529c352277487058e6acf] [CouchDbRestStore] [GET] 'whisk_local_whisks' finding document: 'id: guest/sleepy, rev: 1-40f8848133d2e3b1855d5542b701104e' [marker:#
[2019-04-06T07:06:53.157Z] [INFO] [#tid_9fd179fb06e529c352277487058e6acf] [CouchDbRestStore]  [marker:database_getDocument_finish:42:8]
[2019-04-06T07:06:53.162Z] [INFO] [#tid_9fd179fb06e529c352277487058e6acf] [WhiskAction] write initiated on existing cache entry, invalidating CacheKey(guest/sleepy), tid 9fd179fb06e529c352277487058e6acf, st#
[2019-04-06T07:06:53.162Z] [INFO] [#tid_9fd179fb06e529c352277487058e6acf] [WhiskAction] write all done, caching CacheKey(guest/sleepy) Cached
[2019-04-06T07:06:53.162Z] [INFO] [#tid_9fd179fb06e529c352277487058e6acf] [ContainerPool] containerStart containerState: prewarmed container: Some(ContainerId(db8ea42a0a32fcf559acf0a2c549581e97ba6c5a312cb0a#
[2019-04-06T07:06:53.163Z] [INFO] [#tid_9fd179fb06e529c352277487058e6acf] [DockerContainer] sending initialization to ContainerId(db8ea42a0a32fcf559acf0a2c549581e97ba6c5a312cb0a23be1e7e874fa8af5) ContainerA#
[2019-04-06T07:06:53.164Z] [INFO] [#tid_sid_invokerWarmup] [DockerClientWithFileAccess] running /usr/bin/docker run -d --cpu-shares 93 --memory 256m --memory-swap 256m --network bridge -e __OW_API_HOST=http#
[2019-04-06T07:06:53.207Z] [INFO] [#tid_9fd179fb06e529c352277487058e6acf] [DockerContainer] initialization result: ok [marker:invoker_activationInit_finish:92:44]
[2019-04-06T07:06:53.221Z] [INFO] [#tid_9fd179fb06e529c352277487058e6acf] [DockerContainer] sending arguments to /guest/sleepy at ContainerId(db8ea42a0a32fcf559acf0a2c549581e97ba6c5a312cb0a23be1e7e874fa8af5#
[2019-04-06T07:06:53.248Z] [INFO] [#tid_9fd179fb06e529c352277487058e6acf] [DockerContainer] running result: ok [marker:invoker_activationRun_finish:133:41]
[2019-04-06T07:06:53.248Z] [INFO] [#tid_9fd179fb06e529c352277487058e6acf] [ContainerProxy]  [marker:invoker_collectLogs_start:133]
[2019-04-06T07:06:53.249Z] [INFO] [#tid_9fd179fb06e529c352277487058e6acf] [ContainerProxy]  [marker:invoker_collectLogs_finish:134:1]
[2019-04-06T07:06:53.250Z] [INFO] [#tid_9fd179fb06e529c352277487058e6acf] [CouchDbRestStore] [PUT] 'whisk_local_activations' saving document: 'id: guest/dd6dc05cf0ce4d15adc05cf0ce3d15b3, rev: null' [marker:#
[2019-04-06T07:06:53.250Z] [INFO] [#tid_sid_dbBatcher] [CouchDbRestStore] 'whisk_local_activations' saving 1 documents [marker:database_saveDocumentBulk_start:83756362]
[2019-04-06T07:06:53.252Z] [INFO] [#tid_9fd179fb06e529c352277487058e6acf] [InvokerReactive] posted completion of activation dd6dc05cf0ce4d15adc05cf0ce3d15b3
**[2019-04-06T07:06:53.321Z] [INFO] [#tid_sid_invokerNanny] [RuncClient] running /usr/bin/docker-runc pause db8ea42a0a32fcf559acf0a2c549581e97ba6c5a312cb0a23be1e7e874fa8af5 (timeout: 10 seconds) [marker:invok#**
**[2019-04-06T07:06:53.362Z] [ERROR] [#tid_sid_invokerNanny] [RuncClient] info: command was unsuccessful, code: 1 (unsuccessful), stdout: , stderr: open /run/runc/db8ea42a0a32fcf559acf0a2c549581e97ba6c5a312cb#**
[2019-04-06T07:06:53.363Z] [INFO] [#tid_sid_invokerNanny] [DockerClientWithFileAccess] running /usr/bin/docker rm -f db8ea42a0a32fcf559acf0a2c549581e97ba6c5a312cb0a23be1e7e874fa8af5 (timeout: 1 minute) [mar#
[2019-04-06T07:06:53.726Z] [INFO] [#tid_sid_dbBatcher] [CouchDbRestStore]  [marker:database_saveDocumentBulk_finish:83756838:476]
[2019-04-06T07:06:53.726Z] [INFO] [#tid_9fd179fb06e529c352277487058e6acf] [CouchDbRestStore]  [marker:database_saveDocument_finish:611:476]

The docker- prefix has been removed from these binaries; see the release notes: https://github.com/docker/docker-ce/releases/tag/v18.09.0

Remove 'docker-' prefix for containerd and runc binaries docker/engine#61 / moby/moby#37907, docker-ce-packaging#241

I would handle this issue in https://github.com/apache/incubator-openwhisk/pull/4430

Thank you for your effort. @style95 I have read your PR changes, is that mean  the docker server version in my host is 18.09,  but inside invoker container, its own docker client is 1.12?

Yes, but actually, that problem comes from the invoker codes as runc client is hardcoded in the code.
https://github.com/apache/incubator-openwhisk/blob/master/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/RuncClient.scala#L58

Much clear! Real appreciate for your help.

closing as duplicate.


gh markdown report looks broken

Hope you've had a great xmas and nye.
I've just noticed that the ghmarkdown looks a little broken in https://github.com/google/fonts/pull/7143#issuecomment-1875578660

I thought it may be gftools qa, but when I run just fb using the --ghmarkdown arg, I get the same results.

Thanks, @m4rc1e! I'll take a look.
I hope you had great end of year celebrations as well!

The "border" line was not updated after the new FATAL was added. Ideally we would be using a Markdown table generation library, rather than having to update this kind of thing manually.

https://github.com/fonttools/fontbakery/pull/4390 should have fixed this. Can you try the main branch version?

Yeah, looking at https://github.com/google/fonts/pull/7162 this is now fixed.


Shorthand on Table bodyItems is missing key

https://github.com/tabler/tabler-react/blob/1f8e21cd607841e3c5c056e9133bdf39fa0c46f2/src/components/Table/Table.react.js#L30 needs a key prop passed in.  Will then need to be rendered in the table.  Currently gives the following warning: Warning: Each child in an array or iterator should have a unique "key" prop.

:tada: This issue has been resolved in version 1.20.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket: