Server keeps loading when using // import { } from '#imports'; in the server/api directory

Environment
Node Version: v16.20.0
Nuxt Version: 3.6.2
Reproduction
https://stackblitz.com/edit/nuxt-starter-5s58h6?file=server%2Fapi%2Fcount.ts
Describe the bug
When including the commented line // import { } from '#imports'; in files under the server/api directory, the server remains in a continuous loading state. Even though the line is commented out, the issue persists. However, upon removing the mentioned line of code, the loading issue no longer occurs.
// import { } from '#imports';

export default defineEventHandler((event) => {
  return 2;
});

Additional context

Logs
No response

cc: @antfu

Fixed in<EMAIL_ADDRESS>Before the next Nuxt release, try to remove your lock and do a clean install to have the latest unimport. Thanks.


Add response_mode param

close #51
Thank you very much for your work.
I would be happy if you could fix this.

question how can we pull the data from the id_token, code, and user {} response?

question how can we pull the data from the id_token, code, and user {} response?

It seems to be good to use response type of fragment or form_post
https://developer.apple.com/documentation/signinwithapplejs/incorporating_sign_in_with_apple_into_other_platforms

Any update on this issue?

Thanks for merging @jordan-fallon-willowtree !

Thanks for merging @jordan-fallon-willowtree !


Gender Classification using Machine Learning

Issue no . 306
In this project i have developed a gender classification web application using deep learning model of CNN to classify gender into two categories as male and female with an average accuracy of 90 % of the model. The web application is developed using html, CSS and flask server. The system is able to classify image by taking input both as uploaded image and webcam.
I have trained the model under a notebook on Kaggle dataset of approx. 50,000 images under .ipynb file which includes following steps :

Data preprocessing and augmentation
EDA
model training and evaluation
4)results and analysis

output directory contains the images related to web app and output.
templates directory contains html files
static directory contains CSS files
A complete readme.md file is provided for reference
All instructions in contributor.md are obeyed while making this PR.
@sanjay-kv  as a Gssoc 2024 contributor, I request you to merge this PR

@sanjay-kv please assign labels and level as well after review


Add logging to plugin fetch treatment method

What this PR does / why we need it:
This PR introduces the asynchronous logging method to the GetTreatmentForRequest method of the XP plugin that generates treatments. This functionality was previously left out from an earlier PR as a mistake, and this PR solely serves to fix that.

Thanks for the quick review; merging this now! 🚀


[ExpressRoute] express-route peering update operation does not recognize the –route-filter parameter

The update operation does not recognize the –route-filter parameter
Command
az network express-route peering update: Update peering settings.
Arguments
--peer-asn                  : Autonomous system number of the customer/connectivity provider.
--primary-peer-subnet       : /30 subnet used to configure IP addresses for primary interface.
--secondary-peer-subnet     : /30 subnet used to configure IP addresses for secondary interface.
--shared-key                : Key for generating an MD5 for the BGP session.
--vlan-id                   : Identifier used to identify the customer.
Resource Id Arguments
--circuit-name              : ExpressRoute circuit name.
--ids                       : One or more resource IDs (space delimited). If provided, no other
'Resource Id' arguments should be specified.
--name -n                   : The name of the peering.
--resource-group -g         : Name of resource group. You can configure the default group using
az configure --defaults group=<name>.
Microsoft Peering Arguments
--advertised-public-prefixes: List of prefixes to be advertised through the BGP peering.
Required to set up Microsoft Peering.
--customer-asn              : Autonomous system number of the customer.
--routing-registry-name     : Internet Routing Registry / Regional Internet Registry.  Allowed
values: AFRINIC, ALTDB, APNIC, ARIN, LACNIC, LEVEL3, RADB,
RIPENCC.
However it’s available in the “create” operation:
Command
az network express-route peering create: Create peering settings.
Arguments
--circuit-name          [Required]: ExpressRoute circuit name.
--peer-asn              [Required]: Autonomous system number of the customer/connectivity
provider.
--peering-type          [Required]: BGP peering type for the circuit.  Allowed values:
AzurePrivatePeering, AzurePublicPeering, MicrosoftPeering.
--primary-peer-subnet   [Required]: /30 subnet used to configure IP addresses for primary
interface.
--resource-group -g     [Required]: Name of resource group. You can configure the default group
using az configure --defaults group=<name>.
--secondary-peer-subnet [Required]: /30 subnet used to configure IP addresses for secondary
interface.
--vlan-id               [Required]: Identifier used to identify the customer.
--shared-key                      : Key for generating an MD5 for the BGP session.
Microsoft Peering Arguments
--advertised-public-prefixes      : List of prefixes to be advertised through the BGP peering.
Required to set up Microsoft Peering.
--customer-asn                    : Autonomous system number of the customer.
--route-filter                    : Name or ID of a route filter to apply to the peering
settings.
--routing-registry-name           : Internet Routing Registry / Regional Internet Registry.
Allowed values: AFRINIC, ALTDB, APNIC, ARIN, LACNIC, LEVEL3,
RADB, RIPENCC.

Currently this is blocked pending action from the service team

This should be fixed now.


Alters URI for clients

This alters the URI for the clients-endpoints from /client to /user/[username]/client.
That also adds a further test to make sure the provided username matches the currently logged in user. Otherwise a "not-allowed" message will be provided.
This updates all the links and also adds a link to the clients to the UI of the user-profile-page

@heiglandreas - looks like there is a minor conflict here - could you rebase for me please :)

@liam-wiltshire I'll do almost anything for you ;)
Might take some hours though…


SDWebImage (~> 3.8) required by Podfile

Hi.
I created a new Objective-C project with SDWebImage, but given the a dependency error when excuting pod install.
When I came back to version 3.7.6, everything was right again.
Here is my Podfile
platform :ios, '9.0'
target 'MyApp' do
pod 'SDWebImage', '~>3.8'
end

And the error message
[!] Unable to satisfy the following requirements:

- `SDWebImage (~> 3.8)` required by `Podfile`

None of your spec sources contain a spec satisfying the dependency: `SDWebImage (~> 3.8)`.

You have either:
 * out-of-date source repos which you can update with `pod repo update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.

Issue Info

Info
Value

Platform Name
ios

Platform Version
9.0

SDWebImage Version
e.g. 3.7.6

Integration Method
e.g. cocoapods

Xcode Version
e.g. Xcode 7.3.1

Repro rate
e.g. all the time (100%)

3.8 was not released yet. It will very soon, stay tuned.

Got it, thanks :)


Fix table of contents (installation section) in README.md

Links in TOC section describing installation are broken. I fixed the links, but I had to rename inner "Installation" section to "Installation with Shake" since there already exists "Installation" section (parent) and #installation link would wrongly refer to it.

Oops, my bad, totally forgot about TOC.
Wouldn't it be better to rename installation with Shake to Building or Compiling maybe? I specifically removed with Shake pieces everywhere as unneeded clarification after Makefile and powershell scripts mentions were removed.
Also, personally these installation sections inside installation section look confusing to me. Maybe they should be moved from under installation to top level? @alanz @fendor

Wouldn't it be better to rename installation with Shake to Building or Compiling maybe? I specifically removed with Shake pieces everywhere as unneeded clarification after Makefile and powershell scripts mentions were removed.
Sure, I've updated PR and renamed to "Building".

Also, personally these installation sections inside installation section look confusing to me. Maybe they should be moved from under installation to top level? @alanz @fendor
I thought about it, and noticed that the contents of "Building" section logically belong to "Installation from source" section. Maybe we should merge them? Then there will be just "Installation" section with three subsections "From Nix", "on ArchLinux", "From source" — these three then could be moved to top level.

@antonlogvinenko thanks for update, LGTM then.
Regarding sections: building section is definitely belongs to installation from source as a direct continuation after installing required libs and downloading source code.

Regarding sections: building section is definitely belongs to installation from source as a direct continuation after installing required libs and downloading source code.
Ok, I moved "Building" section inside "Installation from source".

@antonlogvinenko thank you


Roll Flutter Engine from 1328c4bc6299 to 3bfd5985bfb1 (1 revision)

https://github.com/flutter/engine/compare/1328c4bc6299...3bfd5985bfb1
2023-02-15<EMAIL_ADDRESS>Roll Skia from df42581d2765 to 40bb09c44a51 (1 revision) (flutter/engine#39647)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jacksongardner@google.com,rmistry<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Commit queue failed; closing this roll.


Add example of using HtmlElementView.fromTagName to flutter.dev

HtmlElementView.fromTagName currently has the following example in its dartdoc:
 import 'package:flutter/widgets.dart';
 import 'package:web/web.dart' as web;

 // ...

 class MyWidget extends StatelessWidget {
  const MyWidget({super.key});

  @override
  Widget build(BuildContext context) {
    return HtmlElementView.fromTagName(
     tagName: 'div',
     onElementCreated: (Object element) {
        element as web.HTMLElement;
       element.style
           ..backgroundColor = 'blue'
            ..border = '1px solid red';
     },
    );
  }
}

https://github.com/flutter/flutter/blob/3da9bc169837d223496439b6d5f6b7e1a82d4318/packages/flutter/lib/src/widgets/platform_view.dart#L413
https://github.com/flutter/flutter/pull/139696 is planning on removing the dependency to package:web in Flutter, so while the above code example is valid, it does not pass analysis as Flutter no longer depends on package:web. This example should now instead move to flutter.dev once that PR removes it from the dartdoc.

Moved from flutter/website as this covers API docs.


[BUG]: Type error with postgresjs strings/dates in version 0.30

What version of drizzle-orm are you using?
0.30.1
What version of drizzle-kit are you using?
0.20.14
Describe the Bug
I'm using Drizzle with postgresjs and recently updated to v0.30.1, where I know the driver was updated to always return strings for dates.
Many of my queries then failed with an error ERR_INVALID_ARG_TYPE: The "string" argument must be of type string or an instance of Buffer or ArrayBuffer. Received an instance of Date".
Here's an example of a failed query that produced that error message:
const startDate = subDays(new Date(), 30) // Date object

const results = await db
  .select({
    id: sessions.id,
    userId: sessions.userId,
  })
  .from(sessions)
  .where(gte(sessions.timestamp, startDate))

Where sessions.timestamp is defined as timestamp('timestamp', { mode: 'date', withTimezone: true }) in my schema.
When I convert startDate to a string with .toISOString(), the query works, but I get the following type error:
No overload matches this call.
  Overload 1 of 3, '(left: PgColumn<{ name: "timestamp"; tableName: "sessions"; dataType: "date"; columnType: "PgTimestamp"; data: Date; driverParam: string; notNull: true; hasDefault: true; enumValues: undefined; baseColumn: never; }, {}, {}>, right: Date | SQLWrapper): SQL<...>', gave the following error.
    Argument of type 'string' is not assignable to parameter of type 'Date | SQLWrapper'.
  Overload 2 of 3, '(left: Aliased<string>, right: string | SQLWrapper): SQL<unknown>', gave the following error.
    Argument of type 'PgColumn<{ name: "timestamp"; tableName: "sessions"; dataType: "date"; columnType: "PgTimestamp"; data: Date; driverParam: string; notNull: true; hasDefault: true; enumValues: undefined; baseColumn: never; }, {}, {}>' is not assignable to parameter of type 'Aliased<string>'.
      Type 'PgColumn<{ name: "timestamp"; tableName: "sessions"; dataType: "date"; columnType: "PgTimestamp"; data: Date; driverParam: string; notNull: true; hasDefault: true; enumValues: undefined; baseColumn: never; }, {}, {}>' is missing the following properties from type 'Aliased<string>': sql, fieldAlias
  Overload 3 of 3, '(left: never, right: unknown): SQL<unknown>', gave the following error.
    Argument of type 'PgColumn<{ name: "timestamp"; tableName: "sessions"; dataType: "date"; columnType: "PgTimestamp"; data: Date; driverParam: string; notNull: true; hasDefault: true; enumValues: undefined; baseColumn: never; }, {}, {}>' is not assignable to parameter of type 'never'.ts(2769)

Any tips would be appreciated. Thank you!
Expected behavior
No response
Environment & setup
No response

I am having the same issue on version 0.30.4 when i pass Date objects to queries. The last version on which passing Dates worked correctly was 0.29.3

@gp27 Please keep me posted if you find a solution or workaround for this. I'm surprised that more people don't appear to be experiencing this since it's such a basic use case, so I feel like I must be overlooking something obvious.

Quick update - I've narrowed down the source of the issue to instances where a date is passed to the sql operator, either directly (sql`${dateHereWillBreakThings}) or in a sql.placeholder(date). Doing that worked in v 0.29.x, but not in 0.30.x.
It still works to pass a date to a filter operator (e.g. gte(sessions.timestamp, startDate)).
The workaround that worked for me for now is to convert any dates used with the sql operator to strings, like sql`${date.toISOString()}.

I tried to investigate this issue further.
I think it has been introduced with this PR #1659, which fixed an issue with the postgres driver where timestamps with mode "string" that should have been returned by queries as string values, were actually parsed into Date objects.
When the parsers for timezone related types were switched, so were the serializers:
https://github.com/Angelelz/drizzle-orm/blob/b29a5e1a837cbbb45be5e2caf3564c0493c28d08/drizzle-orm/src/postgres-js/driver.ts#L28
The replacements of those serializers is probably what is causing this issue and #2009 as well.
I am not sure it was necessary to replace the serialziers as well, since the issue was on the parsing side, but I may be wrong. Maybe @Angelelz who authored the fix might have some further info about it.

The replacement of the serializer and parsers was necessary to guarantee that the same parsing/serializer code from Drizzle will work for both postgres.js and node-PG interchangeably. Unfortunately I have very little time lately to dedicate to drizzle but if somebody puts together a quick reproduction it will make it easier to investigate/fix.

Until this is solved, a temporary workaround is to create a custom type:
import { customType } from "drizzle-orm/pg-core"

export const customDate = customType<{
    data: string
    driverData: Date
}>({
    dataType() {
        return "date"
    },
    fromDriver(value: Date): string {
        return value.toISOString().slice(0, 10)
    },
})


Target class [Filament\Support\Commands\Aliases\MakeIssueCommand] does not exist.

Package
filament/filament
Package Version
v3.2.32
Laravel Version
v10
Livewire Version
v3.0.0
PHP Version
PHP 8.3.0
Problem description
After the last update, I get an error when i try to update the package saying:
Target class [Filament\Support\Commands\Aliases\MakeIssueCommand] does not exist.
Expected behavior
Update without any bug
Steps to reproduce
Update to the latest version.
Reproduction repository
https://github.com/filamentphp/support
Relevant log output
I guess after the update of filamentphp/support package.

This was added use Filament\Support\Commands\Aliases\MakeIssueCommand as MakeIssueCommandAlias;

It should be use Filament\Support\Commands\MakeIssueCommand as MakeIssueCommandAlias;

Just ran into this as well running composer update. Rolled back for now.

So sad that this is "closed" because of a repo URL.
Just purchased Mailcoach (Yes, aware it isn't your product) and this error is breaking the installation.
Prime example of why requiring a repo URL is ridiculous.

https://github.com/filamentphp/filament/pull/11387

This only seems to be an issue when you install Filament without filament/filament, like Mailcoach does. This issue states filament/filament as the package but I don't think it's accurate.
I've released a patch to move the class into the correct directory, should be fine now
And the repo URL requirement isn't going anywhere. It has not hindered this issue getting fixed, and remember that issues like this could just quote filamentphp/demo if the issue is there (which it isn't, hence why some further investigation into the fact that it only happens when you dont have the panel builder is installed would have resulted in more accurate PRs)


Version mismatch issue

Hi,
Im trying to run this with my compiled carla. But I cant get your backend to work, this is the following error I get while running:
WARNING: Version mismatch detected: You are trying to connect to a simulator that might be incompatible with this API  WARNING: Client API version     = 0.9.9  WARNING: Simulator API version  = 0.9.9-12-gb67ba6c3-dirty  terminate called after throwing an instance of 'std::bad_alloc'   what():  std::bad_alloc ./run.sh: line 16:     6 Aborted                 (core dumped) ./carlaviz/backend/bin/backend ${CARLA_SERVER_IP} ${CARLA_SERVER_PORT}
As you can see the version is right, my compiled one just has extra things on it (Not sure why) But im sure its 0.9.9

CarlaViz 0.9.9 works with CARLA <IP_ADDRESS>, which is the latest version with some bugs fixed.

Hi,
Im complied carla with the latest version from source.
Im still getting your error, anything I can do to fix it?
Thanks

Hi,
I think the latest source files of CARLA contain some changes from <IP_ADDRESS>. Thus, I recommend you to download from this page. Please download <IP_ADDRESS> version if possible.


[Advanced Approval Workflows] Cleanup the logic responsible for building policy.employeeList

Coming from this project, we have this follow-up polish issue – we need to refactor the logic that is responsible for building the data on the frontend that is later sent to update policy.employeeList.
Having following policy:
Admin: A
Member: 1
Member: 2

When advanced approvals is turned on, the employee list looks like this:
A submitsTo A
1 submitsTo A
2 submitsTo A

If I edit that workflow to set 2 as the additional approver, the frontend sends this payload:
A submitsTo A forwardsTo 2
1 submitsTo A
2 submitsTo A

That's mostly OK, but since submitsTo isn't changing for anyone, the payload could be more simple with just:
A forwardsTo 2

Issue OwnerCurrent Issue Owner: @anmurali

What's the status of this? Are we just waiting for the PR to be deployed to production? I see it was deployed to staging 2 weeks ago, but surely there has been a production deploy since then?

@anmurali Please help to handle payment here

@anmurali can you please assist with paying @DylanDylann for a C+ review of the PR?

@anmurali Please help to check the above comment

Offer is here

@anmurali Great! I accepted it


Add RELEASE.md file describing process

See my comment on https://github.com/coagulant/coveralls-python/issues/128 -- if we make the process as simple as that, this may be overkill.

Even if it is automatic, it is a good idea to have a description of what goes on to make all this.

Good point, rather be as explicit as possible, anyway.


Hdock receptor and ligand

Hello!
I am very interested in your research and have some questions that I hope you can guide me on. In your study, regarding the part about Hdock docking, how do you define the receptor and ligand in the Hdock docking process? Are the receptor and ligand the antigen or the antibody? Thank you very much for taking the time to answer these questions. Your insights and experience are of great significance to our research work. Looking forward to your reply!
Best regards!

Hi, thanks for your interest in our work! The usage of hdock can be found here: https://github.com/THUNLP-MT/dyMEAN/blob/main/models/pipeline/hdock_api.py. The receptor is the antigen and the ligand is the antibody.

Thank you very much for your prompt and informative response. I appreciate your clarification regarding the roles of the receptor and ligand in the Hdock docking process.
However, in my previous readings of papers or materials related to Hdock, I was unable to find explicit definitions, which leads me to inquire about the basis for this delineation. Could you please elaborate on the criteria or principles that guide the classification of the receptor as the antigen and the ligand as the antibody in your research? Understanding the rationale behind this distinction would greatly enhance my comprehension of the docking process and its applications.
Thank you once again for your time and guidance. I am looking forward to your further insights.

I think this might be a convention in drug discovery. Usually we regard the target protein as the receptor, and the drug as the ligand. Another project on antibody design also adopts this convention: https://github.com/luost26/diffab/blob/main/diffab/tools/dock/hdock.py.

Thank you for providing this insightful explanation and for sharing the additional resource. It's very helpful for my understanding and research.


Feature: Version a log to allow compacting

I am using a log to maintain a document store. Documents can be added edited and removed and these actions are stored into log. Each client then reduces the log to reconstruct the store. However some of these actions are quite verbose eg editing just adds the document again with different text but the same id.
It would be nice if I could compact a log so it only has the latest version of each document and then increment a version number. Other clients would know not to sync out of date versions and scrub previous versions if a new version is available.
I know I can create new log but I would be keen to keep the same private and public keys as the data being presented does not change.

you might be interested in https://github.com/maxogden/dat
if you really need to, you can roll this yourself. hyperlog and swarmlog
have a db property, which has a method del(key, cb)
On Sat, Apr 9, 2016 at 2:53 PM nick merrill<EMAIL_ADDRESS>wrote:

maybe you want hyperkv?
On Sat, Apr 9, 2016 at 2:26 PM Phil Holden<EMAIL_ADDRESS>wrote:

I am using a log to maintain a document store. Documents can be added
edited and removed and these actions are stored into log. Each client then
reduces the log to reconstruct the store. However some of these actions are
quite verbose eg editing just adds the document again with different text
but the same id.
It would be nice if I could compact a log so it only has the latest
version of each document and then increment a version number. Other clients
would know not to sync out of date versions and scrub previous versions if
a new version is available.
I know I can create new log but I would be keen to keep the same private
and public keys as the data being presented does not change.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/substack/swarmlog/issues/5

@elsehow thanks what will happen when this syncs with other clients will they delete this node from the log too?
Sorry this is unrelated but how can I generate ssbKeys on the client? I want each client to generate them and put them in localstorage if not there already. Get lots of errors when I import ssb-keys via webpack. I don't want a server.

@philholden no, in fact, these clients will replicate those nodes to you! but, if all clients are on the same page about which ones to delete, then it shouldn't be (too much of) a problem.
note that "being on the same page about which ones to delete" is non-trivial. sequence numbers are not globally unique, and timestamps bring along their own problems with clock synchronization. a mechanism that relies on the causal linking structure of hyperlogs is most reliable - you might want to look into vector clocks.
if you are just looking for a distribute key-value store that any client can update, hyperkv may be for you.
as far as generating ssbKeys - i believe these keys are just ed25519 keys, which you should be able to generate with chloride/browser. though, you should verify this. if it works, let us know, and/or post a module that generates ssb keys in the browser!

@elsehow I am actually using redux for clientside state and using swarmlog to sync actions across clients. I am persisting the database using an IndexDB.
Looks like chloride/browser does not have methods for generating elliptic curves keys. But I found supercop.js which works:
import supercop from 'supercop.js'

export default function generateKeys() {
  const keys = supercop.createKeypair()
  return {
    public: `${keys.pubKey.toString('base64')}.ed25519`,
    private: `${keys.privKey.toString('base64')}.ed25519`
  }
}

How does Swarmlog scale i.e. if I have 100,000 users subscribing to the same log will it do something intelligent so every client is only connected directly to a handful of other clients.
Thanks for your help. Where is a good place to get help hyperlog, swarmlog etc is there a channel somewhere?

How does Swarmlog scale i.e. if I have 100,000 users subscribing to the same log will it do something intelligent so every client is only connected directly to a handful of other clients.

i believe signalhubs are smart, and make sure that there is some path between any two given users in a swarm, without connecting everyone to everyone (though you should verify this with @substack or @mafintosh).
another nice thing is, swarmlog will take many signalhubs, so we don't have to rely on any single running service.
i have asked questions on both #scuttlebutt and #dat on freenode. those projects focus around other things, but folks do hang out there.

also, using hyperlogs to persist as sync application state is cool to me. i have long been thinking about modelling application state as an append-only log of atomic events, where the state is some reduce over a global log of actions.
do note the question of ordering though. if you do log.createReadStream(), you may see a different order of events that hit the redux store on different clients.

Thanks this is awesome you can launch something and it goes global over night and don't have to think about load balancers, hosting, cloud & containers.


chore: move Filter to rpc-types

move Filter type from primitives to rpc-types where it belongs.

🤖 Generated by Copilot at d4b7dcd
Refactored the Filter type and related types to be defined in the reth_rpc_types crate instead of the reth_primitives crate. This avoids duplication and improves consistency across the RPC crates. Updated the imports and usages of these types in the reth_rpc_api and reth_rpc crates accordingly. Removed unused imports from several files.

Codecov Report

Merging #2648 (d4b7dcd) into main (f2cf105) will decrease coverage by 53.56%.
The diff coverage is 0.00%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@             Coverage Diff             @@
##             main    #2648       +/-   ##
===========================================
- Coverage   71.23%   17.67%   -53.56%
===========================================
  Files         499      498        -1
  Lines       63423    63426        +3
===========================================
- Hits        45179    11211    -33968
- Misses      18244    52215    +33971

Flag
Coverage Δ

integration-tests
17.67% <0.00%> (-0.01%)
:arrow_down:

unit-tests
?

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

Impacted Files
Coverage Δ

crates/primitives/src/lib.rs
90.00% <ø> (-10.00%)
:arrow_down:

crates/rpc/rpc-api/src/engine.rs
50.00% <ø> (ø)

crates/rpc/rpc-api/src/eth_filter.rs
100.00% <ø> (ø)

crates/rpc/rpc-types/src/eth/filter.rs
0.00% <0.00%> (ø)

crates/rpc/rpc-types/src/eth/pubsub.rs
0.00% <ø> (ø)

crates/rpc/rpc/src/engine.rs
0.00% <ø> (ø)

crates/rpc/rpc/src/eth/filter.rs
7.45% <ø> (-10.59%)
:arrow_down:

crates/rpc/rpc/src/eth/logs_utils.rs
0.00% <ø> (-57.04%)
:arrow_down:

crates/rpc/rpc/src/eth/pubsub.rs
8.33% <ø> (ø)

... and 346 files with indirect coverage changes


Support for act as a relay aggregator

@vitorpamplona mentioned in this thread https://primal.net/e/nevent1qqsfhcczv96pdst6w472s00j95cj4kcaefetv08xvee6wl5tg6l76xspr4mhxue69uhkummnw3ez6ur4vgh8wetvd3hhyer9wghxuet5qyt8wumn8ghj7un9d3shjtnwdaehgu3wvfskueqpp4mhxue69uhkummn9ekx7mqppamhxue69uhkummnw3ezumt0d5pzq3huhccxt6h34eupz3jeynjgjgek8lel2f4adaea0svyk94a3njdn5gk0q that there might be a bounty for what I understand to be closely related to this functionality. I'm interested in exploring the actual design of what's needed and have some ideas around a minor protocol extension to make it seamless for the user. Where can I chat with like-minded people?

to be honest I'm not understanding what vitor wants.
I was going to start with a simple wot feature to fetch your events and the events from your follows
I think he wants to fetch everything from all relays

My idea goes more into a Sync worker.
The worker must not only keep my outbox and inbox relays in full sync with the local relays (Citrine and others), but also, from time to time, hit every single relay out there (4000 relays) and download, delete, update things that shouldn't be there. On top of that, it would be nice if the worker also synced my events with the inbox/outbox relays of every single person tagged in the event, or if this is like a NIP-29 chat, sync with the correct relay that chat is using.
If a new like to my post shows up in a Japanese relay, that like should be downloaded and synced with my inbox relays.
The worker should provide a report on which relays are deleting my events that were synced previously. Which events are being broadcasted outside of my inbox/outbox relays and which relays are refusing to update old versions of replaceable events (which confuses everyone in Nostr).
The app MUST provide a sense of security to the user, that every single one of the user's events can be found in the correct places and no third-party relay is deleting things from the user. The same should happen to all Blossom servers that users are using.
It's a huge task. I don't know if citrine should do that. I think it would be better to separate them into Sync apps that do their best to protect the user's information.

To bring blossom into the mix sure is out of scope and I'm not sure why you would want to scan all relays. Aside from that not really scaling well, I don't see the value for the user neither. If somebody liked my post but did not deliver the event to my inbox, his client is broken and to fetch all events from all relays will never scale, so let's not pretend his client was not broken.
It would be nice to have research into relays and clients' behavior to be able to make informed recommendations to users to not use those that behave poorly and I would have resources to sponsor somebody doing this but I suspect that's not what Vitor had in mind.
What I want and what I see in scope for citrine is to make citrine a reliable backup of all events relevant to me. That means, citrine should know

my inbox/outbox relays
my follows
their relays
track global replies and reactions to events of interest
send my events to my outbox relays and the respective inbox relays of people I replied to

I envision a "homeland" relay configuration for this type of relay. It would be encrypted as it would not be meant for others to interact with but a client supporting the homeland protocol would exclusively talk to it for all its needs.


Toolbox/Workspace Tab Help button issues

[ ] Clicking button loads the develop page in the app window, with no affordance to go back.
[ ] Redundant to future Menu help menu options.

Ahhh... window was the same size as original, obscuring it.  We should look into behavior that would load a normal browser for this.


trying to work with protected apis (functions)

if (req.Headers.TryGetValue("x-ms-client-principal", out var header))
        {
            var data = header[0];
            var decoded = Convert.FromBase64String(data);
            var json = Encoding.ASCII.GetString(decoded);
            principal = JsonSerializer.Deserialize<ClientPrincipal>(json, new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
        }

I tried to follow the example of the documentation, but it is not working.
1- this head is not being passed to the function (or I don't know what configuration is missing for this to occur)
2- forcing this head through the postman, an error occurs when trying to convert the json, because the result of it does not go as expected.

I also tried the strategy of passing the 'ClaimsPrincipal', via injection, but it does not recover the logged user's session.

Hi @drma-dev, the x-ms-client-principal header should be passed to the function if the user is logged in. Are you still seeing the absence of the header even after successfully logging in?

This Header is not being passed, it passes in another called 'Token'.
And as I said, even if I force it to be passed, this error occurs that I showed.

So the value you passed in should never hit the function since we intentionally don't pass it on to the function to prevent spoofing attacks. Our x-ms-client-principal value if set is the only such header that'll reach the function but will only reach the function in the case of a logged in user. Do you mind giving us some app details (default hostname/app name) so that we can investigate things on our end?

https://github.com/drma-dev/VerusDate/tree/develop/src/VerusDate.Web

The header is not available locally. We are working on a local emulator that will allow you to simulate auth. Until then, you’ll likely want to have a separate code path while running locally to use a fake user.
The ClaimsPrincipal binding is currently not compatible with Static Web Apps auth, this will likely be fixed in the coming months.
The header should be passed correctly when deployed to Static Web Apps and the client is logged in. @mkarmark does the function need to be protected to receive the header? The current routes.json doesn’t have any routes that require authenticated users.

I was not testing on localhost. I can't even log in.

The authentication control I'm doing in the blazor itself, so I didn't define any of that in the routes.
The problem is with the APIs. Do I have to define API authentication control on the routes?

The only information passed in the header is this one, which I believe is because of the component I am using.

You can’t see the header in the browser network trace. We have a proxy that validates that cookie and injects a header from the cookie’s contents into the request that is received by the function app. You can only see the x-ms-client-principal in the function app. Can your function access the header?

@anthonychu
var principal = StaticWebAppsAuth.Parse(req);
return new OkObjectResult("id=" + principal.Claims.FirstOrDefault(w => w.Type == ClaimTypes.NameIdentifier)?.Value);

Do you have the cookie included in the Postman request?

I had tested from the wrong place. I made the call from within the site.

I had tested from the wrong place. I made the call from within the site.

I tried to recover the token, to work locally, but without success.
if (req.Headers.TryGetValue("x-ms-client-principal", out var header))
  {
      var data = header[0];
      return new OkObjectResult(data);
  }
  else
  {
      return new OkObjectResult("nothing");
  }

var token = await Http.Profile_GetView("123");
        Console.WriteLine("token:" + token);

I tried to recover the token, to work locally, but without success.
if (req.Headers.TryGetValue("x-ms-client-principal", out var header))
  {
      var data = header[0];
      return new OkObjectResult(data);
  }
  else
  {
      return new OkObjectResult("nothing");
  }

var token = await Http.Profile_GetView("123");
        Console.WriteLine("token:" + token);

It's magically working now. :)

It's magically working now. :)

@drma-dev do you happen to know why it's working for you now? I'm running into issues where I can get the header just fine when testing locally with the SWA CLI, but whenever I deploy it suddenly stops working, throwing a "Object reference not set to an instance of object" error when I try using the suggested code in: https://docs.microsoft.com/en-us/azure/static-web-apps/user-information?tabs=csharp

it's been a while. I don't even know if this emulator already exists to run local. uses the same component I'm using, this should help.

Actually, I found the solution. I'm using a custom auth provider (Auth0), and the claims that get returned from the deployed object are different than the local version. Auth0's name claim type only returns the full name for some reason, so I had to make this modification to the code in the example I linked above:
From:
identity.AddClaim(new Claim(ClaimTypes.Name, principal.UserDetails));

To:
identity.AddClaim(new Claim(ClaimTypes.Name, principal.UserId));

This lets me retrieve the Auth0Id (e.g. auth0|xxxxxxxxxxxxxxxxxxx) instead of the default item in the user details property, which is just the first and last name of the user (e.g. Mark Zuckerberg)

Hi, we are experiencing a very similar issue. We have deployed a Azure Static Web App and a BYO Azure Function.
@anthonychu I hope it is okay to hijack this "older" issue.
The x-ms-client-principal is never available if we call the API through our static web app SWAURL.azurestaticapps.net/api/....
For the authorisation we configured Azure Active Directory Version 2 (https://docs.microsoft.com/en-us/azure/static-web-apps/authentication-custom?tabs=aad#azure-active-directory-version-2). The User is authenticated and the auth cookie will be correctly send to the SWA as we can see in the request inspector from the browser.

(Please ignore the repsonse code of 403, this comes from our api as the client principal header is missing.


test(connlib): resolve DNS resources in tunnel_test

Currently, tunnel_test only sends ICMPs to CIDR resources. We also want to test certain properties in regards to DNS resources. In particular, we want to test:

Given a DNS resource, can we query it for an IP?
Can we send an ICMP packet to the resolved IP?
Is the mapping of proxy IP to upstream IP stable?

To achieve this, we sample a list of IpAddr whenever we add a DNS resource to the state. We also add the transition SendQueryToDnsResource. As the name suggests, this one simulates a DNS query coming from the system for one of our resources. We simulate A and AAAA queries and take note of the addresses that connlib returns to us for the queries.
Lastly, as part of SendICMPPacketToResource, we now may also sample from a list of IPs that connlib gave us for a domain and send an ICMP packet to that one.
There is one caveat in this test that I'd like to point out: At the moment, the exact mapping of proxy IP to real IP is an implementation detail of connlib. As a result, I don't know which proxy IP I need to use in order to ping a particular "real" IP. This presents an issue in the assertions: Upon the first ICMP packet, I cannot assert what the expected destination is. Instead, I need to "remember" it. In case we send another ICMP packet to the same resource and happen to sample the same proxy IP, we can then assert that the mapping did not change.

@conectado When starting this, I realised we may have to refactor a few things in regards to the callbacks. In particular, in order to send a DNS query into connlib, I need to target one of the configured DNS servers but I don't know, what the generated DNS servers are because those are sent to the app via the callback.
I think we can easily change this though. We can simply introduce an event that connlib emits whenever its interface and DNS servers change. This event can then be picked up by the tests.

There is one caveat in this test that I'd like to point out: At the moment, the exact mapping of proxy IP to real IP is an implementation detail of connlib. As a result, I don't know which proxy IP I need to use in order to ping a particular "real" IP. This presents an issue in the assertions: Upon the first ICMP packet, I cannot assert what the expected destination is. Instead, I need to "remember" it. In case we send another ICMP packet to the same resource and happen to sample the same proxy IP, we can then assert that the mapping did not change.

@conectado Curious to hear what you think of this and whether you can think of any alternatives.

There is one caveat in this test that I'd like to point out: At the moment, the exact mapping of proxy IP to real IP is an implementation detail of connlib. As a result, I don't know which proxy IP I need to use in order to ping a particular "real" IP. This presents an issue in the assertions: Upon the first ICMP packet, I cannot assert what the expected destination is. Instead, I need to "remember" it. In case we send another ICMP packet to the same resource and happen to sample the same proxy IP, we can then assert that the mapping did not change.

@conectado Curious to hear what you think of this and whether you can think of any alternatives.

oops, didn't read this before the review.
can we update the client_proxy_ip_mapping upon the send dns query transition?

can we update the client_proxy_ip_mapping upon the send dns query transition?

No because I don't know how connlib maps the IPs. There are various lists and sets involved internally so the order isn't stable!

can we update the client_proxy_ip_mapping upon the send dns query transition?

No because I don't know how connlib maps the IPs. There are various lists and sets involved internally so the order isn't deterministic.

but don't we advance the state until we see a dns reply? we could assert that we actually see a reply at some point and use that to capture the ip?


Convert to class library project

The application project has to be converted to a class library project that will compile into a dll to be consumed by external projects.

project converted.


I am getting error "The element is expected to be an "

What is your Scenario?
I am getting error "The element is expected to be an " while using t.switchtoIframe(Selelctor('frame[name='f4']'));
HTML -
<html>
<head></head>
<frameset>
     <frame name='f1'></frame>
     <frameset>
            <frame name='f2'></frame>
            <frame name='f3'></frame>
            <frame name='f4'></frame>
      </frameset>
      <frame name='f5'></frame>
</frameset>
</html>

What is the Current behavior?
I am getting error "The element is expected to be an " while using t.switchtoIframe(Selelctor('frame[name='f4']'));
What is the Expected behavior?
It should switch to frame f4
What is your public website URL? (or attach your complete example)
I am getting error "The element is expected to be an " while using t.switchtoIframe(Selelctor('frame[name='f4']'));
What is your TestCafe test code?
I am getting error "The element is expected to be an " while using t.switchtoIframe(Selelctor('frame[name='f4']'));
HTML -

Your complete configuration file
No response
Your complete test report
No response
Screenshots
No response
Steps to Reproduce
1.I am getting error "The element is expected to be an " while using t.switchtoIframe(Selelctor('frame[name='f4']'));
HTML -

2.
3.
TestCafe version
1.13.0
Node.js version
v16.17.0
Command-line arguments
npm start
Browser name(s) and version(s)
No response
Platform(s) and version(s)
No response
Other
No response

Hi @Mayur0619,
I see that you try to switch to an element with the frame tag, but the switchToIframe method is used only for elements with the iframe tag.
Also, I see that you use 1.13.0. Please update TestCafe to the latest version.

Then what should be used instead of switchToIframe()

The only way is to replace your frame with iframe. A duplicate of https://github.com/DevExpress/testcafe/issues/1565.
Updating won't resolve the issue. However, later versions are more stable in working with iframe.


Update dependencies

This PR updates the dependencies.

bors r+

We could wait for https://github.com/CliMA/RRTMGP.jl/pull/392, but that will only impact the CUDA version.


This is what ctrl-c looks like on Mac OS X

This is what ctrl-c looks like on Mac OS X

Originally posted by @DannyCork in https://github.com/sharkdp/hexyl/issues/35#issuecomment-473576503

Thank you, but I don't think we need a second ticket. The Ctrl-C can currently be broken. This is already addressed in #35, as you mentioned.


[BUG] -Waiting for for Ingress istio-ingress.istio-system failed

Describe the bug
The codebuild fails with "Waiting for for Ingress istio-ingress.istio-system". I was on step 9 of the installation guide when I experienced the problem(orbit deploy env -f manifest.yaml ). I am not sure but I think the elb should be created but I see there is no elb created.
To Reproduce
[Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'](https://awslabs.github.io/aws-orbit-workbench/deploy-steps
Clone AWS Labs github repository
Install the CLI
Install AWS CodeSeeder
Generate a new manifest
Deploy a new foundation
Deploy a new toolkit
Deploy credentials
Deploy docker images
Deploy environment)
See error

18:25:32,255][_remote.py   : 30] [CODEBUILD] [2022-07-26 16:25:19,924][k8s.py       : 78] ingress[] is empty
[2022-07-26 18:25:32,255][_remote.py   : 30] [CODEBUILD] [2022-07-26 16:25:19,924][k8s.py       : 84] Cannot find Ingress istio-ingress.istio-system
[2022-07-26 18:25:32,256][_remote.py   : 30] [CODEBUILD] [2022-07-26 16:25:19,925][k8s.py       : 88] Waiting for for Ingress istio-ingress.istio-system, sleeping for 1 minute (attempt: 4)
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Below screenshot shows running pods for istio-system namespace.
pod "istio-cleanup-secrets-1.1.6-j8qx5" and pod "istio-security-post-install-1.1.6-889gj" are showing "0/1     Completed "

Below screenshot shows running pods fo rorbit-system namespace.

Below screenshot shows running pods for kube-system namespace.

Below screenshot shows running pods for orbit-system-ssm-daemons namespace.

Below screenshot shows running pods for kubeflow namespace.

Namespaces: knative-serving, anonymous, cert-manager

ENDPOINTS

Desktop (please complete the following information):

OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

istio deploys the alb-ingress-controller in the kube-system namespace. it's worth checking the logs for that pod to see if it is erroring. the ingress controller is responsible for creating the Application Load Balancer (ALB) used as the entrypoint to kubeflow. at times on a failed deployment it will create ALBs but not clean them up and they need to be removed manually so that the ingress controller can recreate them. logs from the ingress controller should have additional info

The logs shows that it fails to create ELB because the VPC doesn't have internet gateway attached to it. See below error.

Our networking setup for our publicly accessible subnets goes through VGW. These are the subnets configured to be used for ELB in the manifest file.

Please note: alb-ingress-controller is not in the kube-system but kubeflow namespace. I hope that is fine.
I created Another nodegroup that is using our public subnets(the one with VGW attached to them) and labeled the alb-ingress-controller to run in that nodegroup. see below.

We have other EKS clusters in other accounts with similar setup and we can access them via ELB attached to the ingress controller.

Managed to find why this is happening. The tag in my subnets were wrong
https://aws.amazon.com/premiumsupport/knowledge-center/eks-load-balancer-controller-subnets/
Resolve the single subnet discovery error

Add the appropriate tags on your subnets to allow the AWS Load Balancer Ingress Controller to create a load balancer using auto-discovery.

Example of private subnets tags:
kubernetes.io/role/internal-elb                Set to 1 or empty tag value for internal load balancers
Example of public subnets tags:
kubernetes.io/role/elb                         Set to 1 or empty tag value for internet-facing load balancers

glad you found that. i was just now getting time to look into it.


pagination

for e.g. http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?&retmode=json&version=2.0&db=gds&term=GSE48968&field=ACCN&usehistory=y which has 2428 results but we can only do 1000 at a time we should implement a batched fetcher that basically paginates through all of the result ids

I've done bionode-ncbi search gds GSE48968 | json -ga0 uid > list1.txt and checked against the IDs in http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?&retmode=json&retmax=2428&version=2.0&db=gds&term=GSE48968&field=ACCN&usehistory=y and got exactly the same 2428 IDs. I'm still not sure why piping directly to wc gives 2427 instead of 2428, but at least pagination is working so I'm closing this.


:bug: Fix: bug with memory-client transport not being strongly typed #1289

Description
Concise description of proposed changes
Testing
Explain the quality checks that have been done on the code changes
Additional Information

[ ] I read the contributing docs (if this is your first contribution)

Your ENS/address:

#1290  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @roninjin10 and the rest of your teammates on  Graphite


python-dev required info in README

should be mentioned that python-dev is required

Feel free to submit a PR with the added instructions - I'll be sure to merge it.


Create an end-to-end demonstration of a file transfer

This issue tracks all activity related to creating a demo for our DTS prototype that isn't captured elsewhere. It also documents the internal stages of the demo process in a way that encourages discussion and relates to technical issues.
File Transfer Procedure

An authenticated user (logged into KBase with an Orcid ID, for now) selects a set of files to transfer from a DTS search of the JGI Data Portal. These files are identified by their unique (JAMO) IDs.
The user makes a transfer request to DTS, including all relevant information:

source and destination databases (JGI Data Portal and KBase, respectively)
a list of file IDs identifying files to be transferred
the Orcid ID of the user

The DTS forwards the transfer request to its task manager and begins processing it (described below).
The DTS forwards all requests for transfer status to the task manager, which responds with the information, which is then sent back to the requestor. The possible ultimate outcomes for a transfer are success or failure (not counting "suspension," which Globus offers with an ability to pause a transfer).

DTS Task Manager Flow
The DTS task manager is a program that runs in a single execution thread and handles requests taken from thread-safe queues (via Golang's channels). The Task Manager tracks and updates all file transfers, which are stored as entries in a single table (the DTS's "source of truth"). Each file transfer is represented as a "transfer task" with all related transfer and status information.
Below, we describe the behavior of the task manager as it responds to various requests from the DTS service itself.
Creating a new transfer task

The DTS requests that a new file transfer task be added to the list managed by the task manager.
The task manager queries the source database for information on the requested file IDs.
The source database responds with a list of Frictionless DataResources corresponding to the given file IDs.
The task manager then requests that the source database begins the process of staging the files with the requested IDs on the filesystem attached to its transfer endpoint, obtaining a UUID to track the status of the staging operation.
The task manager then records the staging status in the task, creates a UUID for the file transfer itself, and stores the task in its table of managed tasks using this UUID.
The task manager returns the file transfer UUID to the DTS service, which propagates back to the user and may be used to request status information.

Handling transfer task status requests

The DTS forwards a status request for a task with a given UUID to the task manager.
The task manager uses the UUID to look up the corresponding task. If the task is not found, the task manager logs an error and notifies the DTS that no such task exists. The DTS reports this to the user.
The task manager checks to see whether the files have yet been staged. If not, it notifies the DTS that the transfer is still staging.
If the file has been staged, the task manager checks to see whether the file transfer has completed. If not, it notifies the DTS that the file transfer is in progress (or in some other state indicated by the underlying endpoint logic [e.g. Globus]).
If the files have been successfully transferred but no manifest has been generated and transferred, the task manager notifies the DTS that the file transfer is being "finalized", which can be interpreted to mean that the DTS is generating and transferring the manifest.
If the manifest has already been successfully transferred, the task manager notifies the DTS that the file transfer operation has completed. Information about the file transfer is retained by the DTS for a configurable time period.

Monitoring and advancing task progress
The DTS sends a ping to the task manager once during a specified time interval (configurable, 1 minute by default). This ping tells the task manager to check and update the state information for each task in its maintained table.
For each unfinished transfer task:

If the task's status indicates that its files are still being staged, the task manager contacts the source endpoint to query whether the requested files have finished staging. If so, the task manager updates its state information and requests that the source endpoint initiate a transfer to the destination endpoint. For each file in the transfer, its path on the source endpoint is prepended by a prefix that identifies the user on the destination endpoint and the UUID of the file transfer (e.g. johnson/62a4ead3-86ca-459d-8a0c-53123a4e46a6. The source endpoint returns a unique UUID that the task manager uses to check the status of the file transfer.
If the task's status indicates that its files are being transferred, the task manager queries the source endpoint for the status of the transfer. If the transfer has completed, the task manager generates a manifest file for the transfer locally and initiates the transfer of this manifest to the destination endpoint from its own local endpoint (all endpoints are currently implemented using Globus). This manifest transfer has an associated UUID that the task manager uses to check its status.
If the task's status indicates that the manifest is being generated, the task manager queries its local endpoint for the status of this transfer. If the transfer has succeeded, the task manager marks the transfer task as completed.

Next Steps

[X] - Implement stopgap KBase orcid -> user mapping
[x] - Implement a persistent store of transfers to allow DTS to be stopped and restarted and continue monitoring progress
[ ] - Test some transfers from JDP -> KBase that require files to be restored from tape
[ ] - Implement a simple UI for searching the JDP, selecting files for transfer, checking transfer status

Note: looks like the "root folder" for the NERSC DTN endpoint should be set to /global/dna/dm_archive/.


[GAPRINDASHVILI] Adjusts printwidth to 120, ignores all strings for intl that exceed

fixes https://bugzilla.redhat.com/show_bug.cgi?id=1596264
Its like  #443 CEPT FOR G
cc @mzazrivec
🎁

thanks @kedark3 for the bz!!!! <3 🙇

Merge anyone? I'd like to rebase https://github.com/ManageIQ/miq_v2v_ui_plugin/pull/440 on top of this one (thanks Allen).

@simaishi Can you do the honors here? Thanks.

@AllenBW @mzazrivec  Both this PR and https://github.com/ManageIQ/miq_v2v_ui_plugin/pull/440 are needed for https://bugzilla.redhat.com/show_bug.cgi?id=1596264 ?

@simaishi correct! yeah its a catchall translation bz 😋

@simaishi Yup, although I have to rebase https://github.com/ManageIQ/miq_v2v_ui_plugin/pull/440 before it can be merged.

😭 ok will get to this in a bit

@simaishi okie dokie, we're g2g, yah did the right thing thou... this one was gonna cause trouble either way, either everything else backported would break or this one would, much prefer the single place to fix 😏 💟


Official upstream update

i'm not actually a c++ developer, so i'm not 100% sure if i done all right..
i try to compile & run and all was okay

cc @cavallium

Thank you! I'll wait for @giuseppeM99 feedback

LGTM :+1:


Fix #422: Markdown formatting for chat history

@TheR1D is there any procedure I need to do for assigning a reviewer?

Ah ok good catch. Before enabling it only for default, what are your thoughts on wrapping assistant messages with markdown code block if we are in code mode? I think that would look very nice and it makes sense because the assistant is outputting code after all.
We can either change how the message is stored, or we can do this only for show_messages() by detecting mode and whether it's an assistant message.

Ah ok good catch. Before enabling it only for default, what are your thoughts on wrapping assistant messages with markdown code block if we are in code mode? I think that would look very nice and it makes sense because the assistant is outputting code after all.
We can do this only for show_messages() by detecting mode and whether it's an assistant message.
The main concern here would be not outputting markdown wrapper when user is expected to redirect to file. But I think the use case for that is only this:
sgpt --code --chat c1 "a python file that says hello" > hello.py
sgpt --code "a python file that says hello" > hello.py

Both of which do not use show_messages

You're right, we can use markdown code block when showing --code conversations with show_messages. May be we can apply md formatting for --shell conversations as well. For instance wrap assistant responses with "inline code" using backticks ``, e.g. ls -la | sort

Sounds good. I'll need to change how conversations are stored for this because we don't currently store the role along side the messages, only a json list of messages, so show-chat has no way of knowing.
My idea is to change the format from a list of messages to an object like this:
{
  "role": "...",
  "messages": [
    ...
  ],
}

This is also good for future if we ever want to store more metadata about the conversations.
Will take a look this weekend.

Ok, @TheR1D please take a look.
Some demos:

Thank you, @jeanlucthumm. I will review it during this week. I believe we may need to make some changes.

Hey @jeanlucthumm, thank you for the PR. After reviewing the changes, I believe this feature could be implemented more concisely. We can reuse the initial_message method available in ChatHandler. Here's an example:
@classmethod
def initial_message(cls, chat_id: str) -> str:
    chat_history = cls.chat_session.get_messages(chat_id)
    return chat_history[0] if chat_history else ""

Then we can slightly change logic in show_messages.
@classmethod
def show_messages(cls, chat_id: str) -> None:
    # Prints all messages from a specified chat ID to the console.
    init_message = cls.initial_message(chat_id)

    if "use and apply markdown" in init_message.lower():
        for message in cls.chat_session.get_messages(chat_id):
            if message.startswith("assistant"):
                Console().print(Markdown(message))
            else:
                typer.secho(message, fg=cfg.get("DEFAULT_COLOR"))
            typer.echo()
        return

    for index, message in enumerate(messages):
        color = "magenta" if index % 2 == 0 else "green"
        typer.secho(message, fg=color)

I think this is more suitable solution since we are following the system prompt, and it would be compatible with custom roles. It will not wrap --code conversations into a code block, but after giving it some more thought, I don't see many benefits in rendering the code using a markdown block. I think --code will mostly be used when a user wants to redirect clean code output elsewhere. If Markdown is required, we can prompt code generation using the default ShellGPT role. Could you also include tests to make sure it works as expected?
Thank you for interest and effort.

Sure, let's do it this way. Will take a look this weekend!

@TheR1D Ok I implemented your suggested change and also added unit tests. I also updated the documentation for custom roles so users are aware of this functionality.

Ok finished!

Thank you @jeanlucthumm, merged.


Set object_id and object_type when creating device.

@cbulock found an issue resulting in lights not working after a state change. After tons of debugging and testing it turns out that that some devices, in this case Caseta Wireless Dimmers, don't return their object_id and object_type when receiving a state update from pubnub. This is clearing an issue with Wink. However, since the object_id and object_type are present when pulling the device's info from Wink's API this PR just sets those in variables and never queries the json_state for them again.
There are also a few changes in the light_bulb.py code that were added as a result of testing that I think make sense so I left them in. Same with the validation of the JSON in the update methods.

Coverage decreased (-0.1%) to 94.235% when pulling 8ab8af6ec13dc06eee5dcbedb216da2cab8919cd on w1ll1am23:object_id_and_type_bugfix into dc2902a9a4853310b5e687a084af6675e3b58f7e on python-wink:master.

Coverage decreased (-0.1%) to 94.235% when pulling 8ab8af6ec13dc06eee5dcbedb216da2cab8919cd on w1ll1am23:object_id_and_type_bugfix into dc2902a9a4853310b5e687a084af6675e3b58f7e on python-wink:master.


Experiment: OpenID Connect

What's this PR do?
⚠ 🚧 👷
How should this be reviewed?
🙈
Any background context you want to provide?
References DoSomething/northstar#428.
💃
Relevant tickets
Fixes DoSomething/northstar#423.
Fixes DoSomething/northstar#424.
Fixes DoSomething/northstar#425.
References DoSomething/northstar#426.
Checklist

[ ] Documentation added for new features/changed endpoints.
[ ] Tested on staging.
[ ] Pinged a PM if this is a larger PR that would benefit from some additional testing love.

Things we should continue with:

[ ] Add a feature flag for swapping out the login form.
[ ] Add a /user/openid route so we can test OpenID login without exposing to normal users.
[ ] Make sure everything still works if the OpenID Connect module is not enabled.
[ ] Deal with email conflict when authorizing as an existing Drupal account.

So for the "email conflict when authorizing as an existing Drupal account" task above, it looks like it checks for existing Drupal users by comparing the sub claim (Northstar ID) against Drupal's authmap table – this makes total sense, but isn't how we're currently storing that value (it's in a custom field).
We'll need to make a little script to copy those values over, and then potentially drop the custom field.

¡OLÉ! :sheep: it!

¡OLÉ! :sheep: it!


Fix odo component create / odo create interactive text

[kind/bug]
What versions of software are you using?

Operating System: macOS
Output of odo version: v1.0.0-beta1

How did you run odo exactly?
odo create (or odo component create)
Actual behavior
odo component create
? Which component type would wish to create  [Use arrows to move, type to filter]
> dotnet
  httpd
  java
  nginx
  nodejs
  perl
  php

Expected behavior
"Which component type would wish to create" doesn't make sense. I recommend we change it to "Which component type do you wish to create" to match odo service create.
Any logs, error output, etc?

/assign @danielhelfand

/kind Bug


python310Packages.pypugjs: 5.9.10 -> 5.9.11

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python310Packages.pypugjs is: "PugJS syntax template adapter for Django, Jinja2, Mako and Tornado templates"
meta.homepage for python310Packages.pypugjs is: "https://github.com/kakulukia/pypugjs"
meta.changelog for python310Packages.pypugjs is: ""
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS
gjs result is not automatically checked, because some tests take a long time to run

Rebuild report (if merged into master) (click to expand)

22 total rebuild path(s)

11 package rebuild(s)

11 x86_64-linux rebuild(s)
11 x86_64-darwin rebuild(s)

First fifty rebuilds by attrpath
buildbot
buildbot-full
buildbot-ui
python310Packages.buildbot
python310Packages.buildbot-full
python310Packages.buildbot-ui
python310Packages.pypugjs
python39Packages.buildbot
python39Packages.buildbot-full
python39Packages.buildbot-ui
python39Packages.pypugjs

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/vn861hw72d501kckcf555456x007fz95-python3.10-pypugjs-5.9.11 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python310Packages.pypugjs https://github.com/r-ryantm/nixpkgs/archive/dd1e0890ad4a08779f54293c088b3d6524a4651d.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/vn861hw72d501kckcf555456x007fz95-python3.10-pypugjs-5.9.11
ls -la /nix/store/vn861hw72d501kckcf555456x007fz95-python3.10-pypugjs-5.9.11/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

8 packages built:

buildbot (python39Packages.buildbot)
buildbot-full (python39Packages.buildbot-full)
buildbot-ui (python39Packages.buildbot-ui)
python310Packages.buildbot
python310Packages.buildbot-full
python310Packages.buildbot-ui
python310Packages.pypugjs
python39Packages.pypugjs

Maintainer pings
cc @lopsided98 for testing.

@ofborg test buildbot


collection: Synchronize all .yamllint.yml files

Solves issue #823.
Relates to https://github.com/sap-linuxlab/community.sap_install/issues/810 and https://github.com/sap-linuxlab/community.sap_install/pull/811.

Hi @Wabri - Can you please have a look?


NuitkaHints.py - Cannot find suitable C Compiler

Hi,
As per the description, I only get the error "Cannot find suitable C Compiler" when trying to build an exe using NuitkaHints.py, whereas if I use "python -m nuitka --mingw64 script.py" then everything works perfectly.
Some info about my environment:

python -m nuitka --version
<IP_ADDRESS>
Python: 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]
Executable: C:\Python38\python.exe
OS: Windows
Arch: x86_64

I have mingw64 installed at C:\MinGW64 and the bin directory is in PATH, which is confirmed by running the following:

g++ --version
g++ (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The full text of my error output below:

python nuitka-hints.py script.py
NUITKA v<IP_ADDRESS> on Python 3.8.5 (win32) is compiling 'script.py' with these options:
--standalone
--recurse-none
--hinted-json-file=script-38-win32-64.json

Nuitka-Plugins:INFO: hinted-mods: 'hinted-mods' is adding the following options:
Nuitka-Plugins:INFO: hinted-mods: --recurse-to=zipfile and 176 more modules
Nuitka-Plugins:INFO: hinted-mods: drop site
Nuitka-Plugins:INFO: hinted-mods: drop _collections_abc
Nuitka-Plugins:INFO: hinted-mods: drop ipaddress
Nuitka-Plugins:INFO: hinted-mods: drop dummy_threading
Nuitka:WARNING: Not recursing to unused 'future'.
Nuitka:WARNING: Not recursing to unused '_compression'.
Nuitka:WARNING: Not recursing to unused '_weakrefset'.
Nuitka:WARNING: Not recursing to unused 'abc'.
Nuitka:WARNING: Not recursing to unused 'bz2'.
Nuitka:WARNING: Not recursing to unused 'copyreg'.
Nuitka:WARNING: Not recursing to unused 'email._encoded_words'.
Nuitka:WARNING: Not recursing to unused 'email._parseaddr'.
Nuitka:WARNING: Not recursing to unused 'email._policybase'.
Nuitka:WARNING: Not recursing to unused 'email.charset'.
Nuitka:WARNING: Not recursing to unused 'email.encoders'.
Nuitka:WARNING: Not recursing to unused 'email.errors'.
Nuitka:WARNING: Not recursing to unused 'email.feedparser'.
Nuitka:WARNING: Not recursing to unused 'email.iterators'.
Nuitka:WARNING: Not recursing to unused 'enum'.
Nuitka:WARNING: Not recursing to unused 'fnmatch'.
Nuitka:WARNING: Not recursing to unused 'genericpath'.
Nuitka:WARNING: Not recursing to unused 'heapq'.
Nuitka:WARNING: Not recursing to unused 'http.client'.
Nuitka:WARNING: Not recursing to unused 'importlib._bootstrap'.
Nuitka:WARNING: Not recursing to unused 'importlib._bootstrap_external'.
Nuitka:WARNING: Not recursing to unused 'importlib.abc'.
Nuitka:WARNING: Not recursing to unused 'json.decoder'.
Nuitka:WARNING: Not recursing to unused 'json.encoder'.
Nuitka:WARNING: Not recursing to unused 'locale'.
Nuitka:WARNING: Not recursing to unused 'lzma'.
Nuitka:WARNING: Not recursing to unused 'nturl2path'.
Nuitka:WARNING: Not recursing to unused 'pathlib'.
Nuitka:WARNING: Not recursing to unused 'posixpath'.
Nuitka:WARNING: Not recursing to unused 'queue'.
Nuitka:WARNING: Not recursing to unused 'quopri'.
Nuitka:WARNING: Not recursing to unused 'random'.
Nuitka:WARNING: Not recursing to unused 'selectors'.
Nuitka:WARNING: Not recursing to unused 'shlex'.
Nuitka:WARNING: Not recursing to unused 'shutil'.
Nuitka:WARNING: Not recursing to unused 'stat'.
Nuitka:WARNING: Not recursing to unused 'string'.
Nuitka:WARNING: Not recursing to unused 'stringprep'.
Nuitka:WARNING: Not recursing to unused 'traceback'.
Nuitka:WARNING: Not recursing to unused 'typing'.
Nuitka:WARNING: Not recursing to unused 'uu'.
Nuitka:WARNING: Not recursing to unused 'weakref'.
scons: warning: MSVC_USE_SCRIPT set to False, assuming environment set correctly.
File "C:\Python38\lib\SITE-P~1\nuitka\build\SINGLE~1.SCO", line 498, in createEnvironment
Error, cannot locate suitable C compiler. You have the following options:
a) If a suitable Visual Studio version is installed, it will not be located
automatically, unless you install pywin32 for the Python installation
below "C:\Python38".
b) To make it find Visual Studio without registry execute from Start Menu
the 'Visual Studio Command Prompt' or "vcvarsall.bat". That will add
Visual Studio to the "PATH". And it then will be detected.
c) Install MinGW64 to "C:\MinGW64" or "\MinGW", where then it is automatically
detected or add it to PATH before executing Nuitka. But be sure to pick the
proper variant (32/64 bits, your Python arch is 'x86_64'), or else cryptic errors
will be shown.
Normal MinGW will not work! MinGW64 does not mean 64 bits, just better
Windows compatibility.
Cygwin based gcc will not work.
MSYS2 based gcc will not work.
clang-cl will only work if MSVC already worked.

If you don't pass --mingw64 to Nuitka, which apparently hinted compilation does not, then it can hardly work. Does it accept such options?


a way to color a sprite?

the sh1106 library lets you make "sprites" by loading data into a framebuffer using a color mode of your choice, such as this
import framebuf

RED = (255, 0, 0)

def LoadSprite(filename, width, height):
        # print(file)
        with open(filename, 'rb') as f:
            f.readline() # magic number
            f.readline() # creator comment
            f.readline() # dimensions
            data = bytearray(f.read())
        return framebuf.FrameBuffer(data, width, height, framebuf.MONO_HLSB)

GirlR = LoadSprite('GirlR.PBM', width=16, height=16)

and then you can display it onto the screen like this
 display.blit(GirlR, 64, 35, 0, RED)
buffer, x, y, key(invisible color), color of sprite(optional)
where this is what blit is doing, which seems very similar to the "draw_sprite" except you can't select a key (invisible color) or a color to use for the sprite.
def blit(self, fbuf, x, y, key=-1, palette=None):
        super().blit(fbuf, x, y, key, palette)
        self.register_updates(y, y+self.height)

pretty much just curious how hard it would be to expand on draw_sprite to support any framebuffer color mode and drawing with the key and color selection.
I'm very new to all of this and found my sh1106 screen to be very easy to work with like this (and uses very little ram) but I really wanted to move onto a color oled!

You can use framebuf with sprites to achieve similar results.
For example, in the image below I draw an ostrich sprite with a green background  over a landscape sprite.

I added a demo to the project called demo_framebuffer.py for the above example.
I don't want to modify the base code because this approach is memory intensive and would preclude use on less powerful boards.

oh thank you for the demo! read over it and it seems very simple! I will test it later but do you know if this would also let me use my own color modes? I have been working on a game and only need 16 colors or so (because of they style) so I wouldn't really use RGB565.
thank you for the quick response and very clear sample!

This SSD1351 library supports 16-bit color, but the display can handle 18-bit color as well. In earlier datasheets, there was mention of an 8-bit mode by setting REMAP 0x74 [7:6] to 0, but this detail is omitted in later datasheets. So, it's uncertain if the display natively supports a 256-color mode. You could try it out to see.
Alternatively, you can overlay a framebuffer with lower color depth onto one with higher color depth. To do this, you need to create a palette that defines the corresponding high-depth colors for each of the lower-depth framebuffer pixels.

I added an example called demo_pbm.py based on your code.  Thanks for the contribution!

oh that demo looks great! thank you!


TypeError: evaluate() got an unexpected keyword argument 'batch_size'

ok，When I run this code as follow, I have some error.
Code:
This code is from https://github.com/mouradmourafiq/tensorflow-lstm-regression ,
I found  the error may be result from some code:
validation_monitor = learn.monitors.ValidationMonitor(X['val'], y['val'],
every_n_steps=PRINT_STEPS,
early_stopping_rounds=1000)
regressor.fit(X['train'], y['train'], monitors=[validation_monitor], logdir=LOG_DIR)
Then, here is the error message:
INFO:tensorflow:Error reported to Coordinator: <type 'exceptions.TypeError'>, evaluate() got an unexpected keyword argument 'batch_size'
INFO:tensorflow:Error reported to Coordinator: <type 'exceptions.TypeError'>, evaluate() got an unexpected keyword argument 'batch_size'
Traceback (most recent call last):
File "model.py", line 178, in
regressor.fit(X['train'], y['train'],monitors=[validation_monitor], logdir=LOG_DIR)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/base.py", line 166, in fit
monitors=monitors)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 578, in _train_model
max_steps=max_steps)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/graph_actions.py", line 280, in _supervised_train
None)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/supervised_session.py", line 270, in run
run_metadata=run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/recoverable_session.py", line 54, in run
run_metadata=run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/coordinated_session.py", line 70, in run
self._coord.join(self._coordinated_threads_to_join)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/coordinator.py", line 357, in join
six.reraise(*self._exc_info_to_raise)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/coordinated_session.py", line 66, in run
return self._sess.run(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/monitored_session.py", line 107, in run
induce_stop = monitor.step_end(monitors_step, monitor_outputs)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/monitors.py", line 396, in step_end
return self.every_n_step_end(step, output)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/monitors.py", line 687, in every_n_step_end
steps=self.eval_steps, metrics=self.metrics, name=self.name)
TypeError: evaluate() got an unexpected keyword argument 'batch_size'
@mouradmourafiq
Environment info
Operating System:
ubuntu14.04 python2.7 tensorflow with only CPU

This code is not part of the tensorflow project.  Please consider asking the author of that code, or post your request for assistance on StackOveflow.

Did you solve the problem ?

I met the exact same issue when using tflearn. Has anybody been able to fix it?

i guess the tensorflow api has changed and that s why you get this error.


Basic unsecured server not working

When I use the demo that comes with Telegraph the server starts and works perfectly, however when I try to just test an unsecured server it doesn't work.
The demo code that works:
server = Server(identity: identity, caCertificates: [caCertificate])
    server.webSocketConfig.pingInterval = 10
    server.webSocketDelegate = self

    // Define the demo routes
    server.route(.get, "hello/:name", serverHandleGreeting)
    server.route(.get, "hello(/)", serverHandleGreeting)
    server.route(.get, "secret/*") { .forbidden }
    server.route(.get, "status") { (.ok, "Server is running") }
    server.serveBundle(.main, "/")

    // Start the server on localhost, we'll skip error handling for the demo
    // Note: if you test in your browser, don't forget to type https://
    try! server.start(onPort: 9000)
    serverLog("Server is running at https://localhost:9000")

My test of a basic server that doesn't work:
        let server = Server()

        server.route(.get, "status") { (.ok, "Server is running") }

        try! server.start(onPort: 9000)

Did you make sure to access it on a correct IP (and port) and through HTTP not HTTPS? Also what does does not work mean? Does the app break or is it just that the server is not listening without any apparent error?

I tried to connect to it using localhost:9000. By "does not work" I mean the code runs but can't access the server from the browser. There are no errors in the console.
When running the example code I get this:

But when I run the basic server I get this:

You are using HTTPS in your second picture. You said you are configuring unsecure server - as your example code suggests as well. Does it work with http://?

No, I tried that as well, I just didn't catch it for the picture.
http:// gets the same thing.

I see. I don't have experience with using localhost, what I did was include the embedded (unsecured) server in an app and then connect to the phone's local network IP from a browser on a laptop (both the Mac I deployed the app from and a different one). What steps are you doing here to be able to use localhost? I am asking so I can try and reproduce this myself to try to help further if possible.

Oh I just realized you are probably using a macOS app instead of an iOS app right?

Ya I am,  I was just going to test if it works on IOS.

It didn't work on IOS either.

@SmileAppDev I am able to reproduce this issue. Can't assist you further sadly, but hopefully @Zyphrax will be. Interestingly, port 80 works for me on iOS no problem, but on macOS it throws "bad instruction"

@SmileAppDev Ah, that is interesting. Let me upload an example for you to check out and try, I got this working on iOS no problem.

Ok, Thanks for the help!

Port 80 and 443 are in the range of the protected port numbers. Unfortunately you are very likely to have issues when you use there port numbers. They require administrative privileges, which should be possible on macOS but not on the other platforms. See: why can't I use port 80 and 443.
A few minutes ago I've tested the unsecured server by:

commenting out lines 23 and 24 in TelegraphDemo.swift, to disable the demo routine, they will all fail because they assume https.
changed line 43 in that file to: server = Server()

Then I start up the macOS app and a fresh Chrome window and visit http://localhost:9000/status. That seems to work:

The root test site works as well:

Chrome is really eager to change your url to https if you've visited the site with http before. I'll try out the iOS version in a few minutes.

@SmileAppDev Sorry I did not have time to get back to you, hopefully Yvo's suggestion to "downgrade" the secure demo will work for you
@Zyphrax I was able to use port 80 on iOS without any extra permissions or privileges - should I expect problems when going to the store with the app as opposed to in development (while deploying from the Mac to developer iPhone)?

Interesting, I believe the simulator doesn't allow it, but it might be allowed on the actual device. See the comment by Kalle on this Stack Overflow post. I'm not sure if Apple will break that in the future, but for now it might work.
I've just tested the iOS version and it runs without any issues.
@SmileAppDev if you have an example app, I'd be happy to have a look at the problem.
 Are you retaining the Server instance? If you aren't retaining it, the Server instance will be deallocated and automatically stopped.

Interesting, it seems to be allowed on the actual device but not on the Simulator. See this StackOverflow post. I'm not really sure, I'd have to do some tests with this.
The unsecure server is working for me on iOS, without any problems.
@SmileAppDev are you retaining the Server instance? In TelegraphDemo I'm assigning the Server instance to a local variable so that it doesn't get deallocated then the setupServer function goes out of scope. If the Server instance gets deallocated, it will automatically stop and close the sockets.

Thank you @Zyphrax the server was getting deallocated.

@SmileAppDev Ah yes, that's an easy mistake to make. I'm glad this isn't a bug :)
Thanks for letting me know.

Just a nod to @yvbeek for the "deallocation" hint. I'm also working on an app that serves out of localhost on *OS and ended up starting it in the main ContentView of the SwiftUI app. Likely saved me hours or days of frustration.


Support Stack

Stack is a popular alternative to Cabal. From what I can tell this action does not support using it. Since cabal-install is no longer the only "default" package management & build tool for Haskell, it would be nice if Stack were also supported.

Note: https://github.com/mstksg/setup-stack
Usage: https://www.fosskers.ca/en/blog/github-ci

Great to see this resolved :)

Still need to cut an official release but using actions/setup-haskell@master can be used if you're eager.

Fantastic! Thanks everyone.