Python: AttributeError: 'Plan' object has no attribute 'plan'

Describe the bug
When trying to use the basic planner, it seems to be unable to generate any sort of plan, raising an attribute error.
To Reproduce
import asyncio
import semantic_kernel as sk
from semantic_kernel.connectors.ai.open_ai import AzureChatCompletion

OPENAI_ENDPOINT = "https://dev-ch-uk.openai.azure.com/"
OPENAI_DEPLOYMENT_NAME = "gpt35"
OPENAI_API_KEY = getpass("Enter your API key: ")
OPENAI_EMBEDDING_DEPLOYMENT_NAME = "ada"

from semantic_kernel.planning.basic_planner import BasicPlanner

async def main():
    kernel = sk.Kernel()
    kernel.add_chat_service(
        "azure_gpt35_chat_completion",
        AzureChatCompletion(
            deployment_name=OPENAI_DEPLOYMENT_NAME,
            endpoint=OPENAI_ENDPOINT,
            api_key=OPENAI_API_KEY,
        ),
    )

    planner = BasicPlanner()

    ask = """
    Tomorrow is Valentine's day. I need to come up with a few date ideas. She speaks French so write it in French.
    Convert the text to uppercase"""
    original_plan = await planner.create_plan_async(ask, kernel)

    print(original_plan)

if __name__ == '__main__':
    asyncio.run(main())

Stacktrace
  File "/home/azureuser/localfiles/blog-posts/explore2.py", line 35, in <module>
    asyncio.run(main())
  File "/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/home/azureuser/localfiles/blog-posts/explore2.py", line 32, in main
    print(original_plan)
  File "/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/semantic_kernel/planning/basic_planner.py", line 21, in __str__
    return f"Prompt: {self.prompt}\nGoal: {self.goal}\nPlan: {self.plan}"
AttributeError: 'Plan' object has no attribute 'plan'

Expected behavior
A plan is printed. If it is unable to generate a plan, it should either return an empty dict or raise an error.
The issue seems to be in this line in the Plan class
def __str__(self):
        return f"Prompt: {self.prompt}\nGoal: {self.goal}\nPlan: {self.plan}"

it appears that self.plan has been renamed to self.generated_plan
Platform

OS: [Linux]
IDE: [VS Code]
Language: [Python]
Source: [pip package version 3.10.dev,]

Additional context
Add any other context about the problem here.

Wow

It looks like there's a bug in the code. The Plan class is trying to access an attribute self.plan, which has been renamed to self.generated_plan. You need to update the code in the BasicPlanner class to use the correct attribute name. This should fix the AttributeError you're encountering.
class Plan:
def init(self, prompt, goal, generated_plan):
self.prompt = prompt
self.goal = goal
self.generated_plan = generated_plan
def __str__(self):
    return f"Prompt: {self.prompt}\nGoal: {self.goal}\nPlan: {self.plan}"

To fix the bug, you'll need to modify the str method in the Plan class of the BasicPlanner module. Instead of using self.plan, you should use self.generated_plan. Here's how you can do it:
Open the file located at /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/semantic_kernel/planning/basic_planner.py.
Find the Plan class definition. It should look something like this:
python
Copy code
class Plan:
def init(self, prompt, goal, generated_plan):
self.prompt = prompt
self.goal = goal
self.generated_plan = generated_plan
def __str__(self):
    return f"Prompt: {self.prompt}\nGoal: {self.goal}\nPlan: {self.plan}"

Modify the str method to use self.generated_plan instead of self.plan:
python
Copy code
class Plan:
def init(self, prompt, goal, generated_plan):
self.prompt = prompt
self.goal = goal
self.generated_plan = generated_plan
def __str__(self):
    return f"Prompt: {self.prompt}\nGoal: {self.goal}\nPlan: {self.generated_plan}"

Save the file.
This should resolve the AttributeError issue you're facing. Once you've made this change, you can rerun your code, and it should now print the plan correctly using the self.generated_plan attribute.

It looks like there's a bug in the code. The Plan class is trying to access an attribute self.plan, which has been renamed to self.generated_plan. You need to update the code in the BasicPlanner class to use the correct attribute name. This should fix the AttributeError you're encountering. class Plan: def init(self, prompt, goal, generated_plan): self.prompt = prompt self.goal = goal self.generated_plan = generated_plan
def __str__(self):
    return f"Prompt: {self.prompt}\nGoal: {self.goal}\nPlan: {self.plan}"

To fix the bug, you'll need to modify the str method in the Plan class of the BasicPlanner module. Instead of using self.plan, you should use self.generated_plan. Here's how you can do it:
Open the file located at /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/semantic_kernel/planning/basic_planner.py. Find the Plan class definition. It should look something like this: python Copy code class Plan: def init(self, prompt, goal, generated_plan): self.prompt = prompt self.goal = goal self.generated_plan = generated_plan
def __str__(self):
    return f"Prompt: {self.prompt}\nGoal: {self.goal}\nPlan: {self.plan}"

Modify the str method to use self.generated_plan instead of self.plan: python Copy code class Plan: def init(self, prompt, goal, generated_plan): self.prompt = prompt self.goal = goal self.generated_plan = generated_plan
def __str__(self):
    return f"Prompt: {self.prompt}\nGoal: {self.goal}\nPlan: {self.generated_plan}"

Save the file. This should resolve the AttributeError issue you're facing. Once you've made this change, you can rerun your code, and it should now print the plan correctly using the self.generated_plan attribute.

Understood, but I'd rather it's fixed in the repo ;)

Additionally, when both a text completion service and a chat completion service are registered, the output isn't as intended. After fixing the bug, and using the prompt write a poem based on an image the output I get is:

I assume that this is using the text completion service (GPT3.5-turbo) that I have registered, rather than the chat service (also GPT3.5-turbo), so is treating the task as an autocomplete rather than an instruction.
Should the class default to using chat services rather than text completion?


support for xpath for nth element

Hi,
Thanks for the library, I'm trying to extract specific elements in a list of results:
e.g.
  1<c>2</c>
/a/b[0] should yield 1
There are some examples of list processing here: http://alvinalexander.com/scala/how-extract-data-array-xml-elements-xpath-scala

I'm not entirely sure what you mean that. You can already evaluate an XPath expression into a List[A], is that what you need? Something like this:
val res: List[Int] = "1<c>2</c>".unsafeEvalXPath[List[Int]]("/a/b")

You can then do whatever you want with res, such as retrieve its head.
If that's what you mean, it's already supported (and, I thought, clearly documented). If not, could you give a concrete example of what you have in mind?

Ahh sorry the example should have been:
12
where I only want the first result of a/b i.e. "1" and not the second value "2"

Ideally I'd also like to be able to do paths after the index of the select a/b[0]/@id

Sure, that's a normal XPath expression, and the full XPath specification should be supported:
scala> "12".unsafeEvalXPath[Int](xp"/a/b[1]")
res1: Int = 1

I'm going to close this, since you're asking for help and not reporting an issue.
Issues are really meant for feature requests or bug reports, not to request personalised help with a library. kantan.xpath has a gitter chatroom, which is a much better place to look for that kind of help.

Thank you, really sorry I forgot xpath was 1 based index, I thought that it wasn't supported.

Absolutely no problem. It'd be surprising if you found a bug in the XPath implementation, since I'm basically just wrapping the Java one :)


Implemented five.random() that gives you random 5

Tests included and documentation updated.

This should return one of the other Functions of Five.


Not able to correctly generate the code

output after run pub run build_runner build --delete-conflicting-outputs
[INFO] Generating build script completed, took 483ms
[WARNING] Configuring `gql_build:serializer_builder` in target `app:app` but this is not a known Builder
[INFO] Reading cached asset graph completed, took 73ms
[INFO] Checking for updates since last build completed, took 1.0s
[INFO] Running build completed, took 23ms
[INFO] Caching finalized dependency graph completed, took 79ms
[INFO] Succeeded after 115ms with 0 outputs (0 actions)

error in the generated file test.req.gql.dart
Target of URI doesn't exist: 'package:app/gql/query/test.op.gql.dart'. Try creating the file referenced by the URI, or Try using a URI for a file that does exist
Any solutions?
Thanks

Do you have gql_build as a dependency I'm your pubspec.yaml?

@smkhalsa
Thanks for help!
I just realized that I'm using pub run in a flutter project, after I changed to use flutter pub run it works perfectly now.


python312Packages.annexremote: 1.6.5 -> 1.6.6

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python312Packages.annexremote is: Helper module to easily develop git-annex remotes
meta.homepage for python312Packages.annexremote is: https://github.com/Lykos153/AnnexRemote
meta.changelog for python312Packages.annexremote is: https://github.com/Lykos153/AnnexRemote/releases/tag/v1.6.6
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 1.6.6 with grep in /nix/store/5v1pja6vdk3dnfq81913q3wdwyy6mwv2-python3.12-annexremote-1.6.6
found 1.6.6 in filename of file in /nix/store/5v1pja6vdk3dnfq81913q3wdwyy6mwv2-python3.12-annexremote-1.6.6

Rebuild report (if merged into master) (click to expand)

15 total rebuild path(s)

15 package rebuild(s)

First fifty rebuilds by attrpath

datalad
datalad-gooey
git-annex-remote-dbx
git-annex-remote-googledrive
python311Packages.annexremote
python311Packages.datalad
python311Packages.datalad-gooey
python311Packages.datalad-next
python311Packages.heudiconv
python312Packages.annexremote
python312Packages.datalad
python312Packages.datalad-gooey
python312Packages.datalad-next
python312Packages.heudiconv

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/5v1pja6vdk3dnfq81913q3wdwyy6mwv2-python3.12-annexremote-1.6.6 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python312Packages.annexremote https://github.com/r-ryantm/nixpkgs/archive/137378367dc3442817297f16bf4559b6643dd59a.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/137378367dc3442817297f16bf4559b6643dd59a#python312Packages.annexremote

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/5v1pja6vdk3dnfq81913q3wdwyy6mwv2-python3.12-annexremote-1.6.6
ls -la /nix/store/5v1pja6vdk3dnfq81913q3wdwyy6mwv2-python3.12-annexremote-1.6.6/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

24 packages built:

datalad (python312Packages.datalad)
datalad-gooey (python312Packages.datalad-gooey)
datalad-gooey.dist (python312Packages.datalad-gooey.dist)
datalad.dist (python312Packages.datalad.dist)
git-annex-remote-dbx
git-annex-remote-dbx.dist
git-annex-remote-googledrive
git-annex-remote-googledrive.dist
python311Packages.annexremote
python311Packages.annexremote.dist
python311Packages.datalad
python311Packages.datalad-gooey
python311Packages.datalad-gooey.dist
python311Packages.datalad-next
python311Packages.datalad-next.dist
python311Packages.datalad.dist
python311Packages.heudiconv
python311Packages.heudiconv.dist
python312Packages.annexremote
python312Packages.annexremote.dist
python312Packages.datalad-next
python312Packages.datalad-next.dist
python312Packages.heudiconv
python312Packages.heudiconv.dist

Maintainer pings
cc @montag451 for testing.

[!TIP]
As a maintainer, if your package is located under pkgs/by-name/*, you can comment @NixOS/nixpkgs-merge-bot merge to automatically merge this update using the nixpkgs-merge-bot.

Add a :+1: reaction to pull requests you find important.

PS: here's the build log for datalad's build failure

Does __darwinAllowLocalNetworking = true; fix it?


Unify naming, improve readability and code correctness

Inconsistent naming
The current implementation refers to the same variable with 3 different names:

composeType https://github.com/osbuild/osbuild-composer/blob/02a194f6126042aedf9d5ddb3d7bfb8d3d6d3237/internal/store/store.go#L446
OutputType https://github.com/osbuild/osbuild-composer/blob/02a194f6126042aedf9d5ddb3d7bfb8d3d6d3237/internal/store/store.go#L475
outputFormat https://github.com/osbuild/osbuild-composer/blob/02a194f6126042aedf9d5ddb3d7bfb8d3d6d3237/internal/distro/distro.go#L37

Undefined terminology
We should start using "type" or "format" consistently across the codebase and also define our terminology, preferably in some guide for contributors:

type vs format
output vs compose
job vs build
probably some more

Weak typing
Also I would prefer to use enumeration for architectures and compose types instead of a string which is error prone. For example:
// Not necessarily valid Go code
type Architecture int

const (
        X86_64 Base = iota
        AARCH64
        PPC64
)

// helper function as an input validation
func ArchitectureFromString(input string) Architecture {
    // ...
}

I agree. Thanks for writing this up!
Enums over strings seems like a no-brainer to me, so no further comments on that.
Naming:

I think we should use the term "Job" over "Build" (just makes sense to me that a "worker" does a "job").
The weldr API uses ComposeType, we may want to do the same. Though we should check what the UI does/wants to do, and consider following that instead if different (@jgiardino, thoughts?)? Also, we may end up wanting to have several outputs, with different types for a given compose (azure+aws+...), and then referring to this as ComposeType might be wrong.

Here is an example from a design document I put together last year. This example shows how we could present the hierarchy of a compose, and all the images/jobs created from that compose, and then the uploads per image.
After doing a few rounds of reviews, the terminology I ended up using is the following. But please let me know if you have suggestions.

Compose
Image build
Upload action

These two answers seems to be in contradiction, right?
1.

After doing a few rounds of reviews, the terminology I ended up using is the following. But please let me know if you have suggestions.
* Compose

* Image build

* Upload action

2.

Naming:
* I think we should use the term "Job" over "Build" (just makes sense to me that a "worker" does a "job").

My formal proposal (I think we could include it in the README once we agree on it)
Compose

Compose is what the user submits over one of the frontends
It contains of one or more image builds
It contains zero or more upload actions

Image build
(I'm using the terminology from @jgiardino so feel free to disagree @teg )

Is a unit of work performed by osbuild (internally is a single execution of osbuild)
The resulting image has a format:
https://github.com/osbuild/osbuild-composer/blob/master/internal/pipeline/qemu_assembler.go#L12
https://github.com/osbuild/osbuild/blob/master/assemblers/org.osbuild.qemu#L539

Image format

Can be qcow2, vhd, vmdk, etc.
In the cockpit-composer it maps to more human-readable names such as "Azure image (vhd)"

Upload action

Each image can be, but does not have to be, uploaded to a remote location
One image can be uploaded to multiple locations (can it?)

Proposed code change:
-  func (s *Store) PushCompose(composeID uuid.UUID, bp *blueprint.Blueprint, checksums map[string]string, arch, composeType string, uploadTarget *target.Target) error {
+  func (s *Store) PushCompose(composeID uuid.UUID, bp *blueprint.Blueprint, checksums map[string]string, arch, imageFormats []ImageFormat, uploadTarget *target.Target) error {

where ImageFormat is an enumeration.

In the context of osbuild or the worker, I don't have a strong opinion on whether the process is called a job or an image build. In the context of the UI, however, job is too generic for us to use there.
In the terminology defined above, should image format be replaced with image type? The user specifies the image type, which determines what the image format will be. I consider the image format to be the file format of the image file that's created. Additionally:

There can be some formats that are used by more than one image type (e.g. qcow2)
In the future, could there be some types that produce images of more than one format?

I agree with Jenn, image type is imho more suitable than image format - the example with qcow2 s great.

* In the context of osbuild or the worker, I don't have a strong opinion on whether the process is called a **job** or an **image build**. In the context of the UI, however, **job** is too generic for us to use there.

Right, we distinguish between pending "build" and a running one, which we call a "job".

* In the terminology defined above, should **image format** be replaced with **image type**? The user specifies the **image type**, which determines what the **image format** will be. I consider the image format to be the file format of the image file that's created. Additionally:

  * There can be some formats that are used by more than one image type (e.g. qcow2)
  * In the future, could there be some types that produce images of more than one format?

You are right, so we should use "image type" in the API I mention above. But we might want to reconsider naming of the types we use now because, as you mention, we use: ami, qcow2, openstack, vhd, etc. but what we really implement is: AWS image, generic qcow2, OpenStack image, Azure image.

Edited version from my comment above ^^^
My formal proposal (I think we could include it in the README once we agree on it)
Compose

Compose is what the user submits over one of the frontends
It contains of one or more image builds
It contains zero or more upload actions

Image build

Is a unit of work performed by osbuild (internally it is a single execution of osbuild)
The resulting image has a type:
https://github.com/osbuild/osbuild-composer/blob/master/internal/pipeline/qemu_assembler.go#L12
https://github.com/osbuild/osbuild/blob/master/assemblers/org.osbuild.qemu#L539
Running build in osbuild-composer is referred to as a "job" (internal terminology, not related to end-user experience)

Image type

In the cockpit-composer these are for example:

Openstack
Azure
AWS

Internally we name them by their file format: vhd, ami, etc., but we might reconsider this as different types can result in the same file format, but with different content (e.g. packages installed).

Upload action

Each image can be, but does not have to be, uploaded to a remote location
One image can be uploaded to multiple locations (can it?)

But we might want to reconsider naming of the types we use now because, as you mention, we use: ami, qcow2, openstack, vhd, etc. but what we really implement is: AWS image, generic qcow2, OpenStack image, Azure image.

I think that's a good idea. Unfortunately, I'm a bit afraid of backwards compatibility. I think cockpit-composer checks for available image types but the API tests have hardcoded values.

These two answers seems to be in contradiction, right?

Yes, and no. Under normal circumstances, I would now challenge Jenn to a round of jousting, but I think we may actually want both things: I agree with all the definitions from Martin's last comment, but I would also add:
Job

What composer submits to a worker
Consists of ONE image build
And ONE OR MORE Upload Actions

This concept would not appear in the UI though, composer would take the Compose and split it into several Jobs, one per Image build (with potentially several Upload actions attached to each).

Yes, and no. Under normal circumstances, I would now challenge Jenn to a round of jousting, but I think we may actually want both things

Yes, I like keeping both image build and job as defined in the previous comments.
Even so, I would still be down for a team outing to an renaissance faire next week.

I think most of these issues have been addressed so I'm closing this now. Follow up issue is: #200


[question] how to debug glsl in chrome?

how to debug glsl in chrome?
I found most of the code you write in glsl? but how to debug it?

Hello @sonygod
Unfortunately, there are not many options for debugging GLSL shader code.  Since these shaders run in parallel on the GPU, you can't really get text output and breakpoints like a traditional CPU  debugger would offer. There are some tools out there for certain graphics cards, but you have to have one of those types of graphics card and system, like NVIDIA NSight.
There's a relevant discussion about this very topic here:
https://stackoverflow.com/questions/2508818/how-to-debug-a-glsl-shader
Out of the answers given to the OP of that Stack Overflow post, the one I agree with the most is to find simple ways of setting surfaces to bright colors like magenta,  so that the affected surfaces will stand out from the rest of the scene if something going wrong.  I have actually used this technique myself, and it has served me well in the past.
Graphics programming and GPU shader programming  is a very visual process, so it makes sense that if we devise little graphics checks and tests (with if statements in the shader code), then the debugging output will be more visual and scene-based to help us isolate errors in rendering.
Are you having a specific problem with your rendering as of now?  Feel free to share it here, or better yet, a screen shot of the problem. I'll do my best to try and see what's going on, and if I can't see the exact problem, I could hopefully point you in the right direction. :-)
-Erich

ok, so I close this issue.thanks .


Page 6630 "Sales Return Order", Action "GetPostedDocumentLinesToReverse" does not validate "Payment Method Code"

🕮 Describe the issue
When using the Page 6630 "Sales Return Order" with the action "GetPostedDocumentLinesToReverse", the Payment Method Code field is not validated after getting the Sales Lines, resulting in missing 1  Customer Ledger Entry for Refund. We can already see the missing posting in "Posting Preview".
🔧 To Reproduce

create a new sales return order
select any customer with Posted Invoices. Note: Payment Method Code is still empty, which is fine.
Choose any Document, you want to reverse.
Payment method code is filled in.
If we look on posting preview in Customer Ledger Entries, there is only 1 entry for Credit memo, 0 for Refund.

📣 Expected behavior
If you validate the Payment Method code manually and look at the preview, there are 2 Customer Ledger Entries, 1 for credit memo, 1 for refund.
Screenshots
Wrong Behaviour missing refund entry

Correct behaviour, after manual validate of Payment Method Code

Additional context

I analyzed the code but didn't find the right spot, where "Payment Method Code" is entered but not validated. The best guess is in codeunit 6620 "Copy Document Mgt.", function CopySalesInvLinesToDoc or deeper in code.

With a manual validate of the field "Payment Methode Code" the code in the Validate Trigger is run, guess this is missing.
"Bal. Account Type" := PaymentMethod."Bal. Account Type";
"Bal. Account No." := PaymentMethod."Bal. Account No.";

I guess all copy functions of where of Posted Shipments, Invoices, Return Receipts or Credit Memo have the same wrong behavior.

"Payment Method Code" should be inserted when Customer No. is validated. Is that the case in your scenario? If that is the case than it should not be a problem with missing validation.
Maybe I'm missing something but we are not updating sales header on GetPostedDocumentLinesToReverse action?

Thank you for your advice and comment, we checked our code. We saw that we subscribed to an event to update the header but didn't validate "Payment Method Code". So it's a bug on our side.


Update packages

thank you for the updates! May i ask what inspired this change?

I updated these because I ran into dependency conflicts while trying to npm install with node 20.


Use the python version active in the current python extension

The functions extension should use the Python version selected using the interpreter selector specified by the user.
Per:
https://code.visualstudio.com/docs/python/environments
Use the python.pythonPath setting to get the python interpreter currently selected in the extension.

We can definitely respect the "python.pythonPath" setting if it's at the "user" level.
However, it seems like that setting is usually created at the workspace level. That won't help us since we need to select the interpreter before creating a python project (aka in an empty folder). We run func init to create the project and that command fails if it's not in a venv or if the version is wrong. @qubitron how do you suggest we leverage that setting?

@EricJizbaMSFT so is the issue that func init provides no way to specify the interpreter and so you need to make sure the environment is already activated? Otherwise I'm not quite following what the issue of a workspace setting is as it sounds like it already needs to exist before func init runs.

Right, I remember finding that a bit odd about the Functions CLI the last time I played with it because I believe it then created another directory to put the files into instead of doing it into the current directory as I expected.
So one way to get around this is if you simply send the command to the terminal then the Python extension -- if already running -- will activate any chosen virtual environment automatically in the terminal, so that could be taken care of for you.


Write a guide for libary writers

Libraries must support different thinks when they should be in vcpkg. @strega-nil you said a little bit about it in the cpp cast.

They should prefer cmake.
They must support out of source dependencies.
There must be an explicit way to enable/disable dependencies when they are optional.
They should respect BUILD_SHARED_LIBS
vcpkg_fixup_cmake_targets should be necessary

Maybe also say something about other build systems.

Is your feature request related to a problem? Please describe.
nmwsharp/polyscope#47 asked what he should do so that the lib can be included in vcpkg, but couldn't find information.
Proposed solution
A guild with specific steps what library writers should/must do

@autoantwort This is one of those things that would be really nice, but isn't really a vcpkg thing; it's more of a C++ community at large thing. I do wonder if we could contribute to it tho.

@strega-nil Yes, in general this is a c++ community thing. But I think there are some aspects that are special for vcpkg or more important than usual. And I think even for a general c++ library guideline (for buildsystems) vcpkg is a good place.

In fact, we have a feature create to create the port draft.

See https://github.com/microsoft/vcpkg/blob/master/docs/examples/packaging-github-repos.md.
We should improve our document.


Test coverage for jsng

Create automation test for all the following modules.
Some of them has tests already, please check the coverage, and complete it if needed.

core

[x] base (high priority)

[x] factory (already covered)
[x] fields (already covered)
[x] stored factory (modified to work with all stores)
[x] filesystem store (already covered in stored factory)
[x] redis store
[x] whoosh store (already covered)

[x] config
[x] events (already covered)
[x] executors (already covered)
[x] logging (one test added)

data

[ ] bcdb (low prio)
[ ] encryption
[ ] hash
[ ] idgenerator
[ ] inifile
[ ] nacl
[ ] platform
[ ] schema
[x] serializers (json test modified)
[ ] tarfile
[ ] types

clients

[x] docker
[x] gedis (added tearDown)
[x] git
[x] redis
[ ] sshclient
[ ] sshkey
[ ] zdb (very low prio)

sal

[ ] fs
[ ] hostfile
[ ] nettools
[x] process
[ ] unix

servers

[x] gedis (already covered)
[ ] gedis_http (high priority)
[ ] openresty
[ ] rack

Installation

[ ] threesdk (don't test, should get removed.)

tools

[ ] alerthandler
[ ] codeloader
[ ] console
[ ] depsresolver
[ ] git
[ ] highlighter
[ ] schemac
[x] startupcmd (already covered)
[ ] syncer
[ ] timer

Docker client test cases

https://github.com/threefoldtech/js-ng/tree/development_testing_clients/jumpscale/clients/test

I'm working with ZDB client.

working sal process

working on threebot server

working on git client

FS PR : https://github.com/threefoldtech/js-ng/pull/463

Git Client  https://github.com/threefoldtech/js-ng/issues/472

@AhmedHanafy725 <3 thank you let's revisit the remaining items in the next sprint in a new issue as we are kicking some items out of ng completely

@AhmedHanafy725 <3 thank you let's revisit the remaining items in the next sprint in a new issue as we are kicking some items out of ng completely


Update index.html

Upon further reading, I notice in JavaScript you refer to "Lists", but they're called "Arrays". eg
// JS
const someList = [1, 2]
really should be
const someArray = [1, 2]
etc

@gabrielsroka thank you!


pip install error

I am using pip 3.7.3 x64 on WIndows.

I already have pyblind11 and numpy.
Thanks a lot.

Seems like a similar issue with #394: what is your MS Visual Studio version?
Thank you!

I'm using MS Visual Studio 19

The error occures in file pivot_neighb_invindx.cc and it about _mm_prefetch function not found. So I try changing the header of  pivot_neighb_invindx.cc like this. It works

Anyone who have the same error like me can try it.

Many thanks, I would have to patch & test!

any update on this? I am getting an error aswell, but no simple fix for it.

I've also come across this issue on multiple computers, all running Windows 10 and Python 3.7.4
Here's the error from my pip log:
err.txt

@barney54321 I hope to look into this quite soon (likely after this Wed).

Hi Leonid Boytsov..........Any luck with above?

We should be soon done with this. We will also be able to provide binaries, albeit they might be a bit slower.

Thank you looking forward for either. I am using windows 10. In case of binaries, speed is less of an issues as of now.

@chandansharma02 ok, sure, should be done with this today.

Hi @chandansharma02 could you check if the current binary version works for you? Thank you!

Thank you again. Now I am able to pip install it and able to import the library. Will run the complete code and hope all works.

Nice, thank you for confirming @chandansharma02

I'm also getting this error installing on a windows 10 machine, python 3.8, pip version 20.0.2
    .\similarity_search\src\method\pivot_neighb_invindx.cc(651): error C3861: '_mm_prefetch': identifier not found
    .\similarity_search\src\method\pivot_neighb_invindx.cc(652): error C2065: '_MM_HINT_T0': undeclared identifier
    .\similarity_search\src\method\pivot_neighb_invindx.cc(652): error C3861: '_mm_prefetch': identifier not found
    .\similarity_search\src\method\pivot_neighb_invindx.cc(653): error C2065: '_MM_HINT_T0': undeclared identifier
    .\similarity_search\src\method\pivot_neighb_invindx.cc(653): error C3861: '_mm_prefetch': identifier not found
    .\similarity_search\src\method\pivot_neighb_invindx.cc(666): warning C4146: unary minus operator applied to unsigned type, result still unsigned
    .\similarity_search\src\method\pivot_neighb_invindx.cc(697): warning C4018: '<=': signed/unsigned mismatch
    .\similarity_search\src\method\pivot_neighb_invindx.cc(700): warning C4146: unary minus operator applied to unsigned type, result still unsigned
    .\similarity_search\src\method\pivot_neighb_invindx.cc(709): error C2065: '_MM_HINT_T0': undeclared identifier
    .\similarity_search\src\method\pivot_neighb_invindx.cc(709): error C3861: '_mm_prefetch': identifier not found
    .\similarity_search\src\method\pivot_neighb_invindx.cc(710): error C2065: '_MM_HINT_T0': undeclared identifier
    .\similarity_search\src\method\pivot_neighb_invindx.cc(710): error C3861: '_mm_prefetch': identifier not found
    .\similarity_search\src\method\pivot_neighb_invindx.cc(711): error C2065: '_MM_HINT_T0': undeclared identifier
    .\similarity_search\src\method\pivot_neighb_invindx.cc(711): error C3861: '_mm_prefetch': identifier not found
    .\similarity_search\src\method\pivot_neighb_invindx.cc(726): warning C4146: unary minus operator applied to unsigned type, result still unsigned
    .\similarity_search\src\method\pivot_neighb_invindx.cc(741): warning C4146: unary minus operator applied to unsigned type, result still unsigned
    .\similarity_search\src\method\pivot_neighb_invindx.cc(756): error C2065: '_MM_HINT_T0': undeclared identifier
    .\similarity_search\src\method\pivot_neighb_invindx.cc(756): error C3861: '_mm_prefetch': identifier not found
    .\similarity_search\src\method\pivot_neighb_invindx.cc(757): error C2065: '_MM_HINT_T0': undeclared identifier
    .\similarity_search\src\method\pivot_neighb_invindx.cc(757): error C3861: '_mm_prefetch': identifier not found
    .\similarity_search\src\method\pivot_neighb_invindx.cc(758): error C2065: '_MM_HINT_T0': undeclared identifier
    .\similarity_search\src\method\pivot_neighb_invindx.cc(758): error C3861: '_mm_prefetch': identifier not found
    C:\Users\me\AppData\Local\Temp\pip-install-w69gas4j\nmslib\similarity_search\include\params.h(188): warning C4244: '=': conversion from 'const DefaultType' to 'ParamType', possible loss of data

@searchivarius, where's the binary version you mentioned above?

@1653091's fix worked for me, which was to #include <xmmintrin.h> instead of #include <mmintrin.h> in pivot_neighb_invindx.cc

@snosrap thank you for letting me know. I guess the headers are messed up if you want to compile on your own (needs to be sort out). But now you can also install a binary version (by default).

Hi @searchivarius, thanks for your response.
How do you install a binary version?
I'm installing using pip:
pip install nmslib

I get the error C3861: '_mm_prefetch': identifier not found error during the pip install process on my win10 laptop (works fine on my mac).

@snosrap ohh interesting could you try:
pip install nmslib --only-binary:all

Binary should be installed by default, but if it is not ... something is wrong.

I had to use pip install nmslib --only-binary all (no colon)
But I still got the same compilation problem...
pip install nmslib --only-binary all starts running "setup.py install for nmslib", then errors with error C3861: '_mm_prefetch': identifier not found -- same as before

@snosrap which Python version do you have?

Microsoft Windows [Version 10.0.16299.1625]

> python -V
Python 3.8.1

> pip -V
pip 20.0.2 from c:\users\me\appdata\local\programs\python\python38\lib\site-packages\pip (python 3.8)

@snosrap unfortunately, we don't have 3.8 yet, 3.7 is the latest.

Ah, that explains it.
Well, I'll be compiling my own using this fix in the meantime. Your windows compilation environment must have access to more header files than mine!
Thanks for looking into this.

@snosrap yes, the header needs to be fixed too for sure. It's surprising the header set isn't standard accross Windows machines though.

I am encountering the same error for the conda-forge recipe that I maintain ( thanks for the awesome library! I am using it in another conda package that I made and nmslib was not available in the anaconda ecosystem yet so I made the recipe). All of the windows builds error out (for all python 3 versions) but Linux and OSX builds were fine (https://github.com/conda-forge/nmslib-feedstock/pull/6#partial-pull-merging).
I am not familiar with these headers but it does seem like the fix proposed in this thread (changing mmintrin.h to xmmintrin.h) agrees with Intel's docs that _mm_prefetch is part of xmmintrin.h (https://software.intel.com/sites/landingpage/IntrinsicsGuide/#expand=4391&text=_mm_prefetch).
I also found this useful https://stackoverflow.com/questions/11228855/header-files-for-x86-simd-intrinsics.

@jzthree yeah, these includes are wrong, I will try to fix them in the upcoming release.

Hi @jzthree we have updated headers in the develop branch. Could you check if this still causes a trouble? Many thanks!

Great thanks! I can confirm the build problem is gone with the develop branch. The environment I tested was Windows 10 + python 3.8 + vs2017.

@jzthree awesome, many thanks! we will be rolling out this version quite soon.

Hi @NancyLi1013 I believe you won't need this patch for NMSLIB any more (once develop merges into master):
https://github.com/microsoft/vcpkg/blob/256d8a497a77f000168fe5a5b7c90a1962fa76ff/ports/nmslib/fix-headers.patch

Hi @searchivarius
Thanks for your kindly reminder. Of course, we can remove this patch in next release if these changes merged to.


hive publish command stops working after a while, server container restart resolves it

Hey, we're seeing a weird issue on our side.
It seems that after a certain amount of time/usage (unsure which) roughly a day our hive-registry is unable to handle publishes of schemas.
For the publishing of the schema we use the hive CLI hive schema:publish ..
The error we see in the logs is:

{"context":{"package":"slonik","poolId":"BxFDAve7R2uvQh9QmFfECg-0","connectionId":"BxFDAve7R2uvQh9QmFfECg-1030","queryId":"BxFDAve7R2uvQh9QmFfECg-4830","logLevel":20,"sql":"select pg_try_advisory_lock($1) as advisoryLock","values":[899406362]},"message":"executing query","sequence":"7695","time":1683630102225,"version":"2.0.0"}
{"context":{"package":"slonik","poolId":"BxFDAve7R2uvQh9QmFfECg-0","connectionId":"BxFDAve7R2uvQh9QmFfECg-1030","queryId":"BxFDAve7R2uvQh9QmFfECg-4830","logLevel":50,"error":{"name":"Error","message":"Client has encountered a connection error and is not queryable","stack":"Error: Client has encountered a connection error and is not queryable\n    at file:///usr/src/app/index.js:164997:32\n    at processTicksAndRejections (node:internal/process/task_queues:78:11)"}},"message":"execution routine produced an error","sequence":"7696","time":1683630102225,"version":"2.0.0"}
{"context":{"package":"slonik","poolId":"BxFDAve7R2uvQh9QmFfECg-0","connectionId":"BxFDAve7R2uvQh9QmFfECg-1030","queryId":"BxFDAve7R2uvQh9QmFfECg-4830","logLevel":50,"error":{"notices":[],"name":"Error","message":"Client has encountered a connection error and is not queryable","stack":"Error: Client has encountered a connection error and is not queryable\n    at file:///usr/src/app/index.js:164997:32\n    at processTicksAndRejections (node:internal/process/task_queues:78:11)"}},"message":"query execution produced an error","sequence":"7697","time":1683630102225,"version":"2.0.0"}
{"level":50,"time":1683630102228,"pid":13,"hostname":"hive-server-deployment-75c5bc7658-l9wmp","msg":"Client has encountered a connection error and is not queryable\n\nGraphQL request:2:3\n1 | mutation schemaPublish($input: SchemaPublishInput!, $usesGitHubApp: Boolean!) {\n2 |   schemaPublish(input: $input) {\n  |   ^\n3 |     __typename - (requestId=f39ef34e-7ea7-4d33-8701-3a5163da403f)"}
{"level":30,"time":1683630102228,"pid":13,"hostname":"hive-server-deployment-75c5bc7658-l9wmp","msg":"[200] (<IP_ADDRESS>) POST /graphql 'schemaPublish' (reqId=f39ef34e-7ea7-4d33-8701-3a5163da403f)"}

This is what it looks like from the 'hive publish' command side

The weird thing is that hive schema:check and other frontend calls keep on working.
Notes

we're using version 72b036a (20-12-2022) of the hive-registry
Unfortunately updating to a newest version to rule out any bugs that are already fixed is blocked by : https://github.com/kamilkisiela/graphql-hive/issues/2151

Theories

The publish command uses a different database connection pool and is not able to properly handle all sorts of errors that can happen between a db and an application (e.g. network reset)

How we can 'fix' it
By specifically restart the 'server image' (as in not the entire stack) it resolves the issue.
Would love to hear if this rings a bell, or if you have any ideas what it might be!
If you need any more info let me know!
p.s. is there a way to enable more logging within hive, perhaps some environment variable?

There could be a connection issue on Postgres side that made Slonik (pg client) stuck. I think it's solved in the newer versions of GraphQL Hive.
I'm closing this one as it's already fixed. The only blocker for you to upgrade is Google Cloud Storage support, but we already described what could be done there.


builder: Add a simple script to bump KUBEVIRT_BUILDER_IMAGE

/cc @brianmcarey
What this PR does / why we need it:
This PR provides a simple script and Makefile target that can be used by the existing bump-images periodic job to bump KUBEVIRT_BUILDER_IMAGE to the latest available version.
KUBEVIRT_BUILDER_IMAGE can also be overridden during testing as an environment variable.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
Release note:

NONE

/close
Okay lets keep this manual for the time being.


[Question] How to use KUTE.js SvgMorph in NextJS?

I have a question on how to use the svgMorph in a NextJS project. I am using the pages directory in Next 13. I installed the project using yarn add kute.js but what should I do next? I can see that I can import svgMorph but it doesn't really have any to or from functions. There isn't a kute object in the library like gsap has a gsap object so how can I use the to and from functions here?
My goal is to morph an SVG to another and hoped a code like this would do the job -
kute.fromTo("#start", { path: "#start" }, { path: "#end" });

Thanks in advance for the help!

You need to use React useRef() hook. Something like this:
function Component() => {
  const path1 = useReft();
  const path2 = useRef();

  return
(
    <svg xmlns onClick={() => KUTE.fromTo(path1, { path: path1 }, { path: path2 });}>
      <path ref={path1}>
      <path ref={path2}>
    </svg>
)
}

But you can use the onClick property on semantics like <button> and even other types of events.

You need to use React useRef() hook. Something like this:
function Component() => {
  const path1 = useReft();
  const path2 = useRef();

  return
(
    <svg xmlns onClick={() => KUTE.fromTo(path1, { path: path1 }, { path: path2 });}>
      <path ref={path1}>
      <path ref={path2}>
    </svg>
)
}

But you can use the onClick property on semantics like <button> and even other types of events.

Two questions on this -

How did you import the KUTE object in react?
Would IDs and classNames not work and we'd only need to use refs?

It should work with IDs and className as well, now on the import part, a future version should solve any issue you might encounter trying to do import KUTE from 'kute.js'.

Ahh gotcha then, and by "future version" does this mean that there's no way of using Kute in Next right now?

You should try, it may not work with Typescript and everything but give it a try nevertheless.

I tried it but it doesn't work. Thanks for the help though, I tried KUTE in vanilla JS and it's really impressive. Even big libraries like GSAP need a paid license for morphing SVG, while you are handing it out for free. Thanks for your work! You can reach out to me if you need any sorts of help, I don't know much about the inner working of these things but would be happy to contribute while learning new things!

@slyofzero when the time is right I'll remember that and call you in for testing.


Ability to run arbitrary array commands when starting container

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the bug
I have the following app: https://github.com/dokku/dokku/tree/master/tests/apps/python-flask
It builds successfully with nixpacks:
nixpacks build --name app:latest .

But when I try to run a command, it fails:
% docker run -it --rm app:latest touch /tmp/derp
touch: missing file operand
Try 'touch --help' for more information.

This seems wrong, but I'm not sure what's swallowing up the arguments.
To reproduce
git clone https://github.com/dokku/dokku.git
cd dokku/tests/apps/python-flask
nixpacks build --name app:latest .
docker run -it --rm app:latest touch /tmp/derp

Expected behavior
I would expect it to exit 0 and run the command I specified.
Environment

nixpacks 0.11.5
MacOS Monterey 12.6

% docker version
Client:
 Cloud integration: v1.0.29
 Version:           20.10.17
 API version:       1.41
 Go version:        go1.17.11
 Git commit:        100c701
 Built:             Mon Jun  6 23:04:45 2022
 OS/Arch:           darwin/arm64
 Context:           default
 Experimental:      true

Server: Docker Desktop 4.12.0 (85629)
 Engine:
  Version:          20.10.17
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.17.11
  Git commit:       a89b842
  Built:            Mon Jun  6 23:01:01 2022
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.8
  GitCommit:        9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Because of how the entrypoint is setup, custom commands must be quoted as they get sent to /bin/bash -l -c. This is how Railway handles custom start commands too.
https://github.com/railwayapp/nixpacks/blob/main/src/nixpacks/builder/docker/dockerfile_generation.rs#L198

We should definitely add this to the docs somewhere.

Ah interesting, I guess that comes from the -c flag. Is there any way to override the the entrypoint, or even just remove the entrypoint completely?

At the moment no. And I'm not sure it is a good idea. There is a custom entrypoint as some providers add some stuff to ~/.profile and since the entrypoint is bash -l that file will be loaded on start. Changing the entrypoint will have undefined behaviour for some apps.
FWIW buildpacks also have a custom entrypoint.

Buildpacks do indeed have a custom entrypoint, but you can run arbitrary commands without needing to pass them in as a string. CNB uses a custom entrypoint, while gliderlabs/herokuish (the heroku v2a buildpack-compatible system) uses eval.

I can look into ways that we can allow specifying arbitrary commands (and open to suggestions here). But a hard requirement is being able to run load ~/.profile files on startup.

Yeah that makes sense. I wonder if it makes sense to ship a custom entrypoint that does the parsing/loading of profile the same way CNB does?

Hmm yeah I think that could work. Just a simple wrapper around bash -l that doesn't enforce passing the command as a single argument string

Yeah maybe there could be a custom entrypoint that is something like the following (untested):
#!/usr/bin/env bash

if [[ "$#" == "1" ]]; then
  exec bash -l -c "$@"
else
  exec bash -l "$@"
fi

This would:

retain the login shell in all cases
handle the extra shell parent and re-exec as the bash command
allow us to run with multiple arguments where possible


Problems with caching on self-hosted runners

As mentioned in https://github.com/scala-steward-org/scala-steward-action/pull/38#issuecomment-637417913, Scala Steward seems to do some kind of caching (that maybe isn't useful for ephemeral GitHub Action runners), opening this issue for that.

A possible workaround might be to add a GHA step that removes all/some of those files...?

Caching is an interesting topic that I'd like to discuss a bit more. I think there are some cases where you'd like to utilize results from previous action runs, for example, a big project with lots of dependencies and/or lots of open PRs from Scala Steward, or an action that handles updates for multiple projects.
Running every time from scratch will eat up into your action minutes allotment. Also, Scala Steward has some features that used the persisted (in the wordspace) state, like scanning frequency, et. al. I was really thinking into adding a caching step to my own projects just to deal with all of this.
So, if we're talking about adding a behaviour in the action to wipe out the workspace before calling SS, I would suggest to

add a configuration input to enable/disable this behaviour
have it enabled by default (as I assume the majority of action users are small single project repos)
explain all of this in documentation and add configuration examples with explicit workspace caching

Thoughts?

The current/built-in caching usage of Scala Steward is only per runner and that cache might not be as helpful as compared to how one might otherwise run Scala Steward standalone (towards multiple repos). This in contrast with this action, where the default is to just run towards the same repo.
I’ll see if I can troubleshoot what issues I’ve gotten that have been cached (preventing a rerun to succeed). Essentially whether any caching is performed could be less of an issue if I could rerun and get it to retry creating PRs etc (when it fails on an that is resolved by just retrying).

Leaving a note to remember:
If I (or anyone else) runs into this again, we should probable check the contents of that file (from output above):
./scala-steward/workspace/store/refresh_error/v1/github/my-org/my-repo/refresh_error.json

Another workaround could be to just remove that file (until we've found a suitable way forward regarding caching per runner/repo/etc).

refresh_error aside...
Do we have any suggestions on how one might do caching using the actions/cache cache?
(to cache Scala Steward workspace files between different runners, for the same repo)
Had you given this a try @bpg?

To share, here's what I'm trying at the moment:
diff --git a/.github/workflows/scala-steward.yml b/.github/workflows/scala-steward.yml
index 9c79225..d8cbe8f 100644
--- a/.github/workflows/scala-steward.yml
+++ b/.github/workflows/scala-steward.yml
@@ -1,25 +1,29 @@
 name: Scala Steward

 on:
   # This workflow will launch at 00:00 every Sunday
   schedule:
     - cron: '0 0 * * 0'
   repository_dispatch:
     types: [scala-steward]

 jobs:
   scala-steward:
     runs-on: self-hosted
     name: Launch Scala Steward
     steps:
+      - run: rm -rf ~/scala-steward
+      - uses: actions/cache@v2
+        with:
+          path: ~/scala-steward
+          key: ${{ runner.os }}
       - name: Setup Java and Scala
         uses: olafurpg/setup-scala@v5
       - name: Launch Scala Steward
         uses: scala-steward-org/scala-steward-action@v2
         with:
           github-token: ${{ secrets.ORG_LEVEL_GITHUB_TOKEN }}
           author-email<EMAIL_ADDRESS>           author-name: org-level-robot-user
-      - run: rm -rf ~/scala-steward

I get these results when running the above:
Before scala-steward-action:
Run actions/cache@v2
  with:
    path: ~/scala-steward
    key: Linux
Cache not found for input keys: Linux

After:
Post Run actions/cache@v2
Cache saved successfully
Post job cleanup.
/bin/tar -z -cf cache.tgz -P -C /home/runner/_work/my-repo/my-repo --files-from manifest.txt
Cache saved successfully

🎉
And in the next job:
Run actions/cache@v2
Cache Size: ~0 MB (5867 B)
/bin/tar -z -xf /home/runner/_work/_temp/1a7847a1-58fa-482c-9b00-0bcf25638667/cache.tgz -P -C /home/runner/_work/my-repo/my-repo
Cache restored from key: Linux

Post Run actions/cache@v2
Post job cleanup.
Cache hit occurred on the primary key Linux, not saving cache.

😭

Tried with caching based on *.sbt files:
diff --git a/.github/workflows/scala-steward.yml b/.github/workflows/scala-steward.yml
index d8cbe8f..43c2249 100644
--- a/.github/workflows/scala-steward.yml
+++ b/.github/workflows/scala-steward.yml
@@ -18,7 +18,7 @@ jobs:
       - uses: actions/cache@v2
         with:
           path: ~/scala-steward
-          key: ${{ runner.os }}
+          key: ${{ runner.os }}-sbt-${{ hashFiles('**/*.sbt') }}
       - name: Setup Java and Scala
         uses: olafurpg/setup-scala@v5
       - name: Launch Scala Steward

Unfortunately, that just resolved into Linux-sbt- (no hash), since I had forgotten to checkout the repo (have any actions/checkout actions).
I added that now, and get:
Run actions/cache@v2
Cache Size: ~0 MB (8052 B)
/bin/tar -z -xf /home/runner/_work/_temp/4d38ab15-b49a-4a1c-ab30-7ce433cc8161/cache.tgz -P -C /home/runner/_work/sbt-services/sbt-services
Cache restored from key: Linux-sbt-b19d6d84297c3469e702a9fdf501c41235ffe8bd4b62aed495a8ca62cd1b8fd0

Post Run actions/cache@v2
Post job cleanup.
Cache hit occurred on the primary key Linux-sbt-b19d6d84297c3469e702a9fdf501c41235ffe8bd4b62aed495a8ca62cd1b8fd0, not saving cache.

However, one problem here is that even though a dependency might have changed, the cache isn't updated. Changes to my *.sbt files needs to happen before the cache is saved into again — note the not saving cache above.

Also, note how the cache is expanded into my workspace for GitHub Actions:
(-C /home/runner/_work/my-repo/my-repo and not ~/scala-steward)
Run actions/cache@v2
  with:
    path: ~/scala-steward
    key: Linux-sbt-b19d6d84297c3469e702a9fdf501c41235ffe8bd4b62aed495a8ca62cd1b8fd0
Cache Size: ~0 MB (8052 B)
/bin/tar -z -xf /home/runner/_work/_temp/17139ec5-0305-4040-9307-8e15c1de1709/cache.tgz -P -C /home/runner/_work/my-repo/my-repo
Cache restored from key: Linux-sbt-b19d6d84297c3469e702a9fdf501c41235ffe8bd4b62aed495a8ca62cd1b8fd0

Maybe we should revisit the changes made in https://github.com/scala-steward-org/scala-steward-action/pull/42 (where we moved the workspace into ~/scala-workspace)...
See:
https://github.com/scala-steward-org/scala-steward-action/blob/3199096c4fd404510a0849275ac40aacf67d762d/src/files.ts#L26
...and maybe move the Scala Steward workspace into the GitHub Actions workspace for the repo instead @alejandrohdezma (so caching can be done per repo, and not per runner)?

Hey! So sorry, I don't know why but I totally miss this issue/conversation. Thank you both so much for all this investigation, this is indeed really interesting!
I did some testing with cache on one of the alpha versions using toolkit/cache but I remember I found some errors and postpone it.
One first thing we could do is using the post action to cleanup the directory so people don't find this problem on self runners.

Also, @fthomas could you tell us a bit about which things should be cached from the Scala Steward workspace? That way I can do some testing with it in a different branch :)

Do we have any suggestions on how one might do caching using the actions/cache action?
(to cache Scala Steward workspace files between different runners/runs for the same repo)
Had you given this a try @bpg?
I haven't got far, will try again on the weekend.

In my other project I have a CircleCI Scala Steward custom job running on multiple projects, and caching is a huge help there, taking build time from 6..8 minutes to tens of seconds. So I think it is important to have an option to keep SS cache at the end, and reuse it next time, one way or another.

I would cache everything of the Scala Steward workspace except the store/refresh_error directory. The refresh_error store is used to temporarily ignore repos whose build can't be loaded by Scala Steward. This is useful when Scala Steward is working on a lot of repos and should not be slowed down by a few repos that have broken builds. I guess it is less useful if Scala Steward runs as GH action where it isn't desirable to ignore broken builds because the operator of the action is able to fix the builds or the action.

@MPV I have created #57 to address the problem of files created by this action being left behind. Let me know if that would be enough :)

Thank you very much @fthomas for that explanation! 😸
I'll try to address that in a new PR today

Or, could we change it like this?

The action (or Steward) has it's workspace within the repo workspace.
The action (or Steward) cleans any refresh_error files/directories after each run.

Then we could benefit from cross-runners caching (1 + actions/cache) and still no get blocked runs due to refresh error locks (2).

Either way, I think we should remove all the files created by the action since it is what's encouraged by Github so it won't matter if the workspace is in the home directory or the repo workspace and it will be fixed by using action/cache in any case

Either way, I think we should remove all the files created by the action since it is what's encouraged by Github so it won't matter if the workspace is in the home directory or the repo workspace and it will be fixed by using action/cache in any case

Could you share a link/example to “encouraged by GitHub”. I searched but couldn’t find that, for example here: https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#filesystems-on-github-hosted-runners
Also, were you able to use action/cache to cache anything outside the repo workspace?

Right, the repos directory does not need to be cached.

okey dokey! Thanks @fthomas

@alejandrohdezma To add another viewpoint to this:
If we enable caching as in #59, how long will dependencies be cached for?
If dependencies are cached for X days, then it won't be much value in running this action more often than every X days, no?
I have a use-case where we'd like to try using Scala Steward to create fast and semi-automatic bumping of downstream versions from an upstream repo.
Would setting a TTL for the cache be a suitable solution for this?
For example, I could have:

a weekly workflow with longer TTL for generic dependencies
a repository_dispatch workflow with longer TTL for being triggered by changes by upstream repos

Alternatively, if there were a setting for Scala Steward itself to drop cache for a specific dependency and force-update just that one (similar to what I suggested in https://github.com/fthomas/scala-steward/issues/1470).

@alejandrohdezma To add another viewpoint to this:
If we enable caching as in #59, how long will dependencies be cached for?
If dependencies are cached for X days, then it won't be much value in running this action more often than every X days, no?

Caches are stored for a maximum of 7 days, so yes, it won't have any effect if the action is run more often than that.

I have a use-case where we'd like to try using Scala Steward to create fast and semi-automatic bumping of downstream versions from an upstream repo.
Would setting a TTL for the cache be a suitable solution for this?

As far as I know, setting TTL for actions/cache is not allowed 😿

Alternatively, if there were a setting for Scala Steward itself (@fthomas) to drop cache for a specific dependency and force-update just that one (similar to what I suggested in fthomas/scala-steward#1470).

If this is enabled in scala-steward it shouldn't be to hard to add it to the action :)

Scala Steward already has a --cache-ttl option that controls how often it checks for new versions. The default value is 2hours.

Scala Steward already has a --cache-ttl option that controls how often it checks for new versions. The default value is 2hours.

Opened #62 to be able to set custom cache TTL.


govuk-frontend 3.0 upgrade

Updated all templates to meet breaking changes as part of 3.0.0 release which are all detailed here — https://github.com/alphagov/govuk-frontend/releases/tag/v3.0.0
This 3.0 release includes numerous accessibility updates but most visually prominent is the all new colour scheme - https://designnotes.blog.gov.uk/2019/07/29/weve-made-the-gov-uk-design-system-more-accessible/

Probs need to do some comms before this release or at least check with Katie


enhancement add normal query before date convert for debug

Proposed changes
Issue Number: close #xxx

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run buildall

just debug log, not necessary for 2.0


make the governor an account contract

all the data that is needed to execute a proposal is in local storage, so validate can run locally and no one needs to pay the gas
this also makes it easier to simulate calls from the governor

this is too difficult to properly implement at the moment:

need to be able to retry executions in case the calls fail
without risk of draining the protocol
and the user should not be able to drain the governor by specifying too large a gas price

so for now, will not do


Add more tests for generating transactions via the CLI

If we would have had more tests that use the cli to generate transactions, then we would have noticed #132 sooner. The way we generate MsgWirePayForMessages is atypical for an cosmos-sdk chain in that we are actually generating and signing multiple iterations of the same transaction. We need to have better testing for this.
This should be completed either when completing #132 or directly after, as completing that will require a refactor of the current way we generate transactions using the cli.

closing with #171


luajitPackages.magick resize doesn't work "Failed to load filter list, can't resize"

Describe the bug
luajitPackages.magick resize functionality doesn't work, getting error: "Failed to load filter list, can't resize"
Steps To Reproduce
Steps to reproduce the behavior:

a nix shell with pkgs.luajit.withPackages (ps: [ps.magick]);
launch lua console with luajit and magick = require "magick"
magick.thumb("somefile.jpg", "100x100", "output.jpg") causes the error.

Expected behavior
Thumbnail generated.
Additional Context
https://github.com/leafo/magick/issues/54 seems applicable, but magick uses imagemagick 7 afaict so...
Notify maintainers

@donovanglover
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"aarch64-darwin"`
 - host os: `Darwin 23.2.0, macOS 14.2.1`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.18.1`
 - channels(axel): `""`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

but also tried on aarch64-linux (raspberry pi) with same results.

Add a :+1: reaction to issues you find important.

@donovanglover any ideas?


Status should probably be a single field rather than an array

This was an observation in #1006 that I think warrants its own issue...
The response from /api/v1/vulnerability/{id} contains a field advisories.sboms.status which is an array and not a single field. That technically means that an a Single advisory can say that an SBOM has the status affected and not_affected at the same time. E.g.
{
  "advisories": [
    {
      "identifier": "Advisory1",
      "sboms": [
        {
          "id": "Sbom1",
          "status": ["affected", "not_affected"]
          // other fields
        },
      ]
    }
  ]
}

This structure forces the client to come up with some kind of algorithm to parse the data and solve conflicts between multiple advisory.sboms.status values which might contradict each other.

This should be fixed by #1098. The status field is replaced with purl_statuses that contains list of purls with the specific status. As advisory can refer to different packages with different statuses, this should remain the array


Publishing isolation for scripted

When scripted performed a local publish I noticed this:
[warn] Attempting to overwrite /Users/huntc/.ivy2/local/com.typesafe.sbt/sbt-js-engine/scala_2.10/sbt_0.13/1.0.0-RC3/jars/sbt-js-engine.jar
[warn] 	This usage is deprecated and will be removed in sbt 1.0.

I tend to make all the changes I need, including the update of a version in the file. I then test everything via "sbt test scripted". I then commit and tag the release. Finally, I publish to the remote repo if all is well.
@eed3si9n 's thoughts on this: "I think we need more isolated cache and repo for scripted, or make something like "-LOCAL" that's by defaulting changing"

sbt-pgp may also require some changes. publishLocalSigned prints these warnings even when publishing a -SNAPSHOT release.


I always get a faied open stream error for Firebase\Auth\Token\Cache\InMemoryCache.php when I try to send message

Describe the issue you are experiencing
I'm trying to send a FCM with firebase-php and I always get the error file "PHP message: PHP Warning:  require_once(../../model/Firebase\Auth\Token\Cache\InMemoryCache.php): failed to open stream", looks like the application is trying to open that file directly on the folder where I'm calling the vendor/autoload file instead of use its own route to get the right folder
Installed packages
composer require kreait/firebase-php
PHP version and extensions
PHP 7.4
On which operating system(s) does the issue occur?

[ ] Linux
[ ] MacOS
[X] Windows

Steps to reproduce the issue.
require __DIR__ . '/../lib/firebase/vendor/autoload.php';
use Kreait\Firebase\Factory;
use Kreait\Firebase\Messaging\CloudMessage;
use Kreait\Firebase\Messaging\Notification;
$jsonDir = __DIR__. '/../lib/firebase/azulik-tribe.json';
$factory = ( new Factory )->withServiceAccount( $jsonDir );
$messaging = $factory->createMessaging();
$message = CloudMessage::withTarget( 'token', $token )->withNotification( Notification::create( $titulo, $mensaje ) );
$messaging->send( $message );

Error message/Stack trace
[Wed Aug 04 11:31:51.186836 2021] [proxy_fcgi:error] [pid 28601:tid<PHONE_NUMBER>30208] [client <IP_ADDRESS>:13516] AH01071: Got error 'PHP message: PHP Warning:  require_once(../../model/Firebase\Auth\Token\Cache\InMemoryCache.php): failed to open stream: No such file or directory in /home/565140.cloudwaysapps.com/heyfcvvxxg/public_html/model/functions.php on line 9PHP message: PHP Fatal error:  require_once(): Failed opening required '../../model/Firebase\Auth\Token\Cache\InMemoryCache.php' (include_path='.:/usr/share/php') in /home/565140.cloudwaysapps.com/heyfcvvxxg/public_html/model/functions.php on line 9'
Additional information
No response

This looks like an autoloading issue, not a bug in the SDK itself. I don't know what the reason for this could be since I'm missing the context of the code (e.g. if it's standalone or embedded/called from another script).
You could try replacing
require __DIR__ . '/../lib/firebase/vendor/autoload.php';

with
require_once __DIR__ . '/../lib/firebase/vendor/autoload.php';

just to be sure that the composer autoloader is not required multiple times, but apart from that I have no ideas 🤔

I also try with require_once and I get the same result

@lalojunkyard Did you find the reason for the problem?

I have same problem


Validation and components with multiple inputs not validated as expected

I'm submitting a bug report
Please tell us about your environment:
Operating System:
Windows 10
Node Version:
v6.9.1
NPM Version:
3.10.9
JSPM OR Webpack AND Version
webpack 2.3.3
Browser:
all
Language:
ESNext
Current behavior:
When a single input on a component with multiple input fields is validated, validation is not applied at the input level, and is instead applied at the component level.
Reproduction of behavior with a less than idea workaround that we have been using: https://github.com/waywardz/skeleton-navigation
The example is in skeleton-esnext-webpack.  I didn't bother updating the renderer to highlight the fields correctly, the error messages demonstrate the behavior.
My company now blocks gist.run, otherwise I would have done it there.  Working on getting it unblocked.
Expected/desired behavior:
I would expect each input to be validated independently regardless of whether its in a component or not.
What is the motivation / use case for changing the behavior?
The behavior isn't intuitive given how validation works outside of a component.  I demonstrated a workaround, but it definitely isn't ideal or intuitive.

@jdanyow is there anything more I can provide for this one to get feedback on it?

@EisenbergEffect is anyone available to help answer this question?

If you create a gist that shows what you're doing I'll be able to help.
https://gist.run/?id=381fdb1a4b0865a4c25026187db865ce


Lint the dockerfiles

Lint the dockerfiles with hadolint ... clean everything up and ✨

Closed by #89 kinda accidentally, but it all lints clean 🤷🏻♀


s3: Retry with an exponential backoff delay

This is more of an RFC, since I don't know if retries are to be attempted all over the backend client code or in backends. Also, I'm having problems vendoring the backoff dependency (and I'm not sure of the maintainer wants it :)).
Anyway, this has helped a lot on my long backups (along with my other PR about keepalive), where S3 would fail in one way or another every few hundred requests, panicking on error.
Thanks for your comments!

Thanks for your contribution! I'm planning to implement retries (and exponential backoff sounds like a good idea, with some maximum waiting time), but it should be implemented on a different layer so that all backends can benefit from the code and we have less code duplication.
In addition, the minio s3 library may implement retries specifically for s3 at some later point.
If you're interested in contributing generic retries for backends, I'm happy to work with you :)
I'm closing this PR for now.


Unable to exclude payment types after an preference is created

Hello. I'm trying to update the payment methods of an existing preference and the response comes with bad request.
I have tested the SDK dx-java version 1.0.10
Steps to reproduce:

create preference
     MercadoPago.SDK.setClientSecret(clientSecret());
     MercadoPago.SDK.setClientId(clientId());

     Preference preference = new Preference();
     com.mercadopago.resources.datastructures.preference.Item item = new com.mercadopago.resources.datastructures.preference.Item();
     item
             .setTitle("Rustic Bronze Shirt")
             .setQuantity(7)
             .setCurrencyId("MXN")
             .setUnitPrice((float) 68.86);

     Payer payer = new Payer();
     payerDTO.setEmail("julia_powlowski@gmail.com");

     preference.setPayer(payer);
     preference.appendItem(item);
     String url = "https://requestloggerbin.herokuapp.com/bin/ac7c768c-697d-4f82-ab4d-16420046a0ba?case=";
     preference.setBackUrls(new com.mercadopago.resources.datastructures.preference.BackUrls(url + "success", url + "pending", url + "failure"));
     preference.setAutoReturn(Preference.AutoReturn.all);
     preference.setExternalReference("external_reference");

     Preference result = preference.save();

update existing preference. I tried all those 3 ways to update payment types
 MercadoPago.SDK.setClientSecret(clientSecret());
 MercadoPago.SDK.setClientId(clientId());
 Preference preference = getMPPreferenecById("315404205-71993487-2e04-489f-b41c-183a3f6a320e");

 //        preference.getPaymentMethods()
 //                .setExcludedPaymentTypes("credit_card");

 //        preference.getPaymentMethods()
 //                .appendExcludedPaymentTypes(new ExcludedPaymentType("credit_card"));

 preference.getPaymentMethods()
         .setExcludedPaymentTypes()
         .appendExcludedPaymentTypes(new ExcludedPaymentType("credit_card"));

 Preference result = preference.update();

Result:
In the lastApiResponse field of the result there are the following information:
payload = "{"payment_methods":"{excluded_payment_methods=[{id=}], excluded_payment_types=[{id=credit_card}], installments=6.0, default_installments=3.0}"}" statusCode = 400 reasonPhrase = "Bad Request" stringResponse = "{"message":"payment_methods invalid. Wrong format","error":"invalid_payment_methods","status":400,"cause":[]}" jsonElementResponse = {JsonObject@6325} "{"message":"payment_methods invalid. Wrong format","error":"invalid_payment_methods","status":400,"cause":[]}"
Regards

Maybe this helps:
    MercadoPago.SDK.setClientSecret(clientSecret());
    MercadoPago.SDK.setClientId(clientId());
    Preference preference = Preference.findById(id);

returns a preference with payments like this:
paymentMethods = {PaymentMethods@6389}
excludedPaymentMethods = {ArrayList@6406}  size = 1
0 = {ExcludedPaymentMethod@6413}
id = ""
excludedPaymentTypes = {ArrayList@6407}  size = 1
0 = {ExcludedPaymentType@6411}
id = "bank_transfer"
excludedPaymentMethods contains an element with id = ""
Is it ok?

Solved, the correct form similar to your snippet is:
Preference preference = new Preference();
preference.getPaymentMethods().appendExcludedPaymentMethod(new ExcludedPaymentMethod("ExcludedPaymentMethod"));
preference.getPaymentMethods().appendExcludedPaymentTypes(new ExcludedPaymentType("ExcludedPaymentType"));

Hi @ralubostan effetly we introduce a bug with last change, We was creating a PaymentMethod object after to use Get Accesor, now you have to create explicitly an PaymentMethod object if you want to use this feature:
PaymentMethods paymentMethods = new PaymentMethods();
        paymentMethods.appendExcludedPaymentMethod(new ExcludedPaymentMethod().setId("ExcludedPaymentMethod"));
        paymentMethods.appendExcludedPaymentTypes(new ExcludedPaymentType().setId("ExcludedPaymentType"));
        paymentMethods.setDefaultPaymentMethodId("DefaultPaymentMethodId");
        paymentMethods.setInstallments(1);
        paymentMethods.setDefaultInstallments(1);

preference.setPaymentMethods(paymentMethods);

Hi @joelibaceta I tried your solution but the result is the same.
Steps to reproduce:

get an existing preference

add some exclude payment types

persist the changes.
 //get existing preference
 Preference preference = Preference.findById("315404205-71993487-2e04-489f-b41c-183a3f6a320e");

 //update fields on preference
 PaymentMethods paymentMethods = new PaymentMethods();
 paymentMethods.appendExcludedPaymentMethod(new ExcludedPaymentMethod().setId("redlink"));
 paymentMethods.appendExcludedPaymentTypes(new ExcludedPaymentType().setId("bank_transfer"));
 paymentMethods.appendExcludedPaymentTypes(new ExcludedPaymentType().setId("atm"));

 paymentMethods.setDefaultPaymentMethodId("debit_card");
 paymentMethods.setInstallments(1);
 paymentMethods.setDefaultInstallments(1);

 preference.setPaymentMethods(paymentMethods);

 //update preference
 Preference result = preference.update();

result:
payload = "{"payment_methods":"{excluded_payment_methods=[{id=redlink}], excluded_payment_types=[{id=bank_transfer}, {id=atm}], default_payment_method_id=debit_card, installments=1.0, default_installments=1.0}"}"
statusCode = 400
reasonPhrase = "Bad Request"
stringResponse = "{"message":"payment_methods invalid. Wrong format","error":"invalid_payment_methods","status":400,"cause":[]}"
jsonElementResponse = {JsonObject@6325} "{"message":"payment_methods invalid. Wrong format","error":"invalid_payment_methods","status":400,"cause":[]}"

Regards

@toudoryca are you sure are you using the last SDK version 1.0.13?, I made some tests, getting successfully responses.

@joelibaceta
I tried with 1.0.13
It works as expected for a newly created preference. But when you are trying to make those updates on an existing preference the 400-bad request is still there.

Solved in https://github.com/mercadopago/dx-java/pull/58


Connection Failed: Timed Out while connection

Description
Librespot will never connect.  Speaker will appear on spotify but when I attempt to connect, it fails to connect to any services with below error.
Version
What version(s) of librespot does this problem exist in?
Version 0.5.0
How to reproduce
Steps to reproduce the behavior in librespot e.g.
librespot -n "Librespot Speaker" -b 160 --cache /librespot/cache --access-token {accessToken} --verbose
Log
2024-11-21T04:58:33Z INFO  librespot] librespot 0.5.0 84d28e8 (Built on 2024-10-17, Build ID: NYHYOuGX, Profile: release)
[2024-11-21T04:58:33Z TRACE librespot] Command line argument(s):
[2024-11-21T04:58:33Z TRACE librespot] 		n "Librespot Speaker"
[2024-11-21T04:58:33Z TRACE librespot] 		b "160"
[2024-11-21T04:58:33Z TRACE librespot] 		cache "/librespot/cache"
[2024-11-21T04:58:33Z TRACE librespot] 		access-token "XXXXXXXX"
[2024-11-21T04:58:33Z TRACE librespot] 		verbose
[2024-11-21T04:58:33Z DEBUG librespot_core::session] new Session
[2024-11-21T04:58:33Z DEBUG librespot_discovery::server] Zeroconf server listening on <IP_ADDRESS>:33889
[2024-11-21T04:58:33Z INFO  librespot_playback::mixer::softmixer] Mixing with softvol and volume control: Log(60.0)
[2024-11-21T04:58:33Z DEBUG librespot_connect::spirc] new Spirc[0]
[2024-11-21T04:58:33Z DEBUG librespot::component] new MercuryManager
[2024-11-21T04:58:33Z DEBUG librespot_playback::player] new Player [0]
[2024-11-21T04:58:33Z DEBUG librespot::component] new ApResolver
[2024-11-21T04:58:33Z INFO  librespot_playback::convert] Converting with ditherer: tpdf
[2024-11-21T04:58:33Z INFO  librespot_playback::audio_backend::alsa] Using AlsaSink with format: S16
[2024-11-21T04:58:33Z DEBUG librespot_core::http_client] Requesting https://apresolve.spotify.com/?type=accesspoint&type=dealer&type=spclient
[2024-11-21T04:58:37Z INFO  librespot_core::session] Connecting to AP "ap-gue1.spotify.com:4070"
[2024-11-21T04:58:40Z DEBUG librespot_core::connection] Connection failed: timed out
[2024-11-21T04:58:40Z DEBUG librespot_core::connection] Retry access point...
[2024-11-21T04:58:43Z DEBUG librespot_core::connection] Connection failed: timed out
[2024-11-21T04:58:43Z WARN  librespot_core::session] Try another access point...
[2024-11-21T04:58:43Z INFO  librespot_core::session] Connecting to AP "ap-gue1.spotify.com:443"
[2024-11-21T04:58:46Z DEBUG librespot_core::connection] Connection failed: timed out
[2024-11-21T04:58:46Z DEBUG librespot_core::connection] Retry access point...
[2024-11-21T04:58:49Z DEBUG librespot_core::connection] Connection failed: timed out
[2024-11-21T04:58:49Z WARN  librespot_core::session] Try another access point...
[2024-11-21T04:58:49Z INFO  librespot_core::session] Connecting to AP "ap-gue1.spotify.com:80"
[2024-11-21T04:58:52Z DEBUG librespot_core::connection] Connection failed: timed out
[2024-11-21T04:58:52Z DEBUG librespot_core::connection] Retry access point...
[2024-11-21T04:58:55Z DEBUG librespot_core::connection] Connection failed: timed out
[2024-11-21T04:58:55Z WARN  librespot_core::session] Try another access point...
[2024-11-21T04:58:55Z INFO  librespot_core::session] Connecting to AP "ap-guc3.spotify.com:4070"
[2024-11-21T04:58:59Z DEBUG librespot_core::connection] Connection failed: timed out
[2024-11-21T04:58:59Z DEBUG librespot_core::connection] Retry access point...
[2024-11-21T04:59:02Z DEBUG librespot_core::connection] Connection failed: timed out
[2024-11-21T04:59:02Z WARN  librespot_core::session] Try another access point...
[2024-11-21T04:59:02Z INFO  librespot_core::session] Connecting to AP "ap-gae2.spotify.com:443"
[2024-11-21T04:59:05Z DEBUG librespot_core::connection] Connection failed: timed out
[2024-11-21T04:59:05Z DEBUG librespot_core::connection] Retry access point...
[2024-11-21T04:59:09Z DEBUG librespot_core::connection] Connection failed: timed out
[2024-11-21T04:59:09Z WARN  librespot_core::session] Try another access point...
[2024-11-21T04:59:09Z INFO  librespot_core::session] Connecting to AP "ap-gew4.spotify.com:80"
[2024-11-21T04:59:12Z DEBUG librespot_core::connection] Connection failed: timed out
[2024-11-21T04:59:12Z DEBUG librespot_core::connection] Retry access point...
[2024-11-21T04:59:15Z DEBUG librespot_core::connection] Connection failed: timed out
[2024-11-21T04:59:15Z ERROR librespot_core::session] Tried too many access points
[2024-11-21T04:59:15Z ERROR librespot] could not initialize spirc: Deadline expired before operation could complete { timed out }

Host (what you are running librespot on):

OS: Raspbian (Bullseye)
Platform: RPi 3b+

Additional context
Tested with both raspotify and straight librespot.  Started happening with upgrade from 0.4.2 -> 0.5.0

Please try with v0.6.0 and clearing out your credential cache.

In v0.5 we added a 3-second timeout to the access point connections. That surely must be enough... Can you ping those access points?

In v0.5 we added a 3-second timeout to the access point connections. That surely must be enough... Can you ping those access points?

ping results from the device (pinged google first for sanity check)
pi@pandorapi:~ $ ping google.com
PING google.com (<IP_ADDRESS>) 56(84) bytes of data.
64 bytes from ord38s30-in-f14.1e100.net (<IP_ADDRESS>): icmp_seq=1 ttl=118 time=13.7 ms
64 bytes from ord38s30-in-f14.1e100.net (<IP_ADDRESS>): icmp_seq=2 ttl=118 time=12.0 ms
^C64 bytes from <IP_ADDRESS>: icmp_seq=3 ttl=118 time=13.0 ms

--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 7175ms
rtt min/avg/max/mdev = 11.985/12.878/13.665/0.690 ms
pi@pandorapi:~ $ ping apresolve.spotify.com
PING apresolve.spotify.com (<IP_ADDRESS>) 56(84) bytes of data.
64 bytes from <IP_ADDRESS>.bc.googleusercontent.com (<IP_ADDRESS>): icmp_seq=1 ttl=118 time=11.7 ms
64 bytes from <IP_ADDRESS>.bc.googleusercontent.com (<IP_ADDRESS>): icmp_seq=2 ttl=118 time=12.9 ms
64 bytes from <IP_ADDRESS>.bc.googleusercontent.com (<IP_ADDRESS>): icmp_seq=3 ttl=118 time=13.1 ms
^C64 bytes from <IP_ADDRESS>: icmp_seq=4 ttl=118 time=13.1 ms

--- apresolve.spotify.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 9349ms
rtt min/avg/max/mdev = 11.656/12.703/13.129/0.608 ms
pi@pandorapi:~ $ ping ap-gue1.spotify.com
PING ap-gue1.spotify.com (<IP_ADDRESS>) 56(84) bytes of data.
64 bytes from <IP_ADDRESS>.bc.googleusercontent.com (<IP_ADDRESS>): icmp_seq=1 ttl=109 time=40.9 ms
64 bytes from <IP_ADDRESS>.bc.googleusercontent.com (<IP_ADDRESS>): icmp_seq=2 ttl=109 time=38.8 ms
64 bytes from <IP_ADDRESS>.bc.googleusercontent.com (<IP_ADDRESS>): icmp_seq=3 ttl=109 time=40.3 ms
64 bytes from <IP_ADDRESS>.bc.googleusercontent.com (<IP_ADDRESS>): icmp_seq=4 ttl=109 time=40.3 ms
64 bytes from <IP_ADDRESS>.bc.googleusercontent.com (<IP_ADDRESS>): icmp_seq=5 ttl=109 time=40.3 ms
64 bytes from <IP_ADDRESS>.bc.googleusercontent.com (<IP_ADDRESS>): icmp_seq=6 ttl=109 time=40.3 ms
64 bytes from <IP_ADDRESS>.bc.googleusercontent.com (<IP_ADDRESS>): icmp_seq=7 ttl=109 time=40.3 ms
^C64 bytes from <IP_ADDRESS>: icmp_seq=8 ttl=109 time=40.1 ms

--- ap-gue1.spotify.com ping statistics ---
8 packets transmitted, 8 received, 0% packet loss, time 22462ms
rtt min/avg/max/mdev = 38.801/40.138/40.871/0.550 ms

Please try with v0.6.0 and clearing out your credential cache.

@roderickvd, tried to install latest but I have never used cargo before and am getting this error:
pi@pandorapi:~ $ sudo cargo install librespot
    Updating crates.io index
error: failed to fetch `https://github.com/rust-lang/crates.io-index`

Caused by:
  network failure seems to have happened
  if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
  https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli

Caused by:
  http parser error: stream ended at an unexpected time; class=Http (34)

Also for context:

The raspberry pi is hard-lined in (no wifi)
confirmed I can ping github.com
ran curl https://github.com/rust-lang/crates.io-index and got back the html:

pi@pandorapi:~ $ curl https://github.com/rust-lang/crates.io-index

<!DOCTYPE html>
<html
  lang="en"

  data-color-mode="auto" data-light-theme="light" data-dark-theme="dark"
  data-a11y-animated-images="system" data-a11y-link-underlines="true"

  >

  <head>
    <meta charset="utf-8">
  <link rel="dns-prefetch" href="https://github.githubassets.com">
  <link rel="dns-prefetch" href="https://avatars.githubusercontent.com">
  <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com">
  <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/">
  <link rel="preconnect" href="https://github.githubassets.com" crossorigin>
  <link rel="preconnect" href="https://avatars.githubusercontent.com">

...

Wow that's weird. Really shouldn't do that and be an out of the box experience. Was it something temporary, can you try again in some time?
Can't provide any cargo support here but this should be simple.
What if you run it without sudo?
Otherwise you can clone and build from source.

So just giving another update here before I go to bed for the night:

I uninstalled raspotify (and the corresponding<EMAIL_ADDRESS>I upgraded by pi from bullseye -> bookworm
I installed rustup (was missing this for `cargo)
Had to install all the needed packages for aws-lc-sys from HERE
I have now made it past the Updating crate.io index step and am actually installing
Currently at 100 / 408 crates installed.
Will test librespot after all this using v0.6.0 and will update here sometime tomorrow or Saturday

Great, makes sense it's a general connection issue. Sometimes extra CPU load causes network problems but that's usually on older models using WiFi / bad PSUs.

SOLVED!!!!!!!!
For anyone else that runs into this, the root cause was my NetworkManager on my pi was configured to point to <IP_ADDRESS> as a primary DNS on my network, with <IP_ADDRESS> as a backup.  Now why is this an issue, you ask? BECAUSE <IP_ADDRESS> DOES NOT EXIST ON MY NETWORK!!!!!  Things like pinging google.com would still resolve, only delayed because it would attempt the .104 address first, then fail and finally use the .1 address and work, but librespot closes its connection before the pi has a chance to attempt the fallback DNS.  Once I followed THESE DIRECTIONS to reset my DNS to <IP_ADDRESS> as primary, it all worked like magic!!!


Add is helper to ghost templates

It is used in many templates and is very usefull - http://themes.ghost.org/v0.6.4/docs/is

Hi Lafriks,
thanks for that suggestion, this should definitely be done.


Dependent libraries of pkg-config

Option 1: Compile DL Streamer from sources on host system
Step 2: Install dependencies
Option 2 Downloading binaries
In the above guide, the links for pkg-config_0.26-1_win32.zip are duplicated.
One is gettext-runtime_<IP_ADDRESS>-2_win32.zip, isn't it?

@hayashi57 , thanks for reporting the documentation issue.  You are right - the correct link is https://download.gnome.org/binaries/win32/dependencies/gettext-runtime_<IP_ADDRESS>-2_win32.zip.

fixed


Added dutch podcast to app

What does this PR do?
Add resource(s)
For resources
Description
a dutch podcast about coding
Why is this valuable (or not)?
because there where no dutch podcasts
How do we know it's really free?
because its on spotify and everyone can use spotify for free
For book lists, is it a book? For course lists, is it a course? etc.
Checklist:

[ x] Read our contributing guidelines.
[x ] Search for duplicates.
[ x] Include author(s) and platform where appropriate.
[x ] Put lists in alphabetical order, correct spacing.
x[ ] Add needed indications (PDF, access notes, under construction).
[x ] Used an informative name for this pull request.

Follow-up

Check the status of GitHub Actions and resolve any reported warnings!

Thanks, and welcome to free-programming-books!


Add MAX32670

The MAX32670 microcontroller (MCU) is an advanced system-on-chip (SoC) featuring an Arm® Cortex®-M4F.
This PR add MAX32670 and it boards by providing basic functionalities

Add MAX32670 SoC support
Add MAX32670EVKIT  support
Enable tests for peripherals drivers

Tested with:
blinky  example

button example

gpio_basic_api  test

uart_basic_api  test

Need to rebase and resolve conflicts

Need to rebase and resolve conflicts

Sure, done.
Please prioritize https://github.com/zephyrproject-rtos/zephyr/pull/73573 to eliminate possible conflictions.

Rebased onto main, current CI issues will be fixed after below PR being merged
https://github.com/zephyrproject-rtos/zephyr/pull/74281


Problems with spaces when formatting

When using the --exclude=AddMissingCurlyBraces option, the space between the closing parenthesis and next statement is removed
<?php
if (true) return;

becomes
<?php
if (true)return;

When using the --exclude=MergeParenCloseWithCurlyOpen option, an extra space is added before else
<?php
if (true) {
    // something
}
else {
    // something
}

becomes
<?php
if (true) {
    // something
}
 else {
    // something
}

Thanks, I'll check it

Thank you @reprintsev this should be already fixed in the latest release. May you please confirm?

@driade yes, the problem is solved, thanks!


Update sbt-tpolecat to 0.2.2

Updates io.github.davidgregory084:sbt-tpolecat from 0.2.1 to 0.2.2.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Files still referring to the old version number
The following files still refer to the old version number (0.2.1).
You might want to review and update them manually.
Dockerfile

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "io.github.davidgregory084", artifactId = "sbt-tpolecat" } ]

labels: sbt-plugin-update, early-semver-minor, semver-spec-patch, old-version-remains, commit-count:1

Codecov Report

Merging #277 (33be879) into develop (c29a2a1) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #277   +/-   ##
========================================
  Coverage    50.58%   50.58%
========================================
  Files            5        5
  Lines           85       85
========================================
  Hits            43       43
  Misses          42       42

Continue to review full report at Codecov.

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


DOCS-1359: Updated screenshots for CC Managed Clusters UI

Product Version(s):
Calico Cloud latest and next
Issue:
https://tigera.atlassian.net/browse/DOCS-1359
Link to docs preview:
https://deploy-preview-503--tigera.netlify.app/calico-cloud/tutorials/calico-cloud-features/tour
https://deploy-preview-503--tigera.netlify.app/calico-cloud/get-started/connect/connect-cluster
SME review:

[ ] An SME has approved this change.

DOCS review:

[ ] A member of the docs team has approved this change.

Additional information:

@breff How does this work for you?

@HugoJLFerreira Please take a look. I've limited this to the CC feature work. I'll address the CE issues we discussed separately.


Installation failed

Trying to install (have Nodemon installed manually local, not global) I get this error when trying to install cofounder using the suggested prompt:
npx @openinterface/cofounder
[nodemon] starting `node --loader esm-module-alias/loader --no-warnings server.js`
import fs, {constants as fsConstants} from 'node:fs/promises';
            ^^^^^^^^^
SyntaxError: The requested module 'node:fs/promises' does not provide an export named 'constants'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:181:5)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:281:24)
    at async loadESM (node:internal/process/esm_loader:88:5)
    at async handleMainPromise (node:internal/modules/run_main:65:12)
[nodemon] app crashed - waiting for file changes before starting...

ive been getting the same thing 10 times now

likely node version conflicts - used v22
please confirm

likely node version conflicts - used v22 please confirm

I am using v23.1.0

likely node version conflicts - used v22 please confirm

yep used
brew unlink node
brew link node@22
now it worked! thanks


Happy New Year

Codecov Report

Merging #533 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #533   +/-   ##
=======================================
  Coverage   87.07%   87.07%
=======================================
  Files          53       53
  Lines        2399     2399
=======================================
  Hits         2089     2089
  Misses        213      213
  Partials       97       97

Continue to review full report at Codecov.

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

@anovakovic01 I'm not sure, I think that we should keep all the license comments untouched, but I'd like to know what @mainflux/maintainers think.


Update desktops.md

Not finally ready for Windows 11 yet.

Thanks, will also investigate the tool!

Docs Build status updates of commit ef83146:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

sysinternals/downloads/desktops.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Should We Remove an Outdated App Folder

Currently, it seems to be that the old app folder we have is outdated since Robert re-did the app files for the AWS deployment.
I don't believe that the old app folder has any functionality that the new one doesn't except:

has an alternate way to tackle scraping duplicate tweets using the maxID method
has a tagmaker that assigned relevant tags to each tweet. However, team has decided that this function is unneeded since the Bert model already filters the tweets well and uses up too much space since it utilizes the nltk library (which could cause issues to AWS deployment)

My recommendation is that we remove this directory completely. If no decision is reached by EOD, I will add the app to an "archive" folder and recommend that future project owners remove the directory.
Let me know your thoughts!

We have decided to add the app to the archive folder. Recommendations for deleting this folder will be added to the readme for the archive folder


WebSocket 超时时间过长

帐号1输出：
[14:43:58 INF] CXIM: Message received: h
[14:44:23 INF] CXIM: Message received: h
[14:44:48 INF] CXIM: Message received: h
[14:45:13 INF] CXIM: Message received: h
[14:45:38 INF] CXIM: Message received: h
[14:46:03 INF] CXIM: Message received: h
[14:46:28 INF] CXIM: Message received: h
[14:46:53 INF] CXIM: Message received: h
[14:47:18 INF] CXIM: Message received: h
[14:47:43 INF] CXIM: Message received: h
[15:04:02 ERR] [WEBSOCKET CLIENT] Exception while connecting. Waiting 60 sec before next reconnection try. Error: 'Unable to conne
ct to the remote server'
System.Net.WebSockets.WebSocketException (0x80004005): Unable to connect to the remote server
---> System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
---> System.IO.IOException: Unable to read data from the transport connection: Connection reset by peer.
---> System.Net.Sockets.SocketException (104): Connection reset by peer
--- End of inner exception stack trace ---
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToke
n)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.GetResult(Int16 token)
at System.Net.Security.SslStream.<FillHandshakeBufferAsync>g__InternalFillHandshakeBufferAsync|182_0[TIOAdapter](TIOAdapter ada
p, ValueTask`1 task, Int32 minSize)
at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthen
ticationData, Boolean isApm)
at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Boolean async, Stream stream, SslClientAuthenticationOptions s
slOptions, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Boolean async, Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.WebSockets.WebSocketHandle.ConnectAsync(Uri uri, CancellationToken cancellationToken, ClientWebSocketOptions options)
at System.Net.WebSockets.WebSocketHandle.ConnectAsync(Uri uri, CancellationToken cancellationToken, ClientWebSocketOptions options)
at Websocket.Client.WebsocketClient.<>c__DisplayClass65_0.<<GetClientFactory>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Websocket.Client.WebsocketClient.StartClient(Uri uri, CancellationToken token, ReconnectionType type, Boolean failFast)
[15:05:03 INF] CXIM: Message received: o
[15:05:03 INF] CXIM 登录

14:53:40，同班帐号2、3、4收到消息，但帐号1无提示，且未签到。帐号2输出：
[14:53:40 INF] 接收到课程消息
[14:53:40 INF] [1637650420328.1968] 消息时间：1637650420327.6873

这些帐号均在同一台机器上运行
运行的脚本版本为 8fbf8e1433eac8fb2e24d6e80254433fef49f03d

默认是一分钟超时重连，可能偶尔抽抽风

还有问题吗

先关闭吧，谢谢


Fix variable unused warnings

This fixes two variable unused warnings that are generated at compilation time.

Coverage remained the same at 86.477% when pulling 7b91df01f3e7d42dd5659fb902454bcffc32e3ce on kevindew:unused-variables into 7eeda801218c9af3c76da8cc51478ff5d592b616 on kittoframework:master.

Merged as 7116851eb451b6a4 (containing changes mentioned in https://github.com/kittoframework/kitto/pull/55/files#r90784685)
Thanks @kevindew !