Jest does not respect NODE_PATH

In our project we do not use any relative paths in require statements.  Instead of require('../../../ui/button') from inside a module in the components package, we simply use require('components/ui/button') everywhere.  This way if we move the button code around, we can do a simple search and replace in the project to update all of the require statements.  To accomplish this we set NODE_PATH="." and we are done (export NODE_PATH="." at the command line or process.env.NODE_PATH='.' in the code).  Browserify, Webstorm and node all respect the process.env.NODE_PATH setting.  It would be great if Jest's HasteModuleLoader could be updated to check the NODE_PATH for user modules as well.  It looks like it is checking to see if it is a IS_PATH_BASED_MODULE_NAME, but it's not so it errors out.  It would be nice if it would also check each of the paths in NODE_PATH before giving up.

:+1: just ran into this issue

+1 to be consistent with what node does.
Hope this is prioritized. Any probable timeline for this fix?

:+1:

:+1:

:+1:

Hi guys,
Any update for this issue?
Thanks.

This is pretty bad. I can't even use aliases in my application if I'm using JEST because the tests will fail - JEST can't resolve the alias. I don't know how you guys can live with this.
This issue has been open for ages and there are already several PRs active that aim to solve it.

I think nobody's home :)

The person who made the PR that fixes this issue hasn't responded to @jeffmo's feedback. So it's not that nobody is home, but developing open source software with community participation is kind of tricky. If @jeffmo fixes this issue and ignore the pull request, he might catch flak for it, and I think that's why he hasn't taken on this issue.
I think for mission critical stuff like this, you hope the maintainer will take the lead to fix the issue himself. There are too many people waiting for this issue to get fixed. Let's hope someone is listening. :)

@volkanunsal it is true I dropped the ball on this - A few days ago @carrbs opened a new pull though https://github.com/facebook/jest/pull/246

Thanks @hojberg,
Yes, #246 covers all this, has testing and is not platform specific. Please
take a look, and let me know if you think it needs anything. I'm motivated
to get this merged ASAP as we're using this code in prod.
On Feb 15, 2015 8:38 AM, "Simon Højberg"<EMAIL_ADDRESS>wrote:

@volkanunsal https://github.com/volkanunsal it is true I dropped the
ball on this - A few days ago @carrbs https://github.com/carrbs opened
a new pull though #246 https://github.com/facebook/jest/pull/246
—
Reply to this email directly or view it on GitHub
https://github.com/facebook/jest/issues/102#issuecomment-74424634.

That's great news. Thanks @carrbs and @hojberg.

Can I push the line and ask whether aliases will work? (#246)

@gbbr - yes, if you mean in package.json, if you do something like: NODE_PATH=\"$(pwd)/src\
So long as NODE_PATH is set to an absolute path it will work. But maybe I misunderstand your question?

Oops... that's a webpack feature. My bad. It's a config option called
"resolve.alias" in WebPack where you can use an alias for a path. I wonder
if that'll work after this patch. If it will - that would be awesome :)
On 16 February 2015 at 22:24, Benjamin Sanabria Carr <
<EMAIL_ADDRESS>wrote:

@gbbr https://github.com/gbbr - yes, if you mean in package.json, if
you do something like: NODE_PATH="$(pwd)/src\
So long as NODE_PATH is set to an absolute path it will work. But maybe I
misunderstand your question?
—
Reply to this email directly or view it on GitHub
https://github.com/facebook/jest/issues/102#issuecomment-74538545.

Hey everyone, very sorry. I've been missing out on all the latest updates to this thread but this basically just slipped my radar.
I will go commandeer that initial pull request and bring it up to date tomorrow when I get back to the office.
Sorry for dropping the ball here everyone, my bad.

Hi @jeffmo,
#246 should have all the goods on it, that PR has tests and responds to other people's concerns about different platforms.

Thanks @carrbs. Just merged #246 and published<EMAIL_ADDRESS>with it

Awesome! thnaks @jeffmo

woot! thanks @jeffmo

totally agree with @gbbr 's comment, see https://github.com/facebook/jest/issues/269 and https://github.com/facebook/jest/issues/270 ... is there any progress?

I cannot use the preprocessor to rewrite the require statements because it seems that an error of a failed required module is thrown before calling the preprocessor.

Found myself getting Cannot find module 'react' from ... error after setting the NODE_PATH variable.
Jest seems to be calling node-resolve like this:
resolve.sync('react', {
  paths: 'resources',
  basedir: 'resources/components/button',
  exts: [ '.js', '.json', '.jsx' ]
});

Where 'resources' is the path in my NODE_PATH and 'resources/components/button' where the component requiring React lives. With this call node-resolve searches modules from
resources/components/button/node_modules,
resources/components/node_modules,
resources/node_modules and from resources,
but ignores node_modules completely and for that reason fails to find React.
My temporary solution for this was to use NODE_PATH=resources:node_modules jest which seems to work fine, but I'd definitely want to know am I doing something wrong or is there something wrong with node-resolve. In my opinion Jest seems to be using it correctly. Any ideas?

There is another issue I noticed, after NODE_PATH is used and got the happy require working.
Make sure the paths are consistent everywhere, otherwise dontMock/setMock won't work.
e.g.:
jest.dontMock('components/unhappy') // in your test
won't work with
require('./unhappy') //in your code. e.g. components/happy.react.jsx
maybe there is no such feature yet to recognize the same path references?

I'm running into this bug on my CI server, anyone have a workaround?

Jest definitely respects the NODE_PATH and has for a year at least. You are probably running into some other issue.

Oh, that's good to hear, this issue should probably should be closed then.
I'm hitting an issue that presents just like this, but I only get it on my linux CI server, not on macOS.

Sorry, somehow I thought this issue was still open.


frostdb: enable snapshots

This commit adds the option to enable snapshotting a database whenever a block exceeds a given size or is rotated out.
A snapshot is taken of the db state and stored in the snapshots/ folder. The use of the WAL is not modified yet, even though it could be truncated. This will be done in a future change once snapshots have been running for a while.
Note that old snapshots are not cleaned up yet, which gives us more txns to reload at in case of issues. In the future, a cleanup policy will be implemented.
Closes #345

Note that we could get into a state where we perform two snapshots close to each other in case of two large tables, but I think this is acceptable for now even though we could improve this to have a snapshot goroutine that routinely checks database size.

My thinking was that the snapshots are going to be pretty cheap since there's a lot less data, and it serves as an additional checkpoint to replay WAL entries from, but I'm happy to remove.


Loop condition should be re-evaluated after continue in while and do-while statements

Changed how while and do-while lower continue statements.
In the following sample:
{
    var i = 0
    while i < 5
    {
        i = i + 1
        if i == 5
            continue
    }
    print(string(i))
}

was printing 6 as a result, while the equivalent C# would print 5.

Hi Immo
Just wanted to say that I reverted the commit that bothered you instead of rebasing the pull request because I didn't want to hide my mistake. Seeing now the mess that it made to your master history, I feel silly for that. I'm sorry for the noise.
Thanks for this series. It has been a lot of fun following it. It doesn't bother me at all, but as I've seen you struggle to try to say my name, Fede is a short for Federico, a Spanish name, which Google translate pronounces quite well. Bing translator pronunciation is perfect, but it seems to lack the option to have a permalink that fills the inputs.
Thanks again for the time and efforts you put into the series. I hadn't seen compiler code since college, and it has been a lot of fun refreshing some memories, and learning a lot of new things.
I can't wait to see how you're going to make a debugger for Minsk language that works well in the console :-)


update old style %s to f-string

@MrWardKKHS Thanks for this patch, however I don't see anything wrong in using %-formatting.


Remove a wrong function comment

The function doesn't use 'key' parameter anymore.

thanks, nice catch! trivial documentation fixes like these are committed via the maintainers (I should make this policy explicit in the github PR form thingie...). Fix is upstream now.


Upgrade to 0.8.0

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

The token here is expired. Please see the "Near term" plan on how to fix this.


Q121- explanation is wrong

The answer is not When calling a setter method, undefined gets returned, but just there is no getter in config e.g.
get language() {return 'foobar'},

The answer is not When calling a setter method, undefined gets returned, but just there is no getter in config e.g.
get language() {return 'foobar'},

@flyskywhy I think your explanation is correct, but goes beyond the purpose of the question!
In fact, the question is asking "what happens if a property, which owns just a setter but not a getter, get's invoked"?
And you are right, but that's beyond. A setter is different from a getter and not defining a getter will inhevitably lead to undefined when a property is read.
So the answer is correct and the explanation is correct too.


Setup/beginner

Just a fix for some of the parts of setup that may need to be updated.
Will review and comment more later.

stale


Adjust facebook oAuth API endpoints for Graph API 2.x

On April 30, 2015 facebook will be deprecating their pre 2.x API.  See https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_login.  This means that the API endpoins will need to be changed to also include the API version information.  E.g. as far as I understand it the oAuth authorize URL would need to be https://www.facebook.com/v2.0/dialog/oauth in the future.

Hey @jhilden, thanks for information! I'll take it later this month.

Done in #676


Handle retrying a download

I'm having a problem with this task running on Bitrise: for an unknown reason, it's sometimes stalling on even small downloads. At first I thought it might be a memory problem, but a quick look at your very clean code shows that's clearly not the case (unless it's an issue in HttpClient).
Anyhow, I would be interested in trying the timeout parameter you recently added, but I can't find the 3.3.0-SNAPSHOT in jCenter.
I would also like to suggest a retry n parameter, which would run the same request again if it fails, a maximum of n times.

You can use the following code to switch to the snapshot:
buildscript {
    repositories {
        jcenter()
        maven {
            url "https://oss.sonatype.org/content/repositories/snapshots/"
        }
    }
    dependencies {
        classpath 'de.undercouch:gradle-download-task:3.3.0-SNAPSHOT'
    }
}

apply plugin: 'de.undercouch.download'

I would also like to suggest a retry n parameter, which would run the same request again if it fails, a maximum of n times.

That's a very good idea actually. I will put this on my TODO list. In the meantime you can implement a very easy workaround. Look at the following recipe that cycles through a number of mirror servers:
https://www.michel-kraemer.com/recipes-for-gradle-download/#recipe-6-mirror-servers
Instead of a list of mirror servers you could just have a counter that you increase until the maximum number of retries has been reached.
Besides, pull requests are very much appreciated if you want to implement the retry option yourself 😄
Cheers,
Michel

Thanks Michel, that's a pretty cool work-around! I'll queue up the PR request for when I'm in less of a rush :-), great to hear you're open to them.

Adding a retry n parameter would be very useful.
As a workaround, users can tweak the recipe at https://michelkraemer.com/recipes-for-gradle-download/#recipe-6-mirror-servers, but it would be nicer to build retry into gradle-download-task.  That would solve this common need once and for all, in a way that is easy to use and easy to read in a build.gradle file.

I'll pin this issue so it won't be marked as stale again. It's a pretty good idea actually.

@liucc52 In the upcoming gradle-download-task version 4.0.0, there will be a retries parameter. I just pushed the commit.


Figure out Bower Dependency Strategy

Probably need to have style guide as a separate repo that implements rui-components.
To get past build issues @jdl031 updated grunt tasks in to force the latest version of any conflicting bower package to be installed. This has some risk and should not be a long term solution.

RWARRR! Thanks for posting, @jdl031. Ich Bin RedoxBot-- nice to meet you!
It has been 60 days since there have been any updates or new comments on this page.       If this issue has not been resolved and needs to be re-opened, please take a minute to re-open it. Report problems with the bot to @nwhatt


Include the username in the creds call if present

This is needed to disambiguate cases where a user has multiple usernames
on the same host. Without this the first item will be silently used
which might be wrong & cause a loop of incorrect password prompts (&
possibly a lockout on the server)

Sweet :+1:

When would this come up?  Also, I think the "proper" way to handle multiple usernames on the same host is to enable credential.useHttpPath. But that means you'd have to re-enter your creds for all of your repos.
 It'd be worth adding credential tests too.

This used to come up fairly often in SourceTree; people using co-located repositories but having multiple accounts, with different access permissions. Turns out some people do use multiple GH / Bitbucket accounts, for example separating their corporate and personal identities (very often freelancers). And yes, this involves using<EMAIL_ADDRESS>- that's actually the default format in Bitbucket and Stash in fact precisely to remove the ambiguity. I know it's not the default on GitHub though, you guys assume people only have one account :)
I also come across it while doing testing & impersonating others, particularly when running against localhost.

Cool, thanks for explaining. Makes sense.
Here's a couple test cases that should pass with this PR:
diff --git a/lfs/credentials_test.go b/lfs/credentials_test.go
index e5df1a2..a59946a 100644
--- a/lfs/credentials_test.go
+++ b/lfs/credentials_test.go
@@ -20,6 +20,16 @@ func TestGetCredentialsForApi(t *testing.T) {
                        Password: "monkey",
                },
                {
+                       Desc:     "username in url",
+                       Config:   map[string]string{"lfs.url"<EMAIL_ADDRESS>+                       Method:   "GET",
+                       Href:     "https://git-server.com/foo",
+                       Protocol: "https",
+                       Host:     "git-server.com",
+                       Username: "user",
+                       Password: "monkey",
+               },
+               {
                        Desc:          "auth header",
                        Config:        map[string]string{"lfs.url": "https://git-server.com"},
                        Header:        map[string]string{"Authorization": "Test monkey"},
@@ -101,6 +111,16 @@ func TestGetCredentials(t *testing.T) {
                        Username: "lfs-server.com",
                        Password: "monkey",
                },
+               {
+                       Desc:     "username in url",
+                       Config:   map[string]string{"lfs.url"<EMAIL_ADDRESS>+                       Method:   "GET",
+                       Href:     "https://git-server.com/foo",
+                       Protocol: "https",
+                       Host:     "git-server.com",
+                       Username: "user",
+                       Password: "monkey",
+               },
        }

        // these properties should not change the outcome
@@ -216,7 +236,9 @@ func init() {
                for key, value := range input {
                        output[key] = value
                }
-               output["username"] = input["host"]
+               if _, ok := output["username"]; !ok {
+                       output["username"] = input["host"]
+               }
                output["password"] = "monkey"
                return output, nil
        }

Here's what the failure output looks like against the current master:
$ script/test lfs -run TestGetCredentials
warning: current Git remote contains credentials
warning: current Git remote contains credentials
--- FAIL: TestGetCredentialsForApi (0.01 seconds)
	credentials_test.go:141: Checking "simple"
	credentials_test.go:141: Checking "username in url"
	credentials_test.go:179: [username in url] bad username: "git-server.com", expected: "user"
	credentials_test.go:204: [username in url] Bad Authorization. Expected 'Basic dXNlcjptb25rZXk=', got 'Basic Z2l0LXNlcnZlci5jb206bW9ua2V5'
	credentials_test.go:141: Checking "auth header"
	credentials_test.go:141: Checking "scheme mismatch"
	credentials_test.go:141: Checking "host mismatch"
	credentials_test.go:141: Checking "port mismatch"
	credentials_test.go:141: Checking "api url auth"
	credentials_test.go:141: Checking "git url auth"
--- FAIL: TestGetCredentials (0.00 seconds)
	credentials_test.go:141: Checking "git server"
	credentials_test.go:141: Checking "separate lfs server"
	credentials_test.go:141: Checking "username in url"
	credentials_test.go:179: [username in url] bad username: "git-server.com", expected: "user"
	credentials_test.go:204: [username in url] Bad Authorization. Expected 'Basic dXNlcjptb25rZXk=', got 'Basic Z2l0LXNlcnZlci5jb206bW9ua2V5'
FAIL
FAIL	github.com/github/git-lfs/lfs	0.016s

Awesome, thanks - I looked at this code but didn't understand how it would test this change, but I realise it's swapping the excCreds function variable which is the crucial thing :)

Cool, I'll merge then.

I looked at this code but didn't understand how it would test this change, but I realise it's swapping the excCreds function variable which is the crucial thing :)

If you have any thoughts on how to make it more clear, let me know. If you were confused, I'm sure Future Rick will be confused when he looks at it again in a couple weeks or so :) Overriding the private function for testing is a bit a hack. I didn't feel like adding some kind of interface thing just for tests though.


After delete event for delete translations

Hi @2amigos
I added new event (EVENT_AFTER_DELETE) which delete translations.
Could you check it ?
Do you think it's more safe to leave translations undeleted ?

@mrstroz I think is fine to remove it, nevertheless, wouldn't be better to have a unique SQL and execute it?

I'll merge it

@tonydspaniard Could you create 1.2.x or 1.3 release from latest marges ?

@mrstroz sure

@mrstroz done

Thanks ! :)


Roll Flutter Engine from 438e9b4d7d4e to f2c191e48120 (10 revisions)

https://github.com/flutter/engine/compare/438e9b4d7d4e...f2c191e48120
2024-01-30<EMAIL_ADDRESS>Roll Skia from a3d46fac53be to 7df4d35e11cf (3 revisions) (flutter/engine#50173)
2024-01-30<EMAIL_ADDRESS>Roll Skia from c2fada52fdc4 to a3d46fac53be (2 revisions) (flutter/engine#50171)
2024-01-30<EMAIL_ADDRESS>Roll Skia from 7dc9ba2e8c90 to c2fada52fdc4 (1 revision) (flutter/engine#50170)
2024-01-30<EMAIL_ADDRESS>Roll Skia from 1c0eae94fc09 to 7dc9ba2e8c90 (1 revision) (flutter/engine#50169)
2024-01-30<EMAIL_ADDRESS>Roll Skia from 4e992fb3a9db to 1c0eae94fc09 (3 revisions) (flutter/engine#50167)
2024-01-30<EMAIL_ADDRESS>Roll Fuchsia Linux SDK from Hqi_x_A9lYsY58VSn... to Z-xFM2ILZJw22eU8q... (flutter/engine#50166)
2024-01-30<EMAIL_ADDRESS>[Impeller] Add interface for submitting multiple command buffers at once. (flutter/engine#50139)
2024-01-30<EMAIL_ADDRESS>Bump actions/upload-artifact from 4.1.0 to 4.3.0 (flutter/engine#50165)
2024-01-30<EMAIL_ADDRESS>Roll Skia from 083c1a4d9767 to 4e992fb3a9db (1 revision) (flutter/engine#50164)
2024-01-30<EMAIL_ADDRESS>Use structured logging on Fuchsia (flutter/engine#49918)
Also rolling transitive DEPS:
fuchsia/sdk/core/linux-amd64 from Hqi_x_A9lYsY to Z-xFM2ILZJw2
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC matanl@google.com,rmistry<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

AutoRoller is stopped; closing the active roll.


Keyboard visibility is not kept when cycling through other apps

Summary
When cycling apps, the keyboard visibility is not kept.
Environment Information

Device Name: moto g100
OS Version:  android 12
Mattermost App Version: 2.0.1
Mattermost Server Version: 7.7.1

Steps to reproduce
Start typing a message, keyboard shows, then switch app, then come back.
Expected behavior
Keyboard should be visible and cursor should be at the position where I left it
Observed behavior (that appears unintentional)
Keyboard is hidden
As you can see in this animation, when I come back from home screen, keyboard is hidden and I have to re-focus the text field.

Opened https://mattermost.atlassian.net/browse/MM-50455.


Add API Security in Action book link

This is a bit of shameless self-promotion (well, my publisher asked me to), but I wonder if you would be willing to add a link to my book, API Security in Action? (I can send you a link for a free copy if you want to read it first - it is still in "early access" so not complete yet).
It has a chapter on basic secure application development techniques, and then chapters covering CSRF, etc. It covers JWT because it is hard not to, but is clear to point out the security weaknesses and covers alternatives like Macaroons and Paseto :-) (I also mention CipherSweet in a section on database hardening, so Paragon IE is well covered...)

I'd definitely be interested in reading this book but we have a strict policy of "always pay creators" (which includes artists) so I'll have to turn down the free copy.


fluentd v1.11.4

Signed-off-by: Masahiro Nakagawa<EMAIL_ADDRESS>

I'd updated to use 1.0 suffix for all newer Fluentd images.


fix: Missing german translation for "password too short" message

The German translation of one "error"-Prompt for passwordBones was missing. Added it

fixes #760


Components/concurrency-manager: Remove stale comments

What problem does this PR solve?
Problem Summary:
What is changed and how it works?
Remove stale comments. Since after #8608, LockTable is already a concurrency ordered structure. And it's no longer a BtreeMap.
Related changes
#8608
Check List
No code
Side effects
None
Release note

No release note

/lgtm

/lgtm

/merge

/merge

emm...Seems that the Raft Unittest failed..

emm...Seems that the Raft Unittest failed..

/test

/test


Upgrade to v1.33.0 of the SpotInst Terraform Provider

@stack72 Do you have an ETA on this?
Waiting for some bug fixes done in 1.33 .

@stack72 Do you have an ETA on this?
Waiting for some bug fixes done in 1.33 .


Add tests for most basic C++ data types

Please start with a use case description for a USER of this work
[Who] As an app developer
[What] I need to store common app data in the KV store
[Value] In order to store and retrieve necessary data for my application
Describe the solution you'd like

Handle all basic C++ data types (non container)
Handle container types of basic types
Have a method for serialising/deserialising custom classes too

Describe alternatives you've considered
Converting everything to a string - penalties there, and takes up disc space
Additional context
None

feature-18 branch now has support for basic C++ types, and any non-keyed stl-like container types.
This is true for serialisation to Bytes (aka std::vectorstd::byte), but I've not yet got a way to lazily convert back to an EncodedValue with the unpacked C++ representation of the data.
Custom classes may want to define an operator groundupdb::EncodedValue() function, and MyType(EncodedValue& from) constructor. This idea needs validating though.


Typo in error message

Hi you have a typo in this error message. Thanks.

this has been fixed in the development version thanks


author's name gets link only if AUTHORS_SAVE_AS is set.

There seems to be no point in linking to the author's index page listing all
articles of that author if there is only one author. If the pelican
configuration states that no overview page of all authors should be generated
we can assume only one author exists and thus not link the author's name in the
article footer.

#62 introduced that the author's name gets linked in the article's footer. this PR here extends on that logic but only creates a link if the pelican configuration does not explicitly state that no all-authors-overview is required (which is understood as only one author exists - thus no need to link the author's name).

Thanks!


Option to stop including the generated files in the current project

I've implemented a number of Typewriter TST files that use settings.OutputFilenameFactory to push the output files into a UI project that is outside the scope of my Visual Studio API project. This works perfectly, except it then create a reference to the generated file in my .csproj file and clutters up my solution with the generated TypeScript. I do get that saving the output outside of the project isn't supported (https://github.com/frhagn/Typewriter/issues/77) but given that it does actually work just fine and the only problem with it is the generated entries in the .csproj file, it would be really great if that generation could be turned off with a setting.

I agree. I use OutputFilenameFactory to generate the code in my Angular project which is in a completely separate directory from my Web API project. This was working fine for me actually until recently. I think VS auto-updated the extension. Now it generates files in the C# project that I have to delete whenever I make a change.
The changelog says that version 1.17
added the "Option not to add generated files to the current project". How do you set that option? Does it still exist?

There's an option to change this behaviour in the Visual Studio Options dialog (Tools > Options and then select Typewriter in the settings tree).

Bah - sorry, I should have looked there before posting. Thanks.


Add dropdown or dropdown menu

🚀 Feature Proposal
would you like add a dropdown component?
This dropdown can trigger by 'click' or 'hover'
Motivation
Nav menu or dropdown menu is common situation for web app

For now it will not happen, you should use Reakit to build one.


SAADC: Multiple channels

The SAADC can have multiple channels, and starting the sample task will result in all channels being read and DMA'd into memory. This is a useful feature and should probably be exposed somehow, but the specifics need to be discussed.
It would most likely interfere with the embedded-hal OneShot trait, so perhaps a MultiShot trait could be proposed?
The SAADC is also dual-rail, so discussion needs to be had regarding how that should be exposed.

Because this feature is hardware dependent, it does not have comply with embedded_hal traits, however its naming conversions should be taken into account not to confuse the user. I don't think MultiShot is a descriptive name - I immediately assumed it would be about multiple samples, which is not the case.
It sounds more like a MultiChanelOneShot trait... or something to give the correct associations.

MultiChannelOneShot sounds good to me, MultiShot is already a protocol in the RC world (and now also a Minecraft thing). I've been busy recently, but I'll try and put aside some time to work on this.

Just wondering if there was more thought on this. Is the lack of activity here also related to the utility of multi channel?


We need to publish the harden src directory for NPM to work

@kriskowal would you be able to publish a new version of @agoric/harden based on this?  The current 0.0.6 is broken.
Without this PR, we get:
Error: Cannot find module '@agoric/harden'. Please verify that the package.json has a valid "main" entry] {
  code: 'MODULE_NOT_FOUND',
  path<EMAIL_ADDRESS>  requestPath: '@agoric/harden'
}

Ah, I can. I need to do a breadth-wise audit to make sure all our packages are fully hybridized too.


Migrate from OpenTracing to OpenTelemetry

This moves the tracing setup from OpenTracing (now deprecated) to OpenTelemetry. The code is vendor agnostic and tracing data is sent over GRPC to the collector as configured in the environment.
Have removed the code in tracetools and inlined the span create and end in bootstrap.
There is a small demo setup of the OpenTelemetry Collector and Jaeger to see traces from the agents locally.
This would very likely break any consumers of the current Datadog based tracing setup as it relies on a running Collector. However, as documented here, it is easy to get it stood up for Datadog.

Thanks very much @rajatvig, that looks fantastic.
I'm hoping we can soon find time to review it, and think about compatibility/migration for existing Datadog/OpenTracing users.

@pda Thanks for looking into it.
There is the option to send the traces to the deployed Datadog Agent as documented here. The endpoint can be configured using OTEL_EXPORTER_OTLP_TRACES_ENDPOINT variable. Ideally, it should be a no-op from that perspective but I don't have a Datadog setup to verify.

It's really exciting.

FYI on the Jenkins OpenTelemetry instrumentation, we tried to use generic attribute names to standardized naming conventions across CI/CD platforms (e.g. ci.pipeline.name,  ci.pipeline.run.id, ci.pipeline.run.result, ci.pipeline.run.url...). Please reach out if you are interested in aligning on the naming conventions and want to evolve some of them.
Do you plan to enable context propagation to downstream build tools exposing the TRACEPARENT and TRACESTATE environment variables in the shell steps (see Otel Spec issue #740 : Environment Variables as Carrier for Inter-Process Propagation to transport context ). It would be great to integrate the traces of build tools like Maven with the trace of BuildKite builds (see OpenTelemetry Maven Extension)

@fatmcgav Are you running the OTLP Collector as well? The error seems to suggest not. The port 4317 is served by the OTLP Collector and that should be configured to export to Jaeger. There is a sample setup of the collector and Jaeger here.

@fatmcgav Are you running the OTLP Collector as well? The error seems to suggest not. The port 4317 is served by the OTLP Collector and that should be configured to export to Jaeger. There is a sample setup of the collector and Jaeger here.

@rajatvig sorry, I should've said that I am using the example OTEL collector included in this PR...

@fatmcgav That seems odd. I just ran it locally and it works with almost the same steps as you outlined. The only difference being I am on a macOS and not on a Linux host. It might have something to do with how docker compose is binding the network.
Will try and run on a Linux machine tomorrow.

@fatmcgav That seems odd. I just ran it locally and it works with almost the same steps as you outlined. The only difference being I am on a macOS and not on a Linux host.

So I've spent a bit more time debugging this one, and was able to get traces into my local Jaeger instance by tweaking bootstrap.go:
diff --git a/bootstrap/bootstrap.go b/bootstrap/bootstrap.go
index 17365239..31249947 100644
--- a/bootstrap/bootstrap.go
+++ b/bootstrap/bootstrap.go
@@ -272,7 +278,12 @@ func (b *Bootstrap) startTracing(ctx context.Context) (trace.Span, context.Conte
        var stopper stopper
        switch b.Config.TracingBackend {
        case "datadog", "otel":
-               client := otlptracegrpc.NewClient()
+               client := otlptracegrpc.NewClient(
+                       otlptracegrpc.WithInsecure(),
+                       otlptracegrpc.WithEndpoint("localhost:4317"),
+                       otlptracegrpc.WithDialOption(grpc.WithBlock()),
+                       otlptracegrpc.WithReconnectionPeriod(time.Second),
+               )
                exporter, err := otlptrace.New(ctx, client)
                if err != nil {
                        b.shell.Errorf("Error creating OTLP trace exporter %s", err)

So it seems like there's some kinda issue with loading the config from env vars, atleast in my env...
I've confirmed that the env vars are set:
❯ env | grep OTEL
OTEL_RESOURCE_ATTRIBUTES=deployment.environment=development
OTEL_EXPORTER_OTLP_ENDPOINT=localhost:4317
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=localhost:4317

@fatmcgav The Go Exporters code here seems to indicate it would derive the options based off the environment variables and that is the reason I did not set them explicitly in the code configuring the exporter.

My thoughts aswell, but it just isn't working for me...
I even went as far as building an agent from this PR, pushing a local docker image and testing on K8s with the relevant OTEL_ env vars set, but still no joy...
Unfortunately setting OTEL_LOG_LEVEL=debug doesn't provide any useful logging either, I'd guess due to the logging setup within the buildkite-agent...

@fatmcgav I am guessing the ENV variables are not getting passed to the Agent process you are running. Maybe add debugging from the Agent to spit out the environment variables it sees. Also, the endpoint does need to be prefixed with http:// else it does not set the insecure option.

@fatmcgav I am guessing the ENV variables are not getting passed to the Agent process you are running. Maybe add debugging from the Agent to spit out the environment variables it sees. Also, the endpoint does need to be prefixed with http:// else it does not set the insecure option.

So my test pipeline runs the following step:
trap 'kill -- $$' INT TERM QUIT; echo 'Hello world!' && env | grep OTEL | sort && sleep 60 && echo 'Done!'

And I can see the following output in Buildkite build log:
Hello world!
--
  | OTEL_EXPORTER_OTLP_ENDPOINT=http://<configured endpoint>
  | OTEL_EXPORTER_OTLP_INSECURE=true
  | OTEL_LOG_LEVEL=debug
  | OTEL_RESOURCE_ATTRIBUTES=deployment.environment=development
  | Done!

The environment variable is OTEL_EXPORTER_OTLP_TRACES_ENDPOINT. In the list you have it is missing TRACES

The environment variable is OTEL_EXPORTER_OTLP_TRACES_ENDPOINT. In the list you have it is missing TRACES

My understanding is that the TRACES value can be used as an override for default endpoint specified by OTEL_EXPORTER_OTLP_ENDPOINT...
Either way, I'm pretty sure I tested both with and without the TRACES in the env name...

Thanks so much @rajatvig @cyrille-leclerc @fatmcgav @cbandy for the thinking, testing and discussion around this.
We've got this queued in our current cycle, so stay tuned for some overdue action on our end 🙏

There is the option to send the traces to the deployed Datadog Agent as documented here.

.. and

Since versions 6.32.0 and 7.32.0, the Datadog Agent supports OTLP traces and metrics ingestion through both gRPC and HTTP.

This is very cool info, I didn't realise the datadog agent now ships with native support for ingestion of OTLP traces.

I was able to get this to work on the elastic stack for buildkite with a bootstrap script by patching /etc/systemd/system/buildkite-agent.service
with Environment="OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4317"
and echo 'tracing-backend=otel' >> /etc/buildkite-agent/buildkite-agent.cfg
And by running an otel collector on the agent.
Looking forward to seeing this merged :)

In #1563 I kinda assumed buildkite-agent would adopt OpenTelemetry. Here's a patch on this PR that is a rough draft of some more fields I would like to see on spans. I am very excited to see this merged, either way! Thank you!
From fc0e463fc21675bc4a5d155b4d4733f104303083 Mon Sep 17 00:00:00 2001
From: John Soo<EMAIL_ADDRESS>Date: Fri, 18 Feb 2022 07:04:20 -0800
Subject: [PATCH] tracing: Add buildkite_{base_branch,pull_request,label}
 attributes.

---
 bootstrap/bootstrap.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/bootstrap/bootstrap.go b/bootstrap/bootstrap.go
index 95e5365c..8d2a8939 100644
--- a/bootstrap/bootstrap.go
+++ b/bootstrap/bootstrap.go
@@ -240,6 +240,7 @@ func (b *Bootstrap) startTracing(ctx context.Context) (trace.Span, context.Conte
 	buildNumber, _ := b.shell.Env.Get("BUILDKITE_BUILD_NUMBER")
 	buildURL, _ := b.shell.Env.Get("BUILDKITE_BUILD_URL")
 	jobURL := fmt.Sprintf("%s#%s", buildURL, b.JobID)
+	pullRequestBaseBranch, _ := b.shell.Env.Get("BUILDKITE_PULL_REQUEST_BASE_BRANCH")
 	source, _ := b.shell.Env.Get("BUILDKITE_SOURCE")
 	label, hasLabel := b.shell.Env.Get("BUILDKITE_LABEL")
 	if !hasLabel {
@@ -288,12 +289,15 @@ func (b *Bootstrap) startTracing(ctx context.Context) (trace.Span, context.Conte
 			attribute.String("buildkite.org", b.OrganizationSlug),
 			attribute.String("buildkite.pipeline", b.PipelineSlug),
 			attribute.String("buildkite.branch", b.Branch),
+			attribute.String("buildkite.pull_request", b.PullRequest),
+			attribute.String("buildkite.pull_request_base_branch", pullRequestBaseBranch),
 			attribute.String("buildkite.job_id", b.JobID),
 			attribute.String("buildkite.job_url", jobURL),
 			attribute.String("buildkite.build_id", buildID),
 			attribute.String("buildkite.build_number", buildNumber),
 			attribute.String("buildkite.build_url", buildURL),
 			attribute.String("buildkite.source", source),
+			attribute.String("buildkite.label", label),
 			attribute.String("buildkite.retry", fmt.Sprintf("%v", retry)),
 			attribute.String("buildkite.parallel", fmt.Sprintf("%v", parallel)),
 			attribute.String("buildkite.rebuilt_from_id", rebuiltFromID),
--
2.34.0

Bumping this, is there anything I can help with to get it over the line and merged?
We've found this data very valuable, and would love to get it into the next release.

Hey friends!
First off, an apology: we haven't given this PR the attention it deserves, and it's languished a bit. We've had competing priorities within the team, but we should've been clearer and more upfront about what was going on within the team. We're working on processes within the team so that we can be better opensource stewards of Agent and Friends, but these things take time.
With that said, wrt. this PR, I have some good news and some bad news.
The good news is that OpenTelemetry support is a high priority for us at the moment. It's clear that this is something that people want in the agent, and they have good reason, so I'm going to be working on adding OpenTelemetry support to the agent over the next couple of weeks.
The bad news is that unfortunately, we won't be able to merge this PR.  The PR is in good shape as it stands, but unfortunately, there are breaking changes in Datadog's behaviour between ingesting OpenTracing traces and OpenTelemetry traces. This means that were we to ship this as is, users currently using the (older) OpenTracing/Datadog integration would see differently shaped traces, and would need to do some extra work to get their Datadog agents.
With that in mind, I'm going to work on a separate PR that includes OpenTelemetry support in such a way that existing workflows aren't broken - likely taking liberal inspiration from this PR.
I'm happy to chat about this in the comments here, otherwise, feel free to get in touch with me on either the Enterprise or Community slacks (@Benno Moskovitz) or via email at<EMAIL_ADDRESS>As a matter of logistics, I'll close this PR 2022-05-06, or once we've reached consensus in the comments, whichever comes later.

Thanks for the update @moskyb, great to hear this is still happening 😃

Thanks for the update @moskyb. Really glad this is moving forward. Am fine closing the PR also long as we get OpenTelemetry support in the Agent

as promised, i'm closing this now. thanks so much for your work @rajatvig!
You can follow along with my reimplementation (you might see some familiar code 👀) in #1630


Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause. In either case, please report this assertion by filing a bug on GitHub:

Steps to Reproduce

Run flutter create bug.
Update the files as follows: ...
...

Expected results:
Actual results:

Logs

I appreciate the help

Hi @Robocast, opening an issue please try to provide
all or some of the information indicated in the template

Issue Template
If you are looking for support, please check out our documentation
or consider asking a question on Stack Overflow:
- https://flutter.dev/
- https://api.flutter.dev/
- https://stackoverflow.com/questions/tagged/flutter?sort=frequent
If you have found a bug or if our documentation doesn't have an answer
to what you're looking for, then fill our the template below. Please read
our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
Steps to Reproduce
Please tell us exactly how to reproduce the problem you are running into.
Please attach a small application (ideally just one main.dart file) that
reproduces the problem. You could use https://gist.github.com/ for this.
If the problem is with your application's rendering, then please attach
a screenshot and explain what the problem is.

1. ...

2. ...

3. ...

Please tell us which target platform(s) the problem occurs (Android / iOS / Web / macOS / Linux / Windows) Which target OS version, for Web, browser, is the test system running? Does the problem occur on emulator/simulator as well as on physical devices?
Target Platform: Target OS version/browser: Devices:
Run your application with `flutter run --verbose` and attach all the
log output below between the lines with the backticks. If there is an
exception, please see if the error message includes enough information
to explain how to solve the issue.
Run `flutter analyze` and attach any output of that command below.
If there are any analysis errors, try resolving them before filing this issue.
Finally, paste the output of running `flutter doctor -v` here.

Closing this issue, since no information has been provided.
Thank you.


Added formula for Caddy HTTP server

https://caddyserver.com

This is open source; could you submit a formula to build this from source instead?

I noticed a trend of binary formulas for open-source projects written in Go that provide binaries online (Consul, Packer). Interestingly not followed for Terraform, another Hashicorp product, but nonetheless thought I'd give it a shot, at the very least to try and determine the impetus behind the trend.

That was our policy before we had standards in place for packaging Go software; these days, we prefer to build it from source. Not all software in this tap has been migrated to building from source in the main repository, but we're not accepting new binary formulae for Go software here where it's practical to build from source. Terraform was submitted more recently than Packer (about a year ago, vs two years ago), so it was after things changed.

Gotcha, thanks for the info. I'll close this and work on a source formula.

Thanks!

If brew follows redirects, you can use any of these URLs to get the latest versions: https://github.com/mholt/caddy/issues/46#issuecomment-100501139
But I guess since you verify the checksum you might want to keep the direct link to the version anyway.


NullPointerException

I'm using your library to push RTMPS stream to AWS IVS service,  most time it works well, thank you very much!
But sometimes, I got a NullPointerException. This is not a must happen issue, details please see the crash log:
   java.lang.NullPointerException: Attempt to invoke virtual method 'byte[] java.lang.String.getBytes(java.lang.String)' on a null object reference         at com.github.faucamp.simplertmp.amf.AmfString.writeTo(AmfString.java:59)         at com.github.faucamp.simplertmp.amf.AmfObject.writeTo(AmfObject.java:58)         at com.github.faucamp.simplertmp.packets.VariableBodyRtmpPacket.writeVariableData(VariableBodyRtmpPacket.java:71)         at com.github.faucamp.simplertmp.packets.Command.writeBody(Command.java:83)         at com.github.faucamp.simplertmp.packets.RtmpPacket.writeTo(RtmpPacket.java:36)         at com.github.faucamp.simplertmp.io.RtmpConnection.sendRtmpPacket(RtmpConnection.java:511)         at com.github.faucamp.simplertmp.io.RtmpConnection.sendConnect(RtmpConnection.java:235)         at com.github.faucamp.simplertmp.io.RtmpConnection.rtmpConnect(RtmpConnection.java:200)         at com.github.faucamp.simplertmp.io.RtmpConnection.connect(RtmpConnection.java:168)         at com.github.faucamp.simplertmp.DefaultRtmpPublisher.connect(DefaultRtmpPublisher.java:21)         at net.ossrs.rtmp.SrsFlvMuxer.connect(SrsFlvMuxer.java:243)         at net.ossrs.rtmp.SrsFlvMuxer.access$100(SrsFlvMuxer.java:53)         at net.ossrs.rtmp.SrsFlvMuxer$2.run(SrsFlvMuxer.java:285)         at java.lang.Thread.run(Thread.java:923)
Thanks again!

@pedroSG94 , this issue always happened when onConnectionFailedRtmp invoked, and need to retry.
`
9103-07 23:38:05.110 25556  7636 I SrsFlvMuxer: frame discarded
9203-07 23:38:05.111 25556  7636 I SrsFlvMuxer: frame discarded
9303-07 23:38:05.130 25556  7632 I SrsFlvMuxer: frame discarded
9403-07 23:38:05.153 25556  6698 D RtmpConnection: connect(): socket connection established, doing handhake...
9503-07 23:38:05.153 25556  6698 D Handshake: writeC0
9603-07 23:38:05.153 25556  6698 D Handshake: writeC1
9703-07 23:38:05.153 25556  6698 D Handshake: writeC1(): Calculating digest offset
9803-07 23:38:05.154 25556  6698 D Handshake: writeC1(): (real value of) digestOffset: 559
9903-07 23:38:05.154 25556  6698 D Handshake: writeC1(): recalculated digestOffset: 1335
10003-07 23:38:05.154 25556  6698 D Handshake: writeC1(): digestOffsetBytes: 0031FFFF
10103-07 23:38:05.154 25556  6698 D Handshake: partBeforeDigest(): size: 1335
10203-07 23:38:05.154 25556  6698 D Handshake: writeC1(): Writing timestamp and Flash Player version
10303-07 23:38:05.154 25556  6698 D Handshake: partAfterDigest(): size: 169
10403-07 23:38:05.154 25556  6698 D Handshake: copying digest offset bytes in partBeforeDigest
10503-07 23:38:05.154 25556  6698 D Handshake: writeC1(): Calculating digest
10603-07 23:38:05.155 25556  6698 D Handshake: writeC1(): writing C1 packet
10703-07 23:38:05.155 25556  6698 D Handshake: readS0
10803-07 23:38:05.163 25556  7632 I SrsFlvMuxer: frame discarded
10903-07 23:38:05.190 25556  7636 I SrsFlvMuxer: frame discarded
14303-07 23:38:05.728 25556  7632 I SrsFlvMuxer: frame discarded
14403-07 23:38:05.751 25556  7636 I SrsFlvMuxer: frame discarded
14503-07 23:38:05.752 25556  7636 I SrsFlvMuxer: frame discarded
14603-07 23:38:05.761 25556  7632 I SrsFlvMuxer: frame discarded
14703-07 23:38:05.765 25556  6698 D Handshake: readS1
14803-07 23:38:05.791 25556  7632 I SrsFlvMuxer: frame discarded
21403-07 23:38:06.871 25556  7636 I SrsFlvMuxer: frame discarded
21503-07 23:38:06.872 25556  7636 I SrsFlvMuxer: frame discarded
21603-07 23:38:06.890 25556  6698 D Handshake: readS1(): S1 total bytes read OK
21703-07 23:38:06.890 25556  6698 D Handshake: writeC2
21803-07 23:38:06.891 25556  6698 D Handshake: readS2
21903-07 23:38:06.891 25556  6698 D Handshake: readS2(): S2 total bytes read OK
22003-07 23:38:06.891 25556  6698 D RtmpConnection: connect(): handshake done
22103-07 23:38:06.892 25556  6698 D RtmpConnection: rtmpConnect(): Building 'connect' invoke packet
22203-07 23:38:06.893 25556  7931 D RtmpConnection: starting main rx handler loop
22303-07 23:38:06.894 25556  7632 I SrsFlvMuxer: frame discarded
224--------- beginning of crash
22503-07 23:38:06.895 25556  6698 E AndroidRuntime: FATAL EXCEPTION: Thread-54
22603-07 23:38:06.895 25556  6698 E AndroidRuntime: Process: com.sktlab.android.veeko, PID: 25556
22703-07  23:38:06.895 25556  6698 E AndroidRuntime:  java.lang.NullPointerException: Attempt to invoke virtual method 'byte[]  java.lang.String.getBytes(java.lang.String)' on a null object reference
22803-07 23:38:06.895 25556  6698 E AndroidRuntime: 	at com.github.faucamp.simplertmp.amf.AmfString.writeTo(AmfString.java:59)
22903-07 23:38:06.895 25556  6698 E AndroidRuntime: 	at com.github.faucamp.simplertmp.amf.AmfObject.writeTo(AmfObject.java:58)
23003-07  23:38:06.895 25556  6698 E AndroidRuntime: 	at  com.github.faucamp.simplertmp.packets.VariableBodyRtmpPacket.writeVariableData(VariableBodyRtmpPacket.java:71)
23103-07 23:38:06.895 25556  6698 E AndroidRuntime: 	at com.github.faucamp.simplertmp.packets.Command.writeBody(Command.java:83)
23203-07  23:38:06.895 25556  6698 E AndroidRuntime: 	at  com.github.faucamp.simplertmp.packets.RtmpPacket.writeTo(RtmpPacket.java:36)
23303-07  23:38:06.895 25556  6698 E AndroidRuntime: 	at  com.github.faucamp.simplertmp.io.RtmpConnection.sendRtmpPacket(RtmpConnection.java:511)
23403-07  23:38:06.895 25556  6698 E AndroidRuntime: 	at  com.github.faucamp.simplertmp.io.RtmpConnection.sendConnect(RtmpConnection.java:235)
23503-07  23:38:06.895 25556  6698 E AndroidRuntime: 	at  com.github.faucamp.simplertmp.io.RtmpConnection.rtmpConnect(RtmpConnection.java:200)
23603-07  23:38:06.895 25556  6698 E AndroidRuntime: 	at  com.github.faucamp.simplertmp.io.RtmpConnection.connect(RtmpConnection.java:168)
23703-07  23:38:06.895 25556  6698 E AndroidRuntime: 	at  com.github.faucamp.simplertmp.DefaultRtmpPublisher.connect(DefaultRtmpPublisher.java:21)
23803-07 23:38:06.895 25556  6698 E AndroidRuntime: 	at net.ossrs.rtmp.SrsFlvMuxer.connect(SrsFlvMuxer.java:243)
23903-07 23:38:06.895 25556  6698 E AndroidRuntime: 	at net.ossrs.rtmp.SrsFlvMuxer.access$100(SrsFlvMuxer.java:53)
24003-07 23:38:06.895 25556  6698 E AndroidRuntime: 	at net.ossrs.rtmp.SrsFlvMuxer$2.run(SrsFlvMuxer.java:285)
24103-07 23:38:06.895 25556  6698 E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:923)
24203-07 23:38:06.896 25556  6698 E CrashReport: Java Crash Happen cause by Thread-54(79031)
24303-07 23:38:06.930 25556  7632 I SrsFlvMuxer: frame discarded
24403-07 23:38:06.949 25556  7636 I SrsFlvMuxer: frame discarded
26603-07 23:38:07.269 25556  7636 I SrsFlvMuxer: frame discarded
26703-07 23:38:07.291 25556  7632 I SrsFlvMuxer: frame discarded
26803-07 23:38:07.324 25556  7632 I SrsFlvMuxer: frame discarded
26903-07 23:38:07.349 25556  7636 I SrsFlvMuxer: frame discarded
27003-07 23:38:07.349 25556  7636 I SrsFlvMuxer: frame discarded
27103-07 23:38:07.359 25556  7632 I SrsFlvMuxer: frame discarded
27203-07 23:38:07.389 25556  7632 I SrsFlvMuxer: frame discarded
27303-07 23:38:07.425 25556  7632 I SrsFlvMuxer: frame discarded
27403-07 23:38:07.428 25556  7636 I SrsFlvMuxer: frame discarded
27503-07 23:38:07.429 25556  7636 I SrsFlvMuxer: frame discarded
27603-07 23:38:07.430 25556  7636 I SrsFlvMuxer: frame discarded
27703-07 23:38:07.460 25556  7632 I SrsFlvMuxer: frame discarded
27803-07 23:38:07.491 25556  7632 I SrsFlvMuxer: frame discarded
27903-07 23:38:07.505 25556  7640 D RtmpConnection: connect(): socket connection established, doing handhake...
28003-07 23:38:07.505 25556  7640 D Handshake: writeC0
28103-07 23:38:07.505 25556  7640 D Handshake: writeC1
28203-07 23:38:07.506 25556  7640 D Handshake: writeC1(): Calculating digest offset
28303-07 23:38:07.506 25556  7640 D Handshake: writeC1(): (real value of) digestOffset: 144
28403-07 23:38:07.506 25556  7640 D Handshake: writeC1(): recalculated digestOffset: 920
28503-07 23:38:07.506 25556  7640 D Handshake: writeC1(): digestOffsetBytes: 00000090
28603-07 23:38:07.506 25556  7640 D Handshake: partBeforeDigest(): size: 920
28703-07 23:38:07.506 25556  7640 D Handshake: writeC1(): Writing timestamp and Flash Player version
28803-07 23:38:07.506 25556  7640 D Handshake: partAfterDigest(): size: 584
28903-07 23:38:07.506 25556  7640 D Handshake: copying digest offset bytes in partBeforeDigest
29003-07 23:38:07.506 25556  7640 D Handshake: writeC1(): Calculating digest
29103-07 23:38:07.506 25556  7640 D Handshake: writeC1(): writing C1 packet
29203-07 23:38:07.506 25556  7640 D Handshake: readS0
29303-07 23:38:07.509 25556  7636 I SrsFlvMuxer: frame discarded
29403-07 23:38:07.510 25556  7636 I SrsFlvMuxer: frame discarded
29503-07 23:38:07.522 25556  7632 I SrsFlvMuxer: frame discarded
29603-07 23:38:07.561 25556  7632 I SrsFlvMuxer: frame discarded
29703-07 23:38:07.588 25556  7636 I SrsFlvMuxer: frame discarded
29803-07 23:38:07.589 25556  7636 I SrsFlvMuxer: frame discarded
29903-07 23:38:07.589 25556  7636 I SrsFlvMuxer: frame discarded
30003-07 23:38:07.590 25556  7632 I SrsFlvMuxer: frame discarded
`

I see. Aparently when you do a retry AWS server send response to connect packet with an unexpected body.
Is possible to provide me an endpoint to AWS server to test it? You can send me info by email to keep it private:
<EMAIL_ADDRESS>If you can't. A full connection packet info using wireshark could be useful to detect the different beetween normal connection and retry connection.

@pedroSG94 , sent the endpoint to you via email, thanks!

Thank you, I'm trying to reproduce it.

I did around 100 test but I can't reproduce it. Basically I'm opening default example, connect to endpoint, disable wifi and enable wifi to simulate a retry by internet lost.
Do you have any tips to reproduce it?
Is it a rare error and this is difficult to reproduce?

@pedroSG94 , from my side, it's a low rate error, but not rare. I think it may caused by the special network environment in China. And this issue always happens during connecting with multi-times retry. For example, connecting -> retry -> retry -> retry -> occur.

@pedroSG94 , I tested by disable wifi and enable wifi, crashed again, but not NullPointerException this time, I attach the log here, could you please take a look? Thanks!
crash.log

And I found every time, if appear connect failed reason Error configure stream, publish permitted failed, after several times re-connect, crash will happen.

This error right?:
java.lang.IllegalArgumentException: Unknown message type byte: A5
        at com.github.faucamp.simplertmp.packets.RtmpHeader$MessageType.valueOf(RtmpHeader.java:149)
        at com.github.faucamp.simplertmp.packets.RtmpHeader.readHeaderImpl(RtmpHeader.java:234)

I can't reproduce it. I don't know how are you doing to produce this crash. Are you using the same endpoint that you shared me?
Also before this crash you receive this multiple times:
E/RtmpConnection: Error
    java.io.IOException: Invalid RTMP protocol version; expected 3, got 2

This error is produced in handshake because you received a bad response for S0. This could cause the problem reading packets in the future and produce that crash.
Also handshake is called multiple times without wait for the rest of connection packets before that error with handshake is produced.
I'm not sure how to reproduce it. Can you show me your retry code?
Are you able to reproduce this error in my app example?

@pedroSG94 , this issue is not a must happen issue, and I think it's may related to network environment. I also cannot reproduce it recent days. I will try to capture more logs in the future, if it happen again.

Hello,
I think that I found the reason about this error and I fixed it here:
https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/commit/a049b6f167cd3008a7e059dbecc1ba160b5405da#diff-bf2708a3b0cf12a3553fe9bea6287e7a2717379f051b139b9d8f66c5087169abL225
swfUrl or pageUrl could be null but the value is always "" so I replaced variable by value in order to avoid npe.
Please, update library and report me if you have any problem in the future with this error.

@pedroSG94 it's very appreciate!


Add unicode plots

Support for unicode plots in the REPL

Support for unicode plots in the REPL
Update to stable version 1.0.0


Using auto imported function not working when using directly in template tag vue

Hi,
We have created a nice function that helps replicate require function we were using in vue 2 (without vite). It let us load the images by just:

Unfortunately, using this function directly in the template tag isn't workfing. We need to use it in script setup like below:
{
  name: 'John doe',
  avatar: dynamicImgImport('@/assets/../img.jpg'),
}

Morever, below is function we created:
// 👉 Dynamically import images
export const dynamicImgImport = (imageURL: string) => {
  const [img_path, ext] = imageURL.split('@/')[1].split('.')

  return new URL(`../../${img_path}.${ext}`, import.meta.url).href
}

However, this don't provide autocompletion when writing path. IG, great mind like yours can improve it and create replica of require in vite.
Why?
It will help writing less code:
- import avatar1 from<EMAIL_ADDRESS>- import avatar2 from<EMAIL_ADDRESS>- import avatar3 from<EMAIL_ADDRESS>- import avatar4 from<EMAIL_ADDRESS>- import avatar5 from<EMAIL_ADDRESS>
-
-
-
-
-

+
+
+
+
+

Have you enabled vueTemplate? Please always provide reproductions.


Support for COMMIT_HASH in asset paths

Thank you for your excellent gem!
This patch makes it a lot easier to use CloudFront, which is terrible about expiring existing assets, and it does so in a way that should be compatible with Heroku.
Please let me know if you have any questions or if you would like any changes. Thank you!

@kmamykin I can't get your branch to work. I keep getting:
Error message:
uninitialized constant Rails::Railtie
Backtrace:
#	File	Line	Location
0<EMAIL_ADDRESS>466	in `load_missing_constant'
1<EMAIL_ADDRESS>106	in `rake_original_const_missing'
2<EMAIL_ADDRESS>36	in `const_missing'
3<EMAIL_ADDRESS>12

Does your fork not support Rails 2.3?

I have not tested on rails 2.3, and apparently it does not work.
Feel free to submit a separate pull request. I am not actively using jammit-s3 anymore, switched to assets pipeline.

@kmamykin cool thanks. Yeah same here, was just trying to retrofit this onto an old app I didn't feel like updating. I probably might as well upgrade it at this point.

OK, this PR is almost half a decade old, so I'm assuming it's obsolete. :-) Closing it.


:passport_control: Run Travis tests with docker-compose

:rocket: deployed to http://profiles-pr-15.dev.c2s.nhschoices.net

Coverage remained the same at 95.05% when pulling 866ce123e20b8ce07f278bfabcff0b1fcbc09bd9 on feature/docker-compose-travis-tests into 8cc9483b39178351d115b4761417538fab215fb3 on feature/remove-profiles.

:rocket: deployed to http://profiles-pr-15.dev.c2s.nhschoices.net

Coverage remained the same at 95.05% when pulling a7c7b7e2a7601635334e58ea2d8a5fbfa4141b81 on feature/docker-compose-travis-tests into 8cc9483b39178351d115b4761417538fab215fb3 on feature/remove-profiles.

:rocket: deployed to http://profiles-pr-15.dev.c2s.nhschoices.net

Coverage remained the same at 95.05% when pulling 999ca697c1729459e1211670dbbb8a36216fcc9b on feature/docker-compose-travis-tests into 8cc9483b39178351d115b4761417538fab215fb3 on feature/remove-profiles.

:rocket: deployed to http://profiles-pr-15.dev.c2s.nhschoices.net

Coverage remained the same at 95.05% when pulling b5eba8a41db36aee11b390e2fa37e0888374030e on feature/docker-compose-travis-tests into 8cc9483b39178351d115b4761417538fab215fb3 on feature/remove-profiles.


Improved accessibility

using firefox for detecting issues is great

@OpenSourceSimon whats left to do for this PR to be merged

@OpenSourceSimon whats left to do for this PR to be merged

Nothing less than merge conflicts

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

I'll do this again a later time. There are so much changes that merging the conflicts will take longer than searching for new improvements.


Allow hook for Auth::currentUser()

When getting the current user via the auth route, I would like to add the user's roles to the reply.
I can add a hook to Auth::doLogin() to do this, but I cannot for Auth::currentUser().
I can submit a pull request if it makes things easier.
Thanks

Hi @nloyola ,
thank you for your request. You are right - we should make that function hookable! If you mind becoming an official "contributor" of this module, I would be glad if you can submit a pull request for that.
I actually needed something similar for my app-project. You can overwrite the auth GET route to output custom user data. In my case, i wanted to return the user's roles and permissions. Have a look at my Routes.php and GeneralApi.class.php to see how I have done that.

Thanks for showing me your code @Sebiworld. I will definitely use something similar with the code I'm working with.
Pull request coming shortly.

Pull request in #42.

v1.3.2 with your pr is now out - sorry for the delay and thank you for making AppApi better!


QuickFields inside a  leading to "Aw Snap" crash in Chrome.

First of all thanks for the awesome package.
Whenever I put two afQuickFields inside a table I quickly get a "Aw Snap" blue screen in Chrome 40.  Meteor <IP_ADDRESS>, Autoform 4.2.2.  Glad to show the rest of the code, but the problem happens if I simply do this (inside a bootstrap "panel"), and ceases to happen if I remove the table and leave the fields alone.
{{#autoForm id=this._id collection="Services" type="update" doc=this template="bootstrap3-horizontal" autosave=true }}
table width="100%"
tr
td  {{> afQuickField name='x1' }}  /td
td  {{> afQuickField name='x2' }}  /td
/tr
/table

@mgruen, I can't reproduce against devel brach of autoform, so it is either fixed or you'll need to provide a full reproduction. Goal is to have the next autoform release out shortly.

AutoForm 5.0 is released. If you still have this issue after updating, post a simple reproduction app and I will reopen.


Build error

Hello,
I tried using tcmalloc in the federation example. https://github.com/tolikzinovyev/federation-hello
However, I get this error.
ERROR: /home/t/Downloads/federation-hello/bazel-hello/BUILD:44:10: error loading package '@com_github_google_tcmalloc//tcmalloc': in /home/t/.cache/bazel/_bazel_t/40a7e858559aee825a7420c20cc89de2/external/rules_fuzzing/fuzzing/cc_defs.bzl: in /home/t/.cache/bazel/_bazel_t/40a7e858559aee825a7420c20cc89de2/external/rules_fuzzing/fuzzing/private/fuzz_test.bzl: in /home/t/.cache/bazel/_bazel_t/40a7e858559aee825a7420c20cc89de2/external/rules_fuzzing/fuzzing/private/binary.bzl: in /home/t/.cache/bazel/_bazel_t/40a7e858559aee825a7420c20cc89de2/external/rules_fuzzing/fuzzing/instrum_opts.bzl: Unable to find package for @rules_fuzzing_oss_fuzz//:instrum.bzl: The repository '@rules_fuzzing_oss_fuzz' could not be resolved. and referenced by '//:hello_main'

Am I doing something wrong? Thanks.

This might be more appropriately filed as a bug with the Abseil Federation project.

Same issue occurred for me. I resolved it by copying the repository definition from tcmalloc's WORKSPACE to my own one.
https://github.com/google/tcmalloc/blob/master/WORKSPACE#L51-L65


drivers: flash: nrf: Support reading secure flash from nonsecure

Support reading secure flash from nonsecure.
Signed-off-by: Sebastian Bøe<EMAIL_ADDRESS>

@sigvartmh, this feels like a quick hack. Is there no routine in the tfm subsystem to find out if a region belongs to a secure area ? Then it could just check this and based on the result do the proper read. It would not rely on any information from the dts.

@sigvartmh, if the above is not possible, maybe it is possible to always call tfm_platform_mem_read() when executing from a non-secure image.

@Laczen From my understanding of TF-M tfm_core_has_read_access_to_region is only to be used internally within TF-M and not by a non-secure application but non-secure partition within TF-M. Someone with a deeper understanding of TF-M may correct me on this.
I would assume calling tfm_platform_mem_read always would be expensive compared to just doing 	memcpy(data, (void *)addr, len);. So doing it for every call to read would really hurt performance.

@Laczen From my understanding of TF-M tfm_core_has_read_access_to_region is only to be used internally within TF-M and not by a non-secure application but non-secure partition within TF-M. Someone with a deeper understanding of TF-M may correct me on this.

OK,

I would assume calling tfm_platform_mem_read always would be expensive compared to just doing  memcpy(data, (void *)addr, len);. So doing it for every call to read would really hurt performance.

Maybe, but a image is rarely reading it's own information. So in practice there is no real performance reduction. It would only reduce performance if there would be multiple non-secure locations. And even in this case it is an assumption that tfm_platform_mem_read() is expensive.

You are correct in all assumptions @sigvartmh .
This is not a hack unfortunately.
Usually, if the non-secure needs to access secure flash, that flash would
simply be marked as non-secure instead.
But due to HW limitations we don't have infinite granularity to segment the flash,
so sometimes we need to do this trick to give non-secure access to a small part
of a big segment of flash.
Also, HW limitations can prevent certain flash-like addresses from being marked as non-secure even if we had
enough granularity available (FICR).

All secure service calls have an overhead of 200us.
The assumption that it is expensive is correct.

@SebastianBoe, the "optimisation" to do a memcpy() instead of a tfm_platform_mem_read() might in practice never be required. So this "optimisation" might be unnecessary and the code would be smaller, cleaner and not rely on any dts definitions.

Maybe, but an image is rarely reading its own information

@Laczen This is also an assumption. I mean an image copy in MCUBoot would read its own information quite often. It really depends on your application. By separating it out with boundary checks you would ensure that `tfm_platform_mem_read()´ is only called when you are reading information which is outside the specified range of the non-secure image.

Maybe, but an image is rarely reading its own information

@Laczen This is also an assumption. I mean an image copy in MCUBoot would read its own information quite often. It really depends on your application and use-case. By separating it out with boundary checks you would ensure that `tfm_platform_mem_read()´ is only called when you are reading information that is outside the specified range of the non-secure image.

An image copy in mcuboot is not reading its information quite often. The only case I know where a image reads itself is to access its header.

Maybe, but an image is rarely reading its own information

@Laczen This is also an assumption. I mean an image copy in MCUBoot would read its own information quite often. It really depends on your application and use-case. By separating it out with boundary checks you would ensure that `tfm_platform_mem_read()´ is only called when you are reading information that is outside the specified range of the non-secure image.

An image copy in mcuboot is not reading its information quite often. The only case I know where a image reads itself is to access its header.

I'm sorry I may have misunderstood what you are purposing. I thought you were suggesting to replace every call to memcpy  with tfm_platform_mem_read which would mean that every call to https://github.com/mcu-tools/mcuboot/blob/10a877cb7610422758ab9ec256dd00cc62d14d45/boot/bootutil/src/loader.c#L968 would have a penalty added of at least 200us
Can you explain your idea more clearly?

^^ @sigvartmh I actually was going to write about this execution overhead.

@sigvartmh, only in case of CONFIG_ARM_NONSECURE_FIRMWARE.

@Laczen : Are you proposing that for NON_SECURE we have an overhead of 200us to save 15 bytes of flash in the driver?
Please clarify what you are proposing.

@sigvartmh, only in case of CONFIG_ARM_NONSECURE_FIRMWARE.

Sure but what if my non-secure image is doing copying/transfers? It would have pretty high penalties. You are making assumptions about other peoples use-cases to front your point. I see that using MCUBoot as a use-case is flawed since it won't be using this configuration but my point is that there exists real use-cases were reading your own information is quite real.

@Laczen : Are you proposing that for NON_SECURE we have an overhead of 200us to save 15 bytes of flash in the driver?
Please clarify what you are proposing.

An overhead for what ? As said, when is an image reading itsself trough the flash interface?

It's a public API. So I can't know of all usages.
/**
 *  @brief  Read data from flash
 *
 *  All flash drivers support reads without alignment restrictions on
 *  the read offset, the read size, or the destination address.
 *
 *  @param  dev             : flash dev
 *  @param  offset          : Offset (byte aligned) to read
 *  @param  data            : Buffer to store read data
 *  @param  len             : Number of bytes to read.
 *
 *  @return  0 on success, negative errno code on fail.
 */

It's a public API. So I can't know of all usages.

True, but it's not that it's not possible anymore, it has a penalty in this very specific case. Suppose someone is encountering this and has a problem with the penalty (e.g. some tool is adding some information at the end of the image that needs to be accessed quite often). Is there a work around this penalty: yes, instead of using the API it can just do a memcpy() instead of using the API. BTW this is what I would do if I need to access data often in the region I am executing from right from the start.
There is a penalty for the proposed solution as well, importing properties from the dts, relying on a the dts to get the name of the non-secure region from a partition name. This makes the code unmaintanable.

but it's not that it's not possible anymore, it has a penalty in this very specific case.

Actually, the tfm_mem_read API does not support addresses in the non-secure domain. So it would break any user
that was reading the non-secure domain in this API.

but it's not that it's not possible anymore, it has a penalty in this very specific case.

Actually, the tfm_mem_read API does not support addresses in the non-secure domain. So it would break any user that was reading the non-secure domain in this API.

OK, and it does this with a specific error ?

Good question, but let's assume for the argument that a reasonable error code is returned.
If we were to remove the memcpy, we would break any user that is currently using this API to read the non-secure domain.
Surely we don't want to do that just to save 15 bytes of flash?
It would also require an API change. e.g. documenting that the flash read API is not to be used to read flash
from one's own image when the image is a NON_SECURE image. Which I assume we also don't want to do.

There is a penalty for the proposed solution as well, importing properties from the dts, relying on a the dts to get the name of the non-secure region from a partition name. This makes the code unmaintanable.

If you have a proposal for supporting reading secure flash without relying on DT then that would be welcome.

Good question, but let's assume for the argument that a reasonable error code is returned.
If we were to remove the memcpy, we would break any user that is currently using this API to read the non-secure domain.
Surely we don't want to do that just to save 15 bytes of flash?
It would also require an API change. e.g. documenting that the flash read API is not to be used to read flash from one's own image when the image is a NON_SECURE image. Which I assume we also don't want to do.

If it returns a reasonable error (it will do some address checking before doing anything else so it will come with minor performance influence) the code could be (in case of NON_SECURE and WITH_TFM): try the tfm_read_, if it fails continue with the memcpy. There would not be any savings of 15 bytes, but the dependency on dts (and partition name) would be removed. And the solution would be valid for multiple non-secure regions.
Probably the support for tfm could benefit from defining memory regions in the dts with their properties (secure/insecure, ...) and some helper macro's that would allow the retrieval of a memory range property. I can understand this is a huge task, but in the end it might be the best solution.

(it will do some address checking before doing anything else so it will come with minor performance influence)

The address checking will be done on the secure side after the 200us overhead of executing a secure service has been
incurred. 200us is not a minor perfomance issue on our nRF SoCs.
IMHO relying on DT for partition information (which is what it is for?), is an acceptable cost to pay for saving 200us
on every call like this.

(it will do some address checking before doing anything else so it will come with minor performance influence)

The address checking will be done on the secure side after the 200us overhead of executing a secure service has been incurred. 200us is not a minor perfomance issue on our nRF SoCs.

If the penalty is there then indeed it might not be a good idea to try and fallback.

IMHO relying on DT for partition information (which is what it is for?), is an acceptable cost to pay for saving 200us on every call like this.

I'm not saying it is bad to rely on DT, what is bad is the one to one mapping of secure/non-secure to partitions. Let's take the example of mcuboot images. These images consist of a header and a image. The header should really be a secure item (regardless of the image). At the moment this cannot be done because of the one-to-one mapping (because it is used by the bootloader to know where to place the image). A better solution would be to separate secure/non-secure from partitions because they have different objectives.

and what is also bad is relying on the partition name. It should be a partition property.

The longer I look at this PR the more it feels like a hack:
a. A soc-independent routine is inserted inside a soc-specific file, this can't be the correct place.
b. The derivation of the area from the dts to determine what to do, while this should be available as a soc-independent routine.

a. A soc-independent routine is inserted inside a soc-specific file, this can't be the correct place.

tfm_platform_mem_read is not soc-independent. In hindsight naming it tfm_nrf_mem_read would have made this clearer.
There is no soc-independent API for reading secure flash unfortunately.

b. The derivation of the area from the dts to determine what to do, while this should be available as a soc-independent routine.

It would be great if this was available, but until it is available I can only use what is available.

a. A soc-independent routine is inserted inside a soc-specific file, this can't be the correct place.

tfm_platform_mem_read is not soc-independent. In hindsight naming it tfm_nrf_mem_read would have made this clearer.
There is no soc-independent API for reading secure flash unfortunately.

b. The derivation of the area from the dts to determine what to do, while this should be available as a soc-independent routine.

It would be great if this was available, but until it is available I can only use what is available.

In that case I completely misunderstand the idea behind tfm.

@SebastianBoe
Doesn't the routine tfm_hal_memory_has_access() give the required information if the region can be read by the non-secure image (allowing the memcpy)?
The routine tfm_platform_mem_read() is at the moment only implemented for nordic devices, but other platforms could use the same method, this would make it a soc-independent routine. This would allow it to be handled by a higher level than the nordic driver. Of course this would create a new problem as not all platforms support this routine, which means it needs to be surrounded by some platform check. A platform check is needed anyhow because a new nordic device that uses the current flash driver but does not (yet) have the tfm_platform_mem_read() defined wil fail.
BTW is it really a good idea to provide this functionality ? I guess it is good to avoid a restart if a non-secure device tries to read secure flash, but this is just a check for allowed access, not performing a read.

^^ I think that was for a secure flash readout driver. Of course this would be oft of this PR focus. I'm not convinced to such an idea - but I didn't made serious analyze on that so far as well.

^^ Indeed, I was asking about the functionality to provide read-access for secure flash area from non-secure image.

I see. Well, I can assure you it is a good idea.
Note that the service does not give access to any secure memory, the permitted memory ranges are defined in tfm_read_ranges.h.
For instance:
static const struct tfm_read_service_range ranges[] = {
#ifdef PM_MCUBOOT_ADDRESS
	/* Allow reads of mcuboot metadata */
	{ .start = PM_MCUBOOT_PAD_ADDRESS, .size = PM_MCUBOOT_PAD_SIZE },
#endif
	{ .start = FICR_INFO_ADDR, .size = FICR_INFO_SIZE },
#if defined(FICR_NFC_TAGHEADER0_MFGID_Msk)
	{ .start = FICR_NFC_ADDR, .size = FICR_NFC_SIZE },
#endif
	{ .start = FICR_RESTRICTED_ADDR, .size = FICR_RESTRICTED_SIZE },
#if defined(FICR_XOSC32MTRIM_SLOPE_Msk)
	{ .start = FICR_XOSC32MTRIM_ADDR, .size = FICR_XOSC32MTRIM_SIZE },
#endif
};

I'm not familiar with MCUBoot. But the FICR addresses are about the non-secure image
having access to calibration data that is encoded in the FICR.
Usually, if the non-secure image needs access to some secure memory that memory will
be defined as non-secure instead.
But FICR for instance is unfortunately HW architecturally impossible to configure as non-secure.
So we need to give access to the callibration data through this service instead.

I see. Well, I can assure you it is a good idea.
Note that the service does not give access to all secure memory, the permitted memory ranges are defined in tfm_read_ranges.h.
For instance:
static const struct tfm_read_service_range ranges[] = {
#ifdef PM_MCUBOOT_ADDRESS
	/* Allow reads of mcuboot metadata */
	{ .start = PM_MCUBOOT_PAD_ADDRESS, .size = PM_MCUBOOT_PAD_SIZE },
#endif
	{ .start = FICR_INFO_ADDR, .size = FICR_INFO_SIZE },
#if defined(FICR_NFC_TAGHEADER0_MFGID_Msk)
	{ .start = FICR_NFC_ADDR, .size = FICR_NFC_SIZE },
#endif
	{ .start = FICR_RESTRICTED_ADDR, .size = FICR_RESTRICTED_SIZE },
#if defined(FICR_XOSC32MTRIM_SLOPE_Msk)
	{ .start = FICR_XOSC32MTRIM_ADDR, .size = FICR_XOSC32MTRIM_SIZE },
#endif
};

I'm not familiar with MCUBoot. But the FICR addresses are about the non-secure image having access to calibration data that is encoded in the FICR.
Usually, if the non-secure image needs access to some secure memory that memory will be defined as non-secure instead.
But FICR for instance is unfortunately HW architecturally impossible to configure as non-secure. So we need to give access to the callibration data through this service instead.

I see, but I still think it is a hack. It is good to be able to read the secure flash to access information in the FICR, but IMO it is not a good idea to integrate this in the flash driver. At the moment there is already the possibility to access this data calling tfm_platform_mem_read(), I don't see any benefit from adding this to the flash interface. At the moment the flash interface is clean, calling flash_read or flash_write from the non-secure image wil fail when trying to access secure memory. When the PR is added it is not so clear anymore: a read wil succeed if done on certain areas but will fail otherwise. And what should be done for the write ?

BTW, if it is wanted to avoid a "hard" action when a non-secure image tries to read/write outside of the allowed boundaries a check for this (using the dts information) could be added to the flash interface.

I see, but I still think it is a hack. It is good to be able to read the secure flash to access information in the FICR, but IMO it is not a good idea to integrate this in the flash driver. At the moment there is already the possibility to access this data calling tfm_platform_mem_read(), I don't see any benefit from adding this to the flash interface. At the moment the flash interface is clean, calling flash_read or flash_write from the non-secure image wil fail when trying to access secure memory. When the PR is added it is not so clear anymore: a read wil succeed if done on certain areas but will fail otherwise. And what should be done for the write ?

Perhaps there is some portable code that is using flash_read to read MCUBoot metadata and we want it to continue to be able to do so even when built with TF-M ?

Perhaps there is some portable code that is using flash_read to read MCUBoot metadata and we want it to continue to be able to do so even when built with TF-M ?

Probably not, I can't even find it in the ranges definitions (retried it after west update).

Perhaps there is some portable code that is using flash_read to read MCUBoot metadata and we want it to continue to be able to do so even when built with TF-M ?

Probably not, I can't even find any MCUBoot section in the ranges definitions (retried it after west update).

Might be related to CONFIG_BOOT_SHARE_DATA MCUboot's option

Perhaps there is some portable code that is using flash_read to read MCUBoot metadata and we want it to continue to be able to do so even when built with TF-M ?

Probably not, I can't even find any MCUBoot section in the ranges definitions (retried it after west update).

Might be related to CONFIG_BOOT_SHARE_DATA MCUboot's option

Maybe, but I can't find any ranges definition with any reference to this. Maybe there is in ncs, but not in zephyr.
And also don't forget: to use the flash read routines the non-secure image needs to know in advance what regions (with fixed locations !) can be read. If the non-secure image already knows this in advance, it can call the required routine memcpy or ... directly.

I'm closing this PR in favour of seeing if this can be solved using TF-Ms FWU APIs instead to keep it more in line with the suggestions of @Laczen as it seems to have less of a use-case than I thought.
One use-case I can come up with is that you have a file system in the secure flash area that is read-only from non-secure but I also think you could solve this in a different way.

@sigvartmh, the use case of a file system in the secure flash area is indeed one of the use cases that is not covered at the moment.
For littlefs this could be solved by creating a cfg that uses the TF-M FWU API to support a read-only fs.
For nvs (and fcb) at the moment this would not work. I am thinking of reworking nvs so that it could use a similar method like the littlefs cfg to configure the access to flash, in that case the same method could be used as for littlefs. Do you think there is sufficient need to do this ?

I haven't heard of anyone using the FS in this way so I don't think there is an urgent need to rework NVS/FCB. Sounds like a good idea to make it configuration.


Rss widget

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

Add RSS widget

Screenshot

Fixes #654 and #232

Some feeds to test:
https://rss.nytimes.com/services/xml/rss/nyt/World.xml
http://rss.cnn.com/rss/edition.rss
https://partner-feeds.beta.20min.ch/rss/20minuten
https://www.bmi.bund.de/DE/service/rss-newsfeed/function/rssnewsfeed-pressemitteilungen.xml;jsessionid=C1C89DBDAEB9C8DAD90A0AC24E78735A.2_cid364

Is the blur on purpose or custom css ?

Also why not use the MediaDisplay (make your own RssMediaDisplay variant) component there too ? It would unify how out cards look across the board

On purpose. I think it looks really cool and gives a slight accent to the news.

Also why not use the MediaDisplay (make your own RssMediaDisplay variant) component there too ? It would unify how out cards look across the board

Because the media display is bloated with bad code and needs refactoring

Also why not use the MediaDisplay (make your own RssMediaDisplay variant) component there too ? It would unify how out cards look across the board

Because the media display is bloated with bad code and needs refactoring

It's not bloated, it's just super big and modular to avoid code duplication

Do we not support multiple sources ?

Uhhh.....

I don't think this is "super big and modular to avoid code duplication"

Uhhh.....
I don't think this is "super big and modular to avoid code duplication"
Then how do we do conditional rendering based on the presence of a parameter ?

Uhhh.....
I don't think this is "super big and modular to avoid code duplication"

Then how do we do conditional rendering based on the presence of a parameter ? I'm not sure what the best approach is

It should not be handled in the common factor then. I suggest you to read a few articles about inheritance in programming, and when you put things in the same class / component.
The procedure is actually the same over all programming languages, regardless if they are UI / logic.
In my opinion, the media card should only contain the common factor.
Since React does not have any complex inheritance system, I'd say that we offload components, that differ, to their corresponding place (eg. widget, ...)

So only one feed is supported ? I saw you had multiple ones before, is there a way to add this back ?

No, this was not with this widget. Having multiple feeds is complicated, as feeds have a different structure and data would have to be condensed to properly process it. I think we can implement the possibility for multiple feeds in a later update.


Missing elements in Composite SLA calculation formula for HA scenario

[Enter feedback here]
The Composite SLA Calculator formulae look to be incorrect. I'm sure the intent is correct - that composing 2x 99.95% SLAs in a HA environment raises the SLA, but if you follow the formula given it shows a reduction in the SLA rather than an increase.
The Formula in question:
The combined SLA for two regions = (1 − (0.9995 ^ 2)) = 99.999975%
If you raise 0.9995 to the power 2, you get 0.999. Subtract this from 1 and you get 0.001.
To arrive at the numbers you're suggesting should come from this formula (assuming they are correct?), should the formula not be:
(1-0.9995)^2 = 99.999975%
This it's just a parenthesis placement issue.

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

ID: 475fbe98-a5a8-7df3-9f9a-8e76f56aead8
Version Independent ID: b9512213-b16d-a00a-7598-b78497eca2f6
Content: Designing resilient applications for Azure
Content Source: docs/resiliency/index.md
Service: architecture-center
GitHub Login: @MikeWasson
Microsoft Alias: pnp

Managed to make the update myself as a Pull Request (my first ever, so hopefully I got it right :D)


how do we go about changing the Grafana server settings?  I can't seem to locate the grafana.ini or custom.ini to make a dashboard public?

I have searched my Rpi4 up and down and cant find the file for changing grafana server settings like the ones below.  I am trying to make my dashboard public and i am unable to change the settings to make this happen.  The goal is to add this info to my magic mirror using the linked module https://github.com/SvenSommer/MMM-GrafanaChart
[auth.anonymous]
enable anonymous access
enabled = true
specify role for unauthenticated users
org_role = Viewer
[security]
https://grafana.com/docs/grafana/latest/installation/configuration/#allow-embedding
allow_embedding = true

You won't find the config anywhere on your Raspberry OS.
Grafana runs as a docker container and therefore these files are within the container.
You can check this by looking for your grafana docker container id by using: docker ps
And then connect to the shell within this container: docker exec -it [container_id] sh
If you want to change this longer term, then it's probably best to change the docker-compose.yml in a way that you have a the required .ini file in a host system folder and you bring it into the container.
But I suspect you will need to read up a bit on how docker containers are being build by docker-compose.

Disregard parts of my earlier comment.
I think you should just try to change settings in the file grafana-config.monitoring.j2 in the folder templates and re-run the playbook. This will change the settings in the Grafana docker container for you.
Add the following GF_AUTH_ANONYMOUS_ENABLED=true and it should allow anonymous access.
For any other changes, you probably find the guidance on the grafana community.
For example, to allow anonymous access: https://community.grafana.com/t/anonymous-authentification-in-a-docker-container/17725

This was exactly what I needed. Thank you!


Draft: tracing integration (#213)

Synopsis
#213
Solution
Implement tracing integration under tracing feature. Writers integrations will be done in separate PRs.
Checklist

Created PR:

[x] In draft mode
[x] Name contains Draft:  prefix
[x] Name contains issue reference
[x] Has assignee

[x] Documentation is updated (if required)
[x] Tests are updated (if required)
[x] Changes conform code style
[x] CHANGELOG entry is added (if required)
[ ] FCM (final commit message) is posted

[ ] and approved

[ ] Review is completed and changes are approved
Before merge:

[ ] Milestone is set
[ ] PR's name and description are correct and up-to-date
[ ] Draft:  prefix is removed
[ ] All temporary labels are removed

@tyranron
Current integration looks like this:

Basically we now run each scenario in tracing::Span, intercept traces, lookup in which Scenario it was done, emit event::Scenario::Log and each Writer does it's job. writer::Basic outputs Scenario's logs only when Scenario is outputted to simplify debugging.
The only question remains: what to do with traces that aren't attached to special tracing::Span? This can happen when spawn(async { ... }) is done or logging from background task.
We can:

Ignore them entirely
Emit them all at the end
Duplicate for each running Scenario with event::Scenario::Log and special flag.
Emit event::Cucumber::Log (not event::Scenario::Log) and let the Writer decide.

Strangely enough, but I would go with option number 3, as it gives the most flexibility. And each Writer can decide on their own, whether to write or skip those traces.

@tyranron

Strangely enough, but I would go with option number 3, as it gives the most flexibility. And each Writer can decide on their own, whether to write or skip those traces.

To illustrate my proposal more, if we change function from
#[given(regex = r"(\d+) secs?")]
#[when(regex = r"(\d+) secs?")]
#[then(expr = "{u64} sec(s)")]
async fn step(world: &mut World, secs: CustomU64) {
    tracing::info!("before waiting {secs}s");
    time::sleep(Duration::from_secs(*secs) / 2).await;
    tracing::info!("in between waiting {secs}s");
    time::sleep(Duration::from_secs(*secs) / 2).await;
    tracing::info!("after waiting {secs}s");

    world.0 += 1;
    assert!(world.0 < 4, "Too much!");
}

to
#[given(regex = r"(\d+) secs?")]
#[when(regex = r"(\d+) secs?")]
#[then(expr = "{u64} sec(s)")]
async fn step(world: &mut World, secs: CustomU64) {
    tracing::info!("before waiting {secs}s");
    time::sleep(Duration::from_secs(*secs) / 2).await;
    // Not attached to current `Span`.
    tokio::spawn(async move {
        tracing::info!("in between waiting {secs}s");
    });
    time::sleep(Duration::from_secs(*secs) / 2).await;
    tracing::info!("after waiting {secs}s");

    world.0 += 1;
    assert!(world.0 < 4, "Too much!");
}

We'll get following output:

For @serial Scenarios everything is the same except for missing scenario Span in output, but for concurrently run Scenarios we see all in between waiting ... messages.

@ilslv also, is it possible to reasonable feature-gate this tracing integration? I believe most of the time people won't need it, so we can avoid increasing compilations times redudantly.

@tyranron

also, is it possible to reasonable feature-gate this tracing integration? I believe most of the time people won't need it, so we can avoid increasing compilations times redundantly.

Yes, it's already implemented behind a feature gate.

FCM
Implement `tracing` integration (#258, #213)

- add `tracing` feature
- add `Log` variant to `event::Scenario`

I also dislike the monstrocity happening in runner/basic.rs. It has grown too much. But that's the topic for a different PR in different times.


Test intervals accepts negative values

Describe the bug
In the update-interval endpoint negatives values are also accepted as argument and are updated into local-config.yml
To Reproduce
Steps to reproduce the behaviour:

Run the UI and input negative value in config->Scrape intervals

Expected behaviour
As it is time in sec it must be uint. but for now it is a string.
Screenshots

@Sanketwable I think this issue can be fixed from the UI itself by preventing the input from accepting negative values.

@Anuragtech02 This will be a temporary fix. In future when we will need this API than it will again cause an issue. So what I think is, in the server side will change the type if the value from string to uint. The client side request should be modified to accept the positive value and pass this as a uint to the endpoint. This will solve end to end issue. Thanks

@Anuragtech02 This will be a temporary fix. In future when we will need this API than it will again cause an issue. So what I think is, in the server side will change the type if the value from string to uint. The client side request should be modified to accept the positive value and pass this as a uint to the endpoint. This will solve end to end issue. Thanks

Ohh yes, if the type is a string then it must be changed to int. Got it! Anyways can I contribute to the client-side?

@Anuragtech02 This will be a temporary fix. In future when we will need this API than it will again cause an issue. So what I think is, in the server side will change the type if the value from string to uint. The client side request should be modified to accept the positive value and pass this as a uint to the endpoint. This will solve end to end issue. Thanks

Ohh yes, if the type is a string then it must be changed to int. Got it! Anyways can I contribute to the client-side?

I am not contributing to client-side. You may ask Mentors for this.🙃

@muskankhedia @Harkishen-Singh @aquibbaig I'd like to work on this issue for the client-side.

@Anuragtech02 you can submit a client check for this. thank you.


windows release ?

We'll add experimental support for Windows soon.
What's your main use case for Savvy right now?

working with go commands and workbooks

@RayyanNafees I took a look at the work required to support Windows:

[ ] Add a new install script to support Windows ( bun has a good example: bun.sh/install.ps1)
[ ] add Windows support to https://github.com/getsavvyinc/upgrade-cli
[ ]  audit the code to ensure we use file path.Join() instead of hardcoding /.

I don't have the bandwidth to work on this at the moment.  However, I'd love to receive PRs from the community for any of the issues above. Let me know if you're interested.

Closing due to inactivity.


[add-resource] New Widget Plugin

I would like to add my new widget plugin to the Grav Repository.
Here are the project details: sojimaxi/grav-plugin-widget
The plugin works by using modular templates and pages as reusable widgets to displayed in various page templates.
It's a cool plugin i created to help me with my current project
Thanks
Soji

Thanks, you need to make the version in the blueprint match the release tag: https://github.com/sojimaxi/grav-plugin-widget/blob/master/blueprints.yaml#L2 (re-release and make it 1.0.1

Thanks a lot @flaviocopes. The plugin has been updated to version 1.1.0 with a new feature

Added for next GPM update.


Many unauthenticated errors

With new version 1.0, I see a lot of unauthenticated errors.  I am calling login, which succeeds, then immediately calling list_requests, which fails with an UnauthenticatedError.  I am seeing this on a number of different instances.  If I manually remove the call to _check_logged_in it successfully lists the requests.  I added example credentials to the Google Doc.

okay, thanks. i need a more reliable way to check if logged in.