Support [profile.*] for setting things across all profiles

Looking at the ongoing effort to reduce build times across the ecosystem, I've stumbled upon this commit, which makes syn and other build-time dependencies be compiled with no debug info nor optimisations. This is neat, but it only happens for the dev profile, whereas AFAICT we don't want to compile syn with optimisations even in release mode in this instance. Unfortunately, the Cargo manifest has no way to specify things for multiple profiles at all.
Would it make sense to support something like [profile.*.blablabla] to set something across all profiles at once?

There are multiple changes underway that may address this in a way.
Named profiles introduce an inheritance mechanism where profiles can inherit the values from other profiles.
Build profiles will allow you to set a common profile for build scripts and proc macros.
Would those be sufficient to express what you want?

The build profiles thing seems like it totally supersedes what I want, thanks for the pointer!


Fixed pointer variable going global

Using node-cron in a project and was writing some tests using mocha which picked up the leak.

Oof. Nice spot. Thanks!


Workflow: Multiselect - Report in a Notification how many definitions were changed

From the comment in #508

This has been implemented in https://github.com/clearlydefined/website/pull/508/commits/1b7224237c00cc07c67085b13b3014e7e5f4ee6e
We can close this one.


PhoneNumberRule not public

Hi,
PhoneNumberRule Rule class is not public so is not possible to use it when installing the lib via Cocoapods, and I think the pod version needs to be updated as well.
Best regards!

Thanks for finding this. I have made this change in the next build


User forbidden error

Describe the bug
Getting forbidden user while applying azure-wi-webhook.yaml. All the resources are getting created without any issue, but controller manager pods are failing to start.
Steps To Reproduce

wget azure-wi-webhook.yaml
Update AZURE_TENANT_ID and AZURE_ENVIRONMENT in azure-wi-webhook-config configmap section
Deploy yaml (kubectl create -f azure-wi-webhook.yaml)

Expected behavior
Controller manager pods should be up and running
Actual behavior
Readiness failing for Controller manager pods
Logs
/cert-controller@v0.5.0/pkg/rotator/rotator.go:777$rotator.(*CertRotator).ensureReady","message":"CA certs are injected to webhooks"}
{"level":"info","timestamp":"2023-04-04T05:48:09.493158Z","logger":"entrypoint","caller":"/workspace/main.go:162$main.setupWebhook","message":"registering webhook to the webhook server"}
{"level":"info","timestamp":"2023-04-04T05:48:09.493272Z","logger":"controller-runtime.webhook.webhooks","caller":"/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.1/pkg/webhook/server.go:216$webhook.(*Server).Start","message":"Starting webhook server"}
{"level":"info","timestamp":"2023-04-04T05:48:09.493332Z","logger":"controller-runtime.webhook","caller":"/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.1/pkg/webhook/server.go:148$webhook.(*Server).Register","message":"Registering webhook","path":"/mutate-v1-pod"}
{"level":"info","timestamp":"2023-04-04T05:48:09.493552Z","logger":"controller-runtime.certwatcher","caller":"/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.1/pkg/certwatcher/certwatcher.go:131$certwatcher.(*CertWatcher).ReadCertificate","message":"Updated current TLS certificate"}
{"level":"info","timestamp":"2023-04-04T05:48:09.493663Z","logger":"controller-runtime.webhook","caller":"/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.1/pkg/webhook/server.go:270$webhook.(*Server).Start","message":"Serving webhook server","host":"","port":9443}
{"level":"info","timestamp":"2023-04-04T05:48:09.493758Z","logger":"controller-runtime.certwatcher","caller":"/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.1/pkg/certwatcher/certwatcher.go:85$certwatcher.(*CertWatcher).Start","message":"Starting certificate watcher"}
{"level":"info","timestamp":"2023-04-04T05:48:35.286993Z","logger":"cert-rotation","caller":"/go/pkg/mod/github.com/open-policy-agent/cert-controller@v0.5.0/pkg/rotator/rotator.go:722$rotator.(*ReconcileWH).ensureCerts","message":"Ensuring CA cert","name":"azure-wi-webhook-mutating-webhook-configuration","gvk":"admissionregistration.k8s.io/v1, Kind=MutatingWebhookConfiguration","name":"azure-wi-webhook-mutating-webhook-configuration","gvk":"admissionregistration.k8s.io/v1, Kind=MutatingWebhookConfiguration"}
{"level":"error","timestamp":"2023-04-04T05:48:35.293159Z","logger":"cert-rotation","caller":"/go/pkg/mod/github.com/open-policy-agent/cert-controller@v0.5.0/pkg/rotator/rotator.go:729$rotator.(*ReconcileWH).ensureCerts","message":"Error updating webhook with certificate","name":"azure-wi-webhook-mutating-webhook-configuration","gvk":"admissionregistration.k8s.io/v1, Kind=MutatingWebhookConfiguration","error":"mutatingwebhookconfigurations.admissionregistration.k8s.io \"azure-wi-webhook-mutating-webhook-configuration\" is forbidden: User \"system:serviceaccount:azure-workload-identity-system:azure-wi-webhook-admin\" cannot update resource \"mutatingwebhookconfigurations\" in API group \"admissionregistration.k8s.io\" at the cluster scope"}

Environment

Kubernetes version: v1.25.4
Cloud provider or hardware configuration: Azure

Additional context

The error message indicates you don't have the required ClusterRole configured (xref: https://github.com/Azure/azure-workload-identity/blob/59b83f2af43039f5eab3b6027c303020a7078f61/deploy/azure-wi-webhook.yaml#L44-L68). If you applied the yaml it should work. I validated it on my cluster and this is also validated as part of the CI.

I can see clusterrole is deployed properly. but still the same error. I used the same yaml you mentioned in your comments above.
`apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"rbac.authorization.k8s.io/v1","kind":"ClusterRole","metadata":{"annotations":{},"labels":{"addonmanager.kubernetes.io/mode":"Reconcile","azure-workload-identity.io/system":"true","kubernetes.azure.com/managedby":"aks"},"name":"azure-wi-webhook-manager-role"},"rules":[{"apiGroups":[""],"resources":["serviceaccounts"],"verbs":["create","get","list","patch","update","watch"]},{"apiGroups":["admissionregistration.k8s.io"],"resources":["mutatingwebhookconfigurations"],"verbs":["create","delete","get","list","patch","update","watch"]}]}
creationTimestamp: "2023-04-05T04:14:11Z"
labels:
addonmanager.kubernetes.io/mode: Reconcile
azure-workload-identity.io/system: "true"
kubernetes.azure.com/managedby: aks
name: azure-wi-webhook-manager-role
resourceVersion: "121294900"
uid: 9e288391-5ec5-4981-a13e-20122f22ec2d
rules:

apiGroups:

""
resources:
serviceaccounts
verbs:
create
get
list
patch
update
watch

apiGroups:

admissionregistration.k8s.io
resources:
mutatingwebhookconfigurations
verbs:
create
delete
get
list
patch
update
watch`

kubernetes.azure.com/managedby: aks indicates this ClusterRole is managed as part of the AKS add-on. If you have the add-on enabled for WI, you don't need to deploy again using the manifests from this repo.
Closing this issue because it seems like duplicate install of workload identity. Please do a clean install either with the deploy yaml from this repo or by just enabling the AKS add-on (https://learn.microsoft.com/en-us/azure/aks/workload-identity-overview).


Theme: Jittery icons in Microsoft Edge browser

In MS Edge (all versions I've tested), the icons are jittery when scrolling in any page that has icons and is big enough to have a scroll bar. They bounce around, change colors, and do other weird stuff. I dunno exactly what is going on with it. Best example I can find is Webmin Configuration page; because it has a lot of icons, there's plenty of jumpiness.
Edge has smallish, but growing market share.

I will consider providing workaround for Edge browser.

Joe,
I just fixed familiar issue #509 and it think this is tightly related. Expected to be fixed in 18.20.
Thanks for reporting! ;)

Version 18.20 is out, please upgrade.

I was very frustrated to find out that my new physical installation of Windows 10 had jittery icons  all over the places as well, in all browsers, unlike virtual machine.
It's actually happened to be known issue of Font Awesome with certain scaling.
There are fancy workarounds, and I have finally fixed it, and it looks good now in Windows as well.
Example of how it was before and after update (screenshot taken from Firefox).
It's a huge difference. I personally don't like the way fonts are rendered in Windows at all. Linux with Gnome does it many times better, not mentioning MacOS where everything looks candy-like!
Before/After:


Additional Scroll/Spread mode clean-up (PR 9832 follow-up)

Please refer to the individual commit messages for additional details.
Since I had some free time yesterday, this is the additional clean-up mentioned in PR #9832.

/botio-linux preview

Good changes; thanks!

@timvandermeij As always, thanks for reviewing/merging this!
Given that the current pre-release needs to be replaced anyway (given the regressions fixed by PR #9832), would it make sense to include these changes here as well?
Rather than cherry-picking certain change sets, it seems that me that it's perhaps easiest to simply mark e.g. the current version (2.0.659 as of this writing) as the new pre-release. Especially considering that a number of fixes for corrupt/broken PDF files landed recently, and these could be good to include as well.

Yes, I think when we make a new (pre)release, it should include all changes up to that date.

For future reference: Once this PR has been included in at least one official release, remove the deprecated code as outlined in the diff below.
diff --git a/web/base_viewer.js b/web/base_viewer.js
index c904a448..1d9ac59f 100644
--- a/web/base_viewer.js
+++ b/web/base_viewer.js
@@ -171,18 +171,6 @@ class BaseViewer {
     if (this.removePageBorders) {
       this.viewer.classList.add('removePageBorders');
     }
-
-    if ((typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) &&
-        ('scrollMode' in options || 'spreadMode' in options)) {
-      console.error(`The ${this._name} constructor options ` +
-        '`scrollMode`/`spreadMode` are deprecated, use the setters instead.');
-      if (options.scrollMode !== undefined) {
-        this.scrollMode = options.scrollMode;
-      }
-      if (options.spreadMode !== undefined) {
-        this.spreadMode = options.spreadMode;
-      }
-    }
   }

   get pagesCount() {
@@ -1078,14 +1066,6 @@ class BaseViewer {
     this.update();
   }

-  setScrollMode(mode) {
-    if (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) {
-      console.error(`${this._name}.setScrollMode() is deprecated, ` +
-                    `use the ${this._name}.scrollMode setter instead.`);
-      this.scrollMode = mode;
-    }
-  }
-
   /**
    * @return {number} One of the values in {SpreadMode}.
    */
@@ -1145,14 +1125,6 @@ class BaseViewer {
     this.scrollPageIntoView({ pageNumber, });
     this.update();
   }
-
-  setSpreadMode(mode) {
-    if (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) {
-      console.error(`${this._name}.setSpreadMode() is deprecated, ` +
-                    `use the ${this._name}.spreadMode setter instead.`);
-      this.spreadMode = mode;
-    }
-  }
 }

 export {

Yes, it's good that they all have the word "deprecated" in the text so it easily comes up when using grep.


centering content for wider screens

I noticed on wider screens the content gets divided into two with a gap between

I added some CSS to center the content on wider screens

Hey Richard,
Thank you for identifying this.
This isn't the 1st time this kind of issue has been flagged with one of my sites. I definitely need to factor this into my responsivity checks. I think it's just because I have a regular size MacBook so I don't go beyond when it's full size.
I think you just need to look at the max width 800px media query because when the aside is hidden the post card is overflowing a bit.
Current:

Your commit:

If you can fix this to make it look like image 1 on smaller screens then I would be happy to approve and merge.

Thanks for prompt review. I have added a media query to handle 1280px and above screens sizes. I have removed the initial CSS that was added to the app class that was causing the problem.


Fix syntax errors in README

Personally, I'd refactor all of the const filteredPosts examples to chain posts.filter().map to get rid of the explicit {return}, but these are the minimal changes (except consistent semicolon at the end) to make the examples actionable.

README has been rewritten (a few times), so this is no longer applicable. Thanks though 👍

Oh no.


Dev add workspaces module

not sure why, but it pulled some commits in from another branch I'm working on. the only commit here that matters is 882f3fc

@jakeasarus lol you can probably close or delete this


Edit Link

The edit link to this document connects to a VSTS account and not Git Hub to create a PR to update the doc.

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

ID: 29515e24-2993-544a-5ac5-183a3d78b1e1
Version Independent ID: 7690fa54-341a-30bc-9a58-4a61562227b3
Content: Delete users for Visual Studio Team Services
Content Source: https://mseng.visualstudio.com/DefaultCollection/TechnicalContent/_git/vsts-docs-pr?path=%2fdocs%2faccounts%2fdelete-account-users.md&version=GBlive&_a=contents
Service: unspecified
GitHub Login: @douge
Microsoft Alias: chcomley

@ChristopherMank Thanks for alerting us and I'm sorry the Edit function isn't working correctly. Our engineering team is currently resolving this issue. I am also working on the update you provided.


ci: add treefmt as code formatting multiplexer, refactor CI to avoid duplication, reorg CI into DevOps workflow

As we do have a multitude of programming languages, running each linter separate is not efficient.
Treefmt solves this and comes with speed improvements as well. See the documentation for more information.

[x] treefmt.toml config
[x] lint whole project accordingly

[x] exclude Grafana Dashboards

[ ] CI

[x] refactor CI to avoid duplication
[x] reorg CI into DevOps workflow
[x] allow ghcr_build parallel to elixir test
[ ] GitHub Action for treefmt ~or Pre-Commit Hook~ using treefmt-nix

closes #4218

👍, but would prefer formatting as created by grafana export for dashboards

👍, but would prefer formatting as created by grafana export for dashboards

Yes, I stumbled over that too. Will exclude the dashboard config from the prettier linter.

Will exclude the dashboard config from the prettier linter.

Done

Those instructions seem to assume the use of flake-root, which is not something I am familiar with. Seems weird. But maybe a natural reaction from me for anything I am not familiar with ;-) - doesn't mean it is bad.
Maybe these instructions might be better? https://github.com/numtide/treefmt-nix?tab=readme-ov-file#flakes
But I guess the problem here is that you have duplicated the treefmt in nix format and toml format. I can see why they did it that way - we need to be able to specify the full paths to the nix programs, but it isn't particularly great. It would be better if we could read the toml file, and override the paths.
Did I understand your concern correctly?

Yeah exactly. The instructions in the treefmt-nox readme differ from the detailed walkthrough mentioned and linked in the same readme.
Was thinking about reading the toml config to avoid duplication as well.

In the first step I wanted to have it run without nix, which is working.
The next step would be to have it run in nix, which I tried but is not yet working.
The CI checks linting with running nix flake check which invokes treefmt.
Then a refactoring to use the same config

I'm stucked with  No. 2, and before throwing more time on it decided to ask for your help 😊

If you do specifically want to just run the formatter here, unfortunately there's no built-in way to run a specific check so you'd have to do something like nix build .#checks.x86_64-linux.formatting (or just invoke treefmt outside of nix entirely)

I wanted to add treefmt via nix, as I realized how many github actions I need to add to setup all the formatters in ci.
I now think about adding all dependencies to nix devShell and get rid of many github actions, which will result in improved sec and improved performance.

I tend to use treefmt via flakeModule like here

I tend to use treefmt via flakeModule like here

Yeah that's probably better. Maybe we just also migrate this repo to flake-parts while we at it 😉(jk this PR is already doing a lot, we shouldn't pile on the refactors)

@brianmay I'm not able get the devenv running, even with latest master branch I get:
direnv: loading ~/development/repos/teslamate/.envrc
direnv: using flake . --impure
error:
       … while calling the 'derivationStrict' builtin

         at /builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'devenv-shell'
         whose name attribute is located at /nix/store/3qsyy1d9wlxy0zaa5l27nwis7cjf93qs-source/pkgs/stdenv/generic/make-derivation.nix:352:7

       … while evaluating attribute 'DEVENV_PROFILE' of derivation 'devenv-shell'

         at «none»:0: (source not available)

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: A definition for option `packages."[definition 4-entry 3]"' is not of type `package'. Definition values:
       - In `<unknown-file>': null

Very odd. "Works for me" :-)
What happens if you try:
nix develop --impure

Should do the same thing, actually, but just checking something isn't wrong with your devenv.

Very odd. "Works for me" :-)

Was just waiting for this 😀

What happens if you try:
nix develop --impure

Should do the same thing, actually, but just checking something isn't wrong with your devenv.

Same result, so I assume it is not releated to my devenv setup. But will try with a clean git clone

But will try with a clean git pull

Same result. Deleted whole folder, did a clean git pull. Running on arm64 here

Hmmm. I tested with x86, I have an arm64 VM, will try that if I remember tomorrow.

I am guessing that one of the packages listed in the packages =  might be broken on arm64, although a quick glance it looks OK to me.

I am guessing that one of the packages listed in the packages =  might be broken on arm64, although a quick glance it looks OK to me.

Yeah, good point. Will test around the coming days. Just want this pr to be done and therefore wanna test the devenv as well.

Reproduced. Under OSX (arm64-darwin), so guessing you are using OSX also.
The problem is the glibcLocales reference. At least if I remove that, it works. Still a bit confused, I can install that manually, although it does pull in a number of other packages...

I think glibcLocales is not used on darwin, so probably this needs to be made conditional on Linux.

I think glibc is not used on darwin, so probably this needs to be made conditional on Linux.

Good catch, I can confirm that this solved the problem.

I tend to use treefmt via flakeModule like here

Yeah that's probably better. Maybe we just also migrate this repo to flake-parts while we at it 😉(jk this PR is already doing a lot, we shouldn't pile on the refactors. Maybe as a follow-up PR though....)

Any idea where to put imports = [  inputs.treefmt-nix.flakeModule ];? I am lost on this :-(

Any idea where to put imports = [ inputs.treefmt-nix.flakeModule ];? I am lost on this :-(

I just refactored to use flake-parts. Looks promising, beside the build folder issue in postBuild. Will keep looking, any hints are welcome.

Finaly the devenv is running correctly :-)

I love the move to flake-parts.

Thanks.

I think we should probably also make the following refactors, but they probably deserve a separate PR since this PR is already doing a lot.

move module.nix to the nix/nixos or maybe something like nix/flake-modules/nixos-modules
extract the package creation stuff to its own flake module
extract the checks to their own flake module
extract the dev shell to its own flake module (and possible migrate to use partitions)

Agree. Already tried to do some parts of it, but I have struggled with getting the build to run in extracted part. Maybe need to inherit the src part, idk.

I don't mind submitting a PR with these changes once this one is completed.

Would love to see your PR.

glibcLocales seems to be broken on linux. I disabled it, but the runner now gets issues with locales:
mix-format error:
warning: the VM is running with native name encoding of latin1 which may cause Elixir to malfunction as it expects utf8. Please ensure your locale is set to UTF-8 (which can be verified by running "locale" in your shell) or set the ELIXIR_ERL_OPTIONS="+fnu" environment variable

We use https://github.com/elixir-cldr/cldr for locales

but the runner now gets issues with locales:

Solved by setting ELIXIR_ERL_OPTIONS="+fnu"

Locale seems to be correct
runner has
LANG=C.UTF-8
LANGUAGE=
LC_CTYPE="C.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"
LC_ALL=

direnv in runner has
LANG=C.UTF-8
LC_CTYPE="C.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"
LC_ALL=
```bash

Still getting
Could not find "rebar3", which is needed to build dependency :unicode_util_compat
Shall I install rebar3? (if running non-interactively, use "mix local.rebar --force") [Yn] ** (Mix) Could not find "rebar3" to compile dependency :unicode_util_compat, please ensure "rebar3" is available

In what way is glibcLocales broken on Linux? Maybe we should submit a bug report?
Wonder why we are only getting issues with rbar3 now.
We use the mixRelease function, which is defined here: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/beam-modules/mix-release.nix
This sets the MIX_REBAR3 environment variable: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/beam-modules/mix-release.nix#L129C5-L130C1
I am assuming Elxiir is then able to find the library from the environment variable, but for some reason it isn't working.

In what way is glibcLocales broken on Linux? Maybe we should submit a bug report?

devShell does complain it is not a package (what it really isn't). https://github.com/teslamate-org/teslamate/actions/runs/11157566497/job/31012111403

Wonder why we are only getting issues with rbar3 now.
We use the mixRelease function, which is defined here: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/beam-modules/mix-release.nix
This sets the MIX_REBAR3 environment variable: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/beam-modules/mix-release.nix#L129C5-L130C1
I am assuming Elxiir is then able to find the library from the environment variable, but for some reason it isn't working.

Yeah, it is even stranger: doing a
mix local.rebar --force
mix local.hex --force

when entering the shell (similar to our DOCKERFILE) does not solve it.

I'm about to give up...
When running devenv up I do get
❯ devenv up
error:
       … while calling the 'derivationStrict' builtin

         at /builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'devenv-up'
         whose name attribute is located at /nix/store/fpivx4sjcp2vk4rp9nhliln5cwcp3kc6-source/pkgs/stdenv/generic/make-derivation.nix:336:7

       … while evaluating attribute 'text' of derivation 'devenv-up'

         at /nix/store/fpivx4sjcp2vk4rp9nhliln5cwcp3kc6-source/pkgs/build-support/trivial-builders/default.nix:101:16:

          100|       ({
          101|         inherit text executable checkPhase allowSubstitutes preferLocalBuild;
             |                ^
          102|         passAsFile = [ "text" ]

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attribute 'unix-socket' missing

       at /nix/store/m0j6n8wnynywa7fqa42h7f5l70ffh0id-source/src/modules/process-managers/process-compose.nix:42:54:

           41|       ${cfg.package}/bin/process-compose --config ${cfg.configFile} \
           42|         --unix-socket ''${PC_SOCKET_PATH:-${toString config.process.process-compose.unix-socket}} \
             |                                                      ^
           43|         --tui=''${PC_TUI_ENABLED:-${lib.boolToString config.process.process-compose.tui}} \

On latest master it runs fine (when disabling glibcLocales on darwin). When running nix flake update on latest master I get the same error.

On latest master it runs fine (when disabling glibcLocales on darwin). When running nix flake update on latest master I get the same error.

Confirmed, I see that too. will investigate.

This appears to be a bug in devenv. I filled a bug report: https://github.com/cachix/devenv/issues/1497
Version e316837bf4d0256e56ef26aa3778a10086f8db1a - the git commit immediately before the problem commit - should be fine also.
Switching to nixos-23.05 might be a good idea also, but it won't solve this problem.
In mean time if you just want to update, e.g. nixpkgs without dev, use:
nix flake lock --update-input nixpkgs

This appears to be a bug in devenv. I filled a bug report: cachix/devenv#1497

Ty!

Version e316837bf4d0256e56ef26aa3778a10086f8db1a - the git commit immediately before the problem commit - should be fine also.

So we can pin devenv to this, innit?

So we can pin devenv to this, innit?

Yes, that sounds good for now.

Pinning devenv solved it, devenv up is now working as expected with new flake.

I am assuming Elxiir is then able to find the library from the environment variable, but for some reason it isn't working.

My guess is that the mix installed via builtins.attrValues config.treefmt.build.programs collides with elixir installed via beam package. Commenting it out seems to fix it.

My guess is that the mix installed via builtins.attrValues config.treefmt.build.programs collides with elixir installed via beam package. Commenting it out seems to fix it.

This turns out not to be true. We need nixpgks-unstable for treefmt 2.0.5. When using unstable we get the rebar error even without builtins.attrValues config.treefmt.build.programs

Running nix develop . --impure --command treefmt --ci locally (aarch64-darwin) does not result in the rebar3 error, only on GitHub Runner.

And that is exactly why we shouldn't be using --impure 😉
Debugging might easier if you could run locally in the same way as GH runner. In that vein, might be worth trying the trick from https://github.com/cachix/devenv/pull/1018 to see if we can get away with not needing --impure. Normally I'm against extra inputs unless needed, but the input in this case is just /dev/null so it's fine IMO. @brianmay mentioned issues getting this to work with this project, but it might be worth spending more time to figure it out if we are somewhat blocked on things running differently locally vs in GH actions.
That said, I know essentially nothing about elixir so any suggestion I might give is from a purely nix-oriented perspective and may not actually be useful.

@brianmay mentioned issues getting this to work with this project, but it might be worth spending more time to figure it out if we are somewhat blocked on things running differently locally vs in GH actions.

It seems to work now. https://github.com/teslamate-org/teslamate/pull/4245

This turns out not to be true. We need nixpgks-unstable for treefmt 2.0.5. When using unstable we get the rebar error even without builtins.attrValues config.treefmt.build.programs

Possibly we could add another input and add nixpgks-unstable just for treefmt. Not sure if it is worth it though.

At present one editor (visual code) I use
wants to reformat the nix files one way, and my other editor (nixvim) wants to reformat the files another way. Arrgh. Hopefully I can try to address this better once this is merged.

And that is exactly why we shouldn't be using --impure 😉

Total agree.

Debugging might easier if you could run locally in the same way as GH runner.

Yes, this is my motivation to move to nix for our DevOps. There is https://github.com/nektos/act to run GitHub Actions locally, but it has limitations, so local execution is never the same as on GitHub runners. I want to have the most robust DevOps pipeline using nix. And I want to get rid of works on my machine. :-)

Possibly we could add another input and add nixpgks-unstable just for treefmt. Not sure if it is worth it though.

Yeah, tried that already but with no success, seems I'm not fully on the page how to then use it with the config.treefmt.build.wrapper.

At present one editor (visual code) I use wants to reformat the nix files one way, and my other editor (nixvim) wants to reformat the files another way. Arrgh. Hopefully I can try to address this better once this is merged.

I know the pain, that's one additional reason for using this PR.

It seems to work now. #4245

Ty. devenv up now works without  --impure. Flake check and nix develop . don't.

I'm getting there.
nix develop . --command treefmt (without --impure) works fine when commenting out: devenv-up = devShell.config.procfileScript; and devShells.default = devShell;

I'm getting there.
nix develop . --command treefmt (without --impure) works fine when commenting out: devenv-up = devShell.config.procfileScript; and devShells.default = devShell;

It works without --impurewith devenv enabled:
nix develop --override-input devenv-root "file+file://"<(printf %s "$PWD") . --command treefmt --ci

Even without --impure the Action fails on GitHub runner due to missing rebar3, even if it is created

Even without --impure the Action fails on GitHub runner due to missing rebar3, even if it is created: * creating /home/runner/.mix/elixir/1-16/rebar3. Treefmt use latest elixir treefmt: error: formatting failure: formatter '/nix/store/r2bjg78m7b7s75lwcgn69svk010j3sqb-elixir-1.17.3/bin/mix' with options '[format]' failed to apply: exit status 1.

It kinds of sounds like something depends on something concerning your environment. Even though that isn't suppose to happen.

Locale is also an issue as told by elixir, even if locale output on runner in nix develop is fine:

Strange.
If I get a chance, will see if I can look tomorrow.

It kinds of sounds like something depends on something concerning your environment. Even though that isn't suppose to happen.

Yeah, direnv does something spooky with $PATH I assume. The +__impureHostDep for example.
direnv: export +AR +AS +CC +CONFIG_SHELL +CXX +DATABASE_HOST +DATABASE_NAME +DATABASE_PASS +DATABASE_PORT +DATABASE_USER +DEVENV_DOTFILE +DEVENV_PROFILE +DEVENV_ROOT +DEVENV_RUNTIME +DEVENV_STATE +ENCRYPTION_KEY +IN_NIX_SHELL +LD +LD_DYLD_PATH +LOCALES +MACOSX_DEPLOYMENT_TARGET +MQTT_HOST +MQTT_PORT +NIX_BINTOOLS +NIX_BINTOOLS_WRAPPER_TARGET_HOST_aarch64_apple_darwin +NIX_BUILD_TOP +NIX_CC +NIX_CC_WRAPPER_TARGET_HOST_aarch64_apple_darwin +NIX_CFLAGS_COMPILE +NIX_DONT_SET_RPATH +NIX_DONT_SET_RPATH_FOR_BUILD +NIX_DONT_SET_RPATH_FOR_TARGET +NIX_ENFORCE_NO_NATIVE +NIX_HARDENING_ENABLE +NIX_IGNORE_LD_THROUGH_GCC +NIX_LDFLAGS +NIX_NO_SELF_RPATH +NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_aarch64_apple_darwin +NIX_STORE +NM +NODE_PATH +OBJCOPY +OBJDUMP +PATH_LOCALE +PGDATA +PGHOST +PGPORT +PKG_CONFIG +PKG_CONFIG_PATH +PORT +RANLIB +RELEASE_COOKIE +SIZE +SOURCE_DATE_EPOCH +STRINGS +STRIP +TEMP +TEMPDIR +TMP +TZDATA_DIR +ZERO_AR_DATE +__darwinAllowLocalNetworking +__impureHostDeps +__propagatedImpureHostDeps +__propagatedSandboxProfile +__sandboxProfile +cmakeFlags +configureFlags +mesonFlags +name +system ~PATH ~TMPDIR ~XDG_DATA_DIRS

If I get a chance, will see if I can look tomorrow.

That would be awesome, as I run out of energy on it.
Witout --impure I do not see a reason to use a container for local test but can be wrong.

I can't say I entirely understand... Regardless the following probably is a good change to make.
It fails for me also, with the same error. If I make the following change, it works:
@@ -185,8 +183,7 @@
                   export MQTT_PORT="${toString mosquitto_port}"
                   export RELEASE_COOKIE="1234567890123456789"
                   export TZDATA_DIR="$PWD/tzdata"
-                  mix local.rebar --force
-                  mix local.hex --force
+                  export MIX_REBAR3="${rebar3}/bin/rebar3";
                   mix deps.get
                   echo "Debug"
                   locale

Just to make sure I did a rm -rf /home/brian/.mix/ and retested.

Curiously, my shell prompt - I use starship - still claims it is an impure shell.
☸ <aws context> in teslamate on  treefmt [$!?] via 💧 v1.16.3 (OTP 26) via  v20.17.0 via ❄  impure (devenv-shell-env) took 3s
at 11:16:05 ❯

There probably is a good reason for this, I see that on all my projects even ones without devenv, but not sure I understand.
Also note that nix develop has a —ignore-environment option that looks independant of the --impure flag.

See this discussion here also: https://github.com/starship/starship/issues/6188

Noe that use of —ignore-environment unsets the locale, and my terminal stops working probably, which is not surprising. Because we didn't set values for LANG, TERM, etc.
So using --ignore-environment in general probably a bad idea, but good to know it is there for debugging stuff.
We probably do want to set LANG="en_AU.UTF-8" (or something like that) somewhere, maybe the CI. Because probably the CI doesn't come with a good default.

I can't say I entirely understand... Regardless the following probably is a good change to make.

Thanks! Now it seems obvious to "just" set the path correct, but didn't tried before.
Ci runs fine as well: https://github.com/teslamate-org/teslamate/actions/runs/11229295521/job/31214608563?pr=4219

Curiously, my shell prompt - I use starship - still claims it is an impure shell.

Same here (even if I didn't noticed before)

Noe that use of —ignore-environment unsets the locale, and my terminal stops working probably, which is not surprising. Because we didn't set values for LANG, TERM, etc.

Yeah, that's why I didn't used it.

We probably do want to set LANG="en_AU.UTF-8" (or something like that) somewhere, maybe the CI. Because probably the CI doesn't come with a good default.

GitHub Runners do have proper C.UTF-8set, imo best for compiling and CI. In local devenv it is nice UX to have your own lang settings.

CI ran successful on push but not on pull_request_target.
Now we ensure the cache name does not include invalid character

I will ensure pull_request_target only runs on real forks to avoid invalid cache name and unnecessary duplicate runs.

I think the mix hash needs to be updated also:
error: hash mismatch in fixed-output derivation '/nix/store/gly3c0rmyx308dzyl4qssf0irh175wgh-teslamate-mix-deps-1.30.2-dev.drv':
         specified: sha256-ukE7PKrsRaw6TWDSqTJljsPJQedi39mZgGFrMINEJlw=
            got:    sha256-Y+CGgvnSCiiuyhtsQ+j0vayq1IHO5IEPVl+V/wwTd6w=
error: 1 dependencies of derivation '/nix/store/1ladsmz0i5x6zzx15bqqpjv2fywa746g-teslamate-1.30.2-dev.drv' failed to build

That said, from their code it's unclear to me whether this is an intended extension point or merely an implementation detail so I'm not sure if we really want to rely on it. It's probably fine... What's the worst that could happen 😅

Yeah, I found that hole in the fence too, but was too excited when I finally got it working to do another refactoring :-)

This error was a bit unexpected:
$ nix flake check --override-input devenv-root "file+file://"<(printf %s "$PWD") .
warning: Git tree '/home/brian/tree/3rdparty/teslamate' is dirty
warning: not writing modified lock file of flake 'git+file:///home/brian/tree/3rdparty/teslamate':
• Updated input 'devenv-root':
    'file:///dev/null?narHash=sha256-d6xi4mKdjkX2JFicDIv5niSzpyI0m/Hnm8GGAIU04kY%3D'
  → 'file:///proc/self/fd/11?narHash=sha256-MR36Ywqs/zTxXcyqXW6MESFZ3X7OT91FF2wTpsZPoEg%3D'
error:
       … while checking flake output 'checks'

         at «none»:0: (source not available)

       … while checking the derivation 'checks.x86_64-linux.default'

         at «none»:0: (source not available)

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attribute 'nixosModules' missing

       at /nix/store/ngxcbaks38d1vpxflw88983n205bkfic-source/flake.nix:227:33:

          226|                     nixosModules.default = import ./module.nix { inherit self'; };
          227|                     imports = [ self'.nixosModules.default ];
             |                                 ^
          228|                     services.teslamate = {

Not yet sure what is happening with the CI. Elixir test fails, even when all testcases pass. I assume this is due to postgres17 update and was not found with CI before as the caching of the build was used in the postgres17 pr.

Tests "succeeded" now, after I clicked retry.
Actually if you look at the logs, there was one scary looking error that isn't generating a test failure:
** (FunctionClauseError) no function clause matching in DateTime.to_naive/1
    (elixir 1.16.2) lib/calendar/datetime.ex:925: DateTime.to_naive({:ok, ~U[2003-07-01 00:00:00Z], 0})
    (teslamate 1.30.2-dev) lib/teslamate/log.ex:185: TeslaMate.Log.get_positions_without_elevation/2
    (teslamate 1.30.2-dev) lib/teslamate/terrain.ex:77: TeslaMate.Terrain.handle_event/4
    (stdlib <IP_ADDRESS>) gen_statem.erl:1397: :gen_statem.loop_state_callback/11
    (stdlib <IP_ADDRESS>) proc_lib.erl:241: :proc_lib.init_p_do_apply/3

relevant code is at lib/teslamate/log.ex:185 is:
    date_earliest =
      cond do
        min_id == 0 ->
          DateTime.add(DateTime.utc_now(), -10, :day)

        true ->
          DateTime.from_iso8601("2003-07-01T00:00:00Z")
      end

    naive_date_earliest = DateTime.to_naive(date_earliest)

Problem is DateTime.from_iso8601 returns a tuple, and could in theory fail. Sigh. Which Elixir had strong type checking...
In actual practice, this probably function I think can't fail, the value is constant.

I think the above is not a regression in this pull request, so opened a new issue. #4260. Probably better to merge it separately so it doesn't get lost.
Think it is safe to merge this PR now...

Tests "succeeded" now, after I clicked retry.

Yeah, GitHub Runners have been slow and I assume a timing error.

Actually if you look at the logs, there was one scary looking error that isn't generating a test failure:

Saw it and was confused as to why there was no failure.

Wish Elixir had strong type checking...

That explains it.

I think the above is not a regression in this pull request, so opened a new issue. #4260. Probably better to merge it separately so it doesn't get lost.

Ty!


Fix test builds

knative/eventing#3049 added an extra parameter, add it to contrib tests
cc/ @vaikas is this correct?

/lgtm
/approve

THANKS :)


bundled tflint fails

Describe the bug
I've configured a before_hook consistent with the tflint hook documentation but when attempting to run lint the tflint command fails with the following error.
To Reproduce
Steps to reproduce the behavior, code snippets and examples which can be used to reproduce the issue.
terraform {
  before_hook "before_hook" {
    commands = ["validate"]
    execute  = ["tflint"]
  }
}

terragrunt run-all validate --terragrunt-working-dir live/dev

Expected behavior
tflint to execute without issue
Nice to have
Installing `aws` plugin...
Installed `aws` (source: github.com/terraform-linters/tflint-ruleset-aws, version: 0.24.1)
Failed to initialize plugins; Unrecognized remote plugin message: Incorrect Usage. flag provided but not defined: -act-as-bundled-plugin
This usually means
  the plugin was not compiled for this architecture,
  the plugin is missing dynamic-link libraries necessary to run,
  the plugin is not executable by this process due to file permissions, or
  the plugin failed to negotiate the initial go-plugin protocol handshake

Additional notes about plugin:
  Path: /usr/local/bin/terragrunt
  Mode: -rwxr-xr-x
  Owner: 1001 [vsts] (current: 1001 [vsts])
  Group: 123 [docker] (current: 123 [docker])
  ELF architecture: EM_X86_64 (current architecture: amd64)

time=2023-07-15T18:58:19Z level=error msg=Error running hook before_hook with message: Error while running tflint with args: [tflint --init --config /home/vsts/work/1/s/live/.tflint.hcl /home/vsts/work/1/s/live/dev/global/dns/.terragrunt-cache/JY4_HNaMg-52DvdjvVOsox2wLVc/I3lDXF50ybXcxvYBfO7q5qsx_iU/aws-route53] prefix=[/home/vsts/work/1/s/live/dev/global/dns]
time=2023-07-15T18:58:19Z level=error msg=Errors encountered running before_hooks. Not running 'terraform'. prefix=[/home/vsts/work/1/s/live/dev/global/dns]
time=2023-07-15T18:58:19Z level=error msg=Module /home/vsts/work/1/s/live/dev/global/dns has finished with an error: 1 error occurred:
	* Error while running tflint with args: [tflint --init --config /home/vsts/work/1/s/live/.tflint.hcl /home/vsts/work/1/s/live/dev/global/dns/.terragrunt-cache/JY4_HNaMg-52DvdjvVOsox2wLVc/I3lDXF50ybXcxvYBfO7q5qsx_iU/aws-route53]

 prefix=[/home/vsts/work/1/s/live/dev/global/dns]
time=2023-07-15T18:58:19Z level=error msg=1 error occurred:
	* Error while running tflint with args: [tflint --init --config /home/vsts/work/1/s/live/.tflint.hcl /home/vsts/work/1/s/live/dev/global/dns/.terragrunt-cache/JY4_HNaMg-52DvdjvVOsox2wLVc/I3lDXF50ybXcxvYBfO7q5qsx_iU/aws-route53]

time=2023-07-15T18:58:19Z level=error msg=Unable to determine underlying exit code, so Terragrunt will exit with error code 1

Versions

Terragrunt version: 0.48.1
Terraform version: 1.5.3
Environment details (Ubuntu 20.04, Windows 10, etc.): ubuntu-22.04 and also macosx

This issue resolved things for me. https://github.com/gruntwork-io/terragrunt/issues/2440#issuecomment-1418253151
plugin "terraform" {
  enabled = true
  preset  = "all"

  version = "0.4.0"
  source  = "github.com/terraform-linters/tflint-ruleset-terraform"
}

plugin "aws" {
  enabled = true
  version = "0.24.0"
  source  = "github.com/terraform-linters/tflint-ruleset-aws"
}

config {
  module = true
}


Move test support sources out of src/ripple (RIPD-1313)

For RIPD-1132, I migrated the unit test sources from src/ripple to src/test.  These changes move the remaining the unit test support code to src/test.

Moved src/ripple/jtx and src/ripple/mao to src/test
Move src/unity to src/test/unity
Move miscellaneous test support files to src/test, e.g. TestSuite.h, hash_metrics.h, unit_test.h.

Current coverage is 65.48% (diff: 100%)

Merging #1916 into develop will increase coverage by 0.02%

@@            develop      #1916   diff @@
==========================================
  Files           698        692     -6
  Lines         49745      49490   -255
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
- Hits          32568      32411   -157
+ Misses        17177      17079    -98
  Partials          0          0

Powered by Codecov. Last update 9e960ff...4d3e26c

I wonder why there are 159 fewer Hit lines?
Anyway :+1:

@vinniefalco There were a handful of non-jtx source files (like src/ripple/basics/TestSuite.h) that were included in the prior coverage measurements because I had only explicitly excluded src/ripple/test in the lcov run.   I moved them to src/test/support in this PR, so they are now excluded.

Rebased on 0.40.0-rc2

Rebased on 0.40.0-rc3

Rebased on 0.40.0

Rebased on 0.50.0-b1

Merged as b6a01ea41c2378911b3abe4dc057bb16318cb7d8


add path() call

prototype:
char *path(struct file *file)

So that this would work:
bpftrace -e 'kprobe:vfs_read { printf("reading path: %s\n", path(arg0)); }'

(or trace kprobe:__vfs_read) and it would print the full path.
For this to work, it may require a new BPF function added to the kernel to make this sane.

This is ultimately useful, I was trying to access vfs_write using an inline struct but doesn't seem to be possible to print the full path right now
#include <linux/path.h>
#include <linux/dcache.h>
struct file {
struct path *f_path;
}
kprobe:vfs_write
{
$file = (file *)arg0;
$file_name = str($file->f_path->dentry->d_name.name);
printf("written file: %s", $file_name)
}

@fntlnz - a path() call to print the absolute path of a file would be fantastic. You actually raise something here that I'm looking at now. The `vfs_{read()/write()' calls take a 'struct file' as their first parameter and it looks like its kernel definition isn't exported so what you would really like to do is:
kprobe_vfs_write
{
  @path = (path *)((char*)arg + 16);
  ...
}

However, bpftrace currently doesn't let you cast to an integral type. I'm looking at that now as it would make this and many other similar things much easier to do.

@fntlnz - your script won't work as it is anyway as you need to pad out the first 16 bytes as explaiend above. Something like this will work:
#include <linux/path.h>
#include <linux/dcache.h>

struct file {
  char pad[16];
  struct path f_path;
}

kprobe:vfs_write
{
  @file = ((file *)arg0)->f_path;
  @file_name = str(((path*)@file)->dentry->d_name.name);
  @[@file_name] = count();
}

@tyroguru after some reading of kernel source code I've been able to resolve that struct in this way
#include <linux/path.h>
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/dcache.h>
#include <linux/mount.h>

kprobe:vfs_write
{
  $file = (file *)arg0;
  $file_name = str($file->f_path.dentry->d_name.name);
  @writes[$file_name] = sum(arg2);
}

Output:
@writes[.touch]: 0
@writes[sh-thd.hhQinh]: 1
@writes[sh-thd.SuACZD]: 1
@writes[oom_score_adj]: 4
@writes[0]: 11
@writes[init-stderr]: 11
@writes[UDP]: 27
@writes[tty]: 29
@writes[sh-thd.LOe9QJ]: 39
@writes[ptmx]: 39
@writes[update-notifier-npm.json.510683803]: 55
@writes[sh-thd.LQsZt6]: 67
@writes[sh-thd.KAmXB0]: 78
@writes[.zsh_history]: 94
@writes[request-header-ca-config.json]: 98
@writes[client-ca-config.json]: 98
@writes[server-ca-config.json]: 98
@writes[sh-thd.K6HW6s]: 110
@writes[fntlnz]: 112
@writes[sh-thd.YDZten]: 143
@writes[sh-thd.Eq70JP]: 210
@writes[sh-thd.1ydON4]: 402
@writes[sh-thd.zgZ6j2]: 417
@writes[sh-thd.PT6r71]: 428
@writes[sh-thd.RY4a0Z]: 436
@writes[sh-thd.nUL4G1]: 443
@writes[sh-thd.gPMIm1]: 450
@writes[sh-thd.XZvck3]: 454
@writes[data_0]: 468
@writes[webapp-T0JK1PCN6-console.log]: 471
@writes[sh-thd.GZKkR2]: 478
@writes[sh-thd.P1oiO3]: 487
@writes[webapp-T3C9DQYE5-console.log]: 494
@writes[sh-thd.pEW0DZ]: 519
@writes[sh-thd.gtvONY]: 544
@writes[sh-thd.FdxT7Y]: 544
@writes[sh-thd.HhbML4]: 574
@writes[sh-thd.9H5FsZ]: 584
@writes[webapp-T02GAR81Y-console.log]: 685
@writes[webapp-T09NY5SBT-console.log]: 685
@writes[data_1]: 768
@writes[client-auth-proxy.csr]: 944
@writes[client-scheduler.csr]: 948
@writes[client-controller.csr]: 960
@writes[serving-kube-aggregator.csr]: 964
@writes[client-admin.csr]: 968
@writes[client-kube-proxy.csr]: 972
@writes[client-kubelet.csr]: 980
@writes[client-kube-aggregator.csr]: 985
@writes[serving-kube-apiserver.csr]: 1021
@writes[client-auth-proxy.pem]: 1289
@writes[client-scheduler.pem]: 1294
@writes[client-controller.pem]: 1306
@writes[server-ca.crt]: 1310
@writes[serving-kube-aggregator.pem]: 1310
@writes[client-ca.crt]: 1310
@writes[request-header-ca.crt]: 1310
@writes[client-admin.pem]: 1314
@writes[client-kube-proxy.pem]: 1318
@writes[client-kubelet.pem]: 1326
@writes[client-kube-aggregator.pem]: 1330
@writes[serving-kube-apiserver.pem]: 1367
@writes[client-scheduler-key.pem]: 1675
@writes[client-kubelet-key.pem]: 1675
@writes[kube-serviceaccount.key]: 1675
@writes[client-kube-proxy-key.pem]: 1675
@writes[serving-kube-aggregator-key.pem]: 1675
@writes[serving-kube-apiserver-key.pem]: 1675
@writes[client-admin-key.pem]: 1679
@writes[client-controller-key.pem]: 1679
@writes[client-auth-proxy-key.pem]: 1679
@writes[client-kube-aggregator-key.pem]: 1679
@writes[client-ca.key]: 1704
@writes[request-header-ca.key]: 1704
@writes[server-ca.key]: 1704
@writes[.rnd]: 3072
@writes[null]: 4526
@writes[5]: 7463
@writes[Cookies]: 12288
@writes[Cookies-journal]: 12836
@writes[kube-aggregator.kubeconfig]: 12878
@writes[etcd.log]: 14077
@writes[[eventfd]]: 34024
@writes[UNIX]: 38159
@writes[SiteSecurityServiceState.txt]: 56404
@writes[0000000000000000-0000000000000000.wal]: 94832
@writes[kube-apiserver.log]: 170271
@writes[recovery.jsonlz4.tmp]: 193322
@writes[cookies.sqlite]: 294912
@writes[]: 311459
@writes[TCP]: 388794
@writes[TCPv6]: 397112
@writes[cookies.sqlite-wal]: 557496
@writes[db]: 573440

@fntlnz - sigh... My bad - I was missing the declaration of 'struct file' in fs.h and only picking up the forward declaration provided in file.h. Thanks for the pointer.

@brendangregg, did this, or something like it, ever come to pass?
Converting either a struct file or struct dentry being passed into vfs_* functions into absolute paths is certainly useful.
Or are we still waiting for the underlying function(s) that would unwind an absolute path to be added to BCC first, then implemented in bpftrace?

Looks like work is being done on a helper for this https://github.com/iovisor/bcc/pull/2544
But it has not been merged yet (https://patchwork.ozlabs.org/patch/1211861/) so it will be a while before this will be available.

Thanks, fd2path() in iovisor/bcc#2544 does look like it produces the necessary absolute path.
It's just not clear (to me) whether that could be leveraged directly to convert a struct dentry into an absolute path.
Like, for instance, if you're going to vfs_unlink() a file, the struct dentry is all that is passed, so you don't have the necessary fd necessary for fd2path() to work.
This would imply that another helper would be needed for such cases where the file being manipulated isn't already "open" in some way.
Or I'm just missing something.

The absolute path is very useful in some performance trace cases, expect this feature. :)

This was done in #1492, although it only works for a very limited set of kernel functions.


[246] fixed sendUserViolation() with wrong email Response 404 Not found

For valid data, except for the email
{
"email": "Test1gmail.com",
"language": "en",
"name": "Test1",
"violationDescription": "124125sfgg"
}

by the way, under ADMIN it gives 404

by the way, under ADMIN it gives 404

I haven't tested this with User right, because the task was to check email...
Anyways, the 401 response might be a problem in the future, so I might add an issue to fix it.
Thanks for review!

Flip if else block. Should read like this: if user exist by email than send email, else throw error. Negation in this place are confusing.

Thanks for review, just made a commit where I have changed the if-else block, please review again.


Article PR for review.

Article offers an overview on diffusion and latent diffusion, based on Stable diffusion

Please make sure to update the name of the article folder, based on the current structure the name should be
article-introduction_into_diffusion_and_latent_diffusion_models/

Please also add a numerotation for each of the images in the style of (Figure 1: description of what is in the picture)

As requested, the folder name has been changed to article-introduction_into_diffusion_and_latent_diffusion_models and added caption with numerotation to each image


Single Prometheus restarted after it ups for 2 weeks

What did you do?
Hello！
I’m using docker-compose to run a single Prometheus, everything goes well in the first two weeks
Everytime I delete the wal, The memory usage occpied by Prometheus will increase from 4.4g to 5.3g then crashed
If there’s anyway to reduce memory usage of Prometheus or my Prometheus instance needs more RAM?
My total RAM is 7.6g
Thanks in advanced!
What did you see instead? Under which circumstances?
I saw the Prometheus container restart while grafana and alertmanager container were up in a few days.
Everytime I delete the wal, The memory usage occpied by Prometheus will increase from 4.4g to 5.3g then crashed

Hi thanks for your reply@roidelapluie, I think I've already sloved this problem, when I check the  on Prometheus page,
I found there's a large requests like [kube-apiserver (3 / 2599 active targets)], after I change the apiserver job by adding namespace(default) it became [kube-apiserver (3 / 20 active targets)] and the memory usage reduced about 1g then my Prometheus runs steadily


Com ingest kafka flags

This PR is strictly about the Kafka ingest consumer flags which were reviewed a couple of months ago by @jaffee and I.
Background
Ingest flags are reused extensively in different ingest consumer files, therefore it seemed logical to:

group the flags by context
save the flags in /_include files (e.g., /com-ingest-flag-auth
insert the include files in the appropriate context

There are also:

ingest specific flags (e.g., for SQL and CSV)
CSV specific flags
SQLspecific flags
TLS specific flags, etc

What's been done in this PR

I've reviewed new Kafka ingest files created by @jrbrinlee1
I've added new flags to what I believe are the appropriate contexts (but I may be wrong)
I've created new flag files to group together Kafka-specific flags (e.g., the SSL flags)

NOTE: There are NO destination files for the Kafka include files in this PR. These will appear in subsequent PRs and will include:

Kafka avro ingest source, ingest flags and example files
Kafka avro delete ingest source, ingest flags and example files
Kafka static ingest source, ingest flags and example files

Let me know if you find anything confusing. And of course, anything that's flat-out wrong can be marked for fixes in this PR
Thanks for your help

merged with main using CMD line instructions in Git (reproduced below):
Step 1: Clone the repository or update your local repository with the latest changes.
git pull origin main
Step 2: Switch to the base branch of the pull request.
git checkout main
Step 3: Merge the head branch into the base branch.
git merge com-ingest-kafka-flags
Step 4: Push the changes.
git push -u origin main


added some responsive grid for mobile devices

I rewrote almost all the css file for the puzzle1 and changed the name to campers instead of puzzle, because the page mostly consists of campers avatars.
before the grid

after the grid

Hi Benjithorpe,
I like the new css & grid system! It works really well on mobile 👍. Let's discuss changes to file names and centering the camper cells on larger screens.

I added my owns changes do your branch to resolve conflicts with an earlier PR and changed all occurrences of camper to challenge.
Thanks for the new responsive design!
I would like to address the 'off-centered' cell panel at some point:


ec2_instance instance watcher repeats instance information

ec2_instance instance watcher repeats instance information in the list due to bug in the code.
This leads to incorrect instance count and information in SecurityMonkey database.
Below code could be the issue. Instances list is iterated twice
                for reservation in reservations:
                    instances = reservation.get('Instances')
                    for instance in instances:
                        instances = reservation.get('Instances')
                        for instance in instances:
                            name = None

Should be fixed in #799.

PR merged. Closing issue.


simple_ota_example test (IDFGH-8344)

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report
V4.4.2
Why this problem
I (5708) simple_ota_example: Starting OTA example
W (5708) esp_https_ota: Continuing with insecure option because CONFIG_OTA_ALLOW_HTTP is set.
E (7978) TRANSPORT_BASE: poll_read select error 104, errno = Connection reset by peer, fd = 54
E (7978) esp_https_ota: Failed to establish HTTP connection
E (7988) simple_ota_example: Firmware upgrade failed

Hello @BATAxjh ,
Can you send the debug logs. Enable LOG_DEFAULT_LEVEL_VERBOSE, LWIP_SOCKETS_DEBUG and LWIP_TCP_DEBUG in menuconfig to get the debug logs.

Hello @BATAxjh
Any update on this?

oh  ,This problem is caused by the inconsistent network segments I set,Although it can ping.    sorry


Python2wasm compilers

I note a couple of possibly relevant recent releases for compiling Python to WASM:

cibuildwheel support for pyodide/wasm: https://github.com/pypa/cibuildwheel/pull/1456
py2wasm - https://wasmer.io/posts/py2wasm-a-python-to-wasm-compiler https://github.com/Nuitka/Nuitka/pull/2814

Thanks for the links! When we eventually get back to making a python pdk we'll consider those options.

Thank you! These are certainly options and i've got some interest in py2wasm. let's move the convo to #2


CustomCropShape - Ratio

Is it possible to include a feature to use a ratio instead of the CustomCropShape? I'd need to be able to crop rectangles in custom ratios. If this package would support something like this, it would really be perfect.
Thanks

Hi @nicmohr25, sorry for the late response. We currently don't support this, however the code is setup that this should be easily implementable.
You could do two things, either add a new custom shape ratio and add parameters to define the ratio. Or add a parameter for any path. Currently it is implemented that the shape defines the path like this:
case CustomCropShape.Square:
    return Path()
      ..addRect(
        Rect.fromCenter(
          center: Offset(width / 2, height / 2),
          width: cropWidth,
          height: cropWidth,
        ),
      );

So you can easily extend this functionality. Feel free to create a PR! (I currently don't have the resources to add this unfortunately)


Replacing pandas with polars

Is your feature request related to a problem? Please describe.
Pandas is used extensively in pvlib all over the place. However after using it for many years I think it is now outdated and needs to be replaced. It is greedy, slow, inconsistent and the API is awkward and difficult to use.
Describe the solution you'd like
I would like to propose replacing pandas with polars. Polars is a DataFrame interface built in Rust with many, many performance benefits. Too many to list them here, so I suggest visiting their page to learn more.
I know this is a very big change, but I believe it will lead to some serious performance and usability benefits. So there is no real plan yet, I would like to just start the discussion and see what others think. I think a good starting point would be to benchmark some performance-critical pvlib code in pandas and polars so we can quantify what the performance benefits for pvlib would be.

It is greedy, slow, inconsistent and the API is awkward and difficult to use.

I ❤ this! 🤣

Like @kevinsa5
I'd say it's way to early to support polars instead of pandas. The API is still unstable, version 0.X.
I'm a big user of polars on personal projects because of performance lazyloading, async collection, integration with the Apache Arrow Ecosystem.
But I really don't see any improvement in using polars here, apart from using the new shiny library, an effort is being made to use numpy array as inputs in functions where pandas were used before see #1455.
Performance-wise, benchmarks need to be made first and since we're not processing GB of data, we probably won't see any difference in performance, especially since we can use the new interface with the Arrow ecosystem with pandas 2.0.
Even when processing 20 years of weather data for a single location it's not even close to several millions of rows.
IMO I don't think it will make a significant gain in perf but I'm eager to see some benchmarks.
Moving forward using Numpy types instead of Dataframe or Series will make integrating with Polars or any Dataframe library easy.
We can probably use polars already if that's what you want with a bunch of PVLIB API.

I think it would be more appropriate to simply make pvlib "agnostic" to if one is using pandas vs. polars (vs. just plain old numpy float vectors and a Python list of timestamps). Not sure if this could be done with some "timestamped data provider" interface abstraction to lighten the load on users. Given the current evolution of pvlib, this would most likely be painful and disruptive to the pandas lovers. Also, sorting all this out would be quite the lift, I fear.

I think it would be more appropriate to simply make pvlib "agnostic" to if one is using pandas vs. polars (vs. just plain old numpy float vectors and a Python list of timestamps).

Narwhals  would be way to go.

I think it would be more appropriate to simply make pvlib "agnostic" to if one is using pandas vs. polars (vs. just plain old numpy float vectors and a Python list of timestamps).

Narwhals  would be way to go.

Oh cool. I need to check this out further!


Terrascan is failing in scan

terrascan version:1.5.0
Operating System: docker image

$ /go/bin/terrascan init
$ /go/bin/terrascan scan --use-colors t .
Got this error while runnning : -
2021-06-24T05:58:45.331Z	error	opa/engine.go:219	error compiling rego files{rule 15 0 checkDiskEncryption <nil>} {raw rego 15 0 package accurics
reme_checkDiskEncryption<no value>[managed_disk.id] {
    managed_disk := input.azurerm_managed_disk[_]
    encryption_settings = managed_disk.config.encryption_settings[_]
    encryption_settings.enabled == false
}
reme_checkDiskEncryption<no value>[managed_disk.id] {
    managed_disk := input.azurerm_managed_disk[_]
    managed_disk.config.encryption_settings == []
} <nil>} {error 26 0  1 error occurred: checkDiskEncryption:4: rego_parse_error: unexpected assign token: non-terminated set
	    managed_disk := input.azurerm_managed_disk[_]
	                 ^}
2021-06-24T05:58:45.334Z	error	opa/engine.go:261	error compiling rego files{policy path 15 0 /home/terrascan/.terrascan/pkg/policies/opa/rego/azure <nil>} {error 26 0  1 error occurred: checkDiskEncryption:4: rego_parse_error: unexpected assign token: non-terminated set
	    managed_disk := input.azurerm_managed_disk[_]
	                 ^}
2021-06-24T05:58:45.334Z	error	runtime/executor.go:124	failed to initialize OPA policy engine
2021-06-24T05:58:45.334Z	error	cli/run.go:110	scan run failed{error 26 0  failed to initialize OPA policy engine}

@kanchwala-yusuf Can you please suggest what we can do here?

Hey @sachinar ,
Can you please try running terrascan init and check?

Hi @kanchwala-yusuf ,
I did already. Shared the same in 1st comment as well.

Hey @sachinar ,
We are investigating this issue. Will reply back in some time. Sorry!

Hey @sachinar ,
We just tried to fix this issue in #888 .
Can you please retry terrascan init and see if this fixes the problem for you?

@kanchwala-yusuf Thanks for quick response. This issue has been resolved now.
Efforts much appreciated!!!

Closing, since the issue has been fixed!


Nuxt 3 SSG - Font not included when using @nuxt/critters

Hey there,
I realized that the Google font I'm using isn't included in the static sites generated with nuxt generate
assets/css/main.scss
/* rubik-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/rubik-v28-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

nuxt.config.ts
export default defineNuxtConfig({
  devtools: { enabled: true },
  ssr: true,
  app: {
    pageTransition: { name: 'page', mode: 'out-in' },
  },
  css: ['~/assets/css/main.scss'],
  modules: ['@nuxtjs/tailwindcss', '@nuxtjs/critters'],
  critters: {
    // https://github.com/GoogleChromeLabs/critters#critters-2
    config: {
      preload: 'swap',
      fonts: false,
    },
  },
});

Everything is working fine in dev (npm run dev) but not for the static pages. The font is just not loading.
As soon as I remove the critters module, it's there. I played around with fonts: true - didn't help.
Any idea?
Thanks!

I am hitting exactly the same problem


LilyGO HiGrow sensor enhancements

New firmware from Pesor  will support much easier configuration and abbility to add sensor faster to Home Assistant. This is Alpha version of custom component - still some work left to do.

New version is in the works by @pesor - closing this for now.

Splitting plant integration into separate files for each plant. Few more boards ordered and this is needed to keep everything nice and tidy.
Also fixed are minimum/maximum values for plants I have.

I wanted to track how long do batteries last. That is also very specific to each board.
In order to do that I've done following:

created input_datetime.X for each plant sensor board.
automation that is triggerd when plant sensor get in "charging" status. It then inputs current timestamp into input_datetime
template sensor that converts static date to counter, counting days from
There probably is easier and less complicated way to do so, but this one retains data over HA restarts.
Using history_stats and last_update or last_change didn't work.

Hi Andrej,
This is actually a great idea.
I saw your solution on my Github.
I can program it into the C++ code, so that you do not have to make yaml entries, it will then work automatically with the sensor last-charge-date, this will also be added to the MQTT message.
Do you like my proposal.
Right now I am fighting two issues.
First is the Fronius-Data-Manager, which gives me problems on month change, and problems when the inverter is not producing any power. This means that data in the MQTT is not consistent.
I need to check for sunset, and production, in order to get this right. So this is what I am programming right now.
Second issue is SDCard and ESP32, I thought it was simple, but that is not the case, as I simply cannot get it to work because of some incompatibilities. I found an YouTube video, that might solve my problem, so after my Fronius, and then the TTGO-T-HIGrow changes, if you like them, I will start with the SDCard ESP32 implementation.
Best regards,
Per
Fra: BeardedTinker<EMAIL_ADDRESS>Sendt: 5. december 2020 11:50
Til: BeardedTinker/Home-Assistant_Config<EMAIL_ADDRESS>Cc: Per Rose<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Emne: Re: [BeardedTinker/Home-Assistant_Config] LilyGO HiGrow sensor enhancements (#3)
I wanted to track how long do batteries last. That is also very specific to each board.
In order to do that I've done following:

created input_datetime.X for each plant sensor board.
automation that is triggerd when plant sensor get in "charging" status. It then inputs current timestamp into input_datetime
template sensor that converts static date to counter, counting days from
There probably is easier and less complicated way to do so, but this one retains data over HA restarts.
Using history_stats and last_update or last_change didn't work.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/BeardedTinker/Home-Assistant_Config/issues/3#issuecomment-739206544, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAXXLJCMP2H5K2WZVOQ2VADSTIF7BANCNFSM4QAVLHSA.

Adding 2 more boards with 4.1.0 firmware. Also testing new DS18B20 external soil temperature sensor.


You guys deleted Deleted "material-ui-pickers": "^2.2.4" it's breaking production app please restore so we can migrate

Date picker from "material-ui-pickers": "^2.2.4" was being used and the tag has been deleted from GitHub and as an outcome, our application's date-UI picker is broken.  Why did you delete the tag?  What is the process by which you delete tags and etc? Is there a way to restore this tag?
This is preventing our application form properly building.

Tech
Version

Material-UI
v2.2.4

React

Browser

TypeScript

etc.

Here is a tag https://github.com/mui-org/material-ui-pickers/tree/v2.2.4

@dmtrKovalenko actually it's from the npm not github it has been removed: https://www.npmjs.com/package/@material-ui/pickers

No, it is still hosted and avaialable as material-ui-pickers

@dmtrKovalenko  the issue is that the 2.2.4 tag is not there and we are calling the package via the tag name in npm: https://www.npmjs.com/package/material-ui-pickers. Check out the history and the tag is no longer there.


Question : How can we wait using this service until all/particular network request is completed ?

Scenario:

User click on a button in web-app and let's say it calls 10 network requests internally
Now how can we wait until all these 10 requests are completed irrespective of HTTP status ?

Any help would be really appreciated, TIA .

this would be tricky.If you compare  with other js tool you can achieve this very easily by waiting for the http call implicitly.
in webdriver context, you can achieve this using the below steps:

set up the interceptor

get all the request via browser.requests()

manually wait until you get all the request and validate it in the array returned by browser.request
something like that
wihle(somecondition){
var allreq = await browser.requests();
for(var i=0;i<allreq.length;i++)
{
if(allreq[i].includes('/api/yourcall'){
}
else{
break the loop
}
}
}

it  is advisable to wait for the last 1 or 2 request. Assuming when the last request is finished the prior 9 would eventually had finished

PS:  This is how i have achieved it.if you have any better solution ,please share

Hi @splurgeop Thanks for getting back to me but the biggest challenge which I see at the moment when we use browser.requests(); method it itself don't capture the intended Api request sometimes for e.g. I am trying to intercept a request /v1/getCustomer/  but when we use this method browser.requests() sometimes it capture this request and sometimes not

that's what the problem is.You have to wait explicitly.since you mentioned that sometimes it captures and sometimes not so you have to wait explicitly for the browser.getrequests till you get the api that you are looking for.
Hope that answers your question

@krarpitgupta @splurgeop You should be able to write a simple utility function in your test library that makes use of the functionality in #186 , which is available beginning with version 4.2.0.
async function doWhenSettled(callbackFn) {
  while(await browser.hasPendingRequests()) {
    await browser.pause(50);
  }
  // execute the callback
  return callbackFn();
}
// example
doWhenSettled(() => console.log('network activity has subsided for the moment!');

In a future release this library may provide a direct option to e.g. assertRequests that would block until the network settles. (Note that such an option could remove a lot of control from the user over how long to wait, etc. so I opted to put the primitives out in #186 and let discussion over the best library implementation occur)

Hi @tehhowch Thanks for getting back to me, to tackle this problem I tried below code but seems like browser.getRequests({includePending: true}) is not getting refresh, here is my code
do {         networkRequests = browser.getRequests({includePending: true});         pendingRequest = networkRequests.filter(request => request.pending == true);         console.log('check : ' + pendingRequest.length);     } while (pendingRequest.length > 0);
Any better way to tackle it or Am I missing something here ?
P.S. I also tried by adding following statement browser.setupInterceptor(); as a first statement inside loop but no luck

Idk, maybe this will help someone:
export const waitForRequest = async (browser: Browser<'async'>, match: string) =>
  new Promise((resolve) => {
    let timeout = 0;
    const step = 500;
    const interval = setInterval(async () => {
      if (timeout <= 20000) {
        const requests = await browser.getRequests({ includePending: true });
        const hasRequest = requests.find((r) => r.url.includes(match));
        if (hasRequest) {
          clearInterval(interval);
          resolve(true);
        } else {
          timeout += 500;
        }
      } else {
        resolve(false);
        clearInterval(interval);
      }
    }, step);
  });

And usage is:
const requestFound = await waitForRequest(browser, 'api.com/user'); // true or false


README update

The README references several charts as dependencies

Looking at the chart.yaml file those dependencies are:
dependencies:

name: redis
version: 16.5.5
repository: "https://keitaro-charts.storage.googleapis.com"
condition: redis.enabled
name: solr
version: 4.1.2
repository: "https://keitaro-charts.storage.googleapis.com"
condition: solr.enabled
name: postgresql
version: 10.16.2
repository: "https://keitaro-charts.storage.googleapis.com"
condition: postgresql.enabled
name: datapusher
version: 1.0.0
repository: "https://keitaro-charts.storage.googleapis.com"
condition: datapusher.enabled

My assumption is that the "https://keitaro-charts.storage.googleapis.com" somehow mirrors the referenced dependencies, but as a user there is no way to verify that.  I recommend updating the README to explicitly state the intent for the referenced dependency charts.

I was on the verge of raising this issue due to challenges I faced while deploying CKAN. It seems the README might not accurately reflect the current status of the chart. Could someone provide clarity on the correct repositories, chart, and image versions?

Readme updated in this PR #117


map \p{Pc} and \p{Nl} correctly

rename punctuation_connector key to punct_connector to match \p{Pc}
rename letter_number key to number_letter to match \p{Nl}

See https://ruby-doc.org/core-2.5.0/Regexp.html#class-Regexp-label-Character+Properties

Let me know if you'd like a test to be added for these cases.

Hi @mojavelinux!
Thanks for bringing this up.
It seems some property tokens emitted by the regexp_parser dependency dont match the offical "long names" as specified by unicode.org.
Ideally, this should be fixed in the dependency, but it would be a breaking change, so I'm fine with fixing this in js_regex for the time being.
The same problem seems to affect a dozen more properties in addition to the two you have already fixed. I'll fix these others as well and then release a new version.

@mojavelinux v2.2.0 is now released.

To start, thank you! I appreciate the quick turn around. Much quicker than I expected, in fact. :beers:
I didn't realize you were using regexp_parser to generate those ranges. But I guess it works out since you discovered they were incomplete anyway. Scanning these ranges sure is enough to give someone a headache, so I can understand why we want to generate them.
FYI, we're using this gem to generate character classes for the regular expressions in Asciidoctor.js. Asciidoctor.js is an implementation of Asciidoctor that's transpiled from Ruby to JavaScript by Opal. While Opal does a fine job with the logic part, it doesn't help much with regular expressions (where differences can cause major breakage). That's where js_regex comes in.
Our strategy is to extract all ranges to constants and use those to build regular expressions. But perhaps in the future js_regex can do this automatically for us. See https://github.com/asciidoctor/asciidoctor.js/pull/395.
cc: @mogztter

@mojavelinux
so you are overriding the constants of the ruby version in the js version?
Just to clarify, regexp_parser cant be used to generate charsets from properties (yet). I gathered the charsets "semi-automatically" from xregexp and unicode.org.
regexp_parser parses ruby regular expressions. e.g. it helps with "normalizing" various ways to refer to the Punctuation_Connector property by mapping all of /[[:pc:]]/, /\p{pc}/, /\p{punctuation_connector}/ etc. to :punct_connector. The bug you fixed occurred because some of the mappings regexp_parser makes are a bit non-standard.
I've been thinking about building (or searching for) a gem that can list properties from the unicode.org database and generate js-compatible charsets of them to more efficiently update the PROPERTY_MAP of js_regex. Perhaps that could be of use for your project as well.
On the other hand, many of the changes to unicode now happen in the astral plane (i.e. beyond \uFFFF), and there is no sensible way to handle ranges of such chars in js.
For instance, \p{nl} (and the non-standard ruby property \p{alnum}) now contain lots of numbers from historic scripts, and the replacements suggested by xregexp/js_regex are no longer accurate.
https://unicode.org/cldr/utility/list-unicodeset.jsp?a=\p{nl}&esc=on&g=&i=
This can also introduce bugs in ruby programs. E.g. stuff like U+1016D GREEK ACROPHONIC TROEZENIAN FIVE HUNDRED is probably not valid in most contexts where a number is desired.
As an added complexity, updates to unicode properties are usually not backported in ruby, so \p{nl} or \p{alnum} might match less stuff in ruby 2.3.6 than in the older ruby 2.4.0.
Its all a bit of a mess :)
If you want maximum consistency and reliability across ruby versions, js, and so on, you might want to put a manually assembled charset in the ruby version of asciidoctor.

so you are overriding the constants of the ruby version in the js version?

I build the regular expressions from constants so I can assign different values to those constants in the JavaScript environment. See:

https://github.com/asciidoctor/asciidoctor/blob/23de0880309b9592a119c10b1302849269bb5ed9/lib/asciidoctor.rb#L399-L435
https://github.com/asciidoctor/asciidoctor.js/blob/master/lib/asciidoctor/js/rx.rb

The bug you fixed occurred because some of the mappings regexp_parser makes are a bit non-standard.

Got it.
A lookup gem would be very useful, even if it isn't perfect.

This can also introduce bugs in ruby programs.

I've been hit by that too. That's why in general I try to keep the character classes rather vague.

Its all a bit of a mess :)

Yep.

If you want maximum consistency and reliability across ruby versions, js, and so on, you might want to put a manually assembled charset in the ruby version of asciidoctor.

I'm not looking for that much accuracy. I'm just looking for the ranges to match the same characters in dominant languages as that's all the writers will likely use. The ranges are also very broad intentionally. Most of the divisions have more to do with semantics (like, this is a number, so trigger number like behavior).

hi @mojavelinux
not sure if this is still relevant to you, but in case it is, i have found a better approach to this now.
instead of a handmade map, i am using one gem to get the matched codepoint ranges directly from ruby and another gem to do various things with them.
you could do something like CharacterSet.of_property('L').to_s(...) (docs)

Oh, that's really nice! Thanks for letting me know, @janosch-x. I'll no doubt keep coming back to this gem for various uses, so indeed it is relevant to me. Thank you again!


Support a date-time primitive in typescript

relates to: https://github.com/fern-api/fern/issues/107 for context

we now support date-time as a primitive! (as of 2023)


Trouble on seeing changes on a past commit in Jupyter Notebook

Issue Type: Bug
With the Git Lens extension activated, when I try to see a past commit's changes in the same Jupyter Notebook that I am working on, it seems like it tries to do a split-screen with the previous version but it just comes back right away to the present version. I am using a pipenv environment for this project, don't know any other info that could be useful, but I hope that helps :)
VS Code version: Code 1.52.1 (ea3859d4ba2f3e577a159bc91e3074c5d85c0523, 2020-12-16T16:34:46.910Z)
OS version: Windows_NT x64 10.0.19042

System Info

Item
Value

CPUs
Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz (4 x 2400)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: disabled_offopengl: enabled_onprotected_video_decode: unavailable_offrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
7.82GB (0.85GB free)

Process Argv
--folder-uri file:///c%3A/Users/thale/programming/DB%20Crawler --crash-reporter-id e9119422-9ecb-4092-9b1f-38a3496990c3

Screen Reader
no

VM
0%

Extensions (13)

Extension
Author (truncated)
Version

better-comments
aar
2.1.0

bracket-pair-colorizer-2
Coe
0.2.0

gitlens
eam
11.1.3

go
gol
0.20.2

anaconda-extension-pack
ms-
1.0.1

python
ms-
2020.12.424452561

vscode-pylance
ms-
2021.1.1

jupyter
ms-
2020.12.414227025

autodocstring
njp
0.5.4

vscode-python-typehint
njq
1.4.1

material-icon-theme
PKi
4.5.0

vscode-yaml
red
0.14.0

code-settings-sync
Sha
3.4.3

(1 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
openlogontheside:30221877
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30211402
wsl2promptcf:30224613
pythonvsdeb440cf:30242243
unusedpromptcf:30224611
folderexplorer:30224614
openfilemenucf:30224648
pythonvsded773cf:30236630
vstes627:30244334
pythonvspyt859:30241729

@thalesnunes Hi! What command or interface are you using in GitLens to view previous commits, and can you paste the contents of the Jupyter output tab at the bottom of VS Code (different tab in the same panel as the integrated terminals) in a comment?

@thalesnunes Hi! What command or interface are you using in GitLens to view previous commits, and can you paste the contents of the Jupyter output tab at the bottom of VS Code (different tab in the same panel as the integrated terminals) in a comment?

When I click one of those buttons, a page like this next picture appears and disappears instantly, and basically nothing happens...

When I click one of those buttons, a page like this next picture appears and disappears instantly, and basically nothing happens...

I see. If you look at the beginning of the Jupyter logs in the output panel, are you in the CustomEditor experiment? It should say 'User belongs to experiment CustomEditor...' if you are.
If so, you are running into a known issue where our notebook is implemented using the VS Code CustomEditor API which doesn't currently support the git diff view. You should be able to work around this by setting jupyter.experiments.optOutFrom: ['CustomEditor'].

I see. If you look at the beginning of the Jupyter logs in the output panel, are you in the CustomEditor experiment? It should say 'User belongs to experiment CustomEditor...' if you are.
If so, you are running into a known issue where our notebook is implemented using the VS Code CustomEditor API which doesn't currently support the git diff view. You should be able to work around this by setting jupyter.experiments.optOutFrom: ['CustomEditor'].


Passport

passport authentication code added to server.js
NOT ACTIVATED
note: all dependencies already in place(package.json)

 Passport(authentication)


[Supplier] Delay newly staked Supplier activation until next session

Objective
Prevent newly staked Suppliers from being included in an already started Session and delay their "activation" until the next one starts.
Origin Document
If a Supplier stakes mid-session, there is a possibility of having it included in a Session. This might force Gateways and Applications to updates their Sessions Supplier list at each block.

Goals

Prevent including Suppliers in a Session if this one has already started.
Save the Gateways and Applications the need to update the active Session's Suppliers at each block.

Deliverables

[ ] A single PR that:

Adds a field in the Supplier proto to indicate when it is allowed to be included in Sessions.
Use the above info to filter-out Suppliers that are not active yet.

General deliverables

[ ] Comments: Add/update TODOs and comments alongside the source code so it is easier to follow.
[ ] Testing: Add new tests (unit and/or E2E) to the test suite.
[ ] Makefile: Add new targets to the Makefile to make the new functionality easier to use.
[ ] Documentation: Update architectural or development READMEs; use mermaid diagrams where appropriate.

Creator: @red-0ne

Completed as per #707


Support for Sass syntax?

Are there any plans to include support for sass:sass syntax in addition to scss already supported?
We use sass because it's generally accepted in our team that sass is easier to write.
I appreciate there might be a fair amount involved.

Sorry, there are no plans to also support indented SASS in this node module.


check optargs copy in fleurcli

There is also strange code like this loop https://github.com/hashlookup/fleur/blob/4ee2644a850381d928a... that jumped into my eye.
Oh and btw I believe bloom_path can cause memory safety issues because it is not terminated with a null after strncopy.

ditch strncopy https://ramblings.implicit.net/c/2014/05/02/c-functions-that-should-be-avoided-part-2.html

tl;dr: use strlcpy instead.


Renaming resource calendar does not change the calendar name on the device

Renaming resource calendar does not change the calendar name on the device. This makes changing room names quite annoying.

Is that a problem only while the application is up and running? Are calendar's names being changed if you manually refresh or restart the application?

Restarting the application does not resolve the problem and I'm fairly sure that even deleting and reinstalling does not help.

When that problems comes up again, I'd be curious whether you can solve this by

Going to system settings -> accounts -> google
Trigger account sync
Open the app again

The app only uses the calendar resources the system provides, and depends on Android to sync calendar changes properly. The only fix that I could think of is if the application regularly bugs the system to start synchronisation (even though that should rather be Android's job to do).


Uploading large files to S3 can use an excessive amount of RAM

While investigating #656 we discovered that our current upload code uses a lot of RAM when uploading large files to S3. Unscientific tests show that the RAM usage is 10x the size of the file we're trying to upload. We should change the implementation to reduce the amount of RAM usage, or to limit how much data we upload at once.

I think this can be closed now, after profiling the new implementation (unscientifically) it uses 120 MB to upload a 100 MB file, which seems reasonable. Possibly using mmap would reduce that even further if you're interested in that.

Hmm, another possibility to reduce the amount of used RAM is to pass a streaming body to the request, somehow converting a stream of the file content to it.

I think the only way to do that without first reading the file into memory (and copying it into user space and back) is with mmap. I haven't tried to implement this yet though.

I would not try to do mmap. Ultimately that's not even necessarily sound to use in Rust, and regardless, our files are usually on the order of dozens of megabytes at most.
If we do want to optimize, we should avoid using the standard allocator for buffering in memory, instead reading into something like a bump allocator so that we can drop the file contents without potentially increasing fragmentation etc in the primary allocator.
But I personally don't think we should do anything here, files are tiny.

I'm onboard with this, the largest file we've served in the last week is only 45 MB. I think it's more important to limit the memory usage in a batch: if we have 1000 files at 10 MB each, that's way more likely to blow out memory than uploading one enormous file.

Right, yes, if we have problems around memory usage I would personally decrease parallelism rather than try to be smarter about how each file is handled.
Ultimately 99% of the files we upload are probably less than one megabyte.


Added IKeyVaultClient

Hey
I've created an interface for keyvaultclient class. This done in order to improve testability of classes that depended on keyvaultclient.
Thanks
Omer

Can one of the admins verify this patch?

Hi @omerlh, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.azure.com.

TTYL, AZPRBOT;

@azuresdkci test this please

@omerlh, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.
Thanks, AZPRBOT;

Thanks @omerlh for your contribution. The interface will change with the next major version of the Key Vault SDK and we don’t want any dependency to this interface. I will make sure the next major version of the SDK will have an IKeyVaultClient interface.


Added rvm support for ppc64le builds

Adding power support to travis.yml for "rvm:ruby-head"
Signed-off-by<EMAIL_ADDRESS>
Which issue(s) this PR fixes:
Fixes # Adding power support to the travis.yml builds ( rvm:ruby-head)
What this PR does / why we need it:
Travis deployments on power , similar to PR- https://github.com/fluent/fluentd/pull/2386
Docs Changes:
None
Release Note:
None

@repeatedly - Any review comments on above ?

Thx!


Changed Boolean to Optional in Nodes and Ports

Fixed issues and made changes described in linked issue. Please review and approve to merge.

@bgdxqi Could you please run through this pull request, so we can merge it ASAP?


Add HSL gradient option

Description
Add a isHsl prop  to HSVGradient, and a corresponding hslGradient prop to ColorBox and ColorPicker, that changes the 2D gradient to a HSL one insead of a HSV gradient.
Check List

[x] respect code conventions and usages
[x] tests and 100% coverage
[x] well documented
[x] self review

Thanks @unusual-thoughts , but it needs: typescript support and more tests

Well done @unusual-thoughts !


Fix compilation against Windows 10 SDK

I'll be honest I don't really know what I'm doing, just that these structs definitely exist in the Windows 10 10.0.20348.0 SDK.
Also yeah I saw the auto-generated header at the top of ntzwapi.h, but I can't find what it's generated from. Help appreciated?

I can't find what it's generated from

\tools\GenerateZw


Use ros2-gbp release repository for topic_based_ros2_control.

The repository has been mirrored into ros2-gbp here: ros2-gbp/ros2-gbp-github-org#459.
I did not change the release repository for noetic at this time since it is not required for ROS 1 distributions, but if the maintainer prefers to use a single release repository for all distributions that is perfectly acceptable.

FYI @sea-bass and @sjahr (as recently active Picknik releasers).


[release-1.10] Upgrade to latest dependencies

Update dependencies -pierDipi
/cc knative-extensions/serving-writers
/assign knative-extensions/serving-writers
Produced by: knative-extensions/knobots/actions/update-deps

/lgtm
/approve

/cc @pierDipi @kvmware
I wasn't an eventing approver in 1.10

/lgtm
/approve


hubble: Extract traceIDs into exemplars in HTTP metrics

What this does:

Fixes setting traceIDs for HTTP response flows
Adds an option to enable exemplars on HTTP metrics if the underlying HTTP L7 flow has a traceID set
Adds option to configure hubble metrics with OpenMetrics support

Exemplars basically annotate your metrics with extra metadata, in this case a traceID, which lets you jump from a metric to a trace in Grafana.

hubble: Extract traceIDs into exemplars in HTTP metrics

Here's some details on OpenMetrics, which is required for exposing exemplars in metrics to Prometheus: https://promcon.io/2019-munich/slides/openmetrics-what-does-it-mean-for-you.pdf
One potential concern is I've  added support for enabling OpenMetrics, which is what allows Prometheus to scrape metrics with the exemplars. Prometheus does content negotiation (using an Accept header) to determine if an application supports exposing metrics in OpenMetrics format. If Prometheus has exemplars storage configured, it will attempt to query metrics in OpenMetrics format, and the application, if EnableOpenMetrics is true, will return metrics in the OpenMetrics format.
The OpenMetrics format has a fix additional restrictions, primarily that counters must end in _total, otherwise their "type" will be "unknown" instead of "counter". I believe this primarily effects the help text for metrics but the OpenMetrics docs/slides say it's "mandatory", so it may cause other issues if the convention isn't followed.
I did a brief test to see if this effects any of the cilium metrics. I have all metrics enabled and I port-forwarded to my KIND node's cilium agent and queried the metrics endpoint with the 'Accept: application/openmetrics-text' header to get the metrics in OpenMetrics format. I checked for the text  "unknown", and the only occurrences are in the label values, not in the metrics help/metadata, so I think this shouldn't impact any of our metrics. I used the following command as my test:
curl -H 'Accept: application/openmetrics-text' localhost:9965/metrics | grep -i unknown

/test-1.16-4.9

/test-1.25-net-next

/test

/test-1.25-net-next

/test


Update 'ApplicationPattern+services.yaml' from ApplicationPattern

There is a new version of ApplicationPattern+services.yaml in the AppPattern.

Obsolete, no change!


bug (farcaster/core): Require cycle between validations and verifications

What is the bug?
Permanently see a warning when using farcaster/core
Require cycle: src/farcaster/core/validations.ts -> src/farcaster/core/verifications.ts -> src/farcaster/core/validations.ts

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.

How can it be reproduced? (optional)
Use the library, the bundler should warn about it.

🧡

Sorry for the delay in response. Do you remember exactly how you reproduced this? I can see that there's a require cycle, but I'm not seeing the warning message. Example:
# index.ts
import * as core from '@farcaster/core';

console.log('Test');

# package.json
{
  "dependencies": {
    "@farcaster/core": "^0.14.6"
  },
  "devDependencies": {
    "ts-node": "^10.9.2",
    "typescript": "^5.4.2"
  }
}

Then I run:
npx ts-node index.ts

And I get output Test with no warnings.

I was using the expo RN bundler which might have been stricter about require cycles


Link to rest tutorial doesn't work

When I go to https://www.openml.org/guide/api and click on "Rest Tutorial" I get here
https://www.openml.org/guide/rest_tutorial
which is empty.

Thanks, PR with a fix submitted. Should be online soon.
What do you think of the new layout thus far?
I also cleaned up the Wiki on GitHub.

I like it! Very fancy :cake:


Wrong documentation on order-dependent lists.

The documentation for order-dependent lists (a.k.a tuples), is misleading, as it says to use Array<(String, Fixnum, Hash)>, when that is a mixed of long and short syntax, which is interpreted differently.
https://github.com/lsegal/yard/blob/2d197a381c5d4cc5c55b2c60fff992b31c986361/docs/Tags.md?plain=1#L206-L209
Steps to reproduce
Use the explain_types on a param tag
::YARD::DocstringParser.new.parse("@param [Array<(Date, Integer)>]").tags.first.explain_types

Actual Output
::YARD::DocstringParser.new.parse("@param [Array<(Date, Integer)>]").tags.first.explain_types
=> "an Array of (an Array containing (a Date followed by an Integer))"

Expected Output
# Long syntax
::YARD::DocstringParser.new.parse("@param [Array(Date, Integer)]").tags.first.explain_types
=> "an Array containing (a Date followed by an Integer)"

# Short syntax
::YARD::DocstringParser.new.parse("@param [(Date, Integer)]").tags.first.explain_types
=> "an Array containing (a Date followed by an Integer)"

Environment details:

OS: Ubuntu 23.10
Ruby version (ruby -v): ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [x86_64-linux]
YARD version (yard -v): yard 0.9.34
Relevant software dependency/versions:

I have read the Contributing Guide.

I created a PR for the docs.


Fix docs-builder not running

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


Formulas are saved in settings but do not work really.

You can enter a formula in each field in the module settings, but when it is selected in the normal initiative dialogue, it just rolls the original default formula. Even in the "bonus" and "other" options, this is the same where it SHOWS the correct formula you have entered in settings! If this helps: in the other and bonus options, if you input manually the formula EVERY round, it rolls it correctly.

Yes, the "bonus" and "other" options were pulling from the default formula instead of the formula entered in the settings. Fixed in v0.1.1.
As for other formulas in the settings, I did some testing and it looks like entering formulas in the settings results in those formulas being used in the corresponding roll. But if you are not seeing that, please open a new issue with additional details on when that is not working.
Some things to keep in mind:

In settings, you have to hit the "save" button in the Advanced Configuration pop-up after adding the formulas. This can be easy to forget, as the save button sometimes is hidden so you have to scroll down.
For Weapons formulas, the description was mislabeled. The Weapons formulas are used with the "Weapon Type" variant. The "Weapon Damage" variant just pulls the weapon damage dice formula directly from each weapon. I fixed the labeling in v0.1.1.