Select inside Include in EF Core

I have an entity that looks like this (partially removed for brevity, it includes many other properties):
public class Tender
{
    [Key]
    [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
    public int Id { get; set; }
    public string CreatorId { get; set; }
    [ForeignKey("CreatorId")]
    public virtual AppUser Creator { get; set; }
    public ICollection<TenderCircle> TenderCircles { get; set; } = new List<TenderCircle>();
}

The TenderCircles property is used to provide many-to-many relationship with another entity called Circle. TenderCircle entity looks like this:
public class TenderCircle
{
    public int TenderId { get; set; }
    [ForeignKey("TenderId")]
    public Tender Tender { get; set; }
    public int CircleId { get; set; }
    [ForeignKey("CircleId")]
    public Circle Circle { get; set; }
}

So, I'm doing the following query (partially removed for brevity, normally it includes many other Include and ThenInclude statements):
return _context.Tenders
               .Include(t => t.Creator)
               .Include(t => t.TenderCircles.Select(tc => new { CirlceId = tc.CircleId, TenderId = tc.TenderId }))
               .ToList();

But, it simply doesn't work. What I want to achieve is that I only want to get the TenderId and CircleId properties from TenderCircle and ignore the actual Tender and Circle objects. How can I achieve this in EF Core?

Hi @etairi
This should work fine with simply including TenderCircles.
return _context.Tenders
               .Include(t => t.Creator)
               .Include(t => t.TenderCircles)
               .ToList();

EF Core will not load navigations unless you explicitly include them. Like that:
return _context.Tenders
               .Include(t => t.Creator)
               .Include(t => t.TenderCircles)
                   .ThenInclude(tc => tc.Circle)
               .ToList();

But note that Entity Framework Core will automatically fix-up navigation properties to any other entities that were previously loaded into the context instance. So even if you don't explicitly include the data for a navigation property, the property may still be populated if some or all of the related entities were previously loaded. That's why Tender navigation will be populated just because you load it anyway.

@etairi Include only supports simple access expressions for navigation properties and is used to bring entire entities into the results. As @SSkovboiSS indicated, if you just include TenderCircles, then the "Circle" navigation property on TenderCircle will not be included, but CircleId will be. Since TenderCircle.Tender is an inverse navigation to the already included relationship from Tender to Circle, then, again as @SSkovboiSS points out it will be populated so as to keep the object graph consistent.

@ajcvickers

Since TenderCircle.Tender is an inverse navigation to the already included relationship from Tender to Circle, then, again as @SSkovboiSS points out it will be populated so as to keep the object graph consistent.

Yes, this indeed happens, and Tender is included, but I basically want to ignore it. Is there any way to force it to ignore Tender and Circle?

@etairi Not currently, no. This is because the Tender entity is loaded, and the relationship from Tender to TenderCircles is loaded. Since the navigation property is part of a relationship that is being explicitly loaded it will always be set. The navigation property could be removed if it is not needed, but if the navigation exists and the relationship is loaded, then the navigation will be set.

@ajcvickers  Okay. Thanks for info! (Y)


AniWave returning Json error code upon opening any anime

Source information
Aniwave 14.74 (English)
Source language
English
Steps to reproduce

open aniwave extension

open any anime

Expected behavior
Should open a list with all the episodes
Actual behavior
instead returns an empty list and a long Json error code
Aniyomi version
Stable <IP_ADDRESS>
Android version
Android 14
Other details
No response
Acknowledgements

[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
[X] I have written a short but informative title.
[X] I have updated the app to version <IP_ADDRESS>.
[X] I have updated all installed extensions.
[X] I have tried the troubleshooting guide.
[X] If this is an issue with the app itself, I should be opening an issue in the app repository.
[X] I will fill out all of the requested information in this form.

We don't manage that extension anymore.


Precedence order not working as expected for arrays in branch policy

Problem Description
As per the README - The precedence order for settings file is repository > suborg > org (.github/repos/.yml > .github/suborgs/.yml > .github/settings.yml
However, when defining branch policies at both the suborganization and repository levels, policies that require array inputs are merged rather than being overridden.
What is actually happening
suborg/default.bpr.yml
suborgrepos:
  - '*'

branches:
  - name: default
    protection:
        required_pull_request_reviews: null
        required_status_checks: null
        enforce_admins: false
        restrictions:
            apps: ['app-01', 'app-02']
            users: ['user-01']
            teams: []

repos/repo.yml

branches:
  - name: default
    protection:
        required_pull_request_reviews: null
        required_status_checks: null
        enforce_admins: true
        restrictions:
            apps: ['app-03']
            users: ['user-02']
            teams: []

Properties with boolean or string input types are functioning as expected, and the values defined in the repo.yml file are being correctly applied. However, properties with array input types are being merged instead of being overridden.
For instance, the restriction being applied is:
        restrictions:
            apps: ['app-01', 'app-02', 'app-03']
            users: ['user-01', 'user-02']
            teams: []

What is the expected behavior
Only the apps and users defined in the repo.yml should be applied, while the apps and users defined the sub-org level should be ignored.
        restrictions:
            apps: ['app-03']
            users: ['user-02']
            teams: []

Error output, if available
NA
Context
Are you using the hosted instance of probot/settings or running your own?
Running Safe Settings via Github Actions
If running your own instance, are you using it with github.com or GitHub Enterprise?
github.com
Version of probot/settings
2.1.14
Version of GitHub Enterprise
NA

I am observing the same behaviour in rulesets as well while overriding the bypass_actors in repo level settings file.

I discovered that the issue stems from the way safe-settings creates the final merged config from the settings files. There's also an edge case where the API call fails due to duplicate elements in the merged config. I've filed another bug report with all the relevant details.
https://github.com/github/safe-settings/issues/723


Should bundle.js be included in repository?

It's a compiled file. Seems like it would be better to force folks to generate it using npm bulld.

Ditto typings/react/* which are fetched by "npm typings"

Upon reflection, I think bundle.js should not be in the repo, but eventually we'll have a compiled/minified/etc. distribution that will be.

Agree on long-term.  But in the short-term it is necessary as the app on gh-pages won't run without it.


Fix legacy upload

Editing a talk in legacy doesnt show the correct link

Can one of the admins verify this patch?

Closing as there is a case this won't work in
I will add some tests in this area too


WI 3565801: Update OMF jupyter example to not have OMF validation in documentation

The CDS OMF endpoint no longer indicates that the OMF message was invalid. Removed mentions of the /omf endpoint validating OMF messages, but also mentioned the designated OMF validation endpoint: /omf/validation
OmfIngress support explanation:
We do not validate JSON with the /omf endpoint for performance reasons, but we do ensure that the message is small/big enough for us to process. We recommend that customers use the OMF Validation endpoint (/api/v1/omf/validation) to validate their JSON before sending it via the /omf endpoint.  The 400 "invalid message" error that you are seeing is actually referring to the message body being too small for us to recognize as a valid request, which we have set up to be 12 bytes.

Deleted unnecessary image file and added a hyperlink to OMF validation, fixed some other phrasing. @afink-aveva approved?


RNaD implementation different than paper.

I might have to edit this later to better illustrate what I mean.

This is the formula for the estimate of the state value and Q-value used in DeepNash

And here are these estimates used in an update calculation.
Briefly, we can see in the picture the update is basically the logit of an action times the q-value of that action.
However the code used in the policy update is very different
    adv_pi = q_vr - torch.sum(pi * q_vr, dim=-1, keepdim=True)

    adv_pi = is_c * adv_pi  # importance sampling correction

    adv_pi = torch.clip(adv_pi, min=-clip, max=clip)

    adv_pi = adv_pi.detach()
    logits = logit_pi - torch.mean(logit_pi * legal_actions, dim=-1, keepdim=True)

    threshold_center = torch.zeros_like(logits)

    nerd_loss = torch.sum(

        legal_actions * apply_force_with_threshold(logits, adv_pi, threshold, threshold_center), axis=-1

    )

    nerd_loss = -renormalize(nerd_loss, valid * (player_ids == k))

    loss_pi_list.append(nerd_loss)

Here we can see the gradient is in the direction of the logit times the advantage. Additionally, we are also translating the logits so they have mean 0. This was not mentioned in the paper.
More importantly I see this eta_reg_entropy term in the code, which seems to be the reward shaping term:
eta_reg_entropy = -eta * torch.sum(merged_policy * merged_log_policy, dim=-1) * torch.squeeze(player_others, dim=-1)

However this is not quite the same as the update in the paper. In the code, we seem to have this extra merged_policy (pi) term in the multiplication of eta.
I've been putting this question off for a while, so sorry if this seems hasty

Tagging the original contributors: @perolat @bartdevylder
Thanks @baskuit, there's one thing I'm curious about first: you're quoting some code, but that code uses torch, whereas our RNAD implementation is based on Jax-- so the code you're quoting is not our code?

Yeah sorry I quoted my pytorch adaptation by mistake. I'll edit in a bit. I just cant reconcile the _loop_v_trace function with the formulas in the paper.

Hi @baskuit,
I just updated the text in our internal version and it will be updated publicly by the end of the year I hope (sorry we forgot this average). The second part of the loss looks like this now:

We did our best to make sure we transcribed the code to comprehensible pseudocode and equations in the paper but we definitely missed this average step.
I'll take a bit more time to check your second point.
Hope it helps and thanks a lot for taking the time!
Julien

This should be updated now in the final version of the paper


Error in plugin 'gulp-babel'

I got the following error when I tried to deploy UniAdmin
[11:13:08] Sass compiled.
[11:13:27] 'deploy.cms.workingcopy' errored after 1.25 min
[11:13:27] Error in plugin 'gulp-babel'
Message:
    Couldn't find preset "es3" relative to directory "D:\\GitHub\\UniversityAdmin\\Templates\\Endor\\frontend-test-env\\node_modules\\diff"
[11:13:27] Fatal error, please consider writing a bug report: https://github.com/studyportals/product-deploy/issues/new

Thank you for reporting this. Can you please also provide me which branch you are trying to deploy?

Develop, in UniAdmin, Shared Templates, Shared Endor, and Packages Endor.


Can't run tests

I'm trying to run this project on Windows, steps 1 to 9 works fine, I can see it running in browser.
However I cannot run the tests, I go the following error:
yarn run test-server
yarn run v1.22.18
$ webpack-dev-server --config webpack-test.config.js
[webpack-cli] Failed to load 'C:\Projects\motphys\motphys-sdk-javascript\webpack-test.config.js' config
[webpack-cli] Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema.
 - options[0] should be an object:
   object { patterns, options? }
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Thank you for your kind reply, however I'm not interested in this issue any more.
I've got my typescript+rust project up and running from another template project: https://github.com/ZhaoXiangXML/threets-rust-wasm-template.

Awesome. Glad you found a solution


broken interactive canvas pixel buffer examples

Request type

[ ] Please close this issue, I accidentally submitted it without adding any details
[ ] New documentation
[x] Correction or update

Details

The two interactive examples on https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Pixel_manipulation_with_canvas are broken in Firefox. Firefox reports an insecure operation on retrieval of the canvas pixel buffer.

SecurityError: The operation is insecure. Grayscaling_and_inverting_colors:31

The refrenced line is: var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);

SecurityError: The operation is insecure. A_color_picker:29

The Line is var pixel = ctx.getImageData(x, y, 1, 1);

https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Pixel_manipulation_with_canvas

Dupe of https://github.com/mdn/sprints/issues/1127


JEP 482 - Flexible Constructor Bodies (Second Preview)

Implement demo for JEP 482 - Flexible Constructor Bodies (Second Preview)
Demo class already established HERE

implemented in a6bf350


Can we support solution project ?

@ncave @alfonsogarciacaro
Are we able to support solution project ? Or multi files project in current state ?
If not, what is missing ? And can I help ?

@MangelMaxime Not at the moment, more of FCS needs to be ported for that to work (Incremental builder etc.). Technically several files can be joined together and compiled as one, but that's going to get slow at some point. But before that, what is your platform file system for supporting projects / multiple files, is it browser or nodejs, or perhaps GitHub?

@ncave I was having the idea of using the Browser.
My idea, was to explore providing a DSL or small library to the user and let him play with it and have "immediate" feedback.

@MangelMaxime Just to get a better understanding of what you are trying to do, do you mind explaining a bit more in detail how you are envisioning the repl to work with multiple files in a browser context? Would there be a server back-end of some kind?

@ncave This the great question :) and one of the raison I started this discussion.
If we were on the server side, we could simply use the file system to reference the different file like we do for the F# compiler on .Net etc.
It's important to note, that I never really look at the FCS code only when working the build system because I was having errors due to the change for netcore2.
One of my idea is something like that.
First, let's take the assumption we use .fsx project just because their looks simpler IMO. (I can be wrong)

Start a service (let's call it project service)
Feed him with all the files with a path and the associated content
Run a first compilation
Now when we modify a file we send the file path and the new content.
This is update in the file in the project service and trigger another compilation.

In pseudo code, this would looks like:
{ cmd: "start_project",
  name: "repl.project" }

{ cmd: "add_file",
  name: "lib1.fsx"
  content: "....." }

{ cmd: "add_file",
  name: "App.fsx"
  content: "....." }

{ cmd: "first_build" } -> send the result one way or another

{ cmd: "modify_file",
  name: "App.fsx",
  content: "new content of the file..." }

My idea, behind this service is to make it available for the editor because, we could use it to provide some kind of folder view, and more importantly retrieve the file content.
And also, make the FCS filesystem's calls pass by this service.
Nothing prevent us, later to allow the service to save it's state into the localStorage for example to restore on new tab etc.
In theory, this is something doable at least for the editor part, after I don't know how the FCS works.

@MangelMaxime In principle this is doable, but will need more work on FCS side to include the IncrementalBuilder and whatever additional dependencies it has.
As for errors in netcore2, yes, those have not been resolved yet, but for now you can switch back to the older binaries (just have them checked in and skip the export part), you just need to check-in a more recent FSharp.Core.dll (net45 flavor).

Ah but now, but only have two logs with missings dlls when using netcore 2.0 so it's fine :)
Also, the export part is already optional by default in the new build system. I need to do the documentation of it.
And is it possible to not use the IncrementalBuilder for multiple files project ? Like temporary doing a full compile from scratch ? I know it's can be slow for big project probably but just for experimentation should be enough perhaps.

@MangelMaxime The missing dlls are not what I'm referring to as errors, there is an javascript error when parsing some files (e.g. sudoku sample etc.) when using netcore2.0 binaries that needs to be addressed before it can be declared fully functional.
The incremental builder and the project system in FCS seem to be somewhat interlinked (although I'm not a FCS expert or maintainer so my understanding is limited), so I'm not sure how much we can save there by only doing the project/file system in FCS.

@ncave Ah ok, I wonly tested on really simple application good to know. I will first work on the documentation and if I can try something for the project/file system of FCS or do we have others things to do first ?

@MangelMaxime I don't know anything about repl priorities, perhaps @alfonsogarciacaro can shed some light.

The REPL will be what you want it to be :wink:
About solution files, that's probably too much atm. It'd be nice to have some sort of project, with files maybe saved in the browser local storage. I know FCS offers a virtual file system but I'm not sure if this part compiles to JS. Also @ncave, FCS now can get the AST of a single file with ParseAndCheckFileInProject, do you think this changes something?
Anyway, I personally think the feature with the biggest impact would be to allow referencing libraries (like Elmish, etc), ideally directly from, say, Github, but I guess it'd be fine if there's already a library of libraries to choose from. In that case, we could avoid performance problems by precompiling the libraries and bring back the .fablemap file that was used to convert references to files in libraries to JS imports when Fable libraries were distributed in precompiled form in npm.

The solution project idea was to bring library support as we need the source files for Fable no?

If we bring back the .fablemap file we could use just a .dll (plus compiled JS files) no need for the F# source file. I don't want to do this for standard Fable, as we agreed we won't distribute libraries as compiled JS files, but it may make sense for the REPL as compiling many files is much more expensive.

I would love to see something like this for Fable.   This is really well done in my opinion.
https://stackblitz.com/edit/angular-7ycw9p?file=app%2Fapp.component.html

Something I didn't think about is that, we also can run Fable or FCS over NodeJS too. We don't only have the browser to support.
Perhaps, it can be easier to support NodeJS to test the FCS. And then use a polyfill or additional layer to support the browser.

I don't think there'll be much difference in using NodeJS, all the code after compiling FCS/Fable to JS is browser-compatible. The only difference is how to read files.

Do you mean FCS/Fable already support reading the files from the filesystem when targetting Node JS ?

@MangelMaxime No, right now there is nothing file-system specific about FCS compiled to JS, it's just a F# to AST parser/typechecker. You can definitely use the nodejs file system to load file contents if you want to, that's what the repl testapp does, for example.
That's why I keep asking what use cases we want to support first:

Is it NodeJS compiler CLI tooling, possibly even generating binaries.
Is it some other type of NodeJS editor integration in a Electron shell.
or is it Browser-based only, with or without a back-end file system.
(but IMO those are all very, very different).

One possible example of a browser-based multi-file editor was something like this:
(unfortunately I don't have a link anymore as I forgot what the project was called, but it has not been maintained since last year I think):

A multi-file online editor project with GitHub backend, so on the left you have a treeview of your github project files, and an editor on the right, and you can switch between files, and you have file system backed by git.

@MangelMaxime
tl;dr It would help if we have a list of features we envision for the new repl, so we can prioritize properly.

This would be my list of priorities (of course it's not mandatory, we should decide that together):

Browser based, we already have a Fable CLI tool, and the most interesting scenario for REPL is users can try it out in the browser with zero installation and no backend (so in the future anybody can easily embed the REPL in their websites).
Store and share snippets, for that we do need some simple backend with storage. I can take care of that :)
More than multiple files, it'd be very nice if there was a set of common libraries the user can reference from the snippet. For that we need to either make the JS-compiled FCS accept multiple files or precompile the libraries (but then I have to solve the inline issue https://github.com/fable-compiler/Fable/issues/1257)

Here is my vision of the REPL.
The next version of it, should be more of less what we have on the PR #8 with all the errors fixed and missing features that I listed.
Missing features and known bug:

Intellisense is broken: https://github.com/fable-compiler/fable-repl/pull/8#issuecomment-347842522
Support code sharing via queryParams like the "old" REPL do
Improve performance I get some micro-freeze or add message when the FCS is working to alert the user
Add basic samples like the Mario sample etc.
Clean up the code to make contribution easier

Support importing libraries. We should already be able to support pure bindings because Fable.Import.Browser is a binding for example.
Support common libraries like Elmish which is somekind one of our best showcase
Allow users to share projects, thanks to a simple backend
Only then support multiple files solution.

So yes for me the priority is to support the REPL in the browser before the NodeJS case.


Is there anywhere different from the original CycleGAN code?

Is there anywhere different from the original CycleGAN code?

Here.

Actually that one is the same as the original code. Ironically, the original code is different from the paper at that part. I was trying to imitate the original code as possible, but maybe there are still some differences that I haven't realized yet. If you found one, please let me know!


Backport of latest 1.15.2 mappings back to 1.14.4.

What has be done:

Updated Gradle and build script with the latest ones in the 1.15.2 branch.
Classes with the same intermediary as the 1.15 ones got renamed (unless newer ones are unmapped).
Methods with the same intermediary and signature as the 1.15 ones got renamed (might got mismatch which needs some reviews)
Fields with the same type and intermediary as the 1.15 ones got renamed.
Comments got backported.
Method arguments got backported.

Would it be possible to keep the same order? Right now the diff is massive and hard to see the changes?

Is it just the location of where the inner class is being written to? Inner classes should be before the fields and methods

Ah, that seems to have helped a lot

1300 files is still huge tho :/

Can you open it in engima, and run drop invalid mappings + save. There seems to be a few places where its not saved 100% the same way as enimga would do it.

When merging this I will try to ensure that I add everyone who commited as a co-author

There is currently a known with net/minecraft/class_4357 net/minecraft/client/util/TextFormat where all the fields got nuked for unknown reasons.

Every issues pointed out by @NinjaPhenix are fixed now!

This is hard to review to ensure its all perfect, please ensure that opening engima and dropping invalid mappings doesnt cause any changes.

Using the drop invalid mappings does change the inner class/method&fields order. Which is quiet annoying for this PR.

Just leaving the bash script I used to get all of the co-authors git --no-pager log --after="2019-08-22 00:00" | grep "^Author:" | sort -u | sed "s/Author:/Co-authored-by:/g"


add userStarred method to get starred repos

I added userStarred  method in order to fetch starred repositories.

Looks good; mind adding some documentation to README.md? Thanks!

Merged! Thanks for the awesome PR! :+1: :shipit: :tada:


Double arrowed and undirected relationship drawing in recursive query

I have this query based on the repo here: https://github.com/kuzudb/cypher-workshop
MATCH (p1:Person)-[o1:Owns]->(a1:Account)-[r:Transfer* SHORTEST]-(a2:Account)<-[o2:Owns]-(p2:Person)
WHERE p1.email =<EMAIL_ADDRESS>AND p2.email =<EMAIL_ADDRESS>RETURN *;

The result graph viz that I get looks like this, where there is an undirected edge between 118.. and 082... Then there is a bi-directional edge between 082.. and 054... In fact there is an edge from 118.. to 054.. and from 054.. to 082..

If you move one of the nodes a little bit with your mouse, you get the right view:

Not sure what to do but seems like something the force layout should handle easily. It seems to happen because we're drawing all nodes in a straight line and we swap the positions of 054.. and 082..

@MSebanc will tweak the parameters defined at https://github.com/kuzudb/explorer/blob/48fa9f0cd0cb7dc1e0ad4b8d255cafabcf0f8c1a/src/components/ShellView/ResultGraph.vue#L368-L373
to see if there is a way to make the default layout look better.


Structure for nested cron jobs

I see similar question #65 asking for multiple cron jobs, but I would like to know how structure my app to have recurring top level parent cron job, which runs say every 15 mins and extracts time information from a service that returns an array of objects, and using these extracted time information to fire off an array of one time child cron jobs? Much appreciated Thanks

Can this one off cron job be rescheduled once submitted?
parser.recur().on(date).fullDate();
Say for example if we want to run once, but after submission, be able to be rescheduled again (as many times) before event actually happens so that in the end it is still one time job. If so an example would have thanks

I find it better to do this with reactive session variables so that the cron job can be conditional, this way you do not need to make a overly complicated solution.
For example:
# Booleans to track functionality
eventCompleted = false
processPage = true
processCompleted = false

# Inside cron
if eventCompleted
  # do code for if the event has finished

if processPage
while !processCompleted
 parsePage()


encoding/binary: Uvarint function can potentially read entire buffer

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

$ go version
go version go1.15 linux/amd64

Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env

What did you do?
The function encoding/binary.Uvarint can potentially read the entire buffer passed to it, although it only needs to read a maximum of MaxVarintLen64 bytes.
https://play.golang.org/p/kx2TXUbPIyN
The function encoding/binary.ReadUvarint does not have this issue.

What did you expect to see?
0 -10

What did you see instead?
0 -1000

See #40618 for when ReadUvarint was fixed.
We should fix Uvarint also.

@katiehockman

We considered this and decided not to change the behaviour of Uvarint in the security release because it takes a buffer which is naturally limited by its length, so there is no risk of it consuming resources unexpectedly or unlimitedly.
If we want to change Uvarint too for consistency, we can, but there's no security reason, and it might be better not to change existing behaviour.

I feel like we should fix this, if for no other reason than to make ReadUvarint and Uvarint consistent.
It is a good question, though, if anyone is depending on the current behavior. It seems unlikely to me, but it might be worth codesearching the corpus to see what people do with the second return value when it is <0.

I searched through a fair amount of uses of the second return value of binary.Uvarint on github. I didn't see any code that ever distinguished different negative values. All the code did either:

Ignore the result entirely.
Compare it against 0 (< 0, <= 0, ...), usually to just report an error if bad.
Use it to unconditionally slice something (which would panic if the return value is anything < 0)
Add it unconditionally to an index into a byte slice (which will do bad things if the return value is anything < 0)

So I think we're safe redefining the behavior here.
After looking at all the uses, I have the sinking feeling that this API for reporting errors is not well understood by the general Go programmer.  Oh well...

Thank you for the report @mdevan, and thank you for the investigation @randall77, plus Happy New Year!
@randall77 given your investigation, what would you recommend our course of action be? Should we punt this to Go1.17 and make it early in cycle? If you are busy, I could send a CL, or if you send one I can help review it. If otherwise this issue needs to be addressed Go1.16, shall we need a freeze exception? Regardless of what happens, I’d be delighted to help land it. Thank you.

Thank you for the report @mdevan, and thank you for the investigation @randall77, plus Happy New Year!
@randall77 given your investigation, what would you recommend our course of action be? Should we punt this to Go1.17 and make it early in cycle? If you are busy, I could send a CL, or if you send one I can help review it. If otherwise this issue needs to be addressed Go1.16, shall we need a freeze exception? Regardless of what happens, I’d be delighted to help land it. Thank you.

@odeke-em If you want to send a CL for 1.17 that's fine.

@odeke-em If you want to send a CL for 1.17 that's fine.

Roger that, I'll send one, thanks Keith!

Roger that, I'll send one, thanks Keith!


[ed-changes-migrate-loggers] Fix leaking async ops

Fixes leaking ops

Nice! I thought the await before test case seemed weird. Good to see this working

I believe it was a bug in rhum found by eric (that'll be fixed by v2 anyways)


libogg github repo 404

https://github.com/hunter-packages/libogg/ returns a 404 error
however https://github.com/hunter-packages/ogg/archive/v1.3.3-p0.tar.gz (in hunter package config) still can be downloaded.

https://github.com/ruslo/hunter/pull/1451/files#r273321310


Create a Video component for adding video files

One need to make this component using HTML and Tailwind CSS. I would suggest to use Tailwind Playgrounds to make things faster and quicker.
Here is a reference to the component.
After building the component please raise a PR with a screenshot of the component and add the component in seamless-ui/Video/src/video-1.html.
If you need to use any icon please use it from Hero Icons
Good luck.

Do you have a picture of that. @nik132-eng  for reference?

Can you share some screenshots how you are thinking to build this. @nik132-eng

We have a video component in the content card you can fix that and make that a video component. @nik132-eng


[refactor] move code from CollectorController to CollectorService

What's changed?
Move code from CollectorController to CollectorService
Checklist

[x]  I have read the Contributing Guide
[ ]  I have written the necessary doc or comment.
[x]  I have added the necessary unit tests and all cases have passed.

Add or update API

[ ] I have added the necessary e2e tests and all cases have passed.

it seems that code style question: you can run mvn checkstyle:checkstyle to fix it .

@ceekay47 Hi, please fix Backend CI on your branch when you have time.

@Calvin979 @yuluo-yx Fixed the Checkstyle errors. Can you please take a look? Thanks.

lgtm


Compiler doesn't handle unresolved forwards in class method declarations correctly

This test fails.  It should probably actually throw an exception when you try to construct the instance of 'AClass' the way the interpreter does. Either way, the pattern match should fail, and probably should also throw an exception, as should attempting to call a static method or free Function which has an unresolved forward.
    def test_unresolved_forwards_in_type_signatures(self):
        UnresolvedForward = Forward("UnresolvedForward")

        class AClass(Class, Final):
            def f(self, other: UnresolvedForward):
                return "BAD"

            def f(self, other: int):
                return "GOOD"

        @Entrypoint
        def tryToCallF():
            return AClass().f(10)

        assert tryToCallF() == "GOOD"

Thanks to @punkdit for identifying.


Usage of underscore after

I understood that placing a trailing underscore, it would ignore the sibling layout file and use the layout of its parent as in the example:

After in the documentation, there is an example that, IMHO, says other thing:

From what I understood of a trailing underscore, $userId_.edit.tsx would use root layout, wouldn't it?
Or how can I use a root layout in this case?
BTW, I am loving using this library, I think in my case it solved a lot of organisation issues placing files in folders!

First of all, thanks for the kind words. I'm glad it's been useful for you.
Your edit route is not using the root layout due to a side effect of using the hybrid (+) folders.
The + suffix is converted back to its flat-files form before processing.
So users+/$userId_.edit.tsx is the same as users.$userId_.edit.tsx
Also, another quirk of hybrid routes is that user+/_layout.tsx is the same as users.tsx.
Therefore, when looking for the parent route, it sees there's a matching users layout and uses that.
Essentially, by nesting under the users+ folder, it means that all child routes will at least use the _layout route. 99% of the time, that's probably what you want. But in your case, it's causing an issue.
The current workaround is to move that route outside the users+ folder and name it users_.$userId.edit.tsx. This means don't match the users layout and use the root.
A possible solution is to allow you to use users+/_.$userId.edit.tsx. Just like +/ is translated to ., we can make +/_. translated to _. so it'll be users_.$userId.edit.tsx, which is what we want (see above).
Anyway, I hope this makes sense.

Yes, the workaround has solved the problem but, as you may have guessed, created other as now I have "users" routes in two places.

I agree it's not ideal.

Is it something that should work now or you are just planning something?

I was just suggesting a possible solution. It's not currently implemented, but something I should be able to add.

One last thing I couldn't grasp: the difference from ending with a + sign and without it as in the example below it seems to generate the same routing (project and users):

That's the difference between flat-files and flat-folders. In the current v2 routing, if you use flat-files, you can't have any folders, not even for organizations. That's why I added the + suffix (hybrid routes), so you can organize your routes in a manageable way.
flat-folders is a convention where the folder name is the route, and its contents like route.tsx or index.tsx is the route module. Any other files are ignored. This way you can colocate other files like components, images, CSS, etc.

OK @kiliman Thank you, nevertheless I will keep using this library as I think is a step forward organisation then flat-files for big projects.


Default type for homepage should be added to the config

The parameter sulu.content.structure.default_type.homepage should be added to the config as it is used to determine the default template in sulu:webspaces:init (the parameter is set to overview by default and therefore an exception is thrown when overview.xml does not exist).

this should be able over the configuration:
sulu_core:
   content:
        structure:
            default_type:
                page: default
                snippet: default
                homepage: overview

@sabinebaer if this solves the problem close this issue!

@wachterjohannes I've already added it and of course this solves the problem but it should be added to the configuration of sulu-standard as people don't want to debug the sulu:webspaces:init command to find out that they have to add it to the config ;)

ok (= that sounds reasonable!

@sabinebaer this configuration was moved to webspace xml file ...


The switch from Bytecode to AST has revealed differences in behavior which were approved

It seems at least the following failures were approved after the change from Bytecode -> AST has landed in 8bf424ea89b956ada5f969db2880355285a311b0 / cl/120720.
language_2/regress_29025_test: Crash
co19_2/LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l1_t04/none: DartkCrash
co19_2/LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l2_t08/none: DartkCrash
language_2/covariant_subtyping_with_mixin_test: RuntimeError
language_2/type_alias_equality_test/03: RuntimeError
language_2/vm/bool_check_stack_traces_test/02: RuntimeError
service/evaluate_activation_test/instance: RuntimeError
vm/dart/il_round_trip_deserialization_test/5: Crash
vm/dart/il_round_trip_deserialization_test/7: Crash

These failures should be investigated and triaged.
(The failures have been approved - but I haven't found any github issue for it!)
/cc @mraleph @a-siva @alexmarkov

These failures are among hundreds of other approved test failures (see test results dashboard for the full list), and they were failing before bytecode was enabled. Some of them are even mentioned in status files and originate before status-file free workflow. They just happened to be fixed by new bytecode pipeline due to various reasons (for example, bypassing certain bugs in AST serialization or flow graph construction). Is there any particular reason to look at them and not other failures, especially given that they will be fixed by switching to the new bytecode pipeline?

Just because they are seemingly passing on bytecode pipeline doesn't mean that there isn't a bug.
For example the vm/dart/il_round_trip* tests: They test functionality for serializing IR graphs out and reading them back in. They should not crash. The failures should be analyzed and triaged and not get ignored.

Here is my understanding why some of these tests fail with AST but pass with bytecode:
language_2/regress_29025_test - most likely related to finalization of recursive types. In bytecode mode most of the type finalization machinery is skipped as types are finalized during bytecode generation.
co19_2/LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l1_t04/none, co19_2/LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l2_t04/none, co19_2/LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l2_t08/none - crash during kernel AST serialization. Crashed code is not used when bytecode is serialized.
language_2/covariant_subtyping_with_mixin_test - problem with how AST-based flow graph builder generates parameter type checks in forwarding stubs, tracked in https://github.com/dart-lang/sdk/issues/34321. Bytecode generator correctly handles this case.
language_2/type_alias_equality_test/03 - this test is for equality of function types. The underlying problem is tracked in https://github.com/dart-lang/sdk/issues/32783. It passes in bytecode as bytecode pipeline is more likely to canonicalize types.
language_2/vm/bool_check_stack_traces_test/02 - AST-based flow graph builder does not correctly assign token position in AssertBoolean check in the code like if (null). Bytecode generator is able to handle this case.
service/evaluate_activation_test/instance - this test is related to expression evaluation inside closures and tracked in https://github.com/dart-lang/sdk/issues/20047. This test passes in bytecode mode because this is captured in bytecode mode and it's available for expression evaluation.
vm/dart/il_round_trip_deserialization_test/5, vm/dart/il_round_trip_deserialization_test/7 - tracked in https://github.com/dart-lang/sdk/issues/36882. There are no comments saying that underlying problem is fixed after the comment https://github.com/dart-lang/sdk/issues/36882#issuecomment-530878161 about these failures. My guess is that flow graph constructed from bytecode is sufficiently different from the one constructed from AST and it doesn't trigger a bug in serialization.

Thank you very much for the analysis, @alexmarkov !

co19_2/LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l1_t04/none,
crash during kernel AST serialization. Crashed code is not used when bytecode is serialized.

We should investigate this issue. I've filed https://github.com/dart-lang/sdk/issues/38812 for the CFE team. @johnniwinther  already fixed the bug. Do we know why the bytecode compiler didn't barf when seeing a UnknownType?

vm/dart/il_round_trip_deserialization_test/7 tracked in #36882
There are no comments saying that underlying problem is fixed

Yes, but if the problem doesn't reproduce anymore with bytecode on-by-default it's hard to know the bug is still there. Attempting to reproduce it might fail and the issue might get closed.
At least we have to ping the github issue to say that turning bytecode on will make the issue disappear but the bug is probably still there.

Do we know why the bytecode compiler didn't barf when seeing a UnknownType?

From the call stack of the crash it looks like UnknownType happened in the typedef declaration. typedef declarations are not serialized in bytecode - only the underlying function types.


Add<EMAIL_ADDRESS>

@davidbeckingsale this is the GitHub actions "does not trigger" bug - try changing:
 if: ${{ needs.generate.outputs.empty_matrix == false }}

to
 if: ${{ needs.generate.outputs.empty_matrix == 'false' }}

Superseded by #36


Change from serde::export to std::marker

For some reason under a docker build I get a build error under docker only saying that serde::export is private. This fixes it for me.
error[E0603]: module `export` is private
   --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/tantivy-0.13.2/src/collector/top_collector.rs:5:12
    |
5   | use serde::export::PhantomData;
    |            ^^^^^^ private module
    |
note: the module `export` is defined here
   --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.119/src/lib.rs:275:5
    |
275 | use self::__private as export;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^

thx

thx

Can a 0.13.3 be released with this fix since it is broken following a patch update on Serde... Unless 0.14 isn't far away ? Thx !

Can a 0.13.3 be released with this fix since it is broken following a patch update on Serde... Unless 0.14 isn't far away ? Thx !

@appaquet Ok I'll do that today. I don't want to rush on releasing 0.14 as a bug was discovered on the main branch recently, so it will be a 0.13.3

@appaquet Ok I'll do that today. I don't want to rush on releasing 0.14 as a bug was discovered on the main branch recently, so it will be a 0.13.3

@appaquet @jamescorbett Published 0.13.3.

@appaquet @jamescorbett Published 0.13.3.


[Question] Does the userId change?

System Information (Required)

anguage: node
Development Environment: other

Issue Description
I have a general question regarding userId and I have read all the relevant documentation. I know the userId is uniquely assigned per bot per channel, but does it ever change? (As we go to production and need to use token to authorize users, i need such info). Who issues these ids? my guess is the channels, right?
If I change some of the info on microsoft's bot framework site about my bot, for example, it's name or something, does the userid or botid change?
thnaks in advance

@panosVeran The user.id property is specific to the channel, as defined in the IIdentity interface. The bot.id property is also an instance of the IIdenty type and is unique to the channel as well.

yeap, i know that.
let me give you an example. in my company we have a bot, we stored the userids of the users so we can offer them authorization to be able to access personalized information. However at some point the Userids for a specific channel changed. the users weren't able to access their info because the new ids didn't much the old ones.
So, why did they change? the channels are responsible for issuing the ids? the framework? what happened in the case i described you?
thanks in advance

Hi @panosVeran
Please check out https://docs.microsoft.com/en-us/bot-framework/resources-identifiers-guide Depending on the channel you are using, the identifier might not be reliable.


feat: add compute plan creator

Description
This draft PR is a result of october 27th "flash hackathon" involving @HamdyD and @alexisdeh. The goal was to figure out how we could store a link to the user who registered each asset (= the creator), and then allow to filter assets created by a given user.
A question was raised about the privacy of this information. More precisely: Should other organizations know which user registered which asset ? This would expose information about the users that belong to an organization, and how they work within the substra channel.
Without definitive answer, we decided to keep it private to the organization the user belongs to. This implies that:

The creator cannot be stored in the orchestrator, since the meta-data in orchestrator are visible to the entire channel.

It is stored only in the local backend database, not registered in the orchestrator so not synchronized with other backends.

So the value will be null for assets registered from other backend
⚠ This proposal relies on the assumption that there is a 1-1 relation between the organization and the backend. This needs to be checked.

Other note: In the migration we leave the default value to null, so previously existing assets will have a null value. This could be interpreted as an asset registered by a user from another organization, but we believe the owner field can be used to make the difference.

We have an issue with the instance that are not migrated. For instance, the compute plan already created will be set at null and translated in the frontend as external, where it might not be the case.
This is the solution we discussed with @acellard :

no data migration : all compute plans created before this PR will have a creator set as null. We will have to explain this behaviour to the users of the only live instance ;
for all new compute plans, if we have a creator we store it;
If we receive null as creator from the orchestrator, we set it as external in localrep, which avoid confusion with the compute plan created before this PR, also stored as null.

Missing the test and this PR is good for review.

/e2e --help

Usage: /e2e [options] [help]

/e2e may appear anywhere as long as it is on its own line

Options:
  --refs <value>                                         Extra refs (branch or tag) with format REPO=GIT_REF,REPO=GIT_REF.
  Supported repositories: substra-hlf-k8s, orchestrator, substra-backend, substra-frontend, substra-tools, substrafl, substra, substra-tests, substra-ci.
  Example: /e2e --refs substra-backend=some_branch,orchestrator=some_tag (default: {})
  --tests-to-run, --tests <tests-to-run>                 Comma-separated list of tests to run. Valid options: sdk,substrafl,frontend or NONE. (default: "sdk")
  --benchmarks-to-run, --benchmarks <benchmarks-to-run>  Comma-separated list of workflows tests to run. Valid options: mnist, camelyon or NONE. (default: "NONE")
  --orchestrator-mode, --mode <orchestrator-mode>        Comma-separated list of orchestrator modes to run tests for. Valid options: standalone,distributed (default: "standalone,distributed")
  -h, --help                                             display help for command

/e2e --mode standalone

End to end tests: :hourglass_flowing_sand: STARTING

⚠ This proposal relies on the assumption that there is a 1-1 relation between the organization and the backend. This needs to be checked.

After discussion during a previous AAF : no need to rely on the assumption of a 1-1 relation between the organization and the backend (which is true now but can become false in the future) but on 1-1 relation between the organization and an substra deployment, more precisely, postgres db, and this is and will stay true.
Can you confirm @mblottiere ?

So the value will be null for assets registered from other backend

PR was updated, the value will be the reference to a specific Django user "external".

/e2e --refs substra-tests=feat/asset_author

End to end tests: :hourglass_flowing_sand: STARTING

/e2e --refs substra-tests=feat/asset_author

End to end tests: :hourglass_flowing_sand: STARTING

/e2e --refs substra-tests=feat/asset_author

End to end tests: :hourglass_flowing_sand: STARTING

/e2e --refs substra-tests=feat/asset_author

End to end tests: :hourglass_flowing_sand: STARTING

/e2e --refs substra-tests=feat/asset_author,substra=feat/asset_author

End to end tests: :hourglass_flowing_sand: STARTING

/e2e --refs substra-tests=feat/asset_author,substra=feat/asset_author

End to end tests: :hourglass_flowing_sand: STARTING

/e2e --refs substra-tests=feat/asset_author,substra=feat/asset_author


R_X86_64_IRELATIV (.got.plt) seems wrong?

$ readelf -r test | grep -i 6b90c0
0000006b90c0<PHONE_NUMBER>25 R_X86_64_IRELATIV                    423400

IDA gives (correct):

Binja gives (seems wrong):

Fixed :)


Fix golangci-lint invocation

The old version didn't actually run with go 1.13 anymore, so it
just exited right away. update to a working version and fix the fallout.
Why is this PR needed?
Does it fix an issue? addresses a business case?
add a description and link to the issue if one exists.
Fixes #
Reminder: Add the "fixes bsc#XXXX" to the title of the commit so that it will
appear in the changelog.
What does this PR do?
please include a brief "management" technical overview (details are in the code)
Anything else a reviewer needs to know?
Special test cases, manual steps, links to resources or anything else that could be helpful to the reviewer.
Info for QA
This is info for QA so that they can validate this. This is mandatory if this PR fixes a bug.
If this is a new feature, a good description in "What does this PR do" may be enough.
Related info
Info that can be relevant for QA:

link to other PRs that should be merged together
link to packages that should be released together
upstream issues

Status BEFORE applying the patch
How can we reproduce the issue? How can we see this issue? Please provide the steps and the prove
this issue is not fixed.
Status AFTER applying the patch
How can we validate this issue is fixed? Please provide the steps and the prove this issue is fixed.
Docs
If docs need to be updated, please add a link to a PR to https://github.com/SUSE/doc-caasp.
At the time of creating the issue, this PR can be work in progress (set its title to [WIP]),
but the documentation needs to be finalized before the PR can be merged.
Merge restrictions
(Please do not edit this)
We are in v4-maintenance phase, so we will restrict what can be merged to prevent unexpected surprises:
What can be merged (merge criteria):
    2 approvals:
        1 developer: code is fine
        1 QA: QA is fine
    there is a PR for updating documentation (or a statement that this is not needed)

Tests pass and I do not forsee anything re CI that could go wrong, so I am accepting it. When you have the other approval, feel free to  merge.


Name clashes in mgem-list entries

When checking out the git repository associated with an item in mgem-list, the checked-out repository takes its name from the source repository, not the mgem itself and the build system does not enforce that the names are consistent.
In my specific example, mgem-process.gem points to repository https://github.com/iij/mruby-process.git while mgem-process2.gem points to https://github.com/katzer/mruby-process.git.  If I include them in the same buld_config.rb file:
MRuby::Build.new do |conf|
  conf.toolchain

  conf.gem :mgem => 'mruby-process'
  conf.gem :mgem => 'mruby-process2'

  conf.enable_bintest
  conf.enable_test
end

rake will only check out one of them.
(In this specific case, this often passes its tests because mruby-process2 is derived from mruby-process.  However, the build will sometimes fail after a rake clean because the .lock file points to a commit ID that is only in the other repository.  However, the potential for hard-to-diagnose bugs in this case is pretty high.)
My initial idea for a fix is to name the checkout after the .gem file instead of the originating repository but I haven't yet looked into what that entails.

Hi, I am the author of mruby-process2. I wonder why you're adding both gems to your build. Even if the build system would pick the right repo, both mgems override each other in terms of functionality.

Hi @katzer,
The above example is contrived.  However, I've run into the case where
I explicitly use mruby-process2 but several dependencies use
mruby-process (specifically mruby-dir-glob and mruby-open3 in my
case.)  This results in the whole build using either mruby-process
or mruby-process2 with no clear way to specify which one wins.
Currently, my dependency order seems to get yours first so everything
works as expected (and none of the dependencies are incompatible
with it), but there doesn't seem to be a way to guarantee that.
(As an aside, I seem to have run into a related issue in the
mruby-process2 gem as well, which I'll file with you later.  I
mention it because it's possible that I've mistaken that for this
issue in some cases.)
PS: Thanks for your ongoing maintenance of mruby-process2; it's a
really useful gem.

(@katzer: it turns out I was adding the dependency incorrectly, so the apparent other issues is my mistake.  I still maintain that the mruby rakefiles should handle duplicate repository names correctly, though.)

If a distinction is made between clone directories for the purpose of addressing this issue, using the name of mgem-list is not sufficient.
The reason is that there are other cases where git clone is needed.

gem mgem: "gem-name"
gem git: "uri"
gem github: "account/gem-name"
gem bitbucket: "account/gem-name"

Ref. https://github.com/mruby/mruby/blob/3.0.0/doc/guides/mrbgems.md#usage
So my idea is to combine the gem directory name with the git-uri converted to CRC-32 code.
diff --git a/lib/mruby/build/load_gems.rb b/lib/mruby/build/load_gems.rb
index 6609a5c8e..8d74548e5 100644
--- a/lib/mruby/build/load_gems.rb
+++ b/lib/mruby/build/load_gems.rb
@@ -1,3 +1,5 @@
+autoload :Zlib, "zlib"
+
 module MRuby
   module LoadGems
     def gembox(gemboxfile)
@@ -79,7 +81,8 @@ module MRuby
         gemdir = "#{root}/mrbgems/#{params[:core]}"
       elsif params[:git]
         url = params[:git]
-        gemdir = "#{gem_clone_dir}/#{url.match(/([-\w]+)(\.[-\w]+|)$/).to_a[1]}"
+        gemcode = "%08x" % Zlib.crc32(url)
+        gemdir = "#{gem_clone_dir}/#{url.match(/([-\w]+)(\.[-\w]+|)$/).to_a[1]}@#{gemcode}"

         # by default the 'master' branch is used
         branch = params[:branch] ? params[:branch] : 'master'

I tried this patch, and now clone directories are distinguished and commit hashes can be applied.
# build_config

MRuby::Build.new do |conf|
  conf.toolchain
  conf.gem mgem: "mruby-dir-glob"
  conf.gem github: "iij/mruby-process"
  conf.gem github: "katzer/mruby-process" # uses this gem
  #conf.gem mgem: "mruby-process2"
end

I'm not sure if there is another concern.

I like the simplicity of this solution.  However, it occurred to me earlier today that there are times where I want this collision to happen, only in a controlled way.
For example, in my initial example, I was using mruby-process from the mruby-process2 mgem.  In this case, mruby-process2 is a drop-in replacement for mruby-process and (crucially) other gems have mruby-process as a dependency.  What I really want is for the build to use mruby-process2 and for it to satisfy the other gems' dependency on mruby-process.  That is, replace mruby-process with mruby-process2 everywhere.
The behaviour I'm currently envisioning is something like:

The build system maintains a hash that maps repository directory names (e.g. mrgem-process) names to their URLs (e.g. https://github.com/katzer/mruby-process.git).
If a gem dependency tries to add a repository that is already present and the URL is different, it is a build error and the user needs to change their build_config.rb.
conf.gem gets an extra named argument that tells rake to treat this as the canonical version of this dependency and to silently ignore any attempt to check this out from a different source. My initial thought is to call it gemdir: to let the user override the gem directory but also flag it as being the canonical remote repository associated with the name.

So in the above case, rake would fail with an error until I explicitly set mruby-process2 as belonging to mruby-process.  This lets me control what is being used explicitly but will fail with an error instead of providing surprising behaviour.

Probably recently merged #5638 fixed the issue. @suetanvil could you confirm?

This change fixes the problem.  The given example now fails with a helpful error message reporting the name collision.
Note that https://github.com/mruby/mruby/pull/5638 seems to have introduced an error, however: code in load_gems.rb sometimes uses module YAML without first loading the dependency.  I've submitted a pull request to fix this:
https://github.com/mruby/mruby/pull/5656

#5656 is merged. Can we close this issue now?

Yes.  It works for me, in any case.


VAR ansible_virtualization_type is case sensitive

The variable ansible_virtualization_type is case sensitive and the valu is VMware
tasks/sapnotes/2292690.yml
@@ -26,11 +26,11 @@

 - name: apply tuned profile
   shell: /usr/sbin/tuned-adm profile sap-hana
-  when: (ansible_virtualization_type != 'vmware') and ( current_profile.stdout != 'sap-hana' )
+  when: (ansible_virtualization_type|lower != 'vmware') and ( current_profile.stdout != 'sap-hana' )

 - name: apply tuned profile on VMware systems
   shell: /usr/sbin/tuned-adm profile sap-hana-vmware
-  when: ansible_virtualization_type == 'vmware' and ( current_profile.stdout != 'sap-hana-vmware' )
+  when: ansible_virtualization_type|lower == 'vmware' and ( current_profile.stdout != 'sap-hana-vmware' )

Great thanks. Fix is implemented and published to galaxy


"mongocli atlas networking peering list" return none where there is peering

Describe the bug
A clear and concise description of the bug.
I can see peering in the Atlas WebUI, but the CLI does not return the data
mongocli atlas networking peering list --projectId 61af7800d97aa745bf62691a
[]

To Reproduce
Steps to reproduce the behavior:

Run 'mongocli atlas networking peering list ` on project/cointainer that has peering configured
See no peering returned

Expected behavior
Please explain what you expected to happen.
I expect the CLI to return the peering if it exists.
Screenshots
If possible, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: [e.g. Ubuntu Linux 18.04]
MongoCLI version [e.g. 1.2]
Ops Manager Version: [if applicable]

Additional context
Add any other context about the problem here.

Hi @SteveH-US,
Are you sure you are using the correct projectId? I am asking because I cannot reproduce the issue : (.
Which mongocli version are you using? Thanks!
mongocli atlas networking peering list --projectId 5e4e593f70dfbf1010295836
ID                         STATUS               CONTAINER ID
61f2d6b07430f3707b2f3fa6   PENDING_ACCEPTANCE   61f2d6afded017597e54edc7

I'm using
$ mongocli --version
mongocli version: 1.20.4
git version: homebrew-release
Go version: go1.17.2
   os: darwin
   arch: amd64
   compiler: gc

I get no results regardless of which project I use. I know that this particular one has networking peers because I can see them from the WebUI.
The API KEY I'm using has "Organization Read Only" access.

Hi,
I have tried to use mongocli v1.20.4 with Organization Read Only keys but I couldn’t reproduce the issue.
./mongocli atlas networking peering list --projectId 5e4e593f70dfbf1010295836
ID                         STATUS               CONTAINER ID
61f2d6b07430f3707b2f3fa6   PENDING_ACCEPTANCE   61f2d6afded017597e54edc7

A new version of mongocli is available 'v1.21.0'!
To upgrade, see: https://dochub.mongodb.org/core/mongocli-install.

To disable this alert, run "mongocli config set skip_update_check true".

Mongocli is calling this endpoint to list the available network peering connections. Do you mind calling this endpoint with curl? You should run something similar to this piece of code (you need to update it with your public/private keys and projectId)
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
  --header "Accept: application/json" \
  --request GET "https://cloud.mongodb.com/api/atlas/v1.0/groups/{GROUP-ID}/peers?providerName=AWS&pretty=true"

Depending on the response that you get, we may know if it is an issue with Mongocli or with the underline endpoint. Thanks!

Hi,
I tried this RESTful command as recommended on two projects received the same results.
$ # tried the RESTful command
$ curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest   --header "Accept: application/json" \
>   --request GET "https://cloud.mongodb.com/api/atlas/v1.0/groups/{GROUP-ID}/peers?providerName=AWS&pretty=true"
{
  "error" : 401,
  "reason" : "Unauthorized",
  "detail" : "You are not authorized for this resource."
}
$
$ # tried its equivalent mongocli command with the same API key and group ID
$ mongocli atlas networking peering list --projectId $GROUP_ID
[]

The API that I'm using has "Organization Read Only" privileges.
Steve

HI @SteveH-US at this point I think it would be best to open a support case via Atlas support where it be safer to share things like project ID and that would let us look at your particular case to see if this is related to it.

Also just in case, for mongocli atlas networking peering list you need to specify a provider if you dont it defaults to AWS, is your network peering for a different provider?
mongocli atlas networking peering list --help
Retrieve details for all network peering connections in one Atlas project.

Usage:
  mongocli atlas networking peering list [flags]

Aliases:
  list, ls

Flags:
  -h, --help               help for list
      --limit int          Number of items per page.
  -o, --output string      Output format.
                           Valid values: json|json-path|go-template|go-template-file
      --page int           Page number.
      --projectId string   Project ID to use. Overrides configuration file or environment variable settings.
      --provider string    Name of your cloud service provider.
                           Valid values: AWS|AZURE|GCP. (default "AWS")

Please note that this is API behaviour and not related to the CLI if you are specifying the correct provider I would still recommend you to file a support case to look into this for your particular environment

IMHO, the mongocli ought to report an "Unauthorized" error rather than a null result.
There's nothing for support to help with in this case because there is a bug in the mongocli.
Now a support question could be why do I get an "Unauthorized" result from the RESTful API for an API key that has "Organization Read Only" privileges.

I can understand the frustration at this point @SteveH-US but so far we have no conclusive evidence there's an error with mongocli

mongocli ought to report an "Unauthorized" error rather than a null result.

It does when the API keys are incorrect or have no authorization for the Org or Project you are trying to access.
when running
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest   --header "Accept: application/json" \
   --request GET "https://cloud.mongodb.com/api/atlas/v1.0/groups/{GROUP-ID}/peers?providerName=AWS&pretty=true"

did you replace PUBLIC-KEY for your public key, PRIVATE-KEY for your private key and GROUP-ID for your project id? are they correct, do those keys have access to that particular project you're trying to test? do those values match the values you are using on mongocli, for example if using the default profile doing mongocli config describe default matches those used with curl?
Can you please share the project ID you are testing, is it still 61af7800d97aa745bf62691a from your original issue?
Does that project have network peerings?
Do you still not see them when doing mongocli atlas networking peering list?
What cloud provider are those peerings for, as mentioned before both the CLI and the API default to AWS when a provider is not set?
All these questions are better handled by a support case, specially as we'll be discussing information pertaining to your account in a public forum, if there were a bug on the CLI that support case will reach us internally.
On the other hand if you're happy to provide all the information I've asked, starting with project ID that does have network peering, we are happy to provide you with support via a GitHub issue

did you replace PUBLIC-KEY for your public key, PRIVATE-KEY for your private key and GROUP-ID for your project id? are they correct, do those keys have access to that particular project you're trying to test? do those values match the values you are using on mongocli, for example if using the default profile doing mongocli config describe default matches those used with curl?

Yes, in all my examples the API key and project ids used for the curl command where the same as those used for mongocli.

Can you please share the project ID you are testing, is it still 61af7800d97aa745bf62691a from your original issue?
Does that project have network peerings?
I tried several projects, all having network peerings, to eliminate the case where the failure to return unauthorized was project-specific behavior.

Do you still not see them when doing mongocli atlas networking peering list?
For all my projects, this command returns nothing.

What cloud provider are those peerings for, as mentioned before both the CLI and the API default to AWS when a provider is not set?
GCP

I'm surprised that you are pushing back on what is obviously a bug in mongocli. But, I'll submit a support ticket as you've asked.
BTW, there is another bug in the docs.  You can't use a hyphen in the variable name is bash, e.g.  the "PUBLIC-KEY" is an invalid variable name.

thanks @SteveH-US, we'll keep an eye for any internal support case for the CLI
And thanks fro confirming you are using GCP, this could be a case where you need to do mongocli atlas networking peering list --provider GCP the API the CLI consumes doesn't have the ability to list for all cloud providers

the "PUBLIC-KEY" is an invalid variable name.

if this in the public docs for the API I believe this is intentional, I don't think these examples are suppose to be scriptable and intent on users having to replace the values but I'll pass along your feedback


Week 2 Classy Functions - William Du

[x] GitHub page that documents key learnings and code snippets using GitHub and replit TT2
Organize files, directories and menus for the first 3 weeks.
Write Factorial function using classes, providing implementation of call.
Select your own Math function. Write it in Imperative and OOP form.

3/3 points

Crossover Grading:

GitHub page that documents key learnings and code snippets using GitHub and replit (See Challenges at the bottom of  TT2 (Links to an external site.) for details)
Organize files, directories and menus for the first 3 weeks.
Write Factorial function using classes, providing implementation of call.
Select your own Math function. Write it in Imperative and OOP form.
Extra Credit.  Write Palindrome function using classes, must provide implementation of call.  Must indicate where error occurs on front and back comparison.

Individual Grade: 3.75/3  - +1 extra credit from palindrome, working math function using imperative and oop, files organized in directories based on topics, factorial function using class and call working, -.25 for weak page documenting key learnings (oop, functions) using snippets. CB notes is organized and all there with Github actions. Work is organized and easy to see.
Group Crossover Team Grade: 2/2
Total: 5.75/5
Great Job!


Debugger crashes entirely if we're hovering over a variable

Please include the following with each issue:
1. Describe the bug
If we're hovering over a variable the debugger crashes entirely. This happens in the attached AL Project very often, but even there it's just a 90% crash, so a 100% example I can't deliver.
The error states:
Error: Field 'fieldParameters' defined on type 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50100+CalculateValue_Scope__332826218' is not a field on the target object which is of type 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50100+DoSomething1_Scope_1829286777'.

https://user-images.githubusercontent.com/53570297/198226576-9bde55a5-ed33-4945-a088-92dbdce5d054.mp4
2. To Reproduce
Steps to reproduce the behavior:

Publish the attached extension to a v21 sandbox container.
Open the Customer Card, so that the OnAfterGetCurrRecord trigger is executed
Step through the procedures and just hover over the dictionary variable. Sometimes it crashes at the first procedure, sometimes just at the last, sometimes never. But it happens..

pageextension 50101 CustomerCardExtension extends "Customer Card"
{

    trigger OnAfterGetCurrRecord()
    var
        TaskParameters: Dictionary of [Text, Text];
    begin
        TaskParameters.Add('No.', Format(10000));
        CurrPage.EnqueueBackgroundTask(TaskID, Codeunit::RunBackgroundTask, TaskParameters);
    end;

    var
        TaskID: Integer;
}
codeunit 50100 RunBackgroundTask
{
    trigger OnRun()
    var
        TaskParameters: Dictionary of [Text, Text];
        Results: Dictionary of [Text, Text];
    begin
        TaskParameters := Page.GetBackgroundParameters();
        CalculateValue(Results, TaskParameters);
    end;

    local procedure CalculateValue(var Results: Dictionary of [Text, Text]; FieldParameters: Dictionary of [Text, Text])
    var
        ResultValue: Boolean;
    begin
        ResultValue := DoSomething1(FieldParameters);
        Results.Add('Test', Format(ResultValue));
        Page.SetBackgroundTaskResult(Results);
    end;

    local procedure DoSomething1(FieldParameters: Dictionary of [Text, Text]): Boolean
    begin
        exit(DoSomething2(FieldParameters));
    end;

    local procedure DoSomething2(FieldParameters: Dictionary of [Text, Text]): Boolean
    begin
        exit(DoSomething3(FieldParameters));
    end;

    local procedure DoSomething3(FieldParameters: Dictionary of [Text, Text]): Boolean
    begin
        exit(FieldParameters.ContainsKey('No.'));
    end;
}

3. Expected behavior
That the debugger isn't crashing and shows instead the correct values
4. Actual behavior
Debugger crashes entirely.
5. Versions:

AL Language: v10.0.687650
Visual Studio Code: Version: 1.72.2 (user setup)
Business Central: v21.0
List of Visual Studio Code extensions that you have installed: Only AL Language

We experience the same issue but in standard code. The debugger crashes with undefined types in the base application. Debugging is a lottery now 99% of the time the debugger just crashes and we get "The debugger stopped your current activity."

Versions as stated above

We experience the same issue but in standard code. The debugger crashes with undefined types in the base application. Debugging is a lottery now 99% of the time the debugger just crashes and we get "The debugger stopped your current activity."

Versions as stated above

Same for me today, cannot debug on AL Extension v10.1.707468.

The scenario that produces this error is the following.
a  Procedure "foo" is calling procedure "bar"
b. "bar" is called with a VAR record type (can be other types too). Let's name it myRecord.
c. In "bar" you have a breakpoint you hover on the myRecord
d. Execution returns to "foo" and you hover again on myRecord.
Remedy, until we fix it: do not hover on myRecord in bar. Not before you have hovered it on "foo".

I also experienced crashes when debugging our code, one way to avoid the crash is to have different parameter names for each function. What I find is if two functions have the same parameter name, it increases the chance of crashing the debugger.
`pageextension 50101 CustomerCardExtension extends "Customer Card"
{
trigger OnAfterGetCurrRecord()
var
    TaskParameters: Dictionary of [Text, Text];
begin
    TaskParameters.Add('No.', Format(10000));
    CurrPage.EnqueueBackgroundTask(TaskID, Codeunit::RunBackgroundTask, TaskParameters);
end;

var
    TaskID: Integer;

}
codeunit 50100 RunBackgroundTask
{
trigger OnRun()
var
TaskParameters: Dictionary of [Text, Text];
Results: Dictionary of [Text, Text];
begin
TaskParameters := Page.GetBackgroundParameters();
CalculateValue(Results, TaskParameters);
end;
local procedure CalculateValue(var Results: Dictionary of [Text, Text]; FieldParameters: Dictionary of [Text, Text])
var
    ResultValue: Boolean;
begin
    ResultValue := DoSomething1(FieldParameters);
    Results.Add('Test', Format(ResultValue));
    Page.SetBackgroundTaskResult(Results);
end;

local procedure DoSomething1(FieldParameters1: Dictionary of [Text, Text]): Boolean
begin
    exit(DoSomething2(FieldParameters1));
end;

local procedure DoSomething2(FieldParameters2: Dictionary of [Text, Text]): Boolean
begin
    exit(DoSomething3(FieldParameters2));
end;

local procedure DoSomething3(FieldParameters3: Dictionary of [Text, Text]): Boolean
begin
    exit(FieldParameters3.ContainsKey('No.'));
end;

}`

I've only debugged standard functionality...
Crashes all the time...

Any news on this please? Our clients are now almost exclusively on V21 and we can't support them anymore. This causes us and our customers extreme frustration. And to put it more as above. It is not a lottery for us the debugger crashes 100% of the time in V21. It takes between 1 - 100 lines of code of debugging to achieve the "Debugger stopped your current activity"

Bump +1 🦦

The fix for this issue has been checked in to the master branch. It will be available in the bcinsider.azurecr.io/bcsandbox-master Docker image starting from platform build number 22.0.49824.0 and VS Code Extension Version 11.0.713831.
If you don’t have access to these images you need to become part of the Ready2Go program: aka.ms/readytogo
For more details on code branches and docker images please read:
https://blogs.msdn.microsoft.com/nav/2018/05/03/al-developer-previews-multiple-releases-and-github/
https://freddysblog.com/2020/06/25/working-with-artifacts/

The fix for this issue has been checked in to the master branch. It will be available in the bcinsider.azurecr.io/bcsandbox-master Docker image starting from platform build number 22.0.49824.0 and VS Code Extension Version 11.0.713831.
If you don’t have access to these images you need to become part of the Ready2Go program: aka.ms/readytogo
For more details on code branches and docker images please read: https://blogs.msdn.microsoft.com/nav/2018/05/03/al-developer-previews-multiple-releases-and-github/ https://freddysblog.com/2020/06/25/working-with-artifacts/

Just to make sure, both BC platform and the .vsix need to be updated, right? Because I tried with the bcinsider .vsix for AL Language and the debugger still crashes on the current version of BC. @JesperSchulz

This was a platform fix. Not a vsix.

same Error after AL Extension v12.5.914975 update.


Fix ICPC notebook

font size:
https://github.com/kth-competitive-programming/kactl/commit/3ad3b65505e1d1707a66255575757c2692149abd

Add KACTL IntPerm


Silex 1.3 compatibility

I've forked your project. Executing phpunit tests failing with php 5.5 silex 1.3 on branch 1.0.
Can you launch a travis ci build on 1.0 branch?

@ehibes, I add php 5.5, 5.6 to 1.0 branch and it seem that all tests passed

@jenyak I made a video to show you my issue. Perhaps a php extension is missing?

Did you try it in another environment? Only 1 test fail so maybe it some cyrillic related issue, try to replace тест in file I18nRoutingServiceProviderTest.php at line 21, 57 to some latin word.

Oh yes, it's that! Now it works. Thanks!

@ehibes can you give me your phpinfo(); ?

@jenyak here

I'm sure it depends on the environment but I can not identify the exact reason.

I'm working on MacOS. Perhaps it's because of that. You can close this issue, all travis tests pass.


Rename Master to Manager in class names.

This change renames any non-deprecated classes having "master" in the
class name to the same name but with "master" replaced by "manager."

Use IDE refactoring to rename classes having "Master" in the name.
Update accumulo-cluster script to handle the renaming of the
entrypoint Master to Manager.
Update master.thrift to include class renaming but also rename the
thrift file itself from master.thrift to manager.thrift.

re #1642

@ctubbsii it seems removing the Manager main method broke minicluster, so I pushed a fix for that in a new commit. I tried to make use of the KeywordExecutable class there too.

@ctubbsii it seems removing the Manager main method broke minicluster, so I pushed a fix for that in a new commit. I tried to make use of the KeywordExecutable class there too.

Ah, I didn't think about minicluster using them. I figured it was using our Main class entry point. Thanks for catching that.


Search and play tracks in iTunes

Category

[ ] fzf binary
[ ] fzf-tmux script
[ ] Key bindings
[ ] Completion
[ ] Vim
[ ] Neovim
[x] Etc.

OS

[ ] Linux
[x] Mac OS X
[ ] Windows
[ ] Windows Subsystem for Linux
[ ] Etc.

Shell

[x] bash
[x] zsh
[ ] fish

Using a bit of Javascript glue I have made fzf search through iTunes Library.
iTunes collection could be huge in itself and fzf performs here brilliantly locating tracks I didn't know exists.
With help of --bind execute-silent option fzf plays selected track. It works in loop and changes fzf in highly searchable iTunes player.
If you still use iTunes.
Available in VIM or your favorite shell.
Perhaps worth mention in fzf Wiki.
Not and issue.

Thanks for sharing, feel free to add your project to https://github.com/junegunn/fzf/wiki/Related-projects


Make tests predictable without timers

Currently there are tests that depend on lenient timer delays (cough cough distributed_echo). Relying on timers doesn't effectively test the wasmCloud functionality that we are targeting as it may arbitrarily hide performance issues.
In order to make these tests more predictable, one solution might be monitoring the lattice event stream for certain events like "ActorStarted", "HostStarted", "PutLink", etc. This would allow tests to wait for specific events and then assert that the state of the program is how it should be.

Investigation needed here for removing the --test-threads=1 flag as a requirement

Closing this as it's a duplicate.


Adds region in tests

Description of change
To gets tests to pass in the gov cloud and china partitions, the region needs to be specified in some cases. Without this, the head bucket probe to us-east-1 one fails as us-east-1 is in a different partition and so credentials will not work there.
Tested by running in cn-north-1, all tests pass.
Does this change impact existing behavior?
No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).

thanks for the reviews, have updated with the following:

remove region arg from run_in_background test, if running in any partition other than aws, test can be skipped using -- --skip run_in_background
Use env variable for domain
enable fips_tests feature in CI

@ahmarsuhail You have a few conflicts that need resolving, it would be worth to rebase or merge from main.


Package manager doesn't list package

Step 0: Are you in the right place?

For issues or feature requests related to the code in this repository
file a Github issue.

If this is a feature request please use the Feature Request template.

For general technical questions, post a question on StackOverflow
with the firebase tag.
For general (non-iOS) Firebase discussion, use the firebase-talk
google group.
For backend issues, console issues, and other non-SDK help that does not fall under one
of the above categories, reach out to
Firebase Support.
Once you've read this section and determined that your issue is appropriate for
this repository, please delete this section.

[REQUIRED] Step 1: Describe your environment

Xcode version: 13.2.1
Firebase SDK version: any
Installation method: Swift Package Manager
Firebase Component: all
Target platform(s): iOS

[REQUIRED] Step 2: Describe the problem
Steps to reproduce:
Trying to install Firebase using Swift Package Manager, following the official instructions (here).
Step 2 says: In Xcode, install the Firebase libraries by navigating to File > Swift Packages > Add Package Dependency…
Firstly, the menu option 'Swift Packages' doesn't appear under 'File' in my version of XCode, but 'Add Packages' seems to take me to the correct window.
Then Step 3 says: In the prompt that appears, select the Firebase GitHub repository - no prompt appears for me.  I tried typing the given url into the search box at the top right, but it says 'Found 0 results'
I'm totally new to all this, so I've no idea whether I need to enable something first?  Here's what the packages screen looks like for me:

Re: step 2 in the official instructions pointing to the wrong File menu, I have a fix pending for that and it should roll out soon. Thanks for catching it! It changed between Xcode 12 and 13 and we updated our GitHub docs but not the Firebase site docs.

I think I've copied it correctly; I've triple-checked it.  Here's my screen when I paste it in:

If I just type 'https://github.com/' I get lots of results, but as soon as I add the 'f' of 'firebase' I get no results

Just tried to reproduce on my end but was unable to. Apologies if this is a silly question, but did you hit the Return/Enter key? I remember being slightly frustrated that they require it without any "Search" button.

Just tried to reproduce on my end but was unable to. Apologies if this is a silly question, but did you hit the Return/Enter key? I remember being slightly frustrated that they require it without any "Search" button.

That does sound like something I'd forget, to be fair!  But, no, I've definitely hit Enter (several times, very hard!!)

@SharonGilmore Hmm... can you try a different git repo and see if that works for you? https://github.com/google/GoogleUtilities.git is a dependency of ours, can you see that pop up?

Nothing there either, no.  But I tried on a different computer, and on that one both the firebase and the Google one appeared properly.  So it looks like it's my machine.

Okay at least we're getting somewhere! Can you try resetting the Package Caches, reboot your Mac, etc and see if that works? I'll close the issue since it's non-Firebase specific but feel free to keep the discussion going!

Still getting nothing after doing all that.  As I say, I got it working fine on another machine, so it must be my Mac rather than anything on your end.  Doesn't really matter as I'm able to use the other machine anyway, but if I come across a solution I'll post it here for future reference!
Thanks for your help!


Regarding negative similarity score

When I use  angleproto loss to train model, I see cosine similarity values coming negative for some of pairs with label 0. I haven't some across such cases with  softmax  or amsoftmax  losses. Is there  any explanation  why that might be happening?

Cosine similarity can be in the range [-1,1]. Shouldn't a negative score for a negative pair be a good thing?

Below is quote from voxSRC  report  for 2019.   And it is first time when I saw value  being below 0.

All scores were required to be in the close interval [0, 1], where a similarity score of 1 means the pair of segments correspond to the same speaker and 0 means the pair of segments correspond to different speakers

Do you think above condition should be modified so that values are between [-1, 1]  or if not what to do in cases where similarity is less than 0?
Also, interpretation wise what does it  mean by negative similarity here, and correct me if  I am wrong but below is how I interpreted cosine similarity:
1: 100% belong to same person
0: 100% belong to different person
-1: ?

https://en.wikipedia.org/wiki/Cosine_similarity#Angular_distance_and_similarity

I tried angular distance and get better result.

Maybe the cosine similarity is in the range of [-1,1] because the network output isn't ended with a relu activation like common models?


Update config.yml file

Remove traces of AB3 used in the file

Update

Changed "Ab-3" to "Pied Piper"
Update repo link


Resampler questionable results

Attached is a modification of the resamp_crcf_noise_example.c example. Two noise sources are added with a notch in the middle, with a tone added slightly off center. I also added an input argument for the number of filter banks.
With a resampling rate and a cutoff frequency placed between the two noise sources and encompassing the tone, I get very unsatisfactory results from the resample block. The original signal is pretty much unrecognizable in the resampled signal no matter how many banks or taps I afford the resampler.
I've added a standalone firfilt block with the same number of taps as the resampler PFB, and the results before resampling look like it would result in a successful decimation without too much aliasing.
What am I missing? The resampler is configuring a kaiser window LPF, but it's obviously not doing anywhere near the same thing as the one I've designed with the same number of taps. If I need to precede the resampler with another LPF, then I lose out on the very benefits I thought the PFB was designed for.
The program below was run with "-r 0.1 -w 0.04 -s 140 -p 512 -m 8" to get the pictured output. The filter is designed to be 80% of the resample ratio. In this example, the stop band attenuation has to be very large (which I am okay with) in order for aliasing to be below the floor of the notch.
test.txt

Discussed in https://github.com/jgaeddert/liquid-dsp/discussions/338

I am able to reproduce your results with those command-line options. I think those results make sense, actually; you're trying to design a filter with extremely low stop-band suppression (140 dB) but with very few coefficients (m=8). For the resampling rate you're asking for, this isn't really possible without having really really wide transition bands and thus allowing a lot of the noise signal to alias in.
If instead I run your program with a narrower filter bandwidth (commensurate of the bandwidth of the signals you are trying to suppress), less stop-band suppression (60 dB), and a longer filter (-m 20), I get much more reasonable results
./resamp_crcf_noise_example -r 0.1 -w 0.02 -s 60 -p 512 -m 20

Instead of using the resamp_crcf object, you can use the msresamp_crcf object which is almost a drop-in replacement, but performs a series of extremely efficient half-band resampling stages before running the arbitrary rate resampler. From a computation standpoint, this should be much faster, although that might not be your concern.
When I tried this, I'm getting results that I would expect are much closer to what you would want (albeit not as clean as above):

Attached is a slightly modified version of your program to use the multi-stage resampler.
resamp_crcf_noise_example.txt

@jgaeddert I'm hoping this ticket won't reopen when I comment on it, because I think it's a discussion just about DSP and perhaps artifacts of using this library at the moment.
From my understanding, the performance of the filter in the PFB should be determined from the number of coefficients in the entire bank, not just the number in each leg, correct? In that case above, there are m*2*npfb=8k points, or even 20k points in your example, in the PFB and that's why I showed a separate LPF of the same number of coefficients.
The LPF doesn't show any images of the source signal that should be aliasing to such degree back into the passband. In my case, I would really like to see any images of any part of the signal to be very close to or below the level of the original signal, which is why I had picked such an enormous stop band attenuation (I was just trying to find the knob to turn which would give me better results).
I wish it was a bit easier to print out the resulting filter taps so we could visualize what that step is resulting in, it seems that my LPF is not representing what is happening in actuality. Further, I would expect that added coefficients in one form or another (increasing m or npfb), would increase the performance of the filter (by hitting stopband and having a sharping transition band) and I would see some marked benefit in the resulting spectrum, but that also doesn't appear to be so.
Also, let me know if you would like to continue this in the discussions instead of the issues, I don't want to muddy your repo more than I have already!

Yea, I believe you are right that it's the way the arbitrary resampler is choosing the rounded down leg instead of interpolating between samples. I ended up creating a multistage setup with halfbands and the rational resampler and I'm getting results that are far more inline with what I expect. I'd be interested to see if an arbitrary resampler that interpolates gives me better results or not, but for now I'm satisfied with the answer considering that the rational resampler uses the same PFB block and has great results.


.run() modifies integer values to floats

So I've run into this issue where I'm attempting to insert a number inside the database, and it's converting that number (integer) into a floating point.
The code I'm running:
const SQLite = require("better-sqlite3");
const sql = new SQLite('test.sqlite');

sql.prepare(`DELETE FROM testing;`).run();
sql.prepare(`INSERT INTO testing(key, value) VALUES(1, "test")`).run();
sql.prepare(`INSERT INTO testing(key, value) VALUES(?, ?)`).run(2, "test");
sql.prepare(`INSERT INTO testing(key, value) VALUES(?, ?)`).run("three", 3);

(this of course assumes testing exists).
Expected results:
keys should be 1, 2, three
values should be "test", "test", 3
Actual results:
keys are 1, 2.0, three
values are "test", "test", 3.0
So, you can see that it's the escaping done by run() that actually modifies the value into a float, as inserting directly as values works as expected.
Is there any way around this without exposing myself to SQL injection? Would this be considered a bug that can be fixed?

(Note: as a workaround I did .toString() on my inserted key in my actual code, and this does insert the correct values).

This is not a bug, it's a symptom of JavaScript's built-in number format, which is the IEEE-754 standard float format.
There are three solutions:

If the sqlite column was defined with a type affinity of INTEGER (or any string containing INT), then sqlite will automatically convert floats to integers when inserted into that column (as long as the float has no fractional component).
You can use better-sqlite3's bundled Integer class to explicitly insert 64-bit integers into the database.
You can use an SQL casting expression to explicitly convert the value.

Example of solution 1
sql.prepare(`CREATE TABLE testing(key INTEGER, value INTEGER)`).run();

// You should get the expected results with these queries.
sql.prepare(`INSERT INTO testing(key, value) VALUES(1, "test")`).run();
sql.prepare(`INSERT INTO testing(key, value) VALUES(?, ?)`).run(2, "test");
sql.prepare(`INSERT INTO testing(key, value) VALUES(?, ?)`).run("three", 3);

// This solution has the side-effect that if a string looks like an integer, sqlite will
// convert it too. In the example below, both the key and value will become integers.
sql.prepare(`INSERT INTO testing(key, value) VALUES(?, ?)`).run(4, "4");

Example of solution 2
const { Integer } = require('better-sqlite3');

sql.prepare(`INSERT INTO testing(key, value) VALUES(1, "test")`).run();
sql.prepare(`INSERT INTO testing(key, value) VALUES(?, ?)`).run(Integer(2), "test");
sql.prepare(`INSERT INTO testing(key, value) VALUES(?, ?)`).run("three", Integer(3));

Example of solution 3
sql.prepare(`INSERT INTO testing(key, value) VALUES(1, "test")`).run();
sql.prepare(`INSERT INTO testing(key, value) VALUES(CAST(? AS INTEGER), ?)`).run(2, "test");
sql.prepare(`INSERT INTO testing(key, value) VALUES(?, CAST(? AS INTEGER))`).run("three", 3);


BLD: use inline macro

closes #13448
This built locally (on Windows) for py27 and py35.

[Current coverage][cc-pull] is 84.28%

Merging [#13456][cc-pull] into [master][cc-base-branch] will increase coverage by <.01%

@@             master     #13456   diff @@
==========================================
  Files           138        138
  Lines         50929      50929
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits          42925      42926     +1
+ Misses         8004       8003     -1
  Partials          0          0

Powered by Codecov. Last updated by [f752886...22a4781][cc-compare]
[cc-base-branch]: https://codecov.io/gh/pydata/pandas/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/pydata/pandas/compare/f7528866e07048f051f46f621ca76947730c7d32...22a478101457db70e20f8b4ee44067fff203ada8
[cc-pull]: https://codecov.io/gh/pydata/pandas/pull/13456?src=pr

thanks @chris-b1 this seems to fix.


[cmake] Update to 3.21.1

Fixes #18952.

Waiting for vcpkg next release to fix the regressions.

Depends on https://github.com/microsoft/vcpkg/pull/18983

pistache should be fixed by https://github.com/microsoft/vcpkg/pull/18994

/azp run

I already commented in https://github.com/microsoft/vcpkg/pull/18983#issuecomment-882058559, but it may belong to this PR: Users are not notified that they need to re-bootstrap in order to enable cmake 3.21.0 support:
https://github.com/microsoft/vcpkg/blob/111220b3cf3311744369425d5c323a0f17941076/scripts/ports.cmake#L28-L29

@BillyONeal
All the linux regressions are related to meson which in our pipeline system:
/usr/bin/python3 /usr/bin/meson -Dfontconfig=enabled -Dfreetype=enabled -Dxlib=enabled -Dxcb=disabled -Dxlib-xcb=disabled -Dglib=enabled -Dtests=disabled -Dzlib=enabled -Dpng=enabled -Dspectre=auto -Dsymbol-lookup=disabled -Dgtk2-utils=disabled --buildtype plain --backend ninja --wrap-mode nodownload --native /mnt/vcpkg-ci/buildtrees/cairo/meson-nativ-x64-linux.log --default-library static --libdir lib --native /mnt/vcpkg-ci/buildtrees/cairo/meson-nativ-x64-linux-debug.log -Ddebug=true --prefix /mnt/vcpkg-ci/packages/cairo_x64-linux/debug --includedir ../include -Dcmake_prefix_path=['/mnt/vcpkg-ci/installed/x64-linux/debug','/mnt/vcpkg-ci/installed/x64-linux'] /mnt/vcpkg-ci/buildtrees/cairo/src/3627ff7ec2-8ced788615.clean

meson.build:1:0: ERROR: Meson version is 0.53.2 but project requires >= 0.54.0

A full log can be found at /mnt/vcpkg-ci/buildtrees/cairo/x64-linux-dbg/meson-logs/meson-log.txt

Did someone break the version check?

@Neumann-A  Nope.

although the warning message appears too:

The warning is intentional if the system meson version is lower than the one required by vcpkg. But if the warning is fired it should automatically use the meson version supplied by vcpkg.

@Neumann-A  Nope, it always provided the system meson now.

./vcpkg.exe install <some-meson-port> --x-cmake-args=--trace-expand > vcpkg_cmake.log post the log

log.log
https://github.com/microsoft/vcpkg/blob/7dbc05515b44bf54d2a42b4da9d1e1f910868b86/scripts/cmake/vcpkg_find_acquire_program.cmake#L481
I can confirm this line didn't change ${VAR} value.

Ah than this is due to the change of how cmake handles cache vs local variables. Before 3.21 setting a new cache variable would shadow the local variable if the local variable is set before the cache variable. The reason a cache variable is used is due to find_program normally setting a cache variable. As such add a unset(${VAR})  before the setting of the CACHE variable to -NOTFOUND

Another reason why a CACHE variable is used to avoid numerous calls to vcpkg_find_acquire_program

Before 3.21 setting a new cache variable would shadow the local variable if the local variable is set before the cache variable.

Being picky: It did unset the local variable. And the new behaviour needs to be activated via policy or cmake_minimum_required.

Ah than this is due to the change of how cmake handles cache vs local variables. Before 3.21 setting a new cache variable would shadow the local variable if the local variable is set before the cache variable. The reason a cache variable is used is due to find_program normally setting a cache variable. As such add a unset(${VAR})  before the setting of the CACHE variable to -NOTFOUND

Works!

Kitware/CMake 3.21.1 Released.
ref.:
https://cmake.org/download/#:~:text=Latest Release
https://github.com/Kitware/CMake/releases/latest

Waiting for https://github.com/microsoft/vcpkg/pull/19216.

there is already cmake 3.21.1, which provides some fixes for vs 2022 preview 2

/azp run

The cmake regressions are fake now, need to rerun the pipeline tests.

Depends on https://github.com/microsoft/vcpkg/pull/19361.

Depends on #19361.

That's merged now, any other hold-ups?

Depends on #19453.

Ping @dan-shaw for merge this PR.

Thanks for your contribution!