How can I show language type and line numbers in code blocks?

Hugo Version:  Hugo Static Site Generator v0.80.0/extended linux/amd64 BuildDate: unknown
Build Command: Hugo --theme=hugo-notepadium
I know very little about front end however I do love your customizable theme. I'll be glad to know how to show language types and line numbers in code blocks.
an example of hugo-even-theme:

Seconded.
AsciiDoc:
..envrc
[source,bash,linenums]
----
export CLOUDSDK_CONFIG=$(realpath .)/gcloud-config
export PROJECT_ID=my-project
----

Line numbers don't appear:

I don't know front end either, but hugo has a builtin feature to show line numbers: https://gohugo.io/content-management/syntax-highlighting/#highlighting-in-code-fences

I don't know front end either, but hugo has a builtin feature to show line numbers: https://gohugo.io/content-management/syntax-highlighting/#highlighting-in-code-fences

Hugo can't do this.
Try https://prismjs.com/plugins/show-language/ ?

I don't know front end either, but hugo has a builtin feature to show line numbers: https://gohugo.io/content-management/syntax-highlighting/#highlighting-in-code-fences

Hugo can't do this.
Try https://prismjs.com/plugins/show-language/ ?

I mean hugo can show line numbers, not language.


LoRA loading fails if only trained on specific blocks

Just FYI, think this is failing because of a LoRA with only certain blocks trained:
  File "flux-fp8-api/flux_pipeline.py", line 163, in load_lora
    self.model = lora_loading.apply_lora_to_model(self.model, lora_path, scale)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../miniconda3/envs/flux/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "flux-fp8-api/lora_loading.py", line 398, in apply_lora_to_model
    lora_weights = convert_diffusers_to_flux_transformer_checkpoint(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "flux-fp8-api/lora_loading.py", line 120, in convert_diffusers_to_flux_transformer_checkpoint
    sample_q_A = diffusers_state_dict.pop(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'transformer.transformer_blocks.0.attn.to_q.lora_A.weight'

This is for a LoRA trained on:
transformer.single_transformer_blocks.7.proj_out
transformer.single_transformer_blocks.20.proj_out

I didn't get a chance to test with any that had all layers trained since I didn't have any handy, but looking at the code super quickly, I think it's trying to reference a key that doesn't exist?
Great project btw.

Simple check might be something like this, can test later. Or move the layers to a yaml mapping if this ever goes beyond flux1 architecture.
def safe_pop(dict, key, default=None):
    return dict.pop(key, default)

sample_q_A = safe_pop(diffusers_state_dict, f"{prefix}{block_prefix}attn.to_q.lora_B.weight")

Think I got it working, but tons of debug statements in there to wrap my head around some of the key naming. It now finally uses my LoRA weights (outputs look good too from the image outputs).
Forked here, will PR if helpful once cleaned up unless you prefer to change it a different way, @aredden . Also added an inspect_lora.py to debug.
Branch with updates: https://github.com/fblissjr/flux-fp8-api/tree/lora-loading-layer-fix

lora_loading.py: https://github.com/fblissjr/flux-fp8-api/blob/lora-loading-layer-fix/lora_loading.py

handles loras without all layers and blocks trained, applies correctly based on my tests

main.py https://github.com/fblissjr/flux-fp8-api/blob/lora-loading-layer-fix/main.py

added flag for lora and lora scale

scripts/inspect_lora.py https://github.com/fblissjr/flux-fp8-api/blob/lora-loading-layer-fix/scripts/inspect_lora.py

used for debugging lora keys

@aredden - If you're up for making this a pip installable library, I've been creating a bunch of fun toy examples that were really only possible in ComfyUI (at the same quality and speed) until your project. Also adding the ability to capture text embeddings and intermediate embeddings.
Let me know if you're up for collaborating more on these types of things, or if it makes sense to keep it all separate.
Can't say enough good things about this though.

@fblissjr I'm having a lot more issues with applying lora's even after applying your changes.
I've got a version working locally that is applying the LoRA weights properly, but I need to test it further.
I'll update and make a PR when I have it fully tested and working, fingers crossed for soon.
Also I'm down to collaborate, my next steps are to get controlnet and inpainting working

@fblissjr Thanks for your branch and work on LoRA loading. It's weird, I have issues with some LoRAs and not others. I'll continue to test.

@fblissjr Thanks for your branch and work on LoRA loading. It's weird, I have issues with some LoRAs and not others. I'll continue to test.

Same. I’ve become maybe a quarter of the way familiar with your code base now after the weekend, and learning a ton just from working with it. Clean and easy to find what’s happening where.
I think it may be tough to nail down every LoRA problem given there’s no standard way to make one. Doing the conversion from diffusers was a good choice to take care of the 80%.

@fblissjr I'm having a lot more issues with applying lora's even after applying your changes.
I've got a version working locally that is applying the LoRA weights properly, but I need to test it further.
I'll update and make a PR when I have it fully tested and working, fingers crossed for soon.
Also I'm down to collaborate, my next steps are to get controlnet and inpainting working

Out of curiosity what did you use to train it?

Yeah it is tough- I know there will probably be issues with the attention block loras if not all of q/k/v are lora'd, since the official flux repo and this repo fuse the q/k/v- so it's hard to apply correctly. I could fix the issue with some time but might be a little while before I get around to it as this is just a small side project for me and I have a full time job I have to dedicate a lot of time to heh.

@aredden - If you're up for making this a pip installable library, I've been creating a bunch of fun toy examples that were really only possible in ComfyUI (at the same quality and speed) until your project. Also adding the ability to capture text embeddings and intermediate embeddings.
Let me know if you're up for collaborating more on these types of things, or if it makes sense to keep it all separate.
Can't say enough good things about this though.

Oh! Yeah that could be cool. If you wanted to make a pull with your changes I could try it out. @fblissjr - I'm definitely up for working on things.

I have lora's trained with xlabs working, although I've only tested 4-5 at this point (but they work very well), the only issue is that the lora scale is extremely sensitive
I'll work on fixing that
Here's some examples from their furry lora (lol):

I'm getting 6-7.8 it/s on a 4090 as well (depending on size)

my local codebase is a bit of a mess right now, I had to make some fairly big-ish changes to lora_loading and other components of the pipeline. Probably good to start the PR's early next week

quick and dirty approach may be to just have different pipelines for various popular lora's

Yeah it is tough- I know there will probably be issues with the attention block loras if not all of q/k/v are lora'd, since the official flux repo and this repo fuse the q/k/v- so it's hard to apply correctly. I could fix the issue with some time but might be a little while before I get around to it as this is just a small side project for me and I have a full time job I have to dedicate a lot of time to heh.

This is one of the bigger variables I've noticed, thanks for calling it out specifically. Whatever dtypes of each part you train your lora at (and if you're using a service or spaghetti code, you may not even know), it needs to match pretty closely on inference.
If I can get the time to allow more granular data type settings of each q/k/v of each block in, I'll add it to the branch and PR it.
This is probably what most people are seeing issues with.
Also: if you use an fp8 pre-quant of the flux model to fp8 vs. runtime quant of the original, it will also need to match.

I have lora's trained with xlabs working, although I've only tested 4-5 at this point (but they work very well), the only issue is that the lora scale is extremely sensitive
I'll work on fixing that
Here's some examples from their furry lora (lol):

I'm getting 6-7.8 it/s on a 4090 as well (depending on size)

from what i've briefly read (havent dug into xlabs much), they use a very different process. not that there's any sort of standard, but it's the less standard way. :)

One thing I was having trouble with were dora's. I have no idea how to use those. I tried looking at some other codebases to figure out how they handle them, but- when there's no 'dora scale' nor alpha, it makes it hard to figure out what should be happening.

There's even less of a standard on that right now. Not sure I'd start with dora. The problem with the lack of alpha is coming from diffusers, which is what ai-toolkit (which uses kohya scripts) uses.
I think some of the best work figuring this all out has come from kijai's comfy node: https://github.com/kijai/ComfyUI-FluxTrainer
And very excited to get a chance to dig into mflux for MLX: https://github.com/filipstrand/mflux

@aredden do you want me to make a PR for the lora loading blocks that are null?
also feel 100% free to grab anything from my branch and modify as you like if it helps.

I made a new server if you guys wanna sync on discord:
https://discord.gg/BYJxEUE3Rx
Could be fun to sync on cool new features and bounce ideas around for implementation details.

Yeah that would be cool! Feel free to make a pull request. @fblissjr

Glad it helped!
Now to add training lora code? Too ambitious? :)


Add better way to show that the posts are loading

Enhance the UI when loading the posts. Currently it just prints "Please wait.." on the screen.

@kunal-kushwaha Can you assign this issue to me?


Extented PublicKeyAuth class

Added ExtractEd25519SeedFromEd25519SecretKey
Added ExtractEd25519PublicKeyFromEd25519SecretKey
Added Unit tests

Thanks!

Can you release a new nuget? :)

Sorry for the delay:
https://www.nuget.org/packages/libsodium-net/0.9.0-beta4


pg_graphql  does not generate schema for array typed properties on mutation.

Describe the bug
Whenever I use the codegen to create the types from the queries it does not generate the properties with [Int] for the update type:
For example, the type "Profile" is correctly generated as:
type profiles {
    birthday: Date
    can_be_roommate: Boolean
    created_at: Datetime
    description: String
    display_name: String!
    employment: Int
    first_name: String!
    id: BigInt!
    last_name: String!
    search_as: Int
    tenant_attributes: [Int]
    user_id: UUID!
}

But its mutation type is missing the tenant_attributes
input profilesUpdateInput {
    birthday: Date
    can_be_roommate: Boolean
    created_at: Datetime
    description: String
    display_name: String
    employment: Int
    first_name: String
    last_name: String
    search_as: Int
    user_id: UUID
}

Error:
× GraphQL Document Validation failed with 1 errors;
Error 0: GraphQLDocumentError: Field "tenant_attributes" is not defined by type "profilesUpdateInput".
Image
To Reproduce
Steps to reproduce the behavior:

Create a table with an array property. Eg. Int[]
Add graphql plugin to table/db
Get the schema via. the graphql endpoint
Notice the update type

Expected behavior
It should also include the array properties in the mutation types
Versions:

PostgreSQL: Supabase
pg_graphql: Whatever is on supabase

Array types on mutations are not currently supported but it's something we're actively working towards. I'd expect it to land on the hosted platform in the next couple months

Probably good idea to add this fact to the readme :)

Is there another way to make an API call to update an array field on a table? Could we work around by using the REST endpoint? @olirice This is blocking me from moving forward.

Yes, PostgREST does support updating an array column. You can achieve that with supabase-js if you're on the supabase platform or postgrest-js if not

@olirice thank you for the suggestion, I'm looking at the documentation now.

@olirice Has the situation changed?


Expose heapster internal metrics to sinks

The internal metrics that were added recently (#874) should be exposed to the sinks as well, to facilitate monitoring heapster as well.
cc @huangyuqi

There is no #874?

Ah you mean #847. So the metrics added in #847 & enhanced in #861 could be useful to external sinks as custom metrics.

Yes, I agree. Do we need add the runtime profiling data to sinks at the same time?

#861 instrumented the sink export data so you can track how long exploring to each individual sink took.

thanks so much, @jimmidyson ,  i will study this and take the exporting today.

Well not really. I don't want to create another path for metrics to go within Heapster. So this should be rather handled by defining the Prometheus internal metrics as Custom Metrics and use the upcoming mechanism to export custom metrics from Kubelet. The same applies to storing internal metrics of other Kubernetes components, like scheduler.

@mwielgus :+1:

We don't want to do this for now.


Proposal to drop release blogposts

What this PR does / why we need it:
Since the blogposts were pretty much 1:1 to our releases https://github.com/kudobuilder/kudo/releases I think they don't add much value and I would rather link directly to the release page.
This is just a proposal, feel free to reject if you see a reason to keep doing the blogposts.

I'm in favour of dropping blog posts for every release, but I think we should have a step in the release process in which we consider writing something that highlights a new feature if one has landed.  A summary of the relevant KEP(s) and then pointers to the new bits of documentation is all it'd need.

@yankcrime is there something you're missing from the 0.9.0 highlights? Some improvements to that? I actually tried to make them as descriptive as possible and we even had docs in place prior to release this time which was a big improvement I think :)
Otherwise I considered that part of this step 1. Update the GH release with Release highlights and a changelog. - maybe we could specify better there what is actually expected in the highlights.

@alenkacz Actually the release notes were really good for 0.9.0 - I'm just thinking about keeping content on the website fresh.  It might be easy for folks new to the project to miss release notes, whereas if they stumble on the website and click through to the blog section they'd get a feel for the latest developments.

I would like to keep the release blog posts and instead challenge us to put more effort into writing them so they're not just copies of the release notes. Blogs are the go to places to learn about new functionality in open source projects for many people (see Kubernetes, Apache Flink, Prometheus) At least that's where I go first. I think release notes should generally be brief so they're easy to scan, and should link to other places like the docs or blog post for more details. The blog post format allows us to explain a feature in detail and embed example commands or mini tutorials so folks can get started right away.

@guenter I then wonder if we should do rather feature related blogpost not release? Also if we take the last release as an example, what would you like to see in the blogpost? We have the highlights which are ~ the highlights in kubernetes release. Then we have docs going in depth of all the features. I just wonder what is the missing content to get on the same page of this... 🤔

I like the last release notes, I think the blog post could be essentially a slightly more detailed version that includes complete examples, and then we can shrink the release notes to one or two sentence descriptions of each feature.
Ideally we do feature blog posts too that are tutorial or howto style and explain how to solve common problems with KUDO. For example "How to securely generate and distribute TLS certificates with KUDO" (pipe tasks + secrets) or "Cleanly uninstall Operators with KUDO" (cleanup plans).

@guenter ah I see, the question is whether that is still responsibility of the release manager and it should really be part of this checklist, that I want to reflect our release process so people really follow it.
Writing such a robust tutorials almost feel like that should be part of a regular feature work...

Yeah maybe the feature authors could be the "writers" and provide a draft for their section of the release blog, or at least the tutorial steps. The release manager then plays the role of "editor" and compiles the different sections into the post and makes sure it all fits together. Just an idea.

Looks like we don't have an agreement on dropping this line -> closing


Add support for converting a GPTQ model to 2:4 structured sparse marlin format for 4-bit and 8-bit

This diffs adds the ability to convert a GPTQ model to the 2:4 structured sparse marlin format. This diff is intended to serve as reference for the MLE team to integrate their code (and not be landed on autogptq)

@AniZpZ here's current hacked up script we have

@AniZpZ here's current hacked up script we have
Note: accuracy will not be great for post-training sparsity 2:4.
We have been investing in making sparse foundational models that have sparsity in them
see here for the research we are expanding up

Much appreciated !  make your research open source  ?
I don't expect a good accuracy for post-training sparsity 2:4. Have you guys looked into other unstructured pruning methods or dynamic pruning methods?

@AniZpZ here's current hacked up script we have
Note: accuracy will not be great for post-training sparsity 2:4.
We have been investing in making sparse foundational models that have sparsity in them
see here for the research we are expanding up

Much appreciated ! Is there a plan to make your research open source ? I don't expect a good accuracy for post-training sparsity 2:4. Have you guys looked into other unstructured pruning methods or dynamic pruning methods?

Yes: https://huggingface.co/collections/neuralmagic/sparse-foundational-llama-2-models-65f48cec6396309f02e74d21

2:4 models coming soon

We are currently focused on pruning Llama-3 on our cluster
We have done extensive research into pruning with our friends at IST.
@AniZpZ are you on discord?

@AniZpZ here's current hacked up script we have
Note: accuracy will not be great for post-training sparsity 2:4.
We have been investing in making sparse foundational models that have sparsity in them
see here for the research we are expanding up

Much appreciated ! Is there a plan to make your research open source ? I don't expect a good accuracy for post-training sparsity 2:4. Have you guys looked into other unstructured pruning methods or dynamic pruning methods?

Yes: https://huggingface.co/collections/neuralmagic/sparse-foundational-llama-2-models-65f48cec6396309f02e74d21

2:4 models coming soon

We are currently focused on pruning Llama-3 on our cluster
We have done extensive research into pruning with our friends at IST.
@AniZpZ are you on discord?

Yes, how can I reach you guys on discord?

@AniZpZ here's current hacked up script we have
Note: accuracy will not be great for post-training sparsity 2:4.
We have been investing in making sparse foundational models that have sparsity in them
see here for the research we are expanding up

Much appreciated ! Is there a plan to make your research open source ? I don't expect a good accuracy for post-training sparsity 2:4. Have you guys looked into other unstructured pruning methods or dynamic pruning methods?

Yes: https://huggingface.co/collections/neuralmagic/sparse-foundational-llama-2-models-65f48cec6396309f02e74d21

2:4 models coming soon

We are currently focused on pruning Llama-3 on our cluster
We have done extensive research into pruning with our friends at IST.
@AniZpZ are you on discord?

Yes, how can I reach you guys on discord?

Im on the vllm-server (https://discord.gg/3eCXvqVu) - robertgshaw-neural-magic
Send me a note


SSH Private Key logged

This is with CF 234.  Here is an example log message:
{"timestamp":"1467146807.864567757","source":"bbs","message":"bbs.desired-lrp-handler.update-desired-lrp.update-desired-lrp.complete","log_level":1,"data":{"guid":"0dad3416-9769-4c4c-a0b6-98d379df33bf-ddb6e26f-3c55-40fe-b2a5-714ac9b3c466","process-guid":"0dad3416-9769-4c4c-a0b6-98d379df33bf-ddb6e26f-3c55-40fe-b2a5-714ac9b3c466","session":"6.49043.1","update":{"instances":1,"routes":{"cf-router":[{"hostnames":["--deleted--","--deleted--","--deleted--"],"port":8080}],"diego-ssh":{"container_port":2222,"host_fingerprint":"--deleted--","private_key":"-----BEGIN RSA PRIVATE KEY-----\nSOME PRIVATE KEY\n-----END RSA PRIVATE KEY-----\n"},"tcp-router":[]},"annotation":"1467146790.0"}}}

Thanks, @youngm! Looks like we fixed this in https://github.com/cloudfoundry/bbs/commit/b1499ed978a7535df00cac3d20a39ef3e23b90c7, which is in Diego release v0.1468.0. I would recommend using v0.1471.0 or later instead of that release, though, as v0.1468.0 contains a serious vulnerability.
Also, seems like we no longer have the correct Gitbot integrations established after moving the Diego repos into the cloudfoundry org. We'll make sure to fix that ASAP.
Thanks again,
Eric

@ematpl Oops.  That was lazy of me. :)  Sorry about that.
You're awesome!

Thanks for being diligent about credentials in logs, Mike! We always appreciate it.
Best,
Eric


Angular 16 support

Hi there,
I see that this repository is using deprecated versions of products such as Angular and RxJs.
Are there plans to upgrade to support Angular 16 and RxJS 7 etc.?
If you need any more information or support, let me know.
Many thanks,
Matthew Quinn

Our team would love to know this too. Sadly we are avoiding adoption of this awesome library because it appears to have lost momentum, with very few changes in 3 and almost 4 years. I guess the code is stable, which is great, but without ongoing fixes and library updates it does appear to be a risk we aren't willing to take right now.
@MrWolfZ please let us know if you plan on continuing support for ngrx-forms or would like help in doing so?

Hi there. The library is indeed in what I would call the "minimal maintenance mode" where I only do the most important fixes (for example, it is still using the old style of dispatching actions via ngrx). Unfortunately I've been out of frontend and particularly Angular development for quite some time now, which makes it tricky to keep up to date with all the latest and greatest changes in the Angular world.
The library itself is designed to have minimal dependencies (it doesn't even depend on rxjs for example, that is just used in the example app). The only true dependencies are @angular/forms and @ngrx/store and so far those have been mostly stable.
I fully understand the reluctance to adopt the library in this state. The ideas of this library also certainly go against what the Angular teams wants devs to do with forms. So maybe the wiser choice is to stay/move away from it. However, I am certainly welcoming any help in keeping the dependencies and the examples up to date, so if you are willing to provide PRs I'll gladly release a new version. Alternatively you could also consider to fork the repo and release a continuously updated version that doesn't depend on me. I'll gladly link to it in the README.

Works fine with Angular 16. Some minor changes needed to support the new material components, but otherwise it's still fine.

Hi, I'm particularly interested if SignalStore will be supported?
Thanks for your feedback.


Check Rust via clippy in CI to improve Rust code

Hello!
I find many warnings in rust when checking rust code with clippy:
$ cargo clippy
...
warning: `ulist` (lib) generated 24 warnings
    Finished dev [unoptimized + debuginfo] target(s) in 2.67s

most of them could improve the code quality, such as the warning below:
warning: you are using an explicit closure for copying elements
  --> src/numerical.rs:37:36
   |
37 |           let hset: HashSet<usize> = self
   |  ____________________________________^
38 | |             .na_indexes()
39 | |             .iter()
40 | |             .chain(other.na_indexes().iter())
41 | |             .map(|x| x.clone())
   | |_______________________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone
help: consider calling the dedicated `copied` method
   |
37 ~         let hset: HashSet<usize> = self
38 +             .na_indexes()
39 +             .iter()
40 +             .chain(other.na_indexes().iter()).copied()
   |

I think it may be a good idea to check rust code in CI ^_^

@yingmanwumen This is super helpful. We are using flake8 to check the Python code quality in CI, and we definitely need a similar tool to ensure Rust code quality.
I looked at the clippy repo, it has 7.6k starts, 1k forks and 190 tags, which is amazing. The downside may be there are 1.3k issues to be solved, and 220 of which are false-positive bugs. We may encounter with some difficulties if using this tool.
Anyway, let's try it and see if it helps.


Can't import egg python modules

Importing python modules packaged as .egg doesn't work via the salt-api interface, however it works over salt and salt-call.
this is the test module in /srv/salt/_modules/bla.py ipadress is an egg module in /usr/local/lib/python2.7/dist-packages/ipaddress-1.0.12-py2.7.egg
import salt, ipaddress
def hello():
return 'Bla'
salt-call bla.hello
local:
Bla
however curl -sSk http://localhost:8000  -b cookies.txt -H 'Accept: application/json' -d client='local' -d tgt='directory.novalocal' -d fun=bla.hello returns {"return": [{"directory.novalocal": "'bla' virtual returned False"}]}

salt-api relies on Salt to sync custom modules down to minions. It does not contain code that governs this behavior at all. If you're seeing different behavior between the two there must be a subtle difference in the target or the function call between the two tests.
You must first run saltutil.sync_modules in order for the new module to show up on a minion. After that check the minion log file to see if the module is throwing a traceback when it tries to load the custom module. Setting the log level to 'debug' will be helpful.
If you find a problem with .egg files please file a new issue against the main Salt repository as this repo was retired when salt-api was merged into mainline Salt.


[ISSUE] Limit is ignored in jobs.list_runs

Description
When using jobs.list_runs in combination with a limit, the limit is ignored.
From peeking into the code it seems the limit and offset arguments are only used for the "internal" page size for listing runs.
But irrespective of the value of limit, the functions seems to yield all available runs.
In my case, I only want to retrieve the latest run for a specific job, so I use
latest_run = list(client.jobs.list_runs(job_id=1234, limit=1))[0]

What this does though, is doing - in this case - 720 requests, each with a limit of 1 to finally produce 720 runs.
Instead of just the one.
It seems there is no way to really limit the result size at this moment?
From a quick peek into other apis, this pattern seems to exist elsewhere too (e.g. in the PolicyFamiliesAPI).
Reproduction
As above:

runs = list(client.jobs.list_runs(job_id=..., limit=1))
assert len(runs) <= 1

Expected behavior
The limit should be respected and/or the documentation adjusted.
Debug Logs
The SDK logs helpful debugging information when debug logging is enabled. Set the log level to debug by adding logging.basicConfig(level=logging.DEBUG) to your program, and include the logs here.
Other Information

MacOs
databricks-sdk: 0.2.1

Additional context
Add any other context about the problem here.

This reflects the behavior of the REST API. Listing happens lazily, so if you want to limit the number of job runs you've listed, you should combine the returned iterator with something that only returns the number of runs you desire, e.g.
import itertools
itertools.islice(w.jobs.list_runs(job_id=...), 5)

Perhaps limit is a bad name; this parameter should really be called "page_size".

Hi,
yes, I've found a workaround using a plain next, since I only need the first.
I know the name comes from the rest api, but as you noticed, it is at least surprising behaviour for a code snippet like list_runs(limit=1).

I will give this feedback to our Jobs team; in the meantime, I will close this ticket out, as I believe the issue is resolved.


Use text_unidecode rather than unidecode

To support https://github.com/alephdata/fingerprints/issues/4 and
avoid using a GPL-licensed library in this MIT-licensed library
Update the tests accordingly to account for minor transliteration differences
Correct handling of upper-case "schwa"

Signed-off-by: Philippe Ombredanne<EMAIL_ADDRESS>

Thanks for the PR! I'd like to focus on ICU as the primary transliteration library in this, because it's quality is much better. That's also what the tests are against. Could you possibly submit the text_unidecode fix without the changes in test assertions?

Could you possibly submit the text_unidecode fix without the changes in test assertions?

I wished, but this behaves rather differently. I get your point though, it does not make sense to change expetations.


fix import of OpenEphysBinaryRecordingInterface

Motivation
Fix import of OpenEphysBinaryRecordingInterface so that it is with the other data interfaces.
Checklist

[ ] Have you thoroughly read our Developer Guide?
[ ] Have you ensured the PR description clearly describes the problem and solutions?
[ ] Have you checked to ensure that there aren't other open or previously closed Pull Requests for the same change?
[ ] If this PR fixes an issue, is the first line of the PR description fix #XXX where XXX is the issue number?
[ ] Did you update the CHANGLOG.md file on your branch to describe your changes?

I don't think this requires a changelog entry


add request to ActionNotFound exception

This helps a lot when looking through the logs.

Description

Questions
Answers

Why?
Please describe why your change is necessary.

BC breaks?
yes/no

Tests exists & pass?
yes/no

Related tickets?
If this PR fixes an existing issue ticket, please add there url here.

How to test?
Please describe how to best verify that this PR is correct.

Requirements met?
Does your PR fulfil our contribution requirements?

Hello,
thank you for creating this pull request.
I have opened an issue on our Issue Tracker for you. See the issue link: https://issues.shopware.com/issues/SW-19406.
Please use this issue to track the state of your pull request.

Hey @kekster,
thank you very much for your contribution!
We've merged your changes with 92a41fb931b9247174ddc902fa76520c63ca99ab. 💙


sameer4112003's file

1: created a branch
2:created a file
3:made a commit
4: opened a pull request

Click on the Edit button located to the right of your pull request's title
Below the title's comment box, in the "base:" drop-down menu, make sure the “main” branch is selected
A pop-up window will appear asking if you want to change the "base". Click the green Change base button
i'm unable understand and execute the above mentioned steps!!


Create make targets for testing Federated Access

This PR creates make targets to test federated account access.
You need to define the following environment variables:
export OSD_STAGING_1_AWS_ACCOUNT_ID=<AWS Account ID>
export OSD_STAGING_2_AWS_ACCOUNT_ID=<AWS Account ID>
You'll need to make sure your AWS IAM user in OSD staging 2 has the following permissionion:
{
    "Effect": "Allow",
    "Action": "sts:AssumeRole",
    "Resource": "arn:aws:iam::*:role/*"
}

Then:
Running make test-awsfederatedaccountaccess will test creating and deleting the following:

Create AWS Account
Create AWS Federated Role
Create AWS Federated Account Access with IAM User ARN from OSD staging 2
Test Assume role using your IAM user in OSD staging 2
Delete AWS Federated Account Access
Delete AWS Federated Role
Delete AWS Account and associated secrets

/retest


[BUG] filetype doesn't get restored after change of directory

After starting nvim and creating some tabs containing some buffers with different language files (all the same files will work as well), I use the command cd to walk into a specific project folder. After that, I issue the command SaveSession. This leads to creating a vim file within the default folder ... / nvim-data / sessions / ... . This file contains all the settings to restore the session.
Now, after closing vim, restarting it and cd-ing into the folder from the last session, all the buffers get restored into the appropriate tabs. BUT: the filetype is lost. issuing the command :set filetype results in an empty string.
The expected behavior would be to see the filetypes restored for all the buffers / tabs. Not to be obliged to manually re-set all the filetypes.
Baseline

OS. Windows 10:
Neovim version v0.9.0

what could this be? Is this not the expected behavior? is it maybe a configuration issue?

Hi, custom filetypes are not something that gets saved in sessions in Neovim. Which is why I mentioned on the last issue that you'd have to use a hook to set a particular filetype, or even configure Neovim to always associate a particular file extension to a particular filetype of your choice.
You are setting the filetype manually, right?

It is not about "custom" filetypes, here, but just the "normal", "standard" ones like python or vim which get set automatically when loading respective files into vim or nvim. The problem here seems to be that after retrieving sessions with auto-session, the filetype option stays empty. Even for "standard" filetypes.
yes, I have to set any filetype manually (or using :tabdo set filetype=...) after retrieving / restoring any session by triggering the plugin using cd <project-folder>.
I can't imagine this being the intended behavior. As I am just starting with nvim there are not many plugins which might be able to influence filetype detection.

Right. You mention there are not many plugins that would influence filetype detection, auto-session is also not one of them. It just uses the underlying session creation and loading capabilities from Neovim.
Something you can try is:

Manually opening a file nvim file.py
Manually Saving a session :mksess
Manually loading the session file :source Session.vim

Do you still see the issue happening?

I did this:

start nvim (via icon on desktop)
open Python file from anywhere in the filesystem e.g. using built-in netrw
create session file in current folder via :mksess
close nvim
re-open nvim by desktop icon (same current folder)
restore session via :source Session.vim

and the filetype is restored, so I see the Python coloring. So, there does not seem to be an issue within the built-in session management.

one thing is odd, though: when I create a session file for the default nvim binary folder (in my case it is at c:\PROGS\Neovim__v0_9_0_dev\bin) with the auto-session sessions folder:
C++%PROGS%Neovim__v0_9_0_dev%bin.vim
then, when I start nvim, the session is loaded and the filetype from this session is loaded, correctly. But as soon as I use the cd command from the command line, the appropriate filetype does not get applied for files / buffers loaded into nvim.

Have you set cwd_change_handling correctly in your config? What does your setup call look like?

yes, I have and had (as mentioned in #205). But this should not influence the missing colors, anyway, I would think.
It is odd that restoration of colors works in the first place (when starting nvim and auto-loading the session respective to the current folder) but fails on all subsequent folder changes.

    post_restore_cmds = {
      function()
        vim.api.nvim_exec2("edit", {})
      end,
    },

i was running into this issue, and it appears to have been fixed by adding localsettings to my sessionoptions

@nnako it's probably worth trying out @apaleslimghost's findings here if you haven't already

I just came across this and can confirm that this solves the issue:
vim.opt.sessionoptions:append({ "localoptions" })
Thanks @apaleslimghost

Seems like we should add a check for that and pop up a warning if localoptions isn't present. I'll look into that


Having issues adding multiple JSON

Clicking the plus for creating a new sample or the trash icon for deleting a sample doesn't work.

Same issue.

duplicate of #1665


[Task] - tests - hardware - CoreIMU/LSM6DSOX

Description
Following #1128, we would like to separate:

component tests, focused on LSM6DSOX, to make sure it works properly w/ I2C
functional tests, focused on CoreIMU, to make sure that, the components behave as expected, w/ inputs and outputs

Related epic/story/task:

#1128

Subtasks

[x] separate LSM6DOSX from CoreIMU
[x] create two directories (to have two .bin files at the end)
[x] find a way to test LSM6DSOX is working properly after init()
[x] remove LSM6DSOX tests from CoreIMU to focus on functional testing there

closed by 7816e6d


Add Anania to collection

Thanks! Looks great.
Do you have a Twitter account so I can give you a shoutout?


docs(README): update Flow App Quick Start url

Flow App Quick Start URL returns a 404 page:

Updated to the up-to-date correct URL: https://developers.flow.com/tools/fcl-js/tutorials/flow-app-quickstart

Thanks for fixing this @bymi15 !


SendCollection vs. SendPrimitiveCollection issue with generated Go code

See https://github.com/octokit/source-generator/issues/19.
When compiling generated Go code using GitHub's OpenAPI spec, there's a deterministic error with the meta versions endpoint: versions/versions_request_builder.go:46:152: undefined: i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.CreateDateOnlyFromDiscriminatorValue.
@baywet has peeked at this a little bit and thinks it might be due to a call to SendCollection when Kiota should generate a call to SendPrimitiveCollection.
Please let me know if I can provide any more information!

Closing this as its a duplication of https://github.com/microsoft/kiota/issues/3679


Expose Serializer class outside (PublicApi)

Is it possible to expose Serializer outside?
https://github.com/microsoft/ApplicationInsights-JS/blob/05a1f410589514a35e70d425b037888bb3d17d9f/channels/applicationinsights-channel-js/src/Serializer.ts#L5
Justification
In ApplicationInsights-dotnet nuget package they have exposed there Serializer class outside (JsonSerializer.cs). So making public for UI gives consistency.
Use Case
In will be very helpful to get raw json structure that is passed by app to app insights when we implemented external service to analyze the data that is being send to app insights or even plainly store the raw data for archiving purpose or other debugging purpose

It's not quite as simple as just exposing the Serializer as this would change the options we have to both optimize, refactor and reduce the size of the internal implementations.
Also there are changes coming that may affect the way events will need to be serialized and handled along with the way the Channel handles failures and resiliency, which would not be reflected in the Serializer alone. For example, currently, events are serializer to Json and kept in this form when sent out, this doesn't support any form of retry capability where we could easily tag a follow up sent event as a retried event. While this is also not currently supported on the ingestion endpoint it's internal protocol based things like this that restrict the options.
So while I understand the request and I think I have an idea of the rationale behind it, at this point in time, I'm going to have to say this is a won't fix. I would expect a realistic time frame on when we could consider this would be measured in years not months (so say towards the end of 2022 before I think we might be in a situation where this could become a consideration).


Add list command for tasks

Resolves #19

Superseded by https://github.com/CS2103-AY1819S1-T09-1/main/pull/24


file: return error on File.Contents() if reader fails

For go-git v3: https://github.com/src-d/go-git/pull/149

Current coverage is 75.02% (diff: 0.00%)

Merging #150 into master will decrease coverage by 0.85%

@@             master       #150   diff @@
==========================================
  Files            77         77
  Lines          5004       5005     +1
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
- Hits           3797       3755    -42
- Misses          772        822    +50
+ Partials        435        428     -7

Powered by Codecov. Last update 634b6f0...9379079


HAProxy high availability

This should be implemented using something like keepalived.
Reference:
http://behindtheracks.com/2014/04/redundant-load-balancers-haproxy-and-keepalived/

This is currently implemented, however it's pending testing on a suitable environment. It works for the most part in vagrant, however when restarting a server , keepalived usually ends up failing. Restarting the keepalived service does, however, fix the issue.
This is probably only a vagrant issue, due to the way networking works, however it does need further investigation.


Feature/add time entry for other users

As we have talked about. UserId as a more explicit paramenter

Updated


Public API SSL certificate has expired

Whoops, forgot to refresh the certificate on both of my servers. Should definitely be working now.


Nokogiri runs differently when run from different directories.

Hello,
Nokogiri is installed via gem install. Mac OS X High Sierra.
The simple XSLT-application script runs differently when executed from two different directories.
Specifically, from a fresh directory, the differences are:

It runs much slower (seconds instead of <0.1s), and
The output XML is not formatted. ((:indent => 2) in to_xml` that was originally parameterless "fixed" it, but only partially; extra newlines are being inserted with it).

While localizing the issue, we realized that copying the directory with the project over into another project's directory results in the expected behavior.
We've tried fresh terminals, and the result is the same. So it's not the environment, but the location.
I, as a non-expert in Ruby, have two theories:

Nokogiri looks for certain files (dotfiles?) by going upwards from the current directory, and those files contain some configuration.
It's not Nokogiri but Ruby that behaves in this directory-dependent way.
The very installation of Nokogiri is different per directory (perhaps different versions, or a custom build?)

Assuming I'm an okay engineer but no Ruby and/or Nokogiri expert, if there is a one-sentence answer / hint re. what to look into, I would appreciate it greatly.
Thanks,
Dima

Could you provide source?

It's tricky as the XML itself is large, and I only observed it via the
screenshare. But no newlines in the output is a rather distinct feature, no?
On Sat, Oct 21, 2017 at 2:00 AM Maxim<EMAIL_ADDRESS>wrote:

Could you provide source?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/sparklemotion/nokogiri/issues/1682#issuecomment-338386962,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACDzV_gmU1VkCN5BcMBaWhgkfnBT3m29ks5sudzUgaJpZM4P_7gk
.

--
Thanks,
Dima
http://dimakorolev.com/ | http://www.linkedin.com/in/dimakorolev |
<EMAIL_ADDRESS>

Ok, at least u can try to use to_xhtml(indent: 2)

@dkorolev Thank you for asking this question.
When you started to create this issue, there was an issue template that asked questions. You deleted this template, and so we do not have enough information to help you. Specifically, we need to know the output from nokogiri -v for both of the use cases you're describing.
Aside from that, you really would need to provide more information in order for anyone to be able to help explain what you're seeing.

Hi @flavorjones,
My bad, it was over a screenshare, and I didn't ask right away. Here they are.
Where it's OK:
# Nokogiri (<IP_ADDRESS>)

ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]

Where it's not OK:
# Nokogiri (1.8.1)

jruby <IP_ADDRESS> (2.3.1) 2017-01-11 68056ae Java HotSpot(TM) 64-Bit Server VM 25.45-b02 on 1.8.0_45-b14 +jit [darwin-x86_64]

well, this explains it. One is using the MRI engine, the other using the JRuby engine; so in addition to startup time, which is longer for the JVM, there's also the difference between the XML engines being used (libxml2 for MRI, xerces/nekohtml for JRuby).
I think you'll find that Nokogiri behaves consistently if you're running the same version on the same engine.

Thank you! I'll close the issue then, to not have it hanging in your repo.


Scanty Documentation

The documentation doesn't say much about how it works, whether it bootstraps its own frontend or is frontend agnostic. It would make sense to have a mental picture of the package before installing and what better way to archive that if not the Docs?

A very good point, and it's one of the reasons I have really advertised it too much just yet. I'll make updating the documentation one of my tasks for tomorrow 😄

Good afternoon @christopherokonkwo, hope you're doing well.
I've updated the README with a comment regarding the templates/publishables. I have also included some screenshots below after I pushed a couple of frontend spacing fixes I noticed whilst preparing them.

Everything can be overwritten, and I'd probably advise people do so in order to tie things into their own templates better, but if you'd like to see any changes or features - feel free to post an issue for them 😄

Your front end is really cool. You did a good job.✌

Thank you, I appreciate it 😊


Create wrapper for Jikan API v4 beta

2 new classes would be created, Jikan4 and AioJikan4 that could be imported like from jikanpy import Jikan4
Endpoint: https://api.jikan.moe/v4
Docs: https://docs.api.jikan.moe/
Once Jikan API v3 gets deprecated, Jikan4 will become the main class and Jikan will become Jikan3 as seen below.
Jikan => Jikan3
AioJikan => AioJikan3
Jikan4 => Jikan
AioJikan4 => AioJikan

Sounds good
Not sure if there are OpenAPI consumers in python/if you wanted to use that - v4 would provide a schema file which could be converted into structs/request interfaces. Not sure how that affects documentation etc.
I can look into that/can discuss on discord if that's a possibility

In Nekomata's message he said not to use the tools yet since v4 is in beta, but we could look into it. It looks like the generator at https://github.com/OpenAPITools/openapi-generator can be combined with ReDoc or documentation generators.

Yo. I guess it's time to revisit this based on this document that's now part of Jikan's responses.
Quote from linked doc:

Timeline
1⃣ 1st March 2022 - Deprecation
The v3 API will enter into a deprecation state from 1st March 2022.
👉 You will be receiving a warning through headers and in the JSON body as mentioned above.
2⃣ 1st May 2022 - Maintenance Ends
The v3 API will no longer receive any maintenance from 1st May 2022.
👉 This includes parser fixes.
3⃣ 1st September 2022 - Brownout
The v3 API will enter into a brownout state from 1st September 2022.
👉 v3 Endpoints will return HTTP 410 GONE for the first 15 minutes of every other hour to alert anyone still using v3.
4⃣ 1st October 2022 - Sunsetting
The v3 API will be discontinued from 1st October 2022.
👉 v3 Endpoints will no longer be available on the public Jikan REST API.

To be perfectly honest, I'm not sure when I'll be able to get to this as I've gotten a job and am now more busy. It'd be great if you or someone else could take this up and I can review the changes. I think we probably just need to use the OpenAPI wrapper generator and update the docs.

I'm sorry, I have neither the time nor enough interest to maintain this library. 😓

I am interested in v4 support so I might produce some results. No idea how much v4 interface is different from v3 though. Did either of you did some research in this area?

Its pretty different -- you may be able to leverage the openapi file which describes the schema though:
see docs
https://docs.api.jikan.moe/
dont know how good this code is, or if we want to use attrs and httpx, but its at least a starting point and something to reference. it could be great, idk:
pip install pipx
pipx install openapi-python-client --include-deps
pipx run openapi-python-client generate --url 'https://raw.githubusercontent.com/jikan-me/jikan-rest/master/storage/api-docs/api-docs.json'

generates generates a bunch of models and an API structure:

would probably move setup.py/v3 to a separate subdir, the generated code uses poetry so that would be in v4
could create a buildscript to create the wheels so they could be pushed to pypi separately
will take a shot at it this weekend if no one else is already doing something

Been working on a basic restructure, see #99

look forward to this

To just copy paste what was said in #wrapper-devs, regarding #99
There's incompatibility in types with the schema and the generator is super strict so it doesn't really work.
Edit: actually, part of it did get fixed here, but all the other requests still need to be checked
If the schema did match perfectly would probably have been easier but I dont think either of us are as free to create an entire wrapper from scratch right now

I try to maintain the OpenAPI Schema of Jikan. I use it in a project to generate a python client and experienced the same problem with the generated code. I do not know at the moment how could we validate the schema automatically in Jikan but if you have any proposal, feel free to reach out.

Looks like it has been discontinued now.
jikanpy.exceptions.APIException: HTTP 503 - status=503, type=BadResponseException, message=v3 has been discontinued. For more information visit https://bit.ly/jikan-v3-deprecation, upgrade=Please upgrade to v4: https://docs.api.jikan.moe/ for id=48675, endpoint=anime

Fixed in #101


Given a parent class with two children, running collection.group aggregate function operates against both children

Given a parent class with two children, running collection.group aggregate function operates against both children.
In essence, it does not respect _type, even when given as a :cond argument
I created a sample app to demonstrate the problem, see the failing spec:
https://github.com/justinwiley/mongoid_inheritance_group_issue/blob/master/spec/models/delivery_stat_spec.rb

The problem here is that you are going directly to the collection and not Mongoid's criteria so it doesn't have the means to insert the _type criterion in there for only the specific subclass. I could change the collection wrapper to handle it, but it's all getting removed in 3.0 right now so not going to happen.
However, if you use Mongoid's criteria, which you can for the functionality you want, you get the correct results:
DeliveryStat.only(:daymonth, :response_count).aggregate


Navs & pagination bug in 4.0 version

This is a (multiple allowed):

[x] bug

[ ] enhancement

[ ] feature-discussion (RFC)

Swiper Version: EXACT RELEASE VERSION OR COMMIT HASH, HERE.

I'm using your plugin in every project, but today, after installing new 4.0 version, I was disapointed, because navs and pagination were broken.  Whole hour I was looking for problem and then realesed that it is a new version of plugin. Old version is OK. Please, fix this!

Before you open an issue, please check if a similar issue already exists or has been closed before.


Enums and default values

Hi! First of all - great job, the closest to an ideal spec, that I've found.
Now to the question itself :)

Do you plan on parsing enum values for the properties, that have them in the description, e.g. setStickerSetThumbnail.format that has a choice of static, animated and video values?
Do you plan on parsing the defaults left, e.g. InaccessibleMessage.date which is always 0?

Would greatly appreciate if you do and be happy to help if I can!

Hi @Cub11k! Thanks for your interest in this repository.
Unfortunately, I don't have time to support and make these kinds of changes to the spec package. I'm busy for at least the next few months. But the idea is great and I will do that in the future.
Meanwhile, if you need only specifications in JSON format (like this one spec.json), you can make your exporter with additional logic in it.
If you have time to help, you can prepare a few Regex which will used to retrieve the default value, enums, and so on.


Fix pre-commit linting issues

This patch fixes pre-commit linting issues.

Example output:
akahat@jatayu tmp $ ansible-playbook check_spaces.yaml
PLAY [localhost] *****************************************************************************************

TASK [debug] *********************************************************************************************
ok: [localhost] => {
    "hosts[0]": "<IP_ADDRESS>   localhost.localdomain localhost.localdomain1 localhost.localdomain2 localhost.localdomain3 localhost.localdomain4"
}

PLAY RECAP ***********************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

akahat@jatayu tmp $ cat check_spaces.yaml
---
- hosts: localhost
  gather_facts: false
  vars:
    hosts:
      - "<IP_ADDRESS>   localhost.localdomain localhost.localdomain1 \
        localhost.localdomain2 localhost.localdomain3 localhost.localdomain4"

  tasks:
    - name: "debug"
      debug:
        var: hosts[0]

akahat@jatayu tmp

Before this change, failing for following, this change looks good to me.
yamllint.................................................................Failed
- hook id: yamllint
- exit code: 2

devsetup/edpm/edpm-play.yaml:216:151: [warning] line too long (213 > 150 characters) (line-length)

Ansible-lint.............................................................Failed
- hook id: ansible-lint
- duration: 1.63s
- exit code: 2

INFO     Set ANSIBLE_LIBRARY=/home/sandeepyadav/.cache/ansible-compat/8ef565/modules:/home/sandeepyadav/.ansible/plugins/modules:/usr/share/ansible/plugins/modules
INFO     Set ANSIBLE_COLLECTIONS_PATH=/home/sandeepyadav/.cache/ansible-compat/8ef565/collections:/home/sandeepyadav/.ansible/collections:/usr/share/ansible/collections
INFO     Set ANSIBLE_ROLES_PATH=/home/sandeepyadav/.cache/ansible-compat/8ef565/roles:/home/sandeepyadav/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
INFO     Discovered files to lint using: git -c safe.directory=/tmp/install_yamls ls-files --cached --others --exclude-standard -z
INFO     Excluded removed files using: git -c safe.directory=/tmp/install_yamls ls-files --deleted -z
INFO     Discovered files to lint using: git -c safe.directory=/tmp/install_yamls ls-files --cached --others --exclude-standard -z
INFO     Excluded removed files using: git -c safe.directory=/tmp/install_yamls ls-files --deleted -z
WARNING  Listing 1 violation(s) that are fatal
devsetup/edpm/edpm-play.yaml:216: yaml[line-length]: Line too long (213 > 150 characters)
You can skip specific rules or tags by adding them to your configuration file:
# .config/ansible-lint.yml
warn_list:  # or 'skip_list' to silence them completely
  - yaml[line-length]  # Violations reported by yamllint.

                Rule Violation Summary
 count tag               profile rule associated tags
     1 yaml[line-length] basic   formatting, yaml

Failed after min profile: 1 failure(s), 0 warning(s) on 40 files.

bashate..................................................................Failed
- hook id: bashate
- exit code: 1

scripts/gen-nncp.sh:109:1: E003 Indent not multiple of 4
1 bashate error(s) found

pre-commit hook(s) made changes.
If you are seeing this message in CI, reproduce locally with: `pre-commit run --all-files`.
To run `pre-commit` as part of git workflow, use `pre-commit install`.
All changes made by hooks:


Service test for dubbo2.6 & fix #305

fix #305
服务测试支持dubbo2.6
修改服务测试查询实现方式减少后台请求
修改泛化调用bug

@qq925716471 Service test for dubbo 2.6 is impossible, since Dubbo 2.6 do not have metadata info

Codecov Report

Merging #308 into develop will decrease coverage by 0.08%.
The diff coverage is 21.05%.

@@             Coverage Diff              @@
##             develop    #308      +/-   ##
============================================
- Coverage      19.38%   19.3%   -0.09%
  Complexity       289     289
============================================
  Files             91      91
  Lines           3637    3647      +10
  Branches         566     569       +3
============================================
- Hits             705     704       -1
- Misses          2857    2868      +11
  Partials          75      75

Impacted Files
Coverage Δ
Complexity Δ

...e/dubbo/admin/service/impl/GenericServiceImpl.java
33.33% <21.05%> (-25.5%)
3 <1> (+1)

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 45c0d41...cb67248. Read the comment docs.

Hi @qq925716471  the pr #306 has been accepted to fix #305, can you remove this part in your pr？

#311


feat(claim-button): add ClaimButton component for token claims from thirdweb Drop contracts

#3806  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @joaquim-verges and the rest of your teammates on  Graphite


App does not launch on Windows for ARM

Issue description
I keep getting this message when I try run Firefly.
"This App can’t run on your PC. To find a version for your PC, check with the software publisher"
System specification
Edition: Windows 10
Version: 2004
System Type: 64-bit operating system, ARM-based processing
Reached out to Microsoft and they said it was not a Windows issue but a problem on the publishers side.

I'm too. It does not work on my PC with MacOS 10.13.
Please help me!

Issue description
I keep getting this message when I try run Firefly.
"This App can’t run on your PC. To find a version for your PC, check with the software publisher"
System specification
Edition: Windows 10
Version: 2004
System Type: 64-bit operating system, ARM-based processing
Reached out to Microsoft and they said it was not a Windows issue but a problem on the publishers side.

could you please specify the windows system build?
Select the Start button > Settings > System > About . Open About settings.
Under Device specifications > System type, see if you're running a 32-bit or 64-bit version of Windows.
Under Windows specifications, check which edition and version of Windows your device is running.

Edition: Windows 10
Version: 2004
OS Build: 19041.928
System Type: 64-bit operating system, ARM-based processing

Hi Rajiv,
I was wondering if you had an estimate on when the Firefly wallet would work on Windows on ARM?
Thanks
From: Rajiv Shah @.>
Sent: 23 April 2021 04:43
To: iotaledger/firefly @.>
Cc: willbaa @.>; Author @.>
Subject: Re: [iotaledger/firefly] This App can’t run on your PC. To find a version for your PC, check with the software publisher (#997)
Hi, we don't currently support Windows on ARM but will soon
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://apac01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fiotaledger%2Ffirefly%2Fissues%2F997%23issuecomment-825095526&data=04|01||b55d5f88e7d34983af5b08d905be7fbb|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637547138006653337|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=EDJEl%2FHq%2BBjM4xEz3zTTBJlimpjFxkfMiOM8hsQ8bas%3D&reserved=0, or unsubscribehttps://apac01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FATZDDP45ZQ444DT3H45WNKDTKBU4PANCNFSM43LHZCQA&data=04|01||b55d5f88e7d34983af5b08d905be7fbb|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637547138006663293|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=USgkDpkNNUF8T2akNM%2Fdr4yDfwx2NnVRKgkr2DHAwWM%3D&reserved=0.


handle query builder when flaw dont have bz_id

This PR makes the tracker querybuilder ignore empty bz_ids on flaws.
This PR is the second part of #553 that I missed.
Closes OSIDB-2819.

I'm tagging as technical so I don't need to have the same entry twice on CHANGELOGs.

I have found a bug in this PR, I will discuss in Slack.


Secure User Login

Backend password hashing, storage, validation

JWT authentication

[ ] still needs logout/token invalidation


Incomplete trailing escape (%) pattern

Describe the bug
The dependency-check throws an IllegalArgumentException URLDecoder: Incomplete trailing escape (%) pattern when analyzing the dependency org.scalameta:common_2.13:4.9.1. The actual culprit seems to be the transitive dependency com.google.summit:summit-ast:2.2.0 with following two softwareIdentifiers:

<EMAIL_ADDRESS><EMAIL_ADDRESS>
The second identifier is not a valid URL, leading to URLDecoder failing with Incomplete trailing escape (%) pattern.
Version of dependency-check used
The problem occurs using version 9.2.0 of the maven plugin. It does not occur with earlier versions.
Log file
Warning:  An error occurred while analyzing '/home/runner/.m2/repository/org/scalameta/common_2.13/4.9.1/common_2.13-4.9.1.jar' (Sonatype OSS Index Analyzer).
[DEBUG]
org.owasp.dependencycheck.analyzer.exception.AnalysisException: Failed to request component-reports
    at org.owasp.dependencycheck.analyzer.OssIndexAnalyzer.analyzeDependency (OssIndexAnalyzer.java:170)
    at org.owasp.dependencycheck.analyzer.AbstractAnalyzer.analyze (AbstractAnalyzer.java:131)
    at org.owasp.dependencycheck.AnalysisTask.call (AnalysisTask.java:88)
    at org.owasp.dependencycheck.AnalysisTask.call (AnalysisTask.java:37)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
    at java.lang.Thread.run (Thread.java:840)
Caused by: java.lang.IllegalArgumentException: URLDecoder: Incomplete trailing escape (%) pattern
    at java.net.URLDecoder.decode (URLDecoder.java:230)
    at java.net.URLDecoder.decode (URLDecoder.java:147)
    at org.sonatype.goodies.packageurl.PercentEncoding.decode (PercentEncoding.java:78)
    at org.sonatype.goodies.packageurl.PackageUrlParser.parseVersion (PackageUrlParser.java:144)
    at org.sonatype.goodies.packageurl.PackageUrlParser.parse (PackageUrlParser.java:107)
    at org.sonatype.goodies.packageurl.PackageUrl.parse (PackageUrl.java:293)
    at org.owasp.dependencycheck.analyzer.OssIndexAnalyzer.parsePackageUrl (OssIndexAnalyzer.java:203)
    at org.owasp.dependencycheck.analyzer.OssIndexAnalyzer.lambda$null$1 (OssIndexAnalyzer.java:223)
    at java.util.stream.ReferencePipeline$3$1.accept (ReferencePipeline.java:197)
    at java.util.stream.ReferencePipeline$2$1.accept (ReferencePipeline.java:179)
    at java.util.TreeMap$KeySpliterator.forEachRemaining (TreeMap.java:3064)
    at java.util.stream.AbstractPipeline.copyInto (AbstractPipeline.java:509)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto (AbstractPipeline.java:499)
    at java.util.stream.ForEachOps$ForEachOp.evaluateSequential (ForEachOps.java:150)
    at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential (ForEachOps.java:173)
    at java.util.stream.AbstractPipeline.evaluate (AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.forEach (ReferencePipeline.java:596)
    at org.owasp.dependencycheck.analyzer.OssIndexAnalyzer.lambda$requestReports$3 (OssIndexAnalyzer.java:225)
    at java.util.Spliterators$ArraySpliterator.forEachRemaining (Spliterators.java:992)
    at java.util.stream.ReferencePipeline$Head.forEach (ReferencePipeline.java:762)
    at org.owasp.dependencycheck.analyzer.OssIndexAnalyzer.requestReports (OssIndexAnalyzer.java:221)
    at org.owasp.dependencycheck.analyzer.OssIndexAnalyzer.analyzeDependency (OssIndexAnalyzer.java:136)
    at org.owasp.dependencycheck.analyzer.AbstractAnalyzer.analyze (AbstractAnalyzer.java:131)
    at org.owasp.dependencycheck.AnalysisTask.call (AnalysisTask.java:88)
    at org.owasp.dependencycheck.AnalysisTask.call (AnalysisTask.java:37)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
    at java.lang.Thread.run (Thread.java:840)

Full log: https://github.com/acanda/code-analysis-maven-plugin/actions/runs/9236637535/job/25412701360?pr=289
To Reproduce
Steps to reproduce the behavior:

Clone https://github.com/acanda/code-analysis-maven-plugin
Checkout branch renovate/org.owasp-dependency-check-maven-9.x
Set the environment variable NVD_API_KEY to your NVD API key
Run ./mvnw dependency-check:check
See error

Expected behavior
The dependency check should not throw an AnalysisException and finish the dependency check successfully.

Hi! :wave:
Thank you for reaching us.
OssIndexAnalyzer.parsePackageUrl() is catching a org.sonatype.goodies.packageurl.InvalidException it is not including this IllegalArgumentException, which does not seems to be controlled properly by the InvalidException class. By reading the JavaDoc, I would expect this exception to be raised: Thrown when package-url is detected to be invalid for some reason..
Changing the current implementation of OssIndexAnalyzer.parsePackageUrl() to catch a RuntimeException prevents the analysis to crash (but only alert of an invalid package at debug level):
    /**
     * Helper to complain if unable to parse Package-URL.
     *
     * @param value the url to parse
     * @return the package url
     */
    @Nullable
    private PackageUrl parsePackageUrl(final String value) {
        try {
            return PackageUrl.parse(value);
        } catch (RuntimeException e) {
            LOG.debug("Invalid Package-URL: {}", value, e);
            return null;
        }
    }

(see: 6f76587cff126496978546980c44f6b71aead408)
We get the value from com.github.packageurl.PackageURL.canonicalize(), returning us the<EMAIL_ADDRESS>value we then try to parse. The purl-spec states:

A purl is a valid URL and URI that conforms to the URL definitions or specifications at:

https://tools.ietf.org/html/rfc3986
https://en.wikipedia.org/wiki/URL#Syntax
https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Syntax
https://url.spec.whatwg.org/

% is a character that must be encoded in a URL. I think we could reach https://github.com/package-url/packageurl-java a open a bug regarding this. I will do it and ask for their opinion. I would have expected PackageURL to throw an IllegalArgumentException when getting such a value. :thinking:
I don't have more time now, I will look to continue this investigation later today and see where we are getting this value as a software identifier for this dependency to make sure there may not be a deeper issue in DependencyCheck.
Sorry for the inconvenience.

It looks like adding org.scalameta:common_2.13:4.9.1 al by itself does not trigger this behaviour. If you follow the steps I wrote down in the description you should be able to reproduce the issue.
Running mvn dependency:tree on the project linked in the description gives the following result:
[INFO] --- dependency:3.6.1:tree (default-cli) @ code-analysis-maven-plugin ---
[INFO] ch.acanda.maven:code-analysis-maven-plugin:maven-plugin:1.7.0-SNAPSHOT
[INFO] |  ...
[INFO] +- net.sourceforge.pmd:pmd-dist:jar:7.1.0:compile
[INFO] |  +- net.sourceforge.pmd:pmd-languages-deps:pom:7.1.0:runtime
[INFO] |  |  +- net.sourceforge.pmd:pmd-apex:jar:7.1.0:runtime
[INFO] |  |  |  | ...
[INFO] |  |  |  +- com.google.summit:summit-ast:jar:2.2.0:runtime
[INFO] |  |  +- net.sourceforge.pmd:pmd-scala_2.13:jar:7.1.0:runtime
[INFO] |  |  |  +- org.scala-lang:scala-library:jar:2.13.13:runtime
[INFO] |  |  |  +- org.scalameta:parsers_2.13:jar:4.9.1:runtime
[INFO] |  |  |  \- org.scalameta:trees_2.13:jar:4.9.1:runtime
[INFO] |  |  |     \- org.scalameta:common_2.13:jar:4.9.1:runtime
...

It looks like com.google.summit:summit-ast is not a direct dependency of  org.scalameta:common_2.13 and summit-ast's version also does not include the %A.
I found summit-ast by debugging mvn clean verify and setting a break point when an IllegalArgumentExcepion with the condition "URLDecoder: Incomplete trailing escape (%) pattern".equals(getMessage()) is thrown.

This lead me to the following:

I don't know from where the second softwareIdentifier with the suffix %A is coming.

We somehow parse a pom that gets a version number with a newline in it:

When we analyze the dependency we extract the pom.xml from the jar file:

When I unzip the jar and give a look into the extracted pom.xml, there is a new line in both the <tag> and <version> XML tags.

This eventually generates the %A. The URL encoding of a new line is %0A: https://stackoverflow.com/a/3871762
We don't have the 0 prefix because it seems to be due to an implementation issue in the com.github.packageurl.PackageURL.uriEncode(String, Charset) static method. The
'\n' char is equal to 10 when casted to an int
builder.append(Integer.toHexString(b).toUpperCase());

implementation does not guarantee to have a 0 prefix for int values from 10 to 15 (0 to 9 values are not executed with this instruction)
Technically, the Maven pom schema definition states that the <version> tag is of type xs:string, which allow new lines and carriage returns, so it is a valid value according to the XML schema but it should be considered an issue IMO as there is no https://mvnrepository.com/artifact/com.google.summit/summit-ast/2.2.0
 version :slightly_smiling_face:
I will look to reach both projects to let them know about this. Given these observations, I am not sure we should implement a specific fix in DependencyCheck as there may actually be cases where this could be a correct value.

I honestly discovered today that it is possible to package a jar with a newline in the version :open_mouth:
If @jeremylong prefers to also have a patch in DependencyCheck to fix it faster, I can open a PR that would sanitize the version number by removing \n characters out of it before when creating the PurlIdentifier. I prefer to get your opinion as it seems hacky given what I understood from this investigation.

@nhumblot yes - we should trim the version number in dependency-check. Thank you for investigating this.

Thank you, I appreciate all you've done.


feat: allows controlling ownership of /nix

Fixes #50
Adds two new arguments to buildImage which allow controlling ownership of /nix. By default, the ownership stays with root if the arguments are not specified.
The only other change this introduces is moving the customizationLayer to the end of the layer list instead of the beginning. This ensures that ownership of /nix/store remains with the desired user. As far as I know, this shouldn't be a breaking change. All tests are passing.

I added a test for this change. The call to nix doctor will fail if /nix isn't set up correctly. Additionally, I verified that /nix/store has the correct ownership.
In addition to the above, I added a grepFlags option to the test function so I could control how grep is interpreting the expression given to it.

I can't reproduce the CI failure on my local system. If someone could run the test on an x86_64 machine that would be helpful.

Turns out the number of links to /nix/store changes between architectures. All fixed now, this should be ready to merge.


Add nucleotide_count.ml stub file for handout

I'd like to see if it's enough to provide a stub and not expand on the explanation in README.
@stevejb71: Does the .ml stub automatically get copied along?

I'm not sure if the ml stub gets copied or not. Try it and see :)


Add a security policy

Hello 👋
I run a security community that finds and fixes vulnerabilities in OSS. A researcher (@lethanhtrung22) has found a potential issue, which I would be eager to share with you.
Could you add a SECURITY.md file with an e-mail address for me to send further details to? GitHub recommends a security policy to ensure issues are responsibly disclosed, and it would help direct researchers in the future.
Looking forward to hearing from you 👍
(cc @huntr-helper)

You can send me an email at<EMAIL_ADDRESS>if you want.
If this is related to the distribution cookie, please see this comment: https://github.com/ninenines/cowboy/issues/1574#issuecomment-1171217446

Thanks for the follow-up @essen :)
Happy to create a SECURITY.md with this e-mail address for you 👍
Just for reference, the report can be found directly here:
https://huntr.dev/bounties/ffd5c11f-aec1-476c-823f-0fcca493d179/
It is private and only accessible to maintainers with repository write permissions.

That's exactly the same issue I linked, please read the comment. This is not a security vulnerability in Cowboy, the distribution cookie is meant to separate clusters, not to provide authentication. It is up to product developers to configure, expose or implement restrictions depending on their needs.


Fix creating promotion rule without catalogue predicate

I want to merge this change because it fixes the saving promotion rule without a catalog predicate.
Resolves #14949

Impact

[ ] New migrations
[ ] New/Updated API fields or mutations
[ ] Deprecated API fields or mutations
[ ] Removed API types, fields, or mutations

Docs

[ ] Link to documentation:

Pull Request Checklist

[ ] Privileged queries and mutations are either absent or guarded by proper permission checks
[ ] Database queries are optimized and the number of queries is constant
[ ] Database migrations are either absent or optimized for zero downtime
[ ] The changes are covered by test cases
[ ] All new fields/inputs/mutations have proper labels added (ADDED_IN_X, PREVIEW_FEATURE, etc.)
[ ] All migrations have proper dependencies
[ ] All indexes are added concurrently in migrations
[ ] All RunSql and RunPython migrations have revert option defined

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


1.6.0 dropping a ' on a particular javascript string

Loses a single quote when the javascript contains a partial tag, exampled pared from ad section of http://scienceblogs.com/pharyngula.  Note in the result that '</scr is missing closing ' :
Input:

<HTML>
<body>
 <div>
  <script language="JavaScript1.1">
    document.write('</scr' + 'ipt>');
  </script>
 </div>
</body>
</HTML>

Result:

<html>
 <body>
  <div>
   <script language="JavaScript1.1">
    document.write('</scr + 'ipt>');

   </script>
  </div>
 </body>
</html>

Hi the problem is actually not fixed in 1.6.1 if the script tag contains an HTML comment.
Input:
<script>
  <!--
    document.write('</scr' + 'ipt>');
  // -->
</script>

Result:
<script>
  <!--
    document.write('</scr + 'ipt>');
  // -->
</script>

Maybe this issue need to be reopened?

Ok, reopened.  Interestingly the above doesn't happen in just a html comment, but only if also within a script tag.

Thanks! Exactly, pretty freaky…


Drawer. Suppress only escape key

If we want to put text input's into the drawer then at the moment keypresses are eaten up (preventDefault-ed).
This PR only eats up the escape key coming from drawer.

Seems a good idea


seach not yielding any results and hanging

search with "vision schizophrenia" seems to be hanging :
https://brainspell.herokuapp.com/search?q=vision+schizophrenia&req=t
Is this replicable on your machines ?

Yes, I am seeing this as well. This appears to be a new issue. I'll look into it.

Search fails on anything with more than one word (or a space). One fix is to replace spaces in queries with the SQL wildcard character (%). I think we had that before, but it must have been taken out at some point.

Fixed!

I get the following error when clicking on JB's link:
[.Offscreen-For-WebGL-0x7ff55c0cb200]RENDER WARNING: Render count or primcount is 0.
search?q=vision+schizophrenia&req=t:1 WebGL: too many errors, no more errors will be reported to the console for this context.

Fixed with the latest commit. (Search widgets are no longer rendered if there are no coordinates received.)


peerDependencies Issue in React 0.14

The react-addons-shallow-compare dependency version specified at ^15.0.0 here isn't compatible with React v0.14, since it has React v15 as a peerDependency. Using this library with React v0.14 causes NPM to show a peerDependencies error because of this.
If I change that line to ^15.0.0 || ^0.14.0 I can at least specify "react-addons-shallow-compare": "^0.14.0" in my own project's package.json file to prevent that error.

Same issues as #137. Also, there’s another PR that fixes it like yours, as well as applying the same version range to "react-addons-test-utils": #154

You're right, thanks! Guess I should have been more thorough in searching through the existing issues. I'll close this issue since it's a duplicate.


Migrate Serpico to Ruby 2.x

Serpico requires Ruby 1.9.3. We should support a more modern version of Ruby.

In progress.

testing Gemfile, and Gemfile.lock upates


Improve easing inspector usability

Add positive_only property hint to disallow using negative presets. These values are clamped in several places in the editor already, so this avoids displaying presets that don't work.
Move the Zero preset at the end of the positive list to match the custom property editor. It's also used less often than Linear, Ease In and Ease Out.
Rename presets to be consistent between the easing property editor and custom property editor.
Remove unused inout hint which was redundant since it was already the default.

So far, I've only applied the new property hint to the Environment easing properties. There are surely other places where we should add positive_only – feel free to tell me if you can think of any.
This PR can be remade for 3.x once we agree on its design.
@clayjohn This will be useful for https://github.com/godotengine/godot/pull/53353 :slightly_smiling_face:
Preview
Positive-only value

Positive and negative value (default)

looks good, feel free to rebase

Rebased and tested again, it works as expected.

Thanks!


Footer overlaps content

If the last item has long text then the Footer will overlap the content.

Sorry, I am on Chinese new year holiday last days.
This problem may occur when you use a bottoming Loading style.
You must set a backgroundColor in contentStyle to cover it.

Thank you for your response!
The loading style I use is stickyContent not bottoming and the background for contentStyle is already set
I paid attention that this happens when SpringScrollView has about 200 items and the last item has long text. This leads to calculating the position of the footer has some wrong value

Why you use SpringScrollView with so many items? SpringScrollView simply renders all its react child components at once. Performance issue may occur in this scene.
If you are sure, give me your code and your datasource and let me debug it.

I will fix the TouchableOpacity problem and release react-native-largelist Version 3

The problem that I cannot use large-list because it conflicts with react-navigation library.
gestureHandlerRootHOC cannot be used with react-navigation library

Version 3 will not use react-native-gesture-handler and gestureHandlerRootHOC

That would be awesome! Meanwhile I need to resolve this issue before my project ends.
Will really appreciate if you can help

give me your code and your datasource and let me debug it.

Here is the example. I hope it can help you
https://gist.github.com/vinhtq/15c8ebcf89d2aac15092d5e747409146

Try this:
<SpringScrollView
    style={{flexGrow: 1, flexShrink: 1, overflow: 'scroll'}}
    //other props
    >
        ...
</SpringScrollView>

Still not working.
Checked on emulator iPhone 6, ios version 12.1

It works on your example. I have tested it.

Can you check it on emulator iphone 6

Yes, it also works well. Maybe it is the react-native version problem, mine is 0.55.4

Yes look like the react native version. I am using version 0.57.4

Have you tried 0.55.4, how about it ?

I got some error regarding to downgrade the react native version. Need a little bit time to resolve this

Sorry downgrade from 0.57 to .055 requires a lot of changes in the configuration. Will pm you soon

Is there any other way to fix this issue beside downgrade react-native version?

I have upgrade my react-native version to 0.57.4, and there is no problem!

Did you reset the node module cache after installing new version of react-native?
npm start --reset-cache

Sure, I got a lot issues if I forgot this step.

So weird, I reset my emulator. Even init a new project but still got the issue
https://www.dropbox.com/s/owbzq34cgii4xzw/demo.7z?dl=0
Can you download this and try?

I have tried, and found out the bug. We use two different version. I use the master branch. And you use the 2.0.2. I will fix it soon.

I have released version 2.0.3 on npm. Try to update it, remember to clear watchman cache and npm cache.Then try it.
Additionally, the TouchableOpacity event firing issue has been fixed ,too.

Thank you for you time! But we have another issue.
In version 2.0.2, when we add style: paddingBottom: 50 SpringScrollView can receive this.
![Uploading Screen Shot 2019-02-15 at 9.35.41 AM.png…](version 2.0.2)
But in version 2.0.3, SpringScrollView ignore this style.

Use this style on contentStyle, not style please.

Ok. Just remind because in previous version it works!
Thank you!

OK, I will close this issue!


Failing to connect wit TLS

I' have problems trying to connect to SQL Server with Tiberius.
I was trying to use rustls instead of the default, but I don't get Tiberius to compile
[package]
name = "getsam"
version = "0.1.0"
edition = "2021"

[dependencies]
tiberius = { version = "0.12.2", features = ["rustls"] }
tokio = { version = "1.34.0", features = ["full"] }

The Tiberius crate does not compile. Any ideas ?
   Compiling tiberius v0.12.2
error[E0428]: the name `create_tls_stream` is defined multiple times
  --> /Users/pieter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tiberius-0.12.2/src/client/tls_stream.rs:31:1
   |
23 | / pub(crate) async fn create_tls_stream<S: AsyncRead + AsyncWrite + Unpin + Send>(
24 | |     config: &Config,
25 | |     stream: S,
26 | | ) -> crate::Result<TlsStream<S>> {
27 | |     TlsStream::new(config, stream).await
28 | | }
   | |_- previous definition of the value `create_tls_stream` here
...
31 | / pub(crate) async fn create_tls_stream<S: AsyncRead + AsyncWrite + Unpin + Send>(
32 | |     config: &Config,
33 | |     stream: S,
34 | | ) -> crate::Result<TlsStream<S>> {
35 | |     native_tls_stream::create_tls_stream(config, stream).await
36 | | }
   | |_^ `create_tls_stream` redefined here
   |
   = note: `create_tls_stream` must be defined only once in the value namespace of this module

error[E0252]: the name `TlsStream` is defined multiple times
  --> /Users/pieter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tiberius-0.12.2/src/client/tls_stream.rs:17:16
   |
14 | pub(crate) use native_tls_stream::TlsStream;
   |                ---------------------------- previous import of the type `TlsStream` here
...
17 | pub(crate) use rustls_tls_stream::TlsStream;
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `TlsStream` reimported here
   |
   = note: `TlsStream` must be defined only once in the type namespace of this module
help: you can use `as` to change the binding name of the import
   |
17 | pub(crate) use rustls_tls_stream::TlsStream as OtherTlsStream;
   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0624]: associated function `new` is private
  --> /Users/pieter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tiberius-0.12.2/src/client/tls_stream.rs:27:16
   |
27 |     TlsStream::new(config, stream).await
   |                ^^^ private associated function
   |
  ::: /Users/pieter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-native-tls-0.4.0/src/tls_stream.rs:23:5
   |
23 |     pub(crate) fn new(stream: native_tls::TlsStream<StdAdapter<S>>) -> Self {
   |     ----------------------------------------------------------------------- private associated function defined here

error[E0061]: this function takes 1 argument but 2 arguments were supplied
  --> /Users/pieter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tiberius-0.12.2/src/client/tls_stream.rs:27:5
   |
27 |     TlsStream::new(config, stream).await
   |     ^^^^^^^^^^^^^^         ------ unexpected argument of type `S`
   |
note: expected `TlsStream<StdAdapter<_>>`, found `&Config`
  --> /Users/pieter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tiberius-0.12.2/src/client/tls_stream.rs:27:20
   |
27 |     TlsStream::new(config, stream).await
   |                    ^^^^^^
   = note: expected struct `native_tls::TlsStream<async_native_tls::std_adapter::StdAdapter<_>>`
           found reference `&config::Config`
note: associated function defined here
  --> /Users/pieter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-native-tls-0.4.0/src/tls_stream.rs:23:19
   |
23 |     pub(crate) fn new(stream: native_tls::TlsStream<StdAdapter<S>>) -> Self {
   |                   ^^^
help: remove the extra argument
   |
27 -     TlsStream::new(config, stream).await
27 +     TlsStream::new(/* stream */).await
   |

error[E0277]: `async_native_tls::TlsStream<_>` is not a future
  --> /Users/pieter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tiberius-0.12.2/src/client/tls_stream.rs:27:36
   |
27 |     TlsStream::new(config, stream).await
   |     -------------------------------^^^^^
   |     |                             ||
   |     |                             |`async_native_tls::TlsStream<_>` is not a future
   |     |                             help: remove the `.await`
   |     this call returns `async_native_tls::TlsStream<_>`
   |
   = help: the trait `futures_util::Future` is not implemented for `async_native_tls::TlsStream<_>`
   = note: async_native_tls::TlsStream<_> must be a future or must implement `IntoFuture` to be awaited
   = note: required for `async_native_tls::TlsStream<_>` to implement `std::future::IntoFuture`

Some errors have detailed explanations: E0061, E0252, E0277, E0428, E0624.
For more information about an error, try `rustc --explain E0061`.
error: could not compile `tiberius` (lib) due to 5 previous errors

Hello,
This looks like #317.

You probably need to disable default features in cargo.toml and then enable rustls. By default native-tls is enabled and what you see is probably conflict between two enabled tls implememtations.

In case it helps anyone with the same issue, you can disable default features and enable rustls with:
[dependencies]
tiberius = {
  version = "0.12.2",
  default-features = false,
  features = ["rustls"]  # Feel free to add any other desirable features.
}

Going slightly further, you can selectively use rustls for macOS, and native-tls on all other platforms. This works around issues with macOS Security Framework having issues with Azure SQL Server, and does not impact other platforms:
[target.'cfg(target_os = "macos")'.dependencies]
tiberius = {
  version = "0.12.2",
  default-features = false,
  features = ["chrono", "time", "tds73", "rust_decimal", "bigdecimal", "rustls"] }

[target.'cfg(not(target_os = "macos"))'.dependencies]
tiberius = {
  version = "0.12.2",
  default-features = false,
  features = ["chrono", "time", "tds73", "rust_decimal", "bigdecimal", "native-tls"]
}

@NTmatter Thanks work for me on macOS shananigangs


Book link is dead

It was moved... somewhere in 7eefe4f990d26e1cf992aa7ee345d2ce62b0eca2, but there's a link in README.md that is now dead.

thanks!


Error: Unsupported argument

Thank you for a fantastic starter.
Trying to initialise the common-infra directory.
Fot the life of me, I can't figure out why init results in:
╷
│ Error: Unsupported argument
│
│   on configs/prod.tfvars line 4:
│    4: name        = "common-infra"
│
│ An argument named "name" is not expected here.
╵

Any advice on where to start looking?

hi @drewes ! thanks for using our starter! 😊 I updated the setup recently
I'll check it later today so you can give it a try with our later setup 👌🏻


[BUG] Maestral hanging after setup

Describe the bug
Maestral hangs after set up.
To Reproduce
Steps to reproduce the behaviour.

Install maestral-0.4.0 via pip install --user maestral
run maestral gui, get token, enter
set up sync location
finish

Expected behaviour
A clear and concise description of what you expected to happen.
Maestral should start syncing data. Instead, it hangs.

2019-09-25 23:31:27 maestral.sync.monitor WARNING: Maestral index could not be found.
is printed to the console.

If you kill maestral after setting up via maestral gui and start it via maestral start, the same issue occurs.
System (please complete the following information):

Maestral version: 0.4.0
OS: ArchLinux
Desktop environment: xmonad + gnome
Qt version:  5.13.1

Additional context
Add any other context about the problem here.
strace on the maestral start process suggests it's hanging at creating/opening the pid file:

stat("/home/username", {st_mode=S_IFDIR|0700, st_size=45056, ...}) = 0
stat("/home/username", {st_mode=S_IFDIR|0700, st_size=45056, ...}) = 0
mkdir("/home/username/.cache", 0777)      = -1 EEXIST (File exists)
stat("/home/username/.cache", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/run/user/1000", {st_mode=S_IFDIR|0700, st_size=300, ...}) = 0
mkdir("/run/user/1000/maestral", 0777)  = -1 EEXIST (File exists)
stat("/run/user/1000/maestral", {st_mode=S_IFDIR|0755, st_size=40, ...}) = 0
openat(AT_FDCWD, "/run/user/1000/maestral/maestral.pid", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

Creating this file manually doesn't change things, though the strace output is slightly different:

fstat(17, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
ioctl(17, TCGETS, 0x7ffd74cf2bf0)       = -1 ENOTTY (Inappropriate ioctl for device)
lseek(17, 0, SEEK_CUR)                  = 0
ioctl(17, TCGETS, 0x7ffd74cf2b20)       = -1 ENOTTY (Inappropriate ioctl for device)
lseek(17, 0, SEEK_CUR)                  = 0
fstat(17, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
read(17, "", 8192)                      = 0
close(17)                               = 0
stat("/home/username", {st_mode=S_IFDIR|0700, st_size=45056, ...}) = 0
stat("/home/username", {st_mode=S_IFDIR|0700, st_size=45056, ...}) = 0
mkdir("/home/username/.cache", 0777)      = -1 EEXIST (File exists)
stat("/home/username/.cache", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/run/user/1000", {st_mode=S_IFDIR|0700, st_size=300, ...}) = 0
mkdir("/run/user/1000/maestral", 0777)  = -1 EEXIST (File exists)
stat("/run/user/1000/maestral", {st_mode=S_IFDIR|0755, st_size=60, ...}) = 0
openat(AT_FDCWD, "/run/user/1000/maestral/maestral.pid", O_RDONLY|O_CLOEXEC) = 17

I agree, it looks like the PID file is not created when starting maestral. Can you start maestral in the foreground, by running maestral start --foreground, and see if this throws any Python errors?
If the above command runs successfully, it suggests that the PID file is created but cannot be found later. If this is the case, running maestral status from a second console should return "Maestral daemon is not running".
The warning message about the missing index is expected before the initial sync, it will be removed in the next release since it is somewhat misleading.

Yes, maestral status does indicate that the daemon isn't running.
Strangely enough, I ran maestral start --foreground and it synced, but after stopping maestral and trying to run maestral start again, it seems my config has been wiped! It asks me for an auth token again, and maestral account-info says No Dropbox account linked.

Hm, that is a bit confusing. The PID file seems to be created successfully, otherwise maestral start --foreground would fail. The only issue I can think of is that a different directory is chosen for creating and reading the PID file (it should always be "$XDG_RUNTIME_DIR/maestral/maestral.pid").
Regarding the deletion of your config files, it is quite possible that you created multiple instances of maestral that were accessing the config in parallel. This should not happen when they can find the PID file...
Could you install the development version of Maestral with pip install -U --pre maestral and see if you are still having problems? I have simplified the code which handles the PID file and it should be easier to debug now. After the installation, could you:

Log out and log in again to clear the runtime directory and delete the config directory at "~/.config/maestral".
Run maestral start --foreground for the first startup.
After completing the setup again, run maestral status from a different console and see if it can find the process.
If not, check if the PID file is created anywhere else than "/run/user/1000/maestral/maestral.pid".

Apologies for those issues!

I ran maestral start --foreground, set everything up, and everything synced fine.
Ran maestral status and it said it was running, 0 sync errors. maestral.pid was in my runtime folder.
Ran maestral stop to stop the foreground process.
Then, I ran maestral start to run the daemon. Same result -- maestral status says process not running, and maestral.pid is nowhere to be found.

Ok, thanks. And just to confirm, what does maestral start output? Does it just hang at "Starting Maestral..." or do you get an "[OK]" or "[FAILED]"?
 You can view the logs with maestral log show (and clear them with maestral log clear). I still suspect that maestral is started, but that the spawned subprocess does not write the PID file to the corrcet runtime dir.

it hangs at "Starting Maestral..."
The only thing in the logs is this:
2019-09-26 22:44:36 maestral.sync.oauth DEBUG: Using keyring: keyring.backends.chainer.ChainerBackend (priority: 10)

I see now why it hangs: There is indeed a bug in the code which checks for correct startup. If it cannot find the pid of the subprocess, it should time out within 1 sec, but it did not.
However, I am still puzzled as to why maestral does not start. The code which is run when starting the daemon is the following:
import subprocess

sp = subprocess.Popen(
    "maestral start --foreground -c {}".format("maestral"),
    shell=True,
)

I.e., it just runs maestral start --foreground in a subprocess! Could you try this manually? You can then get the PID of the subprocess with sp.pid and check is it actually running if sp.wait(2) raises a TimeoutExpired error.

Running this code manually, sp.pid has a value, and the subprocess is running.

Thanks, that is a good sign. I have added a verbose option to maestral start now, which prints all log output to the console, and added logging to the daemon code. Could you install the latest development branch with pip3 install -U git+https://github.com/samschott/maestral-dropbox@develop and then run:
maestral log level DEBUG
maestral start -v

This should clearly show which part the startup fails.

Aha:

2019-09-28 20:59:47 maestral.sync.oauth DEBUG: Using keyring: keyring.backends.SecretService.Keyring (priority: 5)
Starting Maestral.../bin/sh: maestral: command not found
2019-09-28 20:59:49 maestral.sync.daemon ERROR: Could not start Maestral daemon process
Starting Maestral...        [FAILED]

I installed Maestral as a user, and ~/.local/bin wasn't in the PATH for /bin/sh because I only put it in .bash_profile.
For some reason when I run the subprocess code in the interpreter, it used bash, which has ~/.local/bin in its path.

Ah, ok. Glad you found the issue! I had not foreseen the problem when passing shell=True to subprocess.Popen.
Thinking about it, shell=True really is not necessary and I will remove it for the next release. In that case, Popen will search for the maestral executable directly, using the PATH as it was when Python launched.


Find out how to convert PNG images to ICO and SVG formats with Python

I did a research on how to convert PNG images to .ICO and .SVG using python for the backend