feat: Add clusterCompliance_info metrics

Description
Related issues

Close #1332

Remove this section if you don't have related PRs.
Checklist

[x] I've read the guidelines for contributing to this repository.
[x] I've added tests that prove my fix is effective or that my feature works.
[x] I've updated the documentation with the relevant information (if needed).

@geoffrey1330 any progress with this PR ?

@geoffrey1330 any progress with this PR ?

Haven't done much recently. I'm currently stuck in the failing build

I would start with fixing tests

@geoffrey1330 any progress with this PR ?

Haven't done much recently. I'm currently stuck in the failing build

I would start with fixing tests

Alright. Thanks

@geoffrey1330 to fix code verify issue you'll need to run mage generate:docs

@geoffrey1330 to fix code verify issue you'll need to run mage generate:docs

Alright I have done that.
Thanks.

Hi @chen-keinan could you please review my PR as all checked passed successfully.

@geoffrey1330 the compliance crds is classic compose from

spec (definition)
status (results)

data should be taken from status not spec
the compliance specs has two modes :

summary (only control check and result)
all (detail format)

the 2nd one is more complex to present as metric so I assume metric should be produce only for summary mode
for summary mode here is example of output:
{
  "apiVersion": "aquasecurity.github.io/v1alpha1",
  "kind": "ClusterComplianceReport",
  "spec": {
    "compliance": {
      "controls": [
        {
          "checks": [
            {
              "id": "AVD-KSV-0012"
            }
          ],
          "description": "Check that container is not running as root",
          "id": "1.0",
          "name": "Non-root containers",
          "severity": "MEDIUM"
        },
        {
          "checks": [
            {
              "id": "AVD-KSV-0014"
            }
          ],
          "description": "Check that container root file system is immutable",
          "id": "1.1",
          "name": "Immutable container file systems",
          "severity": "LOW"
        }
      ],
      "cron": "* * * * *",
      "reportType": "summary"
    }
  },
  "status": {
    "summary": {
      "failCount": 11,
      "passCount": 16
    },
    "summaryReport": {
      "controlCheck": [
        {
          "id": "1.0",
          "name": "Non-root containers",
          "severity": "MEDIUM",
          "totalFail": 8
        },
        {
          "id": "1.1",
          "name": "Immutable container file systems",
          "severity": "LOW",
          "totalFail": 0
        }
      ],
      "id": "nsa",
      "title": "National Security Agency - Kubernetes Hardening Guidance v1.0"
    },
    "updateTimestamp": "2023-11-13T20:38:00Z"
  }
}

when totalFail = 0 meaning control check has pass
metric for this example should look like this
trivy_compliance_info{compliance_id="1.0",compliance_name="Non-root containers",description="National Security Agency - Kubernetes Hardening Guidance",status="fail",title="National Security Agency - Kubernetes Hardening Guidance v1.0"} 8

trivy_compliance_info{compliance_id="1.1",compliance_name="Immutable container file systems",description="National Security Agency - Kubernetes Hardening Guidance",status="pass",title="National Security Agency - Kubernetes Hardening Guidance v1.0"} 1

please generate report in summary mode and adjust code to the above example

@chen-keinan do you mean i should change here not to reference Spec but Status instead.
	for _, r := range reports.Items {
		if c.Config.MetricsClusterComplianceInfo {
			labelValues[0] = r.Spec.Complaince.Title
			labelValues[1] = r.Spec.Complaince.Description
			for _, compliance := range r.Spec.Complaince.Controls {
				labelValues[2] = compliance.ID
				labelValues[3] = compliance.Name
				labelValues[4] = NewStatusLabel(Status(compliance.DefaultStatus)).Label
				for i, label := range c.GetReportResourceLabels() {
					labelValues[i+5] = r.Labels[label]
				}

@chen-keinan do you mean i should change here not to reference Spec but Status instead.
	for _, r := range reports.Items {
		if c.Config.MetricsClusterComplianceInfo {
			labelValues[0] = r.Spec.Complaince.Title
			labelValues[1] = r.Spec.Complaince.Description
			for _, compliance := range r.Spec.Complaince.Controls {
				labelValues[2] = compliance.ID
				labelValues[3] = compliance.Name
				labelValues[4] = NewStatusLabel(Status(compliance.DefaultStatus)).Label
				for i, label := range c.GetReportResourceLabels() {
					labelValues[i+5] = r.Labels[label]
				}

yes, and also follow my other comments

Hey, this is awesome, just what I needed! Thanks Geoffrey. In case you hadn't noticed already, I hope to safe you from some frustration by mentioning that in:
		labelValues[0] = r.Spec.Complaince.Title
		labelValues[1] = r.Spec.Complaince.Description
		for _, compliance := range r.Spec.Complaince.Controls {
			}

Compliance is spelled wrong. Thanks for working on this! 🙏🏻

True. but this is how it was spelled in the api struct.

@geoffrey1330 ping me when ready for review

@geoffrey1330 ping me when ready for review

Alright

Hi @chen-keinan All Checked have passed. ready for review.

Hey @chen-keinan this feature is much awaited please review the PR soon, it would be nice if it could be included in the next release!

No worries, it will be included with in next release

@geoffrey1330 thank you for the contribution 🚀  lgtm


feat: support grammY lazy sessions

This PR adds support for lazy sessions in grammY. A mechanism that helps to improve performance.
Signed-off-by: Slava Fomin II<EMAIL_ADDRESS>

This release is published as<EMAIL_ADDRESS>for impatient ones. Feel free to check it out.

Haven't used that grammY feature so far. Thanks for adding that!


Cross module getters

I see you can make getters get data from multiple stores. Can you also have getters get data from multiple modules? (Haven't used nuclear yet,  just investigating it)

I believe a getter registered with a nuclear instance can get from any stores registered to that instance

Makes sense. I just tried it and it works as expected. Thanks.


Multi-line print_var cleanup only deletes the line with the comment

I was using debug.print_var() and it resulted in a lengthy console.log(). My Prettier config formatted it into multiple lines. When attempting to use debug.cleanup(), it only deletes the line where the __AUTO_GENERATED_PRINT_VAR__ comment was located.
Is it possible to detect and delete the entire text object of the debug statement, instead of just the line?

Currently, the inserted comment is used to check which lines should be deleted. My firsth thougth is that a comment could be inserted before and after the debug print in order to detect the full range to be deleted in cases like this. Would this work with prettier?

This is what it looks like with my prettier config if I prepend a comment. Doesn't look pretty but it should allow you to detect which range of lines to delete.
  /* __START_AUTO_GENERATED_PRINT_VAR__ */ console.log(
    'NEXT_PUBLIC_RESULTS_QUERY_MAX_ATTEMPTS:',
    env.NEXT_PUBLIC_RESULTS_QUERY_MAX_ATTEMPTS
  ); // __END_AUTO_GENERATED_PRINT_VAR__

I don't know if this is possible at all, but could you do some sort of upwards-traversing-lookup that detects the beginning of console.log (instead of having to prepend a comment)?

I have disabled the ESLint and Prettier rules to prevent lint errors, warnings, and formatting. The settings are as follows:
{
  printf_statements = {
    javascript = {
      'console.log("%s"); /* eslint-disable-line no-console, prettier/prettier */'
    },
    typescript = {
      'console.log("%s"); /* eslint-disable-line no-console, prettier/prettier */'
    },
    typescriptreact = {
      'console.log("%s"); /* eslint-disable-line no-console, prettier/prettier */'
    }
  },
  print_var_statements = {
    javascript = {
      'console.log("%s %%s", %s); /* eslint-disable-line no-console, prettier/prettier */'
    },
    typescript = {
      'console.log("%s %%s", %s); /* eslint-disable-line no-console, prettier/prettier */'
    },
    typescriptreact = {
      'console.log("%s %%s", %s); /* eslint-disable-line no-console, prettier/prettier */'
    }
  }
}

I hope this helps. :-)

Not bad! Although this only works if prettier is configured using eslint.

@rafaelderolez  #393 should close this. I tried the approach of searching upwards for the print statement, but the fact that the plugin supports multiple languages, custom print statements and i'ts imposible to know where the formatter may split the lines made this option to complex. Instead I used the comment aproach

@TheLeoP alright cool I'll give it a shot when it's merged! Thanks ✌


Feature Request: neural networks from ScikitLearn

MLJ has most models from ScikitLearn, but I believe it's missing neural networks:
https://scikit-learn.org/stable/modules/neural_networks_supervised.html
It would be really awesome to add these models to MLJ.

Yes this was deliberate laziness from my side due to the fact that these models are not very good but I guess an argument in favour of bringing them in is that a simple MLP can be used at a final stage of a learning network which could be useful.
This would be a reasonably simple PR if you felt up to it since it's pretty much identical to existing code for sklearn models, I'd be happy to help you with it :) otherwise I may do it but probably not soon


Fix 404 handling #65 #57

This PR fixes bug in pypowerwall related to API calls and 404 HTTP status codes handling.
Powerwall Firmware version 23.44.0 has eliminated /api/devices/vitals resulting in a 404 response from the Powerwall Gateway (TEG) when this is requested. There is a bug in the pypowerwall code that will treat this 404 like an authentication failure which will result in attempts to log in over and over, eventually hitting the rate limit. This is especially impactful for those using the proxy for things like Powerwall-Dashboard as the rate limit will prohibit other data gathering.
Related issue: https://github.com/jasonacox/pypowerwall/issues/57
Closes #65

https://pypi.org/project/pypowerwall/0.7.6/
jasonacox/pypowerwall:0.7.6t39


Create h2 section for spaces gpu requirements

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.


Changed behavior with filer-loader between v3 & v4

Describe the bug
The PR #8950 updated the file-loader module to v6.0.0. Starting with v5.0.0 file-loader changed the default to emit an esModule by default (see https://github.com/webpack-contrib/file-loader/releases/tag/v5.0.0). which was not the case in earlier versions. Therefore code relying on the old behavior will no longer work with the newest react-scripts.
Did you try recovering your dependencies?
Dependences are good (fresh project).
Which terms did you search for in User Guide?
n/a
Environment
n/a
Steps to reproduce

Require file which is not handled by any other loader (e.g. const woffFile = require("test.woff");)
In v3.x woffFile will be an url pointing to the file
In v4.x woffFile will be an object with a default property pointing to the file

Expected behavior
I expected to read something about it in the changelog or no changes in the behavior.
Actual behavior
The behavior changed (see 3).
Reproducible demo
n/a

bump


Merge staging to master

I can't see why there are so many changes in this PR. Except for adding .gitattributes, all these changes are already in master.


ci: merge workflows

Ref #54
As a first step towards understanding the differences between workflows, all of them are merged. The three of them are triggered by the same events anyway...

I actually think that https://github.com/SymbiFlow/fasm/pull/64 will probably replace this pull request?

Not as is now, but yes, #64 can easily include this change. The point is not to have multiple workflows with the same events (on field). That's only useful if you/we want independent shields/badges. Otherwise, having them together is easier to navigate.
I subscribed to #64 and I will keep this just as a remainder for myself until that's merged.


[WIP] 13.9 Semantic Segmentation Dataset

Job d2l-zh/PR-878/1 is complete.
Check the results at http://preview.d2l.ai/d2l-zh/PR-878/

Job d2l-zh/PR-878/2 is complete.
Check the results at http://preview.d2l.ai/d2l-zh/PR-878/

Job d2l-zh/PR-878/3 is complete.
Check the results at http://preview.d2l.ai/d2l-zh/PR-878/

Render checked done:

sec_
'numref`
cite

Job d2l-zh/PR-878/4 is complete.
Check the results at http://preview.d2l.ai/d2l-zh/PR-878/

Job d2l-zh/PR-878/5 is complete.
Check the results at http://preview.d2l.ai/d2l-zh/PR-878/

numref fixed, forum links worked


Log History in sidebar

If there is log history in this sidebar it would be very useful
By hovering through branches I can see up to 10 commits, beyond that I'm not able to see the commits

@Vishnu05 Are you still experiencing this issue in GitLens 11?

@eamodio This one is fixed now. It was merged to the normal git plugin. It took a while to understand.
Thanks this is working fine now. I'm closing the issue.
Thanks again for this feature it really helps and amazing who all contributed to this.


Can't reduce the scanning area?

Hello,
I'm using Zxing for a Barcode scanning app and I would like to reduce the scanning area. Because the barcodes my app needs to scan are in a list underneath each other I would like to be able to "aim" where the app is scanning, preferably by adding a little frame where the scan actually happens.
I've tried doing this with the Frame property of the CameraBarcodeReaderView, but this seems to have no effect...
    <zxing:CameraBarcodeReaderView
        x:Name="scanner"
        IsDetecting="True"
        BarcodesDetected="scanner_BarcodesDetected"
        Frame="0, 0, 100, 50">
        <zxing:CameraBarcodeReaderView.Options>
            <zxingoptions:BarcodeReaderOptions AutoRotate="True" TryHarder="True" Formats="Code39"/>
        </zxing:CameraBarcodeReaderView.Options>
    </zxing:CameraBarcodeReaderView>

Am I doing something wrong or is there another way to do this?
Thanks!

I have a similar request, but would also like to report it as an issue. It seems barcodes are read above and below my active camera view, probably because the image is being cropped. I would like to be able to specify the active scanning region.

Are there updates on this?
@HoGDylan Did you find a solution? I'm currently in the same position.


⚠ Samsung has degraded performance

In cdea38b, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2375 ms

Resolved: Samsung performance has improved in a0e973d.


Replace Lokation with Ort

As @Ein-Tim noted in https://github.com/corona-warn-app/cwa-website/pull/1211#discussion_r626730347, "Lokation" sounds odd and is not a good translation for the term "location". Since the app is using "Ort", I'd suggest the FAQ to consistently use this translation too.

@fynngodau @Ein-Tim Thanks!


Postgres search enhancements: part 3

Description
For part 2 refer here
This PR adds a generic template for writing derived field query. This enables us to write create derived field queries from any regular search fields.

Example 1:
To query the count of images grouped by registry, the query would be:
q := search.NewQueryBuilder().
	AddSelectFields(
            *v1.QueryField{
               Field: search.ImageName,
               AggrFunc: "count",
            }
         ).
	AddGroupBy(search.ImageRegistry).ProtoQuery()

and the response struct would be:
type Demo struct {
  ImageCount int `db:"image_count"`
  ImageRegistry string `db:"image_registry"`
}
// where proto tags are essentially the lower case search labels+aggr func w/ underscore for whitespaces.
// ImageName  = newFieldLabel("Image")
// ImageRegistry = newFieldLabel("Image Registry")

and the call would be:
results, err = pkgPG.RunSelectRequestForSchema[Demo](ctx, testDB.Pool, schema.ImagesSchema, q)
// where results is []*Demo

Example 2:
To query the count of images grouped by registry, the query would be:
q := search.NewQueryBuilder().
	AddSelectFields(
            *v1.QueryField{
               Field: search.Severity,
               AggrFunc: "max",
            }
         ).
	AddGroupBy(search.CVE).ProtoQuery()

and the response struct would be:
type Demo struct {
  TopSeverity int `db:"severity_max"`
  CVE string `db:"cve"`
}
// where proto tags are essentially the lower case search labels+aggrfunc w/ underscore for whitespaces.
// CVE = newFieldLabel("CVE")
// Severity  = newFieldLabel("Severity")

and the call would be:
results, err = pkgPG.RunSelectRequestForSchema[Demo](ctx, testDB.Pool, schema.ImageCvesSchema, q)
// where results is []*Demo

Before this, we had to declare derived fields like below, which is hard to maintain and not easy to extend.
NamespaceCount  = newDerivedFieldLabel("Namespace Count", NamespaceID, CountDerivationType)

Checklist

[ ] Investigated and inspected CI test results
[ ] Unit test and regression tests added
~Evaluated and added CHANGELOG entry if required~
~Determined and documented upgrade steps~
~Documented user facing changes~

If any of these don't apply, please comment below.
Testing Performed
Unit

code lgtm, but I think we should add the PR description into a README in the search/postgres directory - with examples on how to use our search framework. Looking at code to figure how to write a query seems 👎

Yes, I plan to write the README on the use once the framework is ready to use, so not quite there yet.


Exit with status code of child process; ensure unmount_proc() always runs

A few minor changes:

Ensure the rust process exits with the exit code of the child process run in the container
Use waitpid to wait for child process exit (necessary to obtain the child's exit code)
Use a destructor to ensure unmount_proc() runs regardless of anything else going wrong (the closest Rust gets to a try/finally block)

Out of curiosity - what does vas-quod mean?

@timboudreau  vas quod equivalents to container in latin.

@timboudreau We also can add this to readme.md meaning of vas-quod wdyt ?

Sure
On Mon, Jul 26, 2021 at 8:08 AM flouthoc @.***> wrote:

@timboudreau https://github.com/timboudreau We also can add this to
readme.md meaning of vas-quod wdyt ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/flouthoc/vas-quod/pull/14#issuecomment-886644702, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAOQE5YKXZCSDOHIR45YFLTTZVF4TANCNFSM5A7LBGMQ
.

--
http://timboudreau.com


how to handle statusCode with JSONHttpClient

I have a remote resource, when the http response is:
statusCode=200 the response data is
{
  "a": "the statusCode 200 string"
}

statusCode=201 the response data is
{
  "b": "the statusCode 201 string"
}

how to handle the statusCode with JSONHttpClient???
can add statusCodeBlock param to handle it in getJSONFromURLWithString?

+(void)getJSONFromURLWithString:(NSString*)urlString params:(NSDictionary*)params completion:(JSONObjectBlock)completeBlock statusCode:(StatusCodeBlock) codeBlock

JSONHttpClient doesn't expose the status code. You should try using a more comprehensive library for the networking part of your code - e.g. NSURLSession or AFNetworking.


Requests and Responses should use DateTimeOffset instead of DateTime

:+1:

We discussed this change for 5.0. Whilst the change is straightforward, we would want to fully understand the ramifications of making it. It makes sense to target this at the next major version, 6.0.

This looks to have been largely implemented in the current 7.x client and will continue to be the case in 8.x through code gen.


[FLINK-32516][table] Support to parse [CREATE OR ] REPLACE TABLE AS statement

What is the purpose of the change
Introduce [CREATE OR] REPLACE TABLE AS syntax for Flink
Brief change log
Modify syntax definition files and tests
Verifying this change
add test in FlinkSqlParserImplTest.java
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
The serializers: (no)
The runtime per-record code paths (performance sensitive): (no)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
The S3 file system connector: (no)

Documentation

Does this pull request introduce a new feature? (yes)
If yes, how is the feature documented? (JavaDocs)

@Tartarus0zm Thanks for the pr. I left some comments. PTAL

@luoyuxia  thanks for your review! I have fixed your comments. PTAL

@Tartarus0zm Thanks for updating. I left minor comment about the typo. PTAL

@luoyuxia  I have fix the typo, PTAL

@Tartarus0zm Thanks for updating. LGTM. Please ping me after test passes.

@luoyuxia  Thanks for your review! the test has passed!


How to generate a certificate containing an X.400 address as a CRL distribution point To test CVE-2023-0286

Hi, I want to test CVE-2023-0286, But can not get a certificate containing an X.400 address as a CRL distribution point. I tried to use the openssl command line, but it failed, Is OpenSSL not supported?

marking as inactive, will be closed at the completion of 3.4 dev without further input


ActionResult controller method example

How do I test a controller method returning ActionResult<T> or Task<ActionResult<T>> in 2.1?
Thanks

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

ID: b5cce372-24e2-3489-cb19-c85d934e5d3b
Version Independent ID: 9d12b19f-a94e-4df4-357b-3f3b93696eb6
Content: Test controller logic in ASP.NET Core
Content Source: aspnetcore/mvc/controllers/testing.md
Product: aspnet-core
GitHub Login: @ardalis
Microsoft Alias: riande

@guardrex The sample you provided above reflects what I would've recommended.

Ty @scottaddie I'll get something along those lines surfaced when I perform the sample upgrade on #5495.

Thank you both. Might be worth adding an example unit test for a failure case e.g. BadRequestResult too.

@mberginbh As far as I can tell, a BadRequestResult won't be returned ... the ActionResult<T> resolves to NotFoundObjectResult when the controller is executed and returns a NotFound on whatever non-existent ID is given to it. What we'll do is have the engineers (who really know how to write software :smile:) tell me if the test I'm setting up is sane.
Regarding the Task<ActionResult<T>> test, which was your original suggestion :point_up:, that seems fine the way I have it set up. I think the engineers will be ok with it, but we'll find out soon enough.
I'll have this PR submitted soon ... I still need to update the topic text for the action and tests and make sure the 2.1 updates are all good. I'll ping u on the PR.

Do unit tests really change that much when using
ActionResult<T>

instead of
IActionResult

?
Doesn't
// Assert
var redirectToActionResult = Assert.IsType<RedirectToActionResult>(result);
Assert.Null(redirectToActionResult.ControllerName);
Assert.Equal("Index", redirectToActionResult.ActionName);

just become
var redirectToActionResult = Assert.IsType<RedirectToActionResult>(result.Result);
Assert.Null(redirectToActionResult.ControllerName);
Assert.Equal("Index", redirectToActionResult.ActionName);

?
Or am i doing ith wrong?

@pascalpfeil
Those would be fine for integration tests. This topic focuses on unit tests. In a unit test, I'd like to confirm the following ...

Is the return type an ActionResult?
Is the ActionResult's value the correct type?
Is the first value of that returned object the correct?

... then when the ActionResult comes back with no objects, I want to know ...

(Same as before ...) Is the return type an ActionResult?
Is the ActionResult a NotFoundObjectResult?

Take a look at the tests I did for the PR: https://github.com/aspnet/Docs/blob/74ba2ecf00796a1ac7589320a8fc5ddf1e053308/aspnetcore/mvc/controllers/testing/sample/TestingControllersSample/tests/TestingControllersSample.Tests/UnitTests/ApiIdeasControllerTests.cs#L134-L170

@guardrex thank you for your response. That cleared things up.
But how would i test the following code?
public async Task<ActionResult<Entity>> PostEntity(/* ... */)
{
    if (!ModelState.IsValid)
        return BadRequest(ModelState);
    try
    {
        var entity = await _repo.CreateEntity(/* ... */);
        return CreatedAtAction("GetEntity", new { id = entity.Id }, entity);
    }
    /* ... */
}

My Test with Microsoft.VisualStudio.TestTools.UnitTesting looks something like this:
[TestMethod]
public async Task TestPostEntity_OK()
{
    //Arrange
    var entity= new Entity { /* ... */ };
    mockRepo.Setup(repo=> repo.CreateEntity(/* ...*/)).Returns(Task.FromResult(entity));

    //Act
    var result = await sutController.PostEntity(/* ...*/);

    //Assert
    //This works
    Assert.IsInstanceOfType(result, typeof(ActionResult<Entity>));

    //This fails, entity is null
    Assert.AreEqual(entity, result.Value);
}

As you can see, the result.Value property stays null, while your actionResult.Value in line 148 is populated.

Not sure ... what is result.Result when result.Value is null?

It is a CreatedAtActionResult whose object Value property is entity. This must be because i do return CreatedAtAction(/* ... */) instead of return entity, right? Whats the right way to unit test this?

I understand you want to return a 201 with your POST. A CreatedAtActionResult is something that we may need to add to the examples. Thus far, the example just returns a list of IdeoDTO objects ...
public async Task<ActionResult<List<IdeaDTO>>> ForSessionActionResult(int sessionId)
{
    var session = await _sessionRepository.GetByIdAsync(sessionId);

    if (session == null)
    {
        return NotFound(sessionId);
    }

    var result = session.Ideas.Select(idea => new IdeaDTO()
    {
        Id = idea.Id,
        Name = idea.Name,
        Description = idea.Description,
        DateCreated = idea.DateCreated
    }).ToList();

    return result;
}

I need to step out for a couple of hours, but I'll be back later today. I'll see what I can do with the sample app (and PR) and then report back to you. I'm new to ActionResult<T> and testing ActionResult<T> myself, so I'll need to work through it and see what's what. I'll get back to you in a couple of hours.

Thank you very much for your time!

@pascalpfeil I think this worked out fairly well so far. I created a method to receive a POST, lookup a session, add a new idea to it, and then return the session. It's nearly a copy of the existing method (Create) that was already in the topic sample ...
[HttpPost("createactionresult")]
[ProducesResponseType(201)]
public async Task<ActionResult<BrainstormSession>> CreateActionResult([FromBody]NewIdeaModel model)
{
    if (!ModelState.IsValid)
    {
        return BadRequest(ModelState);
    }

    var session = await _sessionRepository.GetByIdAsync(model.SessionId);
    if (session == null)
    {
        return NotFound(model.SessionId);
    }

    var idea = new Idea()
    {
        DateCreated = DateTimeOffset.Now,
        Description = model.Description,
        Name = model.Name
    };
    session.AddIdea(idea);

    await _sessionRepository.UpdateAsync(session);

    return session;
}

Then, I based three tests on it ...
[Fact]
public async Task CreateActionResult_ReturnsNewlyCreatedIdeaForSession()
{
    // Arrange
    int testSessionId = 123;
    string testName = "test name";
    string testDescription = "test description";
    var testSession = GetTestSession();
    var mockRepo = new Mock<IBrainstormSessionRepository>();
    mockRepo.Setup(repo => repo.GetByIdAsync(testSessionId))
        .Returns(Task.FromResult(testSession));
    var controller = new IdeasController(mockRepo.Object);

    var newIdea = new NewIdeaModel()
    {
        Description = testDescription,
        Name = testName,
        SessionId = testSessionId
    };
    mockRepo.Setup(repo => repo.UpdateAsync(testSession))
        .Returns(Task.CompletedTask)
        .Verifiable();

    // Act
    var result = await controller.CreateActionResult(newIdea);

    // Assert
    var actionResult = Assert.IsType<ActionResult<BrainstormSession>>(result);
    var returnValue = Assert.IsType<BrainstormSession>(actionResult.Value);
    mockRepo.Verify();
    Assert.Equal(2, returnValue.Ideas.Count());
    Assert.Equal(testName, returnValue.Ideas.LastOrDefault().Name);
    Assert.Equal(testDescription, returnValue.Ideas.LastOrDefault().Description);
}

[Fact]
public async Task CreateActionResult_ReturnsNotFoundObjectResultForNonexistentSession()
{
    // Arrange
    var nonExistentSessionId = 999;
    string testName = "test name";
    string testDescription = "test description";
    var mockRepo = new Mock<IBrainstormSessionRepository>();
    var controller = new IdeasController(mockRepo.Object);

    var newIdea = new NewIdeaModel()
    {
        Description = testDescription,
        Name = testName,
        SessionId = nonExistentSessionId
    };

    // Act
    var result = await controller.CreateActionResult(newIdea);

    // Assert
    var actionResult = Assert.IsType<ActionResult<BrainstormSession>>(result);
    Assert.IsType<NotFoundObjectResult>(actionResult.Result);
}

[Fact]
public async Task CreateActionResult_ReturnsBadRequest_GivenInvalidModel()
{
    // Arrange & Act
    var mockRepo = new Mock<IBrainstormSessionRepository>();
    var controller = new IdeasController(mockRepo.Object);
    controller.ModelState.AddModelError("error", "some error");

    // Act
    var result = await controller.CreateActionResult(model: null);

    // Assert
    var actionResult = Assert.IsType<ActionResult<BrainstormSession>>(result);
    Assert.IsType<BadRequestObjectResult>(actionResult.Result);
}

... and those tests pass.
Before going any further and adding text to the topic in the PR, I'd like to wait until @scottaddie gets back (he's OOF for a bit) so that we can discuss further the 200/201/400 situation.
I added the ProducesResponseType decorations ...
[ProducesResponseType(200)]

... and ...
[ProducesResponseType(201)]

The question is are those obtainable in the tests when the methods fully execute and return a valid result?
The ActionResult<T>.Result only appears to receive a value when the method returns a non-200/201.
The tests with the failure assertions get the right types checked with ...
Assert.IsType<NotFoundObjectResult>(actionResult.Result);

... and ...
Assert.IsType<BadRequestObjectResult>(actionResult.Result);

... but I am unclear on when ActionResult<T>.Value receives a value and the result is a 200/201 how to test for a 200/201 status code (i.e., ControllerBase.Ok).

I don't think
[HttpPost("createactionresult")]
[ProducesResponseType(201)]
public async Task<ActionResult<BrainstormSession>> CreateActionResult([FromBody]NewIdeaModel model)
{
    /* ... */
    return session;
}

will actually return 201 but will return 200.
As shown here you'd have to return CreatedAtAction(/* ... */) to get a 201. Or am i wrong?

Yes, I copied the original test too closely. I'll mirror the one for async ActionResult<T> that Scott placed here ...
https://docs.microsoft.com/aspnet/core/web-api/action-return-types#asynchronous-action-1

CreatedAtAction did produce the desired ActionResult<T>.Result of CreatedAtActionResult and ...
Assert.IsType<CreatedAtActionResult>(actionResult.Result);

... passes. However, now ActionResult<T>.Value is null. Again, .Value and .Result never seem to be populated simultaneously.

@guardrex
Yes, this is what i oberserved, too. So in unit tests, you would just check the CreatedAtActionResult.Value property, right?

Yes! Now, we're cook'in. This works ...
// Assert
var actionResult = Assert.IsType<ActionResult<BrainstormSession>>(result);
var createdAtActionResult = Assert.IsType<CreatedAtActionResult>(actionResult.Result);
var returnValue = Assert.IsType<BrainstormSession>(createdAtActionResult.Value);
mockRepo.Verify();
Assert.Equal(2, returnValue.Ideas.Count());
Assert.Equal(testName, returnValue.Ideas.LastOrDefault().Name);
Assert.Equal(testDescription, returnValue.Ideas.LastOrDefault().Description);

... and now, I can set the other response types on the method ...
[ProducesResponseType(400)]
[ProducesResponseType(404)]

... and check for the status codes. For example for Not Found ...
// Assert
var actionResult = Assert.IsType<ActionResult<List<IdeaDTO>>>(result);
var createdAtActionResult = Assert.IsType<NotFoundObjectResult>(actionResult.Result);
Assert.Equal(404, createdAtActionResult.StatusCode);

"I love it when a plan comes together!" - John "Hannibal" Smith (George Peppard), The A-Team, ©1983-87 Universal Television Stephen J. Cannell

Shouldn't it be
// Assert
var actionResult = Assert.IsType<ActionResult<List<IdeaDTO>>>(result);
var notFoundObjectResult= Assert.IsType<NotFoundObjectResult>(actionResult.Result);
Assert.Equal(404, notFoundObjectResult.StatusCode);

?
And aren't those two lines redundant?
var createdAtActionResult = Assert.IsType<NotFoundObjectResult>(actionResult.Result);
Assert.Equal(404, createdAtActionResult.StatusCode);

Also nice meme :ok_hand:

aren't those two lines redundant?

Probably ... I just wanted to see the status code. There are two approaches, and the first one I had is better (shorter) ...
Assert.IsType<NotFoundObjectResult>(actionResult.Result);

I note that I didn't have to have the ProducesResponseTypes to get those to pass either. Anyway, I'll leave the ProducesResponseTypes on the method.

Still wish I could get an OkObjectResult out of the return ...
// Assert
var actionResult = Assert.IsType<ActionResult<List<IdeaDTO>>>(result);

Assert.IsType<OkObjectResult>(actionResult.Result);

var returnValue = Assert.IsType<List<IdeaDTO>>(actionResult.Value);
var idea = returnValue.FirstOrDefault();
Assert.Equal("One", idea.Name);

ActonResult<T>.Result is null, so that doesn't work.

Yes! Now, we're cook'in. This works ...
// Assert
var actionResult = Assert.IsType<ActionResult<BrainstormSession>>(result);
var createdAtActionResult = Assert.IsType<CreatedAtActionResult>(actionResult.Result);
var returnValue = Assert.IsType<BrainstormSession>(createdAtActionResult.Value);
mockRepo.Verify();
Assert.Equal(2, returnValue.Ideas.Count());
Assert.Equal(testName, returnValue.Ideas.LastOrDefault().Name);
Assert.Equal(testDescription, returnValue.Ideas.LastOrDefault().Description);

@guardrex your solution just saved me from hours of struggle. Thanks :)

Still wish I could get an OkObjectResult out of the return ...
// Assert
var actionResult = Assert.IsType<ActionResult<List<IdeaDTO>>>(result);

Assert.IsType<OkObjectResult>(actionResult.Result);

var returnValue = Assert.IsType<List<IdeaDTO>>(actionResult.Value);
var idea = returnValue.FirstOrDefault();
Assert.Equal("One", idea.Name);

ActonResult<T>.Result is null, so that doesn't work.
[EDIT] Just tacking on to the discussion here that the engineer said that OkObjectResult can't be tested under this scenario where the method succeeds and returns the list. In this case, we'll just check the type and a test item. If the test succeeds, we assume a 200 Ok is the HTTP response.

I was able to gain access to the OkObjectResult.Value in .NET Core 2.2 using xUnit. Not sure which testing framework you are using or if that matters here. Anyways, I was having trouble accessing the returned IEnumerable<T> until I set var okObjectResult = Assert.IsType<OkObjectResult>(...).
The below is an example of a working test that accesses the value of the OkObjectResult:
// Arrange
var controller = new AircraftStatusController(_context);

// Act
var actionResult = await controller.GetAircraftStatuses();

// Assert
Assert.IsType<ActionResult<IEnumerable<ObstAircraftStatus>>>(actionResult);
var okObjectResult = Assert.IsType<OkObjectResult>(actionResult.Result);
var returnValue = Assert.IsAssignableFrom<IEnumerable<ObstAircraftStatus>>(okObjectResult.Value).ToList();
Assert.NotEmpty(returnValue);

// Included this for fun...
Assert.True(returnValue.Count == _context.ObstAircraftStatus.ToList().Count);

I found some tests I wrote in a .NET Core 1.1 project that also make use of the OkObjectResult.Value. Dont judge, it was early in my testing education :)
Other example of accessing this value:
// Arrange
var controller = _fixture.GetAircraftController(true);

// Act
var objectResult = controller.GetAll().Result as OkObjectResult;
var enumerable = objectResult?.Value as IEnumerable<SharedModels.Aircraft>;
var result = enumerable?.ToList();

// Assert
Assert.NotNull(result);
Assert.True(_fixture.AircraftCdi.Any());
Assert.True(result.Count == _fixture.Aircraft.Count);

The next extension method handle both Result and Value and return the typed object T
public static T GetObjectResult<T>(this ActionResult<T> result)
        {
            if (result.Result != null)
                return (T)((ObjectResult)result.Result).Value;
            return result.Value;
        }

see my answer on SO

The next extension method handle both Result and Value and return the typed object T
public static T GetObjectResult<T>(this ActionResult<T> result)
        {
            if (result.Result != null)
                return (T)((ObjectResult)result.Result).Value;
            return result.Value;
        }

see my answer on SO


mise: 2024.9.0 -> 2024.9.2

Description of changes

https://github.com/jdx/mise/releases/tag/v2024.9.2
https://github.com/jdx/mise/releases/tag/v2024.9.1

Things done

Built on platform(s)

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

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

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

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

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

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

FYI @Hentioe this is ok, but the updates are also performed by a Bot automatically.
I believe it runs once per week or once every two weeks. So unless it's important to update fast, there's no need for manual PRs.
See https://github.com/NixOS/nixpkgs/pull/338897 for example.

Tests fail on darwin, but at first glance, those look like real upstream problems with those tests which assume some unix stuff to default to linux?
failures:
---- tera::tests::test_render_with_custom_function_invocation_directory stdout ----
"/private/tmp"
thread 'tera::tests::test_render_with_custom_function_invocation_directory' panicked at src/tera.rs:287:9:
assertion `left == right` failed
  left: "/tmp"
 right: "/private/tmp"
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- tera::tests::test_render_with_custom_function_os_family_unix stdout ----
thread 'tera::tests::test_render_with_custom_function_os_family_unix' panicked at src/tera.rs:260:9:
assertion `left == right` failed
  left: "Linux"
 right: "Darwin"

Also seems like https://github.com/jdx/mise/pull/2569 can fix this problem.

It looks like it is, so let's wait for the version released after that PR is merged.

I believe it runs once per week or once every two weeks. So unless it's important to update fast, there's no need for manual PRs.

Thank you for the reminder. I wasn't familiar with this bot before. If I find any changes that must be manually modified, I'll try to open a PR.


*cumulus/xcm integration

Hey @okalenyk, it looks like we are getting a build error on this.

Closing this one in favor of PR #106


NR-178933 Network Ktranslate Health - Remove

Ticket: https://new-relic.atlassian.net/browse/NR-178933
quickstart: https://newrelic.com/instant-observability/network-ktranslate-health
Summary
A concise description of the changes being introduced. Please review the pre-merge checklist section to validate this pull request is ready for review and merge. If it is not ready, please mark the pull request as a draft.
The owners of this repo are not experts in the subject matter of the quickstarts. We review for the quickstart to be functional and for security risks. If you are seeking feedback on the content of the quickstart, please seek out a subject matter expert. If you are not an internal NR contributor, we can do our best to connect you with a content reviewer.

Pre merge checklist

[ ] Did you check you NRQL syntax? - Does it work?
[ ] Did you include a Data source and Documentation reference?
[ ] Are all documentation links publicly accessible?
[ ] Did you check your descriptive content for voice and tone?
[ ] Did you check your descriptive content for spelling and grammar errors?
[ ] Did you review your content with a subject matter expert? (e.g. a Browser agent quickstart is reviewed with a member of the Browser Agent team)

Dashboards

[ ] Does the PR contain a screenshot for each of your dashboards?
[ ] Do your screenshots show data?
[ ] Has the sanitization script been run on each dashboard?

Alerts

[ ] Did you check that your alerts actually work?

not stale


Add tool to format with pretty-please

Motivation and Context
This PR adds a tool that formats a cargo workspace using the dtolnay/prettyplease library to replace rustfmt since rustfmt fails to format most of our generated code now.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Looks like prettyplease has a bug that the SDK triggers:
    Checking aws-sdk-transcribestreaming v0.0.0-local (/home/build/workspace/smithy-rs/aws/sdk/build/aws-sdk/sdk/transcribestreaming)
error: unnecessary trailing semicolon
  --> /home/build/workspace/smithy-rs/aws/sdk/build/aws-sdk/sdk/transcribestreaming/src/event_stream_serde.rs:17:9
   |
17 |         ; Ok(::aws_smithy_eventstream::frame::Message::new_from_parts(headers, payload))
   |         ^ help: remove this semicolon
   |
   = note: `-D redundant-semicolons` implied by `-D warnings`

I removed the cargo metadata workspace resolution from the tool since that was what was causing it to fail for the SDK (since it runs before the SDK copies over the runtime crates, and thus, the runtime crates don't exist when resolving the Cargo.toml files with cargo metadata). Now it just recursively formats all Rust files in a given directory.

Judging from the codegen diff, prettyplease removes all non-doc comments. Not sure if this will work for us.

Prettyplease doesn't preserve comments and the maintainer doesn't want to support that, so it's not a viable option for smithy-rs.


Fix NetlifyCMS after removing trailing slashes

When there is trailingSlash: false in the next.config.js, the framework always redirect to the route without slash. Hence, the URL under /public/edit/* is not resolved.
This changes the NetlifyCMS deployment to resolve the config.yml always from the specific location and moves /public/edit/index.html to bare /public/edit.html preventing the confusion with the trailing slash redirect.

@vv2529 this slightly updates the .gitignore. If you have /public/edit directory in your working copy, it might leak to commit. Be aware of it.

This is tested and should work. I updated the Jenkins configuration accordingly. CMS should work at core.ac.uk/edit


SUBMARINE-810. Avoid duplicated icon of MLflow with Tensorboard

What is this PR for?
Minor change.
The MLflow icon is the same as the tensorboard's.
It might be confusing for the users, so we should replace it with a new one.
What type of PR is it?
[Improvement]
Todos

[ ] - Task

What is the Jira issue?
https://issues.apache.org/jira/projects/SUBMARINE/issues/SUBMARINE-810
Screenshots (if appropriate)

Questions:

Do the license files need updating? No
Are there breaking changes for older versions? No
Does this need new documentation? No

LGTM. Thanks @ByronHsu your contribution.


Add an interface about the window.resize event

if you resize the window, the grid-layout already added a listener on it, it's ok.
but, when the display style of the another container(another grid-layout) is none, you resize the window, it's out of work, then the grid-layout will stay in left side(maybe it's in default status).
so if you can provide the interface, we can resolve it easily.
now. we just can use it like this.
this.$refs.gird-layout.onWindowResize()
you know, it's not always safe.

Sorry, can't understand your problem

ok, maybe a demo?
just, we need a way to resize the layout even though the window resize event is not triggered.

Please submit a demo


Peer Review

Is there an informative README and how could it be improved?

The README file in this project is seems clear and well done, have including great structured for readers.

Are the file names and variable names consistent, informative, and meaningful?

Yes, the variable names in this project are consistent, informative and meaningful, those are easily to let reader knows what is going on.

Do the comments allow you to understand why something is being done?

Absolutely, the comments are allow me to understand something has being done.

Are the tests both appropriate and sufficient? Are there edge cases or corner solutions that are not considered? Similarly, are there unnecessary tests that could be removed?

it seems that the tests part are not upload yet.

Are there magic numbers that could be changed to variables and explained?

There's no magic numbers including.

Is there duplicated code that could be changed?

There is no duplicated code that happened in this project.

Are there any outstanding warnings that should be addressed?

This project seems fine, no outstanding warning that should be addressed.

Are there any especially large functions or pipes that could be separated into smaller ones?

No, the coding section seems fine and clear, no large functions or pipes that could be separated into smaller ones.

Is the structure of the project appropriate?

Yes, the project structure is well done and appropriate!

Thanks for your suggestions and feedback, we have addressed the issues.


Api Controller methods and testing implementation

All api controllers are made and have methods implemented.Unit tests were made for all api controllers with all tests passing. Please check the api controller methods to see if I am missing any checks for null values and if other checks are needed.
fixes #15

So there are test failures but appveyor didn't see the failure? Looking into it.

@nchurchill When you have a sec can we get a third pair of eyes on this since the changeset is so big? Thanks!


Ability to mask CVC number

It would be nice if the library could mask the CVC (CVV) number the same way it can mask the card number.
I am assuming this is not already a feature after looking through the code and trying out a few different ways of specifying the CVC number in the masks configuration.
Perhaps something like
....

masks: {
  cardNumber: '•', // optional - mask card number
  cvcNumber: '•'
}

....

Were you able to find a workaround? One of the payment gateways is getting picky about displaying the cvv in the screen which in actuality make a little sense since it's like your credit card's password...

No workaround?

Not currently we we accept PR's


Synchronizing multiple RTSP camera streams

Hi.
First of all, thank you so much for this kind of great tool for real-time data streaming in python.
I will apologize and reopen the issue in another repo if it will be revealed that it's not related to valkka-multiprocess.
I tried valkka-core with 10 cameras with hardware accelerated setup and that was more than what I need. FPS is >= 20.
Now, I got stuck synchronization. I need to collect every coming frame from all cameras and save into Redis array in the following format:
{
  "cam1": "path/to/cam1/frame1.jpg",
  "cam2": "path/to/cam1/frame1.jpg",
  ...
  ...
  "cam10": "path/to/cam10/frame1.jpg"
}

Here is my code:
Server
class LiveStream:
	def __init__(self, shmem_buffers, shmem_name, address, slot, width, height):
		self.shmem_buffers = shmem_buffers
		self.shmem_name = shmem_name
		self.address = f"rtsp://{USER}:{PASSWORD}@{address}:554"
		self.slot = slot

		# RBGShmem Filter
		self.shmem_filter = RGBShmemFrameFilter(self.shmem_name, shmem_buffers, width, height)
		# self.shmem_filter = BriefInfoFrameFilter(self.shmem_name)  # For Debugging

		# SWS Filter
		self.sws_filter = SwScaleFrameFilter(f"sws_{self.shmem_name}", width, height, self.shmem_filter)
		# self.interval_filter = TimeIntervalFrameFilter("interval_filter", 0, self.sws_filter)

		# decoding part
		self.avthread = AVThread("avthread", self.sws_filter)
		self.av_in_filter = self.avthread.getFrameFilter()

		# define connection to camera
		self.ctx = LiveConnectionContext(LiveConnectionType_rtsp, self.address, self.slot, self.av_in_filter)

		self.avthread.startCall()
		self.avthread.decodingOnCall()

	def close(self):
		self.avthread.decodingOffCall()
		self.avthread.stopCall()

def start_valkka(camera_indexes, shmem_buffers, width, height, shmem_names=[], prod=False):
	livestreams = {}

	# Defining livethread
	livethread = LiveThread("livethread")

	# Defining filter
	shmem_filters = {}
	sws_filters = {}
	for i, cam in enumerate(camera_indexes, start=1):
		livestreams[i] = LiveStream(
			shmem_buffers=shmem_buffers,
			shmem_name=f"{cam}",
			address=cam,
			slot=i,
			width=width,
			height=height
		)

	# Start livethread
	livethread.startCall()

	# Register context to livethread
	for livestream in livestreams.values():
		livethread.registerStreamCall(livestream.ctx)
		livethread.playStreamCall(livestream.ctx)
		shmem_names.append(livestream.shmem_name)

	if prod:
		while True:
			continue
	else:
		time.sleep(30)

	for livestream in livestreams.values():
		livestream.close()
	livethread.stopCall()
	print("Bye")
	return True

Client
import threading
import json
import cv2
import redis
from termcolor import colored
from valkka.api2 import ShmemRGBClient

from config import get_configs

conf = get_configs()
FRAMES_SAVE_TO = conf.get("frames_path")
REDIS_HOST = conf.get("redis")["host"]
REDIS_PORT = conf.get("redis")["port"]
REDIS_DB = conf.get("redis")["db"]

def save_frame(shmem_name, shmem_buffers, width, height, mstimeout):
	client = ShmemRGBClient(
		name=shmem_name,
		n_ringbuffer=shmem_buffers,
		width=width,
		height=height,
		mstimeout=mstimeout,
		verbose=False
	)
	lock = threading.Lock()
	while True:
		index, meta = client.pullFrame()
		if index is None:
			print(colored("No frame...", "red"))
			continue
		data = client.shmem_list[index][0:meta.size]
		img = data.reshape((meta.height, meta.width, 3))
		img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)
		image = FRAMES_SAVE_TO + f"{shmem_name}/{meta.mstimestamp}.jpg"
		# lock.acquire()
		# push2redis(shmem_name, image)
		# lock.release()
		cv2.imwrite(image, img)

		# img = imutils.resize(img, 640, 360)
		# cv2.imshow(shmem_name, img)
		# cv2.waitKey(1)

Main
import threading
import time
from config import get_configs
from client import save_frame

from server import start_valkka

# Load config
conf = get_configs()
camera_indexes = conf.get("cameras", [0])
width = conf.get("image_width", 1920)
height = conf.get("image_height", 1080)
shmem_buffers = conf.get("shared_memory_buffers", 10)
mstimeout = conf.get("mstimeout", 10)

shmem_names = []
client_threads = []

if __name__ == '__main__':
	# Start server thread
	print("Starting Camera...")
	server_thread = threading.Thread(target=start_valkka, args=(camera_indexes, shmem_buffers, width, height, shmem_names, False))
	server_thread.start()
	time.sleep(3)
	print(f"Total shmem: {len(shmem_names)}")

	# Start client thread
	for shmem_name in shmem_names:
		thread = threading.Thread(target=save_frame, args=(shmem_name, shmem_buffers, width, height, mstimeout))
		client_threads.append(thread)
		thread.start()

	time.sleep(60)

	server_thread.join()
	for thread in client_threads:
		thread.join()

Actually, threading.Lock() is working, but performance is not what we need: almost 15fps. At least 20FPS needed for image analysis model.
What I tried:

integrating existing code to valkka-multiprocess by the examples given in the tutorials.

And I got what is "the other side" approach (as you described it with Stranger Things😉). However, I cannot find out how to setup multiple cameras streaming and synchronizing them.
Specifically, self.eg = EventGroup(10) this line in the 2nd tutorial.
I want to realize:

MyProcess can/should be started multiple times as I did in the existing code or somehow multiple threads can/should be handled inside this process.
how EventGroup related to multiple cameras(if it really does)

Thanks for any kind of answers/suggestions beforehand.

What I need to reach is making exact same frames saved into storage:
{
  "cam1": "path/to/cam1/frame1.jpg",
  "cam2": "path/to/cam1/frame1.jpg",
  ...
  ...
  "cam10": "path/to/cam10/frame1.jpg"
}

to be saved in the Redis as well.

The problems
First of all, please do not use (multi)threading, but multiprocessing instead.
When the python core team gets rid of the GIL (going to happen soon), I'll rethink the API a bit,
but it will be very similar to what we have now with multiprocessing.
Then you are doing this:
server_thread = threading.Thread(target=start_valkka, args=(camera_indexes, shmem_buffers, width, height, shmem_names, False))

Exactly what I am ranting about in here:

When building a serious application, you should never do this:
p = Process(target=foo)

You're doing just that, but just with the Threading (multithreading) API, instead of Process (multiprocessing) API. :)
Then one problem is, that we probably want a single multiprocess listening to several cameras at the same time.  For this we need the unix event file descriptors.
Let's see what we can do.
The fix
First of all, here is a proper multiprocessing class named RGB24Process for you, sir:
https://github.com/elsampsa/valkka-streamer/blob/main/valkka/streamer/multiprocess/rgb.py
With that one you are able to listen to various RGB24 libValkka bitmap servers simultaneously (or just one if you fancy that).
Let's suppose you will subclass that into MyProcess(RGB24Process).
Next I will sketch your code again for you, keeping in mind the following guidelines:

import all necessary libraries, however, not tensorflow, pytorch, redis? etc. that might use multithreading under-the-hood
create interprocess intercom primitives (the event file descriptors mentioned earlier)
fork (=create multiprocesses): instantiate and run MyProcess.
import libraries that use multithreading in the preRun__() method of MyProcess

Here we go:
import etc # be careful not to import libraries that start threads
from valkka.multiprocess.sync import EventGroup
from valkka.core import EventFd
event_fd_group_1 = EventGroup(100, EventFd) # unix file descriptors to sync between SHMEM SERVER and CLIENT

class MyProcess(RGB24Process):

    def preRun__(self):
        super().preRun__()
        # import libraries that use multithreading
        # create instances from those libraries
        self.redis_instance = etc

    def handleFrame__(self, frame, meta):
        self.logger.debug("handleFrame__ : rgb client got frame % from slot %s", frame.shape, meta.slot)
        """metadata has the following members:
        size
        width
        height
        slot
        mstimestamp
        """
        # NOTE: slot numnber identifies uniquely the camera
        # here you would do your redis stuff

    ...

...

class LiveStream:
	def __init__(self, shmem_buffers, shmem_name, address, slot, width, height):
		self.shmem_buffers = shmem_buffers
		self.shmem_name = shmem_name
		self.address = f"rtsp://{USER}:{PASSWORD}@{address}:554"
		self.slot = slot

        # reserve a unix event fd file descriptor for synchronization
        _, self.event = event_fd_group_1.reserve()
		# RBGShmem Filter
		self.shmem_filter = RGBShmemFrameFilter(self.shmem_name, shmem_buffers, width, height)
		# self.shmem_filter = BriefInfoFrameFilter(self.shmem_name)  # For Debugging
        self.shmem_filter.useFd(self.event)
        ...
        # TODO: rest is identical to your code

    def close(self):
		self.avthread.decodingOffCall()
		self.avthread.stopCall()
        self.event.release() # release the unix event file descriptor

# multiprocesses are started before anything else!
p = MyProcess()
p.start()
...

# from your code:
for i, cam in enumerate(camera_indexes, start=1):
    livestreams[i] = LiveStream( # NOTE: CREATES THE SHMEM SERVER
        shmem_buffers=shmem_buffers,
        shmem_name=f"{cam}",
        address=cam,
        slot=i,
        width=width,
        height=height
    )

# Start livethread
livethread.startCall()

# Register context to livethread
for livestream in livestreams.values():
    livethread.registerStreamCall(livestream.ctx)
    livethread.playStreamCall(livestream.ctx)
    shmem_names.append(livestream.shmem_name)
    # THIS CALL CREATES THE SHMEM CLIENT:
    p.activateRGB24Client(name = livestream.shmem_name,
            n_ringbuffer = # TODO
            width = # TODO
            height = # TODO # you need to match these vcalues to the SHMEM SERVER values
            # unix event fd sync primitive must match at SERVER and CLIENT sides:
            ipc_index = event_fd_group_1.asIndex(livestream.event)
        )
    ...

...

time.sleep(3600) # run for one hour?
p.stop()

That is not the most cleanest implementation thought.  I recommend checking out this repo: https://github.com/elsampsa/valkka-streamer/tree/main
There you have also all kinds of multiprocessing topologies: you can even have a common "master" process that receives
frames from individual "client" processes. (**)
Can it work?
So you are encoding images at 10*20fps = 200 fps rate at jpeg (!).  Well, your going to have yourself
a bottleneck there. Not sure how many milliseconds it takes per image, but..
Not a redis expert, but if it can store 200 jpegs per second - whoa.  Well, it's an in-mem database, but your
ram will blow up pretty fast.
For the jpeg-encoding bottleneck I'd recommend using just one client process/jpeg encoder per stream and then
those clients can push their serialized (byte) data to the master process that then handles redis?
And then there is question why on earth you want to dump that many images to redis anyway?  Wouldnt
it make more sense to analyze the stuff in your multiprocesses and then just dump the (textual) results to your database.
And if you have a sensible working solution demo, please share it in your github account :)

Hi.
Thank you for your (noticeably) fast response.
Firstly, you probably misunderstand me and I'm not saving frames into Redis as you mentioned, but JPG file to memory and path to it into Redis.
Honestly, I'm a newbie for this kind of multiprocessing and multihreading stuff, so It is turning out to be trickier than I realized to me. So, excuse me for any kind of misunderstanding and please help me to use the lib properly, since my entire work strictly dependent on the performance that this lib is going to give.
I tried to write code by your suggestion:
import time

from basic.skeleton.multiprocess.rgb import RGB24Process, safe_select
from basic.skeleton.singleton import event_fd_group_1

class MyProcess(RGB24Process):

	def preRun__(self):
		super().preRun__()
		from redis import Redis
		self.redis_instance = Redis(host="localhost", port=6379, db=1)

	def readPipes__(self, timeout):
		rlis = [self.back_pipe]
		# self.back_pipe is the intercom pipe with the main python process
		# listen to all rgb frame sources
		frame_fds = list(self.client_by_fd.keys())
		rlis += frame_fds

		rs, ws, es = safe_select(rlis, [], [], timeout=timeout)
		print("RS:          ", rs)
		print("FRAME_FDS:   ", frame_fds)

		for fd in rs:
			if fd == self.back_pipe:
				self.handleBackPipe__(self.back_pipe)
			# There is no same item in frame_fds and rs arrays
			if fd in frame_fds:
				client = self.client_by_fd[fd]
				index, meta = client.pullFrame()
				if (index == None):
					print("RGB24Process: handleFrame__ : weird.. rgb client got none")
				else:
					print("Not coming to here")
					data = client.shmem_list[index][0:meta.size]
					data = data.reshape((meta.height, meta.width, 3))
					self.handleFrame__(data, meta)

	def handleFrame__(self, frame, meta):
		self.logger.debug("handleFrame__ : rgb client got frame % from slot %s", frame.shape, meta.slot)
		"""metadata has the following members:
		size
		width
		height
		slot
		mstimestamp
		"""
		print("This method is never called")
		# NOTE: slot numnber identifies uniquely the camera
		# here you would do your redis stuff

class LiveStream:

	def __init__(self, shmem_buffers, shmem_name, address, slot, width, height):
		from valkka.core import AVThread, RGBShmemFrameFilter, SwScaleFrameFilter, LiveConnectionContext, \
			LiveConnectionType_rtsp
		self.shmem_buffers = shmem_buffers
		self.shmem_name = shmem_name
		self.address = f"rtsp://user:password@{address}:554"
		self.slot = slot
		self.width = width
		self.height = height

		_, self.event = event_fd_group_1.reserve()

		self.shmem_filter = RGBShmemFrameFilter(self.shmem_name, self.shmem_buffers, self.width, self.height)
		self.shmem_filter.useFd(self.event)

		# SWS Filter
		self.sws_filter = SwScaleFrameFilter(f"sws_{self.shmem_name}", width, height, self.shmem_filter)
		# self.interval_filter = TimeIntervalFrameFilter("interval_filter", 0, self.sws_filter)

		# decoding part
		self.avthread = AVThread("avthread", self.sws_filter)
		# self.av_in_filter = self.avthread.getBlockingFrameFilter()
		self.av_in_filter = self.avthread.getFrameFilter()

		# define connection to camera
		self.ctx = LiveConnectionContext(LiveConnectionType_rtsp, self.address, self.slot, self.av_in_filter)

		self.avthread.startCall()
		self.avthread.decodingOnCall()

	def close(self):
		self.avthread.decodingOffCall()
		self.avthread.stopCall()
		self.event.release()

p = MyProcess()
p.start()

from valkka.core import LiveThread
from config import get_configs

conf = get_configs()
cameras = conf.get("cameras", [0])
width = conf.get("image_width", 1920)
height = conf.get("image_height", 1080)
shmem_buffers = conf.get("shared_memory_buffers", 10)
mstimeout = conf.get("mstimeout", 10)

shmem_names = []
livestreams = {}
livethread = LiveThread("Livethread")
for i, cam in enumerate(cameras, start=1):
	livestreams[i] = LiveStream(
		shmem_buffers=shmem_buffers,
		shmem_name=f"{cam}",
		address=cam,
		slot=i,
		width=width,
		height=height
	)
	print("LIVETHREAD SHMEM: ", livestreams[i].shmem_name)

livethread.startCall()

for livestream in livestreams.values():
	livethread.registerStreamCall(livestream.ctx)
	livethread.playStreamCall(livestream.ctx)
	shmem_names.append(livestream.shmem_name)
	print("LIVESTREAM SHMEM:    ", livestream.shmem_name)
	fd = p.activateRGB24Client(
		name=livestream.shmem_name,
		n_ringbuffer=100,
		width=1920,
		height=1080,
		ipc_index=event_fd_group_1.asIndex(livestream.event)
	)

time.sleep(20)
p.stop()

Problem is handle_frame__() method is never being called.
Here is a console result:
preRun__
LIVETHREAD SHMEM:  <IP_ADDRESS>
LIVESTREAM SHMEM:     <IP_ADDRESS>
RS:           [<multiprocessing.connection.Connection object at 0x7fc7c07ea760>]
FRAME_FDS:    []
c__activateRGB24Client called with <IP_ADDRESS> 100 1920 1080
Created new TCP socket 208 for connection
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RS:           []
FRAME_FDS:    [3]
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RS:           []
FRAME_FDS:    [3]
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RS:           []
FRAME_FDS:    [3]
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RS:           []
FRAME_FDS:    [3]
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RS:           []
FRAME_FDS:    [3]
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RS:           []
FRAME_FDS:    [3]
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RS:           []
FRAME_FDS:    [3]
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RS:           []
FRAME_FDS:    [3]
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RS:           []
FRAME_FDS:    [3]
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RS:           []
FRAME_FDS:    [3]
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RS:           []
FRAME_FDS:    [3]
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RS:           []
FRAME_FDS:    [3]
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RS:           []
FRAME_FDS:    [3]
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RS:           []
FRAME_FDS:    [3]
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RS:           []
FRAME_FDS:    [3]
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RS:           []
FRAME_FDS:    [3]
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RS:           []
FRAME_FDS:    [3]
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RS:           []
FRAME_FDS:    [3]
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RS:           []
FRAME_FDS:    [3]
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RingBuffer: ServerPush: zeroed, value now=0
RingBuffer: ServerPush: OVERFLOW
RS:           [<multiprocessing.connection.Connection object at 0x7fc7c07ea760>]
FRAME_FDS:    [3]
postRun__

Actually, I found what is going on here:
I realized that script using only one CPU at the time being by HTOP monitoring.
Before, without multiprocessing implemented it was using all of my CPUs almost 100%, but now as I found out only one CPU is being used 100% while executing the code.
So, how can I use accelerate the process again?

Please try this & report:
https://github.com/elsampsa/valkka-process-examples/tree/main/example1
After your report we can take a look on how to distribute your N cameras to N different (multi)processes - if that is what you want.

Good day.
Thanks for your quick response.
I forked and created new branch with some changes and report.
https://github.com/RKAnonymous/valkka-process-examples/tree/report

In that original valkka-process-examples repo, if you had read the comments carefully it was said:
def handleFrame__(self, frame, meta):
    # please test first just with printing this debug message:

So the whole idea was to test how much "heat" that multiprocess can take by simply receiving frames and nothing else.
I'd imagine that it could take a lot of heat, say at least 400 fps.  If you remove the print statement, then even more.  Things go belly up only when it reports a ring-buffer overflow.
If this is the case, then everything you do in handleFrame__ is not my problem: you can do any crazy / extremely "heavy" stuff there which makes it impossible for the multiprocess to handle incoming frames - simply because it is doing all that heavy stuff instead.
Have you tested how many milliseconds it takes to encode a 1920 x 1080 image to jpeg (that cv2.imwrite(image, img) statement)? It must be at least ten(s) of milliseconds, so that would certainly limit the overall capacity of the multiprocess to something like 10 fps.  And how much time does cv2.cvtColor(frame, cv2.COLOR_RGB2BGR) take?  How about the redis operations?
Why do you think that such operations are a free-lunch and don't cost any time? ;)
Finally, please do not put
import cv2
import json

into the handleFrame__ method but in the beginning of the file instead.  You should never put import statements to handleFrame__ (which is called at extremely high frequency), but into the beginning of the file (that's ok since they are not using multithreading) or into preRun__ instead.
The throughput capacity is all about what you do in handleFrame__ - it's a millisecond game.  And you should start by benchmarking the system by just counting the fps of an empty handleFrame__ method, as I suggested above.
If you plan to leave any reports / benchmarks into github, please don't give the impression that libValkka pipelines suck, when the real problem is something else you do in handleFrame__  :)
I've updated the example repo with another example where each camera has it's own multiprocess, which might help a bit.  But encoding jpeg images at high frequency doesn't make much sense - for that task (encoding bitmap images at high fps) people developed video codecs in the first place.

FYI: valkka multiprocessing examples have been scrubbed, cleaned and reorganized in here: https://github.com/elsampsa/valkka-examples/tree/master/multiprocess
The old separate repo for the examples has been removed.
There are now lots of instructions in the code comments as per your questions, hopefully making the multiprocessing and streaming business more clear and easier to understand.
References to that has been added also to the main documentation in valkka.org.
Thanks for your contribution!


Missing import in openid.extension

This seemed too lightweight of an issue for a pull request, but the toMessage method of openid.extension.Extension references the warnings module without it having been imported.
Test case:
import openid.extension

ext = openid.extension.Extension()
ext.toMessage()

Even though this use of the method is deprecated, I consider it a bug.

no change is too small for a pull request :)

This repo is being archived. Closing issue.


No cluster leader

When I'm calling to the HTTP service from my app it's sending me an error with this message: No cluster leader

I've updated the tutorial and it seems to be working well for me. Please reopen if things don't work in the latest tutorial.

containers:
        - name: consul
          image: docker.quncrm.com/service/consul-server:latest
          command:
            - "/bin/consul"
            - "join"
          env:
            - name: NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
          args:
            - "-rpc-addr=consul-0.consul.$(NAMESPACE).svc.cluster.local:8400"
            - consul-0.consul.$(NAMESPACE).svc.cluster.local
            - consul-1.consul.$(NAMESPACE).svc.cluster.local
            - consul-2.consul.$(NAMESPACE).svc.cluster.local

I encountered the same problem, but I modified the consul-join job as this, it works well.

This issue still occurs if you delete the statefulset and recreate it (simulates crashes).

@SukantGujar This is an issue with consul versions prior to 0.9.3. Bumping up consul image to 0.9.3 and adding -raft-protocol=3 to the args section solves the issue. Bumping up to consul 1.0.0 will work out of the box as well since it uses raft 3.0 by default.
https://www.consul.io/docs/guides/consul-containers.html#known-issues

@SukantGujar This is an issue with consul versions prior to 0.9.3. Bumping up consul image to 0.9.3 and adding -raft-protocol=3 to the args section solves the issue. Bumping up to consul 1.0.0 will resolve this as well since it uses raft 3.0 by default.
https://www.consul.io/docs/guides/consul-containers.html#known-issues

@abhijith thanks for the heads up, will try.


Godot 3.3 C# Linux Export System List produces incorrect results

Godot version:
Godot 3.3
OS/device including version:
Linux, GLES3
Issue description:
C# exported variables using System.Collection.Generic.List<(enum)> is filling incorrectly when running.

Create new project
Create new c# script
Create enum in script of any name
export a System.Collection.Generic List of the enum type
Fill enum in the inspector
Output the list using GD.print
Crashing.zip

Duplicate of https://github.com/godotengine/godot/issues/42926.


WIP: Remove min version patch

This patch tries to verify https://github.com/openshift-knative/serverless-operator/pull/1816.

Ah,I was wrong. https://github.com/openshift-knative/serverless-operator/pull/1816 changed the code so it is not possible to verify until it built the image.


move session_start() to the start of the file (in plugin check)

Thanks, but it has already been fixed ;) https://github.com/electerious/Lychee/commit/d5a03a31f8411d57a39cb2debccb477d0fb683b9


Set the dynamic js/css filenames on load

Description

Related Issue(s)

#{issue number}

Verification

[ ] Your code builds clean without any errors or warnings
[ ] Manual testing done (required)
[ ] Relevant automated test added (if you find this hard, leave it and we'll help out)
[ ] All tests run green

Documentation

[ ] User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

This is replaced by other PRS


[Beta] Basic css tells to do something we have not learned yet

Challenge Name
Basic Css: Specify How Fonts Should Degrade

Issue Description
Instructions:
Now comment out your call to Google Fonts, so that the Lobster font isn't available. Notice how it degrades to the Monospace font.
But commenting comes in Basic HTML and HTML5, which is After basic CSS on the map.
Suggestion for solution. We could tell the user to delete the call to Google for the font.

@OFFLlNE - thanks for reporting this issue. Yes, the ordering of the sections was off so Basic CSS was displaying before Basic HTML and HTML5. There's a pending PR ( #12663 ) that fixes the ordering, so the Comment HTML challenge will come before you're asked to comment the fonts in this one. I'm going to close this issue because there's a pending fix. Thanks for your help reviewing the Beta site!


about me edit

a function to update user description will be nice.

Just added this feature in the 2.0.0 update.


fix(present): black video flashes and other bugs linked to Qt

See #464 for original pull request. I did some mistakes but by pushing on my main branch instead of @PeculiarProgrammer 's main branch.

@PeculiarProgrammer: did you check that #315 was fixed on Windows?

Yep. #315 was fixed.

Thanks @PeculiarProgrammer, I also ran some tests on Windows, both with PySide6 and PyQt6, and it worked (for PyQt6, I had to bump the minimal version, but looks good).


5.1 audio plays in stereo only

I have a video with 5.1 audio that plays in stereo only in DJV.  I put a link to it here:
https://mega.nz/file/bDgkFB7Y#qJWR3y_AMDd7KJf8BiA2JhEN-dJuAbZs7YrpNVL4DAc
To see how it should play, play it with VLC.

Thanks, I recently noticed this as well. I'll see if I can get it fixed for the next version.


Support for named path parameters

Describe the bug
I have a technical question regarding my usage of the Spring Cloud Contract and Spring Rest Docs projects. So far, everything has been functioning as anticipated. However, I'm now looking to generate snippets for path parameters, specifically for a path like /movies/123. When I attempt this, Spring Rest Docs raises an error: "Snippet Path parameters with the following names were not found in the request: [movieId]." This error makes sense because I haven't named the path parameter in the URL definition.
My question is whether it's possible to provide such information within Spring Cloud Contract, which is written in Groovy?
Sample
Contract
package contracts.web

import org.springframework.cloud.contract.spec.Contract

Contract.make {
    name("fetch_a_movie")
    description("Should fetch a movie")
    request {
        method GET()
        url "/movies/${anyUuid()}" // /movie/{movieId}
    }
    response {
        status OK()
        headers {
            contentType(applicationJson())
        }
        body("""
        {
            "title": "${anyNonBlankString()}"
        }
        """)
    }
}

Rest Docs
RequestDocumentation.parameterWithName("movieId").description("Movie id");

Hi Team
Just a gentle reminder about this issue. I understand you're all busy, but I'm eagerly awaiting any updates. If there's any way I can assist or provide more information, please let me know.
Looking forward to your response.


Feature Request

Describe the solution you'd like
Need a dark mode theme.

Describe alternatives you've considered
N/A

Additional context

This issue is a dublicate of !59 so I suggest to close it.

Closing in favor of #59.


[BUG]

When I tried to update my Better Teams plugin to the latest one from version 3.1.26 to the latest one,
the plugin stops working. here's the screenshot of the error.

This bug has been fixed for the next update.
This will have been caused by a player having : in their name, if you restart the conversion to the new storage method while using version 4.0.3 this will be fixed automatically.
You will have to restore the old team first details on how to do this attached below:
How do I restore the backed up betterTeams file from before update 4.0.0?

Stop the server
Go into the plugin folder (/plugins/BetterTeams/) and rename the folder called teamInfo to teamInfoOld this is so no information is lost if you do the process wrong
Rename the file teams.yml to teamsOld.yml this is once again to ensure no data is lost
Rename the file teamsBACKUP.yml to teams.yml
Start up your server on whatever version of betterteams you want


feat!: (IAC-1102) Move "deploy manifest" feature for experimental branch to main

Changes
Moves the "deploy manifest" feature for experimental branch to main
Notes
This PR will be immediately closed and not merged to main, this is being done for backup purposes.

Closing this PR. This feature is no longer needed.


Circular dependency detected while autoloading constant PaymentTransaction (RuntimeError)

Hi everyone,
I was trying to get this run on AWS. I followed all the instructions as per:
https://github.com/peatio/peatio/blob/master/doc/deploy-production-server.md
But I am stuck with this error. Any advise or guidance would be greatly appreciated..!!
Below is the log trace when I try to run the rails server
/home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.12/lib/active_support/dependencies.rb:461:in load_missing_constant': Circular dependency detected while autoloading constant PaymentTransaction (RuntimeError) 	from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.12/lib/active_support/dependencies.rb:184:in const_missing'
from /home/ubuntu/peatio/current/lib/daemons/payment_transaction.rb:20:in <top (required)>' 	from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.12/lib/active_support/dependencies.rb:229:in require'
from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.12/lib/active_support/dependencies.rb:229:in block in require' 	from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.12/lib/active_support/dependencies.rb:214:in load_dependency'
from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.12/lib/active_support/dependencies.rb:229:in require' 	from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.12/lib/active_support/dependencies.rb:330:in require_or_load'
from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.12/lib/active_support/dependencies.rb:289:in depend_on' 	from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.12/lib/active_support/dependencies.rb:207:in require_dependency'
from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/railties-4.0.12/lib/rails/engine.rb:465:in block (2 levels) in eager_load!' 	from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/railties-4.0.12/lib/rails/engine.rb:464:in each'
from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/railties-4.0.12/lib/rails/engine.rb:464:in block in eager_load!' 	from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/railties-4.0.12/lib/rails/engine.rb:462:in each'
from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/railties-4.0.12/lib/rails/engine.rb:462:in eager_load!' 	from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/railties-4.0.12/lib/rails/engine.rb:347:in eager_load!'
from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/railties-4.0.12/lib/rails/application/finisher.rb:56:in each' 	from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/railties-4.0.12/lib/rails/application/finisher.rb:56:in block in module:Finisher'
from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/railties-4.0.12/lib/rails/initializable.rb:30:in instance_exec' 	from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/railties-4.0.12/lib/rails/initializable.rb:30:in run'
from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/railties-4.0.12/lib/rails/initializable.rb:55:in block in run_initializers' 	from /home/ubuntu/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:226:in block in tsort_each'
from /home/ubuntu/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:348:in block (2 levels) in each_strongly_connected_component' 	from /home/ubuntu/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:429:in each_strongly_connected_component_from'
from /home/ubuntu/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:347:in block in each_strongly_connected_component' 	from /home/ubuntu/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:345:in each'
from /home/ubuntu/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:345:in call' 	from /home/ubuntu/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:345:in each_strongly_connected_component'
from /home/ubuntu/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:224:in tsort_each' 	from /home/ubuntu/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:203:in tsort_each'
from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/railties-4.0.12/lib/rails/initializable.rb:54:in run_initializers' 	from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/railties-4.0.12/lib/rails/application.rb:215:in initialize!'
from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/railties-4.0.12/lib/rails/railtie/configurable.rb:30:in method_missing' 	from /home/ubuntu/peatio/current/config/environment.rb:5:in <top (required)>'
from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.12/lib/active_support/dependencies.rb:229:in require' 	from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.12/lib/active_support/dependencies.rb:229:in block in require'
from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.12/lib/active_support/dependencies.rb:214:in load_dependency' 	from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.12/lib/active_support/dependencies.rb:229:in require'
from /home/ubuntu/peatio/current/config.ru:3:in block in <main>' 	from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in instance_eval'
from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in initialize' 	from /home/ubuntu/peatio/current/config.ru:in new'
from /home/ubuntu/peatio/current/config.ru:in <main>' 	from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in eval'
from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in new_from_string' 	from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in parse_file'
from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/rack-1.5.2/lib/rack/server.rb:277:in build_app_and_options_from_config' 	from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/rack-1.5.2/lib/rack/server.rb:199:in app'
from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/railties-4.0.12/lib/rails/commands/server.rb:48:in app' 	from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/rack-1.5.2/lib/rack/server.rb:314:in wrapped_app'
from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/railties-4.0.12/lib/rails/commands/server.rb:75:in start' 	from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/railties-4.0.12/lib/rails/commands.rb:76:in block in <top (required)>'
from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/railties-4.0.12/lib/rails/commands.rb:71:in tap' 	from /home/ubuntu/peatio/current/vendor/bundle/ruby/2.2.0/gems/railties-4.0.12/lib/rails/commands.rb:71:in <top (required)>'
from bin/rails:4:in require' 	from bin/rails:4:in '

Hi @muhammednagy
Thank you very much! I ll fork from here. I am a newbie to this... In case if I face some issues, I ll put it up. Please help!
Thanks :)


GROUP BY column names are case-sensitive.

I want to spend a little more time thinking about the right fix.
The main issue is that un-qualified group-by variables are mapped to tables using the tablesForColumn map, defined here. This lookup is case-sensitive.  The actual table lookup takes place here.
In principle, the group-by column list can/should be replaced by a NameLookup-style binding map.  It gets used to derive the schema of the input to the HAVING block, as well as any post-aggregate projections.  In most of those cases though, bindings should be sufficient.  There seems to be some effort to preserve the table names of the group-by columns, but I can't, for the life of me, remember why.  I'm thinking it was for consistency in NameLookup use, but if that's all it is, we should be able to remove a bunch of code in SQLToRA and everything should still just work.
This is an after SIGMOD bugfix, imo.

There seems to be a similar problem with table names.

This is a sneaky bug.  Name works in some map types, but not others. It seems like the test harness is getting a lighter-weight map that respects .equals, but the compiled version gets one that doesn't...

The reason we're keeping around table names is that range variables can still be used in later parts of the query.  We need to essentially create a projection of the source schema to support queries like:
SELECT R.A FROM R GROUP BY A HAVING R.A > 4

Specifically, we need to have a safer way to dig up the association between A and R in the group by clause.


(WIP) Ceph(test): Unit Test for StorageClass Creation

Unit tests for PR #590
Signed-off-by: RAJAT SINGH<EMAIL_ADDRESS>

This PR is no longer valid. Closing.


Some extensions do not appear in the list due to case-sensitive sorting

I keep having trouble finding the Sandbox extension, because it does not seem to show up in the extension list. Many users reported this issue on the Slicer forum, too.

Interestingly, clicking on the "Examples" category makes the extension show up.

As it turned out today, while troubleshooting this with yet another user, the problem is just incorrect sorting:

Case-sensitive sort in the extension list really messes up things (it puts flywheel_connect and iGyne to the very end of the list):

@jcfr switching to case-insensitive sorting might be just a very small change and it could solve this issue that confuses many new users.

I observed this recently where flywheel_connect was oddly at the bottom of the seemingly alphabetical list.


Windows input fix

Changes

Implemented fix for the Windows Event Log Input Operator.
Main fix was to the xml.go file.
Added tests in xml_test.go and a sample WEL xml file

Link to Tracking Issue
#476

Can you add a test or two to demonstrate the functionality?

@djaglowski there should be some tests in there now


Runnining docker-tool in galaxy-docker

Hello,
We are working on integration of the home-made tool in docker into galaxy-docker. And we have met an issue while galaxy is launching a tool-docker.
Here is the command built by galaxy : On the host we mont /export/ volume inside /home/ directory, so the application can be run on our server. I have arrived to parameter the volumes of the docker-tool so they can be mapped to the correct location. Unless there are still parameter -w (working directory) who is pointing to the non-existing folder on the host.
docker run -e "GALAXY_SLOTS=$GALAXY_SLOTS" -v /home/galaxy/galaxy-central:/home/galaxy/galaxy-central:ro -v /home/galaxy/local_tool/ClusterisationK-means:/home/galaxy/local_tool/ClusterisationK-means:ro -v /home/galaxy//export/galaxy-central/database/job_working_directory/000/6:/home/galaxy//export/galaxy-central/database/job_working_directory/000/6:ro -v /home/galaxy/export/galaxy-central/database/job_working_directory/000/6/working:/home/galaxy/export/galaxy-central/database/job_working_directory/000/6/working:rw -v /home/galaxy/export/galaxy-central/database/files:/home/galaxy/export/galaxy-central/database/files:rw -w /export/galaxy-central/database/job_working_directory/000/6/working --net none --rm --user 1450:1450 visatm/neurodoc /export/galaxy-central/database/job_working_directory/000/6/tool_script.sh; return_code=$?; cd '/export/galaxy-central/database/job_working_directory/000/6';
Here is the error :
docker: Error response from daemon: OCI runtime create failed: container_linux.go:344: starting container process caused "exec: "/export/galaxy-central/database/job_working_directory/000/6/tool_script.sh": stat /export/galaxy-central/database/job_working_directory/000/6/tool_script.sh: no such file or directory": unknown.
Can you please indicate where I can parameter this value also ?
Thanks a lot for your help :)

You may give a look at Docs here:  https://github.com/bgruening/docker-galaxy-stable#Integrating-non-Tool-Shed-tools-into-the-container

Can you paste here the content of these files:  tool_conf.xml, your_docker_tool.xml, job_conf.xml ?

Docker in Docker is possible. We are using this for running Interactive tools for example. See here: https://github.com/bgruening/docker-galaxy?tab=readme-ov-file#enabling-interactive-tools-in-galaxy--toc


In USWDS modals, 200% zoom on mobile causes text to overflow

Describe the bug
In USWDS modals, 200% zoom on mobile causes text to overflow
To Reproduce
Part 1:

Set browser zoom to 200%
Reduce viewport to <400px (e.g. use Inspect and resize the viewport)

Part 2:
There are multiple options for triggering modals in North Star. Here are some examples.
Dev tools

Click "dev tools" in dev
Observe

Duplicate submission

As applicant, submit an application
Apply to the same program
Go to the review page
Click "Submit"
Observe the duplicate submission modal

Expected behavior
Text does not overflow its parent container
Screenshots

Additional context
It happens on both Chrome and Firefox

Hi, I'm working with a group of 2 other CS students from Florida International University. We are part of the Tech Talent Academy program where we are required to join an open source project and make a contribution. We were wondering if we could tackle this issue

Hi, thank you for your interest in contributing to CiviForm. If you're interested in contributing, can you contact Exygy at https://civiform.us/contact/ before starting? They will help select a good first issue for you (which may or may not be this one).
Thanks!

Hi @NotAPlumber505, here is some guidance for how to get started contributing to CiviForm:  Technical contribution guide.  You'll find an invite there for our CiviForm Slack, which you're welcome to join.
If you decide this is the issue that you want to work on, please confirm in another comment on this issue and I'll assign it to you.  Thanks for you interest in CiviForm!


fix: Typo in AggProof not GeneratedAggProof message

The clippy / test jobs failing are related to nightly, will update it on the side. Additionally, I think we should instead reword this error message into something more meaningful.


Garlium v3.0.5 all the time getting "transaction was rejected by network rules..."

please, I am trying to send funds, but all the time getting "transaction was rejected by network rules..."
I was tried different fee options from low to high - same result

Same problem here

Sounds like your transaction has too many UTXOs. See the Troubleshooting section of the site for instructions on how to merge those down into smaller ones so the transaction can send.

Try changing server (green dot icon bottom right) and it should work


Register namespace via policy Part Eight

Changed Services

recoveryservices
recoveryservicesbackup
resourcegraph
resourcehealth
resourcemover

Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
All SDK Contribution checklist:

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

General Guidelines and Best Practices

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

Testing Guidelines

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

/azp run java - recoveryservices - mgmt - tests

/azp run java - recoveryservicesbackup - mgmt - tests

/azp run java - resourcehealth - mgmt - tests

/azp run java - resourcemover - mgmt - tests

API change check
API changes are not detected in this pull request.

/azp run java - resourcehealth - mgmt - tests

/azp run java - recoveryservices - mgmt - tests

/azp run java - recoveryservicesbackup - mgmt - tests

/azp run java - resourcehealth - mgmt - tests

/azp run java - resourcemover - mgmt - tests

/azp run java - recoveryservices - mgmt - tests

/azp run java - recoveryservicesbackup - mgmt - tests

/azp run java - resourcemover - mgmt - tests

/azp run java - resourcehealth - mgmt - tests

/azp run java - resourcehealth - mgmt - tests

/azp run java - recoveryservices - mgmt - tests

/azp run java - recoveryservicesbackup - mgmt - tests

/azp run java - resourcehealth - mgmt - tests

/azp run java - resourcemover - mgmt - tests


Drop FreeBSD support

We no longer provide full support for pony on FreeBSD, as such, we are no longer building releases for FreeBSD of Pony tools and no longer need FreeBSD support in Ponyup.

Hi @SeanTAllen,
The changelog - changed label was added to this pull request; all PRs with a changelog label need to have release notes included as part of the PR. If you haven't added release notes already, please do.
Release notes are added by creating a uniquely named file in the .release-notes directory. We suggest you call the file 255.md to match the number of this pull request.
The basic format of the release notes (using markdown) should be:
## Title

End user description of changes, why it's important,
problems it solves etc.

If a breaking change, make sure to include 1 or more
examples what code would look like prior to this change
and how to update it to work after this change.

Thanks.


[Enhancement] keep tablet scheduling related config naming consistent

What type of PR is this：

[ ] bug
[ ] feature
[x] enhancement
[ ] refactor
[ ] others

Which issues of this PR fixes ：

Fixes #8871
Problem Summary(Required) ：

Add a new alias annotation method to keep forward compatibility in ConfigBase class.
Rename and rearrange some configurations in Config.java.

run all