Feature parity with DPT

Hi,
I would like to understand how does this new suite compare with existing DPT solution here.
I have been reading this guide  and this one as well to setup our infrastructure for HIPPA.
We are trying to build an infrastructure that closely resembles this.
Looking at the full.hcl example, it does look like that with this approach each of our environments such as staging and production would have their own devops/audit/monitoring GCP projects. Is this the right assumption?
Also, would it make to have multiple copies of full.hcl and create one for each env, like full-staging and full-prod or something like that?
I am really excited to try this out for our needs. Just need to understand above differences.
Apologies for asking so many questions in one go. Just getting started with this suite and in the process of creating staging and production envs.
Regards,
Giriraj

Hi Giriraj,
Thanks for your interest! In terms of features, I would say the new toolkit is relatively on par with DPT. It in fact supports more features such as org level auditing/monitoring and networking resources natively. Where things are lacking are documentations and clearer examples which we are actively working on.
We will soon be adding some features to support folder level management for things like devops, etc (https://github.com/GoogleCloudPlatform/healthcare-data-protection-suite/issues/40).
With the above we will be updating the examples and documentation to better architect organizations.
In general we will recommend:

one "org" config per org for managing org level auditing and monitoring
one "folder" config per team/environment

Each of the above will have its own devops project and CICD pipeline.
The folder boundary will depend on each org. For smaller orgs, having a "prod" folder (and thus prod devops) will be fine. So they would have the config files like org_foundation.hcl, folder_prod.hcl, folder_dev.hcl. If it should be for each team/app then you may have something like org_foundation.hcl, folder_prod_team1.hcl, folder_dev_team1.hcl, etc...
We will update the README and examples to reflect the above changes.
I will be sure to include relevant PRs to this issue so you can track them and give feedback.

One thing to keep in mind is you may experience more breaking changes in the next couple of months as we figure out the best way to deploy these complex infra. Thus whenever you sync to head please reference the latest examples to make sure you are not deviating from them.

@umairidris , thank you for this detailed explanation. That helps a lot.
After creating these projects, I need to deploy additional resources(pubsub, cloud run, firestore indexes, cloud build triggers etc.) in the app project created by project_apps template.
I created a folder structure as recommended by Terragrunt for qa env.
For subsequent invocations of terragrunt apply, does it make sense to use a service account that was created in the apps project?
This is what I just tried: I created a new service account in the devops project and added bunch of roles to it. I gave that service account an IAM role in the apps project.
I did this so that the service account would have access to the remote state bucket.
Does this approach make sense?
Also, would it be possible to use the template for  "project_firebase" in a way that I can treat firebase project as the only apps project. Our app uses a single GCP project to manage firebase and other compute requirements(cloud run, pub/sub etc.)
Other things I have stumbled upon:

cscc_source_id in monitor project -- where to get this id?

What should be the customer id in the org policies?
org policies where to get customer id
allowed_policy_member_customer_ids = [
"example_customer_id",
]

Is it possible to enable additional APIs for devops project?

Also, if it helps for documentation -- I had to add the 'Compute Shared VPC Admin' role to the user at the org level so that the shared VPC project could be used.

I also stumbled with following two errors for the monitor project -- I am not running the deployment under live folder using a different service account, it's my own user credentials that are set via gcloud auth login.
I have following roles on my account at the org level:

Owner
Folder Admin
Folder Editor
Organization Administrator

module.project.module.project-factory.null_resource.preconditions (local-exec): Executing: ["/bin/sh" "-c" "python3 /Users/giriraj/source/2020/healthcare/healthcare-data-protection-suite/output/live/monitor/project/.terraform/modules/project/terraform-google-project-factory-8.0.1/modules/core_project_factory/scripts/preconditions/preconditions.py --billing_account=\"<billing_account>\" --credentials_path=\"\" --folder_id=\"\" --impersonate_service_account=\"\" --org_id=\"<org_id>\" --shared_vpc=\"\" "] google_folder.folder: Still creating... [10s elapsed] module.project.module.project-factory.null_resource.preconditions (local-exec): /Users/giriraj/source/2020/healthcare/venv/lib/python3.7/site-packages/google/auth/_default.py:69: UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK without a quota project. You might receive a "quota exceeded" or "API not enabled" error. We recommend you rerun gcloud auth application-default loginand make sure a quota project is added. Or you can use service accounts instead. For more information about service accounts, see https://cloud.google.com/docs/authentication/ module.project.module.project-factory.null_resource.preconditions (local-exec):   warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING) module.project.module.project-factory.null_resource.preconditions (local-exec): WARNING:googleapiclient.http:Invalid JSON content from response: b'{\n  "error": {\n    "code": 403,\n    "message": "The caller does not have permission",\n    "status": "PERMISSION_DENIED"\n  }\n}\n' module.project.module.project-factory.null_resource.preconditions (local-exec): Traceback (most recent call last): module.project.module.project-factory.null_resource.preconditions (local-exec):   File "/Users/giriraj/source/2020/healthcare/healthcare-data-protection-suite/output/live/monitor/project/.terraform/modules/project/terraform-google-project-factory-8.0.1/modules/core_project_factory/scripts/preconditions/preconditions.py", line 492, in <module> module.project.module.project-factory.null_resource.preconditions (local-exec):     retcode = main(sys.argv) module.project.module.project-factory.null_resource.preconditions (local-exec):   File "/Users/giriraj/source/2020/healthcare/healthcare-data-protection-suite/output/live/monitor/project/.terraform/modules/project/terraform-google-project-factory-8.0.1/modules/core_project_factory/scripts/preconditions/preconditions.py", line 474, in main module.project.module.project-factory.null_resource.preconditions (local-exec):     results.append(validator.validate(credentials)) module.project.module.project-factory.null_resource.preconditions (local-exec):   File "/Users/giriraj/source/2020/healthcare/healthcare-data-protection-suite/output/live/monitor/project/.terraform/modules/project/terraform-google-project-factory-8.0.1/modules/core_project_factory/scripts/preconditions/preconditions.py", line 262, in validate module.project.module.project-factory.null_resource.preconditions (local-exec):     response = request.execute() module.project.module.project-factory.null_resource.preconditions (local-exec):   File "/Users/giriraj/source/2020/healthcare/venv/lib/python3.7/site-packages/googleapiclient/_helpers.py", line 134, in positional_wrapper module.project.module.project-factory.null_resource.preconditions (local-exec):     return wrapped(*args, **kwargs) module.project.module.project-factory.null_resource.preconditions (local-exec):   File "/Users/giriraj/source/2020/healthcare/venv/lib/python3.7/site-packages/googleapiclient/http.py", line 907, in execute module.project.module.project-factory.null_resource.preconditions (local-exec):     raise HttpError(resp, content, uri=self.uri) module.project.module.project-factory.null_resource.preconditions (local-exec): googleapiclient.errors.HttpError: <HttpError 403 when requesting https://serviceusage.googleapis.com/v1/projects/<project_id>-apps/services/admin.googleapis.com?alt=json returned "The caller does not have permission"> module.project.module.project-factory.null_resource.preconditions (local-exec): /Users/giriraj/source/2020/healthcare/venv/lib/python3.7/site-packages/google/auth/_default.py:69: UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK without a quota project. You might receive a "quota exceeded" or "API not enabled" error. We recommend you rerungcloud auth application-default loginand make sure a quota project is added. Or you can use service accounts instead. For more information about service accounts, see https://cloud.google.com/docs/authentication/ module.project.module.project-factory.null_resource.preconditions (local-exec):   warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING) module.project.module.project-factory.null_resource.preconditions (local-exec): WARNING:googleapiclient.http:Invalid JSON content from response: b'{\n  "error": {\n    "code": 403,\n    "message": "The caller does not have permission",\n    "status": "PERMISSION_DENIED"\n  }\n}\n'
And
 module.forseti.google_project_service.main[16]: Refreshing state... [id=<project_id>
   monitor/spanner.googleapis.com]

 : googleapi: Error 409: Sink bigquery-org-sink already exists, alreadyExists

on .terraform/modules/bigquery_log_export/terraform-google-log-export-4.0.1/main.tf line 58, in resource "
 google_logging_organization_sink" "sink":
 58: resource "google_logging_organization_sink" "sink" {

 Error: googleapi: Error 409: Sorry, that name is not available. Please try a different one., conflict

 on .terraform/modules/storage_destination/terraform-google-cloud-storage-1.6.0/modules/simple_bucket/main.tf line 17,
 in resource "google_storage_bucket" "bucket":
 17: resource "google_storage_bucket" "bucket" {

 [terragrunt] [/Users/giriraj/source/2020/healthcare/healthcare-data-protection-suite/output/live/audit/resources]
 2020/06/23 23:05:15 Module /Users/giriraj/source/2020/healthcare/healthcare-data-protection-
suite/output/live/audit/resources has finished with an error: Hit multiple errors:
 exit status 1

`
And a similar error for apps project:
module.project.module.project-factory.null_resource.preconditions: Provisioning with 'local-exec'... module.project.module.project-factory.null_resource.preconditions (local-exec): Executing: ["/bin/sh" "-c" "python3 /Users/giriraj/source/2020/healthcare/healthcare-data-protection-suite/output/live/prod/app-team/<project_id>-apps/project/.terraform/modules/project/terraform-google-project-factory-8.0.1/modules/core_project_factory/scripts/preconditions/preconditions.py --billing_account=\"<billing_id>\" --credentials_path=\"\" --folder_id=\"folders/<folder_id>\" --impersonate_service_account=\"\" --org_id=\"<org_id>\" --shared_vpc=\"<project_id>\" "] module.project.module.project-factory.null_resource.preconditions (local-exec): /Users/giriraj/source/2020/healthcare/venv/lib/python3.7/site-packages/google/auth/_default.py:69: UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK without a quota project. You might receive a "quota exceeded" or "API not enabled" error. We recommend you rerun gcloud auth application-default loginand make sure a quota project is added. Or you can use service accounts instead. For more information about service accounts, see https://cloud.google.com/docs/authentication/ module.project.module.project-factory.null_resource.preconditions (local-exec):   warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING) module.project.module.project-factory.null_resource.preconditions (local-exec): WARNING:googleapiclient.http:Invalid JSON content from response: b'{\n  "error": {\n    "code": 403,\n    "message": "The caller does not have permission",\n    "status": "PERMISSION_DENIED"\n  }\n}\n' module.project.module.project-factory.null_resource.preconditions (local-exec): Traceback (most recent call last): module.project.module.project-factory.null_resource.preconditions (local-exec):   File "/Users/giriraj/source/2020/healthcare/healthcare-data-protection-suite/output/live/prod/app-team/<project_id>/project/.terraform/modules/project/terraform-google-project-factory-8.0.1/modules/core_project_factory/scripts/preconditions/preconditions.py", line 492, in <module> module.project.module.project-factory.null_resource.preconditions (local-exec):     retcode = main(sys.argv) module.project.module.project-factory.null_resource.preconditions (local-exec):   File "/Users/giriraj/source/2020/healthcare/healthcare-data-protection-suite/output/live/prod/app-team/<project_id>/project/.terraform/modules/project/terraform-google-project-factory-8.0.1/modules/core_project_factory/scripts/preconditions/preconditions.py", line 474, in main module.project.module.project-factory.null_resource.preconditions (local-exec):     results.append(validator.validate(credentials))

@umairidris , thank you for this detailed explanation. That helps a lot.
After creating these projects, I need to deploy additional resources(pubsub, cloud run, firestore indexes, cloud build triggers etc.) in the app project created by project_apps template.
I created a folder structure as recommended by Terragrunt for qa env.
For subsequent invocations of terragrunt apply, does it make sense to use a service account that was created in the apps project?
This is what I just tried: I created a new service account in the devops project and added bunch of roles to it. I gave that service account an IAM role in the apps project.
I did this so that the service account would have access to the remote state bucket.
Does this approach make sense?
Also, would it be possible to use the template for "project_firebase" in a way that I can treat firebase project as the only apps project. Our app uses a single GCP project to manage firebase and other compute requirements(cloud run, pub/sub etc.)
Other things I have stumbled upon:

cscc_source_id in monitor project -- where to get this id?
What should be the customer id in the org policies?
org policies where to get customer id
allowed_policy_member_customer_ids = [
"example_customer_id",
]
Is it possible to enable additional APIs for devops project?

Also, if it helps for documentation -- I had to add the 'Compute Shared VPC Admin' role to the user at the org level so that the shared VPC project could be used.

You can find details of the fields in the respective recipe e.g. https://github.com/GoogleCloudPlatform/healthcare-data-protection-suite/blob/master/templates/tfengine/recipes/monitor.hcl#L42. They will also have documentation on how to get the fields if it is not obvious.
@xingao267 should we consider renaming cscc_source_id to "security_command_centre_id" so that it's more obvious?
It is currently not possible to enable APIs in the devops project unless you go through the CICD pipeline. I think it's a reasonable request and filed https://github.com/GoogleCloudPlatform/healthcare-data-protection-suite/issues/346 to follow up on it. In the meantime if you're not using CICD you can modify the generated files manually (beware they will get overwritten if you run the engine again).
We recommend deploying things using the cloud build based CICD process. When you use that the CICD service account is given the necessary permissions to deploy everything in the org/folder. Also, if you use the CICD to create the projects it will automatically get owner access to the project. You should not need to manually deploy projects then create additional service accounts and manually grant those permissions.
I will soon be replacing full.hcl with prod_team1.hcl which you can follow to setup a devops/CICD at both an org and then the folder level.
For troubleshooting individual resources/modules please file bugs in the respective cloud foundation toolkit module repo or the terraform provider.

Sent https://github.com/GoogleCloudPlatform/healthcare-data-protection-suite/pull/347 to improve the doc around how to use cscc with Forseti.

We recommend deploying things using the cloud build based CICD process. When you use that the CICD service account is given the necessary permissions to deploy everything in the org/folder. Also, if you use the CICD to create the projects it will automatically get owner access to the project. You should not need to manually deploy projects then create additional service accounts and manually grant those permissions.

Thank you @umairidris , I did not use the CICD block at all in full.hcl, since I am still trying this toolkit out and trying to deploy infrastructure by running scripts manually. Does this mean even if I need to deploy GKE clusters, VMs etc in the apps project, I need to use the devops Cloud Build account?
I think I am still not clear on how the CICD process for deploying this toolkit would work alongside the additional GCP resources that needs to be added. I will go through the CICD documentation in the components directory.
I will enable the APIs by modifying the generated config for  devops project now. Thank you for that trick.

HI @umairidris , I am trying the examples for folder_foundation.hcl and team.hcl.
Does the team need to share the same devops project as the folder?
I ran the folder_foundation example and then used the same devops project for team.hcl and it failed saying 'Error 409: Requested entity already exists'.

Hi Giriraj,
If you want a single devops to manage everything within a single folder then you can just copy all the content from folder_foundation.hcl into team.hcl except the devops template (don't duplicate it).
If you want to mimic what you would do for an org then youc an have a 'root' folder which has foundation and can create other sub folders. You can then pass the id of one of the sub folders to team.hcl and have it deployed within that folder.

Hi @umairidris ,
Do you mean to say I should copy the monitor and audit templates from folder_foundation.hcl into team.hcl as well ?
What I was thinking based on your response is that I will keep the devops, audit and monitoring templates in folder_foundation.hcl and just remove devops template from team.hcl.

Both will work but ideally you should only have one config file per devops/CICD. The reason is with a single terragrunt apply-all command the CICD can deploy everything it manages. If you split it across multiple config files you need to make sure you output them all to the same directory.

Thank you for that clarification, I actually do need to keep everything under one folder for now. I will simply add auditing and monitoring templates to the team.hcl and try it out. Thank you Umair.

Hi @umairidris, With devops/audit/monitoring in a single file, I was able to run terraform on bootstrap and cicd without any issue.
But running terragrunt apply-all under live folder throws following errors:
Error: Error setting billing account "<billing account id>" for project "projects/lo-temp43-monitor": googleapi: Error 400:
Precondition check failed., failedPrecondition

and
module.project.module.project-factory.null_resource.preconditions (local-exec): Executing: ["/bin/sh" "-c" "python3 /Users/giriraj/source/2020/healthcare/healthcare-data-protection-suite/qa-output-apps/live/lo-temp43-prod-apps/project/.terraform/modules/project/terraform-google-project-factory-8.0.1/modules/core_project_factory/scripts/preconditions/preconditions.py --billing_account=\"<billing_id>\" --credentials_path=\"\" --folder_id=\"<folder-id>\" --impersonate_service_account=\"\" --org_id=\"\" --shared_vpc=\"lo--temp43-prod-networks\" "]
module.project.module.project-factory.null_resource.preconditions (local-exec): /Users/giriraj/source/2020/healthcare/venv/lib/python3.7/site-packages/google/auth/_default.py:69: UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK without a quota project. You might receive a "quota exceeded" or "API not enabled" error. We recommend you rerun `gcloud auth application-default login` and make sure a quota project is added. Or you can use service accounts instead. For more information about service accounts, see https://cloud.google.com/docs/authentication/
module.project.module.project-factory.null_resource.preconditions (local-exec):   warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING)
module.project.module.project-factory.null_resource.preconditions (local-exec): Traceback (most recent call last):
module.project.module.project-factory.null_resource.preconditions (local-exec):   File "/Users/giriraj/source/2020/healthcare/healthcare-data-protection-suite/qa-output-apps/live/lo-temp43-prod-apps/project/.terraform/modules/project/terraform-google-project-factory-8.0.1/modules/core_project_factory/scripts/preconditions/preconditions.py", line 492, in <module>

and
Error: Error enabling the Compute Engine API required to delete the default network: Error waiting for Enable Project "lo-temp43-prod-apps" Services: [compute.googleapis.com]: timeout while waiting for state to become 'done: true' (last state: 'done: false', timeout: 4m0s)

  on .terraform/modules/project/terraform-google-project-factory-8.0.1/modules/core_project_factory/main.tf line 96, in resource "google_project" "main":
  96: resource "google_project" "main" {

Here is the final error output:
[terragrunt] 2020/06/25 19:54:44 Encountered the following errors:
Cannot process module Module /Users/giriraj/source/2020/healthcare/healthcare-data-protection-suite/qa-output-apps/live/monitor/forseti (excluded: false, dependencies: [/Users/giriraj/source/2020/healthcare/healthcare-data-protection-suite/qa-output-apps/live/monitor/project]) because one of its dependencies, Module /Users/giriraj/source/2020/healthcare/healthcare-data-protection-suite/qa-output-apps/live/monitor/project (excluded: false, dependencies: []), finished with an error: Hit multiple errors:
exit status 1
Hit multiple errors:
exit status 1
Hit multiple errors:
exit status 1
Cannot process module Module /Users/giriraj/source/2020/healthcare/healthcare-data-protection-suite/qa-output-apps/live/lo-temp43-prod-apps/resources (excluded: false, dependencies: [/Users/giriraj/source/2020/healthcare/healthcare-data-protection-suite/qa-output-apps/live/lo-temp43-prod-apps/project]) because one of its dependencies, Module /Users/giriraj/source/2020/healthcare/healthcare-data-protection-suite/qa-output-apps/live/lo-temp43-prod-apps/project (excluded: false, dependencies: [/Users/giriraj/source/2020/healthcare/healthcare-data-protection-suite/qa-output-apps/live/lo-temp43-prod-networks/resources]), finished with an error: Hit multiple errors:
exit status 1

I can see that all the 5 projects were created in the correct folder.
I will investigate them, but hoping you would have a fix for them.

Are you able to manually create a project and attach it to that billing account? Billing accounts have a max number of projects that can be attached so you might be hitting that.

Thanks @umairidris , that was it. As part of trying out the toolkit, I had created a lot of projects. But I have deleted almost all of them.
I guess those deleted projects are still attached to the billing account.

Hi @umairidris, I have moved past that error after deleting some of the dormant projects. Thank you for pointing that out.
In order to run the scripts manually to quickly test the changes, can I use any service account created by tfconfig?
Instead of using CICD while testing, if there is way I can use a key via GOOGLE_APPLICATION_CREDENTIALS locally, then I can quickly create a QA env.

@xingao267 can you advise?

@gbhojak you can use examples like this https://www.terraform.io/docs/providers/google/d/datasource_google_service_account_key.html to create a service account and download the service account key, then set that key in your terraform provider block https://www.terraform.io/docs/providers/google/guides/provider_reference.html#credentials. Or you can use GOOGLE_APPLICATION_CREDENTIALS  env var to point to your downloaded json key https://cloud.google.com/docs/authentication/getting-started, which should be picked up by Terraform by default.

The service account used in CICD is a cloud build internal service account, which doesn't allow you to download a key for that. So you need to create a separate SA and grant the same permission as what we granted to the CICD SA to it.

You can reuse most of the stuff in https://github.com/GoogleCloudPlatform/healthcare-data-protection-suite/blob/master/examples/tfengine/generated/devops/cicd/main.tf#L80, and replace that SA with the service account you created. So those tf configs can grant you SA the same permission as it granted the CICD SA.

Thank you @xingao267 , that helps a lot.

I am going to consider this issue resolved. Please file additional ones if you encounter any more. Thanks!


Correct module naming for examples

Title

Can you also update any places in our documentation that we use the incorrect name? I think in our example .md files we use the wrong name.

There's one more reference that needs to be updated in getting_started.md.


Switch to Yarn over npm

Switch to use yarn for package management and scripts. The package.json will remain the same and all the same packages will be used but yarn handles package versions much nicer. The main benefit I see right now is that yarn actually respects a package lock file whereas npm just ignores it. This will help ensure that all collaborators are using the same version of packages.

@jjspace we have not faced this yet, but it might happen later. so preventing it from now using yarn should be a good idea.

@iam13islucky I noticed you reacted thumbs down, do you have a reason not to switch?

NPM doesn't just ignore lock files, at least not in they're intended use. If you change dependencies, like adding new ones or updating, it updates the lock file. The intended use is for if you did a fresh install, you'd get the same dependencies, and it does that. If you absolutely don't want it to update no matter what, you set it in the package.json.
Additionally, it increases developer overhead and adds another (useless) step to new contributor onboarding. if they have a working node environment, they have NPM installed already, but they would need to install yarn, just to work on a CSS framework.
In the end, it's mostly bikeshedding, and I personally err on the side of simplicity and fewest moving pieces.

I've tried to do more research on this today but it's hard to find anything that's super new. As stated in the issue I linked in the issue itself there was/is a time/version of npm which does not respect the package lock as you would expect. By default npm install would get the latest version of a package and then update the package lock file to match which is backwards. There is the command npm install --no-save which seems like it should not try to do any fuzzy version updating but through testing that my current team had done they found this was not the case. Instead npm installed the updated packages and just didn't write the changes to the package lock.
I think this will need some more discussion before being merged completely and I would love some more input and sources that prove how this all actually works. Some others I came across are here, here and here. It also seems like some of the problem stems from the difference in package lock file format between npm@v5 and npm@v6 so it might be good to have another discussion on which version of Node and npm we use while developing (doesn't really apply to actual usage as it's only css).
As far as this goes:

Additionally, it increases developer overhead and adds another (useless) step to new contributor onboarding

I dont really see a huge issue with that personally. I feel yarn is still popular enough that people may likely already be use it but if they aren't they already have npm as you say and it's not hard to have them run npm i -g yarn once and then use it like normal.

From what I've read and tested, it will get the newest version and update the lock, but only if you've already installed it and are running npm install a second time. The package lock only does anything during the first install, as that's what the NPM team considered the use case. running npm install subsequent times is read as npm update, it seems, which is an odd choice, but it's the one they chose.
If you choose to go with yarn, that's fine by me, but I'm of the mind that this treats the package.json like law and the lock file as a first-time supplement, allowing us to keep having carefully managed package.json files like we did before lock files were ever added.

running npm install subsequent times is read as npm update, it seems, which is an odd choice, but it's the one they chose.
This exactly. I dont think npm install should do anything but install the packages that are desired. If they're already installed it should just check to make sure everything was installed correctly. IMO it should Not do npm update that's what npm update is for. Granted if you're doing npm install package_name or using that to install a specific version I can see an argument to update the lock file in that case.

I'm of the mind that this treats the package.json like law and the lock file as a first-time supplement, allowing us to keep having carefully managed package.json files like we did before lock files were ever added
I partially disagree with this. I view the lock file as law and the ultimate deciding factor of which version of a package to install. This is somewhat a result of semver having fuzzy versioning with the use of ^ and ~ which the package.json specifies. I think it's good to keep packages carefully managed between many developers so the problem of "it works for me" doesn't occur. From my perspective the lock file allows us to still specify we want this fuzzy range for a package in the package.json but this is the defacto one we use in this version of the project and not whatever is the newest. This ensures that we actively update packages when we are ready which in turn ensures that we test that everything is still working. This last point is kinda moot because this project is just css so there's not really functionality that would change but I still think it's valid.

Personally, I use Yarn for most of my projects. However, if you have Yarn installed, you likely already have npm as well. I'd say that we could certainly stick with npm since it's probably more ubiquitous.
As for dealing with package versioning discrepancies, I'd say that if we start running into issues we can start being more judicious about our use of the package.json, i.e. locking packages to a specific version instead of a range.
Ultimately, switching to Yarn would be easier for me personally, but as @iam13islucky mentioned, deciding between the two is really just bikeshedding.

deciding between the two is really just bikeshedding.

enough said, I say lets leave this until it pops up again.


Implement drizzle-kit init

Asks for the dialect, migrations folder location etc.
Asks about dotenv
Bootstraps the Drizzle config file
Adds kit and orm to package.json if missing

Also should support creating an initial migration with any pre-existing schema. For ex: when migrating an existing app to Drizzle we don't want data loss so we want the existing schema to be the starting point for new migrations.

In the meanwhile, had created a simple CLI to include drizzle in a project
npm init drizzle-project@latest

npm
https://www.npmjs.com/package/create-drizzle-project
github
https://github.com/Neo-Ciber94/drizzle-init


Allow prints to not print a new line.

Provide an option to the PRINT statement on whether or not to print a new line at the end. Possibly:
PRINT "Hello, World!"
vs
PRINT LINE "Hello, World!"

Probably going to do this differently now with optional statement parts as a possibility. Need to think more on it.


Information

Hey I was wondering if we could custom the command handler like adding some command parameter for us, and what are tag uses ?

What do you mean with command parameters ?
Tags are here to simplify conditional commands, when using the default message event, i.e. if you put the tag guildOnly, the command won't execute in DM, sending an error message.

What do you mean with command parameters ?
Tags are here to simplify conditional commands, when using the default message event, i.e. if you put the tag guildOnly, the command won't execute in DM, sending an error message.

oh ok for tag and command parameters I mean adding my own custom parameters like for example i want to restrict certain command only for top.gg voters so instead of writing code for each file, i was wondering if i could added it in command handler

oh ok for tag and command parameters I mean adding my own custom parameters like for example i want to restrict certain command only for top.gg voters so instead of writing code for each file, i was wondering if i could added it in command handler

You can try by extending the Command class and add your parameters, but you'll have to change types everywhere if it is in TypeScript, and it may fail with the default message event.
But !
For 3.0.0, I'll change the Command & Event system entirely, and for each command, you'll have to create a class extending the default Command class (or a custom class for special behaviour like yours), same for Events and it will be a lot much cleaner and simple do develop with this !
So my advice is to wait for 3.0.0, and use a function for your behaviour for now.

You can try by extending the Command class and add your parameters, but you'll have to change types everywhere if it is in TypeScript, and it may fail with the default message event.
But !
For 3.0.0, I'll change the Command & Event system entirely, and for each command, you'll have to create a class extending the default Command class (or a custom class for special behaviour like yours), same for Events and it will be a lot much cleaner and simple do develop with this !
So my advice is to wait for 3.0.0, and use a function for your behaviour for now.

ok well thanks

ok well thanks

Close the issue if you don't have anything else to ask about ^^

Close the issue if you don't have anything else to ask about ^^


Fix multiple calls to info api on project page

This PR fixes multiple calls to info API while opening the project dashboard.

Resolved by #584


Type redefinition errors when trying to include "sys/types.h"

bpftrace --info
System
OS: Linux 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020
Arch: x86_64
Build
version: v0.11.0
LLVM: 8
foreach_sym: yes
unsafe uprobe: no
bfd: yes
bpf_attach_kfunc: yes
bcc_usdt_addsem: no
libbpf: no
libbpf btf dump: no
libbpf btf dump type decl: no
Kernel helpers
probe_read: yes
probe_read_str: yes
probe_read_user: yes
probe_read_user_str: yes
probe_read_kernel: yes
probe_read_kernel_str: yes
get_current_cgroup_id: yes
send_signal: yes
override_return: yes
Kernel features
Instruction limit: -1
Loop support: no
btf: no
Map types
hash: yes
percpu hash: yes
array: yes
percpu array: yes
stack_trace: yes
perf_event_array: yes
Probe types
kprobe: no
tracepoint: yes
perf_event: yes
kfunc: no
NOTE: Using the bpftrace RPMs from https://github.com/fbs/el7-bpf-specs on CentOS 7
What reproduces the bug?
Trying to do some purely usermode tracing, and need to #include <sys/types.h> but get a ton of redefinition errors because it seems bpftrace includes <linux/types.h> by default, as mentioned in #876  .
Is there a way to turn off bpftrace's default includes?  They seem to presume kernel tracing in a way that prevents deeper usermode tracing.
The simplest reproducer I've found is actually part of bpftrace's test suite, added in 32dd14b:
# bpftrace -e "$(echo "#include <sys/types.h>"; echo "BEGIN { exit(); }")"
/usr/include/sys/types.h:44:18: error: typedef redefinition with different types ('__loff_t' (aka 'long') vs '__kernel_loff_t' (aka 'long long'))
/lib/modules/3.10.0-1127.19.1.el7.x86_64/source/include/linux/types.h:45:26: note: previous definition is here
/usr/include/sys/types.h:60:17: error: typedef redefinition with different types ('__dev_t' (aka 'unsigned long') vs '__kernel_dev_t' (aka 'unsigned int'))
/lib/modules/3.10.0-1127.19.1.el7.x86_64/source/include/linux/types.h:15:25: note: previous definition is here
/usr/include/sys/types.h:75:19: error: typedef redefinition with different types ('__nlink_t' (aka 'unsigned long') vs '__u32' (aka 'unsigned int'))
/lib/modules/3.10.0-1127.19.1.el7.x86_64/source/include/linux/types.h:19:17: note: previous definition is here
/usr/include/time.h:103:19: error: typedef redefinition with different types ('__timer_t' (aka 'void *') vs '__kernel_timer_t' (aka 'int'))
/lib/modules/3.10.0-1127.19.1.el7.x86_64/source/include/linux/types.h:25:26: note: previous definition is here
/usr/include/sys/types.h:197:1: error: typedef redefinition with different types ('long' vs '__s64' (aka 'long long'))
/lib/modules/3.10.0-1127.19.1.el7.x86_64/source/include/linux/types.h:113:17: note: previous definition is here
/usr/include/sys/types.h:203:1: error: typedef redefinition with different types ('unsigned long' vs '__u64' (aka 'unsigned long long'))
/lib/modules/3.10.0-1127.19.1.el7.x86_64/source/include/linux/types.h:112:17: note: previous definition is here
/usr/include/sys/select.h:75:5: error: typedef redefinition with different types ('struct fd_set' vs '__kernel_fd_set')
/lib/modules/3.10.0-1127.19.1.el7.x86_64/source/include/linux/types.h:14:26: note: previous definition is here
/usr/include/sys/types.h:235:20: error: typedef redefinition with different types ('__blkcnt_t' (aka 'long') vs 'unsigned long')
/lib/modules/3.10.0-1127.19.1.el7.x86_64/source/include/linux/types.h:134:23: note: previous definition is here

Hmm, can't seem to reproduce on master:
$ sudo ./build/src/bpftrace ~/scratch/bpftrace/bugs/sys_types.h
Attaching 1 probe...

$ sudo ./build/src/bpftrace ~/scratch/bpftrace/bugs/sys_types.h --btf
Attaching 1 probe...

$ cat ~/scratch/bpftrace/bugs/sys_types.h
#include <sys/types.h>

BEGIN
{
  exit();
}

So, after some experiments, I discovered a problem with this approach - when asking BTF to dump a type definition, it also dumps definitions of all other types needed for successful compilation. If one of those types is overridden by the user, a re-definition error occurs (and it's quite difficult to discover which types were dumped).
This leads me to another thought - do we really want to allow user to do this? I'd say that allowing overriding a part of kernel types while taking the rest from BTF will always eventually blow up somewhere. I'd suggest enabling only the following scenarios:
there are no user-defined types -> use BTF
there are user-defined types but they do not override kernel types -> use BTF
there are user-defined types conflicting with kernel types -> don't use BTF

This should allow user to define his own types that use existing kernel types without any problems, but if he wants to use types with conflicting names (e.g. for userspace tracing), he must define/include all the necessary types manually (or use them from linux/types.h, which is included in such case). This approach should be also backwards compatible for scripts that include kernel headers (such as the above tcplife.bt) as those must have already specified all the necessary types.
Any thoughs before I start implementing this?
Originally posted by @viktormalik in #1506 (comment)

#1588 probably will have a lot  of overlap with this

reproduce this error in the latest master build. is this been fixed or not?

I cannot reproduce this anymore, closing.
Please reopen if you find a reproducer with the current master.

# cat ngx_http_process_request_uri.bt

#!/usr/bin/env bpftrace

#include <ngx_core.h>
#include <ngx_http.h>
#include <ngx_config.h>

uprobe:/usr/local/nginx/sbin/nginx:ngx_http_process_request_uri {
    $r = arg0;
    printf("get url:%s\n", str($r->uri));
}

nginx.zip
# sudo bpftrace -I nginx/ ngx_http_process_request_uri.bt

/lib/modules/6.11.2-amd64/source/include/linux/compiler-clang.h:45:9: warning: '__HAVE_BUILTIN_BSWAP32__' macro redefined [-Wmacro-redefined]
note: previous definition is here
/lib/modules/6.11.2-amd64/source/include/linux/compiler-clang.h:46:9: warning: '__HAVE_BUILTIN_BSWAP64__' macro redefined [-Wmacro-redefined]
note: previous definition is here
/lib/modules/6.11.2-amd64/source/include/linux/compiler-clang.h:47:9: warning: '__HAVE_BUILTIN_BSWAP16__' macro redefined [-Wmacro-redefined]
note: previous definition is here
/usr/include/x86_64-linux-gnu/sys/types.h:42:18: error: typedef redefinition with different types ('__loff_t' (aka 'long') vs '__kernel_loff_t' (aka 'long long'))
/lib/modules/6.11.2-amd64/source/include/linux/types.h:52:26: note: previous definition is here
/usr/include/x86_64-linux-gnu/sys/types.h:59:17: error: typedef redefinition with different types ('__dev_t' (aka 'unsigned long') vs '__kernel_dev_t' (aka 'unsigned int'))
/lib/modules/6.11.2-amd64/source/include/linux/types.h:21:25: note: previous definition is here
/usr/include/x86_64-linux-gnu/sys/types.h:74:19: error: typedef redefinition with different types ('__nlink_t' (aka 'unsigned long') vs 'u32' (aka 'unsigned int'))
/lib/modules/6.11.2-amd64/source/include/linux/types.h:25:15: note: previous definition is here
/usr/include/x86_64-linux-gnu/bits/types/timer_t.h:7:19: error: typedef redefinition with different types ('__timer_t' (aka 'void *') vs '__kernel_timer_t' (aka 'int'))
/lib/modules/6.11.2-amd64/source/include/linux/types.h:31:26: note: previous definition is here
/usr/include/x86_64-linux-gnu/bits/stdint-intn.h:27:19: error: typedef redefinition with different types ('__int64_t' (aka 'long') vs 's64' (aka 'long long'))
/lib/modules/6.11.2-amd64/source/include/linux/types.h:115:15: note: previous definition is here
/usr/include/x86_64-linux-gnu/sys/types.h:161:20: error: typedef redefinition with different types ('__uint64_t' (aka 'unsigned long') vs 'u64' (aka 'unsigned long long'))
/lib/modules/6.11.2-amd64/source/include/linux/types.h:114:15: note: previous definition is here
/usr/include/x86_64-linux-gnu/sys/select.h:70:5: error: typedef redefinition with different types ('struct fd_set' vs '__kernel_fd_set')
/lib/modules/6.11.2-amd64/source/include/linux/types.h:20:26: note: previous definition is here
/usr/include/x86_64-linux-gnu/sys/types.h:205:22: error: typedef redefinition with different types ('__blkcnt64_t' (aka 'long') vs 'u64' (aka 'unsigned long long'))
/lib/modules/6.11.2-amd64/source/include/linux/types.h:135:13: note: previous definition is here
/lib/modules/6.11.2-amd64/source/arch/x86/include/uapi/asm/stat.h:83:8: error: redefinition of 'stat'
/usr/include/x86_64-linux-gnu/bits/struct_stat.h:26:8: note: previous definition is here
/lib/modules/6.11.2-amd64/source/arch/x86/include/uapi/asm/stat.h:97:19: error: expected ';' at end of declaration list
/lib/modules/6.11.2-amd64/source/arch/x86/include/uapi/asm/stat.h:99:19: error: expected ';' at end of declaration list
/lib/modules/6.11.2-amd64/source/arch/x86/include/uapi/asm/stat.h:101:19: error: expected ';' at end of declaration list
/lib/modules/6.11.2-amd64/source/arch/x86/include/uapi/asm/stat.h:132:16: error: expected ';' at end of declaration list
/lib/modules/6.11.2-amd64/source/arch/x86/include/uapi/asm/stat.h:133:16: error: expected ';' at end of declaration list
/lib/modules/6.11.2-amd64/source/arch/x86/include/uapi/asm/stat.h:134:16: error: expected ';' at end of declaration list
/lib/modules/6.11.2-amd64/source/include/uapi/linux/time.h:33:8: error: redefinition of 'timezone'
/usr/include/x86_64-linux-gnu/sys/time.h:52:8: note: previous definition is here
/lib/modules/6.11.2-amd64/source/arch/x86/include/uapi/asm/sigcontext.h:40:8: error: redefinition of '_fpx_sw_bytes'
/usr/include/x86_64-linux-gnu/bits/sigcontext.h:31:8: note: previous definition is here
/lib/modules/6.11.2-amd64/source/arch/x86/include/uapi/asm/sigcontext.h:85:8: error: redefinition of '_fpreg'
/usr/include/x86_64-linux-gnu/bits/sigcontext.h:40:8: note: previous definition is here
/lib/modules/6.11.2-amd64/source/arch/x86/include/uapi/asm/sigcontext.h:91:8: error: redefinition of '_fpxreg'
/usr/include/x86_64-linux-gnu/bits/sigcontext.h:46:8: note: previous definition is here
fatal error: too many errors emitted, stopping now [-ferror-limit=]
WARNING: Cannot take type definitions from BTF since there is a redefinition conflict with user-defined types.


Can't connect through SSH tunnel

Using WSL, I've added a port forwarding to my SSH connection and connection works from a GUI (HeidiSQL) and also from CLI
LocalForward 3326 localhost:3306

mysql -uX -P3326  -h<IP_ADDRESS> -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 334416

Using the same credentials and port in my app I get
 [error] MyXQL.Connection (#PID<0.1827.0>) failed to connect: ** (MyXQL.Error) (1044) Access denied for user 'X'@'localhost' to database

Anything I can do to debug further?

After posting I thought about something, obviously.
Running iex -S mix and then doing {:ok, pid} = MyXQL.start_link(hostname: "<IP_ADDRESS>", username: "Xport: 3326, password: "x") works so it's something with the initial config (done through .env)


Columns Block

We need a columns block which supports variants for different combinations of column/layout.

The block needs to support 2, 3 or 4 columns
The different layouts are:

33 / 66
50 / 50
66 / 33
33 / 33 / 33
25 / 25 / 25 / 25

Styles must be named in a way that does not break CSS (namely, a style has to start with a letter, not a number)
The 3 and 4 column styles can just be shorted to represent three or four columns, it's assumed the space is distributed evenly.
If a column has an image as the first child, that image should be set as a background image for the cell, maintaining its proportionality while filling the cell.  If we need any variations of this, they will be described by another story.
If an image is not the first element of the column, it should be treated as a regular block/inline block element with a max width of the column so that it resizes down as the screen becomes more narrow.
For four-columns: if a row has only two columns, then that row should be treated as 50/50.  This is important for mobile.

Mobile requirements:
For 2 and 3 columns, the columns should just stack vertically.
For 4 columns, it should stack vertically with the left two columns on top and the right two columns on the bottom.
Example pages:

Cols
Split
Example 1
Example 2

2
33/66
https://www.momentive.com/en-us/about
https://www.momentive.jp/content/momentive/jp/ja/company/company1.html

2
66/33
https://www.momentive.com/en-us/about/careers
https://www.momentive.com/en-us/about

2
50/50
https://www.momentive.com/en-us/about

4
25/25/25/25
https://www.momentive.com/en-us/about

3
33/33/33
https://www.momentive.com/en-us/about/careers

Noted!, however I don't think we should be making any changes in OOTB block (for eg-> "Column" here) and more or less, I'll be introducing a new block (probably via name- "Column-Customised") and there on the basis of what variant the block gets call for, i'll be internally creating Column block like [1] with target variant and will create styling specifc to that variant. Do let me know if that doesn't makes sense.
[1]:
var columnExtended = buildBlock('Column', {..Variant-data})
decorateBlock(columnExtended);
loadBlock(columnExtended);


[QUESTION] Is Typer abandoned?

Has Typer been abandoned/turned inactive?
To an outsider it seems like there are some perfectly good pull requests ready to merge and that there hasn't been any activity for around 8 months.
The reason I am asking is because I was hoping to use Typer in a project - It looks like an excellent library! I am a bit wary of doing that if the project is no longer maintained though.

https://twitter.com/tiangolo/status/1375066666665672711?s=21
tl;dr He will soon resume work on FastAPI and Typer.

@Atem18
That looks very promising indeed! Thank you so much for pointing this out!

Nope, Typer is not abandoned, in fact, I just released Typer 0.4.0, which is compatible with both Click 7 and Click 8. :tada:
But of course, it all depends on how much time I have available to dedicate to it.
A lot of my time is spent handling issues, replying to questions, etc. (here and in the other projects).
If you would like to see faster progress, you could help by answering questions from others, sponsoring, etc. https://typer.tiangolo.com/help-typer/#help-others-with-issues-in-github


In NewV2Repository, check the suffix of endpoint.URL and append 'v2' …

…correctly.
Signed-off-by: yuzou<EMAIL_ADDRESS>

@thaJeztah ,thanks Sebastiaan  for reviewing my PR, and i have amended my PR according to your suggestion, please review it again.

Thanks @hopkings2008 LGTM, but other maintainers still should have a look here :)

@thaJeztah ,thanks for checking this and thanks for your suggestion, i have removed the unnecessary whitespace.

Great, thanks!

@thaJeztah , the CI fails in docker exec which i think is not related to my latest  changes( which removed the blank lines ), and all the tests were passed before.

@hopkings2008 no worries, I don't think it's related no

ping @dmcgowan @aaronlehmann

LGTM

LGTM


Redstone Control of Rocket Monitoring Station not working

I want to start some rockets automatically by using the redstone features of the Rocket Monitoring Station. But currently the Rocket Monitoring Station doesn`t react to the redstone inputs and nothing happens (rocket is not launching).
Details:
- Minecraft Version:	1.12.2
- Forge Version:	<IP_ADDRESS>59
- AR Version:		1.12.2-2.0.0-17
- libVulpes Version:	1.12.2-0.4.2-25
Some things I already checked:
- the setup itself should be correct as launching with the button in the monitoring station works perfectly
- problem also present with no other mods loaded
- log files contains no errors, AR shows full functionality without any other issues
Honestly, I don't know if there is a bug or I just did something wrong.

fixed in "Advanced Rocketry - Reworked"
(https://github.com/dercodeKoenig/AdvancedRocketry)


add CVPR2021

CVPR 2021 paper submission deadline will be Nov 16, 2020.
The timezone is not specified yet. It will be updated later (I added "Deadline TBC" note)
http://cvpr2021.thecvf.com/

Thanks!


filters: 2.0.1-3 in 'galactic/distribution.yaml' [bloom]

Increasing version of package(s) in repository filters to 2.0.1-3:

upstream repository: https://github.com/ros/filters.git
release repository: https://github.com/ros2-gbp/filters-release.git
distro file: galactic/distribution.yaml
bloom version: 0.10.7
previous version for package: 2.0.0-3

This one also looks like bloom did not complete successfully.

I'll re-release and open a new PR


build_container_image error failing to authorise to docker

While the build_container_image job would push the container image to Github package, the job would still fail due to the following error:
ERROR: error writing layer blob: failed to authorize: failed to fetch oauth token:
unexpected status from GET request to https://auth.docker.io/token?scope=repository%3Alibrary%2Ffalse%3Apull%2Cpush&service=registry.docker.io:
401 Unauthorized

Fixed via https://github.com/ghosteathuman/kopi-o-kosong/pull/12/
Issue is related to cache. Refer to https://stackoverflow.com/questions/72073527/buildx-authorization-error-when-trying-to-release-a-docker-image-to-ghcr


⚠ Bofrost.fr has degraded performance

In d5c6a68, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 1351 ms

Resolved: Bofrost.fr performance has improved in a4aead8.


Made a few changes in the readme file

Thanks for change but please you should do your PR on the dev branch.

Hi, I am a beginner to Github.
You meant I got to 'git checkout -b change_doc ' and then send the pr, right?

No I mean that you should update the README file on the dev branch.
If you've done your PR using Github, close it and do another using llaske:dev branch instead of llaske:master branch.

Ok
Thank you


rustc: 1.67.1 -> 1.68.1

Description of changes
https://github.com/rust-lang/rust/blob/master/RELEASES.md
Things done

Built on platform(s)

[x] x86_64-linux
[x] aarch64-linux
[x] x86_64-darwin
[x] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[x] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
23.05 Release Notes (or backporting 22.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Some hashes would probably need to be updated, see #217084

Cargo will introduce a change that will break our FODs for packages that use Git dependencies.

Making a draft until I figure out all these FODs.

There was a treewide hash change like this and @danieldk had a script, maybe this will help speeding up the process
We can also merge https://github.com/NixOS/nixpkgs/pull/217084 before this and convert all the hashes to cargoLock, but this will require people to come to a consensus, which is not the case right not: https://github.com/NixOS/nixpkgs/pull/217084#issuecomment-1456894554

If we can somehow extract the Cargo.lock files from each package, we can determine if it needs updating based on if it has any git dependencies

If we can somehow extract the Cargo.lock files from each package, we can determine if it needs updating based on if it has any git dependencies

Steal my logic from #217084 for that, it should work for 99% of packages.

I will not have time to perform the treewide before maybe this weekend or more days, so anyone who really want to have this change can go ahead. I'm also in favor of waiting a proper resolution for #217084 (e.g. a merge).

Could we enable fresh stabilized sparse-registry for fetchCargoTarball? This can dramatically improve the fetching speed if we need a treewide hash update anyway.

Do you see this in this PR?

Could we enable fresh stabilized sparse-registry for fetchCargoTarball? This can dramatically improve the fetching speed if we need a treewide hash update anyway.

Do you see this in this PR?

No? I mean:
diff --git a/pkgs/build-support/rust/fetch-cargo-tarball/default.nix b/pkgs/build-support/rust/fetch-cargo-tarball/default.nix
index 36ab9316974..6c4f8e3053a 100644
--- a/pkgs/build-support/rust/fetch-cargo-tarball/default.nix
+++ b/pkgs/build-support/rust/fetch-cargo-tarball/default.nix
@@ -62,8 +62,13 @@ in stdenv.mkDerivation ({
     export CARGO_HOME=$(mktemp -d cargo-home.XXX)
     CARGO_CONFIG=$(mktemp cargo-config.XXXX)

-    if [[ -n "$NIX_CRATES_INDEX" ]]; then
     cat >$CARGO_HOME/config.toml <<EOF
+    [registries.crates-io]
+    protocol = 'sparse'
+    EOF
+
+    if [[ -n "$NIX_CRATES_INDEX" ]]; then
+    cat >>$CARGO_HOME/config.toml <<EOF
     [source.crates-io]
     replace-with = 'mirror'
     [source.mirror]

For nix build -f . cargo-asm.cargoDeps -vL --rebuild, sparse registry reduces building (fetching) time from 119.5s to 14.3s for me, which is about 8x speed.

or we can set the environment variable CARGO_REGISTRIES_CRATES_IO_PROTOCOL

or we can set the environment variable CARGO_REGISTRIES_CRATES_IO_PROTOCOL

Opened a PR for this: https://github.com/NixOS/nixpkgs/pull/222444

Upgrading.

Should we make it one commit?

Can do, but would only do it at "premerge-time" (just in case, we need to go back on the previous commit or something).

https://github.com/NixOS/nixpkgs/blob/4efa8434580af72e69bbe52c6bc37a90e9880cbc/pkgs/development/compilers/rust/1_68.nix#L10
rustfmt doesn't build, it will block firefox via rust-bindgen.
error: linking with `/nix/store/rj91g41smpmp92xvhx6rjxz6878bn2b4-gcc-wrapper-12.2.0/bin/cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/nix/store/gr0a596ki6sg8hhfn45zp1mm6z2ngfmw-rustc-1.68.1/lib/rustlib/x86_64-unknown-linux-gnu/bin:/nix/store/rlhcbj4s8aa485k25c5czh2j85n7s15k-cargo-1.68.1/bin:/nix/store/gr0a5>
  = note: /nix/store/nydwzhllkq0a21dny69zdjczh6v275lb-binutils-2.40/bin/ld: cannot find -lLLVM-15: No such file or directory
          collect2: error: ld returned 1 exit status

error: could not compile `rustfmt-nightly` due to previous error
warning: build failed, waiting for other jobs to finish...
error: linking with `/nix/store/rj91g41smpmp92xvhx6rjxz6878bn2b4-gcc-wrapper-12.2.0/bin/cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/nix/store/gr0a596ki6sg8hhfn45zp1mm6z2ngfmw-rustc-1.68.1/lib/rustlib/x86_64-unknown-linux-gnu/bin:/nix/store/rlhcbj4s8aa485k25c5czh2j85n7s15k-cargo-1.68.1/bin:/nix/store/gr0a5>
  = note: /nix/store/nydwzhllkq0a21dny69zdjczh6v275lb-binutils-2.40/bin/ld: cannot find -lLLVM-15: No such file or directory
          collect2: error: ld returned 1 exit status

Built firefox on x86_64-linux

@ofborg build fd

Built thunderbird on aarch64-linux

Should we add release notes for this upgrade?

Could we enable fresh stabilized sparse-registry for fetchCargoTarball? This can dramatically improve the fetching speed if we need a treewide hash update anyway.

Do you see this in this PR?

No? I mean:
diff --git a/pkgs/build-support/rust/fetch-cargo-tarball/default.nix b/pkgs/build-support/rust/fetch-cargo-tarball/default.nix
index 36ab9316974..6c4f8e3053a 100644
--- a/pkgs/build-support/rust/fetch-cargo-tarball/default.nix
+++ b/pkgs/build-support/rust/fetch-cargo-tarball/default.nix
@@ -62,8 +62,13 @@ in stdenv.mkDerivation ({
     export CARGO_HOME=$(mktemp -d cargo-home.XXX)
     CARGO_CONFIG=$(mktemp cargo-config.XXXX)

-    if [[ -n "$NIX_CRATES_INDEX" ]]; then
     cat >$CARGO_HOME/config.toml <<EOF
+    [registries.crates-io]
+    protocol = 'sparse'
+    EOF
+
+    if [[ -n "$NIX_CRATES_INDEX" ]]; then
+    cat >>$CARGO_HOME/config.toml <<EOF
     [source.crates-io]
     replace-with = 'mirror'
     [source.mirror]

For nix build -f . cargo-asm.cargoDeps -vL --rebuild, sparse registry reduces building (fetching) time from 119.5s to 14.3s for me, which is about 8x speed.

Apologies, I meant: do you think I should do this change in this PR? I apologize if it has been taken aggressively. (English language barrier yadayada).

I meant: do you think I should do this change in this PR?

 You can cherry pick the smaller env var patch from #222444. It also causes no rebuild since it affects only FODs.

I meant: do you think I should do this change in this PR?

 You can cherry pick the smaller env var patch from #222444. It also causes no rebuild since it affects only FODs.

Done, thank you and sorry again for realizing too late I misunderstood your message.

Reproducible ICE is interesting?  https://hydra.nixos.org/build/214913529

rustc can no longer be cross compiled (build!=host) as of this commit according to git bisect.
When building the rustc's vendored libraries, they are unable to find std::, which I find quite baffling.  Any ideas?
Below is a sampling of the error messages (there are hundreds like this) from nix build -f . -L pkgsCross.aarch64-multiplatform.rustc:
rustc-aarch64-unknown-linux-gnu> error[E0463]: can't find crate for `std`
rustc-aarch64-unknown-linux-gnu>  --> /build/rustc-1.68.0-src/vendor/serde_json/build.rs:1:5
rustc-aarch64-unknown-linux-gnu>   |
rustc-aarch64-unknown-linux-gnu> 1 | use std::env;
rustc-aarch64-unknown-linux-gnu>   |     ^^^ can't find crate
rustc-aarch64-unknown-linux-gnu> error[E0463]: can't find crate for `std`
rustc-aarch64-unknown-linux-gnu>  --> /build/rustc-1.68.0-src/vendor/serde_json/build.rs:2:5
rustc-aarch64-unknown-linux-gnu>   |
rustc-aarch64-unknown-linux-gnu> 2 | use std::process::Command;
rustc-aarch64-unknown-linux-gnu>   |     ^^^ can't find crate
rustc-aarch64-unknown-linux-gnu> error[E0463]: can't find crate for `std`
rustc-aarch64-unknown-linux-gnu>  --> /build/rustc-1.68.0-src/vendor/serde_json/build.rs:3:5
rustc-aarch64-unknown-linux-gnu>   |
rustc-aarch64-unknown-linux-gnu> 3 | use std::str::{self, FromStr};
rustc-aarch64-unknown-linux-gnu>   |     ^^^ can't find crate
rustc-aarch64-unknown-linux-gnu> error: cannot find macro `println` in this scope
rustc-aarch64-unknown-linux-gnu>   --> /build/rustc-1.68.0-src/vendor/serde_json/build.rs:38:9
rustc-aarch64-unknown-linux-gnu>    |
rustc-aarch64-unknown-linux-gnu> 38 |         println!("cargo:rustc-cfg=no_btreemap_retain");
rustc-aarch64-unknown-linux-gnu>    |         ^^^^^^^
rustc-aarch64-unknown-linux-gnu> error: cannot find macro `println` in this scope
rustc-aarch64-unknown-linux-gnu>   --> /build/rustc-1.68.0-src/vendor/serde_json/build.rs:32:9
rustc-aarch64-unknown-linux-gnu>    |
rustc-aarch64-unknown-linux-gnu> 32 |         println!("cargo:rustc-cfg=no_btreemap_remove_entry");
rustc-aarch64-unknown-linux-gnu>    |         ^^^^^^^
rustc-aarch64-unknown-linux-gnu> error: cannot find macro `println` in this scope
rustc-aarch64-unknown-linux-gnu>   --> /build/rustc-1.68.0-src/vendor/serde_json/build.rs:26:9
rustc-aarch64-unknown-linux-gnu>    |
rustc-aarch64-unknown-linux-gnu> 26 |         println!("cargo:rustc-cfg=no_btreemap_get_key_value");
rustc-aarch64-unknown-linux-gnu>    |         ^^^^^^^
rustc-aarch64-unknown-linux-gnu> error: cannot find macro `println` in this scope
rustc-aarch64-unknown-linux-gnu>   --> /build/rustc-1.68.0-src/vendor/serde_json/build.rs:14:13
rustc-aarch64-unknown-linux-gnu>    |
rustc-aarch64-unknown-linux-gnu> 14 |             println!("cargo:rustc-cfg=limb_width_32");
rustc-aarch64-unknown-linux-gnu>    |             ^^^^^^^
rustc-aarch64-unknown-linux-gnu> error: cannot find macro `println` in this scope
rustc-aarch64-unknown-linux-gnu>   --> /build/rustc-1.68.0-src/vendor/serde_json/build.rs:11:13
rustc-aarch64-unknown-linux-gnu>    |
rustc-aarch64-unknown-linux-gnu> 11 |             println!("cargo:rustc-cfg=limb_width_64");
rustc-aarch64-unknown-linux-gnu>    |             ^^^^^^^
rustc-aarch64-unknown-linux-gnu> error[E0531]: cannot find tuple struct or tuple variant `Some` in this scope
rustc-aarch64-unknown-linux-gnu>   --> /build/rustc-1.68.0-src/vendor/serde_json/build.rs:19:9
rustc-aarch64-unknown-linux-gnu>    |
rustc-aarch64-unknown-linux-gnu> 19 |         Some(minor) => minor,
rustc-aarch64-unknown-linux-gnu>    |         ^^^^ not found in this scope

Binaries generated by crate2nix (buildRustCrate) are much bigger after the last staging iteration, most likely do to rust bump (still checking), debug and release are affected.
I've tested on some internal crate.
Commit before merge bf839a4b2031557eb43e77d39d343b7ecc84c692:
150M    result/bin

After merge:
1.2G    result/bin

Can you try by disabling auditable? (cargo-auditable)

buildRustCrate doesn't have an auditable option

It is not connected with rust version bump, after reverting to a 1.67.1 on master binaries are still much bigger.

@Iblasc, unless you are 100% sure that it was this PR that caused your problem, you need to open a new issue for your problem (you can reference it here).  Otherwise the discussion keeps getting moved from one PR to another, pinging the wrong people.

I've tested on some internal crate.

Please post a complete reproducer in the new issue when you open it.
Note: before https://github.com/NixOS/nixpkgs/pull/210843 buildRustCrate was unconditionally stripping all builds, including debug builds.  That was fixed by https://github.com/NixOS/nixpkgs/pull/210843.  Maybe you're doing a debug build?  If so, either switch to doing a release build or else strip manually.

Interesting, it worked all with git deps before this PR. What was reason?
All reasonably big projects work with git deps. And why to break what was warking before? would be awesome there would be warning before breaking people using working nix.

sorry, thank you for hard work
https://opencollective.com/nixos/contributions/678610


Add killCount and noOp to delete tasks endpoint

Motivation
At Yelp, for PaaSTA, we would like to be able to predict Marathon's actions during a scale down event. This gives us a chance to decide if we're really sure about killing an instance/scaling down. This noOp flag allows us to get a preview of Marathon's plan during these events.
Ideally it'd be possible to hit up PUT /v2/apps/{app_id} with some sort of noOp flag to probe Marathon's deploy plans for any arbitrary change but that's a far more complicated code diff, so I opted for this simpler approach.
Implementation
This is my first time dabbing into Scala, so I apologize if I'm doing anything horribly wrong. All feedback is much appreciated. I checked the project with scalastyle and as far as I can tell I didn't any new style violations.
I added two basic tests following the pattern for the rest of AppTaskResourceTest.scala file and some tests had to be changed a little because of the type change to be just a generic Iterable[Task] instead of some specific collection. I'll add some github comments to mark some of the more interesting testing changes.

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Can't recreate the failing travis locally, not sure what's up with that.

Thanks for the PR- I like the idea a lot and It'd be really helpful. My day was taken over fixing two major 1.3 regressions, I'll try to take a look as soon as I can.

@ammaraskar Could you update the branch?

@ammaraskar no activity for the last month. Please incorporate the feedback and reopen the PR.


can't start application with spring boot 3.3.2 (logback-access-spring-boot-starter 4.2.2)

https://github.com/qos-ch/logback-access/issues/17
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2024-08-26 15:19:43.565 ERROR - org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter:40[main] -

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.springframework.boot.autoconfigure.web.embedded.TomcatWebServerFactoryCustomizer.customizeMaxQueueCapacity(TomcatWebServerFactoryCustomizer.java:170)

The following method did not exist:

    'void org.apache.coyote.AbstractProtocol.setMaxQueueSize(int)'

The calling method's class, org.springframework.boot.autoconfigure.web.embedded.TomcatWebServerFactoryCustomizer, was loaded from the following location:

    jar:file:/opt/xxxxxx/lib/spring-boot-autoconfigure-3.3.2.jar!/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizer.class

The called method's class, org.apache.coyote.AbstractProtocol, is available from the following locations:

    jar:file:/opt/xxxxxx/lib/tomcat-coyote-10.0.27.jar!/org/apache/coyote/AbstractProtocol.class
    jar:file:/opt/xxxxxx/lib/tomcat-embed-core-10.1.26.jar!/org/apache/coyote/AbstractProtocol.class

The called method's class hierarchy was loaded from the following locations:

    org.apache.coyote.AbstractProtocol: file:/opt/xxxxxx/lib/tomcat-coyote-10.0.27.jar

We experienced this, too. For now the fix is to completely exclude the transitive dependencies to catalina and coyote, which at least in our use case did not break anything else.
Noteworthy, we did not experience this when running applications with the mvn spring-boot plugin but only after building and running a docker image with JIB, most likely because the way JIB places the dependencies leads to a different behavior of the class loader (Did not dive into this because the exclusion fixed it for us)

We experienced this, too. For now the fix is to completely exclude the transitive dependencies to catalina and coyote, which at least in our use case did not break anything else.
Noteworthy, we did not experience this when running applications with the mvn spring-boot plugin but only after building and running a docker image with JIB, most likely because the way JIB places the dependencies leads to a different behavior of the class loader (Did not dive into this because the exclusion fixed it for us)

The order which libraries and classes are loaded can be very different. It can vary from time to time. We have it set up in approximately ten different applications. Two of them failed and the rest started up. So consider the order in which classes are loaded to be random and "removing the duplicate" as you did is the only safe way.


Pay deeplinks should support arbitrary callback parameters.

This will allow payment partners, merchants, CICO providers to redirect users to a transaction confirmation page after a user completes a transaction with Valora.
IMPORTANT: make sure to make vulnerability analysis when implementing this feature.

Closed in backlog spring clean May 2022


Explore the representation of finer quantization granularities than per-axis

The issue is based on the discussion and interest shown by the community to explore the representation of finer quantization granularities for quantization parameters in StableHLO.
Please refer to the discussion link for additional references.

Also AWQ that apparently is better than gptq https://arxiv.org/abs/2306.00978

@powderluv Thanks for providing the link!  Indeed an interesting read.
This is what I understood from the paper:
There is a small fraction of salient weights that are much more important for LLM's performance compared to others. To find the salient weight channels, they refer to the activation distribution rather than the weight distribution: weight channels corresponding to larger activation magnitudes are more salient since they process more important features. The paper talks about relying on input activation magnitude to pick out the salient weight channels and their corresponding scales. For non-salient weight channels use the weight magnitude to get the corresponding scales.
One thing that I was wondering about: From the POV of expressing the quantization parameters in StableHLO, this seems similar to the per-axis scaling scheme, which StableHLO currently supports. IMO, the novelty here lies in how the the scales are computed for each channel.
Please let me know if am missing some point.

Do we have any news on this topic?

Hello @sunshinemyson
There are ongoing planning around supporting subchannel and blockwise schemes for specifying the quantization parameters. I will be updating this issue sometime by the end of this month. In the meanwhile do you mind elaborating your use case? I am wondering if that is something in line with https://github.com/openxla/stablehlo/pull/1535#issuecomment-1572651651

Hi @sdasgup3 ,
Thanks for your reply. Actually we are working on the GPTQ too, according to our expr with Llama model, GPTQ can reach promise result.
Looking forward updates.
Thanks

Hi @sdasgup3 ,
Would you mind sharing your progress on this topic? Recently, I found the AWQ/GPTQ very popular when I create my own LLM application locally. You can find more quantized model from https://huggingface.co/TheBloke.
Thanks

Just wanted to update here that we still have plans to take this on in Q2'24. I will keep the updates posted.


null value handling

Hi,
We see you fixed an issue concerning null values in 2015. We now noticed an issue that is a result of how you handled that issue.
Queries that return no result will be cached as " _nullObject". When trying to get the same exact query from cache, this will translate to nothing - meaning the same as a query that is not cached.
Thus, we are seeing a query that can frequently produce no results being executed over and over again, despite being cached.
We would suggest that the EFCacheServiceProvider should return something else than 'null' when the '_nullobject' is in cache. The cachedqueryprovider can then respond to this and return an empty result set instead of executing the query.
Kind regards,
Ruben

Thanks. Fixed via #https://github.com/VahidN/EFSecondLevelCache/commit/4cf48edf5c822f622cc0d4b0f491842e1d6d1a18
PM> update-package

Hi,
Thanks for your quick response. There is however one small issue left in your fix.
We implemented your interfaced IEFCacheServiceProvider to add a filedependency option.
As you explicitly refer to a shared member on your implementation of this interface, the equals in the materialize function fails.
We would suggest to add the nullobject as a property on the interface, make the member private again, and make the property return the member in the implementation of the interface. That way it would support the dependenct injection once again :)
Kind regards,
Ruben

Just use EFCacheServiceProvider.NullObject in your implementation. nothing will be changed.


Allow customer to specify logging details

Packages impacted by this PR
Issues associated with this PR
@azure/web-pubsub
Describe the problem that is addressed by this PR
Customer could have the ability to print out headers/queries they'd like
What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?
Are there test cases added in this PR? (If not, why?)
Provide a list of related PRs (if any)
Command used to generate this PR:**(Applicable only to SDK release request PRs)
Checklists

[ ] Added impacted package name to the issue description
[ ] Does this PR needs any fixes in the SDK Generator?** (If so, create an Issue in the Autorest/typescript repository and link it here)
[ ] Added a changelog (if necessary)

API change check
APIView has identified API level changes in this PR and created following API reviews.
azure-web-pubsub

@xirzec Thanks for the review! Please check if it looks good to you now.


Memory Leaks

Greetings,
I've been noticing lots of memory leaks with PyAV when opening videos.  I've spent the good part of a day making sure I had none in my code before posting an issue, but I have a program that processes lots of video continuously using PyAV and I have noticed an increase in memory usage over the course of an hour (10GB).  I tested using the pyio branch using the default method for opening files along with the method for opening from a buffer and both resulted in the same issue.
Here are the results from one of my tests.  I'm using the resource module to return memory usage before and after two separate instances of video parsing.
----
Memory usage before: 12776 (kb)
No handlers could be found for logger "libav.h264"
Memory usage after: 69584 (kb)
----

----
Memory usage before: 69584 (kb)
Memory usage after: 100072 (kb)
----

 #!/usr/bin/python

import av
import resource

print "\n----"
print 'Memory usage before: %s (kb)' % resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
container = av.open('video.h264', 'r', 'h264')
for packet in container.demux():
        for frame in packet.decode():
                frame.to_image().save('/home/nomad/jpgs/frame-%02d.jpg' % frame.index)
print 'Memory usage after: %s (kb)' % resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
print "----\n"

print "\n----"
print 'Memory usage before: %s (kb)' % resource.getrusage(resource.RUSAGE_SELF).ru_maxrss

container2 = av.open('video.h264', 'r', 'h264')
for packet2 in container2.demux():
        for frame2 in packet2.decode():
                frame2.to_image().save('/home/nomad/jpgs/frame-%02d.jpg' % frame.index)

print 'Memory usage after: %s (kb)' % resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
print "----\n"

nomad@wilson ~ $ ll -h video.h264
-rw-r--r-- 1 nomad nomad 22M Oct 14 16:26 video.h264

Hmm.
If you still have your test program, can you try replacing your print frame with print frame.to_rgb(), and tell us if that re-inflates it?

I'm going to assume this was fixed with #128.


fix(PopApiScraper): Fix issue where status files are empty

Fixes #4
Proposed Changes

Only touch the status and updated files when node is in master

Coverage remained the same at 100.0% when pulling eac36346d60a322610f286ca20f8356c482fc615 on fix/status into 3fcc649aacf8ae2260da7a5e0fb59830fa6bf8f4 on master.

Coverage remained the same at 100.0% when pulling e391d62ecebf74d86f3c8927b18a3ac476ae08cc on fix/status into cdd965e51e46e0c4d546c15c048d6c7fc4deb8a3 on master.


.Net Core 3.0 Error No route matches the supplied values.

I'm using .Net Core 3.0 for a WebApi project, if I return a CreateAtRoute result then it fails with a "No route matches the supplied values" error.
Here are Get & Post methods of my MessagesController.
    [HttpGet("{id}", Name = "GetMessage")]
    public async Task<IActionResult> GetMessage(int userId, int id)
    {
        if (userId != int.Parse(User.FindFirst(ClaimTypes.NameIdentifier).Value))
        return Unauthorized();

        var messageFromRepo = await _repo.GetMessage(id);

        if (messageFromRepo == null)
            return NotFound();

        return Ok(messageFromRepo);
    }

    [HttpPost]
    public async Task<IActionResult> CreateMessage(int userId, MessageForCreationDto messageForCreationDto)
    {
        if (userId != int.Parse(User.FindFirst(ClaimTypes.NameIdentifier).Value))
        return Unauthorized();

        messageForCreationDto.SenderId = userId;

        var recipient = await _repo.GetUser(messageForCreationDto.RecipientId);

        if(recipient == null)
            return BadRequest("Could not find user");

        var message = _mapper.Map<Message>(messageForCreationDto);

        _repo.Add(message);

        if (await _repo.SaveAll())
            return CreatedAtRoute("GetMessage", new {id = message.Id}, message);

            throw new Exception("Creating the message failed at save");

    }

When call the CreateMessage method this then generates the exception:
  fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
  An unhandled exception has occurred while executing the request.
 System.InvalidOperationException: No route matches the supplied values.
 at Microsoft.AspNetCore.Mvc.CreatedAtRouteResult.OnFormatting(ActionContext context)
 at Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor.ExecuteAsyncCore(ActionContext context, ObjectResult
result, Type  objectType, Object value)
at Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor.ExecuteAsync(ActionContext context, ObjectResult result)
at Microsoft.AspNetCore.Mvc.ObjectResult.ExecuteResultAsync(ActionContext context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultAsync(IActionResult result)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope,
Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeNextResultFilterAsync[TFilter,TFilterAsync]()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope,
Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker
invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task
task, IDisposable scope) at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint
endpoint, Task requestTask,  ILogger logger) at Microsoft.AspNetCore.Authorization.
AuthorizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Authentication.
AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.
DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

Please help I'm stuck on it.

@commonsensesoftware can you help me with this.

You didn't show the controller, which is a critical part of the question; however, without seeing it, I'd bet money that you're versioning by URL. This is one of the common issues with versioning that way. The API Version route parameter is special so you need to provide it when generating routes. In addition, I highly recommend using CreatedAtAction over CreatedAtRoute. The route table is not API version-aware.
Things should work with these adjustments.
[HttpGet("{id}")]
public async Task<IActionResult> GetMessage(int userId, int id)
{
   // ommitted
}

[HttpPost]
public async Task<IActionResult> CreateMessage(
    int userId,
    MessageForCreationDto messageForCreationDto,
    ApiVersion version)
{
    // ...

   return CreatedAtAction(nameof(GetMessage), new {id = message.Id, version = version.ToString()}, message);

    // ...
}

Thanks for your help @commonsensesoftware
here is my controller so you better guide me.
[ServiceFilter(typeof(LogUserActivity))]
[Authorize]
[Route("api/users/{userId}/[controller]")]
[ApiController]
public class MessagesController : ControllerBase
{
    private readonly IDatingRepository _repo;
    private readonly IMapper _mapper;
    public MessagesController(IDatingRepository repo, IMapper mapper)
    {
        _mapper = mapper;
        _repo = repo;
    }

Really appreciated your effort. Thanks
On Tue, 7 Jul 2020 at 7:59 PM, Chris Martinez<EMAIL_ADDRESS>wrote:

You didn't show the controller, which is a critical part of the question;
however, without seeing it, I'd bet money that you're versioning by URL.
This is one of the common issues with versioning that way. The API Version
route parameter is special so you need to provide it when generating
routes. In addition, I highly recommend using CreatedAtAction over
CreatedAtRoute. The route table is not API version-aware.
Things should work with these adjustments.
[HttpGet("{id}")]public async Task GetMessage(int userId, int id)
{
// ommitted
}
[HttpPost]public async Task CreateMessage(
int userId,
MessageForCreationDto messageForCreationDto,
ApiVersion version)
{
// ...
return CreatedAtAction(nameof(GetMessage), new {id = message.Id, version = version.ToString()}, message);
// ...

}
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/aspnet-api-versioning/issues/646#issuecomment-654923459,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/APGRSKYVUNM6PHFBACN5SGTR2MZ3LANCNFSM4OSW3IEQ
.

Unless I misunderstood your response, my answer solved your issue. If not, I'm happy to re-open this and help you resolve the problem. Thanks.


Execution failed for task ':connectivity_plus:compileDebugJavaWithJavac'.

System info
Issue occurs on: iOS / Android / both
Plugin name:
Plugin version:
Flutter doctor output:
paste it here...

Steps to Reproduce

...
...
...

Logs

FAILURE: Build completed with 2 failures.
1: Task failed with an exception.

Where:
Build file 'C:\flutter.pub-cache\hosted\pub.dartlang.org\connectivity_plus-1.0.4\android\build.gradle' line: 22

What went wrong:
A problem occurred evaluating project ':connectivity_plus'.

Could not get unknown property 'javaToolchains' for task ':app:compileDebugAndroidTestJavaWithJavac' of type com.android.build.gradle.tasks.AndroidJavaCompile.

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.

Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 346

What went wrong:
A problem occurred configuring project ':connectivity_plus'.

Could not get unknown property 'android' for project ':connectivity_plus' of type org.gradle.api.Project.

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

Get more help at https://help.gradle.org

BUILD FAILED in 27s
Exception: Gradle task assembleDebug failed with exit code 1

When I re-install Flutter, i can't compile this project

same problem here

same problem here

I resolved this problem by downgrade vesion of connectivity

Which version did you use?

Which version did you use?

Thanks, I decided to go back to using the versions compatible with version 2.7.0 of the SDK. However I found another solution if you want to use the latest versions. Here: https://github.com/fluttercommunity/plus_plugins/issues/321

oh thanks a lot.

@tungakanui does this https://github.com/fluttercommunity/plus_plugins/issues/321 have fixed your issue?

Seems like this commit broke the lib.

Feel free to use version 1.0.5 if still you face any issue, please report back otherwise, please close this issue.

I am facing the same issue again,
version -latest 6.0.5
Compilation Error -

What went wrong:
Execution failed for task ':connectivity_plus:compileReleaseJavaWithJavac'.

error: invalid source release: 17

[✓] Flutter (Channel stable, 3.24.3, on macOS 15.0 24A335 darwin-arm64, locale en-IN)
• Flutter version 3.24.3 on channel stable at /Users/dipinsonwani/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 2663184aa7 (2 weeks ago), 2024-09-11 16:27:48 -0500
• Engine revision 36335019a8
• Dart version 3.5.3
• DevTools version 2.37.3
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
• Android SDK at /Users/dipinsonwani/Library/Android/sdk
• Platform android-34, build-tools 33.0.1
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16A242d
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
[✓] VS Code (version 1.93.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.96.0
While using command- flutter build apk

Same with 6.0.5

Take a look at #3303

Take a look at #3303

Thank you! This was very helpful :)


[iOS] Fixes FORCE_BUNDLING error when bundle js

Summary:
After enable FORCE_BUNDLING to true, build error.  cc @blakef

Changelog:
[IOS] [FIXED] - Fixes FORCE_BUNDLING error when bundle js
Test Plan:
enable FORCE_BUNDLING to true， build success.

@blakef CI is green. :)

Seems main branch's ci is already fixed, I'll revert the Android ci changes and rebase the main.

@blakef I updated the solution. Please review it again.


Add native Android targets

I know we tried this and had some issue, but it may be interesting to try again. I think in theory we could log to Logcat with cinterop, but if that's not easy, just use the common logger.

If you can disable tests for these, just add to get around stately issues