WIP - Restrictednotes

Who is this PR for?
Everybody that touches the code base.
What problem does this PR fix?
refactoring restricted notes
What does this PR do?
Switch restricted notes to es6. Remove window.shared code.
Refactored its associated test.
Checklists

[x] Author - Do a rigorous code review.
[x] Author - Click around http://localhost:3000/students/1/restricted_notes in both win 7 and 8 IE
[x] Author - Did a search of window.shared.jsfilename
[ ] Reviewer - Do a rigorous code review.
[ ] Reviewer checked latest in IE -

@alexsoble this is good for a review. I made lots of notes in /students/1/restricted_notes in ie. Fixed all the bugs that I came across.

@Jngai OK sounds good!

@Jngai Thanks for tackling the Api.jsx refactor! If you want we could cherry pick that out and open it as its own PR — might help us gain momentum to merge in some smaller PRs that convert lower-level JS files.

@alexsoble I finished refactoring the api.jsx. On line 76 I also moved const NotesDetails = window.shared.NotesDetails; down from the top so I am currently working on notesdetails. There is also a bug going on which I am tackling. Would you like to see it?

@alexsoble taking a break and check out my latest commit if you are curious.

@Jngai Here's what I see when I pull down the latest, create restricted note, and navigate to the corresponding student profile:

@alexsoble The page is back up and the issue is because const HelpBubble = window.shared.HelpBubble; and const NotesList = window.shared.NotesList; are not being seen at the top once again. I refactored notes_list.jsx really quickly and got the same issue again because its using const NoteCard = window.shared.NoteCard; as a dependency. This isn't being seen within notes_list.jsx as well. Its pointing me to rewrite the whole thing and I am out of time. Since const HelpBubble and const NotesList is used within the render method. Pulling it down from the top does make sense as well. Eventually either me or somebody else will rewrite all the dependencies and will catch it in the future. Please review.

@Jngai Do you have any ideas about why certain dependencies are not loading at the top of the file but load successfully when called within a function? Or is that still mysterious?

@alexsoble Is still mysterious to me. I was trying to side step the issue by refactoring the other files.

@Jngai Since it's an issue that has been cropping up quite often in this stream of work, I think it's important to investigate and understand why it's happening. I know you're out of hours right now so don't worry if you aren't able to dive in and study the issue right now.

Alright, going to be taking some notes here to guide my review/QA so that you can follow along if you like @Jngai.
This PR refactors four components.

[ ] RestrictedNotesPageContainer.js
[ ] Api.js
[ ] NotesDetails.js
[ ] HelpBubble.js

So I should review/QA not just the Restricted Notes Page Container, but every component that calls Api.js or HelpBubble.js.

One thing I'm seeing is that the files aren't being renamed into CamelCase like @kevinrobinson has been doing with refactored files to mirror the create-react app pattern: https://github.com/studentinsights/studentinsights/pull/1224#issue-269595029
@Jngai I know you're out of time right now so don't worry about implementing these changes, I'll pull this work into my own branch where I make changes and finish off this stream of work so we can get it merged. 👍

@alexsoble I think I was in a hurry so I didn't renamed them into CamelCase. I will definitely follow along and if it helps I can get on a video chat with you.

@Jngai OK! One piece of feedback, if you're in a hurry and don't do something that's on the TODO list, please make a note of it somewhere and let us know.

@Jngai I'm also noticing this code comment at the top of legacy.js:
// legacy, what's left to modulify!

Once components are module-ified, we should remove them from this list because they're already imported elsewhere in other components that depend on them.

@alexsoble I didn't notice that they weren't renamed. Thanks for pointing it out. Ok great about your legacy.js comment.

@Jngai 👍

Closing this in favor of #1326.


added guaranteedError()

Sometimes you just need an error.

<3 Feel free to manhandle the error list.


⚠ Bofrost.de has degraded performance

In 4eac634, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1091 ms

Resolved: Bofrost.de performance has improved in 5e64150.


No .primary class for callouts

The .primary class should borrow from the $primary-color.

95667dba3ed225c3a849fa2afbec75e0f4f1a214


Indexer is harvesting type:Dataset's "provider" property as type:Organization, causing issues in front-end

indexer is harvesting a type:Dataset JSON-LD, that includes a provider property, and then indexing that provider as "@type": "Organization"
result is that front-end searches contain many duplicates when a user clicks on the Institution facet (for names of  "cioos-atlantic" "CIOOS-Atlantic" "cioos-pacific" "CIOOS-Pacific" "St. Lawrence Global Observatory" "slgo" etc)
sample JSON-LD (snippet) causing issues:

{
  "@context": {
    "@vocab": "https://schema.org/"
  },
  "@id": "https://catalogue.cioos.ca/dataset/117de226-5b30-45f6-984e-fb264070ac00.jsonld",
  "@type": "Dataset",
  ...
  "provider": {
    "@id": "https://cioospacific.ca",
    "@type": "Organization",
    "legalName": "CIOOS-Pacific",
    "logo": [
      {
        "@language": "en",
        "@value": "https://catalogue.cioos.ca/base/images/logos/cioos-pacific_logo_RA_EN.png"
      },
      {
        "@language": "fr",
        "@value": "https://catalogue.cioos.ca/base/images/logos/cioos-pacific_logo_RA_FR.png"
      }
    ],
    "name": "cioos-pacific",
    "url": "https://cioospacific.ca"
  },
  ...
}

for now, I've manually edited the index in the live search, to prevent showing this to users
related to https://github.com/iodepo/odis-arch/issues/321

Not mentioned in the initial report here: this issue causes a Javascript error (hidden to the user of course), which makes the interface unusable.  This issue is therefore marked as a Blocker.


garnet: 1.0.15 -> 1.0.16

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for garnet is: Remote cache-store from Microsoft Research
meta.homepage for garnet is: https://microsoft.github.io/garnet/
meta.changelog for garnet is: https://github.com/microsoft/garnet/releases/tag/v1.0.16
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 1.0.16 with grep in /nix/store/2z2ps7188p0xydka4vwaz2nfcg3ppk7y-garnet-1.0.16
found 1.0.16 in filename of file in /nix/store/2z2ps7188p0xydka4vwaz2nfcg3ppk7y-garnet-1.0.16

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

2 total rebuild path(s)

2 package rebuild(s)

First fifty rebuilds by attrpath

garnet

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/2z2ps7188p0xydka4vwaz2nfcg3ppk7y-garnet-1.0.16 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

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

Or:
nix build github:r-ryantm/nixpkgs/50ee2b98cfd94fba2aead3e04a33b8f938000784#garnet

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/2z2ps7188p0xydka4vwaz2nfcg3ppk7y-garnet-1.0.16
ls -la /nix/store/2z2ps7188p0xydka4vwaz2nfcg3ppk7y-garnet-1.0.16/bin

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

1 package built:

garnet

Maintainer pings
cc @getchoo for testing.

fyi, garnet version 1.0.17 has been released.

Result of nixpkgs-review pr 331052 run on x86_64-linux 1

2 packages built:

garnet
nixpkgs-manual


add unit tests

Is your feature request related to a problem? Please describe.
currently, the code does not have unit tests. In the long run, that can be problematic for contributors.
Describe the solution you'd like
A unit test suite with a good enough coverage.
Describe alternatives you've considered
NA
Additional context
NA

@yashvardhan-kukreja I see this is an issue from 2020, is this still pending?  I would be happy to work on it


login error: Error occurred during transmission

When logging into https://rstudio.marineenergy.app as cdobbelaere, got this error:

Rstudio Initialization Error
Error occurred during transmission

Rstudio server Error occurred during transmission - RStudio IDE - RStudio Community
Resetting a user's state on RStudio Workbench / RStudio Server – RStudio Support

To get this working, I logged into the server:
# log into server (docker host)
ssh<EMAIL_ADDRESS>
# log into rstudio docker virtual server
docker exec -it rstudio bash

# change directory to cdobbelaere's  home folder (ie ~)
cd /home/cdobbelaere

# remove config folders
rm -rf .config
rm -rf .local
rm -rf .rstudio

Revisit https://rstudio.marineenergy.app after clearing cookies.
Error: Temporary server error, please try again

Still having trouble, but working in Cristina's Safari (but not Chrome, even after deleting the Cookies from padlock in address bar)


Prevent Tracking From Third Parties

I am not sure if this is a thing but if Plyr tracks its users when watching a video using Plyr weather the video is from YouTube, Vimeo or using the vi.ai ads system. But if Plyr does allow these third parties to track users maybe some improvements can be done to disable the tracking or at least have an option for the web developer when using Plyr to disable third party tracking for privacy.

There’s no tracking. Ads can be enabled and can use vi.ai but are disabled by default.

I am already out of pocket for cost of the current infrastructure for the CDN, I’m hardly going to add tracking 😂


link-buttons do not focus like regular buttons do in firefox

What
In Firefox, by default very few items can be focused - but buttons can.
However, our link buttons can't. This means if you have two items styled like buttons, one a button and one a link button, only one can be focused.
Can be seen in this video tabbing through the new cookie banner:

Why
We have two things that look like buttons, but focus behaves differently in them. This feels wrong. We shim link buttons with js and role=button to help make them behave like buttons - but this appears to be a case where it's not enough.
Anything else
I note Firefox's default behaviour is pretty useless - but since it's default it would be good if our link buttons could behave like the thing they look like.
If others don't see this issue - check you haven't enabled firefox's option to make all tabable things tabable.

We're going to do a quick investigation to see if [tabIndex=0] might give us a more consistent behaviour.
If it doesn't or this isn't something we want to do, we'll close this and reference it as a note in the backlog entry for buttons.

OK I tried in Safari and Firefox, and [tabindex=0] does not seem to make things tabbable when these settings are enabled.

I have raised a bug for this on Firefox's bug tracker for them to consider: https://github.com/alphagov/reported-bugs/issues/43

Thanks for raising, Ed this is good to know.

Nice, thanks @nickcolley!


[BUG]: Advocate Clerks showing up as 'NA' in Nyay Mitra approval screen

Closing the ticket as Anshumanth has raised the same ticket #2479


add option parameter for the generator

We cannot add option to the choosen generator.
For example with protoc-gen-gotemplate
you can add debug or template_dir option to the generator like :
--gotemplate_out=template_dir=.,debug=true:.
It could be cool to have an option in the Protobuild.toml to be able to add them something like :
[[generator]]
  name = "gotemplate"

  [generator.options]
    debug = true
    template_dir = "."

What do you think ?

Protobuild currently calculates the options to be passed into the generator. You'd have to come up with a way to specify extra options for each instantiation of the generator. Right now, generator is just a string field.
How would this interact with what is already present?


Push Framework argument for .net7.0

@ejizba Just wanted to check with you on this-- so I should only have to pass --arg: Framework net7.0 on project creation since that is when the .csproj is generated and that's where Framework is actually replacing TargetFrameworkValue.
On a FunctionCreate, assumedly the project is already created with the appropriate .csproj file.

For reference, our tests have been creating csproj files this way forever:
protected async initializeTestFolder(testFolder: string): Promise<void> {
        await super.initializeTestFolder(testFolder);
        await AzExtFsExtra.writeFile(path.join(testFolder, 'test.csproj'), `<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <TargetFramework>${this._targetFramework}</TargetFramework>
    </PropertyGroup>
    <ItemGroup>
        <PackageReference Include="${this._isIsolated ? 'Microsoft.Azure.Functions.Worker.Sdk' : 'Microsoft.NET.Sdk.Functions'}" Version="1.0.0" />
    </ItemGroup>
</Project>`);
    }

So I think adding the target framework for all versions shouldn't break anything. Also tried with v3 and it doesn't seem to find the new argument.


Logger

Adds a logger and does all // TODOs that required a logger.
Fixes #180.

Codecov Report

Merging #186 into master will decrease coverage by 0.21%.
The diff coverage is 50%.

@@             Coverage Diff              @@
##             master     #186      +/-   ##
============================================
- Coverage     82.26%   82.05%   -0.22%
- Complexity      316      317       +1
============================================
  Files            39       39
  Lines           733      741       +8
  Branches        153      155       +2
============================================
+ Hits            603      608       +5
- Misses           59       61       +2
- Partials         71       72       +1

Impacted Files
Coverage Δ
Complexity Δ

...jojo/schaapi/pipeline/miner/github/ProjectMiner.kt
0% <ø> (ø)
0 <0> (ø)
:arrow_down:

...ipeline/projectcompiler/javajar/ProjectCompiler.kt
83.33% <0%> (-16.67%)
4 <0> (ø)

...eline/projectcompiler/javamaven/ProjectCompiler.kt
85.71% <100%> (+1.09%)
7 <0> (+1)
:arrow_up:

...i/pipeline/miner/github/GitHubProjectDownloader.kt
65.95% <50%> (+0.84%)
10 <0> (ø)
:arrow_down:

Continue to review full report at Codecov.

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


Still get the wrong answer

Hello ,
We have used your cdQA to test our squad V2.0 dataset , we can have the correct paragraphs. But then it gets the wrong answer all the time. We have checked the retriever. You have tfidf and BM25, the question is , how to improve the accuracy to get the correct answer ?
Thank you
Best Regards,
Jonathan

Hello,
I am afraid cdQA does not perform well with a dataset with a structure similar to squad 2.0, where there are some questions with no answers. I haven't tested it yet to confirm my hypothesis, but I have some reasons to think why it wouldn't work:
Let's say you use a Reader (eg. BERT) fine-tuned on squad 2.0 and it correctly predicts no_answer given a question and a paragraph that has no answer for the question. Now let's use this Reader in the whole cdQA pipeline. When a question is sent to the pipeline, the Retriever will select, let's say, 20 paragraphs that might contain the answer. Let's suppose that only one of these paragraphs might contain the correct answer, but the Reader (BERT) is not that sure about (it doesn't output a very high probability for it). As the other 19 other paragraphs don't have the answer with very high probability, the Reader will output no_answer for all of these 19 paragraphs with a high score. When we get to the Ranker, it will receive 19 no_answer with high probability the only correct answer with a probability not that high. So finally the Ranker will output no_answer most of the time.
I am not saying the pipeline will always behave like, but think about the probabilities here: 1 good answer competing with 19 no_answer with high probability, we will have often bad results.
So, how can we know and calibrate the pipeline so that when we ask a question that cannot be answered with the documents in the database?
One idea that I have, that I have not had the time to test yet is to use a Reader that is not fine-tuned on SQuAD 2.0 (eg. the models we made available with this library) and, by testing a set of questions with answers and another one with no answers, find a threshold for the final score outputted by the pipeline (it's the 4th term in the tuple outputted by cdqa_pipeline.predict()). When you find this threshold you can just do an if-else statement every time try to predict on a question: if score > threshold -> output answer; else -> output "there is no answer".

Hello,
We only use the context part in squad v2.0 dataset, and trying to build our own QA system.

@laifuchicago ,
Sorry, but I am not sure I understand what you are doing exactly, could you be more precise? Can you describe what are the steps you are following?

Hello,
We just loaded the paragraphs from Squad v2, using the pdf_converter.

Thanks,
Could you please show the dataframe outputed by the pdf_converter? Just do a .head(), the first 5 rows is ok.
Could you also please show an example of an incorrect answer? (The question and the output, please)

That's a bit weird, I have just tried to do the same on the train set of SQuAD 2.0, and I got:

There are two things you can do to try to mitigate that, vary the parameter retriever_score_weight of the method .predict() (which is 0.35 by default) and try to see if you get better results; or you can set the parameters n_predictions to more than 1, to get a list with the n most probable results, like so:

But please be aware that the system is not perfect and it is not always going to give the best answers. There are still several improvements to be done, but we are really dependent on the Reader's performance, which is not perfect (c. 81% EM in the case of BERT base) even if you send to it only the paragraph with the correct answer.

Thank you, we will test on Monday. We tried 20 questions, and 18 of them are correct.

90% is a very high performance actually...
The system is expected to have less than 80% of the questions answered correctly.

To Andre:
Now we test with csv, but it has some errors just like below.

@laifuchicago
Not sure if this would help but I also had the same error and this is how I solved it-

I changed literal_eval to eval since it is a trusted input.
The data in the dataframe should be a list data structure.
Every paragraph should be enclosed in double-quotes followed by single quotes, i.e " followed by '


Github Metadata Plugin - Personal Access Token

Hello
after adding the

Personal Access Token
to the env file and saving it to the project root, as described in the readme

got this message from github

We noticed that a valid OAuth, GitHub App or Personal Access Token of yours was committed to a GitHub repository. Disclosing a valid access token would allow other people to interact with GitHub on your behalf, potentially altering data, your contact information, and billing data.
As a precautionary measure, we have revoked the token. You will need to generate a new token for the app to authenticate to GitHub.

how can I solve this issue?

Thanks for checking out this repository. Been kinda behind on checking up on my own open source repositories.
Reading the mentioned issue, It seems like you already found another solution to your problem.
But regarding the original problem, it seems odd that you got the message from Github. Like I described - one shall create the .env file in the project root locally. And that file should never be pushed to Github - since the .gitignore file includes .env. An environment file or similar secret files should never be pushed to Github.


[BUG]: lama anime output

Model
Which model are you using? lama anime
Describe the bug
so in other software give this output like iopaint
https://github.com/VoxelCubes/PanelCleaner/issues/121
this issues
Screenshots
this my  output

System Info
Software version used

Platform: Windows-10-10.0.19045-SP0
Python version: 3.10.9
torch: 2.3.1+cu121
torchvision: 0.18.1+cu121
Pillow: 10.4.0
diffusers: 0.27.2
transformers: 4.42.3
opencv-python: <IP_ADDRESS>
accelerate: 1.0.1
iopaint: 1.5.2
rembg: 2.0.59

@Sanster
I have an idea to address this issue. It seems adding a blur mask—similar to the one used in Stable Diffusion—could solve the problem. This mask would handle the surrounding area, ensuring it matches seamlessly. Additionally, incorporating a histogram-matching process to synchronize the mask with the rest of the image could further enhance the result.

imgs: torch.Tensor =...
masks: torch.Tensor = ...
inpainted_images: torch.Tensor = ...
mask_clone = masks.clone()
mask_clone[:,:,0,0] = 0     # prevent all black mask
img_means = (imgs * (1-mask_clone)).mean(dim=(2, 3), keepdim=True) / (1-mask_clone).mean(dim=(2, 3), keepdim=True)
img_stds = (((imgs - img_means).pow(2) * (1-mask_clone)).mean(dim=(2, 3), keepdim=True) / (1-mask_clone).mean(dim=(2, 3), keepdim=True)).sqrt()
inpainted_means = (inpainted_images * (1-mask_clone)).mean(dim=(2, 3), keepdim=True) / (1-mask_clone).mean(dim=(2, 3), keepdim=True)
inpainted_stds = (((inpainted_images - inpainted_means).pow(2) * (1-mask_clone)).mean(dim=(2, 3), keepdim=True) / (1-mask_clone).mean(dim=(2, 3), keepdim=True)).sqrt()
inpainted_images = (inpainted_images - inpainted_means) / inpainted_stds * img_stds + img_means
inpainted_images = inpainted_images * masks + imgs * (1-masks)

This is a simple statistical equalization process that you can try to apply to minimize the color discrepancy. You can further blur the mask to gain smoother transition in the last step.

imgs: torch.Tensor =...
masks: torch.Tensor = ...
inpainted_images: torch.Tensor = ...
mask_clone = masks.clone()
mask_clone[:,:,0,0] = 0     # prevent all black mask
img_means = (imgs * (1-mask_clone)).mean(dim=(2, 3), keepdim=True) / (1-mask_clone).mean(dim=(2, 3), keepdim=True)
img_stds = (((imgs - img_means).pow(2) * (1-mask_clone)).mean(dim=(2, 3), keepdim=True) / (1-mask_clone).mean(dim=(2, 3), keepdim=True)).sqrt()
inpainted_means = (inpainted_images * (1-mask_clone)).mean(dim=(2, 3), keepdim=True) / (1-mask_clone).mean(dim=(2, 3), keepdim=True)
inpainted_stds = (((inpainted_images - inpainted_means).pow(2) * (1-mask_clone)).mean(dim=(2, 3), keepdim=True) / (1-mask_clone).mean(dim=(2, 3), keepdim=True)).sqrt()
inpainted_images = (inpainted_images - inpainted_means) / inpainted_stds * img_stds + img_means
inpainted_images = inpainted_images * masks + imgs * (1-masks)

This is a simple statistical equalization process that you can try to apply to minimize the color discrepancy. You can further blur the mask to gain smoother transition in the last step.

How can add this?

For me, I modify the code in the models file directly. Take iopaint,model.zits as an example:

Old forward:

        ...
        mask = mask[:, :, 0]
        items = load_image(image, mask, device=self.device)

        self.wireframe_edge_and_line(items, config.zits_wireframe)

        inpainted_image = self.inpaint(
            items["images"],
            items["masks"],
            items["edge"],
            items["line"],
            items["rel_pos"],
            items["direct"],
        )

        inpainted_image = inpainted_image * 255.0
        ...

New forward:

        ...
        mask = mask[:, :, 0]
        items = load_image(image, mask, device=self.device)

        self.wireframe_edge_and_line(items, config.zits_wireframe)

        inpainted_image = self.inpaint(
            items["images"],
            items["masks"],
            items["edge"],
            items["line"],
            items["rel_pos"],
            items["direct"],
        )
        imgs: torch.Tensor = items["images"]
        masks: torch.Tensor = items["masks"]
        inpainted_images: torch.Tensor = inpainted_image
        mask_clone = masks.clone()
        mask_clone[:,:,0,0] = 0     # prevent all black mask
        img_means = (imgs * (1-mask_clone)).mean(dim=(2, 3), keepdim=True) / (1-mask_clone).mean(dim=(2, 3), keepdim=True)
        img_stds = (((imgs - img_means).pow(2) * (1-mask_clone)).mean(dim=(2, 3), keepdim=True) / (1-mask_clone).mean(dim=(2, 3), keepdim=True)).sqrt()
        inpainted_means = (inpainted_images * (1-mask_clone)).mean(dim=(2, 3), keepdim=True) / (1-mask_clone).mean(dim=(2, 3), keepdim=True)
        inpainted_stds = (((inpainted_images - inpainted_means).pow(2) * (1-mask_clone)).mean(dim=(2, 3), keepdim=True) / (1-mask_clone).mean(dim=(2, 3), keepdim=True)).sqrt()
        inpainted_images = (inpainted_images - inpainted_means) / inpainted_stds * img_stds + img_means
        inpainted_images = inpainted_images * masks + imgs * (1-masks)

        inpainted_image = inpainted_images * 255.0
       ...


error while using AzureOpenAIEmbeddingSkill for integrated vectorization

I am trying to use integrated vector approach to chunk and store data and vectors in Azure AI search.
I am able to use  Text.SplitSkill successfully. However when I am trying to use AzureOpenAIEmbeddingSkill it creates an issue.
it gives following error -
Web Api response status: 'Forbidden', Web Api response details: '{"error":{"code":"403","message": "Access denied due to Virtual Network/Firewall rules."}}'
I have already embedding models deployed using Azure OpenAI. I am using it to generate embeddings manually.
so access shouldn't be an issue .
I also tried to perform integrated vectorization through portal too ,but in portal I am getting some weird error.
But in portal when I am trying to use same model for integrated vectorized approach I get this issue. Attached is the screenshot.
1>Can you kindly let me know what can we do to avoid this issue . do we need to redeploy our models?
2>Will this TextSplit skill work with json documents too?or limited to pdfs?

CC @mattgotteiner


Commonalities r0.4.0 release review (M4)

Release PR or issue to review

https://github.com/camaraproject/Commonalities/pull/286
Review actions
Assign this issue to yourself and follow the below list.
For any review action, review the file(s) in the issue/PR listed above.
Put comments in the above issue or PR if they concern non-changed files/text.
Put a short summary of the main review result here into the review issue.
Shortened list for working group release:

[x] changelog updated
[x] readme updated (enforce correct release number / API version naming)

Additional checks:

[x] all outstanding PRs with mandatory changes and artifacts are merged
[x] Internal references between documents are going to the correct release

Release actions
Assign this issue to yourself or another RM team member and follow the below list.
When done, tick the box in this issue.

[x] Review comments addressed (by Sub Project)
[x] TSC approved the release (add comment below with link to minutes)
[ ] Release PR approved (on behalf of Release Management & TSC)
[ ] PR merged (by Working Group codeowner)
[ ] Release created within GitHub (by Working Group codeowner)
[ ] Meta-release plan updated on wiki

Additional comments

Review comments: Minor suggestion on the README.md got committed.
TSC approval done on August 22nd, see https://wiki.camaraproject.org/x/pYBFAg

Release created (https://github.com/camaraproject/Commonalities/releases/tag/r0.4.0) and meta-release wiki page updated


[DRAFT: DO NOT MERGE] Leprae

This pull request is to add samples from the following publication(s):

This PR is for

[ ] Ancient Microbiome
[ ] sedaDNA
[x] Ancient Pathogen

Checklist

[x] Publication is published (preprints currently not accepted)
[ ] Checked the publication is not already in the database
[ ] Checked samples in this publication are not previously published data (newly re-sequenced metagenomes are OK!)
[ ] Checked the list follows conventions as described in the corresponding sample type's README file
[ ] (If applicable) Updated the JSON files under /assets/enums with new categories (e.g. material or archive).
[ ] Does your PR pass validation checks?

If you do not know how to check errors in failed validation checks, expand here

Press 'details' next to the failed check.
Expand the test ancient <list> line with the red X next to it.
Scroll to the bottom of the log, and look for a DatasetValidationError (usually the last line).
Read the error, and fix accordingly. Check the README for a given list for more guidance. If in doubt, ask!

Ah I made the PR
@aidaanva here my comments/checklist

[ ] SRX should be the SRS codes
[ ] Lat/Lon should be no more than 3 decimals


chore(expansion-panel): focus indication

@rachelbt Could you please show a before and after screenshot?

@rachelbt Could you please show a before and after screenshot?

before there was no background color when focusing (using tab) but only native outline.
In chrome 87 the outline is yellow and ugly and also appears when pressing.
I changed the outlined to be transparent and added ripple hover effect on keyboard focus as it behaves in button.
This issue is a fix for this issue that was brought up in #ask-vivid slack channel.:
https://vonage.slack.com/archives/C013F0YKH99/p1658128266899949


state and action prediction

Hi, interesting paper and thanks for sharing the code, QQ, here https://github.com/kzl/decision-transformer/blob/d28039e97a30edaa6839333a8e12661a89ce0861/gym/decision_transformer/models/decision_transformer.py#L96 and here https://github.com/kzl/decision-transformer/blob/d28039e97a30edaa6839333a8e12661a89ce0861/gym/decision_transformer/models/decision_transformer.py#L97, shouldn't they be state_preds = self.predict_state(x[:,1]) and action_preds = self.predict_action(x[:,2]) instead ?

The wording is not super clear but it should be correct:
In line 74 (which is a bit cryptic), we form the sequence (R_1, s_1, a_1, R_2, s_2, a_2, ...).
When we unfold the tokens in line 92, x[:,0] corresponds to (R_1, R_2, ...) and x[:,1] corresponds to (s_1, s_2, ...).
As a result, it makes sense because when you predict the action a_1, you want to condition on R_1, s_1 (thus being x[:,1]).
Not in the paper, but in a dynamics model you'd want to predict s_2 from R_1, s_1, a_1, and as a result you'd want to use x[:,2] to add the action to your conditioning set.

thanks for your reply, maybe I am missing something, " x[:,1] corresponds to (s_1, s_2, ...)." that's what I am saying but you are doing this in the code state_preds = self.predict_state(x[:,2]) , shouldn't it be state_preds = self.predict_state(x[:,1]) ?

x[:,1,t] corresponds to the same token ("vertical column") as s_t, and x[:,2,t] corresponds to a_t.
When we do state prediction, we typically think of a dynamics model as s_{t+1} = f(s_t, a_t). In our sequence modeling framework this instead becomes s_{t+1} = f(a_t, s_t, R_t, a_{t-1}, s_{t-1}, R_{t-1}, ...).
The embedding x[:,2,t] has access (via the causal self-attention mask) to all of those tokens. I.e., we should predict the state after seeing the action, rather than just directly predicting the state after seeing the previous state (which would be something like s_{t+1} = f(s_t).
Actually, the return prediction is a bit weird right now in the code. Using a similar argument, you'd want to use x[:,1] if you want the return prediction to be like a value function (conditioned on s), or x[:,2] to be like a Q-function (conditioned on s and a).

thanks much, got it, makes sense!!


Hide tab-close button on background tabs (when there are many tabs)

Describe the Bug
Overcrowded tab bars have been a source of frustration ever since tabs were introduced into browsers. It’s easy to accidentally close background tabs when you try switching to them.
To Reproduce

Open many tabs.
Hover the mouse cursor over a background tab.

Expected Behavior
The close button shouldn't appear for background tabs when there are many tab; only show it on the current active tab. Both Firefox and Chrome has this behaviour for a reason.

I'm +1 this.

The easiest thing to do was to just always hide the non-active tab's close button so that's what I did here


[ssr] Don't assign DOM shim window.global to window

This means that globalThis.global will retain its Node built-ins, and globalThis.global === globalThis will hold, whereas before it would lose anything we didn't explicitly set on window, so something like global.Promise would be undefined.
This window.global assignment seems to have been done for compatibility with node-fetch, but I tried a fetch from the demo/global/module.js module, and the fetch seemed to work fine. Not sure if there is another invocation path I missed, but it seems ok?
Fixes https://github.com/lit/lit/issues/2118
cc @fetherston

This will go out with the next batch of Lit RC releases, probably a little later this week.


Better error message when device not found

Request description
In this issue,
https://github.com/nod-ai/SHARK-Platform/issues/264
I encountered an error message that looked like
ValueError: <vm>:0: NOT_FOUND; HAL device `__device_0` not found or unavailable: #hal.device.target<"hip", {legacy_sync}, [#hal.executable.target<"rocm", "rocm-hsaco-fb", {iree.gpu.target = #iree_gpu.target<arch = "gfx1100", features = "", wgp = <compute =  fp64|fp32|fp16|int64|int32|int16|int8, storage =  b64|b32|b16|b8, subgroup =  shuffle|arithmetic, dot =  dp4xi8toi32, mma = [<WMMA_F32_16x16x16_F16>, <WMMA_F16_16x16x16_F16>, <WMMA_I32_16x16x16_I8>], subgroup_size_choices = [32, 64], max_workgroup_sizes = [1024, 1024, 1024], max_thread_count_per_workgroup = 1024, max_workgroup_memory_bytes = 65536, max_workgroup_counts = [2147483647,<PHONE_NUMBER>,<PHONE_NUMBER>]>>, ukernels = "none"}>]>;

It would be very very nice if upon encountering an error like this, iree could enumerate the available devices and give something like "you request device x but we only have devices Y, Z, and W. Did you mean to call function f with argument device=y instead of device=x?"
What component(s) does this issue relate to?
Runtime
Additional context
No response

I believe this is happening when trying to initialize a context that is missing executables for devices that are available to it. I'd be happy to do better error reporting at the frontend, even if expensive, but I don't know how to get the union of "you gave us this" and "I have this". Ideas?

If HAL implementations include useful info in iree_hal_driver_dump_device_info then binding/hosting layer could (effectively) --dump_devices. We could have a special status for that (IREE_STATUS_INCOMPATIBLE) so that it could be emitted only when it's a device not found issue and it could dump the entire topology/etc.
Background is that I'm not sure anything we could produce in the lower levels is going to be more useful than what we currently do (dump the executable target as built by the compiler). There's not really such thing as a "supported executable" as it's really the big feature matrix and each embedded executable can sparsely support anything in that space, and we may have multiple embedded executables. e.g. a hardware device/driver may support 3 subarchs but have different extensions on each and the compiled executables in the vmfb may not exactly match any of them. We can't have the runtime tell the user what compiler flags to use because the runtime shouldn't/can't know about them and any number of compile flags may map to viable executables at runtime. It's better than SIGILL (what you'd get from a normal native executable), a CUDA_ERROR_NO_BINARY_FOR_GPU code, etc, at least :)

A dedicated status would at least give a fighting chance of saying something.
As with most things like this, I'm thinking more of field supportability: we're going to get these error messages in bug reports, and being able to redirect/close when we see it is useful. Right now, people are like "is my GPU working?". I need to get this more into "the thing I'm running is incompatible" and bonus points if that has some extra details that will give us a fighting chance to respond to the issues with a "there's your problem (close issue)"

I'll get that new status out in a sec.


Tile Migration is not working

Description
After merged https://github.com/space-wizards/space-station-14/pull/33422 when I started loading my game maps, I ran into this issue where there were tiles named PlatingBurnt and FloorSteelBurnt that were supposed to migrate when loading (doesn't matter if it's the loadmap command or mapping command) - but they ain't migrating as intended. And that's causing an error like:
[INFO] con: localhost@UrPrice2:savemap 5 /Maps220/ss220-box.yml
[ERRO] con: localhost@UrPrice2: ExecuteError - savemap 5 /Maps220/ss220-box.yml:
System.ArgumentException: An item with the same key has already been added. Key: 136
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   at Robust.Server.GameObjects.MapLoaderSystem.WriteTileMapSection(MappingDataNode rootNode, List`1 entities) in D:\SS220\SS220_work\work\RobustToolbox\Robust.Server\GameObjects\EntitySystems\MapLoaderSystem.cs:line 1021
   at Robust.Server.GameObjects.MapLoaderSystem.GetSaveData(EntityUid uid) in D:\SS220\SS220_work\work\RobustToolbox\Robust.Server\GameObjects\EntitySystems\MapLoaderSystem.cs:line 950
   at Robust.Server.GameObjects.MapLoaderSystem.Save(EntityUid uid, String ymlPath) in D:\SS220\SS220_work\work\RobustToolbox\Robust.Server\GameObjects\EntitySystems\MapLoaderSystem.cs:line 204
   at Robust.Server.GameObjects.MapLoaderSystem.SaveMap(MapId mapId, String ymlPath) in D:\SS220\SS220_work\work\RobustToolbox\Robust.Server\GameObjects\EntitySystems\MapLoaderSystem.cs:line 226
   at Robust.Server.Console.Commands.SaveMap.Execute(IConsoleShell shell, String argStr, String[] args) in D:\SS220\SS220_work\work\RobustToolbox\Robust.Server\Console\Commands\MapCommands.cs:line 206
   at Robust.Server.Console.ServerConsoleHost.ExecuteInShell(IConsoleShell shell, String command) in D:\SS220\SS220_work\work\RobustToolbox\Robust.Server\Console\ServerConsoleHost.cs:line 126

Turns out, the tile migration itself ain't happening, which leads to the error of trying to add a key to the dictionary for a non-existent tile prototype. Can you please fix the tile migration so we don't have trouble saving them?
Reproduction
You can see this happening right now on the map Maps/Salvages/small_cargo.yml
Load this salvage and try save
Screenshots
not req

💀

@PJB3005 @DrSmugleaf FYI pls
We cant update our server for mappers with this issue, bcz in this case they cant save maps..

Do not ping staff directly

Wrong repo brother


Probably not an issue with the mod, but I can't build it

I can't seem to be able to build your mod with the latest github commit, and get this error:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':api:compileJava'.
> error: release version 17 not supported

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

If I build via VSCode terminal:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test'.
> There were failing tests. See the report at: (index.html file path)

The test html contained this:

No idea how to contact you otherwise so I made this

This seems to be potentially a Loom issue, am not sure what’s going on here- but the root cause is tests are being remapped to intermediary but run with the named classpath.

could you build it and publish it on the mod page for 1.18?

I've temporarily disabled tests to get it working for now 🙂


Fix GPU memory leak for the CUDA unit tests

This PR:

use the correct option --leak-check full for compute-sanitizer to check the memory leak on the GPU.
fix a GPU memory leak due to the missing of cudaFree for a bool pointer on the GPU.
fix multiple GPU memory leaks by using std::swap rather than std::move in the move constructor and assignment in a CUDA class.

All the GPU unit tests are now passed for GPU memory check on Derecho's A100 GPU. The integration test is not checked for GPU memory leak because it takes too long.
fix #598

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

Project coverage is 93.27%. Comparing base (46d0a74) to head (6206845).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #600   +/-   ##
=======================================
  Coverage   93.27%   93.27%
=======================================
  Files          49       49
  Lines        3464     3467    +3
=======================================
+ Hits         3231     3234    +3
  Misses        233      233

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

@mattldawson @K20shores @mwaxmonsky I ran the GPU memory leak check for the CUDA integration test on Derecho's A100 GPU. It passed the check within 10963461 ms (~3 hours and 10 minutes).


ForkChain

A chain where you first call an LLM to do classification choose which subchain to call, then you call that specific subchain
@sjwhitmore @johnmcdonnell were you guys going to work on this?

@grabblies just built this last week!

But yeah Sam and I were going to try to make actions easier to work with


send event form client

Hello
I found a way to send event from client:
Echo.connector.pusher.send_event(eventname, data, channel)
On Laravel side how can I handle this event?
Thank you

You can’t. That’s the reason why you would use client events. They are only broadcasted from client to client.
You can also use the “whisper” method on Laravel Echo for this.


No hotspots shown with dot

It looks like there are no hotspots showing up on the map. But when searching for a hotspot name it will take me there.

No because you have to transform it to geojson. The hotspots.json is an example of format

Hi @radrob1 thank you for the support you have given me. I have something stable working now. Could I ask you how you generated the example hotspots.json file?


Split the log file in test

Use rspec-log_split to make test debugging much easier.

Reconsider in #526

@halorgium I've got an updated and "polished" gem ready to release here: abstractive/rspec-log_split
I can take over maintenance of that, or work with you on it. Either way can you give me release rights on the gem if you agree? I will DM you my rubygems address.

This code is no longer working, and has not been for a while. The new version of the gem exists at the link in my comment above, and is for now listed by :github in the Gemfile for Celluloid ... it's merged into refactor-test-suite as of now.

@halorgium you can delete the branch when you see all this.


Define quick actions dynamically

Problem
The chat client shouldn't have to wait for the language client initialisation to finish before rendering the UI. Chat client should render the chat UI and then once the language client initialisation is done, the chat client should update the UI configuration to reflect the new information obtained during initialisation. For now, this information is only the available quick actions
Solution
Created new contract between ide extension and chat client that allows the ide extension to send a message about the initialization result to the chat client. The chat client then uses this information to update the default tab data for existing and any new tabs.
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Followed up on: https://github.com/aws/language-servers/pull/326, closing this PR


RichText renders empty elements resulting in broken design

I've been testing out the <RichText /> and came accross a possible problem which is mainly caused by users providing empty elements in the CMS, but it can cause problems in the design when working with ::after or ::before css selectors or other properties that define the size/appearance of the components.
I have already figured out a solution for this problem, which would be to check whether the element is a media element which can be achieved by checking for a url or src attribute and filtering the children in the element creation process to sort out all text elements containing an empty string.
If you want me to create a pull request for this, I have already written some code to fix this.
PS: A problem could be an empty table cell which needs to be displayed. Because of this, this feature maybe sould be optional.

Hey @KaterBasilisk6, glad you have been using the project!
Do you have an image example of how it looks with this bug?
I'd love to review your PR. Let me know if you need anything to set up your environment.

Hey @jpedroschmitz, thank you for your quick reply.
I do not think it should be marked as a bug, because it's caused by users providing an empty row after, for example the heading which is not converted into a paragraph. It would be an enhancement for users and developers to easily remove those elements on creation if they want to. (Maybe we could provide a default list for empty elements to remove and check if the given element belongs to this list, so the developer can keep empty tags like paragraphs, or table cells but remove a second empty heading which would also cause problems in SEO).
/// Structure of Rich Text content
{
  h2: Lorem ipsum dolor sit amet
  h2:
  p: Lorem ipsum dolor...
}

How it currently looks like:

Lorem ipsum dolor sit amet

Lorem ipsum dolor...

How it's intended to look like:

Lorem ipsum dolor sit amet

Lorem ipsum dolor...

I see. We should definitely implement this filter in the project.

I like the idea of defining a list of elements you can remove from rendering if empty, but I think it would be better if we remove all heading elements if they have empty text. Empty headings will affect SEO, and we don't want this to happen.
About the other elements, I don't see any problem in rendering if empty. Images, Videos, iframes will never be empty. And elements like blockquote and lists don't need to be removed IMO.

Hey, I've published 0.1.3 on NPM that fixes the issue!
Thanks for your help @KaterBasilisk6 ❤

Hi!
I'm having a similar issue with rendering empty theads. I get a validateDOMNesting error that says "Whitespace text nodes cannot appear as a child of ." In the editor I have a table that has 1 row and 2 columns, and no header.
Would it be possible to include tables in the rule regulating the rendering of empty elements?
Thanks for this package btw!

Hey @Endorel, sorry for the late reply. I missed this notification :(
Yeah, we can! I'll be working on this project for the next few days! I'll let you know when I add this rule =D

Hey @Endorel, I just published 0.1.5 that fixes this issue! Thanks a lot for reporting it ❤

Great! Thank you for fixing this so quickly! :)


Return correct instance when node is changed

Pull Request
Required Fields
:mag_right: What kind of change is it?

fix

:dart: What has been changed and why do we need it?

In the k8s-view-nodes dashboard, without this change, some of the panels didn't show correct data as instances never updated when a node is changed. I added nodename to select the proper instance.

This is broken after this PR has been merged: https://github.com/dotdc/grafana-dashboards-kubernetes/pull/39
I'm using Rancher K3s Kubernetes distribution. but I see that OKE does not have the same values for node in kube_node_info and node_uname_info expressions.
Maybe we should try to cover both cases @fcecagno?
Thanks!

Hi @strainovic , I just tested this PR and it doesn't return any result in OKE. The idea with #39 was to be more generic because nodename isn't fill the same way in all providers.
Can you share what you get for label_values(node_uname_info{job=\"$job\"}, instance)?

Hi @fcecagno,
Yes, after I submitted this PR, I found yours. label_values(node_uname_info{job=\"$job\"}, instance) returns all instances, while label_values(node_uname_info{nodename="$node",job="$job"}, instance) returns only one instance.
Preview of values
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100
<IP_ADDRESS>:9100

Preview of values
<IP_ADDRESS>:9100

@strainovic I got what you meant, you are right.
I think there should be a solution to cover both cases. I'm trying to set instance variable as something like this:
label_values(node_uname_info{job="$job",instance="$node:9100"} or node_uname_info{job="$job",nodename="$node"}, instance)

However it doens't work this way, have to figure out the correct syntax.

@fcecagno I'm not an expert in this area but will try to explore what we can do here.
@dotdc maybe you have something for us? :)

Just made a test on two different Kubernetes distributions and came up with a potential solution.
@strainovic @fcecagno Can you both try to set the instance variable query to :
label_values(node_uname_info{instance="$instance"}, instance)
Works on my side, but didn't try on k3s, and don't have access to any OKE...
Let me know !

I'm confused with the proposal @dotdc . You're setting the instance variable using instance in the template. I think it's expected node to be used in the template.

@fcecagno Probably a (missing) refresh illusion, will see if I can find something later.

Just reverted the change as I think the old version is more common, even If I don't have all the data...
I'm actually doing some tests using kind, but I start to doubt we can fix it for everyone out of the box (without relabeling).
@fcecagno Are you using kube-prometheus-stack?
I tied to the underlying infrastructure, did you try to open an issue on OKE (Oracle?) side?
If an actual nodename could be present in the node label instead of an IP, that would help! :innocent:
Will probably close this PR and create an issue if we don't find a solution quickly.

The reverted version works on K3s. Thanks

Ok thank you

Thanks @dotdc and all for the discussion.
I've opened the following issue because of the way nodes are named on OCI: https://github.com/oracle-terraform-modules/terraform-oci-oke/issues/705
Hopefully it's going to be possible to use the dashboards out of the box.

I'm closing this pull request, the patch is already on master and the issue is described in README.md.

For posterity (and future google searches):
I've been initially hit by this problem while trying out the grafana agent operator and it's node exporter integration (basically, it bundles the node exporter in its code and spawns it as a daemonset), because the label values were a bit different:
node_uname_info{agent_hostname="squirrel:8080",cluster="loutre",domainname="(none)",instance="squirrel:8080",job="integrations/node_exporter",machine="x86_64",nodename="grafana-agent-integrations-ds-hmx8g",release="5.15.85",sysname="Linux",version="#1-NixOS SMP Wed Dec 21 16:36:38 UTC 2022"}

I was able to make the dashboards work with the following relabelings:
relabel_configs:
      - action: replace
        replacement: node-exporter
        target_label: job
      - action: replace
        source_labels:
          - agent_hostname
        regex: (.*):(\d+)
        replacement: $1
        target_label: nodename
      - action: replace
        source_labels:
          - agent_hostname
        regex: (.*):(\d+)
        replacement: $1
        target_label: instance

Is this worth documenting and making a PR?

@Chewie Of course!
I would prefer if the relabel_config can be adapted to a kube-prometheus-stack deployment with a badly configured k8s cluster. If you're willing to do that, I can provide settings to reproduce the issue with kind and kube-prometheus-stack.
Otherwise, just briefly explain the context of your solution.
In all case, the workaround should go there: https://github.com/dotdc/grafana-dashboards-kubernetes#known-issuesr

You're absolutely right, my relabelings work in my specific case (k3s with node exporter through grafana agent integration), but probably wouldn't work in all cases (the agent_hostname label is specific to this integration).
I asked around with friends for access to their various prometheus instances but wasn't able to find one that exhibits the issue. If you're able to provide a scenario that reproduces the issue I'd be glad to take a look!
I think the first step in the workaround docs should be to explain what values are expected by the dashboards, and then point to various solutions for known cases with bad defaults

Further comments should be done in https://github.com/dotdc/grafana-dashboards-kubernetes/issues/44


[AST Builder] Implement Concat Funciton

Resolve : https://github.com/gluesql/gluesql/issues/745

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

14 of 14 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.001%) to 97.847%

Totals

Change from base Build<PHONE_NUMBER>:
0.001%

Covered Lines:
29716

Relevant Lines:
30370

💛  - Coveralls


where is the cfgs/dataset_configs/waymo_dataset.yaml?

Hello, Thank you for your great works.
I have a problem when I want to use tools/cfg/waymo_p2s.yaml.
it refer the cfgs/dataset_configs/waymo_dataset.yaml but there isn't this file.
I would be very appreciate if you could share this file.
Thank you :)

I found it in OpenPCD. THank you


How to specify a GTT buy or sell?

What do I add to this statement or a similar sell statement to make it GTT (good til time)? By that I mean time in force so that it would be canceled after a stated time? I know I could use a separate line to cancel orders but the api docs say that a GTT order can be specified. Thanks,
Buy 0.01 BTC @ 100 USD
auth_client.buy(price='100.00', #USD
size='0.01', #BTC
product_id='BTC-USD')

You need to set the parameters like this:
auth_client.sell(price='100.00',                             size='0.01',             product_id='BTC-USD'                                                       type="limit",                                                       time_in_force="GTT",                                                       cancel_after="hour")


feat: Estimate usage of aws_autoscaling_group + aws_eks_node_group

Work in progress. Mostly I am opening this PR to ask some questions.
I have prototyped a posteriori estimation of an autoscaling group that has already been launched. Needs smoke testing & unit tests but it will probably work.
Q0: If I run Infracost on an autoscaling group, it seems to populate the instance count of the subresources, but how is it doing this? I don't see where we pass the desired_capacity down to the subresources to populate their node counts.
Note that in Infracost, EKSNodeGroup does not relate to AutoscalingGroup in any way, so the a posteriori estimation will currently only work for ASG resources that are declared as such, not ASGs resulting from the creation of a node group.
Q1: Which usage data is higher priority when we sync usage: the a priori stuff from the terraform code, or the a posteriori data from the cloud? (Seems to me like the cloud will be more accurate, and we could fall back on the TF code; just confirming this.)
Regardless how we count instances, I have a catch-22 due to the way we structured ASGs, EKS and their subresources. - the InstanceCount belongs to the subresource (which has its own EstimateUsage function)

however, counting actual instance usage needs to happen in the context of an ASG (or for an EKS cluster, several ASGs)

Q2: How does the EstimateUsage of the ASG or EKS object influence the usage of its subresources? As currently coded, every resource is estimated in isolation and populates only its own usage map.
I could add a private "hinting" callback to LaunchTemplate and LaunchConfiguration, so they can delegate to their parent resource to count instance usage of the actual ASGs involved. Or, we could rethink the way costs are allocated. (I assume this is a bad idea and that we have good reasons for pushing costs to the leaves of the resource tree.)

Q0
Currently the instanceCount is passed to these functions which creates the subresources.
https://github.com/infracost/infracost/blob/master/internal/providers/terraform/aws/autoscaling_group.go#L50
https://github.com/infracost/infracost/blob/master/internal/providers/terraform/aws/autoscaling_group.go#L59
https://github.com/infracost/infracost/blob/master/internal/providers/terraform/aws/autoscaling_group.go#L62
Note: for Mixed Instance Launch Templates, there is a little more calculation here since it takes into account the weighted_capacity attribute. This logic may be IaC-agnostic so we might want to move it out of the Terraform provider at some point.
Q1
Agree, we should treat the cloud data with higher priority and fallback to the Terraform.

Regardless how we count instances, I have a catch-22 due to the way we structured ASGs, EKS and their subresources

I think the best way of doing this would be to replace the panic with u["instances"] = count.
The subresources values are populated in the PopulateUsage method of the ASG so this should create a usage file like below which should populate the InstanceCount of the subresources:
resource_usage:
  aws_autoscaling_group.my_asg:
    instances: 2

Another option would be to do something like this:
u[subResources[0].Name] = map[string]interface{}{
   "instances": count,
}

Which should create a usage file like:
resource_usage:
  aws_autoscaling_group.my_asg:
    aws_launch_template.my_lt:
      instances: 2

I'm not sure if this answers Q2 as well.
Q4: Should we even have subresources at all? Does a user care that an ASG uses a LT or a LC or do they just want to see the cost components added directly to the ASG?

I'm wondering if it's better if our remediation can somehow update the IaC code itself. For ASGs for example we just need to add enabled_metrics = ["GroupTotalInstances"]. We can then show the cost to the user of enabling these using Infracost itself.

This makes a ton of sense to me, maybe the remediation step should be a separate CLI command.  The best part about this is that we don't need to warn about potential additional costs -- they can run infracost!
I'm sure you've seen yor, but it's a tool for automatically adding tags to IaC.  If we want to process CURs, part of "remediation" could be to use yor to set up cost allocation tags.

@tim775 and @alikhajeh1 -- re remediation, this is the way! We should remove Remediable & remediater and plan to deal with this via logging or code rewriting instead. (Actually, Remediable might have some use w/r/t the logging, but its interface needs to be rethought...)


Check autoprefixer behaviour within govuk-frontend

I’m not 100% sure we’re using autoprefixer as intended. The prefixes are generated correctly for /dist when I condense the mixin down to just min-resolution, but NOT for /package.
Examples
src file with mixin condensed to just min-resolution, with $ratio
expected behaviour: autoprefixer adds the additional prefixes needed
actual behaviour: prefixes not generated
src file:
@mixin govuk-device-pixel-ratio($ratio: 2) {
  @media only screen and (min-resolution: #{($ratio*96)}dpi),
    only screen and (min-resolution: #{$ratio}dppx) {
      @content;
    }
}

generated package:
@mixin govuk-device-pixel-ratio($ratio: 2) {
  @media only screen and (min-resolution: #{($ratio*96)}dpi),
    only screen and (min-resolution: #{$ratio}dppx) {
      @content;
    }
}

The expected behaviour works ok when we remove the $ratio variable and include a hardcoded number instead
src file (hardcoded numbers):
# Condensed mixin to just min-resolution, with fixed number instead of $ratio
@mixin govuk-device-pixel-ratio() {
  @media only screen and (min-resolution: 2dpi),
    only screen and (min-resolution: 2dppx) {
      @content;
    }
}

generated package:
@mixin govuk-device-pixel-ratio() {
  @media only screen and (-webkit-min-device-pixel-ratio: 0.020833333333333332),
    only screen and (min-resolution: 2dpi),
    only screen and (-webkit-min-device-pixel-ratio: 2),
    only screen and (min-resolution: 2dppx) {
      @content;
    }
}

It looks like it’s tripped up by the use of the $ratio variable. When I raised this as an issue, it's suggested we're not using autoprefixer as intended (on CSS rather than on SCSS): https://github.com/postcss/autoprefixer/issues/1355. Not sure where else we’re relying on autoprefixer, but we may want to check/revisit our use of it

Might be a good one to move to postcss.config.js (Co-op example) during https://github.com/alphagov/govuk-frontend/issues/2714?

@vanitabarrett @36degrees Do you know enough about this issue to say if https://github.com/alphagov/govuk-frontend/pull/2870 has fixed it?
The Sass files were also filtered and may have had the same race condition issue

Update: No change, the output (even with the postcss-scss parser) has stayed the same

Update: Autoprefixer now drops the -o-min-device-pixel-ratio query:
@mixin govuk-device-pixel-ratio($ratio: 2) {
  @media only screen and (-webkit-min-device-pixel-ratio: $ratio),
-   only screen and (-o-min-device-pixel-ratio: #{($ratio * 10)} / 10),
    only screen and (min-resolution: #{($ratio * 96)}dpi),
    only screen and (min-resolution: #{$ratio}dppx) {
    @content;
  }
}

Although because it still can't parse #{$ratio} it would remove more in plain CSS:
@mixin govuk-device-pixel-ratio($ratio: 2) {
- @media only screen and (-webkit-min-device-pixel-ratio: $ratio),
-   only screen and (min-resolution: #{($ratio * 96)}dpi),
-   only screen and (min-resolution: #{$ratio}dppx) {
+ @media only screen and (-webkit-min-device-pixel-ratio: $ratio), only screen and (min-resolution: $ratio * 1dppx) {
    @content;
  }
}

We do still run PostCSS + Autoprefixer on our Sass files with the following changes:
 .../components/exit-this-page/_index.scss     |  1 +
 .../dist/govuk/components/header/_index.scss  |  3 ++-
 .../dist/govuk/components/input/_index.scss   |  3 ++-
 .../govuk/components/warning-text/_index.scss |  4 +++-
 .../dist/govuk/helpers/_device-pixels.scss    |  1 -
 .../dist/govuk/helpers/_focused.scss          |  3 ++-
 .../dist/govuk/helpers/_links.scss            |  6 ++++--
 .../dist/govuk/helpers/_shape-arrow.scss      | 12 +++++++----
 .../dist/govuk/helpers/_visually-hidden.scss  | 21 +++++++++++++------
 .../dist/govuk/objects/_template.scss         |  6 ++++--
 10 files changed, 41 insertions(+), 19 deletions(-)

diff --git a/packages/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss b/packages/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss
index d561e99f5..232edb31f 100644
--- a/packages/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss
@@ -5,6 +5,7 @@

   .govuk-exit-this-page {
     @include govuk-responsive-margin(8, "bottom");
+    position: -webkit-sticky;
     position: sticky;
     z-index: 1000;
     top: 0;
diff --git a/packages/govuk-frontend/dist/govuk/components/header/_index.scss b/packages/govuk-frontend/dist/govuk/components/header/_index.scss
index 0b6c47fb3..933eec30e 100644
--- a/packages/govuk-frontend/dist/govuk/components/header/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/header/_index.scss
@@ -192,7 +192,8 @@
     cursor: pointer;

     &:hover {
-      text-decoration: solid underline $govuk-header-link-underline-thickness;
+      -webkit-text-decoration: solid underline $govuk-header-link-underline-thickness;
+              text-decoration: solid underline $govuk-header-link-underline-thickness;

       @if $govuk-link-underline-offset {
         text-underline-offset: $govuk-link-underline-offset;
diff --git a/packages/govuk-frontend/dist/govuk/components/input/_index.scss b/packages/govuk-frontend/dist/govuk/components/input/_index.scss
index 5a71d64ff..4d72419d1 100644
--- a/packages/govuk-frontend/dist/govuk/components/input/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/input/_index.scss
@@ -17,7 +17,8 @@
     border-radius: 0;

     // Disable inner shadow and remove rounded corners
-    appearance: none;
+    -webkit-appearance: none;
+            appearance: none;

     &:focus {
       outline: $govuk-focus-width solid $govuk-focus-colour;
diff --git a/packages/govuk-frontend/dist/govuk/components/warning-text/_index.scss b/packages/govuk-frontend/dist/govuk/components/warning-text/_index.scss
index bf0cd8422..ac4a64975 100644
--- a/packages/govuk-frontend/dist/govuk/components/warning-text/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/warning-text/_index.scss
@@ -40,7 +40,9 @@

     // Prevent the exclamation mark from being included when the warning text
     // is copied, for example.
-    user-select: none;
+    -webkit-user-select: none;
+        -ms-user-select: none;
+            user-select: none;

     // Improve rendering in Windows High Contrast Mode (Edge), where a
     // readability backplate behind the exclamation mark obscures the circle
diff --git a/packages/govuk-frontend/dist/govuk/helpers/_device-pixels.scss b/packages/govuk-frontend/dist/govuk/helpers/_device-pixels.scss
index 1a6ef9f83..087597fe3 100644
--- a/packages/govuk-frontend/dist/govuk/helpers/_device-pixels.scss
+++ b/packages/govuk-frontend/dist/govuk/helpers/_device-pixels.scss
@@ -29,7 +29,6 @@

 @mixin govuk-device-pixel-ratio($ratio: 2) {
   @media only screen and (-webkit-min-device-pixel-ratio: $ratio),
-    only screen and (-o-min-device-pixel-ratio: #{($ratio * 10)} / 10),
     only screen and (min-resolution: #{($ratio * 96)}dpi),
     only screen and (min-resolution: #{$ratio}dppx) {
     @content;
diff --git a/packages/govuk-frontend/dist/govuk/helpers/_focused.scss b/packages/govuk-frontend/dist/govuk/helpers/_focused.scss
index e5e468e03..dd8c8793e 100644
--- a/packages/govuk-frontend/dist/govuk/helpers/_focused.scss
+++ b/packages/govuk-frontend/dist/govuk/helpers/_focused.scss
@@ -26,7 +26,8 @@

   // When a focused box is broken by e.g. a line break, ensure that the
   // box-shadow is applied to each fragment independently.
-  box-decoration-break: clone;
+  -webkit-box-decoration-break: clone;
+          box-decoration-break: clone;
 }

 /// Focused box
diff --git a/packages/govuk-frontend/dist/govuk/helpers/_links.scss b/packages/govuk-frontend/dist/govuk/helpers/_links.scss
index a20b82111..9dad751bb 100644
--- a/packages/govuk-frontend/dist/govuk/helpers/_links.scss
+++ b/packages/govuk-frontend/dist/govuk/helpers/_links.scss
@@ -52,8 +52,10 @@
     text-decoration-thickness: $govuk-link-hover-underline-thickness;
     // Disable ink skipping on underlines on hover. Browsers haven't
     // standardised on this part of the spec yet, so set both properties
-    text-decoration-skip-ink: none; // Chromium, Firefox
-    text-decoration-skip: none; // Safari
+    -webkit-text-decoration-skip-ink: none;
+            text-decoration-skip-ink: none; // Chromium, Firefox
+    -webkit-text-decoration-skip: none;
+            text-decoration-skip: none; // Safari
   }
 }

diff --git a/packages/govuk-frontend/dist/govuk/helpers/_shape-arrow.scss b/packages/govuk-frontend/dist/govuk/helpers/_shape-arrow.scss
index 68f6eaaf8..8036d4e91 100644
--- a/packages/govuk-frontend/dist/govuk/helpers/_shape-arrow.scss
+++ b/packages/govuk-frontend/dist/govuk/helpers/_shape-arrow.scss
@@ -51,22 +51,26 @@
   }

   @if $direction == "up" {
-    clip-path: polygon(50% 0%, 0% 100%, 100% 100%); // 3
+    -webkit-clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
+            clip-path: polygon(50% 0%, 0% 100%, 100% 100%); // 3

     border-width: 0 $perpendicular $height $perpendicular;
     border-bottom-color: inherit; // 2
   } @else if $direction == "right" {
-    clip-path: polygon(0% 0%, 100% 50%, 0% 100%); // 3
+    -webkit-clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
+            clip-path: polygon(0% 0%, 100% 50%, 0% 100%); // 3

     border-width: $perpendicular 0 $perpendicular $height;
     border-left-color: inherit; // 2
   } @else if $direction == "down" {
-    clip-path: polygon(0% 0%, 50% 100%, 100% 0%); // 3
+    -webkit-clip-path: polygon(0% 0%, 50% 100%, 100% 0%);
+            clip-path: polygon(0% 0%, 50% 100%, 100% 0%); // 3

     border-width: $height $perpendicular 0 $perpendicular;
     border-top-color: inherit; // 2
   } @else if $direction == "left" {
-    clip-path: polygon(0% 50%, 100% 100%, 100% 0%); // 3
+    -webkit-clip-path: polygon(0% 50%, 100% 100%, 100% 0%);
+            clip-path: polygon(0% 50%, 100% 100%, 100% 0%); // 3

     border-width: $perpendicular $height $perpendicular 0;
     border-right-color: inherit; // 2
diff --git a/packages/govuk-frontend/dist/govuk/helpers/_visually-hidden.scss b/packages/govuk-frontend/dist/govuk/helpers/_visually-hidden.scss
index ffdc7d608..827090723 100644
--- a/packages/govuk-frontend/dist/govuk/helpers/_visually-hidden.scss
+++ b/packages/govuk-frontend/dist/govuk/helpers/_visually-hidden.scss
@@ -37,7 +37,8 @@

   overflow: hidden if($important, !important, null);
   clip: rect(0 0 0 0) if($important, !important, null);
-  clip-path: inset(50%) if($important, !important, null);
+  -webkit-clip-path: inset(50%) if($important, !important, null);
+          clip-path: inset(50%) if($important, !important, null);

   border: 0 if($important, !important, null);

@@ -49,7 +50,9 @@
   // Prevent users from selecting or copying visually-hidden text. This prevents
   // a user unintentionally copying more text than they intended and needing to
   // manually trim it down again.
-  user-select: none;
+  -webkit-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
 }

 /// Hide an element visually, but have it available for screen readers whilst
@@ -74,7 +77,8 @@

   overflow: hidden if($important, !important, null);
   clip: rect(0 0 0 0) if($important, !important, null);
-  clip-path: inset(50%) if($important, !important, null);
+  -webkit-clip-path: inset(50%) if($important, !important, null);
+          clip-path: inset(50%) if($important, !important, null);

   // For long content, line feeds are not interpreted as spaces and small width
   // causes content to wrap 1 word per line:
@@ -84,7 +88,9 @@
   // Prevent users from selecting or copying visually-hidden text. This prevents
   // a user unintentionally copying more text than they intended and needing to
   // manually trim it down again.
-  user-select: none;
+  -webkit-user-select: none;
+      -ms-user-select: none;
+          user-select: none;

   &:active,
   &:focus {
@@ -96,11 +102,14 @@

     overflow: visible if($important, !important, null);
     clip: auto if($important, !important, null);
-    clip-path: none if($important, !important, null);
+    -webkit-clip-path: none if($important, !important, null);
+            clip-path: none if($important, !important, null);

     white-space: inherit if($important, !important, null);

     // Allow the text to be selectable now it's visible
-    user-select: text;
+    -webkit-user-select: text;
+        -ms-user-select: text;
+            user-select: text;
   }
 }
diff --git a/packages/govuk-frontend/dist/govuk/objects/_template.scss b/packages/govuk-frontend/dist/govuk/objects/_template.scss
index ac246829c..34c50b804 100644
--- a/packages/govuk-frontend/dist/govuk/objects/_template.scss
+++ b/packages/govuk-frontend/dist/govuk/objects/_template.scss
@@ -9,7 +9,9 @@

     // Prevent automatic text sizing, as we already cater for small devices and
     // would like the browser to stay on 100% text zoom by default.
-    text-size-adjust: 100%;
+    -webkit-text-size-adjust: 100%;
+       -moz-text-size-adjust: 100%;
+            text-size-adjust: 100%;

     // Add scroll padding to the top of govuk-template but remove it if the
     // exit this page component is present.
@@ -23,7 +25,7 @@
     // a "wrong way round" way as we hypothesise that the risks of having
     // scroll-padding unnecessarily is better than risking not having scroll-padding
     // and needing it to account for exit this page.
-    @supports (position: sticky) {
+    @supports ((position: -webkit-sticky) or (position: sticky)) {
       scroll-padding-top: govuk-spacing(9);

       &:not(:has(.govuk-exit-this-page)) {


laravel 5 patch

a few minor changes to make the package compactible with Laravel 5
this worked for me to install it in laravel 5
"minimum-stability": "dev",
"repositories": [
		{
			"type": "git",
			"url": "https://github.com/Jir0/laravel-backup.git"
		}
	],
	"require": {
		"laravel/framework": "dev-master as 4.1",
		"schickling/backup": "dev-master"
	},

Could you please fix the tests as well?

as soon as I get my phpunit back online I'll look into it
2015-02-02 10:18 GMT+01:00 Johannes Schickling<EMAIL_ADDRESS>
Could you please fix the tests as well?
—
Reply to this email directly or view it on GitHub
https://github.com/schickling/laravel-backup/pull/57#issuecomment-72426163
.

--
met vriendelijke groeten,
Wannes Gennar


nlp-insights url is wrong in enrich parameter context

http://ingestion-nlp-insights:5000 needs to be enrich-nlp-insights when deployed with clinical_enrichment.yaml

Fixed


Define the relationship between a type and an interface it satisfies [phab:T224]

Created by fromberger at 2017-03-11 01:05:42:
In Go, types may implicitly satisfy interfaces. For example, given an interface
type Fooer interface { Foo() }

a concrete type such as
type T int
func (T) Foo() {}

will satisfy Fooer, so that this is legal:
func Invoke(f Fooer) { f.Foo() }
...
Invoke(T(0))

The question is: What relationship should hold in the Kythe graph between T and Fooer?
Arguably the answer is "none", since there may be no way for the compiler to discover all the interfaces that T satisfies without a global scan of all available code. In practice, however, it is often useful to record the relationship T has to //known// interfaces it satisfies. So for example, if T is defined in package p, it would be reasonable to associate T with all the interfaces declared in p that it satisfies: This we can easily determine at indexing time. In fact, we can extend this to (top-level) interfaces declared in //any// package d that p refers to, because we already have to have their type information in order to compile.
When the relationship is explicit, we use extends, as in
class A implements B {}  // A extends B in the Kythe graph

Do we want to do the same thing for the implicit-satisfaction case? It feels like there is an important difference here, but I'm not sure how to characterize the difference. So the questions to answer here are:

Is this different enough that it deserves its own edge kind?
If so, what should that edge be called, and what should it mean?

fromberger wrote at 2017-03-14 00:09:53:
[edit: fixed typos]
After thinking about it some more, I think this might be worth adding a new implements edge kind for (or perhaps satisfies, though I mildly prefer implements on purely aesthetic grounds).  My rationale is that they answer slightly different questions. Continuing with Go for example, given
type Alpha interface { Foo() }
type Bravo interface { Alpha ; Bar() }

we would say that Bravo //extends// Alpha because by construction any type that satisfies the former also satisfies the latter. Moreover, that property has to remain true unless the declarations of these types change.  In other words: The "extends" relationship is explicitly required by the programmer, and changing the contents of Alpha, or the relationship between Alpha and Bravo, may require //all// implementations of Bravo to be updated.
By contrast if I write:
type S struct{}
func (S) Foo() {}
func (S) Bar() {}

then S implicitly satisfies both Alpha and Bravo, but absent some other use of the type that constraints it further (e.g., code that passes an S to a function taking Bravo), it's not //required// to satisfy either, and changing Bar to Baz would not stop the program from compiling. Perhaps more importantly: If I change the definition of S it has //no effect// on any other implementations. And while changing Alpha may require us to update S if we want that association, it has no pass-along effects.
Is this difference significant enough to deserve its own label? I'm moderately convinced it is, but would welcome other viewpoints.

fromberger wrote at 2017-03-23 20:59:51:
Conclusions:

It is worth modeling, and should be separate from extends (mostly on the grounds that incompleteness is valuable signal).
The name satisfies works and is better than implements because the latter is overloaded by other languages more.

revision #1849


AST Printer with comments?

I would like to use this package to pars and then pretty print JSON with comments. How can I do that? Using AST.JsonDocument.toJSON(ast) and similar methods does not sustain comments

toJSON will return the actual JSON object. If you want to print comments, you need to implement a Visitor that will output them, e.g.:
class MyVisitor extends Visitor {
  constructor() { super(); };

  // pretty printer for all nodes and then for comments:
  comment(commentNode) {
    console.log('[COMMENT]', commentNode.value);
  };
};

I would like to maintain comment locations as much as possible. I will try using the visitor to print. Do you have an example of printer written with the visitor?

@mohsen1 here is an example of CommentVisitor doing printing:
'use strict';

const { parse, Visitor, AST } = require('./index');

const json = `
// before-everything - 1
{"a": "b"}
// after-everything - 1
`;

class CommentVisitor extends Visitor {
  constructor() {
    super();
  }

  comment(commentNode) {
    console.log(`Comment intercepted: ${commentNode.value}`);
    console.log(`Position: ${commentNode.position.human}`);
    console.log('---------------------')
  }
}

const ast = parse(json, {verbose: true, junker: true});
const visitor = new CommentVisitor();
ast.accept(visitor);


[Feature]: Ability to provide custom message to expect or somewhere in the chain

🚀 Feature Proposal
This must have been requested before, but I couldn't find a relevant issue.
In some cases it would be very helpful to be able to customize the error message shown when a test fails. For instance, when using parameterized tests (running multiple values against the same test).
Motivation
This will make Jest better because others around the 'net are coming up with hacky solutions to do this same thing. Other testing frameworks provide this functionality, and I was pretty shocked it wasn't supported.
Example
describe("my test suite", () => {
    it("does something correctly", () => {
        const steps = doSomething();

        steps.forEach(step => {
            expect(step.status).toEqual('success');
        });
    });
});

If one of the steps is not successful, the output from Jest is:
    expect(received).toEqual(expected) // deep equality

    Expected: 0
    Received: 1

      106 |   steps.forEach(step => {
    > 107 |     expect(step.status).toEqual('success');
          |                         ^
      108 |   });

You can see that it is not at all clear which step failed. I suggest the ability to be able to customize the failure message via one of these APIs:
// perhaps easy-ish to implement as an optional pass-through method call
expect(step.status).withMessage(`step ${step.name} exited with status ${step.status}`).toEqual('success');

// or

withMessage(`step ${step.name} exited with status ${step.status}`).expect(step.status).toEqual('success');

// or

withMessage(`step ${step.name} exited with status ${step.status}`, () => {
    expect(step.status).toEqual('success');
});

// or

// perhaps least intrusive and easiest to implement
expect(step.status).toEqual('success', `step ${step.name} exited with status ${step.status}`);

// or

expect(step.status).toEqual('success').withMessage(`step ${step.name} exited with status ${step.status}`);

Pitch
I think since it would apply to all expectations / matchers, that it should be in the core library. I'm not sure it could be bolted -on in a clean way.

Example (bad) workarounds:
// try/catch and then throw within the loop
describe("my test suite", () => {
    it("does something correctly", () => {
        const steps = await doSomething();

        steps.forEach(step => {
            try {
                expect(step.status).toEqual('success');
            }
            catch (e) {
                throw new Error (`step ${step.name} exited with status ${step.status}`);
            }
        });
    });
});

// hack the `expects` to include the context
describe("my test suite", () => {
    it("does something correctly", () => {
        const steps = await doSomething();

        steps.forEach(step => {
            expect(`step ${step.name} exited with status ${step.status}`).toEqual(`step ${step.name} exited with status success`);
        });
    });
});

// remove the outer `it` and move it into the loop
describe("my test suite", () => {
    const steps = await doSomething();

    steps.forEach(step => {
        try {
            expect(step.status).toEqual('success');
        }
        catch (e) {
            throw new Error (`step ${step.name} exited with status ${step.status}`);
        }
    });
});

Alternatively, adding a fail(message) option would also work:
describe("my test suite", () => {
    const steps = await doSomething();

    steps.forEach(step => {
        try {
            expect(step.status).toEqual('success');
        }
        catch (e) {
            fail(`step ${step.name} exited with status ${step.status}`);
        }
    });
});

Did you try jest-expect-message?

Did you try jest-expect-message?

"Yes", but apparently I did a bad job, because it does work after I tried again. Thanks.


cant resolve RCTDeviceEventEmitter

uncaught error Error: UnableToResolveError: Unable to resolve module RCTDeviceEventEmitter from /Users/jonathangertig/sidework/stuffwithsteve/peep/node_modules/react-native-webrtc/RTCPeerConnection.js: Invalid directory /Users/node_modules/RCTDeviceEventEmitter

any ideas @oney

Just update new version on NPM. Please try to see if it's fixed.

That did fix it thanks


Navigator.of().pop() broken in certain criteria, causing ~25% black area at the top of the screen

Steps to Reproduce
I need to check for the validity of the user session in the Account page. When something goes wrong I will redirect the user back to the sign in page to login again. This is done by calling Navigator.of(context).pop(); (to go back to the home page) followed by runApp(new MyApp(homepage: new SignInPage()));.
But I encounter a strange issue that sometimes Navigator.of(context).pop(); doesn't work properly. I think this problem is best illustrated with animated GIFs:
Abnormal
(The runApp call has been delayed to show that Navigator.of(context).pop(); is the problem)

The abnormal behavior is triggered by the following simplified code:
  _loadData() async {
    // In reality, the following line requests an updated user profile from the remote server.
    var refreshUserFuture = Future.value(null);
    // In reality, the following line requests some additional detail from the remote server.
    var loadUserDetailFuture = Future.value(null);

    Future.wait([refreshUserFuture, loadUserDetailFuture]).then((response) {
      response.forEach((v) {
        // In reality, we need to check the response, and goes to the sign in page if user
        // has logged out.
        _navigateToSignInPage();
        return;
      });
    });
  }

  _navigateToSignInPage() {
    // Need to pop back to the homepage first
    Navigator.of(context).pop();
    // Replaces the homepage with the sign in page
    runApp(new FlutterApp(
      homepage: new SignInPage(
        popStateAfterSignIn: false,
      ),
    ));
  }

I tried and found that the problem goes away when

only 1 future is being waited, or
the _navigateToSignInPage() line is not executed inside response.forEach.

[√] Flutter (Channel dev, v0.5.5, on Microsoft Windows [Version 10.0.17134.112], locale zh-HK)
    • Flutter version 0.5.5 at C:\flutter
    • Framework revision 020e0ef55c (3 weeks ago), 2018-06-14 13:17:08 -0700
    • Engine revision c3976b3c71
    • Dart version 2.0.0-dev.61.0.flutter-c95617b19c

[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at C:\Users\CY\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • Java binary at: C:\Program Files\Android\Android Studio 3\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
    • All Android licenses accepted.

[!] Android Studio (version 3.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 22.2.1
    • Dart plugin version 171.4424
    X Unable to determine bundled Java version.
    • Try updating or re-installing Android Studio.

[√] Android Studio (version 3.1)
    • Android Studio at C:\Program Files\Android\Android Studio 3
    • Flutter plugin version 26.0.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)

[!] Android Studio (version 2.1)
    • Android Studio at C:\Android\android-studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    X Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[!] VS Code, 64-bit edition (version 1.23.0)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected devices (1 available)
    • Nexus 5X • 00e1c63e154fae10 • android-arm64 • Android 8.1.0 (API 27)

Also reproduced in this newer Flutter version:
[√] Flutter (Channel master, v0.5.6-pre.124, on Microsoft Windows [Version 10.0.17134.112], locale zh-HK)
    • Flutter version 0.5.6-pre.124 at C:\flutter
    • Framework revision 0329f0c179 (5 hours ago), 2018-07-03 07:37:34 +0100
    • Engine revision 6fe748490d
    • Dart version 2.0.0-dev.63.0.flutter-4c9689c1d2

I'm not sure but I think if for each pushed screen you have made, you can only make Navigator Pop for the same numbers of screens pushed before. So, if you push screen once and pop two or more times (like the abnormal gif) then you will get the black area.
Instead of using return, I'd use break statement to stop the forEach making sure Navigator.of(context).pop() will be executed only a single time.

Yes, you are correct, the issue is caused by Navigator.of(context).pop(); being called twice!
Also thank you for your advice on using break. Actually in my real code there's a check of the response type. What I overlooked is that the condition checking statement of both responses will evaluate to true in the particular case where I need to pop the page and show the login screen.
I'm closing this issue.


NIFI-7304 Removed default value for nifi.web.max.content.size.

Added Bundle#toString() method.
Refactored implementation of filter addition logic.
Added logging.
Added unit tests to check for filter enablement.
Introduced content-length exception handling in StandardPublicPort.
Added filter bypass functionality for framework requests in ContentLengthFilter.
Updated property documentation in Admin Guide.
Renamed methods & added Javadoc to clarify purpose of filters in JettyServer.
Cleaned up conditional logic in StandardPublicPort.
Moved ContentLengthFilterTest to correct module.
Refactored unit tests for accuracy and clarity.
Thank you for submitting a contribution to Apache NiFi.
Please provide a short description of the PR here:
Description of PR
Resolves problems introduced by the default values for the addition of the ContentLengthFilter.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:

[x] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?

[x] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

[x] Has your PR been rebased against the latest commit within the target branch (typically master)?

[x] Is your initial contribution a single, squashed commit? Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not squash or use --force when pushing to allow for clean monitoring of changes.

For code changes:

[x] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
[x] Have you written or updated unit tests to verify your changes?
[ ] Have you verified that the full build is successful on JDK 8?
[x] Have you verified that the full build is successful on JDK 11?
[ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
[ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
[ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
[ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?

For documentation related changes:

[ ] Have you ensured that format looks appropriate for the output in which it is rendered?

Note:
Please ensure that once the PR is submitted, you check GitHub Actions CI for build issues and submit an update to your PR as soon as possible.

@markap14 @thenatog I accidentally rebased and copied these changes to the main branch to resolve the merge conflicts in the previous PR (https://github.com/apache/nifi/pull/4206), so it was easier to just open a new PR with these changes. I'll close the other one. Please review.

+1 please self-merge but reviewed and good to go.

Forgot the closing keywords in the commit. This PR was successfully merged in commit dbee774c5b95121b2d89621fc66f8a215c15ad7c.


Second Edition Proposal

In my opinion, ldpl has a few problems which are integral to the language and thus can only be fixed as a breaking change. In order to minimize the amount of breakage that might happen, I propose releasing an update to ldpl which is similar in nature to python's 3.0 update.
The two major problems this language suffers from are:

It's really hard to differentiate between variable and procedure names (aka identifiers) and sentence words.
Look at the following example:

DATA:
two is number
....
PROCEDURE:
CREATE STATEMENT "Multiply $ by $" exectuing Multiply
CREATE STATEMENT "Multiply $ by two" exectuing MultiplyByTwo
....
Multiply 4 by two

Which of the two statements gets executed? While there is probably an answer to this, It's not immediately obvious.
What I propose is to force the use of the dollar sign ($) before use of variable names, which would solve the problem of ambiguity. with this fix, the example will look like this:
DATA:
two is number
....
PROCEDURE:
CREATE STATEMENT "Multiply $ by $" exectuing Multiply
CREATE STATEMENT "Multiply $ by two" exectuing MultiplyByTwo
....
Multiply 4 by two
# or alternatively:
Multiple 4 by $two

most of the "built-in" statements should be either removed or moved to the standard library.
Even python, a language known for its "batteries-included" approach, doesn't have as many built-in functions as ldpl. For example all of the time statements need to be moved to a time module.

Even python, a language known for its "batteries-included" approach, doesn't have as many built-in functions as ldpl. For example all of the time statements need to be moved to a time module.

That’s not what “batteries-included” means, though. It means that once you install Python, you don’t need to install more packages to get work done. You can just import X and the tools will be already available to you:

The Python source distribution has long maintained the philosophy of "batteries included" -- having a rich and versatile standard library which is immediately available, without making the user download separate packages. This gives the Python language a head start in many projects. — https://www.python.org/dev/peps/pep-0206/

All of Python’s standard library, which is installed alongside Python, is what the “batteries-included” philosophy is about. The “time” module is part of that.
If you go here, you can see that Python’s standard library has more modules than LDPL has functions:
https://docs.python.org/3/library/
I would be happy to see LDPL’s functionality more organized, but not if it means having to install more packages over the internet after you’ve already installed LDPL. There’s just not point in forcing someone to download a “time” module after they’ve installed LDPL when only one “time” module exists. If there were multiple and they had to pick one, sure, but all we’re doing is adding friction. And making it more difficult to get started than with, say, Python.

I think you misunderstood what I meant. I know exactly what "batteries-included" means. What I am for is moving all of the really specific "built in" sentences into stdlib modules that come installed with the language and one can freely load when he needs them, just as I highlighted here:

most of the "built-in" statements should be either removed or moved to the standard library.

@fireofgods LDPL's standard library doesn't come with LDPL, you have to install it separately: https://github.com/lartu/ldpl-std
So I think we agree, I am :+1: on including the standard library with LDPL when you install it.

ah, I didn't realize that ^^'. I just assumed it was included because of the name. Thank you for correcting me!

That's actually a great idea @xvxx (i'm back!), I will be working on that. The standard library and a number of other useful libraries (sockets, for example) should be included with the language and installed alongside it.

@FireofGods, regarding breaking changes, I wouldn't mind jumping to some LDPL 5 with a breaking API and I wouldn't mind forcing the users to preppend $ to the variable names (in fact, in a pre-release version of LDPL (called COBOLARTU), that was how variables where written). If we did this, I'd propose we also move into some compiler-compiler technology, like Antlr (that I used for LAPL) to make the codebase cleaner. In any case it will be a ton of work though. If you want to, you could sign up to the LDPL mailing list and we can plan on how to tackle the task there. It would be a fun endeavour!

Actually, the reason I suggested the $var thing is because it will explicitly make writing a handmade parser a bit easier.
Also, I still haven't heard your stance about putting most of the builtin sentences into the standard library.
IMO, the less compiler magic exists in a language, the better (since you can lookup how a procedure works just by looking at an ldpl file, instead of reading the compiler code).

@FireofGods if we were to use something like Antlr, there would be no need for $. I do like the $var syntax though, it's visually appealing.
Regarding the standard library, I'm not against that for some statements. ADD $ AND $ IN $ could obviously be moved to the standard library, but it just adds a lot of overhead and function calling to a simple addition opperation, so I wouldn't move it. Maybe the time statements could be moved without so much overhead. That should be evaluated for each statement individually. I don't really mind a giant language with lots of built in statements; this is COBOL with a dinosaur after all, minimalism is way out of the picture haha.

Actually, there is probably no overhead to calling such a function since any decent compiler worth it's salt will inline its  body.