Realm file decryption failed Path

Goals
I want an encrypted Realm file to be used in my iOS app.
Expected Results
Have a working Realm based app to be working.
It is working, but i'm getting many crash reports.
Actual Results
Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=io.realm Code=2 "Unable to open a realm at path '/var/mobile/Containers/Data/Application/6D5367BE-6E60-49C2-A8DB-367AE9B2D723/Documents/myRealm.realm': Realm file decryption failed Path:." UserInfo={Error Code=2, NSFilePath=/var/mobile/Containers/Data/Application/6D5367BE-6E60-49C2-A8DB-367AE9B2D723/Documents/myRealm.realm, Underlying=Realm file decryption failed Path: /var/mobile/Containers/Data/Application/6D5367BE-6E60-49C2-A8DB-367AE9B2D723/Documents/myRealm.realm, NSLocalizedDescription=Unable to open a realm at path '/var/mobile/Containers/Data/Application/6D5367BE-6E60-49C2-A8DB-367AE9B2D723/Documents/myRealm.realm': Realm file decryption failed Path:.}: file /Users/eitanimac/Desktop/ios_apps/EitanApp/EitanApp/AppDelegate.swift, line 93
Steps to Reproduce
I have no idea as i cannot manage to reproduce it myself and none of my co-workers with iOS seem to experience any bugs with the app.
Code Sample
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        GMSServices.provideAPIKey(“XXX”)
        GMSPlacesClient.provideAPIKey(“XXX”)
        FirebaseApp.configure()

        Fabric.with([Crashlytics.self])

        // Delete the old default realm file if exists and replace it with new encrypted one
        if FileManager.default.fileExists(atPath: Realm.Configuration().fileURL!.path) {
            do {
                try FileManager.default.removeItem(at: Realm.Configuration().fileURL!)
            } catch {
                print("Removing error")
            }
        }

        var encryptionKey: Data? = nil

        #if DEBUG
        encryptionKey = nil
        #else
        encryptionKey = getKey() as Data
        #endif

        print("Realm file path: \(Realm.Configuration.defaultConfiguration.fileURL?.absoluteString ?? "")")

        Realm.Configuration.defaultConfiguration = Realm.Configuration(fileURL: Realm.Configuration().fileURL!.deletingLastPathComponent().appendingPathComponent("myRealm.realm"),
                                                                       encryptionKey: encryptionKey,
                                                                       schemaVersion: 1,
                                                                       migrationBlock: { migration, oldSchemaVersion in
        })

        print("Realm file path: \(Realm.Configuration().fileURL?.absoluteString ?? "")")

        let realm = try! Realm()

        //Check which StoryBoard to init
        var storyboardName: String = ""
        let user = realm.objects(User.self).first

        if let user = user {
            storyboardName = "Main"
        } else {
            storyboardName = "Welcome"
        }

        let storyboard = UIStoryboard(name: storyboardName, bundle: nil)
        let intialVC = storyboard.instantiateInitialViewController()
        self.window?.rootViewController = intialVC
        self.window?.makeKeyAndVisible()

        UIApplication.shared.registerForRemoteNotifications()

        return true
    }

    func getKey() -> NSData {
        // Identifier for our keychain entry - should be unique for your application
        let keychainIdentifier = “eitan.com.MyApp”
        let keychainIdentifierData = keychainIdentifier.data(using: String.Encoding.utf8, allowLossyConversion: false)!

        // First check in the keychain for an existing key
        var query: [NSString: AnyObject] = [
            kSecClass: kSecClassKey,
            kSecAttrApplicationTag: keychainIdentifierData as AnyObject,
            kSecAttrKeySizeInBits: 512 as AnyObject,
            kSecReturnData: true as AnyObject
        ]

        // To avoid Swift optimization bug, should use withUnsafeMutablePointer() function to retrieve the keychain item
        // See also: http://stackoverflow.com/questions/24145838/querying-ios-keychain-using-swift/27721328#27721328
        var dataTypeRef: AnyObject?
        var status = withUnsafeMutablePointer(to: &dataTypeRef) { SecItemCopyMatching(query as CFDictionary, UnsafeMutablePointer($0)) }
        if status == errSecSuccess {
            return dataTypeRef as! NSData
        }

        // No pre-existing key from this application, so generate a new one
        let keyData = NSMutableData(length: 64)!
        let result = SecRandomCopyBytes(kSecRandomDefault, 64, keyData.mutableBytes.bindMemory(to: UInt8.self, capacity: 64))
        assert(result == 0, "Failed to get random bytes")

        // Store the key in the keychain
        query = [
            kSecClass: kSecClassKey,
            kSecAttrApplicationTag: keychainIdentifierData as AnyObject,
            kSecAttrKeySizeInBits: 512 as AnyObject,
            kSecValueData: keyData
        ]

        status = SecItemAdd(query as CFDictionary, nil)
        assert(status == errSecSuccess, "Failed to insert the new key in the keychain")

        return keyData
    }
}

Version of Realm and Tooling
ProductName:	Mac OS X
ProductVersion:	10.14.5
BuildVersion:	18F132

/Applications/Xcode.app/Contents/Developer
Xcode 10.2.1
Build version 10E1001

/usr/local/bin/pod
1.7.0.beta.1
Realm (3.17.0)
RealmSwift (3.17.0)

/bin/bash
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin18)

(not in use here)

/usr/bin/git
git version 2.20.1 (Apple Git-117)

As i said, the crash happen in many devices that i can see in Fabric, but none of my co-workers can seem to experience any crashes from the app.
The code sample i've put is combined from many solutions i found in the internet.
Looking forward to get some help and solve this already!
Thanks!

@eitanaviv Is this still an issue? Can you update your version of Realm? The version you are using is fairly out of date.

Going to close this out as it's been a couple of months and a number of releases have occurred. If this is still an issue, please open a new ticket.


Update Table Builder 01-installation.md

[x] Changes have been thoroughly tested to not break existing functionality.
[ ] New functionality has been documented or existing documentation has been updated to reflect changes.
[ ] Visual changes are explained in the PR description using a screenshot/recording of before and after.

I've install Table builder on my existing project and the notification cannot work, I've struggle a lot. I create a fresh application and notice that in the layout components @livewire('notifications') is added. I've added this one in my existing and it works, so I thought this need to be instructed as well because notification is also installed along with table.
I didn't check other builder but may need this also..

The notifications installation is not required for the tables to work, so I would rather not bloat the layout just yet. I think it is probably quite self-explanatory that the notifications package needs installing if you want to receive notifications.

If I run composer require filament/tables:"^3.0-stable" -W then I got like image, notification is pre-installed along with others. But in order to use I need to put  @livewire('notifications') in layout. Normally dev (like me) just copy-paste from docs that's why


another domain

Can I randomly generate datasets to apply APE to other domains?

Yes :). APE can be applied to any dataset


fix: handle webpack configs exported as default

Although you can do ./webpack.main.config.ts currently you still have to do module.exports = config instead of export default config.  This handles the default export in the same way that our forge config resolver does

@MarshallOfSound Might be a similar issue with the Forge config file itself as well. I know this issue was for the webpack configs themselves but just wondered if this was something Forge wanted to support in 7.x (since it may have inadvertently supported it in 6.x).
Context
I compile my forge.config.ts into forge.config.js using the following tsconfig.json:
{
  "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "ignoreDeprecations": "5.0",
    "resolveJsonModule": true,
    "sourceMap": true
  },
  "extends"<EMAIL_ADDRESS>}

My forge.config.ts looks something like this:
import type { ForgeConfig } from '@electron-forge/shared-types';

const config: ForgeConfig = { ... };

export default config;

Using Electron Forge 6.4.2, I can compile and I can start/make without any errors. When upgrading to 7.x (including testing on 7.2.0) this fails for me.
Workaround
Changing my forge.config.ts to the following works:
import type { ForgeConfig } from '@electron-forge/shared-types';

const config: ForgeConfig = { ... };

// @ts-expect-error
export = config;

Again, if this isn't something Forge wants to officially support I totally get in and wanted to at least throw the workaround in here without cluttering the issue board.


Search results should be highlighted in the page

This is currently a constraint in the way we embed pdf.js, it doesn't actually render out the text at all (instead, it simply generates a canvas to show the rendered PDF). This probably means setting up PDF.js manually instead of using an existing angular binding. Here's some discussion about the PDF.js aspect of this.

too bad. how about closing for now with a tag like "parked"?


Use golangci-lint instead of golint and gofmt.

golangci-lint is able to run dozens of useful linters. Enable equivalent of what
we had so far. Add more linters as the code is improved. There are outstanding
issues preventing from running some of them (e.g. errcheck or deadcode).
More on golangci-lint: https://github.com/golangci/golangci-lint
/assign @mm4tt

ref https://github.com/kubernetes/perf-tests/issues/573

/test pull-perf-tests-verify-lint

@mm4tt the presubmit is passing now, please review at your earliest convenience.

/lgtm
/approve


Command for evaluations

Hi! I wonder if you could provide the command for evaluating an unlearned model?

We are currently doing some refactor to better cope with multigpu evaluation, we will update the code as soon as that refactor is done, thanks for your interest!

@yujianll Hi, can you take a look at the updated evaluation pipeline and let us know if that's helpful, thanks!


SciCode: PR | Arcadia Impact

PR for the implementation for SciCode.
Evaluation Report:
In the original paper, the authors provide the results for benchmarking scicode on 80 problems, all without any background information. They measure the step-wise accuracy as well as the problem-level accuracy.
The scicode authors have provided the test-data and problems for only 65 problems and thus we are constrained on only testing those, instead of the original 80 they report in the paper. Despite that, our results match with their tests, with the subproblem accuracy having a delta of 2%.
Please note that the authors of scicode also do not specify the exact version of gpt4o being used in the paper, and that could also be a contributing factor to the results. We stick to their exact prompts used.
Original Benchmark Results (default template):

Models
Subproblem
Main Problem

Proprietary Models

GPT-4o
25.0
1.5

GPT-4-Turbo
22.9
1.5

Claude3.5-Sonnet
26.0
4.6

Claude3-Opus
21.5
1.5

Claude3-Sonnet
17.0
1.5

Gemini 1.5 Pro
21.9
1.5

Our implementation results:

Model Name
Step/Subproblem Accuracy (%)
Problem Accuracy (%)

GPT4o
22%
1.54%

GPT4o-mini
15%
1.54%

Our results (On 65 problems) [ Default setup : Without Background]

Model Name
Step/Subproblem Accuracy (percentage)
Problem Accuracy (percentage)

GPT4o
22%
1.54%

GPT4o-mini
15%
1.54%

Note that there are still a bunch of ruff and mypy fixes required here (you can and should run and resolve all of these checks locally with make check)


Fixed the 'WSGIRequest' object has no attribute 'REQUEST' …

…error Django 1.9
It was a minor change. The issue was caused by the overhaul of Django's core request and response objects AFAIK.
Basically: request.REQUEST -> request

Hey
What is the status of this PR?
I assume the change can't be made without affecting other areas.


Feature request for horizontally placed legends

I have developed a software that needs charting support, and I have considered XChart instead of JFreeChart due to not having to ship XChart source with the application (LGPL problems) and smaller size of XChart. However, there's one missing feature I would like to have.
Currently, if you do two line plots in the same chart, and display the legend using the position LegendPosition.OutsideS (outside below the chart), the legends are placed vertically. This means that lots of vertical space is wasted. This is completely unacceptable in my application where vertical space is limited.
I would like to have a feature to place the two legends horizontally, because the chart is quite wide and there is plenty of horizontal space below the chart. I place the legends outside and below the chart to eliminate the risk that they would be in the same area where useful data is showed.

I've add the feature request tag. If you'd like to contribute the new feature via a pull request, I'd happily accept it. Otherwise I can try to do it if.when I have time. In the mean time, you could try placing the legend inside the chart if that works.

As an interim solution, I made the legend a .png file that is drawn into a custom JPanel placed with BorderLayout below the actual graph for which legend is disabled. So, this is no longer a show-stopper for me, but would be nice to have. I looked at the code, and it seems it would require so much knowledge of XChart internals that I'm not willing to spend the additional time considering that I found an interim solution.

Done. Please test if you have the chance.

I can confirm the feature works as it should.


Support for windows?

Hello,
I'm trying to decide on which Fuse Go library to use, either this or https://github.com/bazil/fuse. I got a prototype working using Bazil's Fuse, however after spending most of the day reading your code and comments, I'm inclined to switch over.
One of my requirements is Windows support, was wondering if you were planning to add it eventually (<6 months)? Bazil doesn't support Windows currently either, but I recall reading an issue or comment that it might be supported in the long run.
PS thanks for taking the time to write such detailed comments, it has helped me immensely in understanding the internals of Fuse; especially all the gotchas and warnings.

Hello, I'm glad you liked the comments. :-)
Windows support isn't something I'm interested in at all, unfortunately. I'm surprised to even hear it requested—fuse doesn't work on Windows, does it?

There's something Dokan, but not sure it's maintained anymore. Will look into alternatives, thanks.

No worries, please let me know what you settle on, just for the sake of my curiosity. For the same reason: are you able to say what you're working on?


feat(metrics): support metrics provider

Issue number: #2015
Summary
Changes
This PR refactors Metrics class to use Metrics Provider. Enabling customer to bring their own provider for outputting custom metrics format.The default CloudWatch EMF logic is refactored into a EMF provider.
User experience

For Customer using the default EMF metric format, this PR won't change any UX
For Customer willing to implement custom metrics format in Powertools Metrics

Before:

The Metrics class only supports EMF format.

After:

User can bring their own metrics provider to support custom metrics format

Checklist
If your change doesn't seem to apply, please leave them unchecked.

[x] Meet tenets criteria
[x] I have performed a self-review of this change
[x] Changes have been tested
[ ] Changes are documented -> Document after changes are reviewed and finalized
[x] PR title follows conventional commit semantics

Is this a breaking change?
RFC issue number:
Checklist:

[ ] Migration process documented
[ ] Implement warnings (if it can live side by side)

Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

Codecov Report
Patch coverage: 93.33% and project coverage change: -0.19 :warning:

Comparison is base (32666e4) 97.47% compared to head (20b1145) 97.28%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2194      +/-   ##
===========================================
- Coverage    97.47%   97.28%   -0.19%
===========================================
  Files          148      150       +2
  Lines         6882     6974      +92
  Branches       505      506       +1
===========================================
+ Hits          6708     6785      +77
- Misses         137      148      +11
- Partials        37       41       +4

Impacted Files
Coverage Δ

aws_lambda_powertools/metrics/provider.py
88.77% <88.77%> (ø)

aws_lambda_powertools/metrics/base.py
96.74% <95.45%> (-3.26%)
:arrow_down:

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

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

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

...bda_powertools/utilities/parser/models/__init__.py
100.00% <100.00%> (ø)

...s/utilities/parser/models/s3_event_notification.py
100.00% <100.00%> (ø)

...s_lambda_powertools/utilities/parser/models/sqs.py
100.00% <100.00%> (ø)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

@roger-zhangg great job refactoring Metrics to use the new standalone provider approach. What do you think about moving the CloudWatchEMF/Metrics to the provider folder, so in this case we have all providers using the same structure. I think you did that before changing that PR to use this new approach, right?

Yeah I'll move it

Folks - what's the latest here?
I'm worried if we're gonna get Observability providers ready for reinvent

Folks - what's the latest here?
I'm worried if we're gonna get Observability providers ready for reinvent

We did multiple provider tests including Datadog and OTEL with the new metrics provider. I believe we need a final reivew before proceeding to merge?

Great! Self-assign to review -- when you can, could you update the PR body with snippets of the proposed UX please?
Same as the other PR, we should be able to know what's changed and how customers will perceive this value add change at a quick glance.
Thank you so much (again)

@heitorlessa Just updated the UX in PR body. Thanks!

@heitorlessa Just updated the UX in PR body. Thanks!

Hi @heitorlessa! We need your help to make a final review of this PR and provide feedback if necessary. To make your job easier, let me explain a few points.
1 - The default provider remains Metrics to flush metrics for CloudWatch using EMF.
2 - MetricManager has been kept as the default class for the default Metrics provider (CloudWatch EMF). I don't believe there is a need to refactor as CloudWatch EMF is very specific and remains the default provider, we keep it as is.
3 - We added a new class CloudWatchEMF, which is basically an alias for Metrics. So the client can import like this:
from aws_lambda_powertools import CloudWatchEMF
metrics = CloudWatchEMF()

Does it make sense to keep this? Is this too much? Should we create an alias for EphemeralMetrics also? We would like to introduce the experience of using an instance with the name of the provider.
4 - In this PR two new classes were added: MetricsProviderBase and MetricsBase to match the experience proposed here: https://github.com/aws-powertools/powertools-lambda-python/issues/2015#issuecomment-1492242654. This way we make it easy to bring any metrics provider that needs different configurations.
5 - @roger-zhangg created two experimental providers (DataDog and OTEL) to test it and I could use it with no problem. Do you want to try? Let me know and we can arrange a meeting to help on this test.
6 - We've added additional dependencies to test external providers, but don't worry, we'll remove them before merging.
7 - I remember you mentioned adding a generic method to create operational metrics that can be used by other utilities just passing an instance of Metrics to them. I think we need to discuss this in another issue or even an RFC before implementing this. This will not be implemented in this PR, does it make sense?
8- We really need your help with the documentation. Should we create a section with a real external provider? with an example? I think this is a great feature and we can take this opportunity to spread the word.
Thanks.

Hello @heitorlessa! I think we are very close to finishing this and it will be a great achievement.
Can we book a time/day next week to focus on that and finalize it? On Friday I have a sync with @roger-zhangg and we're going to review the PR one more time, just so we don't miss anything.
Thanks

Three quick notes:

Try switching between Metrics EMF and Datadog provider to see if the UX is on the Powertools bar -- this will improve the PR body and even the RFC (update later), including docs

Update PR body accordingly

For later, I noticed the Datadog provider has tags={...}. You can make the experience nicer by relying on **kwargs - it then becomes add_metric(name="b", value=1, environment="prod", product="payment")
I noticed the snippets don't make use of the capture_cold_start metric (does it work for Datadog?)

Quick notes as we go through peer review @leandrodamascena

Metrics is our premium. It should default to instantiate AmazonCloudWatchMetricsEMFProvider() if no provider is passed. Otherwise we'll become too Java-ish in having too many options to setup something we already know upfront what good looks like.
Same with Datadog: DataDogMetrics -> instantiate DataDogMetricsProvider()
Move Metrics logic under AmazonCloudWatchMetricsEMFProvider

Hello @heitorlessa! About the documentation, do you think it makes sense to add it now OR when we add the Datadog provider? In my opinion, we should add Datadog and create the documentation.

@roger-zhangg I would like your review here also.

peer review last comments so we can merge this today. We can cleanup the slight confusion in OOO / Protocol, docs, etc. in a separate PR (easier to review later).
CAN'T WAIT FOR THIS!

peer review last comments so we can merge this today. We can cleanup the slight confusion in OOO / Protocol, docs, etc. in a separate PR (easier to review later).
CAN'T WAIT FOR THIS!

I removed the docs for now and I'll create an additional issue to pay this tech debt.
ALMOST THERE! @roger-zhangg!

pending CI checks, feel free to merge ;) Gotta go cook dinner. Thank you both @roger-zhangg and @leandrodamascena - this marks the initial steps of supporting any observability provider 🍺 🎉


Ease UI translation (i18n) process

This is a placeholder ticket for future work on internationalization (i18n) for the Angular UI. Others are encouraged to add comments to this ticket on other ways to improve the translation process for the new UI.
Currently, we are using ngx-translate as our internationalization library. This uses JSON formatted translation files by default.
To simplify the translation process (for non-technical users) we may wish to use a more standard translation file format, e.g. .po which can be used with Poedit.net.  Ngx-translate already has at least to one sample po-loader.

Closing as fixed by https://github.com/DSpace/dspace-angular/pull/439  See also docs at https://wiki.lyrasis.org/pages/viewpage.action?pageId=117735441


Fix bug not to skip in parallel stages

This patch fixes #158
Test is https://github.com/walter-cd/walter-integration-test/commit/3003585f4e220a6c3d2dc864ade7bc0bfd93a483

LGTM!

Thanks for the review @mizzy!


Investigate how to collect page view data from MS Doc

Context
MS docs about Spring on Azure:

https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/
https://learn.microsoft.com/en-us/azure/developer/java/spring

Goal
Get the Kusto query about get the page view of MS Docs.

The following query can be used to get the Page View (PV) count

Execute in [Web] [Desktop] [cluster('cgadatamall.westus.kusto.windows.net').database('CustomerTouchPoint')]let MonthEnd = datetime(2023-01-01);let MonthStart = datetime_add('month',-5,MonthEnd);database("WebAnalytics").PageView    | where StartDateTime between (MonthStart..MonthEnd)    | where Site == "learn.microsoft.com" or Site == 'docs.microsoft.com'    | where Url has "azure/developer/java/spring/"    | where Url !has "review"    | summarize visitorCount=dcount(VisitorId) by Url    | order by visitorCount desc     | limit 10Table0

Url
visitorCount

https://learn.microsoft.com/en-us/azure/developer/java/spring/
25

https://learn.microsoft.com/zh-cn/azure/developer/java/spring/
1

https://docs.microsoft.com/en-us/azure/developer/java/spring/
1

https://learn.microsoft.com/ja-jp/azure/developer/java/spring/
1

Closing this issue because Kusto query pasted in previous comment.


Certificate Expiry sensor comes up as 'Unavailable' on every restart

The problem

I am still having the Cert Expiry sensor come up in an unavailable state on every restart.  If I leave it alone it resets itself with the correct value in 24 hours or so.  I thought this was fixed and I don't see any open issue for it currently, so not sure what I'm doing differently.
Environment

Home Assistant release with the issue: 0.105.5
Last working Home Assistant release (if known): I don't know if it's ever worked for me
Operating environment (Hass.io/Docker/Windows/etc.): HomeAssistant (hass.io) on Ubuntu Virtualbox host, running on Windows 10
Integration causing this issue: Certificate Expiry, installed using Integrations page
Link to integration documentation on our website:
https://www.home-assistant.io/integrations/cert_expiry/

Problem-relevant configuration.yaml

N/A, installed via integrations UI
Traceback/Error logs

2020-02-18 16:42:34 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.ssl_certificate_expiry fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 461, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/cert_expiry/sensor.py", line 122, in update
    cert = get_cert(self.server_name, self.server_port)
  File "/usr/src/homeassistant/homeassistant/components/cert_expiry/helper.py", line 12, in get_cert
    with socket.create_connection(address, timeout=TIMEOUT) as sock:
  File "/usr/local/lib/python3.7/socket.py", line 728, in create_connection
    raise err
  File "/usr/local/lib/python3.7/socket.py", line 716, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

Additional information
My guess is that the certificate expiry sensor is trying to update before HA is ready to access the domain.  If I remove and reinstall the integration after HA is up and running, it works fine... until the next restart.  It is consistent and happens on EVERY restart of HA.

I'm having the same problem while trying to get the expiration date from my home assistant website.
I did some digging, and, in my case, when the cert_expiry component is initialized, the home assistant website is not yet up.  That's why I get "Connection refused".  There is literally no server listening to the request.
I tweaked the update method of the sensor.py to ignore the first error.  It's really ugly but since I know my configuration is valid... it works...  Starting at line 133 :
except (ssl.CertificateError, ssl.SSLError):
    self._available = True
    self._state = 0
    self._valid = True
    return

Do you know if it's possible to configure the start of cert_expiry to be after the start of the HA website ?

@phlet That's the use case that https://github.com/home-assistant/home-assistant/pull/27137 intended to address. What version are you running?

I am on the latest released version.
Home Assistant 0.105.5

@jjlawren That's what I thought, however it's still happening and I guess my belief that it was initializing before HA was serving is correct. But it seems to be limited or else there would be plenty of issues and "me toos" here.  So I wonder if it only occurs on certain set ups, like VM installs for instance.
Here's my details to compare to @phlet 's:

arch
x86_64

dev
false

docker
true

hassio
true

os_name
Linux

python_version
3.7.6

version
0.105.5

virtualenv
false

@phlet can you clarify what you mean by "my home assistant website"? Is this just its own HTTP UI? Or is there also a proxy or such in play?

@rpitera is your issue also for checking the cert on your HA instance or an external website?

It's just its own http ui.  There's no proxy or such.
With the bybass I added it's working..
If I remove the configuration and I add it with integration UI it will work. But as soon as home assistant core is restarted, it doesn't work anymore.

Got it. The event we wait for to determine when the HTTP service is ready must not be waiting long enough. I'll need to have a think.

It's just its own http ui. There's no proxy or such
Same here.
If I remove the configuration and I add it with integration UI it will work. But as soon as home assistant core is restarted, it doesn't work anymore.
Also the same, although if I leave it alone it will update overnight (I haven't checked but I assume it does so at 24:00).  @phlet Did it update if you left it unaltered?

Ok looking at the code between this integration and the HTTP server, there's definitely a race as they both try to init at the same time.

If you need, I'm available to test any patch or theory.

I patched my system with your 2 commits.  There's seems to have a small glitch.
First call, I get this message (that's alright!) :

2020-02-19 19:23:11 ERROR (MainThread) [homeassistant.components.cert_expiry.sensor] Connection refused by server: mydomain.com, will retry in 15s

There is a second call 15 seconds later and there's no error.  Looks good !
Unfortunately, the state value stay "unavailable" instead of having the number of day before the expiration.
I added another domain in my configuration file (google.com).  From what I am seeing, the first exception we are getting seem to block the sensor registration that I get with google but not with mydomain.com :

2020-02-19 19:29:55 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.cert_expiry
2020-02-19 19:29:55 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.cert_expiry entity: sensor.expiration_google

@phlet in this example, "mydomain.com" points back to HA?

yes, mydomain.com is the domain where I have HA installed.

I've got a really, really simple fix...  but I don't know if we can really do that.  I made the modification on my system and it work...
The fix : To simply add a new event in core.py, EVENT_HOMEASSISTANT_RUNNING, that we fire right after the line
self.state = CoreState.running
With that done, in the sensor.py script, we change every instance of EVENT_HOMEASSISTANT_START for EVENT_HOMEASSISTANT_RUNNING.
The problem that I see : we need to change the files core.py and const.py of homeassistant.  Can we do that ?

Yes, but it's a pretty invasive change. I'm trying to not change core or other integrations to fix the behavior of this one.
I made a silly mistake earlier, just pushed a small commit to the linked PR. It was updating the entity during the retry, but not actually changing its state as seen by HA.

I'll try that right now.

It worked !
I even saw the state transition between "unavailable" and the number of day.
Good job !

I've had the same problem since I installed HA, probably version .87 or somewhere around there. I always assumed it just never worked and never bothered to report it. It usually ends up coming back after a day or so, I believe when it tries to update again overnight.
Running in a VM on esxi.

I took a second shot at overhauling cert_expiry in https://github.com/home-assistant/home-assistant/pull/32066. @phlet if you're willing to give that one a try instead of the previous PR, please let me know how it works.

I'll try it tonight.

It's working and the logs are better than before. However, the behaviour seems weird..

As I wrote in the pull request, we lost the name we give to the sensor.  It's now always sensor.cert_expiry_domain instead of sensor.GIVEN_NAME.

When I remove one of the sensor cert_expiry from my configuration.yaml and restart HA, it is still there after the reboot.  Normal ?  I don't know if it was like that before.

With the cert_expiry sensor that fail on startup, if I add a new cert_expiry on another site (let's say microsoft.com), it'll take about 30 second to 1 minutes after the system is fully running before I see it in HA.  All the existing cert_expiry sensor are there at the start, except the new one that take time.  Again, I don't know if it was like that before, I may be testing a bit more than at first...

It's working and the logs are better than before. However, the behaviour seems weird..

As I wrote in the pull request, we lost the name we give to the sensor.  It's now always sensor.cert_expiry_domain instead of sensor.GIVEN_NAME.

That's intended.

When I remove one of the sensor cert_expiry from my configuration.yaml and restart HA, it is still there after the reboot.  Normal ?  I don't know if it was like that before.

That behavior is the same. The YAML config is used to import configs into the Integrations page.

With the cert_expiry sensor that fail on startup, if I add a new cert_expiry on another site (let's say microsoft.com), it'll take about 30 second to 1 minutes after the system is fully running before I see it in HA.  All the existing cert_expiry sensor are there at the start, except the new one that take time.  Again, I don't know if it was like that before, I may be testing a bit more than at first...

Brand new configs in the YAML are delayed by 30s on first import to ensure there aren't race conditions on boot (like checking HA's own cert). This delay can probably be safely reduced to 10s and still be reliable for all users. Creating via the Integrations page is always immediate.

First time I hear about the entity registry...  I just read a bit about it and it's really nice.  Sorry for my ignorance....
Knowing that, everything work as intended here.  The log are really better than the last one.
Great job !

No, it was a good question. It's hard to keep up with all the changes.
It's really nice to have core support for things like renaming where each individual integration doesn't have manage it anymore. Even so, it's a change that has a tendency to make users uncomfortable if they're used to the old way.

I think you'll have guessed it, but I'm one of the users that is a bit uncomfortable with this...
I always try to automate as mush as i can.  I had some automation that were using the custom name.  Right, with my setup, if I reinstall a new home assistant and I use only my yaml, the automation won't work unless I go change manually the sensor name after the first reboot.
Having said that, I can understand what it can give to the user to have the core support done like that.
For me, I'll just change my automation to use the default name and everything will work as expected.

The previous default names were poor for automation. Hopefully the new entity names are easier to work with. If you do have a suggestion to improve, let me know.

I agree with you, the old default name were kind of bad... That's why I was using custom one.
Knowing the new default name, I'm kinda happy with the change and I'm not asking for more.
Having said that, if you want to do more modification, you could keep both behavior by changing the title to something like that :
title = user_input.get(CONF_NAME, host + (f":{port}" if port != DEFAULT_PORT else ""))
That way, we can still override the name with the configuration.yaml and we are sure that it'll not break other users configuration if they were like me and not using the Entities editor.
You also get the better default name.

That's reasonable, I'll add it back in later today. But remember that you can't update the name from the config file and that it's only used during creation.

After starting to reimplement this I'm second-guessing adding it back. I see it as a confusing option that will probably lead to more issue reports.

That way, we can still override the name with the configuration.yaml and we are sure that it'll not break other users configuration if they were like me and not using the Entities editor.

Every entity with a unique ID (like these) is already in the registry, so you're already using it today. Removing this option will not change existing entity IDs, but will give new standardized display names if you haven't set one yourself.
Once you override the display name (or entity ID) in the UI, that becomes its new permanent value. Configuring the entity name via YAML options on the integration is a legacy method that predates the registry. I think it's far better to remove the name option to reduce complexity both in the integration code and how it is documented/used.

I'm confortable with that, and as you said earlier, the default name make sense now.

Do you want I update the documentation ?
I would :

Remove the name from the optional parameter.
Add a note to describe the default name.

Sure, I'd appreciate that!


Review naming for Kernel and Core

The name Kernel may be confusing, as it evokes what manages the rules of the system (currently named ZepCore), instead of a set of shared libraries. Consider using Standard Library  as it may be more accurate, and it is also used in the whitepaper.
Should Kernel be renamed, also review the naming of ZepCore and other kernel-registry contracts.

Naming reviewed offline, being worked on https://github.com/zeppelinos/upgradeability-lib/pull/44 and https://github.com/zeppelinos/kernel/pull/22


TextFormField Exception using flutter version 3.24.0 for android

Steps to reproduce

Run the sample code on an Android device or emulator (regardless of debug or release mode).
Paste a long string into the TextFormField on a screen navigated to using CupertinoPageRoute.
When using MaterialPageRoute for navigation, no exception occurs.
With the end of the string visible at the right edge of the TextFormField, select part or all of the text.
Press the Backspace key.

An exception will occur.
Expected results
The expected behavior is that the selected text should be deleted without an exception occurring.
Actual results
When navigating between screens in a MaterialApp, using MaterialPageRoute does not cause any exceptions with TextFormField. However, using CupertinoPageRoute causes an exception with TextFormField.
The exception occurs only when the maxLines property of TextFormField is set to 1. It happens when a long string is pasted into the field, and the text at the right end is visible. If the text is selected (either a range or all text) and the Backspace key is pressed, an exception is thrown. This issue does not occur when cutting, pasting, or entering other characters.
By the way, there were no issues with version 3.19.6. I'm not certain about the exact version, but I believe the issue started occurring with version 3.2x.
Code sample
Code sample
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('TextFormField Test'),
        ),
        body: const Padding(
          padding: EdgeInsets.all(16.0),
          child: MyHome(),
        ),
      ),
    );
  }
}

class MyHome extends StatefulWidget {
  const MyHome({super.key});

  @override
  State<MyHome> createState() => _MyHomeState();
}

class _MyHomeState extends State<MyHome> {
  @override
  void dispose() {
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Column(mainAxisAlignment: MainAxisAlignment.start, children: <Widget>[
        TextButton(
          onPressed: () async {
            await Navigator.of(context).push(
              MaterialPageRoute(
                  settings: const RouteSettings(name: '/MyTextTest'),
                  builder: (BuildContext innerContext) => const MyTextTest()),
            );
          },
          child: const Text('push: MaterialPageRoute -- OK'),
        ),
        TextButton(
          onPressed: () async {
            await Navigator.of(context).push(
              CupertinoPageRoute(
                  settings: const RouteSettings(name: '/MyTextTest'),
                  builder: (BuildContext innerContext) => const MyTextTest()),
            );
          },
          child: const Text('push: CupertinoPageRoute -- NG'),
        ),
      ]),
    );
  }
}

class MyTextTest extends StatefulWidget {
  const MyTextTest({super.key});

  @override
  State<MyTextTest> createState() => _MyTextTestState();
}

class _MyTextTestState extends State<MyTextTest> {
  final TextEditingController _urlTextInputController = TextEditingController();

  @override
  void initState() {
    super.initState();
  }

  @override
  void dispose() {
    _urlTextInputController.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      resizeToAvoidBottomInset: false,
      body: SafeArea(
        child: Stack(children: <Widget>[
          SingleChildScrollView(
            padding: const EdgeInsets.all(16.0),
            child: Column(
              mainAxisAlignment: MainAxisAlignment.start,
              children: <Widget>[
                TextFormField(
                  controller: _urlTextInputController,
                  maxLines: 1,
                  decoration: const InputDecoration(
                    labelText: 'Enter text',
                  ),
                  validator: (value) {
                    if (value == null || value.isEmpty) {
                      return 'Please enter some text';
                    }
                    return null;
                  },
                ),
              ],
            ),
          ),
        ]),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration
[Upload media here]

Logs
Logs
════════ Exception caught by rendering library ═════════════════════════════════
The following assertion was thrown during performLayout():
RenderBox.size accessed beyond the scope of resize, layout, or permitted parent access. RenderBox can always access its own size, otherwise, the only object that is allowed to read RenderBox.size is its parent, if they have said they will. It you hit this assert trying to access a child's size, pass "parentUsesSize: true" to that child's layout() in RenderFractionalTranslation.performLayout.
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2178 pos 16: 'sizeAccessAllowed'

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.yml

The relevant error-causing widget was:
    TextFormField TextFormField:file:///xxxxxx/lib/main.dart:101:17

When the exception was thrown, this was the stack:
#2      RenderBox.size.<anonymous closure> (package:flutter/src/rendering/box.dart:2178:16)
#3      RenderBox.size (package:flutter/src/rendering/box.dart:2199:6)
#4      RenderFractionalTranslation.applyPaintTransform (package:flutter/src/rendering/proxy_box.dart:2952:24)
#5      RenderObject.getTransformTo (package:flutter/src/rendering/object.dart:3411:25)
#6      RenderBox.localToGlobal (package:flutter/src/rendering/box.dart:2887:39)
#7      RenderEditable._snapToPhysicalPixel (package:flutter/src/rendering/editable.dart:2276:33)
#8      RenderEditable.getLocalRectForCaret (package:flutter/src/rendering/editable.dart:1822:28)
#9      EditableTextState._handleContextMenuOnScroll (package:flutter/src/widgets/editable_text.dart:3852:56)
#10     EditableTextState.build.<anonymous closure> (package:flutter/src/widgets/editable_text.dart:5228:21)
#11     _NotificationElement.onNotification (package:flutter/src/widgets/notification_listener.dart:130:38)
#12     _NotificationNode.dispatchNotification (package:flutter/src/widgets/framework.dart:3403:18)
#13     Element.dispatchNotification (package:flutter/src/widgets/framework.dart:5077:24)
#14     Notification.dispatch (package:flutter/src/widgets/notification_listener.dart:60:13)
#15     ScrollActivity.dispatchScrollStartNotification (package:flutter/src/widgets/scroll_activity.dart:99:65)
#16     ScrollPosition.didStartScroll (package:flutter/src/widgets/scroll_position.dart:1027:15)
#17     ScrollPosition.beginActivity (package:flutter/src/widgets/scroll_position.dart:1018:7)
#18     ScrollPositionWithSingleContext.beginActivity (package:flutter/src/widgets/scroll_position_with_single_context.dart:113:11)
#19     ScrollPositionWithSingleContext.goBallistic (package:flutter/src/widgets/scroll_position_with_single_context.dart:146:7)
#20     IdleScrollActivity.applyNewDimensions (package:flutter/src/widgets/scroll_activity.dart:175:14)
#21     ScrollPosition.applyNewDimensions (package:flutter/src/widgets/scroll_position.dart:718:15)
#22     ScrollPositionWithSingleContext.applyNewDimensions (package:flutter/src/widgets/scroll_position_with_single_context.dart:102:11)
#23     ScrollPosition.applyContentDimensions (package:flutter/src/widgets/scroll_position.dart:647:7)
#24     RenderEditable.performLayout (package:flutter/src/rendering/editable.dart:2345:12)
#25     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#26     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#27     _RenderSizeChangedWithCallback.performLayout (package:flutter/src/widgets/size_changed_layout_notifier.dart:90:11)
#28     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#29     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#30     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#31     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#32     RenderLeaderLayer.performLayout (package:flutter/src/rendering/proxy_box.dart:4751:11)
#33     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#34     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#35     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#36     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#37     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#38     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#39     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#40     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#41     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#42     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#43     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#44     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#45     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#46     RenderTapRegion.layout (package:flutter/src/widgets/tap_region.dart:568:11)
#47     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#48     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#49     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#50     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#51     ChildLayoutHelper.layoutChild (package:flutter/src/rendering/layout_helper.dart:61:11)
#52     _RenderDecoration._layout (package:flutter/src/material/input_decorator.dart:1036:67)
#53     _RenderDecoration.performLayout (package:flutter/src/material/input_decorator.dart:1299:44)
#54     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#55     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#56     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#57     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#58     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#59     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#60     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#61     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#62     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#63     RenderTapRegion.layout (package:flutter/src/widgets/tap_region.dart:568:11)
#64     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#65     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#66     ChildLayoutHelper.layoutChild (package:flutter/src/rendering/layout_helper.dart:61:11)
#67     RenderFlex._computeSizes (package:flutter/src/rendering/flex.dart:985:73)
#68     RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:1051:32)
#69     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#70     RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:234:12)
#71     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#72     _RenderSingleChildViewport.performLayout (package:flutter/src/widgets/single_child_scroll_view.dart:483:14)
#73     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#74     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#75     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#76     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#77     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#78     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#79     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#80     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#81     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#82     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#83     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#84     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#85     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#86     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#87     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#88     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:21)
#89     _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1448:11)
#90     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#91     ChildLayoutHelper.layoutChild (package:flutter/src/rendering/layout_helper.dart:61:11)
#92     RenderStack._computeSize (package:flutter/src/rendering/stack.dart:595:43)
#93     RenderStack.performLayout (package:flutter/src/rendering/stack.dart:622:12)
#94     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#95     RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:234:12)
#96     RenderObject.layout (package:flutter/src/rendering/object.dart:2608:7)
#97     MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:173:12)
#98     _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:1092:7)
#99     MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:237:7)
#100    RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:404:14)
#101    RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:2446:7)
#102    PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:1052:18)
#103    PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:1065:15)
#104    RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:602:23)
#105    WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:1164:13)
#106    RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:468:5)
#107    SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1397:15)
#108    SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1318:9)
#109    SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1176:5)
#110    _invoke (dart:ui/hooks.dart:312:13)
#111    PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:419:5)
#112    _drawFrame (dart:ui/hooks.dart:283:31)
(elided 2 frames from class _AssertionError)

The following RenderObject was being processed when the exception was fired: RenderEditable#b2357 relayoutBoundary=up31 NEEDS-LAYOUT NEEDS-PAINT
    needs compositing
    parentData: <none> (can use size)
    constraints: BoxConstraints(w=416.0, 0.0<=h<=Infinity)
    size: Size(416.0, 24.0)
    cursorColor: Color(0xff6750a4)
    showCursor: ValueNotifier<bool>#8d4ea(true)
    maxLines: 1
    minLines: null
    selectionColor: Color(0x666750a4)
    locale: en_US
    selection: TextSelection.collapsed(offset: 197, affinity: TextAffinity.downstream, isDirectional: false)
    offset: ScrollPositionWithSingleContext#82945(offset: 1463.3, range: 0.0..1407.2, viewport: 416.0, ScrollableState, ClampingScrollPhysics -> RangeMaintainingScrollPhysics -> ClampingScrollPhysics -> RangeMaintainingScrollPhysics, BallisticScrollActivity#2c9f9(AnimationController#c1116(▶ 1463.333; for BallisticScrollActivity)), ScrollDirection.idle)
    text: TextSpan
        debugLabel: ((englishLike bodyLarge 2021).merge((blackMountainView bodyLarge).apply)).merge(unknown)
        inherit: false
        color: Color(0xff1d1b20)
        family: Roboto
        size: 16.0
        weight: 400
        letterSpacing: 0.5
        baseline: alphabetic
        height: 1.5x
        leadingDistribution: even
        decoration: Color(0xff1d1b20) TextDecoration.none
        "https://www.google.com/search?q=UnmodifiableUint8ListView+flutter&oq=UnmodifiableUint8ListView+flutter&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIGCAEQRRg8MgYIAhBFGDwyBggDEEUYPNIBCDI4MzhqMGo0qAIAsAIB&sourceid=&ie=UTF-8"
RenderObject: RenderEditable#b2357 relayoutBoundary=up31 NEEDS-LAYOUT NEEDS-PAINT
    needs compositing
    parentData: <none> (can use size)
    constraints: BoxConstraints(w=416.0, 0.0<=h<=Infinity)
    size: Size(416.0, 24.0)
    cursorColor: Color(0xff6750a4)
    showCursor: ValueNotifier<bool>#8d4ea(true)
    maxLines: 1
    minLines: null
    selectionColor: Color(0x666750a4)
    locale: en_US
    selection: TextSelection.collapsed(offset: 197, affinity: TextAffinity.downstream, isDirectional: false)
    offset: ScrollPositionWithSingleContext#82945(offset: 1463.3, range: 0.0..1407.2, viewport: 416.0, ScrollableState, ClampingScrollPhysics -> RangeMaintainingScrollPhysics -> ClampingScrollPhysics -> RangeMaintainingScrollPhysics, BallisticScrollActivity#2c9f9(AnimationController#c1116(▶ 1463.333; for BallisticScrollActivity)), ScrollDirection.idle)
    text: TextSpan
        debugLabel: ((englishLike bodyLarge 2021).merge((blackMountainView bodyLarge).apply)).merge(unknown)
        inherit: false
        color: Color(0xff1d1b20)
        family: Roboto
        size: 16.0
        weight: 400
        letterSpacing: 0.5
        baseline: alphabetic
        height: 1.5x
        leadingDistribution: even
        decoration: Color(0xff1d1b20) TextDecoration.none
        "https://www.google.com/search?q=UnmodifiableUint8ListView+flutter&oq=UnmodifiableUint8ListView+flutter&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIGCAEQRRg8MgYIAhBFGDwyBggDEEUYPNIBCDI4MzhqMGo0qAIAsAIB&sourceid=&ie=UTF-8"
════════════════════════════════════════════════════════════════════════════════

Flutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.24.0, on Microsoft Windows [Version 10.0.22631.3880], locale ja-JP)
    • Dart version 3.5.0
    • DevTools version 2.37.2
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.4.0)
[√] Android Studio (version 2023.2)
[√] VS Code (version 1.92.0)
[√] Connected device (4 available)
[√] Network resources

• No issues found!

Hi @horikana, I can't seem to reproduce this on my Pixel 7. Are you able to reproduce this on a physical device? See the recording below
https://github.com/user-attachments/assets/652d3e88-b69d-4388-a4b1-203d524e0ab6

@danagbemava-nc
This phenomenon only occurs when the text is not at the far right end. After pasting the text, please select a range without scrolling the text horizontally and then try deleting it with the backspace key.
This test method should also reproduce the issue on a Pixel 7.

For example, if you paste the following URL https://github.com/flutter/samples/tree/main/material_3_demo and without scrolling horizontally, select "material_3_demo" and press the backspace key, the issue occurs.
test_sample.webm

Thanks for the update @horikana but I also tried on Pixel XL api 33 emulator by following all the steps to replicate, but couldn't see the reported exception. Could be that the keyboard you are using is custom or default ?

@darshankawar Thank you for testing.
Upon further testing, I found that when the "Languages & Input" setting for "Languages" is set to Japanese, the issue also occurs on the Pixel XL API 33 emulator with the same steps. However, if the language is set to English, the issue does not occur.

I tried it briefly, but it seems to occur with options 2 and 3 in the screenshot.

Further testing revealed that the issue occurs not only with Gboard but also with a popular Japanese IME called ATOK. With Gboard, the issue always occurs when the keyboard is set to "Japanese". With ATOK, the issue occurs regardless of whether the keyboard is set to Japanese or English. This might be an issue with the IME compatibility, but since both IMEs worked fine in Flutter 3.19.6, I believe this is a problem with version 3.2x.

Reproducible using the code sample and steps provided above in https://github.com/flutter/flutter/issues/153003#issue-2452902711
Steps to reproduce (concise)

Run the application
Click on push: CupertinoPageRoute -- NG
Change the keyboard to a CJK language keyboard
Paste some long text in the keyboard (like long link text)
Attempt to delete some text from the end of the textfield

I tested on stable 3.19.5, 3.22.3 and 3.24.0 along with master 3.24.0-1.0.pre.525 and the only version that didn't have this issue was 3.19.5. This also did not appear to reproduce on iOS or macOS. This appears to be specific to android.
I tested this on my Pixel 7, Mac & iPhone XS.
As noted above, this only happens when you push the route using the CupertinoPageRoute.
Labeling for further investigation.

flutter doctor -v
[!] Flutter (Channel stable, 3.24.0, on macOS 14.5 23F79 darwin-arm64, locale en-GB)
    • Flutter version 3.24.0 on channel stable at /Users/nexus/dev/sdks/flutter
    ! Warning: `flutter` on your path resolves to /Users/nexus/dev/sdks/flutter_rc/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutter. Consider adding /Users/nexus/dev/sdks/flutter/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/nexus/dev/sdks/flutter_rc/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutter. Consider adding /Users/nexus/dev/sdks/flutter/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 80c2e84975 (10 days ago), 2024-07-30 23:06:49 +0700
    • Engine revision b8800d88be
    • Dart version 3.5.0
    • DevTools version 2.37.2
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[!] Flutter (Channel master, 3.24.0-1.0.pre.525, on macOS 14.5 23F79 darwin-arm64, locale en-GB)
    • Flutter version 3.24.0-1.0.pre.525 on channel master at /Users/nexus/dev/sdks/flutters
    ! Warning: `flutter` on your path resolves to /Users/nexus/dev/sdks/flutter_rc/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/nexus/dev/sdks/flutter_rc/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 76107bdf50 (7 hours ago), 2024-08-08 16:50:40 -0700
    • Engine revision<PHONE_NUMBER>
    • Dart version 3.6.0 (build 3.6.0-130.0.dev)
    • DevTools version 2.38.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

same issue. Is there a solution?

This started with https://github.com/flutter/flutter/commit/0903bf7055d3e75921159a999ff1816154078968
@Renzo-Olivares

From the call path @Renzo-Olivares . I think there's a similar problem that would need the same kind of fix of https://github.com/flutter/flutter/issues/127803
I tried to solve that problem by checking whether the focus node is focusable but that did not work: https://github.com/flutter/flutter/pull/144280#issuecomment-1992559743
@goderbauer @chunhtai is there an inherited widget that can be used as a good indication that something is in an inactive route and shouldn't be receiving notifications, like TickerMode?

Will take a look, thanks for bisecting!

This problem doesn't seem to be fixed。
・user CupertinoPageRoute 【Android phone】
・Select the text from the back and delete it. But do not select the last text

flutter --version
C:\Users\Administrator>flutter --version
Flutter 3.24.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 5874a72aa4 (6 days ago) • 2024-08-20 16:46:00 -0500
Engine • revision c9b9d5780d
Tools • Dart 3.5.1 • DevTools 2.37.2

sample code
import 'package:flutter/material.dart';
import 'package:zero/widget/my_state.dart';

class TestPage extends StatefulWidget {
  const TestPage({super.key});

  @override
  State<TestPage> createState() => _TestPageState();
}

class _TestPageState extends MyState<TestPage> {
  TextEditingController _controller = TextEditingController(text: "测试文字" * 30);

  @override
  void dispose() {
    _controller.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(
        child: Center(
          child: TextField(controller: _controller, maxLines: 1),
        ),
      ),
    );
  }
}

error message
W/HiTouch_PressGestureDetector(18127): Touch pointer move a lot. The moving distance of X is:65.0, limit is:60The moving distance of Y is:6.0, limit is:60
I/InputMethodManager(18127): showSoftInput
I/InputMethodManager(18127): mServedView =com.suiz.zero;view =com.suiz.zero;flags =0
I/HwSecImmHelper(18127): mSecurityInputMethodService is null
I/InputMethodManager(18127): showSoftInput
I/InputMethodManager(18127): mServedView =com.suiz.zero;view =com.suiz.zero;flags =0
I/HwSecImmHelper(18127): mSecurityInputMethodService is null

======== Exception caught by rendering library =====================================================
The following assertion was thrown during performLayout():
RenderBox.size accessed beyond the scope of resize, layout, or permitted parent access. RenderBox can always access its own size, otherwise, the only object that is allowed to read RenderBox.size is its parent, if they have said they will. It you hit this assert trying to access a child's size, pass "parentUsesSize: true" to that child's layout() in RenderFractionalTranslation.performLayout.
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2178 pos 16: 'sizeAccessAllowed'

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.


[question] contribution to more GCP services (container registry, etc)

Hello there !
First of, thanks a lot for this library, the API is very pleasant to use :)
I would want to use this library but I would miss couple Google components: container registry, kubernetes and eventually some managed DB services).
Are you open to receive contributions integrating such components?
Cheers !

Yes, we would like to add other components as needed and would appreciate your contribution.

Thanks a lot :)


gtk4/{Text,Tree}Iter: derive Debug

So that a struct using these types can also auto derive Debug.
Another solution could be to add a Debug impl in manual code,
but since these are iterators, there's not much we can show.
Other boxed_inline candidates in gtk4-rs use manual Debug impl AFAICT.

Lgtm, thanks !


new event needed codeunit 6620

Hi
please add more events on function

here is the postion

on the same way, for sales we already have

i need new event with the same position on purchase too.

We have different structure of events for Purchase compared to Sales, due to Split. We already have 2 events here:
    END;
    OnAfterCopyPurchLineFromPurchCrMemoLineBuffer(
      ToPurchLine,FromPurchCrMemoLine,IncludeHeader,RecalculateLines,TempDocPurchaseLine,ToPurchHeader,FromPurchLineBuf);
  END;
  OnAfterCopyPurchCrMemoLine(FromPurchCrMemoLine,ToPurchLine);
UNTIL NEXT = 0;

END;
END;


Dive Into Hyrax for new developers hands-on

Mark Bussey& Tom Johnson

According to spreadsheet confirmed: 6/29/2018

Registered 8/16 -system info


could you provide a new prop blur？

I think blur prop can be used to set the blur level of the shadow

+1

I have no idea how I would implement this using the current SVG solution; I don't believe this is possible. I will close it, but I can reopen it if a good idea is given.

I have no idea how I would implement this using the current SVG solution; I don't believe this is possible. I will close it, but I can reopen it if a good idea is given.

Maybe we can use canvas solution https://www.npmjs.com/package/react-native-canvas


Namespace not specified in build.gradle causing build failure after AGP upgrade to 8.1.0

After upgrading the Android Gradle Plugin (AGP) to version 8.1.0 and Gradle to version 8.0.2, the build fails with an error indicating that a namespace is not specified in the module’s build.gradle file. This issue seems to be a result of recent changes in AGP requiring explicit namespace definitions.
Steps to Reproduce:
Upgrade AGP to version 8.1.0 and Gradle to version 8.0.2 in the build.gradle files.
Attempt to build the project.
Observe the build error related to the namespace.
The issue appeared after updating from AGP version 7.4.2 to 8.1.0 and Gradle from 7.6.3 to 8.0.2. It would be beneficial if the webengage_flutter package could include the required namespace in its build.gradle file to ensure compatibility with these newer versions of the Android Gradle Plugin.
Fluter version: 3.22.3

@AzharKV have you found a work around for this?

@srinivasa-b
For now please add the following lines to the android/build.gradle file before the subprojects section of project.evaluationDependsOn(':app'):
subprojects {
    afterEvaluate { project ->
        if (project.hasProperty('android')) {
            project.android {
                if (namespace == null) {
                    namespace = project.group
                }
            }
        }
    }
}

@AzharKV Awesome it worked!
Thanks!


Documentation should describe second argument of mocked()

💬 Questions and Help
Documentation page https://kulshekhar.github.io/ts-jest/docs/test-helpers/ describing mocked() should describe what the second argument does (true -> deep mock?) and what the default value is (false?).

Hi, indeed the default value is false according to type definition. The doc doesn’t mention that one.

Hi, indeed the default value is false according to type definition. The doc doesn’t mention that one.

Close via #2271

Close via #2271


Merge autorest 0.39.1 hotfix back into main

You can try these changes at https://cadlplayground.z22.web.core.windows.net/typespec-azure/prs/240/
Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/typespec-azure/prs/240/


Explore rebasing Hydra inference against Algorithm W

Hydra's type inference implementation started with the minimal Algorithm W implementation in Stephen Diehl's "Write You a Haskell", then diverged heavily in order to accommodate the idiosyncrasies of Hydra, including the need for let polymorphism and mutual recursion, as well as syntax features like records and variants. Hydra's inference rules follow the LambdaGraph specification, which is just an extension of the usual Hindley-Milner inference rules for nominal types (again, records, variants, newtypes). The implementation is sufficient for generating all of Hydra's kernel into Haskell and Java, but the implementation is nonstandard, and is need of formal verification.
As an exercise, @wisnesky has written a small Algorithm W implementation from scratch. Let's see if this can evolve into a proof-of-concept which meets Hydra's requirements, then we can compare it with the existing inference implementation. The main missing pieces are likely to be the features mentioned above: support for nominal types (probably not hard) and mutual recursion (the main thing to be demonstrated, IMO). I would also add support for list terms and one or two types of literal terms, as well.

See https://github.com/CategoricalData/hydra/tree/feature_118_algorithmw.


Added choropleth example to AnyChart documentation

I noticed there was a scattergeo chart instead of a choropleth map under the examples. Since I was working on a choropleth map, I figured I could add my example to the documentation.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Maismaus seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

@Luyao-Zhang-1 please investigate whether this is an example replacement or a supplement to the current example.

@Adam-Dupaski Will do.

@Adam-Dupaski I checked it against https://plot.ly/javascript/, which is an external resource for chart types given in [Any Chart Cheat] Sheet(https://docs.mendix.com/refguide/charts-any-cheat-sheet.
The new image is a good example for Choropleth Map. The old image is a scattergeo chart, so it is good to replace it.

@Luyao-Zhang-1 thanks for investigating. But I'm curious why the scattergeo chart should be replaced?

Hi @Adam-Dupaski , it is a header for choropleth map but it shows a scattergeo chart, which is confusing. There are already examples of scattergeo charts given above and below the choropleth map

Thanks @Maismaus.
Please continue @Luyao-Zhang-1.

@Maismaus Thank you for your contribution. Is it also good to include colorscale in the code? Or it is not necessary?

Hi @Luyao-Zhang-1, I kept the example simple because the other examples on this page are also really basic. You could add additional lines of configuration, it might be useful. For reference, this is the configuration as I am using it at the moment. You can take anything you want and add it to the code if you want.
[ {
"type": "choropleth",
"locationmode": "country names",
"locations": ["Germany", "Austria"],
"z": [100, 300],
"name": "Energy consumption data",
"colorscale": [[0,"#009999"], [1, "#000028"]],
"colorbar": {
"outlinewidth": 0,
"thickness": 10,
"x": 1
},
"hovertext": "Average energy consumption",
"hoverlabel": {
"bgcolor": "#000028"
}
} ]

@Maismaus Thanks. let's keep it simple and basic to be consistent. I will merge this PR.


Openstack -- unable to find image

Hello,
When trying to create a new cluster through the interface on my local Cloudbreak running on docker, i am given this error: Failed to create cluster: OpenStack image: CentOS-6.5 not found.
This is after going into docker-compose.yml and modifying the file to point to that particular image
Here is the output from 'glance image-list' with the same credentials sourced as Cloudbreak, you can see this particular image is already in Openstack.
+--------------------------------------+------------------------------------------------------+
| ID                                   | Name                                                 |
+--------------------------------------+------------------------------------------------------+
| 7b39c9f8-7f17-4105-bcdb-476a5e358015 | CentOS-6.5                                           |
| e5bfb195-c934-45ae-af3c-34f649ac9e8f | CentOS-6.5-fast                                      |
| eaa5df15-9c88-4e73-b245-3dfe3258473a | centos6.6-lvm-1.3.4                                  |
| 6e757009-7745-4907-9b09-80f7ed06c1d2 | centos6.6-lvm1.0.6-pl                                |

Is my Cloudbreak server looking for the image on some different repository?  Where should I get my Images from?

Hi @krenz444 ,
Coudbreak requires a specific image that contains the necessary tools/scripts.
If you send the version of your cbd tool, then I can send you a download link to S3 that contains the appropriate image of Cloudbreak.
To check your cbd version run:
cbd version
Br,
Tamas

Hello,
Thank you,
My cbd version is 1.0.3, I was able to track down the correct image, cb-centos71-amb210-2015-07-22
When the cluster starts, im getting a heat orchestration exception, here is an excerpt from docker logs cbreak_cloudbreak_1
com.sequenceiq.cloudbreak.core.CloudbreakException: ClientResponseException{message=The template version is invalid: Unknown version (heat_template_version: 2014-10-16). Should be one of: 2012-12-12, 2013-05-23, 2010-09-09, status=400, status-code=BAD_REQUEST}

Does this mean we have the wrong version of Openstack?
Thanks,
Eric

Hi Eric,
Cloudbreak supports the Juno version of OpenStack at the moment.
Kind regards,
Attila

We have upgraded to Juno and this issue has been fixed.  Thank you


Fix friendship status

Closes #107.
I didn't have a chance to actually try it, but it should work.
Let me know @TheM4hd1 😊

I'm receiving error custom("No response.")

My bad. I didn't change the body parameter to make it work @anonrig
Let me know if it does now cause I can't test it.

I'm receiving the same error again but it might be the pod cache, do you know how to invalidate it?

I feel like switching back to master and then to sb/bugixes again might fix every cash related issue when trying pod update @anonrig


Can't upgrade from 1.11.1 to 1.11.3

I just tried to upgrade from 1.11.1 to 1.11.3 and failed miserably.
When 1.11.3 booted, I had an error message about smartmontools service failing to load.  Then I got the message Raspiblitz v. ... booting with an ellipsis instead of the expected release number.  Finally, the message that asks to wait stayed for hours.
After connecting via ssh, top informed me that the device was trying to install smartmontools apparently without success.  Besides, the external disk was not mounted.
Fortunately, I could revert to 1.1.11 from the sd card that I kept.
I must have done something wrong but I can't figure out what.

For information, here follows what tail -f /var/log/apt/history.log reports about smartmontools failing to install/update:
Start-Date: 2024-12-16  08:51:09
Commandline: apt-get install -y smartmontools
Install: libgpg-error-l10n:arm64 (1.46-1, automatic), libunistring2:arm64 (1.0-2, automatic), libidn2-0:arm64 (2.3.3-1+b1, automatic), libselinux1:arm64 (3.4-1+b6, automatic), liblzma5:arm64 (5.4.1-0.2, automatic), lsb-base:arm64 (11.6, automatic), libsystemd0:arm64 (252.30-1~deb12u2, automatic), debianutils:arm64 (5.7-0.5~deb12u1, automatic), libzstd1:arm64 (1.5.4+dfsg2-5, automatic), libgpg-error0:arm64 (1.46-1, automatic), libcap2:arm64 (1:2.66-4, automatic), libc6:arm64 (2.36-9+rpt2+deb12u8, automatic), libgcrypt20:arm64 (1.10.1-3, automatic), libcap-ng0:arm64 (0.8.3-1+b3, automatic), libpcre2-8-0:arm64 (10.42-1, automatic), smartmontools:arm64 (7.3-1+b1), sysvinit-utils:arm64 (3.06-4, automatic), liblz4-1:arm64 (1.9.4-1, automatic), gcc-12-base:arm64 (12.2.0-14, automatic), libstdc++6:arm64 (12.2.0-14, automatic), libgcc-s1:arm64 (12.2.0-14, automatic)
Error: Sub-process /usr/bin/dpkg returned an error code (2)
End-Date: 2024-12-16  08:51:09

I finally managed to complete the update after disabling tor, which meant I had to reset LND. Next time I'll remember to turn it off beforehand.  Are there other people in a similar situation?
Anyway, I am closing this issue.


Support Python 3.12

Psydac can now support Python 3.12 by using NumPy >= 2.0 together with Petsc4py >= 3.21 and the master branch of Igakit (updated on 6 Aug 2024). We also increase the required SymPDE version to 0.19.0. For simplicity, the same requirements are made for older versions of Python.
This closes #406.
Rationale
Python 3.12 does not have a distutils module. Therefore, NumPy 2.0 was released on 16 Jun 2024 with a new meson backend for the f2py tool which is part of the library. As of 6 Aug 2024, Igakit also moved from distutils to the meson-python build system in combination with NumPy 2.0.
The first version of petsc4py which is compatible with Python 3.12 is shipped with PETSc 3.21, hence we use this now instead of PETSc 3.20. Such a version of petsc4py also requires NumPy >= 2.0.
The move to NumPy 2.0 also means that some numeric datatypes behave differently. For this we need SymPDE >= 0.19.0.

Summary of what I understood in this PR:

Python3.12 support enabled in  continuous-integration.yml and new sympde 0.19.0 reflected in pyproject.toml
Diffs in tests are due to bugfixes by @campospinto and @yguclu
Running maxwell_2d_multi_patch.py gives a passing result:

$ python3.12 examples/maxwell_2d_multi_patch.py
> Grid          :: [4,4]
> Degree        :: [2,2]
> CG info       ::  {'niter': 829, 'success': np.True_, 'res_norm': 9.976906608695098e-09}
> L2 error      :: 1.59e+00

> Solution time :: 2.72e+01
> Evaluat. time :: 3.61e-02


[Bug]: OpenBullet dont load

Version of the software
0.1.0
Operating system
Windows 10
Browser / Native
Chrome
What happened?
I downloaded the program, i extract it but when i open it dont load
Relevant LoliCode if needed
No response

Error:
An assembly specified in the application dependencies manifest (OpenBullet2.deps.json) was not found:
package: 'DeviceId', version: '5.2.0'
path: 'lib/netstandard2.0/DeviceId.dll'

Please be more specific. Why are you downloading version 0.1.0? Where did you download it from? Did you extract the archive? Guide us through all the steps you took.


Create a QwestDetails component

code changes completed, merged to master: https://github.com/Qwestr/Qwestr-React/pull/25


pull request for e2e test at 11/14/2016 10:56:10

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

optest/docs/updated_at.md
:white_check_mark:Succeeded

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


SlacSimulator ported from javascript to C++

Describe your changes
Port of SlacSimulator from javascript to C
Issue ticket number and link
Checklist before requesting a review

[x] I have performed a self-review of my code
[x] I have made corresponding changes to the documentation
[x] I read the contribution documentation and made sure that my changes meet its requirements

Closed because of #859


Setup PullApprove Configuration

Extend the pullapprove configuration from Medology/Scripts.

Testing file changes were not found.
Paging @BKorenek to review the back-end work in this pull request!
Paging @johnnie502 to review the testing work in this pull request!
I couldn't recognize who these files were relevant to:
.pullapprove


Anonymous users should see submit a proposal only

Problem and impact
Anonymous users currently see "edit or view proposals" an "view or edit speaker profile".
Expected for not-logged in anonymous users only the option "go to CfP" or "Submit a Proposal" should show up.
Current

Expected

Hey @Darkboy17 I am interested in solving this problem, could you assign me ?


Support for PROXY protocol source IP?

The Envoy documentation states (https://www.envoyproxy.io/docs/envoy/latest/configuration/listeners/listener_filters/proxy_protocol) that "In this mode, the downstream connection is assumed to come from a proxy which places the original coordinates (IP, PORT) into a connection-string. Envoy then extracts these and uses them as the remote address."
However, PROXY protocol headers (https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt) are in the following format:
PROXY TCP4 <IP_ADDRESS> <IP_ADDRESS> 56324 443\r\n
It's clear that Envoy extracts the destination IP:PORT and uses that information to proxy the connection, but what about the source IP:PORT?
I have a use case where the software I'm using will inject the desired source IP into the PROXY protocol header. Then I would like Envoy to use that source IP (which will be local to the Envoy server) to make the connection to the remote IP.
Does Envoy support that functionality currently?

I looked through the IP transparency docs and it didn't seem to match my use case. The upstream_bind_config does work from my testing, however.
Can I reference the PROXY protocol source IP in my Envoy configuration file? If so, how do I reference that variable?

Were you able to solve the issue? if so, can you please share the details? I'm trying to set the same, but the documentation about proxy protocol is really bad


Builtins

We have several kinds of builtins:

Static builtin names like addInteger, takeByteString, BlockNum, etc. Right now each of them has its Haskell interpretation except intToByteString, VerifySignature, TxHash and BlockNum. This document provides some information on how we compute static builtins application in a well-typed way. In the implementation static builtin names are not saturated, while in the specification they are saturated, so this is something that needs to be fixed.

Dynamic builtin names like charToString and trace. Those are functions that we can extend the language with, but that are not provided by default. Dynamic builtin names are handled analogously to static builtin names, it's just that for a static builtin name we know its TypeScheme (see the doc reference above) and interpretation statically, but for a dynamic builtin name we require the user (where "the user" = "someone who invokes the type checking procedure or one of the abstract machines") to provide them. This means that we only do some look-ups in maps storing types or interpretations of dynamic builtin names during type checking and evaluation, i.e. dynamic builtin names are not harder than static builtin names, just a little bit of boilerplate.

Dynamic builtin types. There are two possible forms of them: a complicated one and a very complicated one. Right now the former is implemented, but we really want the latter. The complicated form is described in Language.PlutusCore.Constant.Typed in Note [Semantics of dynamic built-in types]. The most important part is

We only allow dynamic built-in types that can be represented using static types in PLC. For example Haskell's 'Char' can be represented as integer 4 in PLC. This restriction makes the dynamic built-in types machinery somewhat similar to type aliases in Haskell (defined via the type keyword).

You might think this is a minor thing, however together with dynamic builtin names this gives us some great potential and a lot of complexity. For example, we already can convert Plutus Core values to Haskell values using some terrible hacks:

we evaluate terms using some evaluator (normally, the CEK machine). For the temporary lack of ability to put values of arbitrary Haskell types into the Plutus Core AST, we convert PLC values to Haskell values and "emit" the latter via a combination of unsafePerformIO and IORef. For example, we fold a PLC list with a dynamic built-in name (called emit) that calls unsafePerformIO over a Haskell function that appends an element to the list stored in an IORef:

    plcListToHaskellList list =
        evaluateCek anEnvironment (foldList {dyn} {unit} (\(r : unit) -> emit) unitval list)

After evaluation finishes, we read a Haskell list from the IORef (which requires another unsafePerformIO) and return it.

This all is elaborated in Language.PlutusCore.Constant.Typed.
However, we of course want to remove this unsafePerformIO nonsense which means we need to be able to somehow put values of arbitrary Haskell types into the Plutus Core AST. Having this ability we can simply fold over a PLC data type inside PLC (using the CEK machine or any other evaluators that knows how to handle dynamic builtin names), but collect a Haskell value in an accumulator. And then the result of evaluation of a fold over a PLC data type is a very shallow wrapper around a Haskell value which we can then easily extract. And it should be possible to construct such fold in generic way, i.e. derive them from the Generic instance of a Haskell data type.
Of course, embedding the entire Haskell into Plutus Core is not a trivial thing. I have some ideas, but I do not really know whether they make sense or not.
Meanwhile, @j-mueller, right now we can convert PLC lists to Haskell lists (and hence lists of lists, lists of lists of lists, etc). I think, I can add support for sum and product types (without unsafePerformIO nonsense). This does not allow to convert an arbitrary PLC to value to a Haskell value, but maybe it's enough to unblock you at least?
Oh, and please someone suggest better names for these things.

Added support for throwing a PLC error from a builtin name in #642 (not merged yet).
We need to do a few things (better before experimenting with parameterizing Term by additional type variables):

Allow parametric polymorphism in TypeScheme
Rename KnownDynamicBuiltinType to KnownType and reflect all the types via this type class, including "static" ones. I've recently (in #642) removed TypedBuiltinBool as a special case and realized that we can remove all special cases, even integers and bytestrings, like that. The challenge however is in handling sizes, which I don't know how to approach at the moment.
A funny thought: we do not really need to change the AST in order to be able to embed arbitrary Haskell into Plutus Core. We can just carry an environment of Haskell values together with a Plutus Core term which references values in the environment by their indices (say, in the Var constructor, but it's better to have a separate MetaVar constructor for this). At the very least this should allow us to play with the ideas without needing to fix 10000 errors that adding additional parameters to Term would cause.

We can just carry an environment of Haskell values together with a Plutus Core term which references values in the environment by their indices (say, in the Var constructor, but it's better to have a separate MetaVar constructor for this)

Interesting! My only question is how we would type a PLC term with these in it? I guess providing a type-environment at typechecking type and a term-environment at runtime is actually very similar to what we do for the current dynamic builtins.

Interesting! My only question is how we would type a PLC term with these in it? I guess providing a type-environment at typechecking type and a term-environment at runtime is actually very similar to what we do for the current dynamic builtins.

Yes. Except right now we look up only dynamic builtin names and there is a finite amount of them, while with the new approach we can extend environments indefinitely. "Got a Haskell value that you can't embed into PLC? Put it into the current environment and reference it by its index". But this sounds like it may require a GC with reference counting or something.

Plus everything is done with unconstrained indices, which is unpleasant.

Yes. But it's very good for experimenting at least and maybe as a temporary intermediate solution.

This comment's an offshoot from the now-closed "Do we have keywords?" issue: https://github.com/input-output-hk/plutus/issues/463
The PLC parser currently has special treatment for builtin names, so they really are built in.  This'll have to change once we have extensible builtins: we'll have to look up names in a table or something to make sure they really exist.  Fortunately you now have to say builtin every time you mention a built in name, so there's no ambiguity about what's what.
We'll also have to change the spec, but let's cross that bridge when we come to it.

This'll have to change once we have extensible builtins: we'll have to look up names in a table or something to make sure they really exist.

We already have extensible builtins in this sense. Here is an excerpt from the classic pretty-printer:
instance PrettyBy (PrettyConfigClassic configName) (Builtin a) where
    prettyBy _ (BuiltinName    _ n) = pretty n
    prettyBy _ (DynBuiltinName _ n) = pretty n
...
instance (PrettyClassicBy configName (tyname a), PrettyClassicBy configName (name a)) =>
        PrettyBy (PrettyConfigClassic configName) (Term tyname name a) where
    prettyBy config = cata a where
        a (BuiltinF _ bi)      = parens' ("builtin" </> prettyBy config bi)

I don't think we've ever tested how this interacts with the parser. For example in Language.PlutusCore.Generators.AST we have
genBuiltin :: MonadGen m => m (Builtin ())
genBuiltin = BuiltinName () <$> genBuiltinName

i.e. we basically never generate a DynBuiltinName.

we'll have to look up names in a table

I'd start with "if it's marked as a builtin, but it's not a static builtiln, then it's an extensible one". Passing tables around is a good solution, but we're going to change the related interface to builtins, so I'd do the simplest thing and leave the better approach for future.
If you wish, you can add some tests related to extensible builtins and add support for extensible builtlins to the parser.

Right, we haven't added anything about extensible builtins to the parser or spec, they're basically only available if you're constructing an AST directly.

We need to do a few things (better before experimenting with parameterizing Term by additional type variables):
1. Allow parametric polymorphism in TypeScheme

Done in #751.

2. Rename KnownDynamicBuiltinType to KnownType and reflect all the types via this type class, including "static" ones. I've recently (in #642) removed TypedBuiltinBool as a special case and realized that we can remove all special cases, even integers and bytestrings, like that. This is needed, because right now we can throw an error from a builtin name that normally returns an Bool, but not from one that returns an Integer, which is a silly limitation. The challenge however is in handling sizes, which I don't know how to approach at the moment.

Doing that in #983. Now that we don't have sizes, everything is straightforward.

I was bored, so I started thinking about this again. The MVP that I was going to implement was solving two problems at once: the extensible builtins problem and the unlifting one. But

we can first add extensible builtins and only then deal with unlifting. The former is much simpler than the latter, but requires updating almost the entire codebase, so it makes a lot of sense to make a separate PR out of it
we may not want to incorporate full-fledged unlifting into the constant application machinery (which is what I was planning to do). There is a sweet spot between "no unlifting during evaluation at all" (which would prevent as from having builtins that receive boolean arguments, although what is wrong with not using Church-encoded Bool and just adding Bool to the default universe?) and "any unlifting during evaluation" (which requires adding new types to the universe during evaluation, which is what causes all the problems) and that sweet spot is "only allow unlifting that doesn't require adding new types to the universe" (i.e. this is what we have now for the hardcoded universe). This way we still can lift and unlift things like () and Bool (even though it's a bit hacky), all the internal machinery (KnownType instances for EvaluationResult, OpaqueTerm, etc) works the same way it works currently (which is good).

However it's not clear whether we can untangle evaluation from unlifting. I tried that previously and failed, but there might be alternative approaches. In any case, first adding extensible builtins without breaking anything and only then considering various approaches to the harder problem of unlifting seems like a good plan. It's conservative and a huge step forward at the same time.

that sweet spot is "only allow unlifting that doesn't require adding new types to the universe"

After several hours of thinking it struck me that we can extend universes in a different way. Instead of using
data Extend b uni a where
    Extension :: Extend b uni b
    Original  :: uni a -> Extend b uni a

we can make universes higher-order: uni :: (* -> *) -> * -> *, where the first argument of uni is an extension of it (i.e. each uni has a constructor with the following type: ext a -> uni ext a) and the last one remains the same. This way we can define all built-in names in the forall ext. uni ext universe and that will allow us later to extend this universe by instantiating ext to some particular subuniverse without disturbing any built-in names that are already in scope, because their types say explicitly that any ext is fine.
This means that we will be able to add new types to the universe during unlifting, but we won't be able to add new built-in names that reference those types. So we still have a restriction, but it's relaxed now and unlifting of things like () and Bool becomes much nicer.
Having that ext parameter is also good, because we can try to make it unordered (the unordered-effects blog post that I wrote is a direct consequence of this research on dynamic builtins), since we always extend universes with a single type at a time (no type constructors, etc). While generally universes encode infinite number of types (e.g. Integer, [Integer], [[Integer]]...), so trying to make those unordered is completely hopeless.
Anyway, we should start with first-order universes to get extensible builtins. Making universes higher-order later shouldn't pose any problems.
By the way, we currently do support dynamic extension of the set of built-in names during unlifting, but we don't actually need it. We needed it earlier and we will need it in future, but right now this is a feature that is not used anywhere, I think.