test: call a method from a returned record

A failing test case

Codecov Report

Merging #236 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted Files
Coverage Δ

titan-compiler/coder.lua
96.37% <100%> (ø)
:arrow_up:

titan-compiler/checker.lua
89.93% <0%> (+0.1%)
:arrow_up:

Continue to review full report at Codecov.

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

Fixed. The test for whether a function call is a foreign call was expecting the function expression to be an lvalue, but this is not always the case for method calls. I commited quick fix, but we should really improve the handling of all the different kinds of calls and receivers of these calls...
I am always a proponent of different types for different things, so we should probably reserve Type.Function for first-class functions and then have Type.TopLevelFunction, Type.ForeignFunction, Type.RecordFunction (the current Type.StaticMethod, and Type.Method as distinct types for the kinds of callable stuff that we have. It also wouldn't hurt to split ExpCall into ExpCall and ExpMethodCall.

Agreed! Thank you, @mascarenhas!


#include filter bypass

Compile the following:
#include </etc/passwd>

%:include </etc/passwd>

??=include </etc/passwd>

#include</etc/passwd>

#include \
  </etc/passwd>

Expected results: Same for all
Actual results: First one says "no absolute or relative includes please", the others throw a couple of errors on the line root:x:0:0:root:/root:/bin/bash.

Right. The main protection against inclusion of files like /etc/passwd is...there's nothing interesting in those files. A compiler is such a large attack vector that it's very difficult to protect it: the message is merely a mild deterrant :)
There used to be (and still is in some cases) an LD_PRELOAD to prevent including some files...but...wine needs to read /etc/passwd along the way, so I had to allow it. Some other compilers are statically linked and so LD_PRELOAD doesn't work.
I'm still working on battle-hardening, but the main thing is...nothing of value is stored on the CE nodes. If you would like to read some other files, the compiler-explorer-image has almost everything you need :)
That said; obviously once one starts reading files one can consider other attack vectors: I keep the nodes as locked down as possible, but again apart from running Compiler Explorer they don't have much else. I'm still working on this though! :)

Security by uninteresting? Sure, if you say so, guess that's why it appends 'please'.
Some files behave funny if you #include them; for example, /dev/zero wastes all your RAM, and /dev/random blocks forever. But they say access denied, and everything in /proc acts like size zero, so I guess this one is harmless after all. Unless someone installs an Explorer without following the instructions, but I doubt that usecase matters.
By the way, thanks for making this. Knowing whether GCC optimizes the way I want is invaluable.

Security by minimising threat of being overrun. The way I've thought about it: I mitigate as much as possible but ultimately accept that remote code exploits will happen. My goal then is to make it as non-trivial as possible while then making the CE nodes themselves as uninteresting as possible. Specifically, they have restricted outbound internet capabilities; they have limited disc space, they have nothing of value stored on them. I might get a DoS attack, which is unpleasant but not terrible. There are some other possible threats too, but I hope you get my point :)
I'm absolutely not an expert, as you can tell!


Sm/dep bumping

What does this PR do?
updates dependencies to get rid of @types/jsforce (coming from devDeps) which cause problems like
https://app.circleci.com/pipelines/github/forcedotcom/sfdx-core/2666/workflows/da357d9e-8ad9-4385-9e27-aa375a81890d/jobs/17291
What issues does this PR fix or reference?
@W-0@

jsyk, it looks like you switched the registry from npmjs to yarnpkg for the new deps.

yeah, all our registries are usually yarnpkg.
I think @mdonnalley has something wonky on his local that switches it to npm ex: https://github.com/salesforcecli/plugin-config/commit/072332e7ab5d797aa535d35d45737c8d302491f5#diff-51e4f558fae534656963876761c95b83b6ef5da5103c4adef6768219ed76c2de


pull request for e2e test at 01/05/2017 16:15:15

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Migrate HTTP client to use system properties in Salesforce Provisioning Connector

System properties are not being picked up correctly by Commons HttpClient 3.x that we have in the current Salesforce Provisioning Connector v5.1.2. So need to migrate the HTTP client to HttpComponents HttpClient 4.x.

Fixed with PR: https://github.com/wso2-extensions/identity-outbound-provisioning-salesforce/pull/16

Improvements added with https://github.com/wso2-extensions/identity-outbound-provisioning-salesforce/pull/17


Why does Pay-per-incident URL redirect to M365 Support?

I had this URL bookmarked https://support.microsoft.com/en-us/topic/support-for-business-1f4c4d09-9047-28ac-bb3b-618757e3bffd which was a great reference that broke down comparisons between support plans. Now it redirects to this M365 page which makes no sense at all. https://learn.microsoft.com/en-US/microsoft-365/admin/get-help-support?view=o365-worldwide
If you search Bing for Microsoft pay per incident, the above URL is the first search return - and then the user gets sent to a product-specific page.

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 1ed50e50-a3c1-1f3b-1ea5-40beec8ab6cd
Version Independent ID: 1ed50e50-a3c1-1f3b-1ea5-40beec8ab6cd
Content: Get support - Microsoft 365 admin
Content Source: microsoft-365/admin/get-help-support.md
Service: microsoft-365-business
GitHub Login: @cmcatee-MSFT
Microsoft Alias: cmcatee

@cmcatee-MSFT Please help us in resolving this issue. Thanks

@yogkumgit My team doesn't own the content on support.microsoft.com and isn't responsible for redirects from articles there. I've reached out to the team that owns SMC content to help resolve this.

@cmcatee-MSFT Please suggest , who can be assigned as contact person. Thanks

@yogkumgit The URL now redirects to this page: Small business help & learning. The old page was retired, and, to my knowledge, there is no comparable page for it now.


FolderBrowserDialog MultiSelect and SelectedPaths

Help us make content visible

FolderBrowserDialog multiselect
FolderBrowserDialog selectedpaths

Describe the new article
Via https://github.com/dotnet/winforms/pull/10357 WinForms has introduced new Multiselect and SelectedPaths property to FolderBrowserDialog which now allows users to select multiple folders if Multiselect = true and SelectedPaths willl pass back the list of folders the user has selected. (.NET 9 Preview 1)
The article should live under the properties section of https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.folderbrowserdialog?view=windowsdesktop-8.0. Ideally separate articles for Multiselect and SelectedPaths.
Both articles for Multiselect and SelectedPaths should cover what exactly these properties are, the property values and what they mean
Multiselect
Should have similar outline as https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.openfiledialog.multiselect?view=windowsdesktop-8.0:
Description
public bool Multiselect { get; set; }

true if  dialog box allows multiple folders to be selected; otherwise, false. The default value is false.
Remarks
Use the SelectedPaths property to access full list of selected paths.
SelectedPaths
should have similar outline as https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.filedialog.filenames?view=windowsdesktop-8.0
Description
 public string[] SelectedPaths { get; }

Retrieves the paths of all selected folders in the dialog box.
Remarks
If no files are selected, this method returns an empty array.

Thanks @gewarren

@lonitra Rereading through this, it sounds like these are actually updates to the API docs, not the conceptual, correct?

@lonitra Rereading through this, it sounds like these are actually updates to the API docs, not the conceptual, correct?

Yes this would be updates to the API docs. Apologies I realized only today in a different thread that issues do not need to be opened for API doc updates.

@lonitra Someone somewhere still needs to write the code samples and get the bigger text into the API though, unless your team has already done this in the XML or /// source? If you look at the properties, you can see they're pretty empty
https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.folderbrowserdialog.multiselect?view=windowsdesktop-9.0
https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.folderbrowserdialog.selectedpaths?view=windowsdesktop-9.0

@lonitra Someone somewhere still needs to write the code samples and get the bigger text into the API though, unless your team has already done this in the XML or /// source?

We have summaries in source, but no code samples. I can get to updating the correct file in dotnet/dotnet-api-docs repo sometime this week if that sounds good to you?


Provide get_many

Currently it's possible to get one single entry using Example::get_one(). However, it's not clear how to get many entries without manually writing the query. So Example::get_many(&mut conn) would be nice to have.

In your hypothetical get_many API, how would the user do filtering?
The second to last example in the usage section is this example:
    /// You can create a query builder.
    let people = Person::select()
            .filter("age > ?").bind(50)
            .fetch_all(&mut conn).await?;

And it can of course be used without the filter and bind calls.
Does that suit your needs?

It gives my type errors without filter or bind, so I was under the impression that select() is a builder of a sort.

Some weird is happening. I'm using ormlite in conjunction with poem and the following works:
async fn foobar() -> Result<Vec<Type>> {
    let v = Type::select().fetch_all(pool).await?;
    Ok(v)
}

However this does not:
async fn foobar() -> Result<Vec<Type>> {
    Type::select().fetch_all(pool).await
}

The type error suggests that Type::select() may be used later than await for some reason.

Code:
use ormlite::Model;
use ormlite::model::*;
use poem::EndpointExt;
use poem::Route;
use poem::Server;
use poem::error::InternalServerError;
use poem::handler;
use poem::listener::UnixListener;
use poem::middleware::AddData;
use poem::web::Data;
use sqlx::FromRow;
use poem::get;
use sqlx::SqlitePool;

#[derive(Model, FromRow)]
struct Example {
    #[ormlite(primary_key)]
    name: String
}

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let pool = SqlitePool::connect("/tmp/database").await?;
    let socket = UnixListener::bind("/tmp/pxed.sock");

    Server::new(socket).run(
        Route::new()
            .nest("/", get(endpoint))
            .with(AddData::new(pool))
    ).await?;

    Ok(())
}

#[handler]
async fn endpoint(pool: Data<&SqlitePool>) -> poem::Result<()> {
    query(*pool).await.map_err(InternalServerError)
}

async fn query(pool: &SqlitePool) -> ormlite::Result<()> {
    Example::select().fetch_all(pool).await.map(|_| ())
}

Error:
error: future cannot be sent between threads safely
  --> src/main.rs:35:1
   |
35 | #[handler]
   | ^^^^^^^^^^ future created by async block is not `Send`
   |
   = help: the trait `Send` is not implemented for `dyn Iterator<Item = String>`
note: future is not `Send` as this value is used across an await
  --> src/main.rs:41:5
   |
41 |     Example::select().fetch_all(pool).await.map(|_| ())
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ first, await occurs here, with `Example::select()` maybe used later...
note: `Example::select()` is later dropped here
  --> src/main.rs:42:1
   |
41 |     Example::select().fetch_all(pool).await.map(|_| ())
   |     ----------------- has type `SelectQueryBuilder<'_, sqlx::Sqlite, Example, Box<dyn Iterator<Item = String>>>` which is not `Send`
42 | }
   | ^
   = note: required for the cast to the object type `dyn Future<Output = Result<poem::Response, poem::Error>> + Send`
   = note: this error originates in the attribute macro `handler` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `ormlite-issue` due to previous error

I'm not sure what happens, but looks suspicious.

Thank you for providing such a clearcut repro example. It made it really easy to isolate this issue.
It seems we were missing a Send bound on SelectQueryBuilder. I fixed this in a9292c8, then cut 0.1.4.
I created a repo (https://github.com/kurtbuilds/ormlite-issue) based on your code, and confirmed that it is building correctly now.
Can you confirm this fixes your issue, and if so, close this ticket?

Partially as a note to myself, it might make sense to have a dedicated struct for the PlaceholderGenerator instead of having it as a Box<dyn ...>, which would simplify some of the trait bounds.

Yep, works for me.


Append raw to select?

Is it possible to append a raw sql statement, to the end of of a Knex select query?
For example, I'd like to add the following postgres window function to the end of a select query...
count(*) OVER() AS total
Or can this be done another way?
Here's what the current select query looks like... (without the following where and join clauses).
knex.select(knex.raw('s.id as story_id, s.lr_id, s.name as title, s.published_title, s.url, s.date, \
                s.description, s.copyright, s.keywords, si.image_id, s.is_published, s.is_hidden, \
                count(*) OVER() AS total'))

Like this?
knex.select(
  's.id as story_id',
  's.lr_id',
  's.name as title',
  's.published_title',
  's.url',
  's.date',
  's.description',
  's.copyright',
  's.keywords',
  'si.image_id',
  's.is_published',
  's.is_hidden'
).select(knex.raw('count(*) OVER() as total'))

select statements are additive.

Thank you! It worked. I think I love Knex.js ;-)


Unable to create collection on Emulator

Does this occur consistently?
Repro steps:

Action: cosmosDB.createDocDBCollection
Error type: InternalServerError
Error Message: Unknown server error occurred when processing this request.
ActivityId: 5b36dd2c-841a-4da1-8c60-f609b0b1aa7f, Microsoft.Azure.Documents.Common/2.11.0
Version: 0.15.0
OS: win32
OS Release: 10.0.18363
Product: Visual Studio Code
Product Version: 1.50.1
Language: en

Please provide detauked repro steps.


feat: added virtual service and destination rule to allow for localit…

…y load balancing

Something strange going on the with the SA in the CI, doing some exploration: https://github.com/GoogleCloudPlatform/terraform-google-enterprise-application/pull/66

/gcbrun

/gcbrun

Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:53Z command.go:100: Running command gcloud with args [deploy rollouts list --project=app1-admin-5799 --delivery-pipeline=frontend --region=us-central1 --release=projects/app1-admin-5799/locations/us-central1/deliveryPipelines/frontend/releases/frontend-3d6ce15-20240422-1925 --filter targetId=frontend-dev --format json]
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185: [
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:   {
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:     "approvalState": "DOES_NOT_NEED_APPROVAL",
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:     "createTime": "2024-04-22T19:25:47.901044Z",
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:     "deployEndTime": "2024-04-22T19:26:35.429408150Z",
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:     "deployFailureCause": "EXECUTION_FAILED",
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:     "deployStartTime": "2024-04-22T19:26:08.381687639Z",
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:     "deployingBuild": "projects/259716316813/locations/us-central1/builds/4be4cca7-9355-4383-8156-bf419ffb4506",
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:     "enqueueTime": "2024-04-22T19:26:03.664077Z",
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:     "etag": "912cea9a9850f4ad",
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:     "name": "projects/app1-admin-5799/locations/us-central1/deliveryPipelines/frontend/releases/frontend-3d6ce15-20240422-1925/rollouts/frontend-3d6ce15-20240422-1925-to-frontend-dev-0001",
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:     "phases": [
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:       {
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:         "deploymentJobs": {
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:           "deployJob": {
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:             "deployJob": {},
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:             "id": "deploy",
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:             "jobRun": "projects/259716316813/locations/us-central1/deliveryPipelines/frontend/releases/frontend-3d6ce15-20240422-1925/rollouts/frontend-3d6ce15-20240422-1925-to-frontend-dev-0001/jobRuns/f993ce8d-3ea8-4258-b345-7e7c3a108686",
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:             "state": "FAILED"
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:           },
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:           "verifyJob": {
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:             "id": "verify",
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:             "state": "DISABLED",
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:             "verifyJob": {}
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:           }
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:         },
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:         "id": "stable",
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:         "state": "FAILED"
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:       }
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:     ],
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:     "state": "FAILED",
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:     "targetId": "frontend-dev",
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:     "uid": "ed01c07c459e4aa399911224277ab5d5"
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185:   }
Step #15 - "appinfra-verify": TestAppinfraFrontend 2024-04-22T19:57:54Z command.go:185: ]
Step #15 - "appinfra-verify":     poll.go:31: failed to pull provided condition after 30 retries, last error: polling timed out after 30 retries with 60.00 second intervals

2024-04-22 12:26:34.878 PDT

stderr: "resource mapping not found for name: "frontend" namespace: "" from "/workspace/stable/manifest.yaml": no matches for kind "DestinationRule" in version "networking.istio.io/v1beta1"\nensure CRDs are installed first\nresource mapping not found for name: "frontend" namespace: "" from "/workspace/stable/manifest.yaml": no matches for kind "VirtualService" in version "networking.istio.io/v1beta1"\nensure CRDs are installed first\n"

Found the cause from https://pantheon.corp.google.com/deploy/delivery-pipelines/us-central1/frontend/releases/frontend-3d6ce15-20240422-1925/rollouts/frontend-3d6ce15-20240422-1925-to-frontend-dev-0001;row=job:stable:deploy?e=13802955&project=app1-admin-5799
2024-04-22 12:26:34.878 PDT

stderr: "resource mapping not found for name: "frontend" namespace: "" from "/workspace/stable/manifest.yaml": no matches for kind "DestinationRule" in version "networking.istio.io/v1beta1"\nensure CRDs are installed first\nresource mapping not found for name: "frontend" namespace: "" from "/workspace/stable/manifest.yaml": no matches for kind "VirtualService" in version "networking.istio.io/v1beta1"\nensure CRDs are installed first\n"

@yliaog  We can enable Istio with istio = true added to https://github.com/GoogleCloudPlatform/terraform-google-enterprise-application/blob/main/2-multitenant/modules/env_baseline/main.tf#L108

Found the cause from https://pantheon.corp.google.com/deploy/delivery-pipelines/us-central1/frontend/releases/frontend-3d6ce15-20240422-1925/rollouts/frontend-3d6ce15-20240422-1925-to-frontend-dev-0001;row=job:stable:deploy?e=13802955&project=app1-admin-5799
2024-04-22 12:26:34.878 PDT

stderr: "resource mapping not found for name: "frontend" namespace: "" from "/workspace/stable/manifest.yaml": no matches for kind "DestinationRule" in version "networking.istio.io/v1beta1"\nensure CRDs are installed first\nresource mapping not found for name: "frontend" namespace: "" from "/workspace/stable/manifest.yaml": no matches for kind "VirtualService" in version "networking.istio.io/v1beta1"\nensure CRDs are installed first\n"

@yliaog We can enable Istio on the GKE clusters with istio = true added to https://github.com/GoogleCloudPlatform/terraform-google-enterprise-application/blob/main/2-multitenant/modules/env_baseline/main.tf#L108. However I don't believe that's our end intention.

Could we use HTTPRoute instead of VirtualService?
kind: HTTPRoute
apiVersion: gateway.networking.k8s.io/v1beta1

it turns out https://github.com/GoogleCloudPlatform/terraform-google-enterprise-application/pull/66 does not work, that PR granted mesh config service account the service mesh agent role, but did not grant the mesh service account (in the form of @gcp-sa-servicemesh.iam.gserviceaccount.com) the role. As a result, service mesh failed to be provisioned in the cluster. and hence, the destinationrule  etc CRDs are missing, which caused the CI failure.

It seems to be a race, the API is enabled, but probably not ready at the time appinfra-apply was run
$ gcloud services list --project app1-admin-2946 |grep deploy
clouddeploy.googleapis.com             Cloud Deploy API
https://ff13b16f16580d2debc7c1307cf973b868e0d009571f8e6e229c18b-apidata.googleusercontent.com/download/storage/v1/b/2843445864.cloudbuild-logs.googleusercontent.com/o/log-6444dc19-4945-4ed6-8637-6cb52766806a.txt?jk=AWNiL9Jntc1ZXrWNONZoEJmeewaxmdO8VtiTtPKWXDkRjfaQ8ZYhZH--UcsTToik3ZPbirIDXRk8IzdJ0AqNh4GjA5qdX4072MvYq7TrM-B3o3OLjZGP4T4Fz7oTsJEFs8FJa_97H1MoiL0o0XDe2giKeq_egGa_4BVIeNQp923sBWNRxSB0WyWqZGa4upxB5YKrvatXggd99o_UW_ogJlJ-hhHeFIUVGL0CBNATptr2dxvoWFXURxR1VAfTdYkD9VXCwQUWae7sxtrYRNCOLXos6uVjRkpkdq6TdU64dnoFH4Bv51QcCM14VGhUGZUEonhHql4-fh36TBWMl_2mxiq26onkzKfVlZrSIpfA3f6MPx6agh9kVPdJZjQ44gsFs30u-FYnou9mm6CgsI3uFDOLN2PSj2iEi0CEm-dPrFeF8waFai4H0mUaCXi_95M5RYHYim6Aslg4rUTh1Fdv3R1-TqlJFNcYEQxKVQp9hbhQYQdi9M-hnpuE5Nk1VVsQlOuUJTL8OezaOSFgQcDZXiseXbbwq9sE0PddovG6rwKXrJZ7f_f9v0t_jV8G-OyqewfjSbVb43cePE98Yog7gIXZLwrIAIVbqN9lYR-SwwssQ8tMkyJPwLXzGdjVMshXhYXAUtl9t-TPxlpK92GkEAizLXP99GRDZeFpkxb5bI1PxwHm2QVp_RGxFOzTFwyW3xDiZaqmsH9rcTHb0tVS1jlBlVBIJ5ZMaFh86hmZXftbEyegk1K8nY3lYLtLlDnmGjlwLYsTiVSwI8b2IygNtDuBYGxd-ONyhoC8nKCNl9ZobY0tRZjFJg-qljkqMrAYvBc8jYQLxOSFGEa8JkERd_7SBNZ91uDZoQicjpWUgJ3t9d13gfUqyAly8qjpkbVb8osuN-BmRly-AJxdmThYr2LTnJlZr7jRlmKlQPw1zEUnuQlw4nPMKT-V8cljRoq79Re9yuN7ScVunB1gWXFDHvhGIGJ8bPqWNSi2cJy5RYmVRyoiNzZfq18OIQLqTkTIe75LVHq1Bnb65Jner57dnCYv32f1qHRuYENcNb_oyhcz8vbaMOei2Kn_MlBaXXqSADekG4MLL4s-HCwpBhxhkAUgHSw-1XDDO8AbOjlxgBgZPMXSxrMzINN0nGDSg8FF2T-PN-XiaUSAwwN6Gk1IYFyZ6qF55t0daBUDgoy5_QPpTBheoM187DRiUt9atmLDwCr7sTh7harVnQ5wF5UW1foRuLdziLXJxRP1bscUVd8wntxToYhon8wMgIksSDCGjfH-vkHS2vU_&isca=1
Step #14 - "appinfra-apply": TestAppinfraFrontend 2024-04-23T03:55:01Z command.go:185: Error: Error creating Target: googleapi: Error 403: Cloud Deploy API has not been used in project app1-admin-2946 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/clouddeploy.googleapis.com/overview?project=app1-admin-2946 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.

it turns out #66 does not work, that PR granted mesh config service account the service mesh agent role, but did not grant the mesh service account (in the form of @gcp-sa-servicemesh.iam.gserviceaccount.com) the role. As a result, service mesh failed to be provisioned in the cluster. and hence, the destinationrule etc CRDs are missing, which caused the CI failure.

@yliaog - Are you saying that google_project_service_identity.fleet_meshconfig_sa.email is returning the wrong value?  Per the doc it should the desired<EMAIL_ADDRESS>Anthos Service Mesh Service Account
Service agent for meshconfig.googleapis.com.
<EMAIL_ADDRESS>

i confirmed by running the TF locally last night,
google_project_service_identity.fleet_meshconfig_sa.email returns
<EMAIL_ADDRESS>instead of<EMAIL_ADDRESS>

i confirmed by running the TF locally last night,
google_project_service_identity.fleet_meshconfig_sa.email returns<EMAIL_ADDRESS>instead of<EMAIL_ADDRESS>
Thanks! I'll follow-up with you directly. :)


Alert name tooltip arrow does not point to right column

Version: master 2.2 (12/20/18)
What kind of request is this (question/bug/enhancement/feature request):
Bug
Steps to reproduce (least amount of steps as possible):

Go to the alerts page. Hover over an alert that has a long name.

Result:
The small downwards carrot is pointing to the wrong column.
Screenshot:

Version: Master (v2.3) (5/20/19)
The alerts tooltip now points to the correct column:

Other examples:


download gitlab-runner instead of building it

It may be way faster to download gitlab-runner instead of building it. This however is mostly style and build time optimisation.
Have a look at my ubuntu based variation of Dockerfile.
Not sure if you want to do this similar or if there is a prebuild version for redhat.
edit:
Also you may consider a ubuntu or alpine based dockerfile as well ;)
And many thanks for your version - i would have built the exactly same thing again

It may be way faster to download gitlab-runner instead of building it.

Yeah, the building takes some time but anyway you don't build it often.

Also you may consider a ubuntu or alpine based dockerfile as well
I made it for Red Hat and we have our own base distro.

Thats the answer I expected. Thanks anyway, closing this then.


Sensitive outputs

Describe the Bug
When running terragrunt apply:
Error: Output refers to sensitive values
│
│   on outputs.tf line 46:
│   46: output "cf_origin_ids" {
│
│ To reduce the risk of accidentally exporting sensitive data that was
│ intended to be only internal, Terraform requires that any root module
│ output containing sensitive data be explicitly marked as sensitive, to
│ confirm your intent.
│
│ If you do intend to export this data, annotate the output value as
│ sensitive by adding the following argument:
│     sensitive = true

Expected Behavior
Terragrunt apply works
Steps to Reproduce
I use the following options:
  website_enabled                    = true
  s3_website_password_enabled        = true
  versioning_enabled                 = true
  block_origin_public_access_enabled = true
  allow_ssl_requests_only            = false # https://github.com/cloudposse/terraform-aws-cloudfront-s3-cdn/issues/175

  cloudfront_access_log_create_bucket = false
  cloudfront_access_log_bucket_name = dependency.logging_bucket.outputs.s3_bucket_id`

Environment (please complete the following information):
Module version: 0.74.3
Terraform version:
λ terraform -v
Terraform v1.0.0
on windows_amd64
+ provider registry.terraform.io/hashicorp/aws v3.55.0
+ provider registry.terraform.io/hashicorp/local v2.1.0
+ provider registry.terraform.io/hashicorp/random v3.1.0

`# Deploy dashboard-v2.mydomain.com
locals {
Automatically load environment level variables
environment_vars = read_terragrunt_config(find_in_parent_folders("env.hcl"))
Extract out common variables for reuse
environment  = local.environment_vars.locals.environment
base_domain_name = "${local.environment}.mydomain.com"
}
Terragrunt will copy the Terraform configurations specified by the source parameter, along with any files in the
working directory, into a temporary folder, and execute your Terraform commands in that folder.
terraform {
source = "git::https://github.com/cloudposse/terraform-aws-cloudfront-s3-cdn//?ref=0.74.3"
}
dependency "acm_mydomain" {
config_path = "../acm/mydomain.com"
mock_outputs = {
acm_certificate_arn = "mock"
}
mock_outputs_allowed_terraform_commands = ["init", "validate", "plan"]
}
dependency "logging_bucket" {
config_path = "../logs-s3-bucket"
mock_outputs = {
s3_bucket_id = "logs"
}
mock_outputs_allowed_terraform_commands = ["init", "validate", "plan"]
}
Include all settings from the root terragrunt.hcl file
include {
path = find_in_parent_folders()
}
inputs = {
name = "dashboard-v2"
dns_alias_enabled = true
parent_zone_name  = local.base_domain_name
aliases           = ["dashboard-v2.${local.base_domain_name}"]
website_enabled                    = true
s3_website_password_enabled        = true
versioning_enabled                 = true
must be false if website_enabled is true https://aws.amazon.com/premiumsupport/knowledge-center/s3-website-cloudfront-error-403/
block_origin_public_access_enabled = false
bug in module https://github.com/cloudposse/terraform-aws-cloudfront-s3-cdn/issues/175
allow_ssl_requests_only            = false
cloudfront_access_log_create_bucket = false
cloudfront_access_log_bucket_name = dependency.logging_bucket.outputs.s3_bucket_id
minimum_protocol_version = "TLSv1"
acm_certificate_arn      = dependency.acm_mydomain.outputs.acm_certificate_arn
}`

.terraform.lock.hcl
# This file is maintained automatically by "terraform init".
# Manual edits may be lost in future updates.

provider "registry.terraform.io/hashicorp/aws" {
  version     = "3.55.0"
  constraints = ">= 2.0.0, >= 3.41.0"
  hashes = [
    "h1:NG0YJvxSdqBjCl+zFoKgkzSrTHOT0/hhhUCrPt6Q3Gg=",
    "zh:1795562df65e9e5a604c90fac17ab1a706bc398b38271a11bc43565d45532595",
    "zh:266fd71ace988b5fecd72dae5f2f503e953a4d2ea51d8d490d22d1218b1407dc",
    "zh:4b2daf1038352fb33df40a2bf9033f66383bb1f6509df70da08f86f4539df9f3",
    "zh:59fa40d453baa15cee845fd62d8c807fc4d5204a5560ee7e54ebeef3a3143404",
    "zh:5ad9f515354c654d53849d1193ee56e335b3b9cf8e8cbfa98479114e87089cc3",
    "zh:69c3ebd945ce747e0b30315656bc8b4aec2f2486013c2a78d04890bff96d137d",
    "zh:6bdb22a77b4d85b6d9f2403bce23d6c3c932dadd7c7541395cbbd51ec101842e",
    "zh:7d5ba001be98432d6a1d385679a720cf0d6e6c0b1ee7d45384d2d6213e262b21",
    "zh:ce4b85f470605c5cd24f8acfe05c6546d962a32ecf69a61034f0884c2e79fbcf",
    "zh:d0b20e4e9e877279520162b7979e9cb8aa961cf06fb37d9f3e4ac7023c177545",
    "zh:e029951f18e9dadd8929dddc752a5b354a4c9956b8ec1b67f4db7bc641199d22",
  ]
}

provider "registry.terraform.io/hashicorp/local" {
  version     = "2.1.0"
  constraints = ">= 1.2.0"
  hashes = [
    "h1:/OpJKWupvFd8WJX1mTt8vi01pP7dkA6e//4l4C3TExE=",
    "zh:0f1ec65101fa35050978d483d6e8916664b7556800348456ff3d09454ac1eae2",
    "zh:36e42ac19f5d68467aacf07e6adcf83c7486f2e5b5f4339e9671f68525fc87ab",
    "zh:6db9db2a1819e77b1642ec3b5e95042b202aee8151a0256d289f2e141bf3ceb3",
    "zh:719dfd97bb9ddce99f7d741260b8ece2682b363735c764cac83303f02386075a",
    "zh:7598bb86e0378fd97eaa04638c1a4c75f960f62f69d3662e6d80ffa5a89847fe",
    "zh:ad0a188b52517fec9eca393f1e2c9daea362b33ae2eb38a857b6b09949a727c1",
    "zh:c46846c8df66a13fee6eff7dc5d528a7f868ae0dcf92d79deaac73cc297ed20c",
    "zh:dc1a20a2eec12095d04bf6da5321f535351a594a636912361db20eb2a707ccc4",
    "zh:e57ab4771a9d999401f6badd8b018558357d3cbdf3d33cc0c4f83e818ca8e94b",
    "zh:ebdcde208072b4b0f8d305ebf2bfdc62c926e0717599dcf8ec2fd8c5845031c3",
    "zh:ef34c52b68933bedd0868a13ccfd59ff1c820f299760b3c02e008dc95e2ece91",
  ]
}

provider "registry.terraform.io/hashicorp/random" {
  version     = "3.1.0"
  constraints = ">= 2.2.0"
  hashes = [
    "h1:EPIax4Ftp2SNdB9pUfoSjxoueDoLc/Ck3EUoeX0Dvsg=",
    "zh:2bbb3339f0643b5daa07480ef4397bd23a79963cc364cdfbb4e86354cb7725bc",
    "zh:3cd456047805bf639fbf2c761b1848880ea703a054f76db51852008b11008626",
    "zh:4f251b0eda5bb5e3dc26ea4400dba200018213654b69b4a5f96abee815b4f5ff",
    "zh:7011332745ea061e517fe1319bd6c75054a314155cb2c1199a5b01fe1889a7e2",
    "zh:738ed82858317ccc246691c8b85995bc125ac3b4143043219bd0437adc56c992",
    "zh:7dbe52fac7bb21227acd7529b487511c91f4107db9cc4414f50d04ffc3cab427",
    "zh:a3a9251fb15f93e4cfc1789800fc2d7414bbc18944ad4c5c98f466e6477c42bc",
    "zh:a543ec1a3a8c20635cf374110bd2f87c07374cf2c50617eee2c669b3ceeeaa9f",
    "zh:d9ab41d556a48bd7059f0810cf020500635bfc696c9fc3adab5ea8915c1d886b",
    "zh:d9e13427a7d011dbd654e591b0337e6074eef8c3b9bb11b2e39eaaf257044fd7",
    "zh:f7605bd1437752114baf601bdf6931debe6dc6bfe3006eb7e9bb9080931dca8a",
  ]
}

Do you mind putting that into the original issue? I should have suggested doing that when I requested the information. The .terraform.lock.hcl isn't required

Oh interesting it uses terragrunt. Can you show the raw terraform version?

I don't have it in raw terraform but it's pretty easy to do. Just pass those inputs in a tfvars file


use new keyword for object and array instantiation

Foo a = new Foo();
int[][] a = new a[2][3];

done


No video with supported format and MIME type found

On Firefox, the video on your demo page says

No video with supported format and MIME type found

Assuming you used ffmpeg to process the video, you can probably fix this by adding -pix_fmt yuv420p to your ffmpeg invocation: https://stackoverflow.com/a/24468585

@99991 thanks for reporting this bug!
We didn't know Firefox doesn't support HEVC encoding, sorry... We've changed our video to H.264, and it should work on Firefox now!

Great, it works now. Thank you!


Just need some direction

If there's a better place for posts like this, please let me know.
We upgraded from v0.27.x (don't remember exactly) to the latest v0.29.1. During the upgrade, we received this message:

What do we need to do to heed the advice?
Also, with the upgrade from php 7.2 to 7.4, do we need to remove php 7.2? How would we go about that?
Thanks,
Craig

Hi @FMCUSystemAdmins,
You don't need to do anything about that warning. Is something that will be addressed with time.

Also, with the upgrade from php 7.2 to 7.4, do we need to remove php 7.2?

Is that a system upgrade you've done? BookStack still works on php7.2, We would not have enforced such a change via a BookStack update.
Generally, it doesn't cause issues running multiple PHP versions side-by-side but you might as well remove the other if not in use, You'll have to be sure your web-server is using the correct one before you remove the other.

Thank you @ssddanbrown,
Sounds good on the warning.
As far as the PHP upgrade, we did that per Updating to v0.28 or higher. Only difference from our install and what is within that documentation is that we are using Apache for our web server instead of Nginx. After the install of the PHP 7.4 packages, we ran a2enmod proxy_fcgi setenvif and a2enconf php7.4-fpm. Was that sufficient to make Apache use 7.4? How would we verify this is the case to avoid breaking something with the removal of 7.2?

@FMCUSystemAdmins
Ah, Okay, Those update instructions only really needed to be followed if you were on a lower PHP version than 7.2 but hey, might as well upgrade early and get the benefits of php7.4 👍
I'm not sure of an easy way to check what Apache is using. Easiest way I guess is to just remove php7.2 and see if it breaks. Hopefully, even if apache is still using php7.2, It'd switch over to the other version upon uninstall.
If you want to be more careful, You could always create a <bookstack_install_dir>/public/info.php file with the contents:
<?php phpinfo(); ?>

Then visit https://<my_bookstack_url>/info.php and find the version at the top. Remember to delete the info.php after checking though.

Thank you for that handy PHP version check. Apache was still using PHP 7.2. Ended up running a2dismod php7.2 then a2enmod php7.4. Restarted the Apache service, refreshed the info URL, and it updated to 7.4. Uninstalled 7.2 and all still looks good on the PHP front. Also found that the *fpm packages are irrelevant for Apache. They are only needed if using Nginx.
Thanks for pointing me in the right direction!

@FMCUSystemAdmins No problem, Glad it's all working! Will therefore close this off.


CDKv2 support

CDKv2 is in developer preview. We should start baking in the v2 support in the SSP for customers who have started or will be adopting v2 at launch.

I looked at it a few months ago, and unfortunately I was not able to get a clear understanding on when it is going to GA. It was in the preview for a long time and I recall they were targeting an RC back then. Do you have any info on GA date for it?

I don't know of a date. Thoughts on maintaining a parallel v2-main branch?

CDKv2 is now the new default version in the CDK documentation

Blueprints now support v2.20. Closing the issue.


mold: init at 0.9.2

Motivation for this change
Add mold, a fast linker for x86_64 linux. Fixes #128706.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Relase 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

[x] Fits CONTRIBUTING.md.

Missing meta section

@legendofmiracles I addressed your comments. Thank you for the review!

If you wan't it to use lld, you must add
{
  EXTRA_LDFLAGS = "--ld-path=${lld_12}/bin/ld.lld";
}

I tried with LTO on and it doesn't seem too long :
{
  LTO = 1;
}

Result of nixpkgs-review pr 128889 at d404d895 run on x86_64-linux 1

1 package built successfully:

mold

4 suggestions:

warning: missing-phase-hooks
installPhase should probably contain runHook preInstall and runHook postInstall.
Near pkgs/development/tools/mold/default.nix:14:3:
   |
14 |   installPhase = "mkdir -p $out $out/bin $out/share/man/man1 && PREFIX=$out make install";
   |   ^

warning: unclear-gpl
agpl3 is a deprecated license, please check if project uses agpl3Plus or agpl3Only and change meta.license accordingly.
Near pkgs/development/tools/mold/default.nix:18:5:
   |
18 |     license = lib.licenses.agpl3;
   |     ^

warning: missing-phase-hooks
buildPhase should probably contain runHook preBuild and runHook postBuild.
Near pkgs/development/tools/mold/default.nix:13:3:
   |
13 |   buildPhase = "make -j $NIX_BUILD_CORES";
   |   ^

warning: maintainers-missing
Package does not have a maintainer. Consider adding yourself?
Near pkgs/development/tools/mold/default.nix:15:3:
   |
15 |   meta = {
   |   ^

@SCOTT-HAMILTON I adopted all of your suggestions. Thanks!

Missing maintainer, and it's still quite unreadable - consider adding a newlines between different sections of the derivation

@legendofmiracles should I add myself to the maintainers list in this commit, or in a separate commit?

@piegamesde thanks, submitted #129030.

@legendofmiracles I submitted a PR to add myself to the maintainers, and updated this PR with the maintainer and added spacing.

@musfay thank you for the suggestions I adopted all of them. I also added a commit adding myself to the maintainers list.

@rui314 can you please review this?

Umm, why?

@legendofmiracles I mistakenly deleted the branch while attempting to rebase. Can this PR be reopened?

@legendofmiracles I rebased and resolved the outstanding issues brought up in reviews.

LGTM

Is there anything blocking this PR at this point?

@SuperSandro2000 can you approve this PR as well?

@SuperSandro2000 can you approve this PR as well?

Approving a PR does not really do anything.

Approving a PR does not really do anything.

Okay, then what are the steps to get this PR merged?

Okay, then what are the steps to get this PR merged?

I just marked it broken on aarch64. I will wait for ofborg and then merge it.

I noticed that mold --run works, but isn't "effective", on NixOS. mold --run works by LD_PRELOADing a library that intercepts certain functions (execlp, execvpe, execvp, execv, posix_spawn, execle, execve, and execl) and checking if you're trying to launch /usr/bin/ld{,.lld,.gold}, and if you are, launches mold instead. The problem is that /usr/bin isn't in path on NixOS by default. A solution would be to add a directory containing symlinks to $out/bin/mold to PATH.
Some notes (because GitHub still doesn't support footnotes):

A list of intercepted functions can be generated using readelf -s result/lib/mold/mold-wrapper.so.
mold --run is the recommended way to use Mold with Cargo, which is why this matters.
The source code of mold-wrapper.so is here, and the source code of mold --run is here

@jakobrs We can relax the rule to recognize commands as "ld". If we want, we can just treat ld, ld.lld and ld.gold as an ld command, regardless of their location in the directory hierarchy.

@rui314 I tried to do this, but notice how ld never gets execed during cargo build.

gcc works if I change it to use the basename, though.

@jakobrs I created a bug for mold to keep track of the issue: https://github.com/rui314/mold/issues/101

I bumped the version of mold, applied the patch, and created a PR: #131830


Drop virtctl related tests and add DryRun tests in hotplug.go

What this PR does
Drop the virtctl related tests in tests/storage/hotplug.go. As long as
virtctl calls the correct API endpoints these tests don't add any value. (see https://github.com/kubevirt/kubevirt/pull/12634)
Verify that the DryRun option in AddVolume requests works as intended.
These cases were covered only indirectly by tests using virtctl previously.
The goal of this and further PRs is to reduce the amount of unnecessary uses of virtctl in the e2e tests to stabilize tests, to reduce the number of flakes and to remove redudant tests.

Fixes #
Why we need it and why it was done in this way
The following tradeoffs were made:
The following alternatives were considered:
Links to places where the discussion took place:
Special notes for your reviewer

Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

[ ] Design: A design document was considered and is present (link) or not required
[ ] PR: The PR description is expressive enough and will help future contributors
[ ] Code: Write code that humans can understand and Keep it simple
[ ] Refactor: You have left the code cleaner than you found it (Boy Scout Rule)
[ ] Upgrade: Impact of this change on upgrade flows was considered and addressed if required
[ ] Testing: New code requires new unit tests. New features and bug fixes require at least on e2e test
[ ] Documentation: A user-guide update was considered and is present (link) or not required. You want a user-guide update if it's a user facing feature / API change.
[ ] Community: Announcement to kubevirt-dev was considered

Release note

None

/sig code-quality

/lgtm
Thank you!

/test pull-kubevirt-check-tests-for-flakes
Failed because of a setup error.

/approve

/retest


Update Get started button to Finish setup when a user has draft data saved in the VBA flow

Details
The button in the Workspace card page should only update once the user dismisses the VBA flow modal. Additionally, it should update to Finish setup if the user has any draft data in the form. TLDR of the issue here.
Fixed Issues
$ https://github.com/Expensify/App/issues/4892
Tests

Login to an account with a Workspace and a public domain, e.g. @gmail.com
Navigate to Settings > Select Workspace > Expensify Card
Verify that the button says Add email and clicking it redirects you to OldDot.
Log out and log back in with a private domain account that has a Workspace, but no verified bank account added.
Navigate to Settings > Select Workspace > Expensify Card
Verify that the button says Get started and clicking it starts the VBA flow
Choose connect manually and start entering data.
Dismiss the VBA flow and verify that the button changes to Finish setup. Note: if you delete all data you entered in the form so far, the button should change back to "Get started" when you exit the flow
With some data in the form, dismiss both VBA flow and Workspace pages.
Reopen the Workspace page by going to Settings > Select Workspace > Expensify card and verify that the VBA flow opens automatically.
Go through the VBA flow to validate your account or login to an account with the Expensify cards provisioned.
Verify that the button says Manage cards and clicking redirects you to OldDot.

QA Steps
Steps above.
 Thanks!

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by @AndrewGable in version: 1.1.3-2 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

@luacmartins Hello! I think we're blocked from testing this. When creating an account with gmail it asks us to add a new domain with a work email. I think this might need to be internal QA.

@isagoico I updated the testing instructions. Could you please try again?

🚀 Deployed to production by @chiragsalian in version: 1.1.4-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Revise rendering spans

Today we're instrumenting DispatcherServlet#render and create a span for it. This works well in order to have a span in the waterfall. What doesn't work well is how it appears in the breakdown graph. That's because the type=template, subtype=dispatcher-servlet, action=render. There's no indication of what technology is used to render the template. it would also attribute JSON serialization as template where serialization may suit better.
Proposal:
Don't instrument DispatcherServlet#render. Instead, instrument the render method of org.springframework.web.servlet.View implementations. Some example are JasperReportsXlsxView, FreeMarkerView and MappingJackson2JsonView.
String type = "template";
String subtype = view.getClass().getSimpleName().replace("View", "");
String action = "render";

Not sure if needed or not but for things like JSON serialization we might want a different type than template.
if (view.getClass().getName().containsAnyIgnoreCase("json", "xml", ...)) {
    type = "serialization";
    subtype = "json"/"xml"?
}

/cc @roncohen

Hi @felixbarny , I will do it.


ERROR IN EXAMPLE: movielens-1m-keras-with-horovod

System information

OS Platform and Distribution: Linux Ubuntu 16.04
TensorFlow version  == 2.8.3 and was installed through pip
TensorFlow-Recommenders-Addons version : '0.6.0-dev' and  was installed through source
Python version: 3.8.10
Is GPU used? yes
using "tfra/dev_container:latest-python3.8" docker image and installed from source using https://github.com/tensorflow/recommenders-addons/tree/master#installing-from-source

Describe the bug
While i was trying to replicate the tutorial, I'm getting the following error in model.fit()
`File "/usr/local/lib/python3.8/dist-packages/keras/engine/training.py", line 1021, in train_function  *
return step_function(self, iterator)
File "/usr/local/lib/python3.8/dist-packages/keras/engine/training.py", line 1010, in step_function  **
outputs = model.distribute_strategy.run(run_step, args=(data,))
File "/usr/local/lib/python3.8/dist-packages/keras/engine/training.py", line 1000, in run_step  **
outputs = model.train_step(data)
File "/usr/local/lib/python3.8/dist-packages/keras/engine/training.py", line 859, in train_step
y_pred = self(x, training=True)
File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 67, in error_handler
raise e.with_traceback(filtered_tb) from None
ValueError: Exception encountered when calling layer "dual_channels_deep_model" (type DualChannelsDeepModel).

in user code:

    File "/tmp/ipykernel_187617/3872527011.py", line 193, in call  *
        user_latent = self.user_embedding(user_fea_info)
    File "/tmp/ipykernel_187617/3872527011.py", line 69, in __call__  *
        dense_emb_concat = self.dense_embedding_layer(dense_input_tensors_concat)
    File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 67, in error_handler  **
        raise e.with_traceback(filtered_tb) from None
    File "/usr/local/lib/python3.8/dist-packages/tensorflow_recommenders_addons/dynamic_embedding/python/keras/layers/embedding.py", line 626, in call
        unique_embeddings = self.__alltoall_embedding_lookup__(unique_ids)
    File "/usr/local/lib/python3.8/dist-packages/tensorflow_recommenders_addons/dynamic_embedding/python/keras/layers/embedding.py", line 605, in __alltoall_embedding_lookup__
        gather_indices = tf.expand_dims(tf.concat(gather_indices, axis=0), axis=-1)

    ValueError: Exception encountered when calling layer "user_DenseUnifiedEmbeddingLayer" (type HvdAllToAllEmbedding).

    Tried to convert 'input' to a tensor and failed. Error: None values not supported.

    Call arguments received:
      • ids=tf.Tensor(shape=(None, 2), dtype=int32)

Call arguments received:
  • features={'movie_id': 'tf.Tensor(shape=(None,), dtype=int64)', 'movie_genres': 'tf.Tensor(shape=(None,), dtype=int32)', 'user_id': 'tf.Tensor(shape=(None,), dtype=int64)', 'user_gender': 'tf.Tensor(shape=(None,), dtype=int32)', 'user_occupation_label': 'tf.Tensor(shape=(None,), dtype=int32)', 'timestamp': 'tf.Tensor(shape=(None,), dtype=int32)'}`

Code to reproduce the issue
https://github.com/tensorflow/recommenders-addons/blob/master/demo/dynamic_embedding/movielens-1m-keras-with-horovod/movielens-1m-keras-with-horovod.py
Other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

@VikashPeddakota999 Fixed. Please check the file in PR #374


Keep track of all previously withdrawn UTXOs

In order to take care of the direct-descendant, double withdrawal attack (https://ethresear.ch/t/plasma-vulnerabiltity-sybil-txs-drained-contract/1654), keep a mapping of previously finalized exits (maybe priority => True/False) and allow someone to challenge an exit by proving that the exit's inputs have already been withdrawn.

Yes as of right now, some one could straight up repeatedly deposit, start exit, and finalize exit, and drain the contract.

For any UTXO passed into startExit, calculate priority from its inputs; check to see if priority => Exit exists in both finalizedExits and exits.

Has this been solved? If so we should close


v0.0.0 flutter stable libs depend on prerelease nullsafety libs (Flutter 1.20 => 1.22 upgrade)

Several Flutter official libs report their version as v0.0.0.... I believe this is causing a mistaken dependency on the prerelease nullsafety version of the Flutter standard libs. The pubspec.yaml in the app only specifies stable versions, so it shouldn't depend on anything prerelease. When running flutter pub get after upgrading from 1.20 to 1.22, it now pulls in the prerelease libs. This mistaken dependency is visible in the flutter pub get --verbose logs below.
The problem first occurred when upgrading from Flutter 1.20 to 1.22. So I'm guessing it's a combination of existing 0.0.0 libraries not having a version and then some kind of change in a dependency or the dart tooling. See another dart SDK issue that cause pub get to pull in prerelease libraries: https://github.com/dart-lang/sdk/issues/42657.
Libraries reporting version as v0.0.0 and causing the nullsafety dependencies:
flutter_test
flutter
flutter_localizations
flutter_web_plugins

Steps to Reproduce
git clone https://github.com/brunobowden/app
git checkout flutter-v0.0.0-issue
cd client/flutter
flutter pub get --verbose &> log.txt

Logs
Selected output from last command above. Full logs available on gist.

[  +17 ms] SLVR: fact: flutter_test 0.0.0 from sdk depends on flutter any from sdk
[        ] SLVR: fact: flutter_test 0.0.0 from sdk depends on test_api 0.2.19-nullsafety.2

Full Logs....
[  +17 ms] SLVR:         fact: flutter_test 0.0.0 from sdk depends on flutter any from sdk
[        ] SLVR:         fact: flutter_test 0.0.0 from sdk depends on test_api 0.2.19-nullsafety.2
[        ] SLVR:         fact: flutter_test 0.0.0 from sdk depends on path 1.8.0-nullsafety.1
[        ] SLVR:         fact: flutter_test 0.0.0 from sdk depends on fake_async 1.2.0-nullsafety.1
[        ] SLVR:         fact: flutter_test 0.0.0 from sdk depends on clock 1.1.0-nullsafety.1
[        ] SLVR:         fact: flutter_test 0.0.0 from sdk depends on stack_trace 1.10.0-nullsafety.1
[        ] SLVR:         fact: flutter_test 0.0.0 from sdk depends on vector_math 2.1.0-nullsafety.3
[        ] SLVR:         fact: flutter_test 0.0.0 from sdk depends on async 2.5.0-nullsafety.1
[        ] SLVR:         fact: flutter_test 0.0.0 from sdk depends on boolean_selector 2.1.0-nullsafety.1
[        ] SLVR:         fact: flutter_test 0.0.0 from sdk depends on characters 1.1.0-nullsafety.3
[        ] SLVR:         fact: flutter_test 0.0.0 from sdk depends on charcode 1.2.0-nullsafety.1
[        ] SLVR:         fact: flutter_test 0.0.0 from sdk depends on collection 1.15.0-nullsafety.3
[        ] SLVR:         fact: flutter_test 0.0.0 from sdk depends on matcher 0.12.10-nullsafety.1
[        ] SLVR:         fact: flutter_test 0.0.0 from sdk depends on meta 1.3.0-nullsafety.3
[        ] SLVR:         fact: flutter_test 0.0.0 from sdk depends on source_span 1.8.0-nullsafety.2
[        ] SLVR:         fact: flutter_test 0.0.0 from sdk depends on stream_channel 2.1.0-nullsafety.1
[        ] SLVR:         fact: flutter_test 0.0.0 from sdk depends on string_scanner 1.1.0-nullsafety.1
[        ] SLVR:         fact: flutter_test 0.0.0 from sdk depends on term_glyph 1.2.0-nullsafety.1
[        ] SLVR:         fact: flutter_test 0.0.0 from sdk depends on typed_data 1.3.0-nullsafety.3
[        ] SLVR:           selecting flutter_test 0.0.0 from sdk
[        ] SLVR:           derived: typed_data 1.3.0-nullsafety.3
[        ] SLVR:           derived: term_glyph 1.2.0-nullsafety.1
[        ] SLVR:           derived: string_scanner 1.1.0-nullsafety.1
[        ] SLVR:           derived: stream_channel 2.1.0-nullsafety.1
[        ] SLVR:           derived: source_span 1.8.0-nullsafety.2
[        ] SLVR:           derived: meta 1.3.0-nullsafety.3
[        ] SLVR:           derived: matcher 0.12.10-nullsafety.1
[        ] SLVR:           derived: collection 1.15.0-nullsafety.3
[        ] SLVR:           derived: charcode 1.2.0-nullsafety.1
[        ] SLVR:           derived: characters 1.1.0-nullsafety.3
[        ] SLVR:           derived: boolean_selector 2.1.0-nullsafety.1
[        ] SLVR:           derived: async 2.5.0-nullsafety.1
[        ] SLVR:           derived: vector_math 2.1.0-nullsafety.3
[        ] SLVR:           derived: stack_trace 1.10.0-nullsafety.1
[        ] SLVR:           derived: clock 1.1.0-nullsafety.1
[        ] SLVR:           derived: fake_async 1.2.0-nullsafety.1
[        ] SLVR:           derived: path 1.8.0-nullsafety.1
[        ] SLVR:           derived: test_api 0.2.19-nullsafety.2

[  +44 ms] SLVR: fact: flutter_localizations 0.0.0 from sdk depends on flutter any from sdk
[        ] SLVR: fact: flutter_localizations 0.0.0 from sdk depends on intl 0.16.1
[        ] SLVR: fact: flutter_localizations 0.0.0 from sdk depends on characters 1.1.0-nullsafety.3

Full Logs....
[  +44 ms] SLVR:           fact: flutter_localizations 0.0.0 from sdk depends on flutter any from sdk
[        ] SLVR:           fact: flutter_localizations 0.0.0 from sdk depends on intl 0.16.1
[        ] SLVR:           fact: flutter_localizations 0.0.0 from sdk depends on characters 1.1.0-nullsafety.3
[        ] SLVR:           fact: flutter_localizations 0.0.0 from sdk depends on collection 1.15.0-nullsafety.3
[        ] SLVR:           fact: flutter_localizations 0.0.0 from sdk depends on meta 1.3.0-nullsafety.3
[        ] SLVR:           fact: flutter_localizations 0.0.0 from sdk depends on path 1.8.0-nullsafety.1
[        ] SLVR:           fact: flutter_localizations 0.0.0 from sdk depends on typed_data 1.3.0-nullsafety.3
[        ] SLVR:           fact: flutter_localizations 0.0.0 from sdk depends on vector_math 2.1.0-nullsafety.3
[        ] SLVR:             selecting flutter_localizations 0.0.0 from sdk
[        ] SLVR:             derived: intl 0.16.1

[  +24 ms] SLVR: fact: flutter 0.0.0 from sdk depends on characters 1.1.0-nullsafety.3
[        ] SLVR: fact: flutter 0.0.0 from sdk depends on collection 1.15.0-nullsafety.3

Full Logs:
[  +24 ms] SLVR:                                                                           fact: flutter 0.0.0 from sdk depends on characters 1.1.0-nullsafety.3
[        ] SLVR:                                                                           fact: flutter 0.0.0 from sdk depends on collection 1.15.0-nullsafety.3
[   +4 ms] SLVR:                                                                           fact: flutter 0.0.0 from sdk depends on meta 1.3.0-nullsafety.3
[        ] SLVR:                                                                           fact: flutter 0.0.0 from sdk depends on typed_data 1.3.0-nullsafety.3
[        ] SLVR:                                                                           fact: flutter 0.0.0 from sdk depends on vector_math 2.1.0-nullsafety.3
[        ] SLVR:                                                                           fact: flutter 0.0.0 from sdk depends on sky_engine any from sdk
[        ] SLVR:                                                                             selecting flutter 0.0.0 from sdk

[   +2 ms] SLVR: fact: flutter_web_plugins 0.0.0 from sdk depends on flutter any from sdk
[        ] SLVR: fact: flutter_web_plugins 0.0.0 from sdk depends on characters 1.1.0-nullsafety.3

Full Logs...
[   +2 ms] SLVR:
fact: flutter_web_plugins 0.0.0 from sdk depends on flutter any from sdk
[        ] SLVR:
fact: flutter_web_plugins 0.0.0 from sdk depends on characters 1.1.0-nullsafety.3
[        ] SLVR:
fact: flutter_web_plugins 0.0.0 from sdk depends on collection 1.15.0-nullsafety.3
[        ] SLVR:
fact: flutter_web_plugins 0.0.0 from sdk depends on meta 1.3.0-nullsafety.3
[        ] SLVR:
fact: flutter_web_plugins 0.0.0 from sdk depends on typed_data 1.3.0-nullsafety.3
[        ] SLVR:
fact: flutter_web_plugins 0.0.0 from sdk depends on vector_math 2.1.0-nullsafety.3
[        ] SLVR:
selecting flutter_web_plugins 0.0.0 from sdk

flutter doctor -v

$ flutter doctor -v
[✓] Flutter (Channel stable, 1.22.0, on Mac OS X 10.15.6 19G2021, locale en-US)
    • Flutter version 1.22.0 at /Users/brunobowden/dev/flutter
    • Framework revision d408d302e2 (7 days ago), 2020-09-29 11:49:17 -0700
    • Engine revision 5babba6c4d
    • Dart version 2.10.0

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/brunobowden/dev/android-sdk-macosx
    • Platform android-29, build-tools 28.0.3
    • ANDROID_HOME = /Users/brunobowden/dev/android-sdk-macosx
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0.1, Build version 12A7300
    • CocoaPods version 1.9.3

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 50.0.1
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[!] Connected device
    ! No devices available

! Doctor found issues in 1 category.

This is causing some ecosystem problems, e.g. the screenshots package broke due to library interface changes.

@a14n - thanks for your work on nullsafety. My understanding is that nullsafety is still prerelease but after upgrading flutter from v1.20.0 => v1.22.0, the flutter pub get pulled in a number of -nullsafety.x prerelease libs as unexpected dependencies... the pubspec.yaml only refers to stable releases and I thought shouldn't depend on anything prerelease.
I believe this may be happening as a number (maybe all?) of the flutter libs report their version number as v0.0.0, which I think may be screwing with the dependency resolution in Dart.
Diff that added nullsafety as dependency on flutter libs:
https://github.com/flutter/flutter/commit/f32a73711a826c6f1157c2637fb419a597e8ef87#diff-afa141921d14a02769e479c13b0b775c

FYI @mit-mit - my compliments on a somewhat related but beautifully described issue: https://github.com/dart-lang/sdk/issues/42657#issue-654672867

Hi @brunobowden, let me try to respond to some of the questions and comments from the top of this thread:
packages with 0.0.0 versions

Several (maybe all?) Flutter official libs report their version as v0.0.0....

Flutter has a few core packages that are so-called SDK packages. These are not distributed on pub.dev, but rather in the framework itself. You can see these in your pubspec.yaml having a special sdk: flutter line below them, e.g.:
  flutter:
    sdk: flutter

  flutter_localizations:
    sdk: flutter

dev_dependencies:
  flutter_test:
    sdk: flutter

Because these are not coming from pub.dev, they are not part of the resolution that the pub client does. I'm not sure why the solver prints them as having version 0.0.0; it would be more correct to say that they don't have a version at all.
prerelease dependencies in Flutter stable 1.22

I believe this is causing a mistaken dependency on the prerelease nullsafety version of the Flutter standard libs.

It is correct that Flutter stable 1.22 has dependencies on prerelease packages, specifically the ones pinned here: https://github.com/flutter/flutter/blob/1.22.0/packages/flutter/pubspec.yaml#L10
This is a temporary measure to enable us to make progress on migrating the Flutter framework to null safety. Note that 1) these packages are fully backwards compatible with apps and packages that do not use null safety, and 2) despite their prerelease version we ran these through full stable testing, so they are essentially stable.

The pubspec.yaml in the WHO COVID-19 app only specifies stable versions, so it shouldn't depend on anything prerelease. When running flutter pub get after upgrading from 1.20 to 1.22, it now pulls in the prerelease libs.

Yes, this is a bit of an anomaly. The pub solver only picks these prerelease versions because it has no other choice; there is no stable version of these available.

The problem first occurred when upgrading from Flutter 1.20 to 1.22.

That's right. This is a transition we have to work through; there was no way we could land a change as large as null safety within a single stable release. We hope to have a stable release of Flutter early next year that has a stable null safety feature, and with that regular stable version core package dependencies. And as I mentioned above, don't worry about these packages from a stability point of view; they are stable quality.

Closing as by-design.

I'd like to reopen discussion on this to ask about one of the assumptions: "these packages are fully backwards compatible with apps and packages that do not use null safety."
Is that really true?
flutter 1.2.2 switched from process ^3.0.x to process ^4.0.x, platform 2.2.x to platform 3.0x, and file 5.0.x to file 6.0.x. Those all included non-backwards compatible API changes.
I'm not sure how big the ecosystem breakage extends, but it's definitely present. One of the popular screenshots packages is broken by this change, so folks who had CI/CD for app store releases are in bad shape.

@mit-mit - thanks for a thoughtful response. I'm satisfied with your statement about it being a stable quality even if prerelease. I couldn't find this decision documented anywhere. So it might be good thing to document in the release notes or some other place.... but I'll leave it to your discretion on whether to do that. At the very least, it's documented here.
@speaking-in-code - I think @mit-mit may be speaking about backwards compatibility with the sdk libraries. The platform, process and file are not sdk libraries. Perhaps there were breaking changes in them but that would be a separate issue. The Flutter 1.22.0 release notes mentions a number of breaking changes:
https://flutter.dev/docs/development/tools/sdk/release-notes/release-notes-1.22.0

My statement about backwards compatibility was regarding the null safety aspect: these packages are compatible with both app/packages that choose to use null safety, and ones that don't.
It looks like there may have been other breaking changes in some of these packages. For example, I see that package:file had some functionality removed for record/play according it's changelog. @jonahwilliams can you elaborate?

The other non-backwards compatible changes I've hit while trying to upgrade are
package:platform: FakePlatform no longer mutable:
https://github.com/google/platform.dart/commit/33bb07771d6d459a8fd1cafc7ad3195144bc4b51
package:process: RecordingProcessManager no longer exists:
https://github.com/google/process.dart/commit/1df10c6fd7684f6862afc4f3ed4cb8c5d13852fb
There are also a couple of breaking dart SDK changes coming in. Not sure if the ecosystem will be forced to merge those at the same time, hopefully not?
dart:io: HttpHeaders now has preserveLowerCase option (which was a known breaking change):
https://github.com/dart-lang/sdk/commit/d39cdf03f83a4b76d0bda122b3745109fcd03299
dart:io: HttpClientRequest now has an abort method.
https://github.com/dart-lang/sdk/commit/56d40bad75255688772a6b306fd459a59cd737c8


[UI] dev server build Failure due to eslint upgrades

Description

Build Fails due to eslint upgrade and babel deprecation warning turning into failures.
This PR fixes #
Notes for Reviewers
Signed commits

[ ] Yes, I signed my commits.

Codecov Report

Merging #5403 (c78f152) into master (84c477b) will decrease coverage by 4.31%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #5403      +/-   ##
==========================================
- Coverage   17.47%   13.16%   -4.32%
==========================================
  Files         107      107
  Lines        9882     9882
==========================================
- Hits         1727     1301     -426
- Misses       7733     8304     +571
+ Partials      422      277     -145

Flag
Coverage Δ

gointegrationtests
?

unittests
13.16% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

mesheryctl/internal/cli/root/system/update.go
1.05% <0.00%> (-58.95%)
:arrow_down:

mesheryctl/internal/cli/root/system/start.go
1.88% <0.00%> (-55.19%)
:arrow_down:

mesheryctl/internal/cli/root/system/status.go
1.14% <0.00%> (-55.18%)
:arrow_down:

mesheryctl/internal/cli/root/system/restart.go
1.92% <0.00%> (-48.08%)
:arrow_down:

mesheryctl/internal/cli/root/system/stop.go
2.15% <0.00%> (-44.61%)
:arrow_down:

mesheryctl/internal/cli/root/system/logs.go
3.26% <0.00%> (-36.96%)
:arrow_down:

mesheryctl/internal/cli/root/system/check.go
1.03% <0.00%> (-23.03%)
:arrow_down:

mesheryctl/internal/cli/root/system/dashboard.go
1.70% <0.00%> (-9.41%)
:arrow_down:

mesheryctl/pkg/utils/healthcheck.go
8.82% <0.00%> (-4.42%)
:arrow_down:

Continue to review full report at Codecov.

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


removing hardcoded entityID

fixes #542

actually we can drop the error message in there, since with #539 it is not displayed anywhere. I've tweaked the default error in error.js to give slightly more info.


Make seq_depth_th dependent on average abundance

At the moment, the threshold for setting abundances to zero during dataset generation, seq_depth_th, is a constant. It could well be that, depending on the set of growth rates + interaction matrix, there could be a stable fixed point where one or more species have abundances close to or even below the seq_depth_th value.
One suggestion to avoid that is to make seq_depth_th dependent on the average abundance (which I'll call avg_abun) over all species in the system. Maybe something like seq_depth_th = 0.001*avg_abun.

This is a good idea, but when we worked on this problem before, implementations of seq_depth doesn't actually change anything ... so we may need to work harder on this specific feature to get it to be biologically meaningful


Media.delete does not work

Hi,
I've been trying to delete a photo using the API. The code to delete media in this API is as follows:

Media.delete = function(session, mediaId) {
    return new Request(session)
        .setMethod('POST')
        .setResource('mediaDeletePhoto', {mediaId: mediaId})
        .setData({
            media_id: mediaId
        })
        .generateUUID()
        .signPayload()
        .send()
        .then(function (json) {
            if(json.did_delete) return;
            throw new Exceptions.RequestError({
                messaage: 'Not posible to delete medium!'
            })
        })
};

My code is as follows:
function delPost() {
  Client.Session.create(device, storage, process.env.USER, process.env.PASS)
  .then(function(session) {
    return Client.Media.delete(session,<PHONE_NUMBER>302781250);
  })
}

I get the media ID from this website.
When I try to delete the post, I get an error in console saying Unhandled rejection RequestError: could not delete
I also tried running Client.Media.likers with the same parameters and for every post I try it on it tells me that post has been deleted.
It seems these two functions relating to the media id are not working properly. Is this the case for everyone else? If not, and it is my media id, how can I get the correct media id?
Thanks in advance for your help :)
UPDATE: I also tried getting the media id via the function in this API. It also didn't work.
function delPost() {
  Client.Session.create(device, storage, process.env.USER, process.env.PASS)
  .then(function(session) {
    Client.Media.getByUrl(session, 'https://api.instagram.com/oembed?url=http://instagram.com/p/BmOvsVRhUZe/')
    .then(function(mediaid) {
      console.log(mediaid);
      return Client.Media.delete(session, mediaid);
    })
  })
}

I fixed it by parsing my media id as a string. return Client.Media.delete(session, '1841011081302781250');
The url-to-media-id part of the API did not work properly and I got the media id from the website I mentioned in my original comment. I believe there should be clearer documentation as to how to properly use all of these functions because it is very tedious trying to figure it out myself. I might figure out how to use everything this API has to offer and submit a PR in the near future.


Fix order book summary resource

This PR contains a two fixes for the order book summary endpoint:

Properly shows Asks in the "asks" field
Populate "amount" field

r+


PEP 8 modification

Closing outdated PR. If you still care about the content of the PR, please submit a new PR to master, updated for the Keras 2.0 API.


Support stream Chunk reading in Python API

In the Python mcap reader API, chunks are read into memory as full blocks. This often causes OOM errors on smaller systems.
Main reader loop: https://github.com/foxglove/mcap/blob/a68c76979d646fa90a24bff3457be2da0c371f0a/python/mcap/mcap/reader.py#L294-L318
Chunk data read line: https://github.com/foxglove/mcap/blob/0a06331980a47ef606cca06b6ee3fc987f5f2d52/python/mcap/mcap/records.py#L173-L173

I think this idea is good generally. The main constraint is that to make use of the message index, you need to decompress the whole chunk first. But if you don't care about the message index and you're just doing a linear file read, then streaming decompression of chunks is what you want for sure. We support this in the go library but none of the others afaik.
I think the main place where you benefit from this is when reading a lot of mcap files at once (for instance, merging them together). OOMs during reading of a single MCAP file may also be addressed, but not if they are caused by oversized individual messages, which is the most common reason for oversized chunks in my experience. Absent massive messages, if the writer is configured with a sane chunk size then OOMs should not generally be encountered when reading a single file -- the default decompressed chunk sizes are in the single-digit megabytes, and you generally only need one at a time open.
So to summarize, I think the feature is good but it would be worth checking if there's anything odd going on with your chunking, if the context here is reading single files. You can do this with
mcap info file.mcap

and
mcap list chunks file.mcap

which will show all the individual sizes. There was an old bug in the rust writer that resulted in single-chunk files. I'm curious if you may be on an old version of the rust writer that still has this behavior:
https://github.com/foxglove/mcap/pull/777
or are creating huge chunks in some other way.


Add the ability to contruct TrustRoot from targets

Summary
This PR adds the ability to construct a TrustRoot instance from public keys/certs and also to serialize it to JSON.
This was requested in https://github.com/sigstore/scaffolding/pull/1191#pullrequestreview-2200462032 by @haydentherapper.
NOTE: one question that I have is about the validity period of a certificate chain. Right now I take it as root certificate validity, but thinking about it again, maybe it should actually be the validity of the "leaf-most" certificate? Please let me know, I can add a commit to fix this.
Release Note

Added NewTrustedRootFromTargets function to enable creating TrustedRoot objects from public keys/certificates.

Documentation
I don't think this needs additional documentation, the added public function has a godoc that I think is sufficient.

I updated the PR to add a test for deserializing and then again serializing a TrustedRoot instance and fixed couple minor issues related to that (plus linting issues). The test is failing now, only because the time instances are serialized in a different way - the provided sample has a format of "2021-03-07T03:20:29.000Z", while timestamppb serializes as "2021-03-07T03:20:29Z" (no 000Z at the end).
I don't immediately see a good way to fix the time serialization format, but I'll keep looking into it. I think this is a difference that we could potentially live with, but I also understand if you think this must be fixed before merging - let me know. Thanks!

FWIW, it looks like the .000 in the serialized time is intentionally stripped. I think changing that would be extremely hard and I don't think it's worth it (especially if technically we're emitting JSON that is the same, this is just a matter of formatting). I'll fix the test so that it ignores the .000 differences.

Good point @cmurphy - I added a simple example of a binary that can construct and pretty print a trusted_root.json file - let me know what you think!

@steiza  @haydentherapper I believe I have now addressed all your concerns and that this should be acceptable. Can I ask you for another round of reviews?
FWIW I removed the example, because the only really useful added feature is the serialization, which I don't think needs an example. I will also change the description to match what the PR currently does.

@kommendorkapten thanks again for your review, I just pushed a commit that addresses your points. I also refactored the sorting functionality to functions to avoid copy-paste code (and I realized it was mistakenly called in every iteration of the loops, while we just need to do it after the loops, so I fixed that as well). Let me know if this looks good now!


Fixed: Bower.json main tag now points to existing file

The main tag in the bower.json file points to a non existing file (dist/angular-countUp.js)
Signed-off-by: Ahmed Abdelsamad<EMAIL_ADDRESS>

Thanks!


Git bash not working well

I use git bash as my integrated terminal in vscode, but it sometimes doesn't work well. But when I use a git bash as a external shell, it works normally.
What it looks like now:

What it should look like:

However, I can scroll to top by hand to see the green "DONE" label...
It seems like there is always a extra blank line which push the log info up a little...
Certainly, when I use wsl or powershell as my integrated terminal, this works well:

VSCode Version:1.29.1
OS Version:Windows10 1803 17134.407

Steps to Reproduce:

use git bash as integrated terminal
have @vue/cli installed
run npm run serve or yarn serve

Does this issue occur when all extensions are disabled?: Yes

This is likely related to winpty, tracking in https://github.com/Microsoft/vscode/issues/45693


[SelectField][Dropdown Menu] Menu with many items performance much worse with popovers

I was using a SelectField before the changes related to popovers (release 0.14.0-rc2).  The menu has about 400 items to choose from.  Before, expanding and collapsing the menu was very fast (almost instant) but with the popover change it is quite slow (.5-1 second).  I have verified that this performance change happened in 0.14.0-rc2 by switching back and forth between that and 0.14.0-rc1, and observe fast expand/collapse in rc1 but slow expand/collapse in rc2.  Has anyone else noticed a similar performance hit?  Was there any testing done with large lists of menuItems?
It's a bummer because the popover is giving us lots of nice features (such as actually being able to scroll through the menu items :) ) we were looking for but as is, we cannot use it.

@tehleach After code quality and documentation, performances are the next point I want to take care of. That's worrying. Could we have a gif of what's happening? Or do I just need to render 400 simple items?

I don't think I can give you a gif.  I would assume rendering 400 simple items would do the trick, but I'm looking at the example on the docs site with 100 items and it seems quick.  It might have to do with having long primaryText strings?  I can do some more thorough testing in a bit.

Ok, here's a quick project I threw together.. pretty bare bones.  I'm just rendering a DropDownMenu component with 400 items.    If anyone pulls it down and runs it, let me know if you run into any issues.  I'd like to look into and try to improve the performance but I'm not sure when I'll have time to.

I have same performance issue.My SelectField have about 500 items and it's very very slowly(2-3 second) when expanding and collapsing.I try to increase items number from 100 to 500 and then the SelectField's performance exponential decrease.

I had a similar experience but also have some spots in my app with several SelectFields of 10-20 items - even thought the list of items is short the performance seems to slow exponentially depending on how many total select fields are rendered on the page at any given time.

I have the same performance issue on all these elements :

List
Select
Autocomplete

Maybe using something like https://github.com/bvaughn/react-virtualized would be the solution ?

react-virtualized author here. I think that implementing windowing by default within components that may potentially contain a lot of data (like selects) is a great idea. If you'd be interested in discussing a possible integration, @oliviertassinari, please reach out to me.

@bvaughn The Material-UI team is definitely interested in this integration.

Let's talk more then. Let me know how best to do that. (Email? Hangout? Discord?)

@oliviertassinari This seems like there may be quite a bit of work/time before this is resolved. Do we need it for 0.15.0 or can we move it?

@nathanmarks That would be better to have into 0.15.0 but I don't think that this issues requires to introduce any breaking changes.
I don't have time to have a look at it. I have just removed it from the milestone.

I have this performance problem with the AutoComplete with 500 records :(
Is there any workaround when its not fixed yet?
Thanx

@marcelobateira We have merged a first PR that improve the rendering by 20%. I'm pretty sure we can do much better.

same problem here with ~250 items using material-ui 0.15. any news about the fix?

Also having performance issues with dropdown

Still happy to lend a hand with react-virtualized integration if there's still interest and things have progressed far enough to work on it. (I think last time we talked there was some refactoring work in the queue that you guys wanted to do first.)

We implemented this using react-virtualized, though it's been modified for our uses without regard for back compat so it's not easy to merge back upstream. It works great! https://github.com/mitodl/micromasters/pull/568

though it's been modified for our uses

@noisecapella: "it" being react-virtualized or material-ui?

Material-UI from what I have seen.

Ah, yeah. They forked List and Menu. Should have looked before asking. Haven't had ☕  yet. :)

@bvaughn Yes, we didn't need to modify react-virtualized at all.

We hit this performance issue as well. A quick profiling reveals that pure rendering does not kick-in for MenuItems. Further investigations reveal that the issue is likely to be in this snippet from Menu:
return React.cloneElement(child, {
  desktop: desktop,
  focusState: focusState,
  onTouchTap: (event) => {
    this.handleMenuItemTouchTap(event, child, index);
    if (child.props.onTouchTap) child.props.onTouchTap(event);
  },
  ref: isFocused ? 'focusedMenuItem' : null,
  style: mergedChildrenStyles,
});

The problem is that the onTouchTap and style props are fresh new objects on each render which results in shouldComponentUpdate returning true for the child (MenuItem).

@ligaz I tested out your idea by setting onTouchTap and style to null, and thus easily returning a false for shouldComponentUpdate. I did my tests with a DropDownMenu of 1000 MenuItems, using React's Perf.
 By setting those objects to null, it speeds up the closing of the menu entirely, no time wasted, and near instant.
Inclusive and Exclusive rendering time upon opening the menu. I think this is expected, as each of the 1000 items renders once, nothing has been wasted, as seen in the earlier two experiments.
So the issue for the closing the menu is definitely a shouldComponentUpdate problem, whereas the issue for opening the menu could just be the slowness of material-ui's method of rendering menus with popovers.

I am using SelectField with about 900-1000 items and it seems very slow. I wonder if there's any update on this issue ? Thanks :)

I'm facing this issue in the lastest version 1.0.0-beta.22. With just about 50 items you can start to notice it. Doing some profiling, I see a bunch of events being triggered when opening the Select

Takes around 1.5s to open and render around 300 items on a MacBook Pro. Similar when closing.
The code I'm using:
            <FormControl fullWidth required={required} error={!!error}>
                {label && (
                    <InputLabel shrink htmlFor="select">
                        {label}
                    </InputLabel>
                )}
                <Select
                    id={id}
                    disabled={disabled}
                    value={value}
                    onChange={this.onChange}
                    input={<Input id="select" />}
                >
                    {showEmpty && <MenuItem value="">--</MenuItem>}
                    {native
                        ? rows.map(row => (
                              <option key={getId(row)} value={getId(row)}>
                                  {getTitle(row)}
                              </option>
                          ))
                        : rows.map(row => (
                              <MenuItem key={getId(row)} value={getId(row)}>
                                  {getTitle(row)}
                              </MenuItem>
                          ))}
                </Select>
                {helperText && <FormHelperText>{helperText}}</FormHelperText>}
            </FormControl>

What can we do from our side to improve this?

With just about 50 items you can start to notice it

The component wasn't designed to display a large list of choice. Pick the native implementation if you need to display more items, like the list of all the countries. Otherwise, we will need to invest in virtualization.

In the code above, you can see that if you pass native option it uses the native version. But, its performance is very similar to the non-native option.

@alexjoverm It's no enough. You need to tell the component you are using the native version. I'm rendering 250 countries with no performance issue.

I found similar performance issue with a list of 300. My workaround is to combine react virtualized [List] with TextField select. You do have to handle any event such as onChange or onKeyup yourself.
i.e.
rowRenderer() {
  const { key, index, style } = row;
  const { options = [] } = this.props;
  const option = options[index];
  return (
    <MenuItem
      key={key}
      style={style}
      value={option}
    >
      <ListItemText primary={option} />
    </MenuItem>
  );
}

render() {
  const { options = [] } = this.props;
  const { selectedValues = [] } = this.state;
  return (
    <TextField
      select
      SelectProps={{
        multiple: true,
      }}
      value={selectedValues}
    >
      <List
        width={listWidth}
        height={listHeight}
        rowCount={options.length}
        rowHeight={48}
        rowRenderer={this.rowRenderer}
      />
    </TextField>
  )
}

@senluchen2015 Sweet! Would you mind adding demo about in the documentation? However, I'm wondering. Does the keyboard navigation works?

@oliviertassinari
I made this https://codesandbox.io/s/o7zo71nk2q to demo react-virtualized. The keyboard navigation doesn't work as default, but with some workarounds it functions just fine.

@senluchen2015 any chance we get a working example :D

@senluchen2015 any chance we get a working example :D

I got it working with the Autocomplete virtualized example and the following small modifications to the Virtualize function from the code example:
export default function WindowedSelect({id, label, value, options, getOptionLabel, onChange}) {
  const classes = useStyles();

  return (
    <Autocomplete
      id={id}
      style={{ width: 300 }}
      disableListWrap
      selectOnFocus
      autoComplete
      classes={classes}
      ListboxComponent={ListboxComponent}
      renderGroup={renderGroup}
      options={options}
      renderInput={(params) => <TextField {...params} variant="outlined" label={label} />}
      getOptionLabel={getOptionLabel}
      value={value}
        onChange={(event, newValue) => {
            onChange(newValue);
        }}
    />
  );
}

The main changes are taking in the the various things I wanted to change.  It works great for my 500ish item list


Land detector

New land detection algorithm:

Moved land detection from position estimators to two new land detector modules, one for Fixedwing and one for Multicopters.
Disabled land detector in both INAV and EKF position estimators.
Minor change to Commander to use land detector result instead of local_pos.landed

Land behaviour changes:

Multicopter land detector is only active when the autopilot is actively trying to land (i.e position_setpoint type must be SETPOINT_TYPE_LAND for the land detector to trigger).
Land detector is very strict at the moment, and can use up to 10 seconds of low throttle before it disarms. Further tweaking of parameters/algorithm is required to improve this.

Note:

Fixedwing land detector is based on the crude fixedwing land detector previously located in ekf_att_pos_estimator and is not tested
Algorithm parameters are currently constants but should probably be externalized as parameters editable in QGroundControl, as these my differ depending on individual frames.
mc_land_detector has been verified and tested in stable branch

Very cool, thanks a lot. I will go through the changes.

Algorithm parameters are currently constants but should probably be externalized as parameters editable in QGroundControl, as these my differ depending on individual frames.

we should definitely create system paremeters before a merge

@Zefz can you please run ./Tools/fix_code_style.sh on your files? Some of them have wrong intent (4 spaces instead of 8 as tabs)

Do we need one land detector per system, or can we just look at the system type? That would make things a bit easier.
Also, I think this illustrates well we need a shell-handling base class to reduce boiler plate code. @Zefz would you be interested to turn your shell handler into a base class in system lib and just call it?

Thinking about it, I would propose at the minimum to make the vehicle type a parameter of the detector startup routine, and best case add a command line handling class.

Cool, that sounds great!

Cool!
@sjwilks Could you give this some flight testing with INAV and with EKF? That should stabilise things quite a bit.

@Zefz Could you maybe rebase this on master? Thanks!

Please rebase on master for the ROM size fix. Working on a more substantial fix.

@Zefz Fixed! @sjwilks @thomasgubler I know the weather is non permissive right now, but once it is, test flying this would unblock a number of things.

Will do. Staring out the window every 5 minutes :)
On Fri Jan 09 2015 at 7:26:35 AM Lorenz Meier<EMAIL_ADDRESS>wrote:

@Zefz https://github.com/Zefz Fixed! @sjwilks
https://github.com/sjwilks @thomasgubler
https://github.com/thomasgubler I know the weather is non permissive
right now, but once it is, test flying this would unblock a number of
things.
—
Reply to this email directly or view it on GitHub
https://github.com/PX4/Firmware/pull/1595#issuecomment-69298354.

@sjwilks @thomasgubler @LorenzMeier Please do not fly this branch at this moment. I discovered a segfault occurring on boot after connecting battery. This segfault is reproducible by re-plugging the battery a number of times.
This issue does not appear in Stable branch, so it could be an error in the Master branch but I want to make sure it's not in my code.

Neither did removing the USB stream rates:
And / or remove the stream rate config statements here:
https://github.com/PX4/Firmware/blob/master/ROMFS/px4fmu_common/init.d/rc.usb#L7-L30

@LorenzMeier Okay, I have discovered how to avoid the Segfault. Disconnecting the 3DR Temeletry module from Telem1 prevents the segfault from occurring.

In case you feel comfortable with removing individual pins (if you do it right, you can do so without damaging them), could you remove the RTS & CTS lines (pin 4 and pin 5)? Knowing wether that makes a difference would allow to narrow down the code path that fails a little more. If not don't worry, I'll try to reproduce on the weekend. Does the 3DR modem send any data when it happens (is the 2nd modem powered)? Or is it just the one modem with nothing else connected?

@Zefz Any news from your side? I'm still poking at your reports trying to work out what went wrong.

I'll look into it tomorrow.
This could somehow be related to #1605. After changing the SD card with a fresh new one, the Pixhawk seems no longer to segfault. The segfault now only happens on the Pixhawk inside the Iris+ (and disconnecting the 3DR Telemetry seems to mitigate this issue). Let's keep further discussion in this issue about the land_detector (as it seems the segfault does not originate from the land_detector code) and continue segfault debugging in #1605 .

As a first step I went for a flight yesterday with an F330 / PX4 V1 setup using this branch with EKF in very gusty conditions. I didn't fly auto and hence no auto landing due to the conditions but so far no issues.
More tests will follow this week.

@sjwilks: So the land detector has to be always running even if the autopilot isn't actively trying to land? I guess that's fine, as long as we can avoid false positives mid-air.

@LorenzMeier I want to improve the current land detector algorithm for multicopters. One of the current things that make the multicopter use long time to detect a land is the thrust setpoint for Z (_actuators.control[3]) uses too long time to converge to below the land threshold. If I wanted this to converge faster how would I tell the mc_pos_control to more aggressively reduce the thrust setpoint (e.g increase the Z_Vel_P term  or Z_Vel_Setpoint).

Make the mc_pos_control listen to a maybeLanded flag (all other conditions except thrust indicate a land) published by the land detector
Use uORB to tell the mc_pos_control to more aggressively reduce throttle.

I have tested this code again using multicopters and it can land correctly using Land more or RTL (with auto disarm once landed). There were some regression bugs that happened when merging the two algorithms which should be fixed now.

Cool! My last round of tests were blocked by the gcc 4.8.4 issue so now
it's only weather blocking me ;) Will try it out as soon as possible.
On Wed Jan 14 2015 at 7:02:50 PM JohanJansen<EMAIL_ADDRESS>wrote:

I have tested this code again using multicopters and it can land correctly
using Land more or RTL (with auto disarm once landed). There were some
regression bugs that happened when merging the two algorithms which should
be fixed now.
—
Reply to this email directly or view it on GitHub
https://github.com/PX4/Firmware/pull/1595#issuecomment-69961061.

If testing looks otherwise good, if the newlines are fixed I think this would be good to go.

It would be good to change the hardcoded values to parameters before a merge

I would need to take a look on how this is done in the other modules. I haven't looked at the parameter loading/storing system yet, but it doesn't look too complicated.

Is there a particular reason the land detection on HIL needs special handling? I'm not generally opposing it, I'm just trying to understand the rationale.

I do not know why it has special handling. There was existing code that did this for local_pos.landed and I simply ported this to handle this using the new land_detector instead.

OK, I've externalized the land detector parameters so that they are editable in QGroundControl.
I've decided to have two sets of parameters, one for fixed wing and one for multicopters (with prefixes LAND_FW and LAND_MC).

@Zefz There is a limit for parameter names at 16 chars. Have you tested your changes? Because you won't receive the complete param name in the GCS. Please shorten them accordingly.

I've fixed the param names myself - you did already so many iterations and its much appreciated! Great contribution!