Extend cluster ingress to TCP services

Currently, cluster ingress is entirely HTTP based (in line with k8s notion of ingress).
There's extra benefit of having dedicated TCP proxy ingress in Istio:

reuse IP for multiple services using port redirection (contrast with LoadBalancer type service which requires a fresh external IP address)
enforce mTLS for in-cluster TCP services (LoadBalancer services cannot accept external traffic once istio auth feature is enabled)
consistent policy injection at the cluster ingress point

The downside is that we would be diverging from the k8s specification for ingress. We would need to consume ingress rules directly, in addition to ingesting k8s ingress resources.
Thoughts?
@rshriram @louiscryan

Cc @cmluciano since you expressed interest in this
On Fri, Jul 28, 2017 at 5:38 PM Kuat<EMAIL_ADDRESS>wrote:

Currently, cluster ingress is entirely HTTP based (in line with k8s notion
of ingress).
There's extra benefit of having dedicated TCP proxy ingress in Istio:

reuse IP for multiple services using port redirection (contrast with
LoadBalancer type service which requires a fresh external IP address)
enforce mTLS for in-cluster TCP services (LoadBalancer services
cannot accept external traffic once istio auth feature is enabled)
policy injection at the cluster ingress point

The downside is that we would be diverging from the k8s specification for
ingress. We would need to consume ingress rules directly, in addition to
ingesting k8s ingress resources.
Thought?
@rshriram https://github.com/rshriram @louiscryan
https://github.com/louiscryan
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/istio/pilot/issues/969, or mute the thread
https://github.com/notifications/unsubscribe-auth/AH0qd19JVUOyTHxjT6L7_XfzbBW2M5F8ks5sSlTUgaJpZM4OnG5p
.

--
~shriram

Can we add an example config file for how a user would specify this? Do we expect if I send a packet destined for localhost:myspecialport that Pilot would note that all myspecialport resembles this cluster-ip?

Here's a very basic example. Let's say we run istio ingress as istio-ingress service that's exposed externally. We want to route istio-ingress:3000 to mysql:5000 where mysql is an internal service. We might want auth enabled on both sides. The config might look like:
kind: ingress-rule
name: mysql-exposed
port: 3000
tlsSecret: mysql-secret
destination: mysql
destinationPort: 5000

There was thought around requesting TCP support in k8s ingress, is this something that we still think is viable?

This seems possible in the nginx implementation of k8s ingress
https://github.com/kubernetes/ingress/blob/master/examples/tcp/nginx/nginx-tcp-ingress-configmap.yaml

@cmluciano that only exists because there is no k8s loadbalancer option in baremetal. This option should not be used if you are in a cloud provider.

ack, I'm not sure if Istio makes assumptions on a cloud provider, but this could collide in the end. Do you have any thoughts on this @aledbf ?

@cmluciano I think Ingress (k8s concept) should not support TCP and just use type=Loadbalancer in the service.
The users ask for TCP support in Ingress because if you are running in the cloud you cannot share the load balancer between different services which means 1 loadbalancer per service (using the nginx ingress controller you can bypass this)
The kyessenov example should be just another k8s service, not need to use Ingress (k8s) for that usecase

Ahhhh, I understand. I never used some of these features in k8s. Thanks for pointing this out!

@aledbf the problem in Istio case is that LoadBalancer type service cannot accept external connection since it expect mTLS handshake. We need some intermediary for terminating end-user auth to in-cluster auth.

xref: https://github.com/kubernetes/kubernetes/issues/17571

@cmluciano can you provide your outlook for this?  Trying to understand if this can be in beta or not.  Thanks!

Discussed with @kyessenov This should not be a blocker for 0.2. I can continue to own this and deliver in a 0.2.X release.

Has there been any update to the work on this issue?

I have not worked on it recently.

No update, this feature is not making it to 0.2

Issue moved to istio/istio #1409 via ZenHub


Split each command into its own file

More generally, research how large Typer projects are best put together.

One command per file violates DRY, but a partition like this could work:
Booklist: init, delete, transcribe, flip
Per-Book: add, attribute, remove, change-status, skim, prioritize, tag, untag
Search: lookup, investigate

Done


Made GUI DPI aware

This pull request fixes the DPI issues that occurs when using a high DPI monitor (e.g 2560x1440)
Typical before-after images, on the first image you'll see a lot of blurry text; which is easy to fix using app.manifest. This 'fix' doesn't cause any bugs or anything at all, since it's only a change in the application manifest - making this PR 100% save.

I've also updated the .gitignore and added the missing .gitattributes from VS2017.

The DPI awareness changes seem reasonable.
Please restore the private/ line in .gitignore, otherwise everything looks good.

Done, didn't know you added it manually.

Thanks!


Is pull replication using design doc views supported?

Bug Description
Cannot do a pull replication using views. As per: https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-using-views
Using PullFilter to try get data from a view in a design doc, does not work. It appears that views must have a specific url format which seems to not be supported by this lib yet?
1. Steps to reproduce and the simplest code sample possible to demonstrate the issue
Cannot see code to be able to do a pull replication using view
2. What you expected to happen
I expect to be able do a pull replication using views.
3. What actually happened
Nothing.
Environment details

Version(s) that are affected by this issue.

2.4.1

Android or Java version (including vendor and platform)

Android 7.0, API level 21, Linux/armv7l

sync-android artifact you are using:

[ ] cloudant-sync-datastore-android

Replication and views are distinct features of cloudant/couchdb. It is not possible to replicate using a view. You can achieve a similar effect using replication with a filter function or selector.

See last bullet point here: https://pouchdb.com/api.html#filtered-replication
How would I pull replicate a design doc with a view, where for eg:
design doc id is:   "_id": "_design/filterByTimestamp",
and view function is:
"views": {
"now-minus-one-month": {
"map": "function (doc)
What syntax would I use for filter function or selector to query such? Thanks in advance.

This seems to work, thanks so much for your suggestion.
val filter = PullFilter("_view", mapOf("view" to "filterByTimestamp/now-minus-one-month"))
val replicator = ReplicatorBuilder.pull().from(uri).to(ds).build()

hm be careful there. replication is not using the view index, it's just re-running the map function and letting docs through that would emit a row. It's better to write a filter function (https://docs.couchdb.org/en/stable/ddocs/ddocs.html?highlight=filter#filter-functions) or a selector (https://docs.couchdb.org/en/stable/api/database/find.html#find-selectors). A selector would be faster too.
A view called "now-minus-one-month" also makes me think you've made a mistake in your map function. If you are comparing a document property to the current date (i.e, new Date()) then you have made a mistake. The map function in your view is called at indexing time not querying time, so it will return the wrong answers.


Added documentation for some user-visible classes in generic.scala

I have some docs for other files as well, submitting PRs on file-by-file basis to keep reviews manageable.

Many thanks for that! Merging ... :-)

Be sure to add yourself to the contributors file in the next PR ...

One thing cropped up on the PR build ... various names in the doc were accidentally picked up as substitutions because they contained '$'s and there were a couple of other places where names were used in contexts which scaladoc expected to be able to find definitions but couldn't, typically because of lack of prefix information. Running the doc task from the SBT REPL is the quickest way to catch these things.
I've fixed the problems here and also simplified the various Repr types ... these aren't the way they would be rendered on the REPL, but they are a lot easier to read.

Good to know, thanks! Will run the doc task next time.

Ideally the Travis build should catch such errors by running both the test and doc tasks. In Cats we added a command alias for validating PRs (https://github.com/non/cats/blob/aec71b97dfbe5b3e1c8e909805fb45b4451504b3/build.sbt#L219) which is used for Travis builds and which can be used by contributors before they send PRs.

Agreed. PR? ;-)


replace openssl with rustls

Cannot request a review from @kubewarden/kubewarden-developers proper...

I'm updating this PR so it reads the fulcio cert and the rekor public key as an argument -- or defaults to a location in ~.

Converting to draft, given e2e tests related to sigstore are removed temporarily.


debug_checked_unreachable should track its caller

Objective
When an error causes debug_checked_unreachable to be called, the panic message unhelpfully points to the function definition instead of the place that caused the error.
Solution
Add the #[track_caller] attribute in debug mode.

Another, probably more efficient, alternative is to replace it with a macro instead.  This also avoids us needing to screw around with the inlining of the function (see #5064).

Fixed in #6461

Turns out this actually was not fixed. The track_caller attribute still needs to be added to debug_checked_unwrap, which was added in the aforementioned PR.


Sheet.observe is not doing anything

Hello,
It seems Sheet.observe is not working. I am trying to trigger an event when any cell in the sheet changes. here is an example below. Changing a or b does not update the sum.
import ipywidgets as widgets
sheet = ipysheet.sheet(rows=3, columns=2, column_headers=False, row_headers=False)
cell_a = ipysheet.cell(0, 1, 1, label_left='a')
cell_b = ipysheet.cell(1, 1, 2, label_left='b')
cell_sum = ipysheet.cell(2, 1, 3, label_left='sum', read_only=True)

# changes in a or b should trigger this function
def calculate(change):
    cell_sum.value = cell_a.value + cell_b.value

sheet.observe(calculate, type='All')
#cell_a.observe(calculate, 'value')
#cell_b.observe(calculate, 'value')
sheet

You realize calculate would be called even when the sum changed (so twice every time)
Sheet.observe is only able to observe traits of the Sheet class. To get a list of these, run sheet.trait_names()
Maybe observing a cell_range is what you're looking for

sheet.observe(calculate, type='All')

This will never be triggered since nothing in the sheet itself would change (the widget model), only the cells. The proper way is to listen to the cells (uncommenting the other observe lines would do it, or see this example

sheet.trait_names() returns:
['_display_callbacks',  '_dom_classes',  '_model_module',  '_model_module_version',  '_model_name',  '_msg_callbacks',  '_property_lock',  '_states_to_send',  '_view_count',  '_view_module',  '_view_module_version',  '_view_name',  'cells',  'column_headers',  'column_resizing',  'column_width',  'columns',  'comm',  'keys',  'layout',  'log',  'named_cells',  'row_headers',  'row_resizing',  'rows',  'search_token',  'stretch_headers']


Proposal: OrientedLine shape or alternative to support stretched line with StrokeDashArray

Currently if you want to create a horizontal (or vertical) divider that is a dashed line (which stretches to the container width (or height)), it's quite difficult.  I use a rectangle with height 2px, a clip 1px high and very wide, and a margin-bottom of -1px. I suppose I could also create a templated control and have a line updated on the SizeChanged event in the template, but really this capability should be build in. I have a number of suggestions of how to do this. I don't really mind which one is used.
Solution 1
Add an OrientedLine shape. This would be the same as Line except instead of X1, X2, Y1, Y2, it would have an Orientation property (Horizontal or Vertical) and then use the normal layout rules in the same way that Rectangle does.
Solution 2
Allow setting a Thickness as the stroke thickness(!) of a Rectangle. It would have to have a different name from StrokeThickness I guess.
Solution 3
Allow all elements with the Border... properties to accept a BorderDashArray property, allowing the border to be dashed.
It would be nice, at the same time, to fix issue #1784.

Hhh

I assume we cannot just use Line ? @codendone as FYI

Not as it stands, as far as I am aware. Although adding an extra property to line would be a solution, or possibly allowing double.NaN (Auto in XAML I guess) for X2 and Y2 to mean stretch.

Could you provide some images to show what the problem is, and how you expect it to look.
It would help to determine if it is a bug with the border drawing on general, or an edge case that needs it's own solution

There's no bug. It's simply that with the Line shape, you have to specify X1, Y1, X2, Y2 as coordinates. There's no way to get it to automatically stretch either horizontally or vertically to its container. The Shape subclasses are the only UIElements that let you specify a StrokeDashArray (i.e. a dashed border), as far as I'm aware. You can't use Rectangle because there's no way to set the individual borders separately. If you set the height to 1px then the dashes for the top and bottom border are drawn in the same line, but not necessarily with the same offset, so that doesn't work (and it wouldn't word with a translucent brush anyway). If you want a visual, this it what I want!
---------------------------------------------------------------------------------------------

This has come up a couple of times in the last several years.  The API for Line does make it inconvenient for this scenario where you just want layout to include a horizontal or vertical line.  Solution 1 would be a natural solution to this, though we'll need to evaluate all of the options.


Give proper Error message if Link to webrtc is expired.

I successfully added new feature and boy..  Thanks so muhc for this more than awesome app!.
Just one thing.. when opening an expired link to the stream it will just print
ERROR: {}

Is it maybe possible to print a human readable error message like: This link has been expired,  or something more readable?
Awesome anyway and THAT was what i was looking for for maybe 4 years now :) Thanks a lot master!

another quesstion. Is it possible to have to name the header individually? for the moment it is WebRTC.. something custom would be awesome :)


Added isPrime Method with Test Cases to NumberUtils

This pull request introduces the isPrime method to the NumberUtils class, enhancing its functionality to include prime number detection.
Why This Change?
The addition of the isPrime method fulfills a common requirement in various applications where checking for prime numbers is needed. Prime number detection is useful in numerous scenarios such as cryptographic algorithms, data validation, and mathematical computations. By incorporating this method into NumberUtils, users can leverage a well-tested, reliable implementation directly from the utility library.
Changes Made:

Feature Addition:

Implemented the isPrime method in NumberUtils.java, providing a straightforward way to determine if a number is prime.

Test Coverage:

Added comprehensive test cases for the isPrime method in NumberUtilsTest.java.
Tests include a variety of inputs, such as positive prime numbers, non-prime numbers, and edge cases like zero and negative numbers.

Benefits:

Enhanced Functionality: Users now have access to a prime number checking utility within the NumberUtils class.
Reliability: The method has been thoroughly tested to ensure accurate results and robust performance.
Convenience: Integrates seamlessly into existing codebases using the NumberUtils class, reducing the need for external libraries or custom implementations.

Example Usage:
// Check if a number is prime
boolean result = NumberUtils.isPrime(11); // true
boolean result = NumberUtils.isPrime(20); // false

Additional Notes:

The implementation follows the project's coding standards and has been validated against all relevant test cases.

All tests have passed successfully, ensuring that the new method integrates smoothly with the existing codebase.

Please review the proposed changes and let me know if further modifications are needed. Thank you for considering this enhancement!

Hello @hemanth0525
Thank you for your PR but I am -1 as this feels to me like a definite overreach for this component.
This functionality already exists in BigInteger and Commons Math's Primes class.

Thank you for ur feedback dude @garydgregory .
My Bad !!!!


📝 Documentation: add contribution guide

Bug Report Checklist

[X] I have pulled the latest main branch of the repository.
[X] I have searched for related issues and found none that matched my issue.

Overview
It would be great to have a contribution guide that includes information on how to test changes and build the plugin. Additionally, it would be helpful to have details about the minimum required Node version and other prerequisites.
Additional Info
No response

contribution guide

https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/blob/main/.github/CONTRIBUTING.md
https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/blob/main/.github/DEVELOPMENT.md

test changes

https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/blob/main/.github/DEVELOPMENT.md#testing

build the plugin

https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/blob/main/.github/DEVELOPMENT.md#building

Minimum required Node version

https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/blob/fbf858b4fb5da133a745dfb32f6d8d7d6a550a4d/package.json#L120-L122
I'm inferring you haven't read through the docs very deeply 🙂. Once you've read through them, if you have any specific questions on things not covered, please do post back or file a new issue.

@JoshuaKGoldberg, for the first time, I discovered the contribution and development guides in the .github directory. I’m not sure, but maybe it would be better to place them in the root directory.
And it would be great if you could include a reference to the contribution/development guide in the README file to increase its visibility because it's where I actually search for it.

I can see why you'd ask for that, but it's a GitHub standard to allow them in .github. From https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors (emphasis mine):

To help your project contributors do good work, you can add a file with contribution guidelines to your project repository's root, docs, or .github folder. When someone opens a pull request or creates an issue, they will see a link to that file. The link to the contributing guidelines also appears on your repository's contribute page. For an example of a contribute page, see github/docs/contribute.

I think the discoverability issue might be something to take up with the GitHub website itself. I agree that it'd be nice to have more prominent "hey go read this!". 😄

Okay, but it's defenetly worth mentiong contribution guide in the README because almost all open source repositories have them. Here are some examples:

https://github.com/freeCodeCamp/freeCodeCamp#contributing
https://github.com/facebook/react#contributing-guide
https://github.com/vuejs/core#contribution
https://github.com/ohmyzsh/ohmyzsh#how-do-i-contribute-to-oh-my-zsh
https://github.com/twbs/bootstrap#contributing
https://github.com/flutter/flutter#documentation
https://github.com/microsoft/vscode#contributing
https://github.com/vercel/next.js#contributing
https://github.com/golang/go#contributing

That's a good point. And, in fact, I do this in my other repos - this one just isn't matched to the template!
Example from https://github.com/JoshuaKGoldberg/create-typescript-app?tab=readme-ov-file#development:

## Development

See [`.github/CONTRIBUTING.md`](./.github/CONTRIBUTING.md), then [`.github/DEVELOPMENT.md`](./.github/DEVELOPMENT.md).
Thanks! 💖

Accepting PRs to add the equivalent to this project's README.md. Thanks for filing, good catch!


Use cachegroupIndex to find cachegroup type, not parentIndex

What does this PR (Pull Request) do?

[x] This PR fixes #4772

Which Traffic Control components are affected by this PR?

Traffic Ops

What is the best way to verify this PR?

Make Rob's cachegroups, POST his topology, and make sure it succeeds:
{
  "name": "Foo",
  "description": "bar",
  "nodes": [
    {
      "cachegroup": "mid-west",
      "parent": "",
      "secParent": "",
      "parents": []
    },
    {
      "cachegroup": "sacramento-ca-usa",
      "parent": "mid-west",
      "secParent": "mid-east",
      "parents": [
        0,
        2
      ]
    },
    {
      "cachegroup": "mid-east",
      "parent": "",
      "secParent": "",
      "parents": []
    },
    {
      "cachegroup": "albany-ny-usa",
      "parent": "mid-east",
      "secParent": "mid-west",
      "parents": [
        2,
        0
      ]
    },
    {
      "cachegroup": "tallahassee-fl-usa",
      "parent": "mid-east",
      "secParent": "mid-west",
      "parents": [
        2,
        0
      ]
    }
  ]
}

If this is a bug fix, what versions of Traffic Control are affected?

master (c8db585c00)

The following criteria are ALL met by this PR

[x] We are going to take out edge parentage validation anyway, so no tests
[x] Bugfix, no documentation necessary
[x] An update to CHANGELOG.md is not necessary
[x] This PR includes any and all required license headers
[x] This PR does not include a database migration
[x] This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

Additional Information

More positive test cases for the TO API tests added in ab03f3295, including Rob's.


支持0.60+autolink

现在貌似还需要执行手动link，是否可以支持autolink

pod 'RNSpringScrollView', :path => '../node_modules/react-native-spring-scrollview/ios'
you can try this

文档里早就有pod安装说明，没人看而已

文档里早就有pod安装说明，没人看而已

Yeah, but there is no guide on android with autolinking since > 0.60 i think.

I found this problem on iOS with 0.61.2 update.
.../react-native-spring-scrollview/ios/SpringScrollView/STSpringScrollView.h:9:9: 'React/RCTScrollView.h' file not found
Is there any guide with > 0.60 ?

You should unlink manual and relink by pod

更新到最新版本就是自动pod


uploaded image to S3 should be webp not png format.

Uploaded image should be webp not png. the req.file.originalfilename causing the issue.

fixed on pr #2


Startup script does not do anything

When I run startup script it just stands still without any info reported back (no server is online)
But i figured out how to enable debug mode and there's what it prints out on startup:
D:\Programs\sqliteserver>.\bin\startup.bat -D .\data
19:27:31,025 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
19:27:31,025 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
19:27:31,026 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/D:/Programs/sqliteserver/conf/logback.xml]
19:27:31,155 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
19:27:31,159 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
19:27:31,190 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
19:27:31,192 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE]
19:27:31,205 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1665404403 - Achive files will be limied to [10MB] each.
19:27:31,209 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1665404403 - No compression will be used
19:27:31,210 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1665404403 - Will use the pattern D:/Programs/sqliteserver/logs/sqlite-server.%d{yyyy-MM-dd}.%i.log for the active file
19:27:31,212 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@569cfc36 - The date pattern is 'yyyy-MM-dd' from file name pattern 'D:/Programs/sqliteserver/logs/sqlite-server.%d{yyyy-MM-dd}.%i.log'.
19:27:31,212 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@569cfc36 - Roll-over at midnight.
19:27:31,231 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@569cfc36 - Setting initial period to Sun May 26 19:27:31 OMST 2024
19:27:31,235 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Active log file name: D:/Programs/sqliteserver/logs/sqlite-server.2024-05-26.0.log
19:27:31,235 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - File property is set to [null]
19:27:31,237 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to DEBUG
19:27:31,237 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE] to Logger[ROOT]
19:27:31,239 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.sqlite] to DEBUG
19:27:31,239 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
19:27:31,240 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@78186a70 - Registering current configuration as safe fallback point

figured out there's log file which says server is online, but anyway I can't connect to it using psql command:
psql -U root -h localhost -p 3272 test
it throws an error
Connection refused (0x0000274D/10061)

Done same thing in Linux, nothing changed:
$ psql -U root -h localhost -p 3272 test
psql: error: connection to server at "localhost" (::1), port 3272 failed: Connection refused
        Is the server running on that host and accepting TCP/IP connections?
connection to server at "localhost" (<IP_ADDRESS>), port 3272 failed: server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

Here's logs:
05/28 16:20:15.781 [main] INFO  org.sqlite.server.SQLiteServer.start(484) - SQLITED_HOME '/home/max/Downloads/sqlite-server-0.3.30'
05/28 16:20:15.795 [SQLite PG server] INFO  org.sqlite.server.SQLiteServer.listen(593) - Ready for connections on localhost:3272, version 8.2.23-SQLited 0.3.30

Literally was copypasting commands from docs


Add Python 3.12 runtime

Description
Changes proposed in this pull request:

Add Python 3.12 where needed

Related issue(s)

#746

/retest

/hold

/unhold

pre-serverless-runtimes-python39-build-classic is failing, this is intentional; the job was kept to not block development when Python39 image location was being changed


.NET 7: Add IResults support in MVC docs

Related issue: https://github.com/dotnet/aspnetcore/issues/40639

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

ID: fa03501b-5e71-4c18-0269-39babbf9d93c
Version Independent ID: b51bc104-a6e2-b21f-8362-45cee22e8c22
Content: Controller action return types in ASP.NET Core web API
Content Source: aspnetcore/web-api/action-return-types.md
Product: aspnet-core
Technology: aspnetcore-webapi
GitHub Login: @Rick-Anderson
Microsoft Alias: scaddie

@Rick-Anderson I will work on it, ok?

@Rick-Anderson Should I add the sample code in this repo or AspNetCore.Docs.Samples?

@Rick-Anderson Should I add the sample code in this repo or AspNetCore.Docs.Samples?

Either place. If we expect many customers to download the code, we prefer the samples repo.

@Rick-Anderson the current sample for this page are here: https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/web-api/action-return-types/samples. Do you want, for .NET 7, we have them in the new repo as well?

@Rick-Anderson the current sample for this page are here: https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/web-api/action-return-types/samples. Do you want, for .NET 7, we have them in the new repo as well?

No, let's keep it here. We don't want to duplicate it for sure.

EDIT: I'd prefer the new sample go in the samples repo

I have the code sample already, and can submit a PR.

Close by #27157


Fix timing issue between Init and ConfigReload of Namespace Manager

Event after #1242 checked in, @awrichar saw an instance of #1250 in this test run, with slightly different symptoms https://github.com/hyperledger/firefly/actions/runs/4728313082/jobs/8389728445
~These are a nightmare to diagnose, as Go tests do not log start/end of tests (unless in full debug mode) so a goroutine bleading past the end of the test boundary is hard to debug. But with some staring, I believe the problem is that some tests was only waiting once at the end for the reload, and because of that there's the possibility for timing to happen such that the reload is detected before the first initialization has completed.~
~This proposed change adds a wait in the middle~

See additional diagnosis below

locking update to ensure state propagation issue due to a lack of locking between goroutines.
unit test file writing change to rename in, rather than write in place

panic:
assert: mock: The method has been called over 1 times.
	Either do one more Mock.On("NamespaceRestarted").Return(...), or remove extra call.
	This call was unexpected:
		NamespaceRestarted(string,time.Time)
		0: "ns1"
		1: time.Date(2023, time.April, 18, 3, 40, 40, 19021351, time.Local)
	at: [/home/runner/work/firefly/firefly/internal/namespace/plugin.go:89 /home/runner/work/firefly/firefly/internal/namespace/manager.go:314 /home/runner/work/firefly/firefly/internal/namespace/retry.go:56 /home/runner/work/firefly/firefly/internal/namespace/manager.go:301 /home/runner/work/firefly/firefly/internal/namespace/asm_amd64.s:1571]

Codecov Report

Merging #1280 (6091703) into main (5f9afe2) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1280   +/-   ##
=======================================
  Coverage   99.97%   99.98%
=======================================
  Files         308      308
  Lines       20698    20698
=======================================
+ Hits        20692    20694    +2
+ Misses          5        3    -2
  Partials        1        1

see 1 file with indirect coverage changes
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

OK, finally got a run with -v to show me the exact test:
2023-04-18T13:16:07.4937750Z === RUN   TestConfigListenerE2E
2023-04-18T13:16:07.4938500Z time="2023-04-18T13:16:07Z" level=error msg="Invalid object value '<nil>' for key 'identity'"
2023-04-18T13:16:07.4939062Z time="2023-04-18T13:16:07Z" level=info msg="Initialized namespace 'ns2' multiparty=false version=n/a"
2023-04-18T13:16:07.4939575Z time="2023-04-18T13:16:07Z" level=info msg="Namespace ns2 started"
2023-04-18T13:16:07.4940114Z time="2023-04-18T13:16:07Z" level=info msg="WAITER: Namespace started 'ns2'"
2023-04-18T13:16:07.4940566Z time="2023-04-18T13:16:07Z" level=info msg="WAITER: Namespace started 'ns2'"
2023-04-18T13:16:07.4941012Z time="2023-04-18T13:16:07Z" level=info msg="WAITER: Namespace started 'ns2'"
2023-04-18T13:16:07.4941491Z time="2023-04-18T13:16:07Z" level=info msg="Initialized namespace 'ns1' multiparty=true version=2"
2023-04-18T13:16:07.4941944Z time="2023-04-18T13:16:07Z" level=info msg="Namespace ns1 started"
2023-04-18T13:16:07.4942375Z time="2023-04-18T13:16:07Z" level=info msg="WAITER: Namespace started 'ns1'"
2023-04-18T13:16:07.4942810Z time="2023-04-18T13:16:07Z" level=info msg="WAITER: Namespace started 'ns1'"
2023-04-18T13:16:07.4943244Z time="2023-04-18T13:16:07Z" level=info msg="WAITER: Namespace started 'ns1'"
2023-04-18T13:16:07.4944073Z time="2023-04-18T13:16:07Z" level=info msg="Config file change detected. Event=WRITE Name=/tmp/TestConfigListenerE2E3947478604/001/firefly.core Size=0 Hash=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
2023-04-18T13:16:07.4944731Z time="2023-04-18T13:16:07Z" level=info msg="Detected configuration file reload"
2023-04-18T13:16:07.4945201Z time="2023-04-18T13:16:07Z" level=error msg="Invalid object value '<nil>' for key 'database'"
2023-04-18T13:16:07.4945696Z time="2023-04-18T13:16:07Z" level=error msg="Invalid object value '<nil>' for key 'identity'"
2023-04-18T13:16:07.4946193Z time="2023-04-18T13:16:07Z" level=error msg="Invalid object value '<nil>' for key 'blockchain'"
2023-04-18T13:16:07.4946705Z time="2023-04-18T13:16:07Z" level=error msg="Invalid object value '<nil>' for key 'sharedstorage'"
2023-04-18T13:16:07.4947208Z time="2023-04-18T13:16:07Z" level=error msg="Invalid object value '<nil>' for key 'dataexchange'"
2023-04-18T13:16:07.4947705Z time="2023-04-18T13:16:07Z" level=error msg="Invalid object value '<nil>' for key 'tokens'"
2023-04-18T13:16:07.4948187Z time="2023-04-18T13:16:07Z" level=error msg="Invalid object value '<nil>' for key 'auth'"
2023-04-18T13:16:07.4949144Z time="2023-04-18T13:16:07Z" level=error msg="Invalid object value '<nil>' for key 'predefined'"
2023-04-18T13:16:07.4949754Z time="2023-04-18T13:16:07Z" level=info msg="Requesting stop of namespace 'ns1'"
2023-04-18T13:16:07.4950192Z time="2023-04-18T13:16:07Z" level=info msg="Namespace 'ns1' stopped"
2023-04-18T13:16:07.4950637Z time="2023-04-18T13:16:07Z" level=info msg="Requesting stop of namespace 'ns2'"
2023-04-18T13:16:07.4951056Z time="2023-04-18T13:16:07Z" level=info msg="Namespace 'ns2' stopped"
2023-04-18T13:16:07.4951881Z time="2023-04-18T13:16:07Z" level=info msg="Config file change detected. Event=WRITE Name=/tmp/TestConfigListenerE2E3947478604/001/firefly.core Size=3150 Hash=a8dbdf99e09c0ce9449269c8b0d5ee33801fb6d2591e1f6c95459ca346b0970b"
2023-04-18T13:16:07.4952536Z time="2023-04-18T13:16:07Z" level=info msg="Detected configuration file reload"
2023-04-18T13:16:07.4953067Z time="2023-04-18T13:16:07Z" level=error msg="Invalid object value '<nil>' for key 'identity'"
2023-04-18T13:16:07.4953585Z time="2023-04-18T13:16:07Z" level=info msg="Initialized namespace 'ns1' multiparty=true version=2"
2023-04-18T13:16:07.4954126Z time="2023-04-18T13:16:07Z" level=info msg="Initialized namespace 'ns2' multiparty=false version=n/a"
2023-04-18T13:16:07.4954583Z time="2023-04-18T13:16:07Z" level=info msg="Namespace ns2 started"
2023-04-18T13:16:07.4954989Z time="2023-04-18T13:16:07Z" level=info msg="Namespace ns1 started"
2023-04-18T13:16:07.4955468Z time="2023-04-18T13:16:07Z" level=info msg="Initialized namespace 'ns3' multiparty=false version=n/a"
2023-04-18T13:16:07.4955925Z time="2023-04-18T13:16:07Z" level=info msg="Namespace ns3 started"
2023-04-18T13:16:07.4956359Z time="2023-04-18T13:16:07Z" level=info msg="WAITER: Namespace started 'ns3'"
2023-04-18T13:16:07.4956794Z time="2023-04-18T13:16:07Z" level=info msg="WAITER: Namespace started 'ns3'"
2023-04-18T13:16:07.4957236Z time="2023-04-18T13:16:07Z" level=info msg="WAITER: Namespace started 'ns3'"
2023-04-18T13:16:07.4957698Z time="2023-04-18T13:16:07Z" level=info msg="Requesting stop of namespace 'ns1'"
2023-04-18T13:16:07.4957976Z panic:
2023-04-18T13:16:07.4958231Z assert: mock: The method has been called over 1 times.
2023-04-18T13:16:07.4958638Z 	Either do one more Mock.On("NamespaceRestarted").Return(...), or remove extra call.
2023-04-18T13:16:07.4958962Z 	This call was unexpected:
2023-04-18T13:16:07.4959240Z 		NamespaceRestarted(string,time.Time)
2023-04-18T13:16:07.4959487Z 		0: "ns2"
2023-04-18T13:16:07.4959790Z 		1: time.Date(2023, time.April, 18, 13, 16, 7, 470350867, time.Local)
2023-04-18T13:16:07.4960647Z 	at: [/home/runner/work/firefly/firefly/internal/namespace/plugin.go:89 /home/runner/work/firefly/firefly/internal/namespace/manager.go:314 /home/runner/work/firefly/firefly/internal/namespace/retry.go:56 /home/runner/work/firefly/firefly/internal/namespace/manager.go:301 /home/runner/work/firefly/firefly/internal/namespace/asm_amd64.s:1571]
2023-04-18T13:16:07.4961181Z
2023-04-18T13:16:07.4961270Z goroutine 54 [running]:
2023-04-18T13:16:07.4961619Z github.com/stretchr/testify/mock.(*Mock).fail(0xc00011e550, {0xf112dc?, 0xa5?}, {0xc00028ea00?, 0x4?, 0x4?})
2023-04-18T13:16:07.4962057Z 	/home/runner/go/pkg/mod/github.com/stretchr/testify@v1.8.1/mock/mock.go:322 +0x145
2023-04-18T13:16:07.4962483Z github.com/stretchr/testify/mock.(*Mock).MethodCalled(0xc00011e550, {0x114bd32, 0x12}, {0xc00007db40, 0x2, 0x2})
2023-04-18T13:16:07.4962907Z 	/home/runner/go/pkg/mod/github.com/stretchr/testify@v1.8.1/mock/mock.go:466 +0x2a5
2023-04-18T13:16:07.4963293Z github.com/stretchr/testify/mock.(*Mock).Called(0xeac700?, {0xc00007db40, 0x2, 0x2})
2023-04-18T13:16:07.4963705Z 	/home/runner/go/pkg/mod/github.com/stretchr/testify@v1.8.1/mock/mock.go:450 +0x148
2023-04-18T13:16:07.4964197Z github.com/hyperledger/firefly/mocks/eventsmocks.(*Plugin).NamespaceRestarted(0xc00011e550, {0xc00028c384, 0x3}, {0xc000105668?, 0xc00034de08?, 0x1584de0?})
2023-04-18T13:16:07.4964822Z 	/home/runner/work/firefly/firefly/mocks/eventsmocks/plugin.go:89 +0xd2
2023-04-18T13:16:07.4965400Z github.com/hyperledger/firefly/internal/namespace.(*namespaceManager).namespaceStarter.func1(0x7fc08be61108?)
2023-04-18T13:16:07.4965880Z 	/home/runner/work/firefly/firefly/internal/namespace/manager.go:314 +0x2dd
2023-04-18T13:16:07.4966481Z github.com/hyperledger/firefly-common/pkg/retry.(*Retry).Do(0xc000254da0, {0x1027a70, 0xc0002bfa80}, {0xc000222250, 0xd}, 0xc00034df98)
2023-04-18T13:16:07.4967086Z 	/home/runner/go/pkg/mod/github.com/hyperledger/firefly-common@v1.2.3/pkg/retry/retry.go:56 +0xe4
2023-04-18T13:16:07.4967567Z github.com/hyperledger/firefly/internal/namespace.(*namespaceManager).namespaceStarter(0xc00031e1c0, 0xc0002a6840)
2023-04-18T13:16:07.4968028Z 	/home/runner/work/firefly/firefly/internal/namespace/manager.go:301 +0xd0
2023-04-18T13:16:07.4968472Z created by github.com/hyperledger/firefly/internal/namespace.(*namespaceManager).startNamespacesAndPlugins
2023-04-18T13:16:07.4968943Z 	/home/runner/work/firefly/firefly/internal/namespace/manager.go:406 +0x8e
2023-04-18T13:16:07.4969313Z FAIL	github.com/hyperledger/firefly/internal/namespace	0.080s

Adding more debug

Adding more debug, as it seems like in the Github action when there's a failure, namespace ns1 and ns2 are being stopped as part of the reload - but there's no reason for that to be the case in the test.

ok - yes, smoking gun that is the problem 🤔 - now just to work out why:
2023-04-18T14:07:14.5490168Z time="2023-04-18T14:07:14Z" level=info msg="Namespace reload summary: old=[] new=[ns1 ns2 ns3] updated=[ns1 ns2 ns3] stopping=[]"

ok - I've found it doesn't seem we hold the nsMux during Init() - so there's no guarantee the variable will have propagated to the config reload. In this test, those things happen immediately next to each other.

Ok, so it's well documented that it's not safe to trigger off a file that's being written directly to target. So that's why kubernetes etc. uses renames (in the case of k8s combined with complex softlinks) to place fully written files into a target location.
Our unit test wasn't doing that. So I've just changed the UT to do that.
Combined with the mutex change to ensure goroutine state propagation, hopefully this is finally nailed 🤞 🤞


Add one more course to "Courses" paragraph

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

Add more commits by pushing to the patch-3 branch on maidak95/freeCodeCamp.


Why is cloneDeep not implemented

It has a high usage rate

JS now provides the native function structureClone(), which I think is better than any function implemented in JS.

JS now provides the native function structureClone(), which I think is better than any function implemented in JS.
现在新的浏览器和 Node JS 可以用 structureClone() 啊，原生 API，比 JS 实现一个要好多了。

嗯 ，structuredClone()基本上能满足深拷贝的需求了


Allow more flexible date formats in Filterable List validation

This is part of the UI Improvements project, which is improving the user experience for filterable lists.
Changes

Allow single-digit month and day in filterable list date input. e.g. 10/2/2018, 1/31/2009
Allow two-digit year in date inputs. e.g. 10/10/09

Additions

Add a few front-end tests to demonstrate which date formats are allowed

Testing

With this branch running, visit http://localhost:8000/about-us/newsroom/
Try inputting different dates into the Date Rage "From:" and "To:" fields.
See that the following date formats all allow you to submit, and get a valid response:

10/25/16 (two-digit year)
9/1/16 (single-digit month and day)
10/25/2016 (four-digit year)
9/1/2016
10/2016 (just month and year)
7/2017
10/16
4/18 (month and two-digit year)
2016 (just year)

Checklist

[x] PR has an informative and human-readable title
[x] Changes are limited to a single goal (no scope creep)
[ ] Code can be automatically merged (no conflicts)
[ ] Code follows the standards laid out in the development playbook
[x] Passes all existing automated tests
[x] Any change in functionality is tested
[x] New functions are documented (with a description, list of inputs, and expected output)
[x] Placeholder code is flagged / future todos are captured in comments
[ ] Visually tested in supported browsers and devices (see checklist below :point_down:)
[ ] Project documentation has been updated
[x] Reviewers requested with the Reviewers tool :arrow_right:

Testing checklist
Should not change any visual behavior (except showing an error box under fewer conditions)

I get "invalid data" with 10/25/16

@anselmbradford Did you pull the latest version of this branch? I believe I fixed that bug in 6e9f2c4.

I have to run ./frontend.sh whenever I want to bring in new changes. Does that make it work?

I have to run ./frontend.sh whenever I want to bring in changes to javascript. Does that make it work for you?

It's still happening with ./frontend.sh


Extension from SessionManager to override the init method

What did you do?
Create an extension from SessionManger to override the init method.
extension SessionManager {

    public convenience init()
    {
        let policies: [String: ServerTrustPolicy] = ["https://www.example.com": .disableEvaluation]
        let manager = ServerTrustPolicyManager(policies: policies)
        self.init(configuration: URLSessionConfiguration.default,
                  delegate: SessionDelegate(),
                  serverTrustPolicyManager: manager)
    }
}

What did you expect to happen?
My app access the URL with self signed certificate without give me the error:
NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813)
It appears that the TrustPolicy is not working when I create the Extension. It work when I use like the code below:
    var sessionManager = Alamofire.SessionManager.default

        let sessionManager: SessionManager = {
            let serverTrustPolicies: [String: ServerTrustPolicy] = [
                "vallince.estaleiro.serpro.gov.br": .disableEvaluation
            ]

            let configuration = URLSessionConfiguration.default
            configuration.httpAdditionalHeaders = Alamofire.SessionManager.defaultHTTPHeaders

            return SessionManager(configuration: configuration, serverTrustPolicyManager: ServerTrustPolicyManager(policies: serverTrustPolicies))
        }()

This is most likely due to the fact that SessionManager already has an init that takes no parameters. I'm guessing that that init is used rather than your convenience init when you call SesssionManager(). I would've thought there'd be a compiler error to catch that, so I'm not quite sure. Can you make sure your initializer is being called at all?

I'm closing this issue. If you find that my hypothesis isn't correct and it's actually an Alamofire issue, please let us know.


database and callback

I tried to save coordinates into database in callback but I couldn't. When I tried to pass database through initDataCallback as a parameter it just doesn't do anything anymore, just stop doing anything. It freezes... When I try to open database in initCallback it doesn't finish database initialization but jumps out from the initialization code before end.
Everything works well when running from anywhere else than callbacks. I have used "wait" and "Future" in database initialization functions (open).  I also downloaded latest version which was published on Wednesday but it didn't help.
I haven't use callbacks too much before this case so it could be that I don't know something important about those.
But if someone could tell what's wrong and help me with this, I would be pleased. :)

Did you followed Use other plugins in callback ?

What does that code actually do? Is it used somewhere in example?

The code just ensure that your plugin is initialized in the background. We used PathProvider plugin in the background. You can find the codes in example;

Do I have to modify that file or just add is as it is? I added it but didn't change my app behavior. Because I have jumped directly from MS world into flutter, not so familiar with android dev yet.
App runs callback when location is changed even when app is not running but when opening database it never completes opening because it jumps out from that method and continues callback code. Anyway, although I get location correctly it is not saved...

So if there is someone who can get sqflite saving works in callback please let me know how.

All you need to do is to modify the code and change the package name according to your needs. In this case just find the package name of the database library and replace it with the PathProvider package name;

ok I finally got it work. Thank you!  👍

btw, I have database open function in initcallback and usually it works ok, but when registerLocationUpdate is just been executed then database isn't yet open when callback already runs and in my case start location isn't saved. Ofcourse I can do code to check that db is open before saving first location etc. But should callback wait that initcallback is executed before it executes?

Short answer NO, I think it is more convenient to do all of the database operation (include opening and saving ....) in the callback function; callback is a separate piece of code that would be executed every time;


[0.4] Install cloudfoundry-cli from new package

To avoid the download of untrusted packages I have updated the
Dockerfile to use a package provided by alpine testing repository.

@bradrydzewski Maybe you want to merge it? Simplifies the image...

LGTM

I will close this now, nearby half of a year open :(


Plutus Core decompiler

Hi.
I just wonder, is there any possibility to decompile Plutus Core? Could we, for instance, save clear secrets inside the blob (passing them as args to PlutusTx.compile for ex.)?
Thanks.

It is not recommended to store any kind of secrets in the scripts as they can be easily deserialized and read by anyone.

Why do you say it's essentially impossible to decompile Plutus Core given that decompilers for other languages are possible (despite difficulties)?

There are no textual names on-chain
The encoding of pattern-matching etc. is fairly obscure
The code gets optimized significantly, including after later compilation steps

You're welcome to give it a try, but it's not something I'd spend resources on.

@michaelpj Thanks for your prompt and thoughtful comments


Possible to Change size/width of bar-area/val-axis?

Hey guys,
first of all, thank you for this great library! :+1:
Maybe I overlooked it at the docs but is it possible to change the width of the "bar-area"/length of the val-axis to some specific value? My goal is to have identical val-axis lengths on both charts.

Hi @Jank1310
I don't believe there is a PowerPoint setting that allows the alignment of chart val axis' like you're aiming for... IIRC, we can only specify the entire chart area, then MS proportions the layout.


consolidated PR with changes from 13-17

Hi Frank:
As per your request, here's a consolidated PR with the changes that we're currently building with in development.
Let me know if there's anything else I can do to make this less painful.
Thanks!

I finally put together a little benchmark app to kick the tyres on this.
It's basically as I expected - serialization / deserialization is slower, but direct access updates (e.g. update by field parameters, get by field parameters rather than iteration) is a little faster.
Overall though it looks to be slower.
If I run with your newer code, compiled with
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DMAMA_ROOT=/opt/openmama && make -j

I get this:
Benchmark for iterations with updates and writes: 22.664608s
Benchmark for iterations with (mostly) just reads: 13.410863s
Benchmark for iterations with direct field lookup (no iteration): 16.292332s
Benchmark for Serialization / Deserialization tests: 33.144798s
Total for all tests: 85.512749s

As opposed to this with the old omnm version (i.e. with none of the optimizations including the strlen related changes which I expect would make it faster):
Benchmark for iterations with updates and writes: 29.021072s
Benchmark for iterations with (mostly) just reads: 14.280121s
Benchmark for iterations with direct field lookup (no iteration): 32.298950s
Benchmark for Serialization / Deserialization tests: 1.433974s
Total for all tests: 77.034348s

So the old version actually completes the benchmark faster overall. The serialization / deserialization tests are also (if anything) understated since during the tests, messages were tested 300M times, but serialization only 100M.
I appreciate the test is contrived (though honestly wasn't designed to favour one over the other) but it highlights the suspicion that these changes produce performance gains during iteration when using direct access but performance degradation when iterating (when serialization and deserialization are included in the measurement).
I have contributed my benchmarking code for you to have a look, but as it stands, the above would re-emphasize to me that this pre-indexing should be a configurable option since it appears slower overall unless you're frequently using the direct field accessors rather than iterating, or are a publishing application which is frequently updating.
There are various situations where your code will be faster and there are various situations where the previous code would be faster.
For example given a message with 100 fields inside, if you discard 99% of messages based on a field which is early in the message, the old way will always be much faster.
If you have a message with 100 fields inside, and you need to iterate multiple times, your way will be much faster.
So I would recommend an option to toggle this behaviour such as:
mama.payload.omnmmsg.indexed = true

Which could be configured in omnmmsgPayload_init

We'll take a look at this as soon as we're able.  One thought would be to build the index lazily -- that would obviously be ideal, but not sure how much effort would be involved.

Frank,
In our case we use named fields and not just fids. I also expanded on the test a little and added 7 additional fields, the results are much different. It seems that adding more fields doesn't really change the run time with our changes to omnm but the original version slows down significantly.
Our version of omnm:
Benchmark for iterations with updates and writes: 19.960340s
Benchmark for iterations with (mostly) just reads: 12.207262s
Benchmark for iterations with direct field lookup (no iteration): 14.350084s
Benchmark for Serialization / Deserialization tests: 25.520180s
Total for all tests: 72.038017s

Original version of omnm:
Benchmark for iterations with updates and writes: 78.090248s
Benchmark for iterations with (mostly) just reads: 38.457447s
Benchmark for iterations with direct field lookup (no iteration): 151.102585s
Benchmark for Serialization / Deserialization tests: 1.552331s
Total for all tests: 269.203278s

Here is the expanded test:
Benchmarker.zip

That just further reinforces to me though that it should be configurable if the performance varies according to usage. It introduces latency between the middleware bridge and the onmsg that the user cannot control.

Hi Frank:
Understand your issues with the field hints (sort of), but making changes you suggest is a bit of work on our end.
Would it make sense to re-open the individual PR's to get them out of the way in the meantime?

To be honest I suspect making it configurable could be less work overall, but whatever you feel most comfortable with works for me!

Personally, I'd rather build the hints lazily -- that way you get the benefit "automagically" if you're querying the message multiple times, but if you don't you don't pay the price.
Of course, that means keeping a "trail of bread crumbs" as the code scans through the message, which might never be used again, but that seems an insignificant cost.
OTOH, you may feel differently, so pls let me know.  If you're not OK with the lazy approach, then an option is still needed, and in that case the lazy approach is prob. overkill.

Lazy loading makes sense to me of that's something you think would be easier to implement. Its important for people measuring transport latencies since otherwise the payload would get indexed before the onmsg which could be misleading for those doing latency measurements and might otherwise attribute indexing latency to the transport / middleware rather than the payload.

Lazy loading makes sense to me of that's something you think would be easier to implement.

It wouldn't be easier, but it would be better, and would eliminate the need for a flag.  The idea being that as much as possible things should "just work".
I'll see about re-opening the other PRs so we can get those out of the way, and then we can tackle this one.


ViewModel-Tests

User story

As a SD
I want / need meet the requirements set by the customer
So that we have a successful collaboration with happy customers in the end

Acceptance criteria

[ ] * Write tests to cover the viewmodel-components of our app
[ ] * Make sure to improve the overall test code coverage by a substantial amount of percentage points

Definition of done (DoD)

It builds without errors
code has been reviewed
Build has been made and deployed on a testing environment
Code coverage >75%
All acceptance criteria were met
Documentation updated whenever needed within planning documents (Tabs: Bill of materials, Documentations)
Branch/feature was merged into dev and then main

DoD general criteria

Feature has been fully implemented
Feature has been merged into the mainline
All acceptance criteria were met
Product owner approved features
All tests are passing
Developers agreed to release

@Chippelius and @jannikbmc: Could you give us a quick update regarding the progress of this issue? Thanks in advance :)

Thank you very much!
I will discuss with the POs later whether it should already be merged or not (since my refactoring also isn't really done yet, just like the tests).


Log in to app

Overview
Implement app login.
The approach taken in this PR is after successful login the JWT is saved in local storage and also in axios's headers config so it's automatically included in subsequent requests (the saved JWT is also automatically loaded from local storage when the app starts). Then when private routes are matched, we check the expiration in the JWT payload to make sure the user is logged in and their session hasn't expired yet. If they haven't logged in or their session has expired, we send them to the login page.
Demo

Notes
~As noted in the comments in https://github.com/PublicMapping/district-builder-2/pull/79 the /api/users endpoint only returns a single user for reasons unkown, which is why "Users: none" is being displayed on the project page~ This is addressed in c6268bb
Prior to this PR, proxying was only configured for the /users path. This includes a change to put all routes behind /api and proxy that (see 853096f). It seemed like the official way to do this is by using app.setGlobalPrefix. However, when I tried that the routes would match but all validation was broken (no requests would validate) which lead me to address that issue via 6687b59
Testing Instructions

Run ./scripts/update
Restart app
Try to visit project without logging in and you should be redirected to the login page
Ensure you have a registered user (can do it like so):

$ http http://localhost:3003/api/auth/email/register email=<email> password=<password> name=<name>

Log in with bad creds and you should see an error message
Log in successfully and you should be redirected to the main page
Click the link to the project and you should be able to view it
The logged in user's email address should be displayed
Refresh and you should still be able to view it

Closes #51

Also, thanks for making the change to put everything behind /api: this was on my TODO list for a while.


Support for react v16

I got this error when I updated my react version
TypeError: Cannot read property 'bool' of undefined
./node_modules/halogen/BounceLoader.js
node_modules/halogen/BounceLoader.js:31
  28 |  * @type {Object}
  29 |  */
  30 | propTypes: {
> 31 |     loading: React.PropTypes.bool,
  32 |     color: React.PropTypes.string,
  33 |     size: React.PropTypes.string
  34 | },

hi!
which version you use?

Hi @kirillDanshin
The version is:
"halogenium": "^2.0.0-rc1"

thanks!

please checkout 2.0.0-rc2 version, this error should be fixed

Thanks! It worked.

awesome! please update to just released 2.0.0 :)


⚠ wiki.minetest.net has degraded performance

In 8a29fd0, wiki.minetest.net (https://wiki.minetest.net/Main_Page) experienced degraded performance:

HTTP code: 200
Response time: 2413 ms

Resolved: wiki.minetest.net performance has improved in 414d902 after 1 hour, 39 minutes.


FEAT: an option to have a only politically correct and positive words

Hi,
I want to use XKCD to generate trial usernames.
Something like unfixed, sardine scandal are not words I would like to give users.
Any ideas of how I could accomplish this?

The easiest way I can think of would be to create a new word list (any plain text file with one word per line will work), then use the -w option to force the generator to use that list. For a starting point, the EFF lists are under 8k entries and shouldn't have many potentially controversial entries - not a fun manual job I know, but not insurmountable!

That make sense.
I'm surprised that such a request is not more popular. I'll do a PR starting with a small list and let the community grow it.


Update Test

Included tests for:

Room
Vacancy

Codecov Report

Merging #54 (464fd59) into test-vacancy (535b16b) will increase coverage by 0.57%.
The diff coverage is 63.63%.

@@                Coverage Diff                 @@
##             test-vacancy      #54      +/-   ##
==================================================
+ Coverage           70.45%   71.03%   +0.57%
- Complexity            482      490       +8
==================================================
  Files                  85       85
  Lines                1513     1519       +6
  Branches              160      163       +3
==================================================
+ Hits                 1066     1079      +13
+ Misses                403      399       -4
+ Partials               44       41       -3

Impacted Files
Coverage Δ

.../java/seedu/address/model/util/SampleDataUtil.java
15.78% <0.00%> (-2.97%)
:arrow_down:

src/main/java/seedu/address/model/room/Room.java
95.65% <85.71%> (+24.22%)
:arrow_up:

...rc/main/java/seedu/address/model/room/Vacancy.java
69.23% <100.00%> (+44.23%)
:arrow_up:

Continue to review full report at Codecov.

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

oh no I was still updating xD


Migrate assignees for comments

Maybe you find those endpoints useful (we are using them in the Deck Android app):
https://github.com/stefan-niedermann/nextcloud-deck/blob/master/app/src/main/java/it/niedermann/nextcloud/deck/api/NextcloudServerAPI.java#L64-L92


elegant object badges

Added new elegant object badges with their respective icons

@yegor256/z please, pay attention to this pull request

Job #39 is now in scope, role is REV


Crash when double clicking on the left sidebar inventory items

Available inside the latest beta release : https://testflight.apple.com/join/QSrBK59z


⚠ Fortnite has degraded performance

In 05fd12f, Fortnite (https://fortnite.com) experienced degraded performance:

HTTP code: 200
Response time: 1602 ms

Resolved: Fortnite performance has improved in ba3116b.


Build not working (stops before downloading Unity)

Hey Tim
I tried build a few times but it always seem to stop at this point:
Deleted depots/892971/11978864/valheim_Data/StreamingAssets/fonts/default.manifest
Depot 892971 - Downloaded 245170944 bytes (584665212 bytes uncompressed)
Total downloaded: 245170944 bytes (584665212 bytes uncompressed) from 1 depots
Disconnected from Steam
Valheim data for build 11422039 not found, exiting..
(the build script may need to be updated if a patch was recently released)
Just before it is supposed to ask if I should download Unity and so on.
Any help much appreciated - very excited to try out this port you made!
Jack

Jack, I'm just another person trying to figure this out and from what I can tell, it looks like you've got a conflicting mix of [build.sh] Valheim version numbers. 11978864 is for [Patch 0.217.14] 11422039 is [Patch 0.216.9]. So it can't compute which version you wan to download and is erroring out at that point.
I just got it working with the latest patch by following the [README.md] to "1. Clone this repository" using the terminal "git clone" command. Once that was done, I copied the raw text from the latest [build.sh] at:
https://github.com/timkurvers/valheim-macos/tree/feat/patch-0.217.14
Opened the [build.sh] on my local hard drive using a text editor, selected all and pasted the updated version I just copied, saved and closed.
Then I continued using the remaining [README.md] steps and it worked. (Don't forget to have Steam open when you launch the Valheim app.) Thank for making this Tim!

It works now! Thank you so much for your help, just had to copy the build.sh text as you said.
I seem to be getting extremely good performance on a M1 Pro 14", only had some issues with the cloud sync but eventually managed to get my old world backup to load.
Thank you to everyone involved for creating this port - I was relying on GeForce Now to stream the game but now I can finally play it directly from my Mac. See you in Valhalla!!!

Glad you got this sorted! 🥳  The latest patch support is now merged (no need to grab it from the branch).


Download of ibm granite-8b-code-instruct-GGUF model fails

Bug description
The download  of  ibm-granite/granite-8b-code-instruct-GGUF fails.

This might be caused by the extension not handling redirects.
❯ curl https://huggingface.co/ibm-granite/granite-8b-code-instruct-GGUF/resolve/main/granite-8b-code-instruct.Q4_K_M.gguf
Temporary Redirect. Redirecting to /ibm-granite/granite-8b-code-instruct-4k-GGUF/resolve/main/granite-8b-code-instruct.Q4_K_M.gguf%

Operating system
Fedora 40
Installation Method
from Podman-Desktop extension page
Version
1.0.0
Steps to reproduce
Reopen Podman Desktop and click the download button for the ibm-granite/granite-8b-code-instruct-GGUF model.
Relevant log output
No response
Additional context
Podman AI Lab extesion v1.2.3

When calling the url https://huggingface.co/ibm-granite/granite-8b-code-instruct-GGUF/resolve/main/granite-8b-code-instruct.Q4_K_M.gguf we are getting the following headers
{
  'content-type': 'text/plain; charset=utf-8',
  'content-length': '130',
  connection: 'keep-alive',
  date: 'Tue, 03 Sep 2024 13:41:28 GMT',
  'x-powered-by': 'huggingface-moon',
  'cross-origin-opener-policy': 'same-origin',
  'referrer-policy': 'strict-origin-when-cross-origin',
  'x-request-id': 'Root=1-66d71208-22931bc4582cf0b917fac1b5',
  'access-control-allow-origin': 'https://huggingface.co',
  vary: 'Origin, Accept',
  'access-control-expose-headers': 'X-Repo-Commit,X-Request-Id,X-Error-Code,X-Error-Message,X-Total-Count,ETag,Link,Accept-Ranges,Content-Range',
  location: '/ibm-granite/granite-8b-code-instruct-4k-GGUF/resolve/main/granite-8b-code-instruct.Q4_K_M.gguf',
  'x-cache': 'Miss from cloudfront',
  via: '1.1 6bbb2da0f4f203dadcd8f0ae1073d674.cloudfront.net (CloudFront)',
  'x-amz-cf-pop': 'CDG52-P4',
  'x-amz-cf-id': '4hrDDhVPrDveHj4134HdFetJiKnjSvLH7H5pSyPhpCPLZhohBrxjfQ=='
}

And the location does not contains the base url, so we are failing to redirect as we are using it to redirect.


Ubuntu build error with following message

Process 'command '/home/vagrant/.gradle/nodejs/node-v4.2.2-linux-x64/bin/node'' finished with non-zero exit value 137

Could you add the --stacktrace option to your gradlew command and share the output?

@bclozel  Here is my trace report

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':sagan-client:npmInstall'.

Process 'command '/home/vagrant/.gradle/nodejs/node-v4.2.2-linux-x64/bin/node'                                                                             ' finished with non-zero exit value 1

Try:
Run with --info or --debug option to get more log output.

Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':sagan-c                                                                             lient:npmInstall'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex                                                                             ecuteActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex                                                                             ecute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExec                                                                             uter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.exec                                                                             ute(SkipUpToDateTaskExecuter.java:68)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execut                                                                             e(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecu                                                                             ter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter                                                                             .execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execut                                                                             e(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter                                                                             .execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTa                                                                             skWorker.execute(DefaultTaskGraphExecuter.java:203)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTa                                                                             skWorker.execute(DefaultTaskGraphExecuter.java:185)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorW                                                                             orker.processTask(AbstractTaskPlanExecutor.java:66)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorW                                                                             orker.run(AbstractTaskPlanExecutor.java:50)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(Defaul                                                                             tTaskPlanExecutor.java:25)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(Defau                                                                             ltTaskGraphExecuter.java:110)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTask                                                                             ExecutionAction.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute                                                                             r.java:37)
at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExec                                                                             uter.java:23)
at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecu                                                                             ter.java:43)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildEx                                                                             ecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute                                                                             r.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute                                                                             r.java:30)
at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLa                                                                             uncher.java:154)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defaul                                                                             tBuildOperationExecutor.java:90)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defaul                                                                             tBuildOperationExecutor.java:52)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(Default                                                                             GradleLauncher.java:151)
at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGra                                                                             dleLauncher.java:32)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradl                                                                             eLauncher.java:99)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradl                                                                             eLauncher.java:93)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defaul                                                                             tBuildOperationExecutor.java:90)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defaul                                                                             tBuildOperationExecutor.java:62)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradle                                                                             Launcher.java:93)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLaun                                                                             cher.java:82)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildCon                                                                             troller.run(InProcessBuildActionExecuter.java:94)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(Exe                                                                             cuteBuildActionRunner.java:28)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildA                                                                             ctionRunner.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce                                                                             ssBuildActionExecuter.java:43)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce                                                                             ssBuildActionExecuter.java:28)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(Contin                                                                             uousBuildActionExecuter.java:81)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(Contin                                                                             uousBuildActionExecuter.java:46)
at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.exe                                                                             cute(DaemonUsageSuggestingBuildActionExecuter.java:51)
at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.exe                                                                             cute(DaemonUsageSuggestingBuildActionExecuter.java:28)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.jav                                                                             a:173)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.                                                                             execute(CommandLineActionFactory.java:241)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.                                                                             execute(CommandLineActionFactory.java:214)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRunti                                                                             meValidationAction.java:35)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRunti                                                                             meValidationAction.java:24)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(                                                                             CommandLineActionFactory.java:207)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(                                                                             CommandLineActionFactory.java:169)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep                                                                             ortingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep                                                                             ortingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:33)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBoots                                                                             trap.java:55)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.j                                                                             ava:36)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.ja                                                                             va:30)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Caused by: org.gradle.process.internal.ExecException: Process 'command '/home/va                                                                             grant/.gradle/nodejs/node-v4.2.2-linux-x64/bin/node'' finished with non-zero exi                                                                             t value 1
at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNo                                                                             rmalExitValue(DefaultExecHandle.java:367)
at org.gradle.process.internal.DefaultExecAction.execute(DefaultExecActi                                                                             on.java:31)
at org.gradle.api.internal.file.DefaultFileOperations.exec(DefaultFileOp                                                                             erations.java:176)
at org.gradle.api.internal.project.AbstractProject.exec(AbstractProject.                                                                             java:841)
at org.gradle.api.internal.project.AbstractProject.exec(AbstractProject.                                                                             java:837)
at org.gradle.api.Project$exec$5.call(Unknown Source)
at com.moowork.gradle.node.exec.ExecRunner.run(ExecRunner.groovy:43)
at com.moowork.gradle.node.exec.NodeExecRunner.doExecute(NodeExecRunner.                                                                             groovy:44)
at com.moowork.gradle.node.exec.ExecRunner.execute(ExecRunner.groovy:83)
at com.moowork.gradle.node.exec.ExecRunner$execute.call(Unknown Source)
at com.moowork.gradle.node.exec.NpmExecRunner.doExecute(NpmExecRunner.gr                                                                             oovy:37)
at com.moowork.gradle.node.exec.ExecRunner.execute(ExecRunner.groovy:83)
at com.moowork.gradle.node.exec.ExecRunner$execute.call(Unknown Source)
at com.moowork.gradle.node.task.NpmTask.exec(NpmTask.groovy:74)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskF                                                                             actory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:228)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskF                                                                             actory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskF                                                                             actory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(Abstra                                                                             ctTask.java:585)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(Abstra                                                                             ctTask.java:568)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex                                                                             ecuteAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex                                                                             ecuteActions(ExecuteActionsTaskExecuter.java:61)
... 60 more

BUILD FAILED
Total time: 25.193 secs

Too bad, this doesn't say much about the error...
Is git available in the console PATH?
By any chance, do you have node/npm installed on this VM? Could you run the npm install command in the sagan-client folder? (if you don't have it , you can check nvm which is pretty useful).

@bclozel Yes, you are right, npm is missing, but after I reinstall npm I still have some error:

vagrant@vagrant-ubuntu-trusty-64:~/githost/sagan$ ./gradlew build
:sagan-client:compileJava UP-TO-DATE
:sagan-client:processResources UP-TO-DATE
:sagan-client:classes UP-TO-DATE
:sagan-client:nodeSetup UP-TO-DATE
:sagan-client:npmSetup UP-TO-DATE
:sagan-client:npmInstall
npm WARN package.json sagan@ No license field.
npm WARN prefer global<EMAIL_ADDRESS>should be installed with -g

sagan@ prepublish /home/vagrant/githost/sagan/sagan-client
jspm install

sh: 1: jspm: not found
npm ERR! Linux 3.13.0-87-generic
npm ERR! argv "/home/vagrant/.gradle/nodejs/node-v4.2.2-linux-x64/bin/node" "/home/vagrant/githost/sagan/sagan-client/node_modules/npm/bin/npm-cli.js" "install"
npm ERR! node v4.2.2
npm ERR! npm  v2.14.7
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! sagan@ prepublish: jspm install
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the sagan@ prepublish script 'jspm install'.
npm ERR! This is most likely a problem with the sagan package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     jspm install
npm ERR! You can get their info via:
npm ERR!     npm owner ls sagan
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     /home/vagrant/githost/sagan/sagan-client/npm-debug.log
:sagan-client:npmInstall FAILED
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':sagan-client:npmInstall'.

Process 'command '/home/vagrant/.gradle/nodejs/node-v4.2.2-linux-x64/bin/node'' finished with non-zero exit value 1

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

BUILD FAILED
Total time: 43.209 secs

No, I meant "what happens if you run npm install manually"?
It seems the main issue is that the gradle-node-plugin can't execute the installed binaries such as npm or jspm.
You shouldn't need to install node or npm locally, it's done automatically for you - and it's working fine on our CI build.
Could you check that you have the following files?
➜  sagan git:(master) ls -ls sagan-client/node_modules/.bin
gulp -> ../gulp-cli/bin/gulp.js
jspm -> ../jspm/jspm.js
npm -> ../npm/bin/npm-cli.js

@bclozel I meet encountered the same problem. I don't run the npm install command in the sagan-client folder.

@bclozel I meet the same problem. I don't run the npm install command in the sagan-client folder

We've moved away from JSPM and now we're using webpack with a different (hopefully more resilient setup). I'm closing this issue as a result. Thanks!

@bclozel Is there any documentation for the setup, I am having hard time even starting this project.

@suvDev yes, see https://github.com/spring-io/sagan/wiki


Right To Left TTextView

Please support Right to left in TTextView
Thanks

Try to set BiDiMode property of form

@KngStr the problem is in the caret, the text will be shown to the right but the caret is moving on the left!!!

@GaNacereddine
Caret? The TTextView does not have caret.

@KngStr Oh I'm sorry. I was talking about the Edit control.
I mixed them up.

@GaNacereddine
I do not have the Right to Left envirment to test it.
Can you fix it?

Okay I will take a look, and see what I can do.

@GaNacereddine
Thanks.

It is working with the Arabic keyboard on windows.
but it fails to render correctly on Android.
I think the asker is looking for the support for Arabic, Hebrew type of languages where the letters change shape depending on the position.
the current fmx does not support this feature.

@GaNacereddine
Thanks


[Issue-96] Fix TopBar Widget keeps being visible after Keyboard hides

Description
This PR fixes the top bar widget visibility issue due to keyboard closing event (#96) by introducing a new feature in the form of a value notifier, specifically designed to detect the dismissal of the soft-keyboard. This PR primarily impacts two components: WoltModalSheetTopBarFlow and WoltModalSheetTopBarTitleFlow.
Key points
Purpose
The primary goal of this implementation is to trigger a re-paint in the top bar components when the soft-keyboard is closed. This is essential to prevent the top bar from being stuck unresponsive after the keyboard's closing phase.
Default Behavior Sync with Scroll Controller
When isTopBarAlwaysVisible is set to false (by default), the visibility and appearance of the top bar and top bar title are synchronized with the scroll controller's position. Both WoltModalSheetTopBarFlow and WoltModalSheetTopBarTitleFlow use the scroll position data to determine how the top bar should be painted.
Challenge with Keyboard Events
While the appearance of the soft-keyboard naturally triggers scroll update events (courtesy of the Flutter SDK), its dismissal does not inherently cause a similar update in the scroll controller. This discrepancy leads to a situation where the top bar does not repaint as expected when the keyboard closes.
Solution
To address this, the implemented value notifier actively detects the dismissal of the keyboard. Upon this event, it manually triggers a repaint for the top bar flow and top bar title flow widgets. This ensures that the top bar refreshes its state appropriately, maintaining a smooth and responsive user interface.
Additional Changes

NotificationController widget inside the WoltModalSheetMainContent is removed since the scroll position is listened directly from the scroll controllers inside WoltModalSheetAnimatedSwitcher widget.
Unnecessary passing of the BuildContext to flow delegates is removed.

Screenshots

Before
After

Related Issues
#96
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process.

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[ ] My PR includes tests for all changed/updated/fixed behaviors.
[ ] All existing and new tests are passing.
[ ] I updated/added relevant documentation (doc comments with ///).
[ ] The analyzer (melos run analyze) does not report any problems on my PR.
[ ] The package compiles with the minimum Flutter version stated in the pubspec.yaml

Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?

[x] Yes, this is a breaking change. The users of this package should set their flutter_keyboard_visibility package version to minimum 6.0.0.
[] No, this is not a breaking change.

Overall looks good. I wish we didn't have to introduce a package for a such problem but if it works and tested.

I spent significant time to resolve this issue without a package but it was really difficult. Thanks for testing!


Implicitly use output of project when running dotnet swagger

When running dotnet swagger tofile you should always specify assembly where to look for the Open API definitions. Would be good if the path would be automatically constructed based on the
a) project path
b) project configuration
Since many projects follow conventions when specify names, this allow easier way to specify command
lines. Also this is more in line with dotnet tooling itself.
Original command
dotnet swagger tofile --output api.json bin/Debug/netcoreapp2.1/Api.dll v1

Proposed variants
dotnet swagger tofile --output api.json -p . v1
# dotnet swagger tofile --output api.json ./bin/Debug/{anyfolder}/{DirectoryName}.dll v1

dotnet swagger tofile --output api.json -p . -c Release v1
# dotnet swagger tofile --output api.json ./bin/Release/{anyfolder}/{DirectoryName}.dll v1

By default, current project folder should be used.
dotnet swagger tofile --output api.json -c Release v1
# dotnet swagger tofile --output api.json ./bin/Release/{anyfolder}/{DirectoryName}.dll v1

I like this proposal - would you be interested in submitting a PR?

@domaindrivendev May I ask you why do you not use some .NET Core CLI packages, like http://github.com/natemcmaster/CommandLineUtils or at least Microsoft.Extension.Configuration namespaces. This is allow not manage parsing of command line arguments.
Example .NET Configuration (which already likely pulled into project)
var switchMappings = new Dictionary<string, string>
{
    { "-c", "Configuration" },
};
var configuration = new ConfigurationBuilder()
    .AddCommandLine(args, switchMappings)
    .Build();
…
var buildConfiguration = configuration["Configuration"] ?? "Debug";

Not pushing for this, just asking what's your perspective.


adopt dbt-postgres's method of index creation

copy the implementation introduced for dbt-postgres in https://github.com/dbt-labs/dbt/pull/3106/

@swanderz this implementation is neat! could I work on this issue or is someone already working on it?

Hi @swanderz!
Do I understand correctly that we need to implement this macro for SQL Server and name it sqlserver__get_create_index_sql?
https://github.com/dbt-labs/dbt-core/pull/3106/files#diff-49fbdf0ee41b3d9ec139a881dfed1e9196c47ba014f946421f636bbf57703a6c

Hi @swanderz! Do I understand correctly that we need to implement this macro for SQL Server and name it sqlserver__get_create_index_sql? https://github.com/dbt-labs/dbt-core/pull/3106/files#diff-49fbdf0ee41b3d9ec139a881dfed1e9196c47ba014f946421f636bbf57703a6c

yep! additionally we're need a SQLServerIndexConfig for the index definition json. For another example check out dbt-firebolt's FireboltIndexConfig

Working on that issue here: https://github.com/semcha/dbt-sqlserver/commits/new-indexes


switch to react-query for all API calls in credential components

Fixed eclipse-xpanse/xpanse#626

looks good


Project Name

[x] Read the docs.
[x] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
[x] This is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.

Describe the bug
Currently, the Vite project name accepts space-separated names for a project which isn't supported in the package.json
Reproduction
yarn create @vitejs/app
yarn

enter project name as vite app or any set of words with space.

System Info

vite version: 2.0.5
Operating System: Manjaro
Node version: v14.15.2
Package manager (npm/yarn/pnpm) and version: yarn

Logs (Optional if provided reproduction)

Run vite or vite build with the --debug flag.
Provide the error log here.

You'd better do NOT add special characters in project name. This is not a good habit. A lot of tools don't support special characters in project name.

@sunkehappy 🤔yeah for that purpose can we like include validation during input from user that will be not be a big overhead I believe

@king-11 Yeah good idea. I will create a pull request to prevent user from input special characters in project name.

@yyx990803 thanks for addressing the issue


如何在自己的数据集上使用MDEQ

作者您好!我现在尝试利用MDEQ来训练自己的数据.
数据集:细胞核分割 ,只区分前景和背景.
数据目录结构已与文中所述一致,现在数据已经能够正常载入.
其余还应该在哪些地方作出修改?
非常期待您的回应.

Hi, thank you for your question! （我接下来用英语回复，方便其他人之后参考）
Overall, there are two ways that I recommend you should adapt other segmentation datasets to this repo:

Use MDEQ just like any other segmentation models. Forget about the dataloading/processing/inference code in this repo. If you just go to lib/models/mdeq.py, the model should be there already, which takes a [batch_size x n_channels x H x W] input and outputs a [batch_size x n_classes x H x W] shape tensor. The rest of the training code then should be the same, regardless of which model we use (e.g., PSPNet, PSANet, HRNet, MDEQ, etc.)--- they are just standard processing stuff. Therefore, if you have existing code, or framework, that can do these (and works on even a simply model), I think it might be the easier way to go. But if not, see my option 2 below.

If (1) above doesn't work for you, the major thing you should do is to create a file in lib/datasets that has the name [DATASET_NAME].py, just like the cityscapes.py (for the Cityscapes dataset), lip.py, etc. Go ahead and take a look at what these files are doing. I would suggest going through base_dataset.py and then create a new file based on how lip.py was written. You shouldn't need most of the things in cityscapes.py, which include some extra tweaks (e.g., they only used 19 out of 33 classes).   After you have your own [DATASET_NAME].py, you should create an experiment configuration file just like https://github.com/locuslab/mdeq/blob/master/experiments/cityscapes/seg_mdeq_SMALL.yaml. Change the entries of the configuration file according to how you designed your [DATASET_NAME].py (there shouldn't be too many changes, but make sure you do change the DATASET.DATASET entry, etc.).

After that, you should be able to load and train on the data. The inference should be very similar, and you should only be a bit careful with https://github.com/locuslab/mdeq/blob/master/lib/core/seg_function.py#L148.
Let me know if this helps!

Thank you very much for your reply, which is very useful to me. I used the second method, which is now working.

Good to hear! I'm closing this issue then, but feel free to follow up should you have any other questions!


Angora Crashes on start when fuzzing LAVA-M

I followed the tutorial in docs to build LAVA-M, and use the following command to fuzz base64:
./angora_fuzzer -i ../lava-m/base64/fuzzer_input/ -o ../output/base64_test -t ./base64.tt -- ./base64.fast -d

And it crashes on startup, and shows this message:

thread 'main' panicked at '
If your system is configured to send core dump, there will be an
extended delay after the program crash, which might makes crash to
misinterpreted as timeouts.

You can modify /proc/sys/kernel/core_pattern to disable it by:
# echo core | sudo tee /proc/sys/kernel/core_pattern
', fuzzer/src/check_dep.rs:20:9
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:59
             at src/libstd/panicking.rs:211
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:227
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:491
   5: std::panicking::begin_panic
   6: angora::check_dep::check_dep
   7: angora::fuzz_main::fuzz_main
   8: fuzzer::main
   9: std::rt::lang_start::{{closure}}
  10: std::panicking::try::do_call
             at src/libstd/rt.rs:59
             at src/libstd/panicking.rs:310
  11: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:102
  12: std::rt::lang_start_internal
             at src/libstd/panicking.rs:289
             at src/libstd/panic.rs:398
             at src/libstd/rt.rs:58
  13: main
  14: __libc_start_main
  15: _start

Is this problem related to core dump mode? But it is required by AFL, so this was already set before. How should I fix this poblem?

I have the same issue when following the instructions to fuzz base64 inside the docker container.

root@f8a44c8e576a:/angora# ./angora_fuzzer -i ../data/base64/fuzzer_input/ -o /root/output/base64 -t base64.tt -- base64.fast  -d
thread 'main' panicked at '
If your system is configured to send core dump, there will be an
extended delay after the program crash, which might makes crash to
misinterpreted as timeouts.
You can modify /proc/sys/kernel/core_pattern to disable it by:
echo core | sudo tee /proc/sys/kernel/core_pattern
', fuzzer/src/check_dep.rs:20:9
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:71
2: std::panicking::default_hook::{{closure}}
at src/libstd/sys_common/backtrace.rs:59
at src/libstd/panicking.rs:211
3: std::panicking::default_hook
at src/libstd/panicking.rs:227
4: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:491
5: std::panicking::begin_panic
6: angora::check_dep::check_dep
7: angora::fuzz_main::fuzz_main
8: fuzzer::main
9: std::rt::lang_start::{{closure}}
10: std::panicking::try::do_call
at src/libstd/rt.rs:59
at src/libstd/panicking.rs:310
11: __rust_maybe_catch_panic
at src/libpanic_unwind/lib.rs:102
12: std::rt::lang_start_internal
at src/libstd/panicking.rs:289
at src/libstd/panic.rs:398
at src/libstd/rt.rs:58
13: main
14: __libc_start_main
15: _start

Have you ran echo core | sudo tee /proc/sys/kernel/core_pattern?

I already ran echo core | sudo /proc/sys/kernel/core_pattern on my server. And I could run AFL smoothly on the server.  Is there any differences between this command and the one you gave?
The content of the file on the server:
yushanzhang@ubuntu:~$ cat /proc/sys/kernel/core_pattern
/apollo/data/core/core_%e.%p

And it is difficult to get this command run inside a docker container, because docker doesn't allow it. One explanation is here.
This is content of the file inside the docker container.
root@f8a44c8e576a:~# cat /proc/sys/kernel/core_pattern
/apollo/data/core/core_%e.%p

Angora checks your core_pattern's content to ensure if it is core. Obviously, it is not core in your server.
Please run this command outside of docker, and restart the docker again.