Fix SearchOptions missing Debug, Speller, and QueryLanguage

Description
Fixes #43027
Adds back QueryDebugMode, QuerySpellerType, and QueryLanguage to SearchOptions.
All SDK Contribution checklist:

[x] The pull request does not introduce [breaking changes]
[x] CHANGELOG is updated for new features, bug fixes or other significant changes.
[x] I have read the contribution guidelines.

General Guidelines and Best Practices

[x] Title of the pull request is clear and informative.
[x] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

[x] Pull request includes test coverage for the included changes.

API change check
APIView has identified API level changes in this PR and created following API reviews.
com.azure:azure-search-documents


Round profile picture images in desktop notifications.

So it's more consistent with profile picture presentation pretty much everywhere else.
Like this!

Image rounding code from here.

Unfortunately Notification Center still creates an ugly bounding box around it like this:

Personally, I think it's a fine tradeoff--I almost never look at notifications in Notification Center but will almost always see the banners that show up.


Add private function calls check to make sure there isn't one being called outside of the module it was defined

I have drafted a pre-commit hook to make sure there isn't a private function being called outside of the module it was defined. Would it make sense as an optional linting rule? If so I'd be happy to contribute with code.

Is this similar to private-member-access?

Perhaps it could be an extension to that rule, @charliermarsh. My code doesn't check for class private member access. It checks for module private member access. Here's an example of something that should raise an exception:
# a.py
def _foo(*args, **kwargs):
    return "Hello World"

# b.py
import a

print(a._foo())  # Raises an exception

# c.py
from a import _foo

print(_foo())  # Also raises an exception

Have I misunderstood the rule you've mentioned, or am I really onto something here?

I believe this would be closed by https://github.com/astral-sh/ruff/pull/5920.

Indeed, @charliermarsh. Thanks for pointing that out, I didn't see that issue before.


Voting on specific BP causes assertion error

Hi,
Trying to vote
➜  eosc_0.7.0_macOS_x86_64 ./eosc vote producers <my_account_name> eosnewyorkio eoscanadacom eosauthority sheos21sheos eosnationftw hkeoshkeosbp eosaustralia
Enter passphrase to decrypt your vault:
Voter [gm3tomjqgmge] voting for: [eosaustralia eosauthority eoscanadacom eosnationftw eosnewyorkio hkeoshkeosbp sheos21sheos]
Error during vote, https://mainnet.eoscanada.com/v1/chain/push_transaction: status code=500, body={"code":500,"message":"Internal Service Error","error":{"code":3050003,"name":"eosio_assert_message_exception","what":"eosio_assert_message assertion failure","details":[]}}

With tightened list of BP:
➜  eosc_0.7.0_macOS_x86_64 ./eosc vote producers <my_account_name> eoscanadacom sheos21sheos eosflareiobp eosauthority
Enter passphrase to decrypt your vault:
Voter [gm3tomjqgmge] voting for: [eosauthority eoscanadacom eosflareiobp sheos21sheos]
Vote sent to chain.

Note that in both cases all the BP names are valid and exist in eosc vote list.
Expected result: either vote sent to chain or human readable error describing what exactly is wrong.
Suspect it is a EOSIO problem but post it there nevertheless as it is eosc which is sending an API request to eosio.

If you try that again, you should see the error messages.. Since 1.0.7 (or 8 or 9?), there was a new default value for verbose-http-errors to false.. so those errors disappeared. You can try again and tell me what the error says.

Tried with 0.7.5 which is latest as far as I can see in releases (where can I find 1.0.7?):
➜  eos ./eosc vote producers gm3tomjqgmge eosnewyorkio eoscanadacom eosauthority sheos21sheos eosnationftw hkeoshkeosbp eosaustralia --verbose-http-errors=true
Error: unknown flag: --verbose-http-errors


Search index.

Is your feature request related to a problem? Please describe.
Yes, I recently completed "Learn Accessibility by Building a Quiz" in the "Responsive Web Design" lessons. Quite a few of the steps are very vague and ask us to use coding and info that wasn't covered in prior lessons that I can find.
Describe the solution you'd like
It seems that a Search Index of some kind would be very helpful in situations like this. Whether it's a search bar that allows you to look up how the coding was done in prior lessons. Ex: If it requires the use of unordered lists and someone is unsure how, they can type "unordered lists" in the search bar and it will bring up the prior lessons that used it. Making it easier to look up and remember.
Describe alternatives you've considered
Even providing a link that will send the user to a page with information that is relevant to the current step in their lesson would be helpful.
Additional context
No response

This has been on my list for a while. Ideally, we should attach a topic property to the challenge frontmatter, so we can define the topics a challenge teaches. We could then consume that data wherever we felt it would be helpful.

Isn't that what were being done in the Legacy Curriculum? I kinda missed that where every step has a "Title" that I can skim through and go back to that particular step.

@naomi-lgbt that is a great idea. We also need to find a way to display the topic tags on the step grid/ challenge list.

Not sure how we would display the tags on the grid, but I like this idea. We added a "notes" tab to the challenges a while back, none of the steps use it so it never shows up. It's a panel with a button next to the preview button to display it.
Just throwing this out there - we could maybe make a dictionary with tag definitions - add the tags to the steps, and put the definitions in the notes. So if a step needs you to know how to use unordered lists, you would tag the step with ul or whatever, and the ul definition, probably with syntax, would show up in the notes.

Hello Sir please assign me this task

We also need to find a way to display the topic tags on the step grid/ challenge list.

Not sure how we would display the tags on the grid, but I like this idea.

I don't think we need to display them on the map itself, they just need to be available for the client to consume in a search feature. That is, if I want to find lessons that cover ul, I could search and get a list of lessons with that tag.

Heya @Salabh255, thanks for your interest in contributing. This issue has not been fully discussed yet and is not open for contribution. Issues with https://github.com/freeCodeCamp/freeCodeCamp/labels/help wanted or https://github.com/freeCodeCamp/freeCodeCamp/labels/first timers only are open for contribution.

@naomi-lgbt is there anyway we can contribute to the discussion?

The issue linked above this comment discusses the tags that would be required for a search like this, so I think I am going to close this in favor of that for now. If anyone disagrees, feel free to leave a comment. Thanks and happy coding 🎉


proposal: x/exp/xiter: add {Drop,Take}{,While}{,2}

Add
func Drop[K any](int, iter.Seq[K]) iter.Seq[K]

func DropWhile[K any](func(K) bool, iter.Seq[K]) iter.Seq[K]

func Take[K any](int, iter.Seq[K]) iter.Seq[K]

func TakeWhile[K any](func(K) bool, iter.Seq[K]) iter.Seq[K]

(and similarly for the iter.Seq2 variants) to x/exp/xiter.
t := Take(n, seq) returns an iterator t that takes up to the first n results of seq. If seq yields m values than the iterator t yields min(m, n) values.
TakeWhile(pred, seq) is similar to Take except instead of taking a set number of values it yields while pred returns true.
Drop(n, seq) skips the first n results of seq. DropWhile similarly skips results while its predicate evaluates to true.

Note that Take{,2} is Limit{,2} in #61898. This proposal thus includes renaming that.
These names and functions are standard across all languages I checked (Python, Haskell, OCaml, Scheme). I had originally proposed these as LimitFunc{,2} and Skip{,Func}{,2} to go with Limit but decided to stick with the common names in this proposal.
While there is an argument to be made that TakeFunc etc. would be more in line with Go naming, but, in addition, to bucking the trend from other languages' libraries that doesn't say which way the predicate is used whereas While makes it clear.
Here is a link with basic examples and implementations https://go.dev/play/p/DQhz7X_95wf?v=gotip

Also Step ?

Step is far less commonly defined in iter libraries and I've not needed it so I'm not really sure of the use cases. Where does it come up?

Imagine there is a range sequence, let’s think it is implemented like this:
func Range(start, stop int) func(yield func(int) bool) {
    return func(yield func(int) bool) {
        for x := start; x < stop; x++{
            if !yield(x) {
                return
            }
        }
    }
}

So Step can used like this:

func x() {
    for i := range Step(Range(0, 10), 3) {
        print(i)
        // produce 0, 3, 6, 9
    }
}

I understand how to use it not when it would be useful to use.
The Take functions are useful for taking an iterator of unbounded length and providing a stopping condition. It often simplifies both to separate the generate and stop-generating logic, especially since the latter is often involved and specific to a situation.
The Drop functions are useful when you don't need to handle the input until some condition or threshold is passed.
Step only really seems useful for numeric sequences like and even then I can't really think of uses other than what you wrote. Is there a case where you couldn't just put that in the generator? Is there a nonnumeric use case?


⚠ Bofrost.lu has degraded performance

In 8d61eb0, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1368 ms

Resolved: Bofrost.lu performance has improved in ac4d66a after 6 minutes.


Visualization in Fig. 4 and Fig.5

Hello,
"Next, we visualize the semantic cues of subspace U with the largest variation in singular values. The results are shown in Figure 4 and Figure 5". Could you, @syp2ysy, give detail about how to perform this visualization ?

@alpoler
After passing through the U subspace, the dimension of the resulting feature map is the same as that of the singular value vector. Thus, we visualize the feature map generated by U based on the index with the largest and smallest changes in the initial and final singular value vectors.
Simply put, it means that we take two 1xHxW tensors from the feature map based on these two indices.


Failed to debug in Docker

Visual Studio Code - Insiders: 1.33.0-insider
python-insider: 2019.4.6071-alpha
python version: Python 3.7.3 64bit
Make sure docker installed
Repro steps:
1.Git clone https://github.com/qubitron/pydemo
2.Open Anaconda Prompt window
3.Cd pydemo
4.Run py -3 setup.py
5.Open "stackoverflow-flask" folder and open "app->main.py"
6.Set a breakpoint in line 6
7.Switch to "dockerized" branch

8.Change "DEBUG" configuration to "Python: Run in Docker"

9.Start to debug
Expect Result:
Debug in Docker successfully
Actual Result:
Invalid link shown

LS does not have any debugger related functionality. This should go either to https://github.com/Microsoft/vscode-python or https://github.com/Microsoft/ptvsd

Issue moved to Microsoft/ptvsd #1264 via ZenHub


New version noticed displayed after update

I just completed the update to version 0.16.0 following the instructions for data migration and then pulling a new docker-compose.yml file, etc. No errors were displayed during the process, the "Renaming the source directory..." message was displayed. After that, when accessing the web portal the message: "A newer version of trains-server ( 0.16.0) is available" is still being displayed. Is that expected or did I miss a step of the update process? Thank you!
BTW: there seems to be a broken link in "contributing guidelines": please check whether the bug you want to report already appears [here](link to issues

Some more information: the browser console and network tab complain about failing to retrieve a file named version.json.

Hi @leonardbay,
Thanks for reporting this issue. This is certainly not expected (assuming you reloaded the UI using either Ctrl-F5 or using the Reload button in the update message).
We'll look into it and get back to you :slightly_smiling_face:

@leonardbay can you just go to the Profile page in the UI and see what is the reported server version?

Something strange is happening, now there are no more messages about the missing json file, but the message to update is still there. The trains-server is working from port 80 (not 8080) change made on docker-compose.yml, the address is: http://trains-server.eraniot.com/
Yes, I have hit refresh, hard-refresh, using Chrome with dev tools open and no cache.

And the reported server version in the Profile page?

Yes, I went to the profile page, which has changed position from bottom of left panel to upper right corner (indicating a version update), and it says: (0.16.0-299). In addition, now there's no message about a new version being available. So, it all seems to be working now, no idea why it didn't before. Thank you, for your excellent follow up!


feat: create react wrappers

Describe pull-request
Adding React wrappers.
Solving issue
Easier integration of the Tegel package in React applications.
Fixes: CDEP-1946
How to test

In packages/core run npm i
Run the command npm run build-react, and then navigate to tegel/packages/react/and run npm pack in order to create the neccessary .tgz file.
Then in your React app, drag the .tgz file into root and install it.
In your App.tsx add this lines:

import { MyComponent, defineCustomElements } from '@scania/tegel-react';

defineCustomElements();

function App() {
  return (
    <div className="App">
      <MyComponent first="Your" last="Name" />
    </div>
  );
}

export default App;

Finally in your global stylesheet, add:
@import url('@scania/tegel/dist/tegel/tegel.css');

Getting the jsxFactory error, looking into a solution.

Never mind, me lacking the latest changes.
Pushed one change to the package-lock updating the licence. Great work!


Request to preserve the original template.yaml's (versus overwrite in place)

It would be nice to create a new .yaml file and preserve the original template.yaml

this is already being done.  i found the envsubst command.  closing


Replace Twitter to X

Replacing the old twitter icon and share link to X
Description

As the twitter was changed to X, I guess we could replace it!
Types of changes

[x] Bug Fix (non-breaking change which fixes an issue)

It won't  crash the page, But who uses twitter, it wont appear ... he needs to switch to X
Is it considered a Break change?
Checklist

[x] I have read the Contributing Guide

Further comments

it will be like this

I've done the same on my website, but maybe it could be nice to add X as an alternative:

Some users can prefer to talk about Twitter as use old logo
Twitter.com links still works

LGTM
Thanks for the PR.


aws_instance lack of declared "encrypted" flag for root_block_device or ebs_block_device cause incorrect stash

Please see full code and trouble shoot on 410, but the logic with how the encrypted field gets added to root_block_device or ebs_block_device when when or the other is null, the default value should be false and this is confirmed in the json file generated from terraform plan, however Terraform compliance is passing the value of one to the other, if the other is left blank. This has caused issues with rule writing and false positives and false negatives. Thanks!
#410
Scenario: root_block_device must be configured on all non bastion hosts
Given I have aws_instance defined
When its name is not bastion
Then it must have root_block_device
And it must have encrypted <skips here
And its value must be true < Skips here

This should NOT SKIP,

When I look at the stash for `And it must have encrypted`

    When its name is not bastion

Press enter to continue
Failure: aws_instance.root_block_missing (aws_instance) does not have root_block_device property.
Then it must have root_block_device
Failure:
** REMOVED OTHER RESOURCES***
"address": "aws_instance.root_block_encrypted__field_missing",    <show as part of the stash
"values": [
{
"delete_on_termination": true,
"volume_size": 200,
"volume_type": "gp2"
},
{
"device_name": true,
"encrypted": true, < show encrypted:true
"iops": true,
"kms_key_id": true,
"volume_id": true
}
],
"type": "aws_instance"
}
]

The initial stash also shows this, so this is happening in the initial stash pass:

When its name is not bastion

Press enter to continues
** REMOVED OTHER RESOURCES for brevity**
{
REMOVED BLOCKS FOR BREVITY*
"ebs_block_device": [
{
"delete_on_termination": true,
"device_name": "/dev/sdb",
"encrypted": true,
"volume_size": 1000,
"volume_type": "gp2"
},
{
"iops": true,
"kms_key_id": true,
"snapshot_id": true,
"volume_id": true
}
],
"ebs_optimized": true,
"get_password_data": false,
"hibernation": null,
"iam_instance_profile": null,
"instance_initiated_shutdown_behavior": null,
"instance_type": "t2.medium",
"key_name": "tfcompliance_inf",
"monitoring": true,
"root_block_device": [
{
"delete_on_termination": true,
"volume_size": 200,
"volume_type": "gp2"
},
{
"device_name": true,
"encrypted": true, <<< SHOWING ENCRYPTED as true
"iops": true,
"kms_key_id": true,
"volume_id": true
}
],

When you look at the actual plan JSON this is not correct, Terraform compliance is parsing incorrectly:
Resource block:

resource "aws_instance" "root_block_encrypted__field_missing" {
ami                     = "ami-003634241a8fcdec0"
instance_type           = "t2.medium"
key_name                = "tfcompliance_inf"
disable_api_termination = true
monitoring                  = true
ebs_optimized               = true
associate_public_ip_address = false
security_groups = [aws_security_group.ingress_host.id,aws_security_group.egress_host.id]
root_block_device {
volume_size = 200
volume_type = "gp2"
}
ebs_block_device {
device_name           = "/dev/sdb"
volume_size           = 1000
volume_type           = "gp2"
delete_on_termination = true
encrypted             = true
}
tags = {
budget-area = "security"
group   = "cybersecurity"
}
}

ACTUAL JSON OUTPUT FOR RESOURCE:

{
"address":"aws_instance.root_block_encrypted__field_missing",
REDACTED FOR BREVITY
"disable_api_termination":true,
"ebs_block_device":[
{
"delete_on_termination":true,
"device_name":"/dev/sdb",
"encrypted":true,
"volume_size":1000,
"volume_type":"gp2"
}
],
"ebs_optimized":true,
"get_password_data":false,
"hibernation":null,
"iam_instance_profile":null,
"instance_initiated_shutdown_behavior":null,
"instance_type":"t2.medium",
"key_name":"tfcompliance_inf",
"monitoring":true,
"root_block_device":[
{
"delete_on_termination":true,
"volume_size":200,
"volume_type":"gp2". <<<< NO ENCRYPTION IN THE PLAN JSON,  terraform compliance sees it as True
}
],
REDACTED FOR BREVITY**
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#encrypted. Default for encrypted field is false

A parsing issue also occurs for  This piece of terraform code, ebs_block_device encryption is not declared in block:

resource "aws_instance" "ebs_encrypted_not_present" {
ami               = "ami-003634241a8fcdec0"
instance_type     = "t2.medium"
key_name          = "tfcompliance_inf"
security_groups = [aws_security_group.ingress_host.id,aws_security_group.egress_host.id]
root_block_device {
volume_size = 200
volume_type = "gp2"
encrypted = true
}
ebs_block_device {
device_name           = "/dev/sdg"
volume_size           = 50
volume_type           = "gp2"
delete_on_termination = true
}
tags = {
budget-area = "security"
group   = "Cybersecurity"
}
}
STASH SHOWS INCORRECT, shows ebs_block_device encrypted = true
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#encrypted default is also FALSE on terraform registry

{
"address": "aws_instance.ebs_encrypted_not_present",
** REDACTED FOR BREVITY***
"ebs_block_device": [
{
"delete_on_termination": true,
"device_name": "/dev/sdg",
"volume_size": 50,
"volume_type": "gp2"
},
{
"encrypted": true,  <<<< SHOWS AS TRUE IN STASH
"iops": true,
"kms_key_id": true,
"snapshot_id": true,
"volume_id": true
}
],
"ebs_optimized": null,
"get_password_data": false,
"hibernation": null,
"iam_instance_profile": null,
"instance_initiated_shutdown_behavior": null,
"instance_type": "t2.medium",
"key_name": "tfcompliance_inf",
"monitoring": null,
"root_block_device": [
{
"delete_on_termination": true,
"encrypted": true,
"volume_size": 200,
"volume_type": "gp2"
},
{
"device_name": true,
"iops": true,
"kms_key_id": true,
"volume_id": true
}
],
    },

Plan JSON OUTPUT ALSO CONCURS. that terraform compliance is not passing the correct values to the stash:

{
"address":"aws_instance.ebs_encrypted_not_present",
"mode":"managed",
"type":"aws_instance",
"name":"ebs_encrypted_not_present",
"provider_name":"aws",
"schema_version":1,
"values":{
"ami":"ami-003634241a8fcdec0",
"credit_specification":[
],
"disable_api_termination":null,
"ebs_block_device":[
{
"delete_on_termination":true,
"device_name":"/dev/sdg",
"volume_size":50,
"volume_type":"gp2"
}
],
"ebs_optimized":null,
"get_password_data":false,
"hibernation":null,
"iam_instance_profile":null,
"instance_initiated_shutdown_behavior":null,
"instance_type":"t2.medium",
"key_name":"tfcompliance_inf",
"monitoring":null,
"root_block_device":[
{
"delete_on_termination":true,
"encrypted":true,
"volume_size":200,
"volume_type":"gp2"
}
],

@mdesmarest,
Thanks for reporting this bug! Here's my take on it: #417
The default value of encrypted in ebs_block_device is false in the docs. However, in the plan file, the default value is true, which causes the issue.

@Kudbettin
Thanks for getting back to me quickly!
I understand your reference, but am confused at how you determined the default value, aws_instance default value for encrypted for both ebs_block_device  and root_block_device are both encrypted = false . I understand the logic of how the stash builds, but I am not sure why a default value would be true when the docs say its false. Can you elaborate
Being able to account for situations where known after apply are in the plan vs static values assigned helps in two ways

if the default is false, and we are enforcing maximized declaration of optional parameters for code clarity and drift detection, we want to make sure that a hardcoded value is present. Flagging on a known after apply where there should be a value declared would be very  beneficial, but we need to get clarify on how you are drawing the default values you are pulling in. I think being able to account for what is known after apply as simply a consequence of an absent parameter vs a true known after apply because it is only known after apply. I see why this depends less on the plan and more on the code blocks.

I understand the limitations here, and your tool is the reason we moved from resource block scanners like TFsec and Checkov, they couldnt evaluate resource blocks as they relate to a plan as a whole.  I can now clearly see the gap where resource blocks play a role where a plan file does not.

3.A lot of my enforcement of tests still stems from a need to determine the difference between a create and an update resource to better enforce things like encryption on newly deployed resources vs flagging on a resource being updated for tags getting flagged for encryption, since encrypting root_block_device via terraform would result in a destroy and rebuild of a block_device. This would not be a great thing.

I think we fixed this issue on 1.3.8. Could you please have a try and let us know ? 🙏

@eerkunt @Kudbettin  YES! this works, see below for confirmation.
This is exactly what we need. Thanks so much!!! I see your changes in terraform.py as well as helper.py.  After posting my issue, I took a look into the code and saw how you were populating the values via the after block in resource changes portion of the plan json. I see you were using the resource_changes block flagging if actions != ['delete']: here: Link I am trying to work on leveraging the same filtering to only populate the resources with actions =['create'] on a fork now.  Instead of populating values, I want to remove all resources that are not flagged as create` This seems entirely possible to do, maybe with an additional output flag to run as an option. Is this something on your board? I realize it may be a heavy lift, but I can see this pattern of use as very compelling for many.  It's the last major and most important barrier to a full deploy pattern for us. Since this new update fixes all of our false negatives, we can now write our full feature set.
Much of what we are running Terraform-Compliance against, is living infrastructure where additions are being made as well as full new deployments. We can't fail on resources if the fix is resource destroying/recreation, but want to focus on the resources at deployment where we have the most flexibility to flag failures. We plan to run terraform-compliance against state files to clear up legacy compliance issues that require changes outside of terraform, but need to heavily enforce on github repos where we have junior level devs deploying code.
We are running with Atlantis via github PRs, feeding a 1 liner for terraform-compliance directly into the plan step via the atlantis.yaml and passing the planfile that Atlantis produces directly into terraform-compliance. We are looking  to enforce checks via protected github branches, with Terraform-compliance influencing the pass/fail of  the Atlantis check and outputting our results in the same gitbot message Atlantis uses. I'd be happy  to show you how we sort and format our output, and how we are using terraform-compliance.    Thanks to the updated silent mode we are now very contextual! This whole deploy pattern works, we just need to scan on create only as stated above.
TEST OF PR CHANGES
FEATURES
Feature: ec2 root_block_device must be declared and encrypted set to true. Full Resolution notes at: github.com/CORP/tfcompliance/all/ec2root_block_encrypt.feature
Fixes: declare and configure root_block_device on each non bastion EC2 instance and declare encrypted=true

  Background:Check for the presence of aws ec2 instances not named bastion
    Given I have aws_instance defined
    When its name is not bastion

  Scenario: Root block device not declared
    Then it must have root_block_device

  Scenario: root block device encrypted must be declared
    When it has root_block_device
    Then it must have root_block_device
    And it must have encrypted

  Scenario: root block device encrypted must be declared and set to true
    When it has root_block_device
    Then it must have root_block_device
    When it has encrypted
    Then it must have encrypted
    And its value must be true

Feature: ec2 ebs_block_device must have encrypted declared and  set to true. Full Resolution notes at: github.com/CORP/tfcompliance/all/ec2ebs_block_encrypt.feature
Fixes: declare and configure ebs_block_device on each non bastion EC2 instance and declare encrypted=true

  Background:Check for the presence of aws ec2 instances not named bastion
    Given I have aws_instance defined
    When its name is not bastion

  Scenario: ebs_block_device encrypted must be declared
    When it has ebs_block_device
    Then it must have ebs_block_device
    And it must have encrypted

  Scenario: ebs_block_device encrypted must be declared and set to true
    When it has ebs_block_device
    Then it must have ebs_block_device
    When it has encrypted
    Then it must have encrypted
    And its value must be true

TERRAFORM RESOURCES
resource "aws_instance" "root_block_encrypted_FALSE" {
  ami                     = "ami-003634241a8fcdec0"
  instance_type           = "t2.medium"

  root_block_device {
    volume_size = 200
    encrypted = false
  }

  ebs_block_device {
    device_name           = "/dev/sdb"
    encrypted             = true
  }

}
#root_block_device is missing the encrypted field
resource "aws_instance" "root_block_encrypted_field_missing_ebs_true" {
  ami                     = "ami-003634241a8fcdec0"
  instance_type           = "t2.medium"

  root_block_device {
    volume_size = 200

  }

  ebs_block_device {
    device_name           = "/dev/sdb"
    encrypted             = true
  }
}

#root_block_device is missing the encrypted field
resource "aws_instance" "root_block_encrypted_field_missing_ebs_false" {
  ami                     = "ami-003634241a8fcdec0"
  instance_type           = "t2.medium"

  root_block_device {
    volume_size = 200

  }

  ebs_block_device {
    device_name           = "/dev/sdb"
    encrypted             = false
  }
}
#root_block_volume entirely missing
resource "aws_instance" "root_block_missing" {
  ami                     = "ami-003634241a8fcdec0"
  instance_type           = "t2.medium"

  ebs_block_device {
    device_name           = "/dev/sdb"
    encrypted             = true
  }
}

#root_block_volume declared and set to true, ebs encrypted not declared
resource "aws_instance" "ebs_block_not_declared" {
  ami               = "ami-003634241a8fcdec0"
  instance_type     = "t2.medium"

  root_block_device {
    encrypted = true
  }
}

#root_block_volume declared and set to true, ebs encrypted not declared
resource "aws_instance" "ebs_encrypted_not_present" {
  ami               = "ami-003634241a8fcdec0"
  instance_type     = "t2.medium"

  root_block_device {
    encrypted = true
  }
  ebs_block_device {
    device_name           = "/dev/sdg"
  }
}

resource "aws_instance" "ebs_encrypted_FALSE" {
  ami               = "ami-003634241a8fcdec0"
  instance_type     = "t2.medium"

  root_block_device {
    volume_size = 200
    encrypted = true
  }
  ebs_block_device {
    device_name           = "/dev/sdg"
    encrypted             = false

  }

}

RESULTS
Feature: ec2 root_block_device must be declared and encrypted set to true.
    Fixes: declare and configure root_block_device on each non bastion EC2 instance and declare encrypted=true

    Background: Check for the presence of aws ec2 instances not named bastion
        Given I have aws_instance defined
        When its name is not bastion

    Scenario: Root block device not declared
        Given I have aws_instance defined
        When its name is not bastion
		Failure: aws_instance.root_block_missing (aws_instance) does not have root_block_device property.
        Then it must have root_block_device
          Failure:

    Scenario: root block device encrypted must be declared
        Given I have aws_instance defined
        When its name is not bastion
        When it has root_block_device
        Then it must have root_block_device
		Failure: aws_instance.root_block_encrypted_field_missing_ebs_false (aws_instance) does not have encrypted property.
		Failure: aws_instance.root_block_encrypted_field_missing_ebs_true (aws_instance) does not have encrypted property.
        And it must have encrypted
          Failure:

    Scenario: root block device encrypted must be declared and set to true
        Given I have aws_instance defined
        When its name is not bastion
        When it has root_block_device
        Then it must have root_block_device
        When it has encrypted
        Then it must have encrypted
		Failure: encrypted property in aws_instance.root_block_encrypted_FALSE resource does not match with ^true$ case insensitive regex. It is set to False.
        And its value must be true
          Failure:

Feature: ec2 ebs_block_device must have encrypted declared and  set to true.

    Background: Check for the presence of aws ec2 instances not named bastion
        Given I have aws_instance defined
        When its name is not bastion

    Scenario: ebs_block_device encrypted must be declared
        Given I have aws_instance defined
        When its name is not bastion
        When it has ebs_block_device
        Then it must have ebs_block_device
		Failure: aws_instance.ebs_encrypted_not_present (aws_instance) does not have encrypted property.
        And it must have encrypted
          Failure:

    Scenario: ebs_block_device encrypted must be declared and set to true
        Given I have aws_instance defined
        When its name is not bastion
        When it has ebs_block_device
        Then it must have ebs_block_device
        When it has encrypted
        Then it must have encrypted
		Failure: encrypted property in aws_instance.ebs_encrypted_FALSE resource does not match with ^true$ case insensitive regex. It is set to False.
		Failure: encrypted property in aws_instance.root_block_encrypted_field_missing_ebs_false resource does not match with ^true$ case insensitive regex. It is set to False.
        And its value must be true
          Failure:

2 features (0 passed, 2 failed)
5 scenarios (0 passed, 5 failed)
17 steps (12 passed, 5 failed)
Run<PHONE_NUMBER> finished within a moment


No :latest tag for controller and invoker containers

Currently there seems to be no image tagged with :latest on docker hub for images controller and invoker. Both have :nightly tags but /openwhisk-devtools/docker-compose/docker-compose.yml refers to :latest.

Tha yaml should be using the nightly tag


EXC_BAD_ACCESS (code=1, address=0x18) in operationQueue

Since I upgraded to the latest master (the big rewrite), I'm getting the following error in Spine.swift:
EXC_BAD_ACCESS (code=1, address=0x18) in operationQueue

When

It doesn't happen when I run the tests individually. The integration tests in my project pass.
It happens when I run the entire test suite.

I don't reset Spine between tests, but it seems that something inside Spine one operation is leaking into another. I really don't know how to debug this...
The error

Can you suggest some things I could do to debug this?

Ouch, this sounds as a hard to debug bug. Smells like something might be going wrong with multithreading maybe? I don't know how your tests are set up, but usually each test starts with a blank slate because of setup/teardown.
Since it only happens when running multiple tests after each other, perhaps as a start you could narrow down the combination of tests in where this happens.

Yeah. I spent a good amount of time trying to do that yesterday. Will continue today.

For the record: I got also another error which I think is unrelated to Spine itself, reason why I didn't post here. It's weird that NSURLSessionConfiguration.defaultSessionConfiguration() would blow like this.
I will leave here for the record in case other people see this problem so they can Google:

Basically NSURLSession(configuration: configuration) gives me a EXC_BAD_ACCESS(code=EXC_I386_GPFLT). It's also random.

I'm closing this as stale. Feel free to reopen if you run into it again :).


Make the toolchain a configurable input

Currently the toolchain is set to stable with no way to change it, but that breaks my build so changing it to be configurable (with stable as default) would be very nice

Thank You!


⚠ PrivateHD has degraded performance

In fab74f1, PrivateHD ($PHD) experienced degraded performance:

HTTP code: 200
Response time: 5085 ms

Resolved: PrivateHD performance has improved in 948a2c7.


Retrieve files from ArrayExpress and provide allowed file list

I updated the script to include a function to retrieve files from ArrayExpress using their API to get file URLs and also included the ability to provide a file with a set of file names to limit the transfer only to these files.
I haven't fully tested but thought I would make the PR so @ESapenaVentura can review while I do final tests.

Took a look at it and refactored the code a little:

Added new function "filter_by_allowed" instead of having the function in main
Corrected some previous conflicts with DocStrings (Not related to this PR, but thought it would be a nice addition)

Other than that, LGTM! 👍


Dynamic multiple-files issue

It's sortof a duplicate to this but the answer there didn't help me.
here's a snippet of my workflow
- name: Prepare coverage input
   id: prepare-coverage-input
    run: |
        input=""
         for dir in coverage-report/*/*/coverage-summary.json; do
          appname=$(basename $(dirname $(dirname $dir)))
          input="${input}${appname}, ${dir}\n"
          done
          echo "${input}" > coverage-input.txt

  - name: Show coverage input content
     run: cat coverage-input.txt

 - name: Read coverage-inputs.txt
    id: multiplefiles
    uses: jaywcjlove/github-action-read-file@main
    with:
      path: coverage-input.txt

- name: Jest Coverage Comment
   uses: MishaKav/jest-coverage-comment@main
    if: github.event_name == 'pull_request'
    with:
      multiple-files: ${{ steps.multiplefiles.outputs.content }}

I am getting this error when i am not even passing /coverage/coverage-summary.json:

This is also the content of coverage-inputs.txt to show that it's not empty

Looking forward to your help on this, thanks!

@MishaKav

From what I see in the screenshot, your file contains \n as text and not as a break-line.
Try to play with your file generation.

Hi @MishaKav, i fixed the format and it's still the same

The paths you provide start with "coverage-report/...", as you can see in #72 the paths should be relative or be absolute or start with "./coverage-report/..." or similar. Please try this.

Happy to say it worked when i used another file reader github action.
Here's the full working version (without formatting the YAML) for anyone having the same issue
- name: Prepare coverage input
        id: prepare-coverage-input
        run: |
          input=""
          for dir in coverage-report/*/*/coverage-summary.json; do
            appname=$(basename $(dirname $(dirname $dir)))
            input="${input}${appname}, ${dir}\n"
          done
          printf "${input}" > coverage-input.txt

      - name: Read coverage-inputs.txt
        id: multiplefiles
        uses: juliangruber/read-file-action@v1
        with:
          path: coverage-input.txt

      - name: Jest Coverage Comment
        uses: MishaKav/jest-coverage-comment@main
        if: github.event_name == 'pull_request'
        with:
          title: Test Coverage Summary
          summary-title: Summary
          badge-title: Coverage
          hide-comment: false
          create-new-comment: false
          hide-summary: false
          coverage-title: Coverage Analysis
          coverage-path: coverage-input.txt
          multiple-files: ${{ steps.multiplefiles.outputs.content }}

Thank you @MishaKav !

Thank you for sharing the whole solution.

Hi @MishaKav, quick question.
When using the multiple files approach can i still put a value to coverage-path? if yes, what should the value be?

Yes, you can using multiple-files with coverage-path. In the main readme, you have an example.
It can be something like this:
- name: Run Tests
  run: npm run coverage | tee ./coverage.txt && exit ${PIPESTATUS[0]}

- name: Jest Coverage Comment
  uses: MishaKav/jest-coverage-comment@main
  with:
    coverage-path: ./coverage.txt
    multiple-files: |
      My-Title-1, ./coverage/coverage-summary.json
      My-Title-2, ./coverage/coverage-summary.json

The result will be as in the screenshot below:

@MishaKav What's the expected content of coverage.txt? When i run a command similar to npm run coverage, it emits/outputs other things because i'm using nx monorepo.

It's not exactly the truth. Specific in your case you may use only ['text'] to achieve what you want.

text-summary - does not appear in report in any way
json-summary - you need only when you provide coverage-summary.json to the action


Error after deploying to production

I used NODE_ENV=production npm run compile. I have my ngnix configuration to redirect all traffic to dist/index.html and if i try to go to a url thats not the index, for example http://domain.com/about i get the following javascript error:
Uncaught SyntaxError: Unexpected token <
if i go the the index, http://domain.com/ and from there press a link to the about page it all works perfect.
any idea what can be wrong?

The issue was with me..
I added compiler_public_path     : '/', to the config/_production.js and now all works perfect.

Had the same issue and the above fixed it. Hosting on firebase btw.
Would love to know if there is a more fundamental issue here.
Thanks

Shoudn't we add compiler_public_path : '/', in config/_production.js by default?

Had the same issue when hosted on AWS s3. I have set the compiler_public_path : '/', in config/_production.js and it doesn't work. I'm using the 1.0.0 version of the starter kit. Can anyone help ?

having this same issue with Firebase hosting. Not sure if config/_production.js is a legacy file, as it's not in my project, but the config/environments.js file has this:
production: (config) => ({
    compiler_public_path: '/',
    compiler_fail_on_warning: false,
    compiler_hash_type: 'chunkhash',
    compiler_devtool: null,
    compiler_stats: {
      chunks: true,
      chunkModules: true,
      colors: true
    }
  })

Is this what above posters were referring to re: compiler_public_path?
If so, is there another fix? like OP, <Link>ing from my index page works fine, but navigating directly there works not-fine.

I am facing the same issue @brandonmp . Did you find any solution?

ah sorry @abhinavzspace , i must have found a solution b/c it works fine now, but i genuinely can't remember at all what i did :/ if I can remember I'll update here

@abhinavzspace What kind of history you use with React router ?
When I got this kind of issue a while back, I was using browserHistory. I switched to hashHistory and everything worked perfectly.
Unfortunately, I have no clear idea why this is so. I'll have to take a deep dive into React router histories myself.

Thanks! I will try hashHistory and let you know.


Here's what you should do.

It's hard to admit when you're wrong. So I have take the liberty of writing a proper apology for you.

It's an older meme, sir, but it checks out.

it's not up to you to decide what's right or wrong

What's right and wrong is decided by a society and a culture and enforced both by laws and public critique.
totalitarian imposition of false morals

It's just a pull request dude. So I'm not really imposing anything am I? I just thought I'd make it easy for you to admit your mistake and apologize.
if you don't like a thing, you don't have to support it.

Please remember, that if I don't like a thing, I can not only not support it but also tell you I don't like it and tell everyone I know that they should tell you they don't like it. That's the great thing about free speach, am I right?!

If you search Twitter, the people who enjoy this seem to far outnumber the few who choose to call it offensive.  So really, I think you would do well to remember that your opinion is only that -- an opinion. It is not a fact, and you do not speak for everyone.
Please feel free to dislike my sense of humor. And feel free to tell all your friends to come here and check out how terrible my project is... As you may have figured out by now, I enjoy the attention. You're only helping DICSS to become the most popular Javascript project on Github today, so by all means keep it up.
The best way to make things go away is to ignore them. Maybe instead of wasting your time and attention on fighting with one silly guy on the internet, you could be using all that vim and vigor to create a project that is more interesting, more useful, more popular, or even just more funny than mine.

among those who enjoy it are several women

Several?! Wow. My mistake, then.
I enjoy the attention.

I get it.   You think that it's fun to ruffle feathers. You don't care if you hurt people as long as you get your lulz.
The best way to make things go away is to ignore them.

Of course, all this attention means people will keep using this amazing technology for years to come.
you do not speak for everyone.

Actually, there was a straw pull and I drew the short straw and had to be the one who to tell you your business.


Eliminate Py2-compat with_metaclass jig

SCons has used a wrapper trick because the way a class declares it uses a metaclass differs between Py2 and Py3. Drop this usage and list the metaclass the Py3 way.
Along the way, stop reusing the type class name as a parameter, as it might be confusing (SConf and packaging).
Does not require changes to docs or tests.
Signed-off-by: Mats Wichmann<EMAIL_ADDRESS>Contributor Checklist:

[X] I have created a new test or updated the unit tests to cover the new/changed functionality.
[X] I have updated CHANGES.txt (and read the README.rst)
[X] I have updated the appropriate documentation

Does this impact pypy3?  That was the logic for meta classing and getting rid of slots if I remmeber correctly

It applies the same metaclass (NoSlotsPyPy) as before, it just doesn't use the works-with-both-Python2-and-Python3-syntax jig that it used to.


Sharing database locally

I'm trying to open up the VM so that other people in my office can connect to my machine to use the database, I have got this working with other Vagrant files but I am struggling to get it to work with DrupalVM.
We are getting time out errors or cannot get route, depending on settings.
DrupalVM is installed via composer & have followed the instructions here  to get that working. All that I am missing is the ability to share the database.
We are all using windows machines if that helps.

This should be possible by setting a public IP address using this setting in your config.yml file: https://github.com/geerlingguy/drupal-vm/blob/master/default.config.yml#L25
Then run vagrant reload to restart the VM and bring up the new network interface. See: https://docs.vagrantup.com/v2/networking/public_network.html

Thanks for getting back to me, I have not fully managed to test this as rather busy at the moment and had to setup a work around to get it working - have the database somewhere else now.
but simply put setting a public IP address did not seem to work, as adding the same IP as vagrant_ip which maybe was the problem. but I did manage to allow collages to view the site locally using that IP but could not connect to the DB from there machine kept getting time out.

@elistone - Ah, if you want other people to be able to connect from other machines on the network outside of your own local machine, then that requires a bit more work:

You need to make sure the mysql_databases database configuration allows any host (or ranges of hosts) to connect: https://github.com/geerlingguy/drupal-vm/blob/master/default.config.yml#L190-L194
You need to add port 3306 to the firewall allowed TCP ports list (https://github.com/geerlingguy/drupal-vm/blob/master/default.config.yml#L240-L251) and run vagrant provision to update.
You need to make sure MySQL allows connections from any network interface, by adding mysql_bind_address: '<IP_ADDRESS>' to your config file, and running vagrant provision to update.

And besides that, there are probably some other things that could affect MySQL-over-the-network connectivity. It's generally frowned upon to open even local development environments' databases to access anywhere, simply because it's too easy to accidentally expose data in local environments to bad actors, or to the world in some strange networking scenarios.
Since this is an unsupported (and not-recommended) use of MySQL inside Drupal VM, I'm closing this issue—but feel free to follow up with how it goes if you get a chance to try again!
Unsupported/not-recommended doesn't mean it should never be done. Just that I don't officially 'bless' this use of Drupal VM :)

Thanks for you response @geerlingguy I have finally managed to test this and it is working exactly we want now.
I know you don't support/recommend this but to confirm to others who might be looking to do the same thing:
I did not need to change any of the setting to do with  mysql_database but simply added port 3306  to the firewall allowed TCP ports list, then added mysql_bind_address: '<IP_ADDRESS>' to my config and run vagrant provision
Others in my office can now connect to my machines database but use there own local files.
Thanks again.

Glad I could help!


Sorting the matrix diagonally (Python)

Is your feature request related to a problem? Please describe.
I wanted to add Sorting the Matrix Diagonally question (Medium). I'll solve the answer in Python and I'm a DSP 2021 participant.
Please do assign this for me!

Sure you can go ahead !


MPEGTS works perfect, but not H264

Hi!
The following code works perfectly for mpegts;
ffmpeg -rtbufsize 100M -f gdigrab -framerate 60 -i desktop -pix_fmt yuv420p -c:v libx264 -preset ultrafast -tune zerolatency -b:v 1M -max_delay 0 -bf 0 -f mpegts -pes_payload_size 0 pipe:1 | mpegts-to-webrtc -offerFile sdp.txt
However, I was hoping to have '-f h264' support for the highest frame rate.
Any ideas of how I can achieve this?
The result is "broken pipe";

ffmpeg -rtbufsize 100M -f gdigrab -framerate 60 -i desktop -pix_fmt yuv420p -c:v libx264 -preset ultrafast -tune zerolatency -b:v 1M -max_delay 0 -bf 0 -f h264 -pes_payload_size 0 pipe:1 | mpegts-to-webrtc -offerFile sdp.txt
Thanks. :)

How about ffmpeg-to-webrtc?
It's not my work, but mpegts-to-webrtc was inspired by this project.
The motivation of mpegts-to-webrtc is to achieve video and audio at the same time, and for that purpose it takes as input mpegts, which can interleave video and audio into a single stream.
If only video is to be transmitted, ffmpeg-to-webrtc may work well.

Hi friend,
I've tried ffmpeg-to-webrtc in the past, there are huge latency delays comapred to mpegts-to-webrtc.
It seems the code is broken somewhere causing inconsistent frame rates and huge slowdown.
If I removed the audio stream requirements from mpegts-to-webrtc would h264 function as intended?
Thanks!

code is broken somewhere

you mean this hardcoded frame duration?
const (
	h264FrameDuration = time.Millisecond * 33
)

I believe you can change this variable by forking ffmpeg-to-webrtc.
On the other hand, mpegts-to-webrtc refers timestamps contained in mpegts to recognize the frame duration.


Validate that params are declared in task file before merging

For tasks defined by file: task.yml, if params are defined in the outer task step, but not declared within the task.yml file, return an error.  This addresses concourse/concourse#555.
It would also be nice to update fly set-pipeline with the same type of validation for faster feedback, but I don't know how to implement that.

This is great, thanks!
I don't think we need the validation in set-pipeline since the task config is fetched at runtime. It's also possible that a pipeline is "valid" at configuration time but becomes invalid when someone changes the task config and pushes. So it makes more sense to just throw a runtime error.

We're gonna turn this into a warning instead for now, since otherwise this is backwards-incompatible. We'll turn it back into an error with 5.0.


Weird validation message for negative tabSize

The first part of this just comes from the errorMessage on editor.tabSize, which is old and doesn't seem needed anymore.
@alexandrudima that error message is from more than 2 years ago, is it ok if I delete it? Probably not many people still upgrading from an old version that had "auto" https://github.com/Microsoft/vscode/blob/master/src/vs/editor/common/config/commonEditorConfig.ts#L287

:+1: to change the message. "auto" was used in the first few months of VS Code.


Update plannedmaintenance-selfservice.md

I have done minor change, please review and publish.

:x: Organization membership check failed
Members of the MicrosoftDocs organization should use the private repo. Please move your changes to https://github.com/MicrosoftDocs/Dynamics-365-Operations, and close this pull request.

@matapg007 please create a branch in the private repo, copy your changes there, and close this PR. Thanks.


Weird bug regarding MultipleCursors

I use multiple cursors with the following setup:
let g:multi_cursor_exit_from_insert_mode = 0
let g:multi_cursor_exit_from_visual_mode = 0

So that, when I press Esc from insert mode, I'm back to normal mode so that I can manipulate text.
After I installed nvim-completion-manager, it started hanging after I pressed Esc.
If I press <c-c>, Neovim enters a weird state and shows the following error messages (appears to be in an infinite loop):
cm completion source cm-ultisnips exception caught: Vim(return):Traceback (most recent call last):
cm completion source cm-ultisnips exception caught: Vim(return):Traceback (most recent call last):
cm completion source cm-ultisnips exception caught: Vim(return):Traceback (most recent call last):
cm completion source cm-ultisnips exception caught: Vim(return):Traceback (most recent call last):
cm completion source cm-ultisnips exception caught: Vim(return):Traceback (most recent call last):
cm completion source cm-ultisnips exception caught: Vim(return):Traceback (most recent call last):
cm completion source cm-ultisnips exception caught: Vim(return):Traceback (most recent call last):

In order to solve the issue, I ended up using:
function! Multiple_cursors_before()
  if get(g:, 'cm_smart_enable', 1) == 1
	call cm#disable_for_buffer()
  endif
endfunction

function! Multiple_cursors_after()
  if get(g:, 'cm_smart_enable', 1) == 1
	call cm#enable_for_buffer()
  endif
endfunction

Shouldn't the problem be solved by the events MultipleCursorsPre and MultipleCursorsPost?

I cannot reproduce the hanging issue with this minimal vimrc.
set nocompatible
syntax on
filetype plugin indent on
set encoding=utf-8 fileencodings=ucs-bom,utf-8,gbk,gb18030,latin1 termencoding=utf-8

call plug#begin(expand('<sfile>:h') . '/plugged/')
Plug 'roxma/nvim-completion-manager'
Plug 'terryma/vim-multiple-cursors'
let g:multi_cursor_exit_from_insert_mode = 0
let g:multi_cursor_exit_from_visual_mode = 0
call plug#end()

@roxma Investigating this issue a little better, I've concluded there is no bug, but maybe performance optimizations that could be take place.
After being a little bit more patient, I've noticed that it's not an infinite loop after I try to quit insert mode, but it's actually a bunch of commands that are slowing vim down.
I tried to reproduce my init.vim as minimally as possible.
Take a look:
set runtimepath=/usr/local/Cellar/neovim/HEAD-eb40b7e_1/share/nvim/runtime

set runtimepath+=~/.vim/plugged/ultisnips
set runtimepath+=~/.vim/plugged/vim-multiple-cursors
set runtimepath+=~/.vim/plugged/ale
set runtimepath+=~/.vim/plugged/vim-trailing-whitespace
" Multichange tries to replace multiple cursors. I end up using both.
set runtimepath+=~/.vim/plugged/multichange.vim
set runtimepath+=~/.vim/plugged/nvim-completion-manager

let g:multi_cursor_exit_from_insert_mode = 0
let g:multi_cursor_exit_from_visual_mode = 0
let g:multichange_mapping        = 'mc'
let g:multichange_motion_mapping = 'c'

When I have these many plugins enabled at the same time, multiple cursors start to be a lot more laggish.
The reason why is probably the amount of autocmd that have to be executed.
Take a look at the output of autocmd InsertLeave:
--- Auto-Commands ---
ALECursorGroup  InsertLeave
    *         call ale#cursor#EchoCursorWarning()
InsertLeave
    *         if ShouldMatchWhitespace() | match ExtraWhitespace /\\\@<![\u3000[:space:]]\+$/ | endif
multichange  InsertLeave
    *         call multichange#Substitute()
              call multichange#EchoModeMessage()
cm  InsertLeave
    <buffer=1>
              call s:notify_core_channel('cm_insert_leave')
              call s:change_tick_stop()

Besides the amount my vim configuration has to deal because of all my plugins (I will deal with that later), my question was why setting up triggers for enabling/disabling nvim-completion-manager for the buffer made such a huge difference in the first place.
function! Multiple_cursors_before()
  if get(g:, 'cm_smart_enable', 1) == 1
	call cm#disable_for_buffer()
  endif
endfunction

function! Multiple_cursors_after()
  if get(g:, 'cm_smart_enable', 1) == 1
	call cm#enable_for_buffer()
  endif
endfunction

After investigating the autocmd MultipleCursorsPre and Post implementations, I noticed it uses the g:_cm_lock flag to control wether completion should popup or not. However, it looks like it's still doing work because of nvim-completion-manager's autocmds.
Comparing it to cm#disable_for_buffer(), it actually destroys the autocmd, so nvim-completion-manager does nothing.
Is there any particular reason the g:_cm_lock flag is used rather disabling nvim altogether?

Is there any particular reason the g:_cm_lock flag is used rather disabling nvim altogether?

If a user's vimrc contains code for disabling/enabling NCM. NCM will not know about this, and it may be enabled/disabled by accident.
g:_cm_lock is a way of decoupling, a use case controls its own bit. NCM only works when g:_cm_lock == 0.

However, it looks like it's still doing work because of nvim-completion-manager's autocmds.

Yes. Currently the lock only supresses the popup menu, NCM is still calculating candidates. Mayby it should supress more actions for performance.


Array used for calculation in SplineInterpolator.Compute was converted to a Span and is now being allocated on the stack

I guess that in practice this won't cause a stack overflow. For that to happen I guess the spline would have to have (at least) in the order of a hundred thousand points. But what do you think?

I'm hesitant about this, since this is a general utility class and callers can pass in any number of points. Did you run into some performance issues or a profile that suggested this?

No, it's just that conceptually


Are you using the Windows crate?

Hi folks, we're trying to gauge adoption and understand how we can best serve the Rust community with the Windows crate. In order to do this, I would love to hear from you! How has the Windows crate influenced your decision making? Did it help you decide to use Rust or target Windows? Is Rust replacing another language for a product you've previously shipped?
Feel free to leave a response here or email me directly to keep things private<EMAIL_ADDRESS>If the Windows crate matters to you, don't miss this opportunity to let me know and help influence the future of Rust on Windows.

Two problems I've found:

ARM64 support: the linker will complain that windows.lib could not be found. According to https://github.com/microsoft/windows-rs/issues/1175#issuecomment-961121556 it is being fixed.
Lacking functionality of specifying exactly some APIs. I could specify the exact class and method I want, but now I need to enable the whole namespace, which may import many unwanted dlls, though they could be linked out with LTO.

I currently only use Rust for personal projects - that being said, windows-rs has made me comfortable trying out the Win32 API in earnest for the first time. At this point, I'm very happy with the developer experience using window-rs with prebuilt bindings.
My next project is to find a usable native-feeling UI framework I can use from Rust - if I'm able to get WinUI 3 to work, I expect I'll be implementing all of my projects for the foreseeable future in Rust. Note that I don't feel blocked on a XAML compiler - I'm hoping to build the UI using api calls.

@Berrysoft thanks for the feedback, but please create new issues to report any problems you may have. Here I'm really just trying to collect feedback on who is using the Windows crate and how it is helping you build software for Windows. (ARM64 support shipped in 0.25 for MSVC and namespace refactoring is an ongoing process here.)

Hi Kenny,
Ever since https://github.com/microsoft/windows-rs/issues/432 got resolved, we've started the process on our side of switching over to windows-rs since for us this seems to be the way forward.
For we're mostly waiting on the rest of the ecosystem to slowly catch up, I think other then our own code winit is probably the biggest dependency we have on the old winapi crate. Though this also includes things like libloading, notify, ntapi, parking_lot, rand, ring, time, tokio, walkdir and lots more.
One thing that could be helpful also to speed up ecosystem adoption would be to publish a rustsec advisory stating that winapi is/will be deprecated. At the moment it's hardly maintained and windows-rs seems to be the way forward.
Additionally it could be extremely helpful if Microsoft would help evangelize the windows-rs adoption throughout the ecosystem, either by doing some of the heavily lifting itself on some of the very foundational crates, or by filing issues on larger repo's and making project maintainers aware and potentially advising on the switch.
We're eagerly awaiting the namespace changes to come through since right now we're having a bit of trouble keeping our feature set lean (for example we need to enable Win32_Graphics_Direct3D11 even though we're exclusively using Dx12).
One thing I'm worried about going forward is build times; right now only leaf nodes in our dependency tree are depending on windows-rs, which means that the parallel builds can hide quite a big chunk of the windows-rs build times on our heavy threadrippers. However, on smaller machines, or if window-rs gets pushed closer to the root of the dependency tree, I'm worried this may become a problem again.

Jasper

How has the Windows crate influenced your decision making?
Official support from Microsoft on their platform has given me a lot more confidence in being able to create a robust Rust application on Windows. I am much more likely to use this crate for Windows interfacing thanks to the official support from Windows.
Did it help you decide to use Rust or target Windows?
No, because I was already planning to use Rust.
Is Rust replacing another language for a product you've previously shipped?
No. But it seems likely to start replacing languages like C and C++ in future projects.

Hi Kenny,
First of all, thank you for all the hard work you're doing! 🌷
Right now, there are basically two things that I'm waiting on to start adopting windows-rs:

Authoring support. Our codebase is mainly C# and I would like to start introducing Rust, but for that I need an ability to author a Windows Runtime component so that it could easily be wired up with C# code.

WinUI 3 and XAML compiler support. If speaking of new projects, I would like to avoid writing UI in one language and BL in another. XAML compilation is a big deal for me here. That's what would help me to switch to Rust as my primary language.

I also hope that the future of Rust on Windows is not under question, given the record of Microsoft not giving enough resources to a project and then killing it over the lack of adoption... 😬

I'm really enthusiastic about the windows crate. I'm looking forward to being able to use it with raw-dylib, which will allow linking Windows applications without needing all the libraries around.
I would love to find the right combination of "make Rust compile faster" and "ship pre-compiled indexes of interfaces" and "make the compiler smarter about compiling only the used subset of a crate" to allow people to just use windows without having to set feature flags for the APIs they want to use.

I was a pretty early adopter of this crate, I've been using it in my tiling window manager since 0.3.
Before starting this project, I had zero familiarity with the Windows development ecosystem (and honestly, outside of this crate, I still don't), and I don't think I would have started this project if this crate was not available because I was not interested in learning C#, C++ or having a workflow centered around Visual Studio.
The only real pain point for me has been keeping up to date with the breaking changes between the updates (quite a few between 0.3 and 0.25 😅). I appreciate the changelog, but more often than not, when updating this crate results in a broken build, I have to diff through the examples and create a mental 'migration guide'.
Something like Rocket's migration guide for breaking changes would be a welcome addition whenever there is a new release with potentially build-breaking changes.

We had the pleasure of working with @wravery on integrating windows-rs over at the Tauri ecosystem.
https://github.com/tauri-apps/tao/blame/next/Cargo.toml#L76
On a sidenote, wry started out as a winit fork, but the next branch is now using windows-rs; not sure if this addresses @Jasper-Bekkers concerns - because we have added general features that the winit maintainers felt were out of scope (like accelerators and menus)...
Definitely agree with @LGUG2Z about more strict change management.

We had the pleasure of working with @wravery on integrating windows-rs over at the Tauri ecosystem.

Coincidentally, I'm testing an update which will bump Tauri to windows-rs v0.25.0 and webview2-com to a version which matches. The latest windows-rs includes pre-compiled library support, which greatly simplifies the dependencies since the consumer can reference types directly in the windows crate instead of needing to build them all into an intermediate bindings crate. The webview2-com crate doesn't need to include everything its consumers might reference, and the Tao crate itself doesn't need to depend on webview2-com anymore since it can get those types directly from windows.
The only downside is that the windows::runtime::build macro doesn't yet point types referenced in another winmd file back to the pre-compiled libraries. I have to unwrap and rewrap a few types (e.g. windows::Win32::Foundation::HWND and windows::Win32::Foundation::RECT) when passing values through WebView2 APIs/callbacks. For Tauri, I also had to cast (i.e. QueryInterface) between a webview2_com::Win32::System::Com::IStream and windows::Win32::System::Com::IStream, as well as aliasing the types to disambiguate them.

I use the Windows crate in two co-dependent projects,  I created a lib (in-progress) to create a subprocess from a command string given by the user. I cannot use std::process because i would need to split the user input string into arguments (not trivial).
I'm not a Windows user and i have a minimal setup to test the code but so far it was an interesting experience.
The differences between Rust and the API was a bit frustrating at first, it wasn't easy to find the appropriate documentation about the functions I was looking for but it's really easy to get started with the crate itself.
I also ran into an issue about the implementation of Copy on a struct passed as a mutable reference in argument.  When creating a new ChildProcess I was trying to move a PROCESS_INFORMATION twice (since i write in it) but i was moving a copy and all others attempt to handle the ChildProcess failed silently.
We talked a bit about this on Twitter: https://twitter.com/CecileTonglet/status/1457760102228893696?s=20

I also ran into an issue about the implementation of Copy on a struct passed as a mutable reference in argument. When creating a new ChildProcess I was trying to move a PROCESS_INFORMATION twice (since i write in it) but i was moving a copy and all others attempt to handle the ChildProcess failed silently.
We talked a bit about this on Twitter: https://twitter.com/CecileTonglet/status/1457760102228893696?s=20

This seems to be a more general issue that could also be applied to primitives. What if I were to write (analogous to that fn create_process() implementation):
fn get_the_thing(thing: u32) {
    self.something.get(&mut thing)
}

Even if there's no copying going on at the caller, there should be a lint or warning that thing is unused after being mutably passed to a function, which is usually not intended.

I jumped to this crate pretty early, the only issues I've hit have been unimplemented stuff (with progress being made on all fronts since I hit those).
I'll echo some other opinions here that one issue which needs to continue to evolve is the overall size of the package, including/disabling aspects of it, and the resulting build time of it.
Documentation on usage will be important too, it would be great if you could get some people dedicated towards documentation on the project. There were a handful of windows-rs specific patterns that I could only really figure out by looking at third party code doing similar things.
Overall this crate is hugely important to the Rust ecosystem, and I hope it continues to grow in a positive way!

The only downside is that the windows::runtime::build macro doesn't yet point types referenced in another winmd file back to the pre-compiled libraries

👋 @wravery this should work now in 0.26 (flighting now) as per https://github.com/microsoft/windows-rs/commit/d841d50db136e3f92cad51681039312361fd57f3#diff-876a8ed6321b0f51ab0a60034a6cd6d4abb2d8f84445d32dfe8dcd510ceccd0eR33-R42

I'm really enthusiastic about the windows crate. I'm looking forward to being able to use it with raw-dylib, which will allow linking Windows applications without needing all the libraries around.
I would love to find the right combination of "make Rust compile faster" and "ship pre-compiled indexes of interfaces" and "make the compiler smarter about compiling only the used subset of a crate" to allow people to just use windows without having to set feature flags for the APIs they want to use.

@joshtriplett Now you're talking!
I can't wait for raw-dylib to stabilize so I can throw away all those lib crates.
Making the Rust compiler faster is my top ask. On average, the Rust compiler seems about 10x slower than the C++ compiler: https://github.com/microsoft/windows-rs/issues/1292#issuecomment-965805621

Adopted at v0.10.0 - it's been a really fun ride seeing the advancements coming in all of the recent work. It's gotten so, so much easier! Thank you!!
We're relying on this crate to do (among other small things) screen shots and screen recording. The documentation has been excellent and easy to use. I've really liked that even back at 0.10.0 we could do everything we needed, it felt mostly feature-complete. It's also been satisfying to delete some of the extra boilerplate though the releases.
We're also using wasapi-rs for the audio side of things, over at Dropbox on our Capture project.
Here's a higher level article with a call out to the Windows crate! https://dropbox.tech/application/why-we-built-a-custom-rust-library-for-capture
Would love to chat more (with @robmikh as well, thank you for your projects! 🙌)

I'm using this in my CamillaDSP project. I was using the CPAL library before, but wanted direct access to wasapi. So when I found the windows crate I decided to go for it. That then became my wasapi-rs crate. I wasn't aware that it had found use in other projects than my own :)
I haven't worked with any windows API before starting with this. The windows crate (together with the excellent documentation at msdn) made it very easy to get started. Altogether it's been a very positive experience.
The one thing I'm missing is a way to have documentation for my wasapi-rs crate published to docs.rs. I realize this is not easy to solve, and it may not be worth the trouble. It works ok to just put it on GitHub pages.

Thanks so much for all the responses thus far - keep it coming! I have read and re-read every one and am so grateful for your support. This is a huge help in planning. ♥

I'm using this for a small personal project that manipulates the window position, like starting up processes and resizing/moving to correct monitor. Previously I did this with a simple Autohotkey script, but after starting to learn Rust, I figure this would be a great way to try.
My main problem is from lacking Rust and Win API understanding, not from the crate itself. For example, the CreateProcessA function, when I read the doc to try and see how to use it, there isn't much there. I had to look up how to use the C++ version of that, then try and use it in Rust. Took a bit of time but I'm very happy with the result.
The crate is really great, even with my limited usage.

When i made my own gdi-based minesweeper clone in rust, i made my own wrappers - apiw which is winapi-based WinAPI wrapper, and resw(https://github.com/crlf0710/resw-rs) which is a build-time windows resource script generator.
I'm interested in the Windows crate and indeed thinking about migration. Though i'd really really like to see something as a replacement for my resw crate first... Please consider creating something in the place of that so i can retire it!

With the announcement of windows-sys, I think that's a great step. Now I do wonder if there actually needs to be a third layer eventually?

windows-sys - raw bindings
windows-rs - core foundation (usually unsafe usage, some niceties but still a pretty raw form of the API)
? - Safe rust wrapper, code calling this should never need unsafe blocks.

I bring this up because of @crlf0710's comment about apiw. On my project I also had to create a wrapper on top of windows-rs to expose it in a safer way to my other code. The Windows API is so complicated that I know for a fact that my wrapper is unsound though, and I wish that layer was provided.
For what it's worth this is kind of what I ended up doing on Steamworks.NET, the 3 layered approach, with bindings, then a foundational layer with basically a 1:1 api with the underlying C++ based API, then layer on top of that which does things like let you pass in C# arrays to functions that take a pointer and length under the hood.

@rlabrecque While i do think there's need for the third layer, as a API user actually i need a platform neutral third layer, and i hope it can work across major desktop platforms, and taking some consideration into supporting Web page+Webassembly and mobile platforms too, so i think it will be out-of-scope for windows-rs project itself. (Unless microsoft wants to create a rust version of maui or something)
That being said, windows-rs and windows-sys provides very solid foundation for the windows platform implementation, and provided support for working with very windows-specific functionalities. I'm very grateful for microsoft creating and maintaining this crate.

As well as learning more about Win32, I wanted to call some APIs that didn't seem to have any easy way to do so from PowerShell, whether from .NET or ActiveX, and Add-Type -MemberDefinition seemed a bit too hacky. This resulted in these small tools:

https://gitlab.com/careyevans/bkgd
https://gitlab.com/careyevans/screenoff

What’s missing seems to me to be:

Better ways to work with Vec<u16> or &[u16] parameters for the W APIs.
Some guidance around putting <activeCodePage>UTF-8</activeCodePage> in an embedded manifest, which would seem to make the single-byte APIs work better with &str.
Specifically, a more usable signature for SetSysColors.

(Before this, I also learnt a lot of about COM and Rust FFI by trying to use a bit of IDispatch from scratch. Never again.)

So far my experience has been good. Thank you for this crate!
I encountered two major pain points:

no useful docs on docs.rs: I always end up googling „windows-rs“ and clicking through from there (also the docs are very slow to search but you know this)
While I do really like the wrapper types for integers, I had hoped for a better experience. Right now it feels quite arbitrary how some places take/return u32 or i32 and others the wrappers. Also the fact that there seem to be bitwise operations on all of them is just weird (since it never makes sense to OR e.g. two CLIPBOARD_FORMATS).

I highly appreciate the error handling, but if I had‘t found it by accident while trying to figure out how to convert a BOOL to bool, I would still be out here trying to mess with std::io::Error::last_os_error() 😆. I think ideally there needs to be a book about this crate to show the patterns (like serde has) or at least a very detailed top-level documentation.

I just found this crate. The documentation is a bit sketchy or basically missing. Currently docs.rs/windows is almost empty.
What are these widows vs windows-sys bindings?
[dependencies.windows-sys]
version = "0.28.0"
features = [
    "Win32_Foundation",
    "Win32_Security",
    # "Win32_System_Threading",
    "Win32_UI_WindowsAndMessaging",
]

What is Win32_Foundation, Win32_Security? Why do I need it for MessageBoxA. We need answers. In any case what I see is enough for me to re-start my next big project in Rust rather than in C++. I needed a really good excuse for that and I think I found it.

Using windows-rs for NativeShell (Experimental embedder for Flutter). Started with 0.3 I think, It's been a bit bumpy ride keeping up, since almost every windows-rs update broke things, but I really don't mind because the changes were always for the better. Going for hand written COM implementation to #[implement felt amazing :) Currently upgrading to 0.28.

We're using it over in deviceplug/btleplug for our windows bluetooth access. Seems to mostly work for our needs.

The documentation is a bit sketchy or basically missing.

Have to second this and not too sure why  @Berrysoft  downvoted it.
The documentation https://microsoft.github.io/windows-docs-rs/doc/windows is a good quick reference but lacks overviews or even links back out to them yet which makes it a fair bit more of a detective process to track down relevant examples than it need be.

@Nocturem If you ask my opinion, I don't think the doc is missing. Actually I think the documentation is all there. If you want the usage of an API, just go to MSDN. If you want to search where it is, just search with ILSpy. If you don't know the difference between windows and windows-sys, read README carefully. If you don't know why you need MessageBoxA, you don't need it.

Well Zingam and myself aren't particularly alone I would note rlabrecque, phuongtran7, & main-- also mentioned documentation pain so mostly that comes off as an unproductive denial of others experiences.

You need not to change my mind, right? That's just my personal opinion. If there's someone don't agree with me, it's OK.

@Berrysoft Here's a small challenge then: Can you spot the bug?
unsafe fn foo() -> Result<()> {
    GetClientRect( /* arguments */ ).ok()?;
    LineTo( /* arguments */ ).ok()?;
    Ok(())
}

LineTo doesn't report error messages with GetLastError.

Correct. Now the follow-up question: Did you find the bug by looking at the available documentation exclusively, or did you have to dig into this crate's source code? I know I had to go looking there.
The documentation does indeed currently lack a good overview, ideally easily accessible from root level module documentation. Things I'd like to see documented:

An introduction (a good part of that is already on the crates.io page/this repo's readme).
An overview explaining how to navigate the documentation, as well as the overall anatomy of this crate.
A section on common programming patterns, e.g.

Instantiation and use of COM interfaces
Error handling and propagation (maybe better documentation on things like BOOL::ok() as well)

Though I've been following this project since before it was a thing, and using it ever since, I still frequently find myself having to browse the source code. A bit more documentation would indeed help. This isn't asking for exhaustive documentation, just a bit more introductory/overview-type material.

@tim-weis OK, it's fair to say that it's a documentation problem. However, I'd rather think it's an API design problem. There are at least 3 different BOOL in winapi (the 3rd one is ShowWindow), but they are the same in the metadata, and therefore it leads to the same BOOL here. If the metadata is designed much more exactly, it shouldn't be a bug in your example.
The core APIs that handle the interop with Windows API and Rust is simple, and the signatures mostly follow the std names. That's why I don't think it's missing doc.
You're right that sometimes I need to look through the source code to find the answers. But I don't think it is polite to simply ask for the answers and don't try to find them (oh, maybe found them and felt angry to the missing docs, I guess? My fault.). That's all and I don't want to argue whether the documentation is really missing. Anyway I'm not the maintainer or contributer, but only a user. You are free to ask for the docs, and even free to open pull requests. :)

Great feedback on all sides. We're aware the docs fall short in all areas. Should start to see more of that come online soon, stay tuned.

I've been sporadically working with this crate for window management.
The docs could always be improved, but I've generally been able to achieve everything I wanted so far using what is provided and the MSDN.
General suggestions for improvement.

Adding macros such as HIWORD and GET_X_LPARAM would make transitioning C to rust quicker.
As most of this is unsafe code, dedicated examples on handling errors would be very valuable.

Appreciate the work.

Great feedback on all sides. We're aware the docs fall short in all areas. Should start to see more of that come online soon, stay tuned.

How are these https://docs.rs/windows-sys/0.28.0/windows_sys/ and https://docs.rs/windows/0.28.0/windows/ (version 0.28.0) where there is literally nothing related to https://microsoft.github.io/windows-docs-rs/doc/windows/ (version 0.26.0). This got me confused, particularly because I was searching for the latest docs and I'm new to the ecosystem.

I've been following this crate's progress in the hopes that I can help other crates port from winapi-rs to windows-rs when it's stable.

Not sure if this was already mentioned here (I didn't read), but I'm dissuaded by the long search times w/ the docs compared to winapi.

I just finished implementing an RTD server for Excel using this crate and the com crate. I had initially prototyped in C++ and also in C#. Even though there are a lot of things that could improve rust is still my preferred solution by far. I'll just bullet some areas that could improve.

Implementing COM components now requires a kind of complex dance between the com crate and the windows crate. They aren't well integrated at all, and some important things (e.g. supporting IDispatch) have to be done manually.
Dealing with VARIANT and SAFEARRAY is painful when compared to normal rust data structures.

Still, even dealing with VARIANT and SAFEARRAY doesn't look that different from doing it in C++, so while that specific part of the code isn't much improved, many other areas are vastly better. For example, while the com crate could certainly be better, I find it already much nicer than using atl, midl, C++, and that complex dance of macros and header files and idl files. I know from reading the issue stack that all these problems are already on your radar, so keep up the great work!

Currently writing a WinUSB-ish program. We'd like to use a sanctioned Win32 bindings crate and this one seems to be the right one. It is far and away better to program against Win32 in rust vs C/C++. Though the API isn't all that different. Working with the rust language and its perks outweighs even the warts of the crate.
As @MrGibus stated the one thing on our wishlist currently is some things that are macro definitions Win32 C/C++ code either aren't in the rust bindings or are opaque and not easily found. Things like the RGB macro (https://docs.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-rgb) I can't seem to locate easily. We can implement a similar typesafe rust macro ourselves, but would rather not if something is available.
All around stellar work though and keep it up. Thanks.

I finally got around to trying out writing a WireGuard UWP VPN plugin with the windows crate, and a couple warts aside it just worked! My biggest ask would probably be IVector[View] support out-of-the-box. For now I just have a half-implemented version that works for few cases I need.
Otherwise, awesome work! It's definitely come very far compared to the first time I tried implemented COM/WinRT interfaces in Rust.

Not much, beyond some toy projects.
Microsoft still isn't committed to Rust on Visual Studio (not Code) and to be honest, the WIP state of C++/WinRT tooling doesn't make us look forward into similar efforts in Rust.
So for us Windows remains focused on .NET, C++ when we aren't given an option to access Windows APIs from .NET directly, and Rust is left for hobby coding, mostly on POSIX platforms.

I've only used this crate for one project at work where I decided to use Rust for its emphasis on safety and fearless concurrency.
For me the major blockers for doing more with it are the amount of unsafe required to get some pretty basic stuff done (references and mutable borrows could be handed over instead of raw pointers) and the three steps required to get through documentation. It's kinda annoying to have to find the C++ function you want, then find its definition and then check the Rust equivalent and any pitfalls there might be. E.g. CreateFileMapping -> CreateFileMapping<A|W> -> 1 IntoParam<Handle>, 1 PCSTR (constructable only with a macro or unsafe), and it returns a HANDLE that is different from the one in std (but I presume it's not yet off the table to fix that).
That said, the crate definitely does motivate me to play with it more in personal projects. And as evidenced by the issue I opened last week, I'm willing to help make working with it easier. I'm currently busy setting up the snippets repo and I'm working on a small crate to safely work with Memory Mapped Files as an option for Windows IPC that doesn't break when more than one client wants to read the same data. (for context, this is capturing a camera feed, and named pipes do not like 5MB frames being pushed to clients that may or may not read them).
Would love to see what the future brings for these crates and how the projections in general could grow to provide more safety mechanisms. I did notice a lot of them are unsafe purely because of raw pointers or due to returning a value indicating errors; that seems fixable right?


Use scandir.walk on python <3.5?

It seems to be alot faster for windows ^^.

Thanks for the suggestions! I will add this as an option for all functions that use os.walk currently. That way it functions like rarfile does now.

Added in f419d78e44a662c781e4de643f36b5b3e5675b3e, will close with 0.8 release.
If you would like your real name or email @Hellowlol in the Authors file, please let me know what to include 😄

Thanks for the quick reply! 😊


CORE-5594 Remove default admin credentials

Provides three mechanisms for providing credentials:

By default, the username is "admin" and the password is a generated
12-character alphanumeric. The notes outputed on chart install have
been updated to indicate how the generated password can be retrieved
from the generated secret.

The bootstrap.initialAdminUser.admin/password values can be used to
specify the credentials to use. The E2E tests will specify the
password via this route until the tests are updated to allow the
password to be overridden. Developers will likely also use this route
and the wiki will be updated once merged.

A secret can be created that contains the credentials to be used. The
name of the secret is specified via
bootstrap.initialAdminUser.secretRef.name and the keys to the
username/password via
boostrap.initialAdminUser.secretRef.usernameKey/passwordKey.

Note that a few other values have been moved under bootstrap so that the
db and kafka values are only those that apply to both automatic and
manual boostrapping. Most notably, kafka.replicas is now
bootstrap.kafka.replicas and the default values.yaml has been updated to
reflect this.
The create-dev-config sub-command has been removed from the
create-user-config CLI command.

Looks like there is unit test failure at the moment:
testDevSetupScript() – net.corda.cli.plugin.initialconfig.TestInitialConfigPluginUser
<1s
Error
java.lang.AssertionError:
Expecting:
 <"">
to start with:
 <"insert into RPC_RBAC.rpc_user (enabled, full_name, hashed_password, id, login_name, salt_value, update_ts, version) values (true, 'Default Admin',">

Looks like there is unit test failure at the moment:
testDevSetupScript() – net.corda.cli.plugin.initialconfig.TestInitialConfigPluginUser
<1s
Error
java.lang.AssertionError:
Expecting:
 <"">
to start with:
 <"insert into RPC_RBAC.rpc_user (enabled, full_name, hashed_password, id, login_name, salt_value, update_ts, version) values (true, 'Default Admin',">

fixing that now (the test needs removing as it uses the dev configuration that was also removed)


add total packages to be used on FE

Description
Add field to be used on FE
Fixes # (issue)
Type of change
What is it?

[ ] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[ ] Documentation update
[ ] Tests update
[ ] Refactor

Checklist:

[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works
[ X] New and existing unit tests pass locally with my changes
[X] I run make pre-commit to check fmt/vet/lint/test-no-fdo

Codecov Report
Base: 37.36% // Head: 37.38% // Increases project coverage by +0.01% :tada:

Coverage data is based on head (7ddd932) compared to base (ef1b381).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1612      +/-   ##
==========================================
+ Coverage   37.36%   37.38%   +0.01%
==========================================
  Files          66       66
  Lines        8764     8766       +2
==========================================
+ Hits         3275     3277       +2
  Misses       5095     5095
  Partials      394      394

Impacted Files
Coverage Δ

pkg/models/images.go
100.00% <ø> (ø)

pkg/services/devices.go
50.00% <100.00%> (+0.11%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

It looks great but it needs unittests
Added in [47e5e9c]
Marking as done


Router issue

Hi,
I believe I discovered a router issue in HB2beta, given the following router setup:
import Hummingbird

func buildApplication(
    configuration: ApplicationConfiguration
) -> some ApplicationProtocol {
    let router = Router()

    router.get("/foo/bar") { _, _ in "foo-bar"}
    router.get("/foo/{id}/baz") { _, _ in "foo-bar-baz" }

    let app = Application(
        router: router,
        configuration: configuration
    )
    return app
}

Using this test case:
@testable import App
import Hummingbird
import HummingbirdTesting
import XCTest

final class AppTests: XCTestCase {

    func testApp() async throws {
        let app = buildApplication(
            configuration: .init()
        )
        try await app.test(.live) { client in

            try await client.execute(
                uri: "/foo/bar/baz",
                method: .get
            ) { response in
                XCTAssertEqual(response.status, .ok)
                XCTAssertEqual(String(buffer: response.body), "foo-bar-baz")
            }
        }
    }
}

The test fails with a 404 response, but I'm expecting the router to resolve a route for the foo/bar/baz request and bar should be the value of the {id}.
Is this a real issue or am I doing something wrong?
Thank you for the help.
Tib

Looks like the rewinding of the router path stack isn't working. It is an issue, we'll look into it.

@joannis has fixed this in #479


Exam mode: Misleading notification when updating exam details

Describe the bug
When updating the Title of an exam a notification for updated working time is sent to the students.
To Reproduce

Configure an exam
Make sure the exam is visible to students (exams have been prepared & exercise start aswell)
Change the title of the exam
See that the registered students receive a message that the working time would have been updated

Expected behavior
No notification should be sent
Screenshots

Which version of Artemis are you seeing the problem on?
6.6.0
What browsers are you seeing the problem on?
Chrome

Hm, I think it's a server issue, and I already have an Idea what causes it. I'll have a look!

Ok fixed it, thanks for reporting, fix is here: https://github.com/ls1intum/Artemis/pull/7382


FEATURE REQUEST: Variables like Time & Data

It would be nice to be able to insert the TIME or DATE into a Lower third.  Maybe set this as Right justify from the Right side of the screen.
A way to request variables might be something like:
{@DATE} - {@TIME}
There may be other variables like System Name, IP Address, etc so this feature might be best as a generic implementation for future improvement.
Another thought hit me as well, some tools like with StreamDeck will drop information into a File, such as a Song Title.  So another variable might be a filename:
{@FILE:D:\mystuff\song.txt}
Great OBS tool!

Hi @Mazecreator ,
Thanks for those ideas, we will take them into account for future developments since they can be useful.
Related to load file content, we've been doing some research and testing and it's a complicated process for a simple HTML app but we will keep looking as we think it is a very interesting utility.
Thanks again for support!

Hi @Mazecreator ,
Thanks for those ideas, we will take them into account for future developments since they can be useful.
Related to load file content, we've been doing some research and testing and it's a complicated process for a simple HTML app but we will keep looking as we think it is a very interesting utility.
Thanks again for support!


breaking(cherow): remove numeric separator

Numeric separators back down to stage 2, per 2018.05.24 TC39
see https://tc39.github.io/tc39-notes/2018-05_may-24.html#numeric-separators-update

Coverage decreased (-0.3%) to 92.759% when pulling e705b204343a7cce4e6e27d9d866e5243a1b5583 on rm-separators into fa71b0dfd69385600b57fad8f8badc8e1824ed36 on master.

Coverage decreased (-0.3%) to 92.759% when pulling e705b204343a7cce4e6e27d9d866e5243a1b5583 on rm-separators into fa71b0dfd69385600b57fad8f8badc8e1824ed36 on master.

This pull request introduces 2 alerts and fixes 1 when merging e705b204343a7cce4e6e27d9d866e5243a1b5583 into fa71b0dfd69385600b57fad8f8badc8e1824ed36 - view on LGTM.com
new alerts:

2 for Useless assignment to local variable

fixed alerts:

1 for Self assignment

Comment posted by LGTM.com

It would be an good idea to mention in a comment why this is removed.

This pull request introduces 2 alerts and fixes 1 when merging c3a64fd40d8168525641bf523e97555d2d959b46 into fa71b0dfd69385600b57fad8f8badc8e1824ed36 - view on LGTM.com
new alerts:

2 for Useless assignment to local variable

fixed alerts:

1 for Self assignment

Comment posted by LGTM.com

This pull request fixes 1 alert when merging 5dd2b25dfd3381e5ac0b211536cebe10de0c0760 into fa71b0dfd69385600b57fad8f8badc8e1824ed36 - view on LGTM.com
fixed alerts:

1 for Self assignment

Comment posted by LGTM.com

This pull request introduces 1 alert and fixes 1 when merging ec87d7d673a449a986dc0797cdfbc79a80a62bf5 into fa71b0dfd69385600b57fad8f8badc8e1824ed36 - view on LGTM.com
new alerts:

1 for Useless assignment to local variable

fixed alerts:

1 for Self assignment

Comment posted by LGTM.com

@Aladdin-ADD Try to keep this PR in sync with the 2.0 PR. Some changes have been done in that PR that you need to "transfer" to this PR.

if this PR get merged earlier, you may need to transfer the change to that PR. 😄

seems docs also need updated, will do. https://github.com/cherow/cherow/tree/master/packages/cherow#esnext-features

This pull request introduces 1 alert and fixes 1 when merging d178ee0779ca19b91533f4941b53d63f005fb6d5 into fa71b0dfd69385600b57fad8f8badc8e1824ed36 - view on LGTM.com
new alerts:

1 for Useless assignment to local variable

fixed alerts:

1 for Self assignment

Comment posted by LGTM.com

This pull request introduces 1 alert and fixes 1 when merging feb2842647fb702fa176bb4777e2ee5320e79690 into fa71b0dfd69385600b57fad8f8badc8e1824ed36 - view on LGTM.com
new alerts:

1 for Useless assignment to local variable

fixed alerts:

1 for Self assignment

Comment posted by LGTM.com


Added support for setting a custom width that is wider than the longe…

This adds support to set a custom width to an y axis as described in #92 .
Note that this only works with values that are greater than the longest label width.
It takes the max from the longest label and the custom width.
What do we need this for? If you've got several charts that share the same x values vertically stacked in a view, setting a common y axis width based on the widest y axis not only looks nicer, it also allows you to get away with a single x axis (that is, in case the chart ranges are kept in sync of course).

Like this, basically.

I'm improving it to have a max and a min width, and then merging it in.
By the way, you should really make branches for your PRs, so you can have separate PRs. (Create a branch, make whatever changes, create PR. Then go back and branch from the same spot and make another)

Ok, sounds even better.
Regarding the branching, do you have any difficulties with merging these pull requests the way I do them now? I usually pull from your master branch before implementing my changes and create the pull request from that, so (ideally) there shouldn't be any conflicts when you merge them, at least I hope so.
However, if branching makes it easier for you, then I'll do that of course.

No it is meant to make it easier for you, so you are not "stuck" waiting for a PR to go through...