Support GPU on linux and docker.

I am testing using ollama on linux and docker, and its not using the GPU at all.
it appears that ollma is not using the CUDA image.
I resolved the issue by replacing the base image.
https://github.com/jmorganca/ollama/blob/92578798bb1abcedd6bc99479d804f32d9ee2f6c/Dockerfile#L17-L23
change ubuntu:22.04 to nvidia/cuda:11.8.0-devel-ubuntu22.04
and then it works

Perhaps we can build a GPU image and push it to the community, using the "gpu" tag for differentiation.

@mxyng  PTAL, thanks.

I am testing using ollama on linux and docker, and its not using the GPU at all.
it appears that ollma is not using the CUDA image.
I resolved the issue by replacing the base image.
https://github.com/jmorganca/ollama/blob/92578798bb1abcedd6bc99479d804f32d9ee2f6c/Dockerfile#L17-L23
change ubuntu:22.04 to nvidia/cuda:11.8.0-devel-ubuntu22.04
and then it works
Perhaps we can build a GPU image and push it to the community, using the "gpu" tag for differentiation.

How to edit it please. Thank you

In dockerhub image ollama/ollama, GPU actually doesn’t work.
https://hub.docker.com/r/ollama/ollama
cp ollama/Dockerfile ollama/Dockerfile.gpu

change Line17
https://github.com/jmorganca/ollama/blob/06bcfbd6295b0aa0b4a63b6bd6731c0995f0802d/Dockerfile#L17
to
FROM nvidia/cuda:11.8.0-devel-ubuntu22.04

and then build a gpu image
docker build -t ollama/ollama:0.1.3-gpu .

I just tested (ubuntu 22 + docker nvidia toolkit + RTX 2070) and the docker works fine with GPU:
docker run -it --gpus=all -v ./ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama:latest

But for some reason it does not if I use it via compose:
version: '3.7'

services:

  llm:
    container_name: llm
    image: ollama/ollama:latest
    volumes:
      - ./ollama:/root/.ollama
    ports:
      - 11434:11434
    deploy:
      resources:
        reservations:
          devices:
            - capabilities: [gpu]

I just tested (ubuntu 22 + docker nvidia toolkit + RTX 2070) and the docker works fine with GPU

@pieroit can you run nvidia-smi, dose it show GPU usage?
it works via compose when use gpu image, like this：
services:

  llm:
    image: ollama/ollama:gpu
    volumes:
      - ./.ollama:/root/.ollama
    ports:
      - 11434:11434
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [ gpu ]

@Syulin7 thanks by adding count and driver under devices it works!
BTW I'm using image:ollama/ollama:latest, I can see the model runs at 3x the speed and I can launch nvidia-smi from within the container

@pieroit  In my case, it can start, but gpu not works.
Can you see if any process is using the GPU by using nvidia-smi.
Run docker logs ollama, there are some err logs.  I think it's because the base image is Ubuntu, which does not include CUDA.
ggml_init_cublas: found 1 CUDA devices:
  Device 0: NVIDIA A10, compute capability 8.6
CUDA error 222 at /go/src/github.com/jmorganca/ollama/llm/llama.cpp/ggml/ggml-cuda.cu:4905: the provided PTX was compiled with an unsupported toolchain.
2023/10/16 15:28:16 llama.go:323: llama runner exited with error: exit status 1
2023/10/16 15:28:17 llama.go:330: error starting llama runner: llama runner process has terminated

@Syulin7 the logs are fine:
2023/10/16 15:38:13 images.go:995: total blobs: 3
2023/10/16 15:38:13 images.go:1002: total unused blobs removed: 0
2023/10/16 15:38:13 routes.go:614: Listening on [::]:11434
2023/10/16 15:39:18 llama.go:252: 6506 MiB VRAM available, loading up to 64 GPU layers
2023/10/16 15:39:18 llama.go:356: starting llama runner

Some things that come to mind, but I'm not sure:

mismatch between the cuda drivers and the specific GPU
maybe some models are not compatible because they use different runtimes. I'm using mistral:7b-instruct-q2_K

:latest

I do the same but only 1 GPU-0 running, GPU-1 nvidia not working

As @pieroit mentioned, there a number of reasons it might not be working as expected. Can you (@Syulin7 and @missandi) describe what GPU you're running as well as the driver version?

As @pieroit mentioned, there a number of reasons it might not be working as expected. Can you (@Syulin7 and @missandi) describe what GPU you're running as well as the driver version?

@mxyng
A10 GPU + Ubuntu 20.04.6 LTS
NVIDIA-SMI 470.161.03
Driver Version: 470.161.03
CUDA Version: 11.4
nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Wed_Jul_14_19:41:19_PDT_2021
Cuda compilation tools, release 11.4, V11.4.100
Build cuda_11.4.r11.4/compiler.30188945_0

@Syulin7 my cuda version 11.5 but the same can't connect with nvidia in ubuntu 22.04.

@Syulin7 my cuda version 11.5 but the same can't connect with nvidia in ubuntu 22.04.

@missandi I'm not sure if it's because ollama requires CUDA >= 11.8, so you need to use a container image with CUDA 11.8. You can refer to the above method to rebuild the image.

@Syulin7 Both the GPU and CUDA drivers are older, from Aug. 2022. It's possible the combination of the two prevents ollama from using the GPU. If possible, you can try upgrading your drivers.
As a sanity check, make sure you've installed nvidia-container-toolkit and are passing in --gpus otherwise the container will not have access to the GPU.

On PopOS (Ubuntu 22.04) host, I also have the 1.5 Cuda Compiler, installed using sudo apt install nvidia-cuda-toolkit  after following install process from https://hub.docker.com/r/ollama/ollama (Nvidia GPU with apt) and also tested Nvidia's process.
Exact version installed of nvidia-container-toolkit is (1.12.1-0pop1~1679409890~22.04~5f4b1f2)
Still nvcc --version throws:
Built on Thu_Nov_18_09:45:30_PST_2021
Cuda compilation tools, release 11.5, V11.5.119
Build cuda_11.5.r11.5/compiler.30672275_0

with Driver Version: 535.113.01
Any idea how to upgrade to 11.8?

Ok, looks like https://developer.nvidia.com/cuda-11-8-0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=22.04&target_type=deb_local is the way
Last steps thew errors though:
Errors were encountered while processing:
 nvidia-dkms-520
 cuda-drivers-520
 cuda-drivers
 nvidia-driver-520
 cuda-runtime-11-8
 cuda-11-8
 cuda-demo-suite-11-8
 cuda
E: Sub-process /usr/bin/dpkg returned an error code (1)

but nvcc is now V11.8.89

Ok, looks like https://developer.nvidia.com/cuda-11-8-0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=22.04&target_type=deb_local is the way
Last steps thew errors though:
Errors were encountered while processing:
 nvidia-dkms-520
 cuda-drivers-520
 cuda-drivers
 nvidia-driver-520
 cuda-runtime-11-8
 cuda-11-8
 cuda-demo-suite-11-8
 cuda
E: Sub-process /usr/bin/dpkg returned an error code (1)

but nvcc is now V11.8.89
EDIT : Aaargh, NO, don't do it! In my case, the downgrade forced the display to 800x600 and you need to reload the right driver (535) to make your computer work again. WHAT A C..P

Starting the next release, you can set LD_LIBRARY_PATH when running ollama serve which will override the preset CUDA library ollama will use. This should increase compatibility when run on older systems. See #959 for an example of setting this in Kubernetes.
Note, this setting will not solve all compatibility issues with older systems especially CUDA driver versions less than 11.x.x

I am testing using ollama on linux and docker, and its not using the GPU at all.
it appears that ollma is not using the CUDA image.
I resolved the issue by replacing the base image.
https://github.com/jmorganca/ollama/blob/92578798bb1abcedd6bc99479d804f32d9ee2f6c/Dockerfile#L17-L23
change ubuntu:22.04 to nvidia/cuda:11.8.0-devel-ubuntu22.04
and then it works
Perhaps we can build a GPU image and push it to the community, using the "gpu" tag for differentiation.

How to edit it please. Thank you

Couldn't find '/root/.ollama/id_ed25519'. Generating new private key.
2023-11-04T11:55:27.693683008+08:00 Your new public key is:
2023-11-04T11:55:27.693689278+08:00
2023-11-04T11:55:27.693691398+08:00 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ+RedFwXCBV3M6Z9VzsvtMgEiGDIqkLO/TLdN0KC+PK
2023-11-04T11:55:27.693692748+08:00
2023-11-04T11:55:27.693872504+08:00 2023/11/04 03:55:27 images.go:824: total blobs: 0
2023-11-04T11:55:27.693912054+08:00 2023/11/04 03:55:27 images.go:831: total unused blobs removed: 0
2023-11-04T11:55:27.694082400+08:00 2023/11/04 03:55:27 routes.go:680: Listening on [::]:11434 (version 0.1.8)
2023-11-04T11:55:27.694538690+08:00 2023/11/04 03:55:27 routes.go:700: Warning: GPU support may not be enabled, check you have installed GPU drivers: nvidia-smi command failed
root@ollama-64764b89c5-6nbjh:/# nvidia-smi
bash: nvidia-smi: command not found
root@ollama-64764b89c5-6nbjh:/#
deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/name: llm
name: ollama
namespace: k8s-at-home
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: llm
template:
metadata:
labels:
app.kubernetes.io/name: llm
spec:
nodeName: ubuntu-gpu
containers:
- image: <IP_ADDRESS>:5000/ollama/ollama:gpu
imagePullPolicy: IfNotPresent
name: llm
ports:
- containerPort: 11434
protocol: TCP
resources:
limits:
nvidia.com/gpu: 1
requests:
nvidia.com/gpu: 1

change ubuntu:22.04 to nvidia/cuda:11.8.0-devel-ubuntu22.04

Thanks, I made that change then did:
docker build -t ollama/ollama:0.1.3-gpu -f Dockerfile.gpu .
But the build eventually  fails with:
Step 6/18 : ADD https://dl.google.com/go/go1.21.1.linux-$TARGETARCH.tar.gz /tmp/go1.21.1.tar.gz
ADD failed: failed to GET https://dl.google.com/go/go1.21.1.linux-.tar.gz with status 404 Not Found: <!DOCTYPE html>

Should I manually set TARGETARCH to something in the Dockerfile.gpu ? I am running:
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"

The Docker Hub image should work out of the box with NVIDIA GPUs. Make sure the image is up-to-date and that all preconditions (mainly nvidia-drivers and nvidia-container-toolkit) are satisfied. See #1306 for more details

@mxyng The ollama/ollama docker image (at least of version ollama/ollama:0.1.12) does not work out of the box. In my testing, #1306 fixes this issue.

on wsl 2 with ollama:latest , this compose file worked for me https://github.com/jmorganca/ollama/issues/797#issuecomment-1764687661
reference on more resources: https://docs.docker.com/compose/gpu-support/

added
    spec:
      runtimeClassName: your-runtime-class  # Specify the RuntimeClass name here
      containers:....

to my deployment and started working


Make the basic circuits from Advanced Rocketry be compatible with Mekanism and ICBM-Classic circuits.

Like my dilithium compat suggestion, this should be really easy, just put circuitBasic into the oredictionary, and make the recipes accept circuitBasic. That way, you will be able to use Mekanism and ICBM-Clasic (possibly other mods) basic circuits.

The advanced rocketry basic circuit is far more complex than the mekanism basic circuit, and I believe that it should not be oredictionaried

As stated, the AR basic circuit is not like other mod's circuits - there is no real corollary between them.


Temporarily hide ticker

As the number of validators coming from the integration is embarrassingly wrong

Worked out with Barney how to fix the number of validators properly so we did this instead so closing this PR and deleting the branch


Add Minimum Heights to Transcription Sections

Closes #115
Takes care of issues with the transcription pane when too many transcriptions present. You can test this by going to a transcription with too many annotations for a line.
This one should work:
Project: Anti-Slavery Testing
Workflow: Anti-Slavery Workflow 1
Group: TEST1
Transcription: 72815
Upon opening that transcription there should be a line on the table with 39 transcriptions that begins, "Mr that Oakes"

@shaunanoordin What kind of issue were you seeing with TOVE? Feel free to open an issue here, in the TOVE repo, or post something in the channel if the issue persists.


Migration to Space Age causes an error

Problem Description
Hi,
i tired updating our dedicated server to space age and during startup following error occurred.
I tested a local singleplayer savegame and the same error in factoryplanner::on_configuration_changed happend.
   0.000 2024-10-21 18:08:44; Factorio 2.0.7 (build 79385, linux64, headless)
   0.000 Operating system: Linux
   0.000 Program arguments: "/opt/factorio/bin/x64/factorio" "--port" "34197" "--server-settings" "/factorio/config/server-settings.json" "--server-banlist" "/factorio/config/server-banlist.json" "--rcon-port" "27015" "--server-whitelist" "/factorio/config/server-whitelist.json" "--use-server-whitelist" "--server-adminlist" "/factorio/config/server-adminlist.json" "--rcon-password" <private> "--server-id" "/factorio/config/server-id.json" "--start-server-load-latest"
   0.000 Config path: /opt/factorio/config/config.ini
   0.000 Read data path: /opt/factorio/data
   0.000 Write data path: /factorio [45885/76587MB]
   0.000 Binaries path: /opt/factorio/bin
   0.028 System info: [CPU: Intel Xeon Processor (Skylake, IBRS, no TSX), 4 cores, RAM: 7751 MB]
   0.029 Environment: DISPLAY=<unset> WAYLAND_DISPLAY=<unset> DESKTOP_SESSION=<unset> XDG_SESSION_DESKTOP=<unset> XDG_CURRENT_DESKTOP=<unset> SDL_VIDEODRIVER=<unset> __GL_FSAA_MODE=<unset> __GL_LOG_MAX_ANISO=<unset> __GL_SYNC_TO_VBLANK=<unset> __GL_SORT_FBCONFIGS=<unset> __GL_YIELD=<unset>
   0.031 Running in headless mode
   0.031 Audio is disabled
   0.032 Info ModManager.cpp:434: FeatureFlag expansion-shaders = true
   0.032 Info ModManager.cpp:434: FeatureFlag freezing = true
   0.032 Info ModManager.cpp:434: FeatureFlag quality = true
   0.032 Info ModManager.cpp:434: FeatureFlag rail-bridges = true
   0.032 Info ModManager.cpp:434: FeatureFlag segmented-units = true
   0.032 Info ModManager.cpp:434: FeatureFlag space-travel = true
   0.032 Info ModManager.cpp:434: FeatureFlag spoiling = true
   0.038 Loading mod core 0.0.0 (data.lua)
   0.067 Loading mod base 2.0.7 (data.lua)
   0.347 Loading mod elevated-rails 2.0.7 (data.lua)
   0.405 Loading mod flib 0.15.0 (data.lua)
   0.430 Loading mod quality 2.0.7 (data.lua)
   0.454 Loading mod factoryplanner 2.0.1 (data.lua)
   0.472 Loading mod space-age 2.0.7 (data.lua)
   0.905 Loading mod base 2.0.7 (data-updates.lua)
   0.949 Loading mod quality 2.0.7 (data-updates.lua)
   1.028 Loading mod space-age 2.0.7 (data-updates.lua)
   1.294 Checksum for core: 649243273
   1.294 Checksum of base:<PHONE_NUMBER>
   1.294 Checksum of elevated-rails:<PHONE_NUMBER>
   1.294 Checksum of flib:<PHONE_NUMBER>
   1.294 Checksum of quality:<PHONE_NUMBER>
   1.294 Checksum of factoryplanner:<PHONE_NUMBER>
   1.294 Checksum of space-age:<PHONE_NUMBER>
   2.131 Prototype list checksum:<PHONE_NUMBER>
   2.279 Info PlayerData.cpp:66: Local player-data.json available, timestamp<PHONE_NUMBER>
   2.279 Info PlayerData.cpp:73: Cloud player-data.json unavailable
   2.282 Factorio initialised
   2.282 Info ServerSynchronizer.cpp:20: nextHeartbeatSequenceNumber(0) initialized Synchronizer nextTickClosureTick(0).
   2.283 Info ServerMultiplayerManager.cpp:803: updateTick(18446744073709551615) changing state from(Ready) to(PreparedToHostGame)
   2.283 Info ServerMultiplayerManager.cpp:803: updateTick(18446744073709551615) changing state from(PreparedToHostGame) to(CreatingGame)
   2.283 Loading map /factorio/saves/dbsFactory.zip: 6879516 bytes.
   2.298 Loading level.dat: 22202220 bytes.
   2.314 Info Scenario.cpp:178: Map version 1.1.110-0
   2.320 Info PrototypeMigrationList.cpp:195: Activating migration base/1.2.0 stack inserter rename.json
   2.320 Info PrototypeMigrationList.cpp:195: Activating migration base/2.0.0-biter-egg.json
   2.320 Info PrototypeMigrationList.cpp:195: Activating migration base/2.0.0-internal.json
   2.320 Info PrototypeMigrationList.cpp:195: Activating migration base/2.0.0-internal2.json
   2.321 Info PrototypeMigrationList.cpp:195: Activating migration base/2.0.0-internal3.json
   2.321 Info PrototypeMigrationList.cpp:195: Activating migration base/2.0.0.json
   2.321 Info PrototypeMigrationList.cpp:195: Activating migration space-age/aquilo-tilesets.json
   2.321 Info PrototypeMigrationList.cpp:195: Activating migration space-age/biolab.json
   2.321 Info PrototypeMigrationList.cpp:195: Activating migration space-age/internal.json
   2.321 Info PrototypeMigrationList.cpp:195: Activating migration space-age/jelly-yum-rename.json
   2.322 Info PrototypeMigrationList.cpp:195: Activating migration space-age/shattered-planet.json
   2.322 Info PrototypeMigrationList.cpp:195: Activating migration space-age/tungsten-belt-rename.json
   3.219 Info ItemStack.cpp:271: Fixing non-stackable ItemStack count from 7 to 1 for: pointer: 0x000070f02a3ce248, item pointer: (nil), ID: 318, count: 7, stack size: 1, prototype stack size: 1, prototype type: item.
   4.035 Blueprint storage "blueprint-storage-2.dat" was not found, trying to load previous version storage "blueprint-storage.dat"
   5.150 Loading script.dat: 465330 bytes.
   5.168 Checksum for script __level__/control.lua:<PHONE_NUMBER>
   5.206 Checksum for script __factoryplanner__/control.lua:<PHONE_NUMBER>
   5.224 Applying migration: Base Mod: 2.0.0.lua
   5.471 Error ServerMultiplayerManager.cpp:84: MultiplayerManager failed: "The mod Factory Planner (2.0.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event factoryplanner::on_configuration_changed
__factoryplanner__/backend/migrations/migration_1_2_15.lua:10: bad argument #1 of 2 to 'pairs' (table expected, got nil)
stack traceback:
	[C]: in function 'pairs'
	__factoryplanner__/backend/migrations/migration_1_2_15.lua:10: in function 'migration_function'
	__factoryplanner__/backend/handlers/migrator.lua:63: in function 'apply_migrations'
	__factoryplanner__/backend/handlers/migrator.lua:101: in function 'migrate_player_tables'
	__factoryplanner__/backend/init.lua:235: in function <__factoryplanner__/backend/init.lua:224>"
   5.471 Info ServerMultiplayerManager.cpp:803: updateTick(18446744073709551615) changing state from(CreatingGame) to(InitializationFailed)
   5.471 Info CommandLineMultiplayer.cpp:211: Exit point.
   5.484 Info ServerMultiplayerManager.cpp:146: Quitting multiplayer connection.
   5.484 Info ServerMultiplayerManager.cpp:803: updateTick(18446744073709551615) changing state from(InitializationFailed) to(Closed)
   5.618 Info UDPSocket.cpp:233: Closing socket
   5.619 Goodbye

Mods from mod-list.json

factoryplanner at 2.0.1
flib at 0.15.0

I know it is recommended to start a new save game with space age but i would appreciate being able to continue existing ones.
Reproduction

Update server to Space Age
Update mods
Starting server with old save game

Hello, appreciate the nice report! Could you provide me the save file for this? It's hard to debug migrations otherwise.

yes. here we go.
dbsFactory_preUpdate.zip

Thanks

Thanks again, this was indeed a bug in the migrations. Fixed for 2.0.2, due out soon.


[VirtualMachine] new method allowing to set one input tensor by its index or name

Implementation of set_one_input method in VirtualMachine (VM) class. It provides more convenient way to work with multiple input models on native side. Now you can use index or name to set one input tensor to VM.
Examples:
set_one_input("main", "data", tensor0)
set_one_input("main", 1, tensor1)
It was required due to GraphExecutor (GE) and VM have different signature for set_input method. set_input from VM is not so convenient for work with multiple tensor input. Implemented set_one_input method in VM is repeated signature from set_input in GE.
I think it will be good if we have the same API for both GraphExecutor and VirtualMachine. But I do not see simple way for it.
My current solution seems solid but not final.
Possible improvements: I can insert functionality of set_one_input method to base method set_input. But I do not think that it is good idea to mix them. Other possible extension is to additionally reload set_input with args: func_name, index1(name1), tensor1, index2(name2), tensor2, …, indexN(nameN), tensorN, where N is number of all input tensors. But it is still not perfect solution for me.

One more question (sorry to double dip!): I agree a uniform parameter passing convention for all executions would be a Fine Thing. What I don't understand is why we separate binding and invocation in the first place? Surely the uniform API would be invoke(func, *args)?

Hello@mbs-octoml, thanks for your comment. I'm not sure that I fully caught your idea, I think it is related to design improvement of an executor, but for this the more qualified ingeneer is needed who knows functionality and design of GE, VM and possible future executor to evaluate profits and risk related to back compatability of the code. My aim was to solve my local task only and try to do it so that somebody also can use my tool. @tmoreau89 what do you think about it?

It sounds like there are more deeply rooted issues with the VM design choice to do explicit parameter binding etc. This seems indeed like a bigger discussion that warrants its own RFC, tracking issue etc; not sure a TODO here would be the best way to track the need to redesign. Due to time difference and latency in getting the PR changed, then approved, we could merge this without the TODO change. WDYT @mbs-octoml ?

I filed CORE-142, though obviously that's not visible to the wider community. @jroesch expressed concern with bringing GE APIs over to the VM since the one-param-at-a-time API is fragile.


Adapter State Initializing

i am getting error "Unhandeld adapter state OBD2AdapterStateInitializing"  after i am replace your services "[@[ @"FFF0", @"FFE0", @"BEEF" , @"E7810A71-73AE-499D-8C15-FAA9AEF0C3F2"]"  with my own service "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxx" and also added check for verify own characteristics not getting any response
-(void)peripheral:(CBPeripheral *)peripheral didDiscoverCharacteristicsForService:(CBService *)service error:(NSError )error
{
for ( CBCharacteristic characteristic in service.characteristics )
{
if ([characteristic.UUID.UUIDString isEqualToString:@"xxxxxxxxxxxx-xxxxxxx-xxxxxx-xxxxxxxxxxxx"]) {
if ( characteristic.properties & CBCharacteristicPropertyRead )
{
LOG( @"Did see read characteristic" );
_reader = characteristic;
            [peripheral readValueForCharacteristic:characteristic];
            //[peripheral setNotifyValue:YES forCharacteristic:characteristic];
        }

        if ( characteristic.properties & CBCharacteristicPropertyWrite )
        {
            LOG( @"Did see write characteristic" );
            _writer = characteristic;
        }
    }
}

if ( _reader && _writer )
{
    [self connectionAttemptSucceeded];
}
else
{
    [self connectionAttemptFailed];
}

}

Do you recall how you fixed this?


Ensure Content-Type is the same irrespective of whether asset is served from NFS or S3

While testing issue #149 I noticed that the value of the Content-Type header was different when the file was served from NFS (application/octet-stream) vs when it was served from S3 (*/*; charset=utf-8).
We should ensure the value of the Content-Type header for the commonly uploaded asset filetypes is the identical when served from NFS or S3. It might be that the problem I saw in issue #149 was due to me using an unusual file extension (.dat) and that for everything else it might work just fine.

I've investigated the Content-Type being reported for each of these 20 file extensions.
In each case I created an empty file with the relevant file extension using touch file.<extension>. I uploaded the file to my local asset-manager and then requested it from the filesystem and from S3. I did this testing in the Rails development environment but also tested a couple of them in the Rails production environment to ensure we were seeing the same results.

File extension
Filesystem
S3

pdf
application/pdf
application/pdf

jpg
image/jpeg
image/jpeg

doc
application/octet-stream
*/*; charset=utf-8

png
image/png
image/png

gif
image/gif
image/gif

docx
application/octet-stream
*/*; charset=utf-8

xlsx
application/octet-stream
*/*; charset=utf-8

xls
application/octet-stream
*/*; charset=utf-8

odt
application/octet-stream
*/*; charset=utf-8

ppt
application/octet-stream
*/*; charset=utf-8

zip
application/zip
application/zip

ods
application/octet-stream
*/*; charset=utf-8

pptx
application/octet-stream
*/*; charset=utf-8

xlsm
application/octet-stream
*/*; charset=utf-8

url
application/octet-stream
*/*; charset=utf-8

csv
text/csv
text/csv

jpeg
image/jpeg
image/jpeg

pd
application/octet-stream
*/*; charset=utf-8

txt
text/plain
text/plain

webp
application/octet-stream
*/*; charset=utf-8

It looks as though the difference is in the Rails app (rather than in the nginx config):
$ curl http://localhost:3037/media/59a81844759b74425ab3ccca/file.webp -v
< HTTP/1.1 200 OK
< Content-Type: application/octet-stream

$ curl http://localhost:3037/media/59a81844759b74425ab3ccca/file.webp?proxy_to_s3_via_nginx=true -v
< HTTP/1.1 200 OK
< Content-Type: */*; charset=utf-8

I've created PR #177 that contains a fix for this issue.

I've merged PR #177 and plan to test the behaviour in integration once it's been deployed.

I've just checked this in integration:
$ echo `date` > tmp.doc

$ curl https://asset-manager.integration.publishing.service.gov.uk/assets --form<EMAIL_ADDRESS>-H"Authorization: Bearer `cat /etc/govuk/manuals-publisher/env.d/ASSET_MANAGER_BEARER_TOKEN`" -H"Accept: application/json"
{"_response_info":{"status":"created"},"id":"https://asset-manager.integration.publishing.service.gov.uk/assets/59ad3f1ced915d6253709d18","name":"tmp.doc","content_type":"application/msword","file_url":"https://assets-origin.integration.publishing.service.gov.uk/media/59ad3f1ced915d6253709d18/tmp.doc","state":"unscanned"}

$ curl https://assets-origin.integration.publishing.service.gov.uk/media/59ad3f1ced915d6253709d18/tmp.doc -v
< HTTP/1.1 200 OK
< Content-Type: application/octet-stream

$ curl https://assets-origin.integration.publishing.service.gov.uk/media/59ad3f1ced915d6253709d18/tmp.doc?proxy_to_s3_via_nginx=true -v
< HTTP/1.1 200 OK
< Content-Type: application/octet-stream

I'm happy that it's working as expected so am closing this issue.


Make all paths lower case

Its conventional, I've never seen a site with paths in title case
https://google.com/Doodles ❌
https://google.com/doodles ✔
https://universal-bypass.org/Faq ❌
https://universal-bypass.org/faq ✔

Actually yes


IndexError when using Beam Search in Chat Completions

I know this may not be supported given the added complexity, but I just wanted some clarification because I was surprised to see that I could pass these parameters to the server. Right now I non-deterministically hit an IndexError here
Here is a simple client/server example. I am using v0.2.7
python -m vllm.entrypoints.openai.api_server --model mistralai/Mistral-7B-Instruct-v0.1

from openai import OpenAI

openai_api_key = "EMPTY"
openai_api_base = "http://localhost:8000/v1"

client = OpenAI(
    api_key=openai_api_key,
    base_url=openai_api_base,
)
chat_completion = client.chat.completions.create(
    messages=[{"role": "user", "content": "Hello, world!"}],
    model="mistralai/Mistral-7B-Instruct-v0.1",
    max_tokens=128,
    temperature=0,
    stream=True,
    extra_body={
      "use_beam_search": True,
      "best_of": 3
    }
)
for chunk in chat_completion:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

Ah I just fixed this for completion but not for chat. This is a bug. Thank you for raising this!

if this is not solved, I will contribute to this. please let me know.

Hi @simon-mo , is https://github.com/vllm-project/vllm/pull/2529 the mentioned PR?

Completions API accepts batch of prompts while Chat Completions API does not, which confused me a bit about the corresponding proposed solution. For Completions API streaming parameter ends up being False, independent from the stream parameter in the request, if beam search is used. Would the expected solution be a similar one?

Yeah I thin the reason is when performing beam search, we can't stream token by token. So disabling is the easiest fix there. This might be a legacy constraint given that the generate call can still output incremental tokens results when beam search is used.

is there any solutions?

Hi,
Would like to fix the issue.
can someone assign it to me?

/assign


Create boubacar.json

new first name

Hey @copolycube,
Something went wrong with the build.
TravisCI finished with status errored, which means the build failed because of something unrelated to the tests, such as a problem with a dependency or the build process itself.
View build log
TravisBuddy Request Identifier: 36dff030-f4e3-11e9-9e2b-01a46d152451


Remove special character and replace with regular apostrophe

We have a build script which we are using but it doesn't accept special characters. I noticed it breaking on your project. The character was a ’ apostrophe and it's just in a comment. I have replaced that with a regular one.

This sounds like a flaw in your build script. Typographically correct apostrophes shouldn't cause problems, as the encoding of JS files should be assumed to be UTF-8 or UTF-16.


UIExplorer example fails to build (again)

Hello,

I was following the instructions to set up the react-native examples (UIExplorer, Movies etc.) pulled from GIT.
I am attempting to set it up to preview the examples via the Genymotion Android Simulator on a Mac.
*All previous steps regarding setup, pulling the repo, etc. are successful with no errors.
*I then execute the following statement at the bash shell on Mac

./gradlew :Examples:UIExplorer:android:app:installDebug
The following error is shown while building.
_:Examples:UIExplorer:android:app:compileDebugJavaWithJavac
/Users/edward/gitRepo/react-native/Examples/UIExplorer/android/app/src/main/java/UIExplorerActivity.java:63: error: cannot find symbol
mReactInstanceManager.onPause();
^
symbol:   method onPause()
location: variable mReactInstanceManager of type ReactInstanceManager
/Users/edward/gitRepo/react-native/Examples/UIExplorer/android/app/src/main/java/UIExplorerActivity.java:72: error: cannot find symbol
mReactInstanceManager.onResume(this, this);
^
symbol:   method onResume(UIExplorerActivity,UIExplorerActivity)
location: variable mReactInstanceManager of type ReactInstanceManager
2 errors
:Examples:UIExplorer:android:app:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':Examples:UIExplorer:android:app:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED_
Using the --debug parameter reveals similar info
11:47:06.178 [INFO] [org.gradle.api.internal.tasks.compile.JdkJavaCompiler] Compiling with JDK Java compiler API.
11:47:06.434 [ERROR] [system.err] /Users/edward/gitRepo/react-native/Examples/UIExplorer/android/app/src/main/java/UIExplorerActivity.java:63: error: cannot find symbol
11:47:06.434 [ERROR] [system.err]       mReactInstanceManager.onPause();
11:47:06.434 [ERROR] [system.err]                            ^
11:47:06.435 [ERROR] [system.err]   symbol:   method onPause()
11:47:06.435 [ERROR] [system.err]   location: variable mReactInstanceManager of type ReactInstanceManager
11:47:06.440 [ERROR] [system.err] /Users/edward/gitRepo/react-native/Examples/UIExplorer/android/app/src/main/java/UIExplorerActivity.java:72: error: cannot find symbol
11:47:06.441 [ERROR] [system.err]       mReactInstanceManager.onResume(this, this);
11:47:06.441 [ERROR] [system.err]                            ^
11:47:06.441 [ERROR] [system.err]   symbol:   method onResume(UIExplorerActivity,UIExplorerActivity)
11:47:06.441 [ERROR] [system.err]   location: variable mReactInstanceManager of type ReactInstanceManager
11:47:06.464 [ERROR] [system.err] 2 errors
11:47:06.465 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':Examples:UIExplorer:android:app:compileDebugJavaWithJavac'
11:47:06.465 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :Examples:UIExplorer:android:app:compileDebugJavaWithJavac FAILED
11:47:06.466 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :Examples:UIExplorer:android:app:compileDebugJavaWithJavac (Thread[Daemon worker Thread 4,5,main]) completed. Took 0.319 secs.
11:47:06.466 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[Daemon worker Thread 4,5,main]] finished, busy: 5.546 secs, idle: 0.049 secs
11:47:06.468 [ERROR] [org.gradle.BuildExceptionReporter]
11:47:06.468 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
11:47:06.468 [ERROR] [org.gradle.BuildExceptionReporter]
11:47:06.469 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
11:47:06.469 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':Examples:UIExplorer:android:app:compileDebugJavaWithJavac'.
11:47:06.469 [ERROR] [org.gradle.BuildExceptionReporter] > Compilation failed; see the compiler error output for details.
11:47:06.469 [ERROR] [org.gradle.BuildExceptionReporter]
11:47:06.469 [ERROR] [org.gradle.BuildExceptionReporter] * Try:
11:47:06.470 [ERROR] [org.gradle.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.
11:47:06.471 [LIFECYCLE] [org.gradle.BuildResultLogger]
11:47:06.471 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
11:47:06.471 [LIFECYCLE] [org.gradle.BuildResultLogger]
11:47:06.471 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 14.184 secs
11:47:07.413 [INFO] [org.gradle.launcher.daemon.client.DaemonClient] Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':Examples:UIExplorer:android:app:compileDebugJavaWithJavac'.] from daemon DaemonInfo{pid=23827, address=[0c64a320-a8e2-43e3-ad0a-0b3dfff7feca port:65276, addresses:[/0:0:0:0:0:0:0:1, /<IP_ADDRESS>]], idle=true, context=DefaultDaemonContext[uid=dba435c0-a637-4e5b-8486-166f81a1489c,javaHome=/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home,daemonRegistryDir=/Users/edward/.gradle/daemon,pid=23827,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done).
and using the -info parameter also returns the same information
Executing task ':Examples:UIExplorer:android:app:compileDebugJavaWithJavac' (up-to-date check took 0.004 secs) due to:
No history is available.
All input files are considered out-of-date for incremental task ':Examples:UIExplorer:android:app:compileDebugJavaWithJavac'.
Compiling with JDK Java compiler API.
/Users/edward/gitRepo/react-native/Examples/UIExplorer/android/app/src/main/java/UIExplorerActivity.java:63: error: cannot find symbol
mReactInstanceManager.onPause();
^
symbol:   method onPause()
location: variable mReactInstanceManager of type ReactInstanceManager
/Users/edward/gitRepo/react-native/Examples/UIExplorer/android/app/src/main/java/UIExplorerActivity.java:72: error: cannot find symbol
mReactInstanceManager.onResume(this, this);
^
symbol:   method onResume(UIExplorerActivity,UIExplorerActivity)
location: variable mReactInstanceManager of type ReactInstanceManager
2 errors
:Examples:UIExplorer:android:app:compileDebugJavaWithJavac FAILED
:Examples:UIExplorer:android:app:compileDebugJavaWithJavac (Thread[Daemon worker Thread 5,5,main]) completed. Took 0.418 secs.
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':Examples:UIExplorer:android:app:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

BUILD FAILED
Total time: 7.151 secs
Stopped 0 compiler daemon(s).
Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':Examples:UIExplorer:android:app:compileDebugJavaWithJavac'.] from daemon DaemonInfo{pid=23827, address=[0c64a320-a8e2-43e3-ad0a-0b3dfff7feca port:65276, addresses:[/0:0:0:0:0:0:0:1, /<IP_ADDRESS>]], idle=true, context=DefaultDaemonContext[uid=dba435c0-a637-4e5b-8486-166f81a1489c,javaHome=/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home,daemonRegistryDir=/Users/edward/.gradle/daemon,pid=23827,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done).
using --stacktrace returns
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':Examples:UIExplorer:android:app:compileDebugJavaWithJavac'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
... (did not want to put the whole stacktrace unless you want it)
All the types of errors indicate that UIExplorerActivity.java has an error onPause() and onResume() while compiling.
I have already looked at similar issues on this list, including

https://github.com/facebook/react-native/issues/5790
https://github.com/facebook/react-native/issues/4858

But they do not appear to be related to this issue (as it is a different class that is failing even though the error result might be the same.
Notes: building the iOS version works fine (with xCode etc.).
How to fix this?  Any insight appreciated. thanks..
Edward

Are you sure you have the latest version? I fixed this a few days ago in ad17a2f2908f430b05fd2836d3f08873988bce10.

Hi @janicduplessis  I pulled last week, February 19th it looks like. Did you update it since then? Would you suggest I pull again and go through the steps?

Yes, it was fixed 2 days ago. You can just pull again and it should work.

Hello @janicduplessis ,
Thanks for your response. I pulled the latest build from gitHub (via git pull). I was able to proceed with invoking the following lines
./gradlew :Examples:UIExplorer:android:app:installDebug
./packager/packager.sh
note I replaced Movies with UIExplorer, of course.
but when launching the app in the genymotion simulator I get the following error in the sim:

and the terminal log shows the following information below.
TypeError: _this2._depGraph.createPolyfill is not a function
at index.js:152:40
at Array.map (native)
at Resolver.getModuleSystemDependencies (index.js:152:7)
at Bundler.bundle (index.js:163:22)
at index.js:223:28
at tryCallOne (/Users/edward/gitRepo/react-native/node_modules/promise/lib/core.js:37:12)
at /Users/edward/gitRepo/react-native/node_modules/promise/lib/core.js:123:15
at flush (/Users/edward/gitRepo/react-native/node_modules/promise/node_modules/asap/raw.js:50:29)
at nextTickCallbackWith0Args (node.js:453:9)
at process._tickCallback (node.js:382:13)
doing a search for  createPolyfill here in the issues threads doesn't reveal anything. Let me know how to proceed from here.
thanks
Edward

Hi there - in addition, I did check index.js as well, and it does seem that createPolyfill() is not actually defined there...I looked up the declaration of _depGraph and this is what I see initially:
    this._depGraph = new DependencyGraph({       activity: Activity,       roots: opts.projectRoots,       assetRoots_DEPRECATED: opts.assetRoots,       assetExts: opts.assetExts,       ignoreFilePath: function(filepath) {         return filepath.indexOf('__tests__') !== -1 ||           (opts.blacklistRE && opts.blacklistRE.test(filepath));       },       providesModuleNodeModules: [         'fbjs',         'react',         'react-native',         // Parse requires AsyncStorage. They will         // change that to require('react-native') which         // should work after this release and we can         // remove it from here.         'parse',       ],       platforms: ['ios', 'android'],       preferNativePlatform: true,       fileWatcher: opts.fileWatcher,       cache: opts.cache,       shouldThrowOnUnresolvedErrors: (_, platform) => platform === 'ios',     });
not sure if that helps, but let me know if you need other info - or maybe this should be pushed to a new thread/discussion (as its not related to building the examples)

Update your node-haste module.

@Kureev thank you, I have updated node-haste. it appears to be working now. someone should update notes at some point :)
have a great day.


Does not work with Office 365 Germany

For accounts created on Office 365 Germany
https://products.office.com/en-gb/business/office-365-germany
the AZURE_BASE_URL must be https://login.microsoftonline.de/

thanks @marcus-fellinger-esc , care to submit a PR to pull that from provider which defaults to the constant?


Creating new customer via Administration

PHP Version
7.4
Shopware Version
<IP_ADDRESS>
Expected behaviour
Correct creation of a new customer via Administration Panel.
Actual behaviour
An error occurs when I try to save a new customer:
api/customer

"code":"0",
"status":"500",
"title":"Internal Server Error",
"detail":"Provided language 2fbb5fe2e29a4d70aa5854ce7ce3e20b is not in list of available languages: 1a9cee9450244cd6a90d7541246debd9"

How to reproduce
Create a saleschannel with one language that is not the default system language. For example, when the system default language is English, create with German.
Fill out the new customer creation form in the administration panel and select the created saleschannel with one language other than the default system language and save.

Did you changed/deleted the default language from the shopware installation?

@moorl nope, tested on clean and fresh instances.

We are experiencing this issue as well.
The error comes from the new BaseContextFactory.
https://github.com/shopware/platform/blame/trunk/src/Core/System/SalesChannel/Context/BaseContextFactory.php#L329
Could a solution be to just fall back to the default language of the saleschannel instead of throwing an exception ?

Just a small Update: In my tests in <IP_ADDRESS> the customer was created anyway. In <IP_ADDRESS> the customer is not created anymore.

Hello,
Within our company roadmap and work capacity, we try to address each bug or improvement request but admit that not each one will be resolved. To continue our culture of honesty and openness, we are closing this issue to focus on our roadmap on behalf of all Shopware users.
If you feel like this issue is still impacting you, please create a new issue and let us know.
Thank you again for your valuable feedback.


Router striping real dirpath from the urls.

When I clone the project into new localhost subdir http://localhost/citest
When I open the home page at http://localhost/citest/public/  it works fine.
How ever when I add  it outputs 'http://localhost/' only.
What I found is that in this condition https://github.com/bcit-ci/CodeIgniter4/blob/develop/system/HTTP/IncomingRequest.php#L489
the query path is substr from the uri.
I think that there is some logical mistake.
I believe that the problem is routing + namespaces. At least if I understand it this clearing the real dir names from the path is to ensure that there are only namespaces/controllers/methods words into the router segments.
https://github.com/bcit-ci/CodeIgniter4/blob/develop/system/HTTP/IncomingRequest.php#L367
Here the URI class sets path but after this dirname path is cleared and I think that this is generating the problem.
$this->detectPath($protocol) is generating string '/' instead of '/test/public/'
Perhaps one good solution is to have another param $basepath into the URI class which will contain this stripped part and it will be involved into building of urls.

Have you set public $baseURL in /application/Config/App.php ?

I'll take a look at the code in question, however there are two things here:

That code is pretty much a direct rip from CI3, so I think it's likely the logic has been all worked out there already.
you're visiting your page from outside the public directory, which is not the intended way, and is a security risk. The URI should be pointing to the public directory. If it's not, things can't be guaranteed to work all of the time. And that would need .htaccess RewriteBase changed, etc.
As @arma7x pointed out, you should set $baseURL. Currently, it's attempting to do you favor and guess what the base url is when you don't supply that. It cannot always guess correctly.

My guess is that if you'll either set $baseURL, or serve the site from the public folder, things will work just fine for you.

@lonnieezell The problem is that the $_SERVER is returning that path /test/public/ and after that the router has removing it.
By the way with set $baseURL the problem still exists.. Not quite sure why..

I'm pretty sure $_SERVER['SCRIPT_NAME'] is remove from $_SERVER['REQUEST_URI'] and will return URI after it only.
$_SERVER['REQUEST_URI'] = "/CodeIgniter4/public/index.php/home"
$_SERVER['SCRIPT_NAME'] = "/CodeIgniter4/public/index.php"

In fact even when I set baseURL to
'http://localhost/test/public/' or 'http://localhost/test/'
Again I got my subfolders stripped from the url when trying to build it with
current_url(), base_url(), site_url()

I haven't had a chance to look into this yet. Dealing with other bugs. Will be out tonight so might not be until Sunday night that I have a chance to look into it, but 2 questions:

Have you tried serving the site from the public folder, where it's intended to run from, to see if things work correctly?
Have you stepped through the code to see what it's doing exactly to verify that's a problem? Like I said, that's exactly what's in CI2 and CI3, so I don't think that particular piece is part of the problem.

In CI 3 base url is auto detected correctly
https://github.com/bcit-ci/CodeIgniter/blob/develop/system/core/Config.php#L88
But here I didn't find where is the autodetection and at the same time I didn't find when this base url is used at all :/.
I will try to find time at the weekend to search for the possible reasons.
(1) My idea is that there should be no difference if the site is rooted to the public folder or its some sub-sub-sub-folder

Currently $baseURL is handle by parse_url() both in;
https://github.com/bcit-ci/CodeIgniter4/blob/develop/system/HTTP/URI.php#L159
https://github.com/bcit-ci/CodeIgniter4/blob/develop/system/HTTP/IncomingRequest.php#L374

Having looked through the code, it is ensuring that the folder that the Front Controller is in is stripped from the URI if it's present. This is typically a good thing.
To serve the site from /public with that in the path is a security risk, that our move to having just the index.php file in the public folder is trying to mitigate. It keeps the other files in your application from being discovered, because they are not at all accessible from the web. .htaccess files, like CI3 and older relied on, are not foolproof. As other servers, like NGINX, gain popularity, their usefulness is even less. Server configuration can be accidentally screwed up allowing anyone to view your files and discover things about your app that no one should know. Heck, it's happened to Facebook in the past.
In light of all of this, my recommendation is that it's left as is. The site should be served from the public folder, period. We should not help introduce security issues in our app in the name of convenience. If you need it to be a flatter structure, you can easily move the index.php file with the rest and modify system and application paths to give you the same structure as previous versions of CI.

Fast and sample case : Shared hosting with access only to www folder. In many cases with no way to configure your domain to go directly to the Public folder. Even to day this is common case for some clients.
Any auto filtering which is not configurable is a Limit. In this case this is a limit for any developer who don't fits the standard thinking. There are many reasons why some script may not be into the document root on 1 server and auto hidding part of the URL is not helpful for.
I don't have any idea if there is such thing at any other framewokr routing..

Most shared hosting that I've used you've been able to define what folder the domain is served from. Some older versions of cPanel used to restrict that for the primary domain, but that could be solved with an .htaccess trick, IIRC.
Worst case scenario - change the paths in the index and put it into a way that works for that server. Literally takes changing like 2 variables and moving the index file.
When we were discussing whether to make this move or not, I went looking at the top 8 or so most used PHP frameworks that I knew and every single one of them were served out of a public folder (though the name might have been different). So, it's obviously possible to server web pages with it still in this format.
And it's not that much of a limit because even if you're in the example you provided, the website only works from the main index.php file. If they try the domain one folder up - either a directory listing happens (which is horrible for security) or an error (which is horrible for usability).

My point is that this is Developers work to put their project in the correct place (directory and etc and to setup doc root). The framework should not filter strings from the real url path just for some kind of idea, security or not.
I don't like the idea that the framework will decide what must be hidden and what not. This should be decided by the developer who is coding / or the one who is deploying the project.

It is decided by the developer - modify the paths in the index.php file. I get what you're saying, I do, but I as a framework developer, it's my job to make the framework as secure as possible.
@jim-parry What's your take on this subject? How would you prefer this to work?

I haven't had a chance to test this, yet, but I would say that it should be possible to configure the $baseUrl with a path, as there are reasons other than the location of index.php to do so. For instance, I might serve part of my site from CI, while another part uses a CMS, and still another uses some forum software. Similarly, each directory in my domain might be handled by a different server (in fact, many of the directories in my current site used to be separate sites). The $baseURL is not necessarily the same thing as the host, and the directories listed in the URL do not necessarily reflect the underlying directories of the system.
So, if I set my $baseURL to be 'https://example.com/management' and the underlying site configuration serves up /var/www/management/public/index.php when you point the browser to 'https://example.com/management', then there's no security issue with outputting 'https://example.com/management' as the site's base URL, because the site's administrator controls what is output when the browser goes to https://example.com/, and it may be a completely different site (it may even be handled by a separate instance of CI4, on a different server).
If the user needs to serve the site from the project root, they're going to have to move index.php and modify the paths, then do their best to ensure the security of the site by preventing access to the directories. Alternatively, they could include /public in their URL, but it would be up to them to secure their site by preventing improper access to the non-public locations.  Just as in the previous example, https://example.com/ could be served by a completely different server from https://example.com/public, and there would be no security issue in outputting https://example.com/public as the base URL.

I do need to test that base_url is acting properly because it should be overriding what's in the discovered URL. Totally agree with you there.
And it's not that it's arbitrarily removing the text '/public', but it's cleaning up the path to the front controller so the folders above it within the site are not shown. This is the same code that's been in CI2 and CI3, it's just now becoming visible since the default structure isn't flat. Not arguing the case, here just trying to explain the situation.

Index.php ... whichever folder you put that in (project root or public) will be "wrong" for some developers, and we need to explain how to configure it for the other usecase. In other words, we cannot "win", i.e. keep everyone happy. My preference is to keep index.php in the public folder, as a "best practice". An experienced developer will have no problem moving it up one level if they wish, while an inexperienced developer will be somewhat sheltered from themselves :-/
Baseurl ... should work regardless of where a developer has put their index.php. We can strongly suggest that the web server point to the folder containing index.php, but a developer should be free to play with that, at their own risk of course.
I think that this thread has gotten off topic - it was originally intended to report a Router bug, which may or not have been addressed (TL;DR!!), yet most of the discussion is about best practices and the correctness of the url_helper. The "current_url" mention in the URI library page of the user guide is contradictory, which needs to be corrected. Actually, the URL helper writeup needs to be incorporated into the user guide, and that might go a long way to resolving the apparent confusion. I see you have opened an issue for the url_helper behavior, which is a correct approach :) I will start on the helper writeup.


Allow timestamps to include milliseconds

Displaying timestamps requires overriding Console or RichHandler properties:

time_format
time_msecs_format

Type of changes

[ ] Bug fix
[*] New feature
[ ] Documentation / docstrings
[ ] Tests
[ ] Other

Checklist

[*] I've run the latest black with default args on new code.
[*] I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
[*] I've added tests for new code.
[*] I accept that @willmcgugan may be pedantic in the code review.

Description
This isn't quite what you proposed in https://github.com/willmcgugan/rich/discussions/984 so I'm not necessarily expecting you to accept it ;)
Handle milliseconds in Rich but only able to display them through overriding Console or RichHandler to avoid additional config and to maintain current behaviour.

I didn't touch live_render.py so I didn't let black touch it. Should a let black format it and update my PR?

The black errors are my fault. I think I pushed to master without formatting. Feel free to run black on those files.

Updated to make black happy but can't see how to retrigger the tests?

Updated the PR largely as per https://github.com/willmcgugan/rich/discussions/984 but I made the callable return str rather than Text this means _log_render.py still handles colouring the timestamp and eliminating duplicates.
I'm not sure why the test failure, it's not related to my code and type checks worked fine under python 3.9 on my system?

I think this is the way forward. 👍
The log render should be ok using Text rather than str. If not, it should be an easy fix.
You may have to merge master again, the typing issues were unrelated to this PR.

Many thanks Will, that looks loads better 👍
Not sure why it's complaining about progress.py given I didn't touch it but at least everything else looks happy now.

I pulled in the bumps to sphinx and pygments but suspect that's unrelated to coverage now passing and that's just a flaky test?

Not sure about the test, but its unrelated to your code.
This looks good. I'm working on a feature branch atm, I'll merge this after and it should be in the next release.
Thanks!


Feat/add swagger

Fix #1322
Add swagger for api. After running server, go to http://<IP_ADDRESS>:3928/swagger to access swagger page.

yes, we can also access to swagger page through http://<IP_ADDRESS>:3928/swagger

@nguyenhoangthuan99

I think Daniel is suggesting we post it at the root url http://localhost:3928
As a user, from the CLI I wont know to go to /swagger

Also requesting - can we add the url to the output of cortex start? So its easily opened (like previous cortex.js output)

Current:
Host: <IP_ADDRESS> Port: 3928
Server started

Suggested:
Server started!
http://<IP_ADDRESS>:3928


Next steps 03/13: Embedding Archive corpus layer

I have trained a word2vec model on our archive data corpus. The code for that corpus is in "gensim_example.py". The model itself is saved as "archive_corpus_w2v_model.bin". I took three steps to clean the data (ie, reduce the number of non-words):

Remove words from the model that appear only once or twice in the corpus (Yield: 15567 words)
Remove 30 non-word "noise" within 1000 most frequently occurring words (Yield: 15537 words)
Look at output among words the 25 words that are most similar to substantively relevant words; remove or rename as appropriate (Yield: 15522).
There is more we could do on point #3, but generally I think this is the best we can do for now.

NEXT THINGS TO DO:

[ ] Jose: Incorporate archive-based word2vec model as an embedded layer in our CNN.
[ ] Sarah: Write up incubator summary
[x] Sarah and Jose: Talk about how to organize GitHub Master to manage workflow and anticipate public viewing (after it is linked to by the Incubator); Sarah will do it after our joint discussion.

Jose: You can now incorporate the archive-based word2vec model (class_ nn/archive_corpus_w2v_model.bin) as an embedded layer in our CNN (I think the script for that is: class_nn/embeddings_google.py).


Feature: Add a security policy

Motivation:
As of now, the project is missing a security policy, meaning there is no procedure in place in case of a security incident or should a vulnerability be found in Claudie.
Description:
Add a security policy to the project.
GitHub's security policy docs.
Exit criteria:

[ ] the project has a security policy

Could you please provide links to some example security policies, or even briefly sketch something that would be suitable for us?
This would help accelerate prioritization of this issue.


finalize KS data import

@mattl ensure all KS data made it into civi successfully, ensure source is noted as KS, ensure they are added to general email list, ensure wherever possible that they are matched with their existing record

@sarahpearson Do we want to write a note to people, welcoming them to our newsletter list? I have most of this done, but not their donation amount imported.

yes, good idea. I'll do this. I'm going to talk to Rebecca later this afternoon first.

pretty sure the welcome note went out; it was scheduled to send in advance of the global summit program announcement. I think just the donation data is outstanding. Please confirm

Yeah, this was the email that went: https://donate.creativecommons.org/civicrm/mailing/report?mid=492&reset=1

@mattl I'm finding some KS donors whose contribution is not attached to their record despite their contribution email address matching their civi email address. can you look into this?

any update here?

No update. This might be a good use for a profile

Possible to close this out this week latest? See first post on this issue: ensure all KS data made it into civi successfully, ensure source is noted as KS, ensure they are added to general email list, ensure wherever possible that they are matched with their existing record. Let me know what you need to make this happen.

I'll probably be spending almost all of this week on SOTC.

Matt Lee
Creative Commons
Austin, TX, USA
3pm-11pm UTC
On Mon, Nov 30, 2015 at 3:50 PM, rebeccalendl<EMAIL_ADDRESS>wrote:

Possible to close this out this week latest? See first post on this issue:
ensure all KS data made it into civi successfully, ensure source is noted
as KS, ensure they are added to general email list, ensure wherever
possible that they are matched with their existing record. Let me know what
you need to make this happen.
—
Reply to this email directly or view it on GitHub
https://github.com/creativecommons/creativecommons.org/issues/120#issuecomment-160772728
.

Do you want to set a reasonable deadline and let me know?

Let's see how long all the other stuff takes first. I don't want to commit
to a deadline if I'm stuck doing other stuff.
Alternate idea would be to ask Scott to import them.

Matt Lee
Creative Commons
Austin, TX, USA
3pm-11pm UTC
On Mon, Nov 30, 2015 at 4:03 PM, rebeccalendl<EMAIL_ADDRESS>wrote:

Do you want to set a reasonable deadline and let me know?
—
Reply to this email directly or view it on GitHub
https://github.com/creativecommons/creativecommons.org/issues/120#issuecomment-160776064
.

-"Kickstarter" attached to individual donation itself under "Source" (not the overall donor record)
-Consolidate all KS-related groups and tags into one
-Correct synch with existing contact records where there's an email address match
-Confirm KS-sourced donors added to mailing list
Let me know if/when I can help with manual data entry, cleaning, etc, happy to help!

per discussion, aiming for Friday 2/3 deadline

@mattl can you provide an update please?

I have a log in that works for this. Now constructing a CSV file which will
DTRT.

Matt Lee
Creative Commons
Austin, TX, USA
3pm-11pm UTC
On Mon, Feb 8, 2016 at 4:19 PM, rebeccalendl<EMAIL_ADDRESS>wrote:

@mattl https://github.com/mattl can you provide an update please?
—
Reply to this email directly or view it on GitHub
https://github.com/creativecommons/creativecommons.org/issues/120#issuecomment-181587906
.


How to run the actual bencharks?

I'm looking for the script that invokes the actual benchmarks to evaluate the compiler options used.

Hello,
we tried to document this in https://zka.lc/about but perhaps we didn't do a really good job because it gets lost in the noise.
Anyhow, you run the benchmarks by doing make in the backend/ directory. You can see the Makefile to learn the actual commands being run (basically cargo criterion).

Gotcha. It might be interesting to run these benchmarks with LTO=1 and target-cpu=native.

Hey @KaiserKarel ! I'm not sure this would be really useful.. I'd expect end-user libraries to enable parallelism and asm backends, but do they also ship with cpu-native and optimized lto? Would you like to make a pull request for it? Creating a.cargo folder similarly to what I did here would probably do the job! https://github.com/arkworks-rs/gemini/tree/main/.cargo


Insert NavBar links and Footer

Add NavBar Links
Add footer
Remove gsoc.css
Change colour of social links
Change Padding of Organization Text
Replace Line breaks with margin

Font-weight for navBar and footer could not be fixed after multiple tries. Someone else should look into it.

a screenshot in desktop view and a screenshot in mobile view please.

I'll fix the footer responsiveness.

I don't find any issue with the font-weights.

I see two possibilities for correction.

footer responsiveness.
Font size / weight on banner for mobile devices.

Otherwise, it looks great! :smile:

Everything looks good to me. The footer on both the pages for mobile can be improved, but I think that'd be another issue.
P.S. ignore the codacy bot comments.


GPDMP crashing on launch in Fedora

OS:
Fedora Workstation 30
GPMDP Version:
4.6.1
Issue Descriptions:
Immediate crash on launch
RPM specifies segmentation fault when run via terminal
Flatpak gives missing modules error via terminal
Steps to Reproduce:
Install and try to run from flatpak, snap or rpm

Update: Doing a completely clean install make it work in the end. Some config files somewhere must have been affecting it.

@cyvain87: When you say you did a clean install, are you saying you built from source after cleaning out all the old code or did you delete the rpm and install new?
I am having the same Segmentation fault, and I have tried to clean rpm install it. That didn't work. Latest (4.6.1) still faults. I tried to build using npm install, but there are errors when trying to do that.
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 5.1.6-300.fc30.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/mock/Projects/github/Google-Play-Music-Desktop-Player-UNOFFICIAL-/node_modules/mdns
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

Please adivse.


Child process terminated abruptly

I got this exception while scanning my project:
Any idea what's wrong here ?

Version:

@RabeeaEgbareia You can try again disabling multiprocessing first, as suggested previously: https://github.com/nexB/scancode.io/issues/642#issuecomment-1496308424

@tdruez
It could take a lot of time since the project is large. I will try, but is there any other suggestion or workaround ?
Btw: this link in the comment #642 is not valid (https://scancodeio.readthedocs.io/en/latest/scancodeio-settings.html#scancodeio-processes)

It could take a lot of time since the project is large.
I will try, but is there any other suggestion or workaround ?

The time it takes to complete is irrelevant at the moment, we need to figure out the issue first. Thus my suggestion for running the pipeline outside of any multiprocessing context. The goal is to determine if the issue is related to multiprocessing or not.
I cannot help you further until you can confirm that the pipeline is running fine with multiprocessing disabled, as suggested a while ago https://github.com/nexB/scancode.io/issues/642#issuecomment-1496326078

@tdruez
Ok, I started a new "scan_codebase" pipeline with "SCANCODEIO_PROCESSES=-1".
I will update later here ..
Thanks

@tdruez
Still failing (SCANCODEIO_PROCESSES=-1)

Have you restarted the whole app after changing the settings? It appears from your output that the multiprocessing is still enabled.

Yes.
This is my docker.env file

And then:

docker compose build
docker compose up


Double serialization

I got this error when fetching an item from cache:

In CacheItemPool.php line 49:
unserialize(): Error at offset 0 of 2 bytes

Looking at the item that was being unserialized here, it was:
Illuminate\Support\Collection^ {#518
  #items: []
}

It was not a string. It was already deserialized. So looking into the code, it seems that this package will serialize and unserialize items that go into and come out of the Laravel/Illuminate cache. Laravel will serialize/unserialize data going in and out anyway, so it's done twice. Maybe the older versions of Laravel did not work this way, and this is a leftover.
The reason I believe I got this error, is that I hit a cached item that had been pushed to cache using an Illuminate\Contracts\Cache\Repository repository - the standard Laravel way - and pulled out using Madewithlove\IlluminatePsrCacheBridge\Laravel\CacheItemPool. The two store data in the underlying cache that is not compatible - the one stored by this package is serialized twice.
Is this intended? It means cache items can be stored and retreived by either the Laravel cache, or the madewithlove cache, but can never be passed between the two.

To illustrate further, in a service I created a cache item with this package and read it using the laravel cache:
$this->cacheItemPool->save(
    new \Madewithlove\IlluminatePsrCacheBridge\Laravel\CacheItem('xyz', 'foobar')
);
dump(\Cache::get('xyz'));

I would expect to dump foobar, but instead get this:
N;

That's even more bizarre, a PHP serialized null. I would have expected s:6:"foobar";. But regardless, they are not playing nice together.

If this were fixed to not serialize items going into the Lumen cache, then the items coming out would not need deserializing. However, to support a switchover, this package could check if the data out looks like a serialized string and attempt to deserialize it if it is. It's not foolproof, because the caching pool should not need to do deep-reading of the cached data, and should treat all items in the same consistent way, but it may help. Maybe even as a decorator so the workaround could be added only by people who want to used it.

I'm having issues with this as well.
@hannesvdvreken thoughts on this?

passing on to @Anahkiasen


[Bug] KubeRay switched traffic when Serve did not start

Search before asking

[X] I searched the issues and found no similar issues.

KubeRay Component
ray-operator
What happened + What you expected to happen
We did a zero downtime upgrade by updating the deployed image and KubeRay spun up the new cluster, and terminated the old one but requests to rayservice-serve-svc returned 502s. When running kubectl describe rayservice, I Service Status:  Running but it did not show any of the deployed serve applications. When I looked at the dashboard, it said that serve had not started. So for some reason KubeRay thought that Ray Serve was healthy but in fact it had not started, so KubeRay didn't even try to start Ray Serve.
We are using GCS FT, and I verified that the new cluster's data was stored in a different namespace on Redis.
We have two identical RayServices (with different Redis namespaces) and this zero-downtime upgrade was done on both of them. This issue only happened on one of the RayServices, so this behavior seems flakey.
KubeRay version: 0.6.0
This happened when upgrading Ray Version in the docker image from 2.6.3 to 2.7.0
Reproduction script
Can't seem to reproduce. As mentioned, the behavior seems flakey.
Anything else
No response
Are you willing to submit a PR?

[ ] Yes I am willing to submit a PR!

We're experiencing similar issues. We have a zero-downtime setup that does not work whenever we patch a new docker image with code updates. Here is our timeline:

kubectl patch new image to headGroupSpec and all workerGroupSpecs.
the operator spins up a new head node.
as soon as the head node is running, it terminates the previous cluster.

The latter causes downtime because it still needs about 3 min to spin up new instances to allocate the updated services. It seems it does not truly wait for the services on the new cluster to be healthy before terminating the old cluster and redirecting traffic to the new one.
This has been tested with kuberay 1.2.1 and ray 2.8.1.

@kevin85421 were you able to reproduce this issue?


Validation to not allow dashes, etc into phone input and restrict to 10 digits.

Form validation to make sure that all fields have a selected value and that only the first phone number with 10 digits is captured. If multiple numbers are submitted between commas, currently only the first is grabbed. If the users uses spaces, dashes or parentheses they are removed and the number is reformatted properly for the database


fixed import for SpecifierSet and Specifier from packaging

Following the email on the mailing list and the issue #112 on the pymodaq repository, I modified the imports.
This runs OK on my linux computer with python 3.8.15 and the last pymodaq release, the dashboard starts.

hello Aurore we worked on parallel on the same thing ;-) I also added some more docstrings. So I'll close it, but thanks for the work.
Next time, think about creating a dedicated branch for your change (not directly in main) .
Cheers
Seb

Sure, thanks!


Depend on custom BUILD_SHARED_LIBS, which is not defined

cmake files are being packaged into ${PN}-dbg, but instead should be part of ${PN}-dev

each AWS cmake file has a condition on BUILD_SHARED_LIBS, which seems to be AWS-specific and is not defined by default in 3rd-party apps, hence falls back to static path, even though only shared variant is provided by AWS components by default:

if (BUILD_SHARED_LIBS)
include(${CMAKE_CURRENT_LIST_DIR}/shared/aws-c-s3-targets.cmake)
else()
include(${CMAKE_CURRENT_LIST_DIR}/static/aws-c-s3-targets.cmake)
endif()
The workaround is to pass -DBUILD_SHARED_LIBS=On to CMake when building an app using AWS, but maybe this should NOT be based on a variable if only one variant (either shared or static) is provided anyway.

Hello @denix0 - I am going to put /2/ in a different issue so they can be tracked separately.
For /2/ I will bring in the CRT and SDK teams to evaluate.

I think I need to document that the default is ON and implement a variable to override, but I need to coordinate this flexibility across all dependent recipes.  Can you let me know the temperature of this issue?  I will need to shuffle some things around if this is immediately breaking

@rpcme sounds good, thanks!
Maybe it would make sense to build and package both static and shared libs and then use a more AWS-specific variable (instead of a more generically-named BUILD_SHARED_LIBS) to select which one an app should use and link against...
If only one variant is provided, then you might want to replace BUILD_SHARED_LIBS in those cmake files with its value at the time AWS components are built.

Hi @denix0 our SDK team pointed me to this cmake documentation.
https://cmake.org/cmake/help/git-stage/variable/BUILD_SHARED_LIBS.html
I am trying to figure out how we can clarify this to everyone.  I did note that it isn't called out in our documentation as a flag that needs to be used when choosing shared or static.  Do you think this would have helped?  Or is there something else that would have helped?

Hello @denix0 please let me know if you have any further thoughts / questions on this ok?

Hi @denix0 will be closing this for now.  Please re-open if this did not explain the SDK team's intent by using BUILD_SHARED_LIBS.  Would still like to get feedback on what you think would have made the realization more natural.

Hi @rpcme sorry for the delay - been really busy lately.
BUILD_SHARED_LIBS variable makes sense as a global variable for a project being built. So when you build one of the AWS components, it controls the output. The resulting AWS binary package at the end only has one variant of the library and since BUILD_SHARED_LIBS is set to On in AWS recipes, only shared library gets packaged.
So, first issue is that CMake files that those prebuilt AWS packages provide still contain a condition on BUILD_SHARED_LIBS - it should no longer be conditional, as the package has already been built and only contains a shared library.
The second issue is that those AWS libraries are meant to be consumed by another project (a user app), which may not define BUILD_SHARED_LIBS or set it to Off in order to build own libraries statically. That flag no longer controls how AWS libraries were built (as those are now being consumed in binary form), but instead it controls how user app project's own libraries are being built.
The workaround I used for now is to force BUILD_SHARED_LIBS=On in the user app, which is incorrect.
One of the solutions I see is to do a quick "sed" command in recipe's do_install() on corresponding *-config.cmake file to replace "if (BUILD_SHARED_LIBS)" with the corresponding value at the time of the build, which would be "if (On)".

@denix0 I am going to file this to the SDK team internally and come to a resolution on this.

BTW, another option would be to build and package both dynamic and static versions of each AWS SDK library. Then the condition on BUILD_SHARED_LIBS in the cmake files would make sense and it would be up to consuming user app to set it and select one or another.


Add manual boostrap test for Cassandra-9022

This test is not supposed to fail when using vnodes, but I haven't restricted it since it could catch a future bug that might happen with/without vnodes. The tests is running 3 times since sometime, it doesn't happen.

+1


Fix concurrency issue in registry

In cases of high load the evaluation of r.index took place after it was incremented by another invocation.
This led to two invocations using the same index and finally a crash.
Now the lock is released after the evaluation of r.index.

Great find!!


The difference between <IP_ADDRESS> and <IP_ADDRESS>

I would like to ask, why is the use of hosts <IP_ADDRESS> rather than <IP_ADDRESS>? What are the benefits of comparing <IP_ADDRESS>?

Its meaning varies by context. For this project, this excerpt explains it.
"<IP_ADDRESS> is a non-routable meta-address used to designate an invalid, unknown, or non-applicable target (a ‘no particular address’ place holder)"
https://www.howtogeek.com/225487/what-is-the-difference-between-<IP_ADDRESS>-and-<IP_ADDRESS>/

If you actually read the readme you would see. Since you're so lazy I just copied and pasted from it.
We recommend using <IP_ADDRESS> instead of <IP_ADDRESS>
Traditionally most host files use <IP_ADDRESS>, the loopback address, to establish an IP connection to the local machine.
We prefer to use ``<IP_ADDRESS>`, which is defined as a non-routable meta-address used to designate an invalid, unknown, or non applicable target.
Using <IP_ADDRESS> is empirically faster, possibly because there's no wait for a timeout resolution. It also does not interfere with a web server that may be running on the local PC.

I see！
Thank you very much for answering. @jjaaccoobb @Jezza-x3


Changelog: Print Issue and Pull Requests Body

Changelog docker file updated to use a fork with the pull request „Optionally Print Issue and Pull Requests Body“ (https://github.com/skywinder/github-changelog-generator/pull/616) which is not yet merged in the original repo.

Thanks @ArtieReus. Looks good. You wrote that it optionally prints the body of a PR. How would we activate it?

Just adding following option ‘issue_line_body=true’ in the configuration. Already added in the pull request. Thanks!


[🐞] length parameter not working

Describe the bug
getHash() with given length parameter should generate a number of emojis according to the value of length. Instead it only generates one emoji, regardless of the length parameter. The generated emoji equals to the first emoji when no length parameter given.
To Reproduce
see example: https://codepen.io/Retani/pen/RwewpgG
Expected behavior
getHash("Hello, world", {length: 3}) should generate 3 emojis
Screenshots

Env (please complete the following information):

Browsers: Chrome, Safari, Firefox
Version 1.0.3

@retani
Thank you so much for the issue!
And sorry for kinda unexpected behavioural.

@retani
Thank you so much for bringing up the issue! And I apologize for the unexpected behavior.
The issue is that when you override the default options, you need to specify the base yourself. After making these small modifications, you will see the expected result:
import ehg, {getHash} from<EMAIL_ADDRESS>
const str = "Hello, world"

const nolength = getHash(str)
const length2 = getHash(str, {
    length: 2,
    base: ehg.maxBase, // <====== that's base of default emoji-table
})
const length3 = getHash(str, {
    length: 3,
    base: 62, // <====== the same value, but hardcoded
})
const length4 = getHash(str, {
    length: 4,
    base: Object.keys(ehg.table).length,  // <====== or you can calculate it manually (also works with `useTable(myTable)`)
})

document.getElementById("nolength").innerHTML = nolength
document.getElementById("length2").innerHTML = length2
document.getElementById("length3").innerHTML = length3
document.getElementById("length4").innerHTML = length4

I see. Thanks for the explanation and quick reply!

Always welcome!
Please feel free to open a new issue if anything is needed.


Call to undefined method Maatwebsite\Excel\Excel::create()

Hey,
I also got a strange error message in Laravel 5.5, PHP version 7.0.1.
I added Maatwebsite\Excel\ExcelServiceProvider::class in providers array and 'Excel' => Maatwebsite\Excel\Facades\Excel::class, added in aliases array. Still, I got the error message Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR) Call to undefined method Maatwebsite\Excel\Excel::create().
My codes in the controller
use Excel;

    public function download($id)
    {
        $assessment = Assessment::where('id',$id)->get();
        Excel::create('Laravel Excel', function($excel) use ($assessment) {

            $excel->sheet('Excel sheet', function($sheet) use ($assessment) {
                $sheet->loadView('contents.assessment_details')->with('assessment',$assessment);
                $sheet->setOrientation('landscape');
            });
        })->export('xls');
   }

Anybody, please help me.

Hi,
What version of maatwebsite/excel are you using?
Also, you don't need to add providers/facade to your config/app.php in Laravel 5.5+, this is handled by the new package discovery.
From looking at your issue, I am guessing you have upgraded to maatwebsite/excel 3.0.1 which contains breaking changes, therefore code you wrote for maatwebsite/excel 2.1 will not work.
See the docs for changes: https://laravel-excel.maatwebsite.nl/docs/3.0/export/basics

Hi Clinton,
I'm also facing the same issue with Laravel version 5.6 and maatwebsite excel version 3.0 any help

@felixdares
Have you updated your code to support maatwebsite/excel 3.0?
3.0 is not backwards compatible: https://laravel-excel.maatwebsite.nl/docs/3.0/getting-started/upgrade

@CLINT0N
Hi after composer update now I'm running mattwebsite/excel version 3.0.1 but still no use.
Excel::create($params['fname'], function($excel) use ($rows) {
$excel->sheet('sheet1', function($sheet) use ($rows) {
$sheet->fromArray($rows);
});
})->download('csv');

@felixdares
Please read the documentation, I have linked it twice.
https://laravel-excel.maatwebsite.nl/docs/3.0/getting-started/upgrade

Hi!
I am using
     "laravel/framework": "5.6.*",
      "maatwebsite/excel": "^3.0",

And did all the install steps listed here:
https://laravel-excel.maatwebsite.nl/docs/2.1/getting-started/installation
In other words, app.php has
'providers' => [
    /*
     * Package Service Providers...
     */
    Maatwebsite\Excel\ExcelServiceProvider::class,
]
'aliases' => [
    ...
    'Excel' => Maatwebsite\Excel\Facades\Excel::class,
]

I ran php artisan vendor:publish
Then I tried all that is under the "Usage" section and always get this error:

Call to undefined method Maatwebsite\Excel\Excel::create()

Here is the test code:
 public function __construct(\Maatwebsite\Excel\Exporter $excel)
    {
        $this->excel = $excel;
    }

public function doExcel()
    {
       $this->excel->create('test', function($excel) {
              /// some code
        })->export('xls');

Any clues?
Thanks!

@CLINT0N has been kind of enough to link to the upgrade twice: https://laravel-excel.maatwebsite.nl/docs/3.0/getting-started/upgrade .
Please read this carefully. You are all trying to use the 2.1 syntax with 3.0 package.!


feat: number and epoch types, IntervalValue list parsing

@Stoops-ML done!

🤦 thanks! This should be good.

The test test_interval_value() failed because the class you created CustomValue is not a subclass of BaseCZMLObject.

Ah sorry for the mess. I wasn't running the tests locally as the setup is not containerized. I went through the motions and I've tested this locally. It should pass now 💯

Would we be opposed to containerizing this repo and adding a makefile with some simple commands for testing, formatting, etc.?

Would we be opposed to containerizing this repo and adding a makefile with some simple commands for testing, formatting, etc.?

Open an issue on this. I'd like to hear what others think about this.

Checked with ruff 👍


x/playground: TryBot fails for playground

What version of Go are you using (go version)?

 linux-amd64 (Go 1.12.x)
 linux-amd64 (Go 1.11.x)

Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
(trybot  linux-amd64 (Go 1.12.x) and linux-amd64 (Go 1.11.x))
What did you do?

Ran TryBot for a x/playground CR for #32606 : https://go-review.googlesource.com/c/playground/+/182180
What did you expect to see?
ok  	golang.org/x/playground	0.070s

What did you see instead?
linux-amd64 at 4ce6a8e89668b87dce67e2f55802903d6eb9110a building playground at 798aa1a16276f8ea745637da7b9fd4a8a3e06fec

:: Running /workdir/go/bin/go with args ["/workdir/go/bin/go" "test" "-short" "golang.org/x/playground/..."] and env ["PATH=/workdir/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" "HOSTNAME=buildlet-linux-stretch-rn65a9b55" "DEBIAN_FRONTEND=noninteractive" "HOME=/root" "USER=root" "GO_STAGE0_NET_DELAY=9.1s" "GO_STAGE0_DL_DELAY=200ms" "WORKDIR=/workdir" "GOROOT_BOOTSTRAP=/workdir/go1.4" "GO_BUILDER_NAME=linux-amd64" "GOROOT_BOOTSTRAP=/go1.4" "GO_DISABLE_OUTBOUND_NETWORK=1" "GOROOT=/workdir/go" "GOPATH=/workdir/gopath" "GOPROXY=http://<IP_ADDRESS>:30157" "TMPDIR=/workdir/tmp" "GOCACHE=/workdir/gocache"] in dir /workdir/gopath/src/golang.org/x/playground

main.go:13:2: cannot find package "cloud.google.com/go/compute/metadata" in any of:
	/workdir/go/src/cloud.google.com/go/compute/metadata (from $GOROOT)
	/workdir/gopath/src/cloud.google.com/go/compute/metadata (from $GOPATH)
edit.go:14:2: cannot find package "cloud.google.com/go/datastore" in any of:
	/workdir/go/src/cloud.google.com/go/datastore (from $GOROOT)
	/workdir/gopath/src/cloud.google.com/go/datastore (from $GOPATH)
cache.go:11:2: cannot find package "github.com/bradfitz/gomemcache/memcache" in any of:
	/workdir/go/src/github.com/bradfitz/gomemcache/memcache (from $GOROOT)
	/workdir/gopath/src/github.com/bradfitz/gomemcache/memcache (from $GOPATH)
fmt.go:14:2: cannot find package "github.com/rogpeppe/go-internal/modfile" in any of:
	/workdir/go/src/github.com/rogpeppe/go-internal/modfile (from $GOROOT)
	/workdir/gopath/src/github.com/rogpeppe/go-internal/modfile (from $GOPATH)
txtar.go:14:2: cannot find package "github.com/rogpeppe/go-internal/txtar" in any of:
	/workdir/go/src/github.com/rogpeppe/go-internal/txtar (from $GOROOT)
	/workdir/gopath/src/github.com/rogpeppe/go-internal/txtar (from $GOPATH)

Error: tests failed: exit status 1

According to the helpful feedback from @dmitshur and @bradfitz, we should be able to force GO111MODULE=yes for x/playground, which should allow this build to succeed.
Related issues: https://github.com/golang/go/issues/17312, https://github.com/golang/go/issues/30233

Duplicate of #24823

I'm not sure that it's a duplicate. As I understand, that issue is more about adding playground post-submit builders (i.e., on https://build.golang.org) and testing building the playground image is successful.
Perhaps we can use this issue for the smaller task of just fixing existing trybots so they don't fail.

It would be nice if trybot worked at all, but part of the reason why I feel like it is a duplicate is that many of the important playground tests run as part of the Docker build. I am not sure if there is enough utility of just making the trybot pass without actually fully considering the Docker build case, as it would be a potential false-positive. The trybot could pass with the docker based integration tests failing.


When importing in the inspector clicking the arrow for the layers dropdown doesnt work

Hello I have a character with multiple layers in aseprite for hair, clothes, tools etc and I would like to be able to import just one layer at a time. When I click Layer [all] a box pops up quickly but then cancels without letting me select layers. There is about 30 layers is that just too many?

Hello @sarsiesars . 30 layers should work fine. What is your Godot version and Operation System? Have you tested with other files?

I tried it in another project and ran into the same issue and with many
different .ase files. My Godot is version 4.3, aseprite is <IP_ADDRESS> and I'm
on windows 11 with plenty or ram etc. when I click [all] I see a window pop
up at the bottom for a second than it closes.
On Wed, Oct 23, 2024 at 4:32 PM Vinicius Gerevini @.***>
wrote:

Hello @sarsiesars https://github.com/sarsiesars . 30 layers should work
fine. What is your Godot version and Operation System? Have you tested with
other files?
—
Reply to this email directly, view it on GitHub
https://github.com/viniciusgerevini/godot-aseprite-wizard/issues/170#issuecomment-2433383855,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BMLRJN3BMHS473CB4HDUIS3Z5ABVTAVCNFSM6AAAAABQO6EQSSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZTGM4DGOBVGU
.
You are receiving this because you were mentioned.Message ID:
@.***>

Thanks. I just tested again with the same versions you listed and I can't reproduce this issue. Assuming you can import animations with all layers, it's likely not a problem with your plugin setup either.
The fact that you see the list opening and closing automatically sounds more like a Godot <> OS issue. The plugin has no control over the interface itself, and I believe in case the listing fails it should at least show the "[all]" label.
If you are able to, you can try to send me here a minimal project where the issue happens. It would likely work on my machines, but maybe there is something we are missing.


Wrong text formatting in email notifications.

Hi,
it seems there's a bug in the logic which constructs the email notification sent to the app users in the distribution group.
Particularly, email text does not match what Release notes contain.
Here's what I have in AppCenter:

-- note underscores positions.
And here's what I get in an email:

Please note, ALL underscores are missing in the email notification formatting and in SOME places they are resulted in Italics (marked with red).
This is wrong and distorts the original message significantly.
Release notes formatting is correct.
Below is the source text passed to appcenter-cli in a file (during release distribution run):
Built @ commit **bfe587**, URL **git@gitlab.com:example/mobile/myapp_ios.git**
App **iOS Prod v1.0.2_alpha (340027)** AppCenter deploy through Jenkins **GitLab-iPhone_Prod_Alpha--BUILD** job (ProdPN_AdHoc_Alpha scheme).

This is a test message

Plz mark it as bug
/label ~bug

I do not know, whether it is related to this bug, but we tried to add some release notes in cyrillic, and we've got something completely awkward in an email.
What's new
--
 ?@8;>65=885:2878BK AG5B02>=>: 2 10=:03D8:A

(It was something like О приложении...)


feat(nginx) remove server tokens from special responses output

Summary
Nginx special responses when used with Kong might output OpenResty or OpenResty/<version>. This commit removes those server tokens from the response body output on special responses. Kong usually sets the Server or Via header, so the information is already visible from there.
That output is visible, e.g. when executing the following:
http TRACE :8000

This PR is slightly related to:
https://github.com/Kong/kong/pull/4924

I think travis is failing regardless of the PR.


[Bug] After updating the version, messages cannot be sent without a proxy address.

Bug Description
在更新最新的版本之后，发现不配置接口代理为https://api.nextchat.dev/api/proxy/openai的话，会直接报错
{
  "error": true,
  "message": "Failed to fetch"
}

并且回滚到旧版本之后也出现了
Steps to Reproduce

使用clash for window客户端
VPN访问openai的官网屎正常的
安装新的客户端之后无法正常使用
安装旧版的也无法使用了

Expected Behavior
我想直接使用官方的api接口，也就是api.openai.com
Screenshots
No response
Deployment Method

[ ] Docker
[ ] Vercel
[ ] Server

Desktop OS
No response
Desktop Browser
No response
Desktop Browser Version
No response
Smartphone Device
No response
Smartphone OS
No response
Smartphone Browser
No response
Smartphone Browser Version
No response
Additional Logs
No response

Typing https://api.openai.com/ into it instead of leaving it blank solves the problem for me.


Update: Kong Gateway overview diagram

Description
Updating the Kong Gateway overview diagram to 1) remove Dev Portal and Vitals, as both are deprecated, and 2) update the styling to match Konnect and Mesh.
https://konghq.atlassian.net/browse/DOCU-3679
Testing instructions
Preview link:
Checklist

[x] Review label added
[x] Conditional version tags added, if applicable.

For example, if this change is for an upcoming 3.6 release, enclose your content in {% if_version gte:3.6.x %} <content> {% endif_version %} tags (or if_plugin_version tags for plugins).
Use any of the following keys:

gte:<version> - greater than or equal to a specific version
lte:<version> - less than or equal to a specific version
eq:<version> - exactly equal to a specific version

You can do the same for older versions.

❗ Reviewers: I put two images in, so please don't merge yet. Let me know which one makes more sense to you: the hybrid pseudo-architecture image, or the one with just features - or neither, and what would be better.

@cloudjumpercat which diagram do you think works better/makes more sense? I added two Gateway diagrams to compare; we should only keep one.


If option.imageFileInput is false .se-dialog-files-remove will not exist

Have been using suneditor-react and tried to use option imageFileInput: false which resulted in Cannot read property 'addEventListener' of null
Add validation if querySelector can find .se-dialog-files-remove

Hi @purphoros
First, Thank you for your contribution :)
But this issue is fixed.
I'll reject this PR to prevent code conflicts.
I'll update version and notify you within this week.
Thank you!

@purphoros
The 2.29.0 version has been updated.
Thank you.


[BUG] Unknown deps flow for transitive is incorrect

The unknown dependency flow for transitives is currently not correct. Its considering all the non cve transitive dependencies as unknown.

https://jira.coreos.com/browse/APPAI-870