feat(event-handler): Add http ProxyEvent handler

Issue #, if available:
#325
Description of changes:
Very basic / minimal http proxy event handler (ALB Events, Http api V1 and V2)
Changes:

Add path and http_method methods to BaseProxyEvent
Add json_body helper property to BaseProxyEvent that json parses body
Add example ApiGatewayResolver event handler
Add test coverage for ApiGatewayResolver
Add current_event and lambda_context
Add shortcut decorators for get, post, patch, put, delete
Add basic CORS flag
Add gzip compression flag
Add isBase64Encoded support for binary content
Add cache_control option, which defaults to no-cache for non-200 responses
Add simplification for functions just returning a dict

import json
from typing import Dict, Tuple

from aws_lambda_powertools.utilities.data_classes import APIGatewayProxyEvent
from aws_lambda_powertools.utilities.event_handler.api_gateway import ApiGatewayResolver, ProxyEventType

# proxy_type: "APIGatewayProxyEvent", "APIGatewayProxyEventV2", "ALBEvent"
app = ApiGatewayResolver(proxy_type=ProxyEventType.http_api_v1)

@app.get("/foo", compress=True)
def get_foo() -> Tuple[int, str, str]:
    # Matches on http GET and proxy path "/foo"
    return 200, "text/html", "Hello"

@app.get("/logo.png")
def get_logo() -> Tuple[int, str, bytes]:
    # Base64 encode
    logo: bytes = load_logo()
    return 200, "image/png", logo

@app.post("/make_foo", cors=True)
def make_foo() -> Tuple[int, str, str]:
    # Matches on http POST and proxy path "/make_foo"
    post_data: dict = app. current_event.json_body
    return 200, "application/json", json.dumps(post_data["value"])

@app.delete("/delete/<uid>")
def delete_foo(uid: str) -> Tuple[int, str, str]:
    # Matches on http DELETE and proxy path starting with "/delete/"
    assert isinstance(app.current_event, APIGatewayProxyEvent)
    assert app.current_event.request_context.authorizer.claims is not None
    assert app.current_event.request_context.authorizer.claims["username"] == "Mike"
    return 200, "application/json", json.dumps({"id": uid})

@app.get("/hello/<username>")
def hello_user(username: str) -> Tuple[int, str, str]:
    return 200, "text/html", f"Hello {username}!"

@app.get("/rest")
def rest_fun() -> Dict:
    # Returns a statusCode: 200, Content-Type: application/json and json.dumps dict
    return {"message": "Example"}

Features:

[x] Routes - @app.get("/foo")
[x] Path expressions - @app.delete("/delete/<uid>")
[x] Cors - @app.post("/make_foo", cors=True)
[x] Base64 encode binary - @app.get("/logo.png")
[x] Gzip Compression - @app.get("/large-json", compression=True)
[x] Cache-control - @app.get("/foo", cache_control="max-age=600")
[x] Rest API simplification with function returns a Dict

Unlikely bonus features:

[ ] Brotli Compression - via an extra install option
[ ] OpenAPI support
[ ] Rendering of html templates

Checklist

[x] Meet tenets criteria
[x] Update tests
[ ] Update docs
[x] PR title follows conventional commit semantics

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

Codecov Report

Merging #369 (1695911) into develop (7c9a319) will decrease coverage by 0.32%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop     #369      +/-   ##
===========================================
- Coverage    99.94%   99.61%   -0.33%
===========================================
  Files           96       97       +1
  Lines         3643     3683      +40
  Branches       175      182       +7
===========================================
+ Hits          3641     3669      +28
- Misses           0        7       +7
- Partials         2        7       +5

Impacted Files
Coverage Δ

...bda_powertools/utilities/data_classes/alb_event.py
100.00% <ø> (ø)

.../utilities/data_classes/api_gateway_proxy_event.py
100.00% <100.00%> (ø)

...lambda_powertools/utilities/data_classes/common.py
100.00% <100.00%> (ø)

..._powertools/utilities/event_handler/api_gateway.py
100.00% <100.00%> (ø)

aws_lambda_powertools/utilities/parser/types.py
71.42% <0.00%> (-28.58%)
:arrow_down:

...wertools/utilities/idempotency/persistence/base.py
92.94% <0.00%> (-6.42%)
:arrow_down:

aws_lambda_powertools/logging/logger.py
100.00% <0.00%> (ø)

aws_lambda_powertools/tracing/tracer.py
100.00% <0.00%> (ø)

aws_lambda_powertools/metrics/metrics.py
100.00% <0.00%> (ø)

aws_lambda_powertools/logging/formatter.py
100.00% <0.00%> (ø)

... and 7 more

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 7c9a319...1695911. Read the comment docs.

@heitorlessa an ultralight handler for http proxy lambdas

@heitorlessa  maybe i can do the same for AppSync handler and include the current event in the “app” rather than a method parameter (which might run into shadowing issues0

@heitorlessa  - as an example i added CORS support, the only things i would need regularly would be compression (and therefore also binay support via bas64encoding)

Codecov Report

:exclamation: No coverage uploaded for pull request base (develop@9be19b2). Click here to learn what that means.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             develop     #369   +/-   ##
==========================================
  Coverage           ?   99.62%
==========================================
  Files              ?       99
  Lines              ?     3760
  Branches           ?      184
==========================================
  Hits               ?     3746
  Misses             ?        7
  Partials           ?        7

Impacted Files
Coverage Δ

...bda_powertools/utilities/data_classes/alb_event.py
100.00% <ø> (ø)

aws_lambda_powertools/event_handler/api_gateway.py
100.00% <100.00%> (ø)

.../utilities/data_classes/api_gateway_proxy_event.py
100.00% <100.00%> (ø)

...lambda_powertools/utilities/data_classes/common.py
100.00% <100.00%> (ø)

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 9be19b2...0cf5366. Read the comment docs.

This is really cool! Would it make sense to make a Response class instead of needing to return the tri-tuple to give more control over the responses (I’m thinking specifically about the headers)?

yeah, i was on the fence about that @jplock it would be simple to add.

@jplock supporting a tuple  or dict as a response is pretty concise and does not require any special imports (albeit not explicit, especially in the case of a triple tuple):
@app.get(“/foo1”)
def foo():
    return 200, “text/html”, “Foo1”

@app.get(“/foo2”)
def foo1():
    return {“message”: “Foo2”}

Maybe in the case of using a special Response class it is to either be explicit and/or provide access to the headers.
from aws_lambda_powertools.utilities.event_handler.api_gateway import Response

@app.get(“/foo3”)
def foo3() -> Response:
    return Response(
        status_code=200,
        headers={“Content-Type”: “application/json”},
         body=json.dumps({“message”: “Foo3”}),
    )

@jplock  i updated this handler to support returning a Response with control over which headers are returned.

Cc @marcioemiranda your feedback on this would be great before we merge and release this week.
What are your thoughts on CORS UX?

Cc @marcioemiranda your feedback on this would be great before we merge and release this week.
What are your thoughts on CORS UX?

Outstanding questions i have are around exceptions. Should we allow for it to ripple up, or should we always handle them and return an appropriate http response code? And in the case of CORS, also include the relavant http headers.

Adding some comments about CORS best practices

Sure we can add some of these to the docs. I was aiming to all for an cors=True shortcut like in Chalice (and other frameworks), they got you up and running quickly. For those that want full control, they should use CORSConfig.

Let me know whether you want me to merge and make these changes in a separate PR, or if you'd like to make them now so we can merge it clean:

[ ] Set CORS once and toggle cors=True as on/off. Perhaps, a single method to add default headers that might be needed over and over, in which CORS could also be added works too.

[ ] Since CORS would have to be defined via a method, you could leave cors=True as the default per method, if it's not set then it wouldn't have any effect, and when it is you have one less step to do.

[ ] Remove preflight (OPTIONS) since that will have to happen at the API Gateway/ALB resource level not at the integration
[ ] [Optional] Docstrings are missing for Resolvers and CORS. These can be added in the next PR concerning docs too.

I'm approving now so I can either merge or wait for these two last changes.

@heitorlessa I made the code changes. Just the docstrings need to be added.

Cc @marcioemiranda your feedback on this would be great before we merge and release this week.
What are your thoughts on CORS UX?

@heitorlessa yesterday I posted a feature request that is totally related to this one (Sorry, I haven't reviewed the current Pull Requests, just the issues). Please review if any of that makes sense here.
@michaelbrewer great job on this feature. I will want to use it asap.
Anyways, my initial thought was having something like this @app.post("/make_foo", cors=True).
However, it's likely that one will enable cors for all methods, so the centralized config makes sense.
I set the following headers in my functions for all responses, both success and error:
headers = {
"Access-Control-Allow-Origin": "*",
"Access-Control-Expose-Headers": "x-amzn-ErrorType"
}
Some additional comments:

Does it make sense to assume a default 200 | application/json response and assume the returned value is the response model? I would say this would represent the majority of the usage, so writing the tuple for every method seemed cumbersome.
Looking at one of the examples I wonder if it would make sense to have an additional decorator for authorization.

Regarding exceptions I would say always handle them and map to proper status codes. Expose the exceptions to developers so that they can use them in the code. For example, a ResourceNotFoundError could map to status code 404. A ServiceUnavailableError, triggered when a downstream service is down, could be mapped to another status code. The CORS headers should be included in the error responses as well.

Alright... tested on CORS, here's the confusion clarification at least on my part:

CORS Pre-flight can be handled by API GW at the resource level by using a MOCK response on OPTIONS method. You can also forward to a Lambda function, if you'd like to handle it (/*, ANY).
When running locally, pre-flight requests might be handled by a local emulator like SAM CLI if CORS configuration is configured - This can be tricky as local endpoints will be different thus having people changing to * that can lead to security issues in prod

Verdict: We must handle CORS pre-flight requests because a) people might configure ANY method and /* to a single Lambda (not recommended but can happen), and b) running locally can be error prone with CORS so we should handle that to improve the experience (why this lib exist).
API GW handling pre-flight CORS response at the resource level

@michaelbrewer could you add pre-flight CORS back and I'll merge it, please? It'll be easier to revert that as you have it locally than me creating another PR just to add that back in.
I'll add the docstrings, examples, and the official docs in the next PR.
Thanks a lot everyone for the help here


8 yanrin patch 1

Checks

[x] Your YAML file has required fields as listed in Specs
[x] All checks have passed yaml-lint passed
[x] You agree to contribute your work under MIT license

Automated testing -> A, closing.


Can't use sudo or apt inside the container

I'm using the leonowski/docker-blueiris:run_as_service fork/tag, however @leonowski hasn't enabled issue tracking on his fork. The same problem applies to the dev branch here though
Discovered this while trying to troubleshoot connectivity to a camera over a macvlan docker network whose parent is a vlan subinterface.
I exec in to the container with /bin/bash.
ping my camera
"ping: command not found"
OK; apt install inetutils-ping
"Could not open lock file .... Permission denied"
Oh, right; sudo apt install inetutils-ping
"sudo: command not found"
...what?
Then try just su, but root password is not blank and at that point I'm out of ideas.
How can I poke around inside the container?   This was done to "secure" the container as it generally is a bad idea to run a container as root. I had thought about this problem from the perspective from someone who wants to fix/tinker with the container.  I realize it is also bad to not be able to manage and troubleshoot this thing.  The audience for a container like this should be technical people anyway.
I'll see if there is a way to configure user switching at container runtime to allow for troubleshooting.  In Docker, you can usually switch the user with the --user flag, but there are a few problems with just doing that.  First, the supervisor config is set to use wineuser explicitly.  Also, it didn't seem like it was easy to specify to specify multiple users with wine.  I have since found this:
https://ubuntuforums.org/showthread.php?t=917422
I'll work on trying to make this admin mode.  In the meantime, would a new branch that runs as root work for you?  I'll have to go in and basically remove all the stuff that made wineuser work.

If it's not too much work, that would be useful, thanks.
What I really want to investigate is whether this:
https://www.phoronix.com/scan.php?page=news_item&px=Wine-Staging-DXVA2-VA-API
Can be used as a path to enabling HW acceleration for BlueIris inside the container. DXVA2 is one of the options for HW accel in the camera options within BI, I've been using it for the past few weeks and it works well, better than NVDEC in my opinion.
My hope is:
Map/grant the /dev/dri/renderD128 host device into the container.
Install VAAPI drivers in the container (if required?)
Enable DXVA2 support in Wine. (May require using the devel branch).
Set cameras to use DXVA2 in BlueIris.

@Fellhahn This would be great. My understanding from #4 is that Xvfb doesn't support hardware acceleration, but I'm not sure if that will limit blueiris from leveraging the GPU. Have you made any progress here?

I switched over to the staging branch in the ubuntu repos apt install winehq-staging and it looks like their version of wine isn't built with VAAPI/DXVA2 patch set applied. I think we may need to build wine from source to get this to work.

I'm very close to having GPU acceleration working, at least with an Intel embedded GPU. See the screenshot below.  I'm not quite sure how efficient it is being since it isn't using the Intel instruction set but rather the DXVA2, and it seems wine is adding a lot of overhead, but hey, it's working.
One of the regressions is that it requires that blue iris not be run as a service. @leonowski and @TonyBrobston can you remind me the reason for the net start blueiris change? Was it to fix a timezone issue?

@Fellhahn After many many hours of trial and error, I got a working branch/build. If you can test it out and give feedback, that would be great. Check out #40 for some loose instructions and ping back in that PR if you need help. Also, this container now exposes the root user but runs most processes as the unprivileged user. It should be a good base for whatever development you can do.
I'm going to close this issue for now since you can apt inside this new container.


[SUPPORT] Required params in DynamoDBBasedLockProvider

Tips before filing an issue

Have you gone through our FAQs?

Join the mailing list to engage in conversations and get faster support at<EMAIL_ADDRESS>

If you have triaged this as a bug, then file an issue directly.

Describe the problem you faced
This is from one of the slack threads. It seems like the config hoodie.write.lock.dynamodb.billing_mode is checked for as a required prop. But there is also a default value for this prop if its not set -
https://github.com/apache/hudi/blob/92f54ce3d8489e0dabcdc1f5cb5076a2ac756545/hudi-aws/src/main/java/org/apache/hudi/aws/transaction/lock/DynamoDBBasedLockProvider.java#L202
https://github.com/apache/hudi/blob/92f54ce3d8489e0dabcdc1f5cb5076a2ac756545/hudi-aws/src/main/java/org/apache/hudi/aws/transaction/lock/DynamoDBBasedLockProvider.java#L206
Do we want to either remove the validation check or remove the default ?
A clear and concise description of the problem.
To Reproduce
Steps to reproduce the behavior:

Expected behavior
A clear and concise description of what you expected to happen.
Environment Description

Hudi version : 0.10.0

Spark version :

Hive version :

Hadoop version :

Storage (HDFS/S3/GCS..) :

Running on Docker? (yes/no) :

Additional context
Add any other context about the problem here.
Stacktrace
: org.apache.hudi.exception.HoodieException: Unable to instantiate class org.apache.hudi.aws.transaction.lock.DynamoDBBasedLockProvider
Caused by: java.lang.IllegalArgumentException: Property hoodie.write.lock.dynamodb.billing_mode not found
	at org.apache.hudi.common.config.TypedProperties.checkKey(TypedProperties.java:48)
	at org.apache.hudi.common.config.TypedProperties.getString(TypedProperties.java:58)
	at org.apache.hudi.aws.transaction.lock.DynamoDBBasedLockProvider.checkRequiredProps(DynamoDBBasedLockProvider.java:202)
	at org.apache.hudi.aws.transaction.lock.DynamoDBBasedLockProvider.<init>(DynamoDBBasedLockProvider.java:81)
	at org.apache.hudi.aws.transaction.lock.DynamoDBBasedLockProvider.<init>(DynamoDBBasedLockProvider.java:77)```

https://github.com/apache/hudi/pull/4422

Filed a tracking jira too. https://issues.apache.org/jira/browse/HUDI-3098


Fix sample code of FunctionHook

LGTM :+1:

Changes in this PR are included in #1077

As #1077 is merged, I close this PR. Thank you.


[hotfix] handle search error [OSF-8944]

Purpose
Query syntax errors from elasticsearch are raising an exception with 'search_phase_execution_exception' that is not caught properly. This is a hack-ish fix to get our builds passing and present a better error message via the api. Currently it is pasting the raw exception data on prod (which is enormous).

Changes
Catch search_phase_execution_exception and reraise as a MalformedQueryException.

Side effects
Slightly less detail on error since the failed query is not passed back when this error is caught.

Ticket
https://openscience.atlassian.net/browse/OSF-8944

Changed my mind, making this a feature, I don't know the current state of prod to be sure this will not cause issues.


ocw24 content changes

Add here your WMS ID
1660,1680,10001,10002
General requirements

Information in the workshop is adequate and updated
Code is correct and working
Links are correct
Make sure you enter the help email link in your manifest.json
Please make sure WMS URLs are updated as needed after your PR is approved

Yes, all in place
Checklist - Refer to the QA document for the complete list
Please confirm that the following is completed before submitting your PR

[x] All filenames are lower case (including folders, images, files, etc.)
[x] Filenames are descriptive
[x] Your workshop folder structure should be similar to the one used in the sample workshop (https://github.com/oracle-livelabs/common/tree/main/sample-livelabs-templates/sample-workshop)
[x] Are you using multiple versions (desktop/, sandbox/, tenancy/)? Make sure that each of them contains a manifest.json and an index.html
[x] Image references in markdown contain an alternate text
Yes, QA checked

Hi @romitacharya,
Please solve your conflicts


No VPN connectivity after domain/api restart

Describe the bug
I am self-hosting Firezone (latest version) on Kubernetes using the community Helm Chart, and I noticed that, if the domain/api Pods are restarted, VPN connectivity is lost. The DNS names are correctly resolved (I checked with nslookup from terminal) but then the actual requests to the resources time out. Connectivity is restored once I manually restart the gateway Pods.
To Reproduce
In Kubernetes, try killing the domain and api Pods and the connections to the resources under VPN will time out.
Expected behavior
The gateway pod should have a healthcheck that detects that the domain/api resources have restarted and force the gateway Pod to restart. Or the gateway pod should have a more resilient re-connection mechanism.
Screenshots / Logs
I did not see any error logs in the gateway pod.
Platform (please complete the following information)

_Component (i.e. macOS client / Linux client / Gateway / Admin portal): Gateway
_Firezone Version (e.g. 1.0.0 or N/A): Gateway 1.3.1; Firezone API: ghcr.io/firezone/api:235c2f3b161348c0bbf6fa21747e11c17f5ca7f5; Firezone Domain: ghcr.io/firezone/domain:235c2f3b161348c0bbf6fa21747e11c17f5ca7f5
_OS and version: (e.g. Ubuntu 22.04 or N/A): Tested with latest gui-client 1.3.2 on Linux Mint 21.2 and Windows 11
_Deployment method: (e.g. Docker / Systemd / App Store or N/A): Helm Chart on Kubernetes (AWS EKS)

If anyone else is facing a similar issue, for the moment I kind of mitigated it by increasing the number of replicas of the API and Domain components and applied podAntiAffinities so that the replicas are guaranteed to run in different nodes and availability zones. This way it is more unlikely that the Gateway Pods loose the connectivity completely.

The gateway pod should have a healthcheck that detects that the domain/api resources have restarted and force the gateway Pod to restart. Or the gateway pod should have a more resilient re-connection mechanism.

The connection to the portal is designed to not affect the data plane and we have integration tests to check that.
Can you post some logs of client and gateways? Ideally with RUST_LOG=debug,wire::api=trace.

It took me some time to sanitize the logs from personal information (IPs, passwords, etc.) but I finally made it.
Here are the gateway logs:
firezone-gateway-nocolor.log
And here are the client logs:
connlib.2024-09-10-17-24-36.log
connlib.2024-09-10-17-22-15.log
Hope this helps!

And here are the client logs:
connlib.2024-09-10-17-24-36.log
connlib.2024-09-10-17-22-15.log

Unfortunately, those seem to be the logs of the GUI, not the IPC service.

Here are the gateway logs:
firezone-gateway-nocolor.log

2024-09-10T17:38:10.826909Z DEBUG handle_input{from=x.x.x.x:3478 tid=DCFF5F89AD85162E7F186707 method=channel bind class=error response rtt=2.259626ms}: snownet::allocation: Request failed, re-authenticating error="Stale Nonce"
2024-09-10T17:38:10.827071Z DEBUG handle_input{from=x.x.x.x:3478 tid=739F3E67ABF2CF509264DACE method=channel bind class=error response rtt=2.293111ms}: snownet::allocation: Request failed, re-authenticating error="Stale Nonce"
2024-09-10T17:38:10.828714Z  WARN handle_input{from=x.x.x.x:3478 tid=806AF275D85FEEB25DDA353C method=channel bind class=error response rtt=1.822374ms}: snownet::allocation: Invalid credentials, refusing to re-authenticate channel bind
2024-09-10T17:38:10.828818Z DEBUG snownet::node: Packet was a STUN message but not accepted
2024-09-10T17:38:10.911027Z  INFO connection{cid=5dd08d79-37fb-4fce-84c6-9f3b4b1ab806}: str0m::ice_::agent: Local candidate to discard Candidate(relay=x.x.x.x:55035/udp prio=37748479)
2024-09-10T17:38:10.911135Z ERROR snownet::node: Disconnecting from relay; authentication error rid=14f57985-8321-43dd-a300-76d1fa4e04e9

This seems to be where the issue starts. For some reason, the relay credentials we have locally don't match anymore. Are you restart the relay too as part of restarting the API? They should be restarted in sequence, not in parallel, otherwise the API can't detect that the relay restarted and push new credentials to the clients.

2024-09-10T17:36:59.580053Z TRACE wire::api::recv: {"event":"init","ref":null,"topic":"gateway","payload":{"config":{"ipv4_masquerade_enabled":true,"ipv6_masquerade_enabled":true},"interface":{"ipv6":"fd00:2021:1111::17:68ef","ipv4":"<IP_ADDRESS>"},"relays":[{"id":"14f57985-8321-43dd-a300-76d1fa4e04e9","type":"turn","addr":"x.x.x.x:3478","username":"1727199419:tQvGIkcyomo9USZrs4cDLQ","password":"xxx","expires_at":1727199419}]}}
2024-09-10T17:36:59.580123Z  INFO snownet::node: Skipping known TURN server rid=14f57985-8321-43dd-a300-76d1fa4e04e9 address=V4(x.x.x.x:3478)

I think what might be happening here is that we skip TURN server because it is still the same ID but the credentials might have changed. We might need an additional check here.
I am surprised this doesn't come up in our production setup though.
The relevant code is here: https://github.com/firezone/firezone/blob/b657c18f18b6141bfb76363cfdee5d1281ec4654/rust/connlib/snownet/src/node.rs#L519-L522
Instead of just checking for the ID being present, we should also check whether we have the same credentials. Shouldn't be too difficult! Are you willing to send a PR? :)

And here are the client logs:
connlib.2024-09-10-17-24-36.log
connlib.2024-09-10-17-22-15.log

Unfortunately, those seem to be the logs of the GUI, not the IPC service.

Hello @thomaseizinger, thanks for the quick response!
My bad, when you said client I thought you meant the gui client.
Regarding the relay, I did not restart it, I just restarted the api and domain Pods. But I think the relay restarted on its own. I see the Pod has 1 restart and the old logs show this (the time is consistent with when I did the experiment):
2024-09-10T19:36:36+02:00              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/thread/local.rs:283:12 2024-09-10T19:36:36+02:00   17: std::thread::local::LocalKey<T>::with 2024-09-10T19:36:36+02:00              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/thread/local.rs:260:9 2024-09-10T19:36:36+02:00   18: tokio::runtime::context::set_scheduler 2024-09-10T19:36:36+02:00              at /cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.39.2/src/runtime/context.rs:180:17 2024-09-10T19:36:36+02:00   19: tokio::runtime::scheduler::current_thread::CoreGuard::enter 2024-09-10T19:36:36+02:00              at /cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.39.2/src/runtime/scheduler/current_thread/mod.rs:751:27 2024-09-10T19:36:36+02:00   20: tokio::runtime::scheduler::current_thread::CoreGuard::block_on 2024-09-10T19:36:36+02:00              at /cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.39.2/src/runtime/scheduler/current_thread/mod.rs:660:19 2024-09-10T19:36:36+02:00   21: tokio::runtime::scheduler::current_thread::CurrentThread::block_on::{{closure}} 2024-09-10T19:36:36+02:00              at /cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.39.2/src/runtime/scheduler/current_thread/mod.rs:180:28 2024-09-10T19:36:36+02:00   22: tokio::runtime::context::runtime::enter_runtime 2024-09-10T19:36:36+02:00              at /cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.39.2/src/runtime/context/runtime.rs:65:16 2024-09-10T19:36:36+02:00   23: tokio::runtime::scheduler::current_thread::CurrentThread::block_on 2024-09-10T19:36:36+02:00              at /cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.39.2/src/runtime/scheduler/current_thread/mod.rs:168:9 2024-09-10T19:36:36+02:00   24: tokio::runtime::runtime::Runtime::block_on_inner 2024-09-10T19:36:36+02:00              at /cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.39.2/src/runtime/runtime.rs:361:47 2024-09-10T19:36:36+02:00   25: tokio::runtime::runtime::Runtime::block_on 2024-09-10T19:36:36+02:00              at /cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.39.2/src/runtime/runtime.rs:335:13 2024-09-10T19:36:36+02:00   26: firezone_relay::main 2024-09-10T19:36:36+02:00              at /project/relay/src/main.rs:170:5 2024-09-10T19:36:36+02:00   27: core::ops::function::FnOnce::call_once 2024-09-10T19:36:36+02:00              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/ops/function.rs:250:5 2024-09-10T19:36:36+02:00   28: std::sys_common::backtrace::__rust_begin_short_backtrace 2024-09-10T19:36:36+02:00              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/sys_common/backtrace.rs:155:18 2024-09-10T19:36:36+02:00   29: main
Regarding the PR, sorry but I have zero experience with Rust.
If I can help in any other way please let me know. We could also set up a meeting if you want and I could demonstrate this live.
Best regards,
Sebastian

That looks like a stacktrace. Can you upload the entire relay log please?

Here is the whole log (which ends with the stack trace I showed earlier):
firezone-relay.log

Thanks for uploading that!
First, I would highly recommend to lower the log level. Running the relay with TRACE enabled will impact the performance. Second, the relay exited because the reconnect backoff expired which suggests that the portal was down for longer than 15 minutes. Due to the restart, the credentials changed but we didn't detect that on the client. That is the bug I mentioned above and needs to be fixed.
I'd recommend to check your setup though why the portal was unreachable for 15 minutes. We only tolerate a certain amount of network partitioning.

Thanks for the feedback!
I will set the log level to info.
I do not think the portal was unreachable for 15 minutes though, the Pods were up and running within a couple of minutes tops. I deleted them manually and was monitoring the EKS cluster the whole time. I have not configured the re-connection backoff, is there a way to increase it, maybe with some environment variable?

Yes it is part of the latest client releases. Let me know if it is working for you! :)

I upgraded the gateway to v1.3.2 and the gui client to 1.3.7. For the other components I am running the tag "081c4471136b5104dc79cda8e64a3f51c9ed37fa", latest avaliable version that came out ~10 days ago. The issue is still happening, and today I had to restart the gateways a couple of times. With client, which component do you mean exactly?

Maybe that didn't make it into the release. Can you try the latest draft releases (both gateway and gui-client)? https://github.com/firezone/firezone/releases?
No changes to the portal should be necessary. If it still happens, can you post logs with RUST_LOG=debug? Thanks!
You might be hitting a different issue! :)

Sorry could you clarify what you mean with draft release?
Il sab 5 ott 2024, 00:17 Thomas Eizinger @.***> ha
scritto:

Maybe that didn't make it into the release. Can you try the latest draft
releases (both gateway and gui-client)?
https://github.com/firezone/firezone/releases?
No changes to the portal should be necessary. If it still happens, can you
post logs with RUST_LOG=debug? Thanks!
You might be hitting a different issue! :)
—
Reply to this email directly, view it on GitHub
https://github.com/firezone/firezone/issues/6648#issuecomment-2394738270,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A25BQKCC6HUBRLBJVRYCSCDZZ4AT7AVCNFSM6AAAAABN6C3UWWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJUG4ZTQMRXGA
.
You are receiving this because you authored the thread.Message ID:
@.***>

I am on my phone now, but these are what I mean:

Specifically this one: https://github.com/firezone/firezone/releases/tag/untagged-5991635f7729556e5a11
Not sure what it is in Spanish, el barrador? :)

I think those are only visible to members of the organisation, I don't have
permissions to see them.
Il sab 5 ott 2024, 02:19 Thomas Eizinger @.***> ha
scritto:

Specifically this one:
https://github.com/firezone/firezone/releases/tag/untagged-5991635f7729556e5a11
Not sure what it is in Spanish, el barrador? :)
—
Reply to this email directly, view it on GitHub
https://github.com/firezone/firezone/issues/6648#issuecomment-2394812097,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A25BQKFWKENYQLFC7TPI56LZZ4PAHAVCNFSM6AAAAABN6C3UWWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJUHAYTEMBZG4
.
You are receiving this because you authored the thread.Message ID:
@.***>

I think those are only visible to members of the organisation, I don't have permissions to see them.

Oh really? That is weird, and kind of useless lol. Let me see if the direct links work.
Are you on Windows or Linux? You can download a build from main directly from our CI: https://github.com/firezone/firezone/actions/runs/11181621928/job/31086100209

Hello @thomaseizinger,
I checked the source code in the latest gateway release (1.3.2) and your PR was included.
Now I repeated the experiment and manually killed the api component and the gateway could re-establish the connection uppon the api pod restart. I also restarted the domain pod and saw no issues in the connection. Finally, I manually restarted the relay pod, and the gateway seems to enter a loop:
2024-10-08T08:03:56.982417Z  INFO accept_connection{cid=5dd08d79-37fb-4fce-84c6-9f3b4b1ab806}: str0m::ice_::agent: State change (new connection): New -> Checking
2024-10-08T08:03:56.982423Z  WARN accept_connection{cid=5dd08d79-37fb-4fce-84c6-9f3b4b1ab806}: snownet::node: No TURN servers connected; connection will very likely fail to establish
2024-10-08T08:03:56.982496Z  INFO accept_connection{cid=5dd08d79-37fb-4fce-84c6-9f3b4b1ab806}: snownet::node: Created new connection
2024-10-08T08:03:56.982550Z  INFO firezone_tunnel::gateway: Allowing access to resource client=5dd08d79-37fb-4fce-84c6-9f3b4b1ab806 resource=eb0d10b9-d83f-47bb-8415-f109a6026b25 expires=Some("2024-10-11T22:13:34+00:00")
2024-10-08T08:03:57.166491Z  INFO add_remote_candidate{cid=5dd08d79-37fb-4fce-84c6-9f3b4b1ab806}: str0m::ice_::agent: Add remote candidate: Candidate(host=<IP_ADDRESS>:46012/udp prio=2130706175)
2024-10-08T08:04:06.233930Z  INFO handle_timeout{cid=5dd08d79-37fb-4fce-84c6-9f3b4b1ab806}: str0m::ice_::agent: State change (no possible pairs): Checking -> Disconnected
2024-10-08T08:04:06.233960Z  INFO handle_timeout{cid=5dd08d79-37fb-4fce-84c6-9f3b4b1ab806}: snownet::node: Connection failed (ICE timeout)
2024-10-08T08:04:12.208786Z  INFO accept_connection{cid=5dd08d79-37fb-4fce-84c6-9f3b4b1ab806}: str0m::ice_::agent: Set remote credentials: IceCreds { ufrag: "IZI8", pass: "3zsHBOvNObvtKILccMTEZg" }
2024-10-08T08:04:12.208811Z  INFO accept_connection{cid=5dd08d79-37fb-4fce-84c6-9f3b4b1ab806}: str0m::ice_::agent: Add local candidate: Candidate(host=<IP_ADDRESS>:56073/udp prio=2130706175)
2024-10-08T08:04:12.208827Z  INFO accept_connection{cid=5dd08d79-37fb-4fce-84c6-9f3b4b1ab806}: str0m::ice_::agent: State change (new connection): New -> Checking
2024-10-08T08:04:12.208833Z  WARN accept_connection{cid=5dd08d79-37fb-4fce-84c6-9f3b4b1ab806}: snownet::node: No TURN servers connected; connection will very likely fail to establish
2024-10-08T08:04:12.208961Z  INFO accept_connection{cid=5dd08d79-37fb-4fce-84c6-9f3b4b1ab806}: snownet::node: Created new connection
2024-10-08T08:04:12.209028Z  INFO firezone_tunnel::gateway: Allowing access to resource client=5dd08d79-37fb-4fce-84c6-9f3b4b1ab806 resource=eb0d10b9-d83f-47bb-8415-f109a6026b25 expires=Some("2024-10-11T22:13:34+00:00")
2024-10-08T08:04:12.337016Z  INFO add_remote_candidate{cid=5dd08d79-37fb-4fce-84c6-9f3b4b1ab806}: str0m::ice_::agent: Add remote candidate: Candidate(host=<IP_ADDRESS>:46012/udp prio=2130706175)
2024-10-08T08:04:21.459552Z  INFO handle_timeout{cid=5dd08d79-37fb-4fce-84c6-9f3b4b1ab806}: str0m::ice_::agent: State change (no possible pairs): Checking -> Disconnected
2024-10-08T08:04:21.459580Z  INFO handle_timeout{cid=5dd08d79-37fb-4fce-84c6-9f3b4b1ab806}: snownet::node: Connection failed (ICE timeout)
2024-10-08T08:04:23.604449Z  INFO accept_connection{cid=5dd08d79-37fb-4fce-84c6-9f3b4b1ab806}: str0m::ice_::agent: Set remote credentials: IceCreds { ufrag: "ltpj", pass: "h4y1HaOBdxNRvhqgshjR5t" }
2024-10-08T08:04:23.604548Z  INFO accept_connection{cid=5dd08d79-37fb-4fce-84c6-9f3b4b1ab806}: str0m::ice_::agent: Add local candidate: Candidate(host=<IP_ADDRESS>:56073/udp prio=2130706175)
2024-10-08T08:04:23.604588Z  INFO accept_connection{cid=5dd08d79-37fb-4fce-84c6-9f3b4b1ab806}: str0m::ice_::agent: State change (new connection): New -> Checking
2024-10-08T08:04:23.604595Z  WARN accept_connection{cid=5dd08d79-37fb-4fce-84c6-9f3b4b1ab806}: snownet::node: No TURN servers connected; connection will very likely fail to establish
2024-10-08T08:04:23.604691Z  INFO accept_connection{cid=5dd08d79-37fb-4fce-84c6-9f3b4b1ab806}: snownet::node: Created new connection
2024-10-08T08:04:23.604719Z  INFO firezone_tunnel::gateway: Allowing access to resource client=5dd08d79-37fb-4fce-84c6-9f3b4b1ab806 resource=eb0d10b9-d83f-47bb-8415-f109a6026b25 expires=Some("2024-10-11T22:13:34+00:00")
2024-10-08T08:04:23.791212Z  INFO add_remote_candidate{cid=5dd08d79-37fb-4fce-84c6-9f3b4b1ab806}: str0m::ice_::agent: Add remote candidate: Candidate(host=<IP_ADDRESS>:46012/udp prio=2130706175)

Here is also the full gateway log:
firezone-gateway.log
I would like to help with this as much as I can, let me know how else I can help.

Finally, I manually restarted the relay pod, and the gateway seems to enter a loop:

Was the API online and the gateway connected when you did that? How many relays are you deploying? I think you may need more than 1 so that the portal can perform a fail-over where it switches the gateway from one relay to the other.

@AndrewDryga I think what may be happening here is that if we only have a single relay in the portal, we don't get a relays_presence with just that one being "online", right? Is that something we want to support?

Finally, I manually restarted the relay pod, and the gateway seems to enter a loop:

Was the API online and the gateway connected when you did that? How many relays are you deploying? I think you may need more than 1 so that the portal can perform a fail-over where it switches the gateway from one relay to the other.

The API was online and the gateway connected when I restarted the relay.
If I increase the replicas of the relay, each replica should have its own static public IP address right? Or can they be replicated like the gateway pods?

By the way, restarting the gateway fixes the issue.

If I increase the replicas of the relay, each replica should have its own static public IP address right? Or can they be replicated like the gateway pods?

They need to have their own public IP unless you split the port-range for the allocations to not be obverlapping.

By the way, restarting the gateway fixes the issue.

Yeah that is expected. Essentially I think the problem here is that without at least a 2nd relay, we have nothing to fail over when it goes down.
The restart fixes it because then then the portal assigns new relays to the gateway out of the available pool (only 1).

Is this behaviour a "bug" which you plan to fix, or should I just change the way I manage the relays?

I think it is a bug. I am not sure what a good fix for the bug is and when we can fix it.
It is an edge-case that we haven't designed for because our production setup aims has zero downtime during deployments. If you don't want downtime, I'd suggest adding more relays. If downtime is okay, I'd always restart the gateway with the relay.

Final question, can I use the same token for multiple relay instances (like
with gateways) or does each relay need it's own token?
Il mar 8 ott 2024, 23:05 Thomas Eizinger @.***> ha
scritto:

Is this behaviour a "bug" which you plan to fix, or should I just change
the way I manage the relays?
I think it is a bug. I am not sure what a good fix for the bug is and when
we can fix it.
It is an edge-case that we haven't designed for because our production
setup aims has zero downtime during deployments. If you don't want
downtime, I'd suggest adding more relays. If downtime is okay, I'd always
restart the gateway with the relay.
—
Reply to this email directly, view it on GitHub
https://github.com/firezone/firezone/issues/6648#issuecomment-2400819086,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A25BQKBIBH2R6PEMXYSBOG3Z2RCIVAVCNFSM6AAAAABN6C3UWWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBQHAYTSMBYGY
.
You are receiving this because you authored the thread.Message ID:
@.***>

Final question, can I use the same token for multiple relay instances (like with gateways) or does each relay need it's own token?

I think you should be able to use the same token.


Rendering issue in Firefox

Here is a screenshot (FF46 Windows). We can see order painting problems.

Same here FF 45.02 on windows

Same on Linux(4.3.3-3-ARCH), Firefox 44.0

Same on OS X (10.10.5) and FF 44.0

It works for me (FF 75.0, Windows 10)


Personal copy share is appearing in F&F list.

I changed this share(Confirmed contact sahre) to personal copy after backedup with contact.

Verified this issue on staging app v2.0.0(360)


federation / subgraph  support

Hey!
First of all, thanks for this great project.
Are there any plans to support GraphQL-Federation, such as allowing the definition of a Graph as a Subgraph?
I am currently working on a modular monolith, which consists of 5 modules, each with its own DBContext.
Now, I want to combine the 5 graphs into a supergraph. However, this doesn't currently work because each graph is a "monograph" and can't be used inside a supergraph.

Interesting. I like the idea. You can already use the service fields to join them but it wouldn't be nice to have to do that for all the fields/types in each graph.
I'd have to think about how to support this (unless you have some ideas) but I think it would be useful to have.

Interesting. I like the idea. You can already use the service fields to join them but it wouldn't be nice to have to do that for all the fields/types in each graph.
I'd have to think about how to support this (unless you have some ideas) but I think it would be useful to have.

Hi Luke, I'm encountering the same issue. I have a GraphQL endpoint, A, which includes two other endpoints, B and C, as fields. Currently, with the service field approach, I have to return all fields of B and C in the service method, so that a caller of A can freely choose which fields of B or C they want to retrieve. Ideally, if the client of A only needs B.Id, the service call should only fetch the Id field from Graph B, rather than retrieving all of B’s fields.


CocoLJ.Master.li

Comparing CJ logging integration allows merge.

Not going to merge this for now since it's an outdated PR. Feel free to create a new PR if you still want to do it.


Android Alarm Manager is not working when kill app?

Sorry, my english is not good!
I use android_alarm_manager to sending wishs to my user. But its seem when user close app (kill app completely),alarm is not working. It just running on foreground services.
Is there a way to fix the error?

@pqtrong17
Please provide flutter doctor -v and a minimal complete reproducible code sample that shows the issue along with the expected and actual behavior.
Thanks.

The result when I running flutter doctor -v
[√] Flutter (Channel stable, 1.22.3, on Microsoft Windows [Version 10.0.18363.1139], locale en-US)
    • Flutter version 1.22.3 at C:\Users\pqtrong17\AppData\Local\Android\flutter
    • Framework revision 8874f21e79 (7 days ago), 2020-10-29 14:14:35 -0700
    • Engine revision a1440ca392
    • Dart version 2.10.3

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at C:\Users\pqtrong17\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[!] Android Studio (version 4.1.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] Connected device (1 available)
    • Google Pixel (mobile) • <IP_ADDRESS>:5555 • android-x86 • Android 9 (API 28)

! Doctor found issues in 1 category.

For code:
I  initialization like this:
final ReceivePort port = ReceivePort();

  Future<void> registerAlarmManager() async {
    // Register for events from the background isolate. These messages will
    // always coincide with an alarm firing.
    IsolateNameServer.registerPortWithName(
      port.sendPort,
      'isolate',
    );
  }

and on initState, I called:
registerAlarmManager();
 AndroidAlarmManager.initialize();
port.listen((_) async => await onFireAlarm());

onFireAlarm Simply just will displaying notification for user.
My OneShot and callback:
Future<void> startOneShot(int days, int id) async {
    await AndroidAlarmManager.oneShot(
      Duration(days: days),
      // Ensure we have a unique alarm ID.
      id,
      callback,
      exact: true,
      wakeup: true,
    );
  }

  // The background
  static SendPort uiSendPort;

  // The callback for our alarm
  static Future<void> callback() async {
    // This will be null if we're running in the background.
    uiSendPort ??= IsolateNameServer.lookupPortByName("isolate");
    uiSendPort?.send(null);
    print('Count done! Alarm service will fire now!');
  }

I hope you understand. Sorry cause my english. Tks @darshankawar

flutter doctor -v displaying error plugin not install is wrong because I installed both. I don't understand why it's get an error. (I just updated flutter version and get an error for plugin)

Bonus:
On AndroidManifes.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.my_app">
    <!-- io.flutter.app.FlutterApplication is an android.app.Application that
         calls FlutterMain.startInitialization(this); in its onCreate method.
         In most cases you can leave this as-is, but you if you want to provide
         additional functionality it is fine to subclass or reimplement
         FlutterApplication and put your custom class here. -->
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <uses-permission android:name="android.permission.VIBRATE" />
    <application
        android:name="io.flutter.app.FlutterApplication"
        android:label="my_app"
        android:icon="@mipmap/ic_launcher">
        <activity

@pqtrong17
Will need complete minimal reproducible code sample that we can copy paste and run in IDE to see the issue you are facing.
Thanks.

@pqtrong17
Will need complete minimal reproducible code sample that we can copy paste and run in IDE to see the issue you are facing.
Thanks.

Ok.
import 'dart:isolate';
import 'dart:math';
import 'dart:ui';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:android_alarm_manager/android_alarm_manager.dart';
import 'package:take_care_customer/main.dart';
import 'package:take_care_customer/storage/localization_storage.dart';
import 'package:take_care_customer/values/colors.dart';
import 'package:take_care_customer/values/strings.dart';
import 'package:take_care_customer/widgets/initial_widget.dart';
import 'package:take_care_customer/widgets/text_customized.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:take_care_customer/widgets/text_field_customized.dart';
import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';

class ReminderBirthday extends StatefulWidget {
  @override
  _ReminderBirthdayState createState() => _ReminderBirthdayState();
}

class _ReminderBirthdayState extends State<ReminderBirthday> {
  @override
  Widget build(BuildContext context) {
    return _AlarmHomePage(title: "Reminder Birthday",);
  }
}

class _AlarmHomePage extends StatefulWidget {
  _AlarmHomePage({Key key, this.title}) : super(key: key);
  final String title;

  @override
  _AlarmHomePageState createState() => _AlarmHomePageState();
}

class _AlarmHomePageState extends State<_AlarmHomePage> {

  DateTime mUserBirthday;

  FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin =
  new FlutterLocalNotificationsPlugin();
  SharedPreferences pref;
  final ReceivePort port = ReceivePort();

  Future<void> registerAlarmManager() async {
    // Register for events from the background isolate. These messages will
    // always coincide with an alarm firing.
    IsolateNameServer.registerPortWithName(
      port.sendPort,
      'isolate',
    );
  }

@override
  void dispose() {
    // TODO: implement dispose
    super.dispose();
  }
  @override
  void initState()  {
    super.initState();
    registerAlarmManager();
    AndroidAlarmManager.initialize();
    port.listen((_) async => await onFireAlarm());

    var initializationSettingsAndroid = AndroidInitializationSettings(
        '@mipmap/ic_launcher'); // <- default icon name is @mipmap/ic_launcher
    var initializationSettingsIOS = IOSInitializationSettings(
        onDidReceiveLocalNotification: onDidReceiveLocalNotification);
    var initializationSettings = InitializationSettings(android :initializationSettingsAndroid, iOS: initializationSettingsIOS);

    flutterLocalNotificationsPlugin.initialize(initializationSettings,
        onSelectNotification: selectNotification);
  }

  Future onFireAlarm() async{
    await displayNotification();
    startedCount(DateTime(DateTime.now().year + 1, mUserBirthday.month, mUserBirthday.day));
  }

  Future displayNotification() async {
    var androidPlatformChannelSpecifics = new AndroidNotificationDetails(
        'default_notification_channel_id',
        'flutterfcm',
        'your channel description',
        importance: Importance.max,
        priority: Priority.high);
    var iOSPlatformChannelSpecifics = new IOSNotificationDetails();
    var platformChannelSpecifics = new NotificationDetails(android:
        androidPlatformChannelSpecifics,iOS: iOSPlatformChannelSpecifics);
    flutterLocalNotificationsPlugin.show(
      0,
      "Happy birthday to you (${DateTime.now().day}-${DateTime.now().month} )",
      "Wish you all",
      // _contentNotification.pushNotifyContent,
      platformChannelSpecifics,
      payload: 'success',
    );
  }

  Future selectNotification(String payload) async {
    if (payload != null) {
      debugPrint('notification payload: $payload');
    }
  }

  Future onDidReceiveLocalNotification(
      int id, String title, String body, String payload) async {
    // display a dialog with the notification details, tap ok to go to another page
    showDialog(
      context: context,
      builder: (BuildContext context) => new AlertDialog(
        title: new Text(title),
        content: new Text(body),
        actions: [
          CupertinoDialogAction(
            isDefaultAction: true,
            child: new Text('Ok'),
            onPressed: () async {
              Navigator.of(context, rootNavigator: true).pop();
            },
          ),
        ],
      ),
    );
  }

  int differenceBetweenTwoDay(DateTime birthday){
    final _nowDateTime = DateTime.now();
    final _dateForThisBirthday = DateTime(birthday.year, birthday.month, birthday.day,  _nowDateTime.hour, _nowDateTime.minute, _nowDateTime.second, _nowDateTime.millisecond, _nowDateTime.microsecond);
    int _difference = _dateForThisBirthday.difference(_nowDateTime).inDays;
    return _difference;
  }

  Future<void> startOneShot(int days, int id) async {
    await AndroidAlarmManager.oneShot(
      Duration(days: days),
      // Ensure we have a unique alarm ID.
      id,
      callback,
      exact: true,
      wakeup: true,
    );
  }

  // The background
  static SendPort uiSendPort;

  // The callback for our alarm
  static Future<void> callback() async {
    // This will be null if we're running in the background.
    uiSendPort ??= IsolateNameServer.lookupPortByName("isolate");
    uiSendPort?.send(null);
    print('Count done! Alarm service will fire now!');
  }

  @override
  Widget build(BuildContext context) {
    // TODO(jackson): This has been deprecated and should be replaced
    return InitialWidget(
      titleAppBar: widget.title,
      child: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            InkWell(
              onTap: () => DatePicker.showDatePicker(context,
                  showTitleActions: true,
                  minTime: DateTime(1920, 1, 1),
                  maxTime: DateTime(2099, 6, 7), onChanged: (date) {
                    print('change $date');
                  }, onConfirm: (date) async {
                    mUserBirthday = DateTime.now();
                    setState(() {
                      mUserBirthday = date;
                    });
                    startedCount(date);
                    }, currentTime: DateTime.now(), locale: LocaleType.vi),
              child: Container(
                padding: EdgeInsets.all(16),
                margin: EdgeInsets.symmetric(horizontal: 12),
                width: double.infinity,
                decoration: BoxDecoration(
                  border: Border.all(color: blackText),
                  borderRadius: BorderRadius.circular(8)
                ),
                child: Row(
                  children: [
                    Expanded(child: TextCustomized("Birthday")),
                    Icon(Icons.arrow_drop_down_sharp)
                  ],
                ),
              ),
            ),
            SizedBox(height: 16,),
          ],
        ),
      ),
    );
  }

  void startedCount(DateTime birthday) async {
    if (pref == null) {
      pref = await SharedPreferences.getInstance();
    }
    int _oneShotIdOld = pref.getInt('oneShotId');
    if(_oneShotIdOld != null){
      await AndroidAlarmManager.cancel(_oneShotIdOld);
      pref.remove("oneShotId");
    }
    int _oneShotIdNew = Random().nextInt(pow(2, 31));
    pref.setInt("oneShotId", _oneShotIdNew);
    int _differenceBetweenTwoDay = differenceBetweenTwoDay(DateTime(birthday.year, birthday.month, birthday.day));
    startOneShot(_differenceBetweenTwoDay, _oneShotIdNew);
  }
}

@pqtrong17
I see lot of custom and 3rd party plugin code in the sample you shared above. We are looking for a minimal code sample that we can directly run without needing to install any plugins (if not required). See here on how to provide a minimal workable reproducible code sample and only provide the code related to alarm manager.
Thanks.

Without additional information, we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.
Could everyone who still has this problem please file a new issue with the exact description of what happens, logs, and the output of flutter doctor -v.
All system setups can be slightly different, so it's always better to open new issues and reference related issues.

I ran into this same issue with the example app (https://pub.dev/packages/android_alarm_manager). Once killed off, it doesn't print any statements to the console. Similarly when the app is pushed to the background, it prints 1 or 2 statements and then stops while my expectation is that it returns a print statement every minute.

I ran into this same issue with the example app (https://pub.dev/packages/android_alarm_manager). Once killed off
It shows error in console
I/FlutterBackgroundExecutor(24917): Starting AlarmService...
E/AndroidRuntime(24917): FATAL EXCEPTION: main
E/AndroidRuntime(24917): Process: com.dexterous.flutter_local_notifications_example, PID: 24917
E/AndroidRuntime(24917): java.lang.RuntimeException: Unable to create service io.flutter.plugins.androidalarmmanager.AlarmService: java.lang.NullPointerException: Attempt to read from field 'java.lang.String io.flutter.embedding.engine.loader.FlutterApplicationInfo.flutterAssetsDir' on a null object reference
E/AndroidRuntime(24917):        at android.app.ActivityThread.handleCreateService(ActivityThread.java:3613)
E/AndroidRuntime(24917):        at android.app.ActivityThread.-wrap4(Unknown Source:0)
E/AndroidRuntime(24917):        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1873)
E/AndroidRuntime(24917):        at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(24917):        at android.os.Looper.loop(Looper.java:210)
E/AndroidRuntime(24917):        at android.app.ActivityThread.main(ActivityThread.java:7080)
E/AndroidRuntime(24917):        at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(24917):        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:523)
E/AndroidRuntime(24917):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:863)
E/AndroidRuntime(24917): Caused by: java.lang.NullPointerException: Attempt to read from field 'java.lang.String io.flutter.embedding.engine.loader.FlutterApplicationInfo.flutterAssetsDir' on a null object reference
E/AndroidRuntime(24917):        at io.flutter.embedding.engine.loader.FlutterLoader.findAppBundlePath(FlutterLoader.java:324)
E/AndroidRuntime(24917):        at io.flutter.view.FlutterMain.findAppBundlePath(FlutterMain.java:97)
E/AndroidRuntime(24917):        at io.flutter.plugins.androidalarmmanager.FlutterBackgroundExecutor.startBackgroundIsolate(FlutterBackgroundExecutor.java:158)
E/AndroidRuntime(24917):        at io.flutter.plugins.androidalarmmanager.FlutterBackgroundExecutor.startBackgroundIsolate(FlutterBackgroundExecutor.java:126)
E/AndroidRuntime(24917):        at io.flutter.plugins.androidalarmmanager.AlarmService.onCreate(AlarmService.java:349)
E/AndroidRuntime(24917):        at android.app.ActivityThread.handleCreateService(ActivityThread.java:3603)
E/AndroidRuntime(24917):        ... 8 more
I/FlutterBackgroundExecutor(25150): Starting AlarmService...
E/AndroidRuntime(25150): FATAL EXCEPTION: main
E/AndroidRuntime(25150): Process: com.dexterous.flutter_local_notifications_example, PID: 25150
E/AndroidRuntime(25150): java.lang.RuntimeException: Unable to create service io.flutter.plugins.androidalarmmanager.AlarmService: java.lang.NullPointerException: Attempt to read from field 'java.lang.String io.flutter.embedding.engine.loader.FlutterApplicationInfo.flutterAssetsDir' on a null object reference
E/AndroidRuntime(25150):        at android.app.ActivityThread.handleCreateService(ActivityThread.java:3613)
E/AndroidRuntime(25150):        at android.app.ActivityThread.-wrap4(Unknown Source:0)
E/AndroidRuntime(25150):        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1873)
E/AndroidRuntime(25150):        at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(25150):        at android.os.Looper.loop(Looper.java:210)
E/AndroidRuntime(25150):        at android.app.ActivityThread.main(ActivityThread.java:7080)
E/AndroidRuntime(25150):        at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(25150):        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:523)
E/AndroidRuntime(25150):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:863)
E/AndroidRuntime(25150): Caused by: java.lang.NullPointerException: Attempt to read from field 'java.lang.String io.flutter.embedding.engine.loader.FlutterApplicationInfo.flutterAssetsDir' on a null object reference
E/AndroidRuntime(25150):        at io.flutter.embedding.engine.loader.FlutterLoader.findAppBundlePath(FlutterLoader.java:324)
E/AndroidRuntime(25150):        at io.flutter.view.FlutterMain.findAppBundlePath(FlutterMain.java:97)
E/AndroidRuntime(25150):        at io.flutter.plugins.androidalarmmanager.FlutterBackgroundExecutor.startBackgroundIsolate(FlutterBackgroundExecutor.java:158)
E/AndroidRuntime(25150):        at io.flutter.plugins.androidalarmmanager.FlutterBackgroundExecutor.startBackgroundIsolate(FlutterBackgroundExecutor.java:126)
E/AndroidRuntime(25150):        at io.flutter.plugins.androidalarmmanager.AlarmService.onCreate(AlarmService.java:349)
E/AndroidRuntime(25150):        at android.app.ActivityThread.handleCreateService(ActivityThread.java:3603)
E/AndroidRuntime(25150):        ... 8 more
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 1.22.6, on Microsoft Windows [Version 10.0.18363.1379], locale en-IN)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[√] Android Studio (version 4.0)
[√] VS Code (version 1.53.2)
[√] Connected device (1 available)
• No issues found!
And after some time my android show message

Could everyone who still has this problem please file a new issue with the exact description of what happens, logs, and the output of flutter doctor -v.
All system setups can be slightly different, so it's always better to open new issues and reference related issues.


Move Microsoft.VCRedist.2019.arm64 14.29.30139.0 to Microsoft.VCRedist.2015+.arm64 14.29.30139.0

Microsoft Reviewers: Open in CodeFlow

Possible duplicate package entry.
Similar installer SHA256 hash found in manifest:

InstallerSha256: 71f6d2fab64d23ade47350555351ffe93e5aa06046c7dfedb793308b46df7845

manifests\m\Microsoft\VCRedist\2019\arm64\14.29.30139.0

Verify by hash.


Add more contact details and find a better way to share these details instead of manually doing it.

Describe the feature to be enhanced
At the moment the contact page is quite lacklustre and is done manually. Using any technique either Web-scraping or anything else.
Tasks
Add contact details of the wards. Also, place these in a well-made container for design purposes.
Expected behaviour post enhancement
The numbers should be relevant to the area and display this information in a more stylish manner.
Bounty rules

Bounty points -> If you have completed the tasks ( 45 points )
Brownie points -> If you have added an extra feature that was not mentioned (5 points)
Enthusiasm points -> Added in the end if a PR has gone above and beyond (10 points)

Kindly assign this.

Kindly assign.

could u assign this


.Net: Categorize all Kernel syntax samples

Use the following structure
A_Getting_Started
    Step1 Create Kernel
    Step2 Add Plugins
    Step3 ...
B_Plugins
    All plugin samples
C_ Planners
    All planners samples
D_Memory
    All memory samples
E_ Advanced
    Things like APIM

Hello, is this issue still open ? If so, I'd like to have more information on how to contribute.

It is indeed open, but I believe someone may be working on this already internally with a broader sample push. @markwallace-microsoft, do you know if this is in scope of @RogerBarreto's work? Or would should we assign to @abstractHunter?

Finished with the introduction of the "concepts" sample folder


Update query fields for openapi-stackexchange example

Description
openapi-stackexchange example does not seem to build (mesh build) due to updated fields from StackExchange
Type of change
Please delete options that are not relevant.

[X] Bug fix (non-breaking change which fixes an issue)

Screenshots/Sandbox (if appropriate/relevant):

How Has This Been Tested?
I updated the fields and can confirm that mesh build was successful

Test Environment:

OS: Mac OS
@graphql-mesh/...:
@graphql-mesh/cli: "0.78.25"
@graphql-mesh/openapi": "0.33.20"
NodeJS: v16 LTS

Checklist:

[] I have followed the CONTRIBUTING doc and the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests and linter rules pass locally with my changes
[x] Any dependent changes have been merged and published in downstream modules

Further comments
This is a relatively small change that's why I haven't created an issue. Hope that's alright.

Thank you so much @rockse !
As you are a master in testing, do you have ideas on what tests we could add to continuously check the underlining APIs to make sure the example keeps on working?

Thanks @rockse ! I added the tests to prevent future regressions!

Thanks for adding tests @ardatan.
Seems like we are covered now @Urigo


Header

Added alt header, without the initial bosstrap library, most text are dummy text and can be replaced

I don't see the need for both favicon and boxicons , can we just stick to one?

@fescii your changes have been pushed to the staging branch, you need to change the following

congrats on the revamped header design and the creative logo clap, it looks fantastic but the links are brokenfrowning_face
the fontawesome and box icon libraries load up way too many unused icons and images, this has actually made the project grow as big as 400Mb+ I'd recommend the use of only the necessary icons or the web-based URL implementation instead

Great On It

@fescii your changes have been pushed to the staging branch, you need to change the following

congrats on the revamped header design and the creative logo clap, it looks fantastic but the links are brokenfrowning_face
the fontawesome and box icon libraries load up way too many unused icons and images, this has actually made the project grow as big as 400Mb+ I'd recommend the use of only the necessary icons or the web-based URL implementation instead

Great On It, Initially I'd not inserted any links, let me explore the main repo to get the URLs. I can remove the pro folder then use CDN instead for icons

@fescii your changes have been pushed to the staging branch, you need to change the following

congrats on the revamped header design and the creative logo clap, it looks fantastic but the links are brokenfrowning_face
the fontawesome and box icon libraries load up way too many unused icons and images, this has actually made the project grow as big as 400Mb+ I'd recommend the use of only the necessary icons or the web-based URL implementation instead

Great On It, Initially I'd not inserted any links, let me explore the main repo to get the URLs. I can remove the pro folder then use CDN instead for icons

That's quite effective actually


bug: remove comments pascal

Se tenho um bloco de código.
linha 1
linha 2

Use the command ",cs" visual block mode.
(* linha 1
 * linha 2
 *)

When I use "c " does not remove it, instead creating another comment.
(* linha 1
 {* linha 2}
 *)

Sorry for the poorly written text, I do not know English.

This has to do with what delimiters you have setup as the primary vs. the alternate. The comment block you are showing is commented using the alternate delimiters + the sexy style. The command you are issuing is setup to look for the primary delimiters, which don't exist, so it adds a comment instead of removing.
You can swap the primary/alternate delimiters using <leader>ca, then your uncomment command should work on that block as you would expect.


Clothing

Clothing Issue
Lower converted to XML and Imported back = No Issue
XML imported into blender. exported out fine. Imported back to CodeWalker Fine = *issue
Issue = clothing item looks fine in the RPF. but in game. its broken. ( dosent show )
Version
I tried all version in #releases  and non could export clothing apart from 1.1.A
all test wer tried numerous times
not sure if your all aware but yeah
file
Materials
High Detail 1 (2 geometries)
3640 verts, ped (ped sps)
953 verts, ped (ped sps)
file though blender
High Detail 1 (2 geometries)
3637 verts, ped (ped sps)
936 verts, ped (ped sps)
only difference i can find
nothing was touched in blender only import > export

Which file is the one you attempted to import?

First lower that failed.zip

First lower that failed.zip

Works fine for me

Also exports fine

Reimo


move data to another cluster

What is the easiest way, to move all data from one etcd cluster to another, which does already exist ?
Specifically:
I want the kubernetes api server to permanently use another etcd cluster right after the initial kubernetes/etcd cluster are created without loosing the initial stored data from the first cluster.

Have you tried snapshots? https://github.com/coreos/etcd/blob/master/etcdctl/README.md#snapshot-subcommand

@gitoverflow Please create another etcd cluster with the original data you have and configure the kubernetes apiserver to use the new etcd cluster.
Then there won't be any data lose and the new kubernetes cluster working on the old data.

@gitoverflow As mentioned above, you can either:

do a backup and then restore (search in etcd repo to see how to do this for both v2 and v3)
copy the data dir and restart on the same node


Fix setup.py for windows system!

The library installation was giving an error for windows system, The error was
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\dadga\AppData\Local\Temp\pip-install-uxpepd04\instafilter_c7836e83f40c4fde8cfd36fbf3c9622f\setup.py", line 16, in <module>
          long_description = FIN.read()
        File "C:\Users\dadga\miniconda3\envs\ec-final-proj\lib\encodings\cp1252.py", line 23, in decode
          return codecs.charmap_decode(input,self.errors,decoding_table)[0]
      UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 1214: character maps to <undefined>
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

So to fix it, we could simply change the reading encoding of README.md to utf8.

Thanks for the fix!


aws_lambda_dynamodb raises exception when using existing Table

This is similar to: https://github.com/awslabs/aws-solutions-constructs/issues/119
I am using an existing DynamoDB table with the LambdaToDynamoDB. When I do cdk synth, I receive this error.
TypeError: type of argument existing_table_obj must be one of (aws_cdk.aws_dynamodb.Table, NoneType); got jsii._reference_map.InterfaceDynamicProxy instead
The object that is being passed to the existing_table_obj is <jsii._reference_map.InterfaceDynamicProxy object at 0x10afdbb50>. from_table_name states that it returns an object of type ITable. Perhaps this is the issue? Is there a way to convert ITable to a Table object?
Reproduction Steps
import aws_cdk
from aws_solutions_constructs.aws_lambda_dynamodb import LambdaToDynamoDB

table = aws_cdk.aws_dynamodb.Table.from_table_name(self,"existing-table", "exiting-table-name")

LambdaToDynamoDB(
    self,
    'LambdaToDynamoDB',
    existing_table_obj=table,
    lambda_function_props=aws_cdk.aws_lambda.FunctionProps(
        function_name=function_name,
        code=lb.Code.from_asset('./lambda_functions'),
        runtime=lb.Runtime.PYTHON_3_8,
        handler='index.handler'
    )
)

Error Log
TypeError: type of argument existing_table_obj must be one of (aws_cdk.aws_dynamodb.Table, NoneType); got jsii._reference_map.InterfaceDynamicProxy instead

Environment

**CDK CLI Version      :2.72.1
**CDK Framework Version:  aws-cdk-lib==2.72.1
**AWS Solutions Constructs Version     :  aws-solutions-constructs-aws-lambda-dynamodb==2.36.0
**OS                   : linux
**Language             : python

Other
This is :bug: Bug Report

Sorry for the delay in responding. The issue is the difference between a Table interface (ITable in Typescript) and a Table object (Table in Typescript). The existingTable property requires a Table object, but the Table.from*() functions return an interface (ITable), so can't be used. In this situation, existingTables must be tables that exist elsewhere in this stack vs elsewhere in the account.
This is a drawback of some of the early constructs, later we started accepting Interfaces as props instead of Objects. We're tossing around the idea of a big 3.0.0 release where we could make many of the lessons we learned standard - while these would be very simple to accommodate breaking changes, they would be breaking changes and would require major release.
I'm gonna leave this Issue open for the moment and see if anyone here has any ideas for a workaround.


Cannot connect to old devices after upgrade & server migration

I've upgraded from v0.3.7 (old server) to v0.9.0 (new server), I've successfully migrated the database and moved the DNS using the same domain name. I can successfully add new and access new devices and see all my old devices listed as online. However, I cannot connect to any of the older devices, the terminal just hangs.
Do I need to upgrade the client running on all my old devices to be compatible with v0.9.0? I would need to move the DNS back to my old server running v0.3.7 to regain access to them.

The agents are intended to succeed to connect. It might be a bug.
What is the message you see when trying to connect to them?

No message, just a blank terminal. Is there a way I can access debug logs?

I'm getting the error
ssh_1        | time="2022-03-17T00:57:32Z" level=info msg="Handling session request" session=xxxxxxxx1d425367737a11b13d39527ecedaeb285fbafe5fba target=pi@xxxxxxxxxb443e041b9fd4e565e5e862907485af0d1c
ssh_1        | time="2022-03-17T00:57:32Z" level=error msg="Failed to dial to tunnel" err="revdial.Dialer closed" session=xxxxxxxxx2bb21d425367737a11b13d39527ecedaeb285fbafe5fba

Hello @glynhudson
Since v0.3.0 the agent has a self-updating daily pooling mechanism, so it wouldn't be required to delete and recreate it. It appears that it doesn't attempt an update during connection, though.
Would you also have the logs for the previous agent container v0.3.7, when
this issue occurred? You might have to install it again by using the old script, check the blank terminal happens to appear again, then run something like:
docker logs $(docker ps -a | grep agent:v0.3.7 | awk '{ print $1 }' | head -n 1)

This could be a past issue that'd been fixed for the newest versions of the agent.

Since v0.3.0 the agent has a self-updating daily pooling mechanism

Interesting, does the agent self-update based on the version of the shellhub server? I've not actually left the DNS set to the new server for more than a few hours. Do you think if I leave the DNS pointing to the new server running the latest version of shellhub for 24hrs the agents will self-update? At what time does the update take place?
I've recreated the v0.3.7 agent, and tried to connect to it from a v0.9.0 server, as before I get a blank terminal. However, docker logs shellhub  doesn't return any logs from the agent

@glynhudson, yes, it does. It uses the /info route as the source of information. So we'd expect it to update itself to the newer release automatically; however, we do not understand why you cannot connect to the device since we didn't reproduce this failure here.

Interesting, is there a way I could trigger this update manually?
FYI this is my .env.override on the new server
SHELLHUB_SSH_PORT=44
SHELLHUB_AUTO_SSL=true
SHELLHUB_REDIRECT_TO_HTTPS=true
SHELLHUB_DOMAIN=domain.com

The new server is terminating SSL in the docker container, while the old server used an ngix proxy front end for SSL termination. Both servers use CloudFlare DNS proxy.
Happy to provide more information over DM.

You can't trigger the update manually. It runs daily, automatically.
The old releases had almost no logging in the agent (a thing we fixed in new releases). We tried to reproduce it here using:

old agent (0.3.7) and new server (0.9.0)
new agent (0.9.0) and new server (0.9.0)

In both cases, it runs fine. One thing you mentioned in the last comment bothers me:

The new server is terminating SSL in the docker container, while the old server used an ngix proxy front end for SSL termination.

It might be a valid test to avoid those changes and reduce the setup delta between the old and new server so it might raise some clue about the culprit

The new server works fine with the new agent. What time of day does the update take place? After the update, will the agent show the new version of the container name returned by docker ps? So I can check if the update has taken place.
I did initially to upgrade the shellhub server in place on the old server (0.3.7 > 0.9.0), however I ran into the issue of not being able to update the database, as reported https://gitter.im/shellhub-io/community?at=62281c2e6b9124232025a54b
make upgrade_mongodb
returns
sh: 1: Syntax error: end of file unexpected make: *** [upgrade_mongodb] Error 2
I figured the issue was caused by the old server is running very old packages (ubuntu 14.04).
Would it be useful if I gave you a login via to help with debugging? I'm happy to pay for your time. This is a production system, I'm keen to minimise downtime. Thanks a lot for your help.

I'll ask our business people to contact you.

To follow up on this issue: restarting the client devices, enabled the connection to be restored
The client shellhub agent could then be forced to update using the following:
cat > /home/pi/manual-upgrade-shellhub <<EOF
docker stop shellhub
docker rm shellhub
curl -sSf "https://shellhub.openenergymonitor.org/install.sh?tenant_id=xxxxxxxxxxxx" | sh
EOF
chmod a+x /home/pi/manual-upgrade-shellhub
nohup /home/pi/manual-upgrade-shellhub

Thanks to the shellhub team for helping to debug this.


More validations for custom vnet and vmss masters

What this PR does / why we need it:

Add validation for firstConsecutiveStaticIP when using custom vnet and vmss masters
Add unit test for validation of firstConsecutiveStaticIP and vmss masters
Add docs for using custom VNET with VirtualMachineScaleSets MasterProfile

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #4168
Special notes for your reviewer:
If applicable:

[ ] documentation
[ ] unit tests
[ ] tested backward compatibility (ie. deploy with previous version, upgrade with this branch)

Release note:

/lgtm


[UI] Collapse the collapse table arrow of gluten build information

What changes were proposed in this pull request?
Gluten Build Information is not very important, we can collapse it by default.
How was this patch tested?
before:

after:

@ulysses-you  could you please take a look?

===== Performance report for TPCH SF2000 with Velox backend, for reference only ====

query
log/native_master_12_15_2023_time.csv
log/native_master_12_14_2023_ee48260b2_time.csv
difference
percentage

q1
34.66
34.04
-0.615
98.23%

q2
25.04
25.15
0.104
100.41%

q3
38.08
38.55
0.468
101.23%

q4
39.96
38.97
-0.990
97.52%

q5
72.01
69.87
-2.141
97.03%

q6
6.34
7.26
0.919
114.51%

q7
84.32
83.73
-0.594
99.30%

q8
85.64
87.27
1.630
101.90%

q9
127.25
129.00
1.756
101.38%

q10
46.05
45.30
-0.752
98.37%

q11
19.81
20.20
0.387
101.95%

q12
27.20
26.45
-0.756
97.22%

q13
46.12
45.94
-0.187
99.59%

q14
14.01
15.02
1.006
107.18%

q15
28.88
27.17
-1.706
94.09%

q16
15.74
15.59
-0.152
99.03%

q17
103.19
102.60
-0.591
99.43%

q18
150.61
150.13
-0.473
99.69%

q19
13.91
12.82
-1.089
92.17%

q20
27.33
27.14
-0.194
99.29%

q21
228.65
225.86
-2.791
98.78%

q22
13.92
14.42
0.496
103.56%

total
1248.73
1242.47
-6.263
99.50%


Name Form Update

Updates the Name form by clarifying some terms, adding links, and tightening wording.
Hopefully this will avoid some user mistakes when creating MO Names.
Delivers https://www.pivotaltracker.com/story/show/180451897

Merging as it only changes help/instruction text.


📝 Update readme

Thank you for contributing to Homarr! So that your Pull Request can be handled effectively, please populate the following fields (delete sections that are not applicable)
Category
Documentation
Overview

Updated text of readme
Updated titles with fancy title dividers

Also please upload the video, so the link to it doesn't get lost

Also please upload the video, so the link to it doesn't get lost

I did. I dragged it in the edit editor on Github. This is what resulted.
It is not possible to reference it from the repository or an external server.

Can you see https://stackoverflow.com/a/48744957 so we can disable the link on images ? It's kind of annoying that clicking on them redirects. Also If there is a way to keep the headers where the images are so we can link them with for example https://github.com/ajnart/honarr#installation like before it would be nice. Not sure if this is possible

I will check.

https://github.com/ajnart/homarr/blob/docs/update-readme/README.md

They now have ids and you can link to them (eg. https://github.com/ajnart/homarr/blob/docs/update-readme/README.md#installation )
You can't drag them anymore and they are not clickable anymore


Last Week in Pony - November 13, 2022

Version 0.52.0 of ponylang/ponyc has been released.
See the release notes for more details.


Fairer stream write scheduling [#125].

This greatly improves multiplexing and stream fairness in the use case from #125 with no significant cost (the run I'll show is slightly slower, but I think that could be measurement noise and if not it is small).  The idea is that we keep an ordering for the streams and every time we generate datagrams to send, we recompute the list, moving anyone who got stream data transmitted to the end.
All the tests pass for me.  There seems to be an intermittent loss of one line of coverage related to qlog that I don't understand; we'll see if it shows up in the CI.
Here the is before case, in the terminal and qvis:

And now the much nicer after case:

Thanks so much for tackling this, it's long overdue!
I'm going to have to re-read this, as I'm not sure what happens in certain situations. For instance if you have a mix of streams being discarded (finished) and another stream which hits an exception.. won't we end up keeping the discarded stream in the queue?

I fixed the exception handling.  I also tested again, with bigger transfers and with qlog turned off.  The new code is actually a bit faster, so I'm not worried about performance any more.


source-default-centos-7 is failing

Cookbook version
HEAD as of 2019-03-18
See this build: https://circleci.com/gh/sous-chefs/haproxy/2606

C:\GitHub\sous-chefs\haproxy>chef exec kitchen verify source-18-centos-7
-----> Starting Kitchen (v1.23.2)
-----> Setting up ...
Finished setting up  (0m0.00s).
-----> Verifying ...
Loaded tests from {:path=>"C:.GitHub.sous-chefs.haproxy.test.integration.source-1.8"}
Profile: tests from {:path=>"C:/GitHub/sous-chefs/haproxy/test/integration/source-1.8"} (tests from {:path=>"C:.GitHub.sous-chefs.haproxy.test.integration.source-1.8"})
Version: (not specified)
Target:  ssh://vagrant@<IP_ADDRESS>:2222
Directory /etc/haproxy
[PASS]  should exist
File /etc/haproxy/haproxy.cfg
[PASS]  mode should cmp == "0644"
Service haproxy
[PASS]  should be installed
[PASS]  should be enabled
[PASS]  should be running
Test Summary: 5 successful, 0 failures, 0 skipped
Finished verifying  (0m3.05s).
-----> Kitchen is finished. (0m50.51s)

Looks like that circle link is to a failure on the de-poise branch, which we're still working on. Master appears to be ok.


change text in dropzone

Very sorry if this is a dumb question, but is there a way to change the default "Drop files here" text in the drop zone?

Unfortunatelly, it's not easy and you have to fork the project and change the template.
Maybe you can do a pull request ;)

Thank you @tomitrescak, maybe I will.


test: repair the test on Windows

sleep is not portable as it is not part of the C standard.  Use the
platform specific sleep function.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

@swift-ci please smoke test

Thank you @compnerd, I'll remember that!


unlock wallet button

There is no unlock wallet option in the qt menu  v<IP_ADDRESS>

True, but you can unlock and lock your wallet also in the debug console of the qt. For example, if you want to unlock the wallet for like 60 seconds you can use the command: walletpassphrase "your pass phrase" 60. If you want to lock the wallet again use the command: walletlock.

I do not know how to install the wallet on a Mac. I think it would be good to publish some instructions for people who do not know much about programming.

Maybe I have to use the terminal?

I like to invite you to our Discord channel, we have a hexx-wallet-help section. I can guide you there to setup your wallet on a Mac. https://discord.gg/fADCkKC

Thanks!

hi devcon-gh, fo you know about the wallet issue in yobit for hxx?
Yobit have asked for the source code update, stating that is the reason that the wallet is inactive.  If they receive the source code update, apparently they will be able to activate the hxx wallet on yobit so that withdrawals can be made.
What's your take on this?

Of course I know about the wallet issue on Yobit. The answer they gave you is just a useless standard reply. It is not something Hexx can do about. We did many requests last months via direct contact, support, twitter to get the wallet updated at Yobit. But unfortunately without luck. For now I recommend you not to use Yobit anymore. The Hexx team is on it and we won't give up.

will be added later


additional info

which nitro version is this plugin supposed to work on?

Sorry, I forget it. I don't have Acer laptops, I tested this plugin on my friend's laptop.
If you afraid it's incompatible, you can try WMI API mode, which doesn't depend on NitroSense.


Some methods are using Await.result to block

What is the main problem to replace [R] with Future[R]?
// TODO should not be use DBIO and Future
def first(implicit session: JdbcBackend#Session): Future[R] = {
      session.database.run(a.head)
}

@UnknownNPC To provide blocking interface.

@takezoe as I know we can't provide blocking interface without Await.result or you have some ideas?

@UnknownNPC No. Simply, I would like to avoid context switching by running DBIO asynchronously. Therefore, I fixed to use the current thread for DBIO execution in 2beb8b32d9ffeccf38eb214ddc19d724b7c6ca98,


use graphql console reporter with quiet:true option

We added a --quiet option in https://github.com/facebook/relay/pull/2204 that cleaned up some console logs when the option is supplied.
This patch uses this option to make sure we don't console log when webpack is running.
Fixes: https://github.com/danielholmes/relay-compiler-webpack-plugin/issues/5

Hi there,
Is this something that could be optional ?
I'm not sure how this could be implemented since I'm new to webpack plugins, but this would be useful for debugging.


[Question] Error Result from MediatR pipeline behaviour

I Have used ErrorOr for many simple apps and works really good when using MediatR. However, I am trying to implement a MediatR Pipeline Behaviour in which I log different exceptions and erros. Currently looks like this:
public class ErrorPipelineBehaviour<TRequest, TResponse>(
    ILogger<ErrorPipelineBehaviour<TRequest, TResponse>> logger)
    : IPipelineBehavior<TRequest, TResponse>
    where TRequest : IRequest<TResponse>
    where TResponse : IErrorOr

{
    private const string UnknownError = "An unknown error occurred.";

    public async Task<TResponse> Handle(TRequest request, RequestHandlerDelegate<TResponse> next, CancellationToken _)
    {
        logger.LogInformation("A request {@Request} has been sent.", request);

        try
        {
            var result = await next.Invoke();

            if (result.IsError)
            {
                var errors = result.Errors!.Select(e => new
                {
                    e.Code,
                    e.Description
                }).ToArray();
                logger.LogError("An error result has been returned for request {@Request} with errors<EMAIL_ADDRESS>request, errors);
            }

            return result;
        }
        catch (DbException e)
        {
            logger.LogError("A database exception has ocurred for request {@Request} with exception<EMAIL_ADDRESS>request, e);
            throw;
        }
        catch (TaskCanceledException)
        {
            logger.LogInformation("A task has been cancelled for request<EMAIL_ADDRESS>request);
            throw;
        }
        catch (Exception e)
        {
            logger.LogError("An exception has ocurred for request {@Request} with exception<EMAIL_ADDRESS>request, e);
            throw;
        }
    }
}

I would like to, instead of throwing the exceptions, return an Error. The ways I have tried it results in either compilation errors or runtime errors (with casting).
Something like return Error.Unexpected("TaskCancelled", "The task has been cancelled."); would say "Cannot implicitly convert type 'ErrorOr.Error' to 'TResponse'".
I have also tried using the ErrorOr.From method and the ErrorOrFactory.
Is there a way currently to do something like this?

I cover this in the README, have you tried it out?
https://github.com/amantinband/error-or?tab=readme-ov-file#mediator--fluentvalidation--erroror-


Foodie website

Project title
Foodie website
Project Description
A completely responsive webpage related to food and all.
Stack:
And in order to tick the check box just but x inside them for example - [x] like this. Please delete options that are not relevant.

[x] Html
[x] CSS

??

/assign

??

done


i18n/multi-language support?

Hi,
Targeted developers of my project may come from different countries.
Any solution for jsdoc to support writing jsdoc for multiple lauanges?

This is something I have been looking into just the past few days. Unfortunately, strings which are generated by the jsdoc code are hard-coded in the application's default templates. They are scattered through publish.js as well as several files in the tmpl folder.
I was able to create a German version by copying the entire contents of the default template to another folder and editing the strings I needed. Then I can call jsdoc with the -t argument and it uses that template. But this is obviously not a good solution.
There is a plugin called jsdoc-i18n-plugin. It crashed the first time I used it because it tries to create a directory -- possibly a permissions thing (on Linux), but after I created the "locales/de_DE" folder it seemed to work. What it does is to create a simple JSON file which can be used for translations, but there is no instruction or documentation on how to get the translation back into jsdoc once it is finished.
It would take some effort on the developers' part to configure jsdoc for multiple languages, and after looking around on the internet, it seems there is no standard way of doing this. Some good ideas can be found on this site: http://wiki.commonjs.org/wiki/I18n_Proposal_A, but they would have to be implemented somehow.

Unfortunately, JSDoc's default template is not localizable--as @bobhairgrove says, you have to fork the template to modify the hard-coded strings. I'm working on a new template, called Baseline, that is fully localizable.
I'm not aware of any projects that have used JSDoc to provide docs in multiple languages, and I don't think there is a simple solution for doing so.

I just had a look at the Baseline template file "en.yaml" in the lang subfolder. It looks promising! I assume that there is some kind of tool for translators so that they do not have to edit the .yaml file directly? Can we use .po format, for example?
What sort of engine will handle the plural forms? This is probably one of the trickiest parts if i18n because many languages have more than one case. In Russian, for example, plurals are different depending on whether there is 0; 1; 2 to 4; 5 or more up through 19, then the grammatical endings repeat ... 21,22-24, 25-30, etc.)

I assume that there is some kind of tool for translators so that they do not have to edit the .yaml file directly? ...What sort of engine will handle the plural forms?

No, there's no special tool for editing the .yaml file. But I quote from the README for the message-formatting library that Baseline uses:

The message syntax that this package uses is not proprietary, in fact it's a common standard message syntax that works across programming languages and one that professional translators are familiar with. This package uses the ICU Message syntax and works for all CLDR languages which have pluralization rules defined.

The message format should be flexible enough to handle languages with weird pluralization rules.

Hi guys, I know this is an old topic. But I came across it when I was looking for a i18n tool solution for JSDoc and honestly after much searching I didn't find anything that met my needs. In light of that I developed my own over the last week or so and published it to npm. Thought it sensible to add a note to this thread in case anyone else ends up in a similar situation looking for a similar tool.
Github: https://github.com/AlmirKadric-Published/jsdoc-i18n
NPM: https://www.npmjs.com/package/jsdoc-i18n