Monitoring

We have a monitoring dashboard, https://console.cloud.google.com/monitoring/dashboards/builder/4f0ac7cc-258d-4058-8208-fafa32088378?project=bridgy-federated , but it's degraded. Time to take another pass at it!

Also: alerts on task queue length.

Here's a draft of what I'd like:
Monitoring
app

[ ] requests
[ ] errors
[ ] latency, p50 90 99
[ ] /r, /convert, webfinger requests, by domain
[ ] outbound HTTP requests by domain
[ ] instances

router

[ ] tasks by queue
[ ] task responses, errors
[ ] task latency
[ ] already seen activity ids
[ ] unsupported activity types

[ ] ...also in protocols like AP that short circuit them

[ ] receive tasks by protocol, source domain
[ ] send tasks by protocol, destination domain
[ ] new users
[ ] user deactivations
[ ] activities for blocked, opted out, limited, blocklisted users
[ ] CPU, memory

atproto-hub

firehose client:

[ ] total events
[ ] our events: from our users, to our users

firehose server:

[ ] emitted events
[ ] connected clients

[ ] CPU, memory

Alerts

[ ] app error rate
[ ] app latency
[ ] task queue length, errors, rate drops
atproto firehose:

[ ] last connection from Bluesky relay over ~75m ago
[ ] emitted events rate dropff

[ ] app instances sustained spike (can we limited to billed instances?)
[ ] router, atproto-hub serving instances sustained != `

We have a monitoring dashboard, https://console.cloud.google.com/monitoring/dashboards/builder/4f0ac7cc-258d-4058-8208-fafa32088378?project=bridgy-federated , but it's degraded. Time to take another pass at it!

That dashboard is private, by the way.
Not sure if you're planning to have a public status page at all/if the privacy setting there is intentional, but I thought I'd mention it in case it's accidental.

Hey, yes, not accidental. Not sure if I can make it public, but I'd like to!

Looks like Google Cloud Monitoring dashboards can't be public 😕
https://cloud.google.com/monitoring/access-control#predefined_roles
https://cloud.google.com/iam/docs/principal-identifiers

Got a first pass at a new dashboard that I'm reasonably happy with.

...and a first pass at alerts:

There are a few still outstanding, but this is pretty much done!


calibre: Pin zeroconf dependency to 0.31

Motivation for this change
Presently, Calibre fails to build (stacktrace) on nixos-unstable since zeroconf was updated to 0.32 because of a regression in calibre (https://bugs.launchpad.net/calibre/+bug/1936889) which has been patched, but not yet released (https://github.com/kovidgoyal/calibre/commit/4f9e83e6426483b6cc0929c61f9207c33c573fec).
This pins Calibre's zeroconf dependency to 0.31 until that gets merged and we can update.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Relase notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

I tested this using sudo nixos-rebuild test -I nixpkgs=<path/to/local/nixpkgs> --fast. My local configuration.nix has calibre in systemPackages.
I tried nixpkgs-review pr 131477 as per the instructions but it errored with:
Traceback (most recent call last):
  File "/nix/store/lrz7786xlj8vc9hkhf4v6w7d36hfrvk2-nixpkgs-review-2.6.1/bin/.nixpkgs-review-wrapped", line 9, in <module>
    sys.exit(main())
  File "/nix/store/lrz7786xlj8vc9hkhf4v6w7d36hfrvk2-nixpkgs-review-2.6.1/lib/python3.9/site-packages/nixpkgs_review/__init__.py", line 10, in main
    cli.main(command, args)
  File "/nix/store/lrz7786xlj8vc9hkhf4v6w7d36hfrvk2-nixpkgs-review-2.6.1/lib/python3.9/site-packages/nixpkgs_review/cli/__init__.py", line 262, in main
    return cast(str, args.func(args))
  File "/nix/store/lrz7786xlj8vc9hkhf4v6w7d36hfrvk2-nixpkgs-review-2.6.1/lib/python3.9/site-packages/nixpkgs_review/cli/pr.py", line 65, in pr_command
    contexts.append((pr, builddir.path, review.build_pr(pr)))
  File "/nix/store/lrz7786xlj8vc9hkhf4v6w7d36hfrvk2-nixpkgs-review-2.6.1/lib/python3.9/site-packages/nixpkgs_review/review.py", line 222, in build_pr
    return self.build_commit(base_rev, pr_rev)
  File "/nix/store/lrz7786xlj8vc9hkhf4v6w7d36hfrvk2-nixpkgs-review-2.6.1/lib/python3.9/site-packages/nixpkgs_review/review.py", line 167, in build_commit
    merged_packages = list_packages(
  File "/nix/store/lrz7786xlj8vc9hkhf4v6w7d36hfrvk2-nixpkgs-review-2.6.1/lib/python3.9/site-packages/nixpkgs_review/review.py", line 330, in list_packages
    return parse_packages_xml(f)
  File "/nix/store/lrz7786xlj8vc9hkhf4v6w7d36hfrvk2-nixpkgs-review-2.6.1/lib/python3.9/site-packages/nixpkgs_review/review.py", line 297, in parse_packages_xml
    values = (e.attrib["value"] for e in elem.getchildren())
AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'getchildren'

I think this is an issue with the nixpkgs-review script (or my python setup) rather than the changes in this PR, but I am not sure.

i tried using fetchpatch and updating to 5.23.0
    (fetchpatch {
      url = "https://github.com/kovidgoyal/calibre/commit/4f9e83e6426483b6cc0929c61f9207c33c573fec.patch";
      sha256 = "0bk0547xb609han6jfymzw65lvz56pr5hhllslxzqij1pid3nmfr";
    })

but
calibre, version 5.23.0
ERROR: Bad database location: Bad database location '/home/artturin/Calibre Library'. Will start with  a new, empty calibre library

Traceback (most recent call last):
  File "/nix/store/qcg6wngqxc70vw6km1x7lw57qvdg6vk7-calibre-5.23.0/lib/calibre/calibre/gui2/main.py", line 329, in initialize_db
    db = LibraryDatabase(self.library_path)
  File "/nix/store/qcg6wngqxc70vw6km1x7lw57qvdg6vk7-calibre-5.23.0/lib/calibre/calibre/db/legacy.py", line 188, in __init__
    backend = self.backend = create_backend(library_path, default_prefs=default_prefs,
  File "/nix/store/qcg6wngqxc70vw6km1x7lw57qvdg6vk7-calibre-5.23.0/lib/calibre/calibre/db/legacy.py", line 45, in create_backend
    return DB(library_path, default_prefs=default_prefs,
  File "/nix/store/qcg6wngqxc70vw6km1x7lw57qvdg6vk7-calibre-5.23.0/lib/calibre/calibre/db/backend.py", line 463, in __init__
    if self.user_version == 0:
  File "/nix/store/qcg6wngqxc70vw6km1x7lw57qvdg6vk7-calibre-5.23.0/lib/calibre/calibre/db/backend.py", line 1214, in user_version
    return self.conn.get('pragma user_version;', all=False)
  File "/nix/store/qcg6wngqxc70vw6km1x7lw57qvdg6vk7-calibre-5.23.0/lib/calibre/calibre/db/backend.py", line 927, in conn
    self._conn = Connection(self.dbpath)
  File "/nix/store/qcg6wngqxc70vw6km1x7lw57qvdg6vk7-calibre-5.23.0/lib/calibre/calibre/db/backend.py", line 342, in __init__
    plugins.load_apsw_extension(self, 'sqlite_extension')
  File "/nix/store/qcg6wngqxc70vw6km1x7lw57qvdg6vk7-calibre-5.23.0/lib/calibre/calibre/constants.py", line 325, in load_apsw_extension
    conn.enableloadextension(True)
AttributeError: 'Connection' object has no attribute 'enableloadextension'

sorry about that approve i didn't think of this better solution
diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix
index d27c9c9af65..644bdd70e5b 100644
--- a/pkgs/applications/misc/calibre/default.nix
+++ b/pkgs/applications/misc/calibre/default.nix
@@ -1,6 +1,7 @@
 { lib
 , mkDerivation
 , fetchurl
+, fetchFromGitHub
 , poppler_utils
 , pkg-config
 , libpng
@@ -94,7 +95,15 @@ mkDerivation rec {
       python
       regex
       sip
-      zeroconf
+      (zeroconf.overrideAttrs (oldAttrs: rec {
+        version = "0.32.0";
+        src = fetchFromGitHub {
+          owner = "jstasiak";
+          repo = "python-zeroconf";
+          rev = version;
+          sha256 = "08fnpc236v4n9vrxjj6y2xsm06ax0bnygxf294m6lhwmn1vygy7i";
+        };
+      }))
       # the following are distributed with calibre, but we use upstream instead
       odfpy
     ] ++ lib.optional (unrarSupport) unrardll

@Artturin thanks for the review. I'm assuming 0.32.0 is a typo and it should actually be 0.31.0. I've updated the PR accordingly.

calibre builds with 0.32.0 for me

How are you testing it? I am testing with nix-collect-garbage -d && sudo nixos-rebuild test -I nixpkgs=<path/to/local/nixpkgs> --fast
It gives me the same error as 0.32.1, which makes sense because the breaking change is part of the 0.31 -> 0.32 diff [1]. This is also consistent with description of the bug in calibre's tracker I previously linked.
[1] Specifically, _HAS_A_TO_Z moved from __init__.py (which gets publicly exported) to const.py (which does not).

git checkout 10bc114e32c42eea5222d7c8434a7a8d02e51d0b which is the commit that upgraded zeroconf to 0.32.0
then i nix-build '.' -A calibre
builds but if i checkout master it does fail
also can be tested by applying the patch with git apply calibre.patch on master and nix-build '.' -A calibre

nevermind it seems that the fork i was testing from was out of date

Thanks again for taking a look. Is there anything else I need to do, or is this just waiting on another review?


Feedback on 0.0.1

To investigate the library in order to provide feedback, I attempted an integration into Sparrow (actually, drongo) in which I replaced the following functions with equivalents from secp256k1-jdk, using the ffm implementation:

Deriving a public point from a private key
Signing ECDSA
Verifying ECDSA signatures
Signing Schnorr
Verifying Schnorr signatures
Creating an ECDH secret from a public and private key

I was able to achieve the first 5 items, with some caveats which I'll list below. I've put the changes in a branch. The secp256k1_ecdh function was not present in secp256k1-jdk, so I wasn't able to implement the 6th item. Here are the issues I encountered:

When distributing a client application, one cannot rely on the presence of any external libraries (like secp256k1). Generally, the approach is to package these libraries in the application jar. When the library is used, it is first extracted to a temporary location on the user's drive and loaded directly from there using System.load(filepath). However, the approach used by jextract is different - it expects to be able to find the library on java.library.path which must be specified on application startup, since it is only read once. The problem is in the static initializer: https://github.com/bitcoinj/secp256k1-jdk/blob/453da0b4bdeb41fe4b4f3942c10bb3f617e676eb/secp-ffm/src/main/java/org/bitcoinj/secp/ffm/jextract/secp256k1_h.java#L71-L73 I was able to get it working by commenting this block out and performing the library loading manually.
Grinding ECDSA signatures for low R is important, not just to reduce transaction size but to create the same signatures across different wallets (all using RFC6979). secp256k1-jdk currently has no ability to specify the RFC6979 extra ndata in secp.ecdsaSign. Currently, it's set to nullPointer.
I encountered the following warning when running the application - I'm not sure if anything can be done about it given it's code created by jextract, but I mention it since it's obviously not ideal to need to access to potentially unsafe operations.

WARNING: A restricted method in java.lang.foreign.AddressLayout has been called
WARNING: java.lang.foreign.AddressLayout::withTargetLayout has been called by org.bitcoinj.secp.ffm.jextract.secp256k1_h in module org.bitcoinj.secp.ffm
WARNING: Use --enable-native-access=org.bitcoinj.secp.ffm to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled

Apart from these issues, everything went well. The client code was relatively easy to read/write. I did need to create two implementations (ByteArrayP256K1XOnlyPubKey and BigIntegerP256k1PrivKey) of the provided interfaces, which could be considered to be included in the api as I imagine they will be often required. I tested with secp256k1 v0.5.1.

Thanks, Craig! This is great news!

The secp256k1_ecdh function was not present in secp256k1-jdk, so I wasn't able to implement the 6th item.

For v0.0.1/v0.0.2 I've been focused on just Schnorr and Ecdsa signing/verification. I will add  secp256k1_ecdh.

Generally, the approach is to package external libraries (like secp256k1) in the application jar.

I have done this many times in the past, but for secp-jdk I've been ignoring that issue until now. During development, especially when using Nix it has been convenient to access the library with java.library.path. I will open an issue for this and we will figure out a way to support both use cases.
Are you using jpackage to build the Sparrow distribution? I wonder if there is support in jpackage for setting java.library.path and having native binaries as files in the distribution.

secp256k1-jdk currently has no ability to specify the RFC6979 extra ndata in secp.ecdsaSign.

I will add this.

I encountered the following warning … WARNING: Use --enable-native-access=org.bitcoinj.secp.ffm

This is part of an effort called "Integrity by Default". See draft JEP and this video for more information. This change will affect JNI as well.
You should be able to add --enable-native-access=org.bitcoinj.secp.ffm to the startup configuration for your application. If your application is not running as a module app add --enable-native-access=ALL-UNNAMED
I like this approach, especially with the module system. This means the person building the app can control which modules are allowed native access and this helps protect against supply chain attacks.

ByteArrayP256K1XOnlyPubKey and BigIntegerP256k1PrivKey … will often be required.

I will look at them and add them or the equivalent functionality.

I'm not sure if anything can be done about it given it's code created by jextract.

I'm not sure we will always be using jextract to generate the FFM adapter files. Currently they are generated by jextract but checked in to Git. As I (we) learn more about FFM we might decide to manually improve these files. The secp256k1 library seems fairly stable with most changes being the addition of new functions, so maybe we could use jextract to generate support for new functions when they are added, but then go manual after that.
But for now, I do plan to continue with jextract unless there is some otherwise insurmountable issue.
Thanks again for doing this, this is really helpful feedback. I would have expected you to find more serious issues, so to me this is a very encouraging report.

Also, I have one comment on your drongo changes. Although Secp256k1 is marked as Closeable it doesn't have to be used in a try-with-resources. Since call .get() initializes the secp256k1 context, you might consider modifying your Secp256k1Context.getContext() method to return a Secp256k1 instance rather than along`.

Thanks - I agree, it is encouraging.

Are you using jpackage to build the Sparrow distribution? I wonder if there is support in jpackage for setting java.library.path and having native binaries as files in the distribution.

Yes I am. I did see this this answer but there would need to be another solution for development/testing to avoid having to run jpackage every time.

You might consider modifying your Secp256k1Context.getContext() method to return a Secp256k1  instance rather than a long.

Yes, good point.

I wonder if there is support in jpackage for setting java.library.path and having native binaries as files in the distribution.

there would need to be another solution for development/testing to avoid having to run jpackage every time.

Take a look at how I am setting it in Gradle. I'm assuming it was installed with Nix, but you don't have to use Nix. You could just set the path in Gradle in a similar way.  (I think I even allow overriding the Nix location)

But again, I am open to supporting the old method of loading it out of a JAR if that is what is needed.

Yes, it's certainly possible - my point was more that it means a different code path is used between development and production, which means double testing across all platforms.


The callback method in the setAppInviteOneLinkID function is not called on iOS

This is the code I am using
appsflyer.setAppInviteOneLinkID('$id', (_) {
      print('setAppInviteOneLinkID success');
});

Also, when calling this method, an error is displayed in the console:
type '_InternalLinkedHashMap<dynamic, dynamic>' is not a subtype of type 'String'

Hey @maxsalo17
We'll investigate this case and update here.
Thank you!

Hey @maxsalo17!
The current version as a fix for the user invite feature.
The readme was updated with instruction was updated as well (under API-> user invite).


User Login Portal: Modify fields to include tagging of roles as defined in User Management.

Add a simple drop down to allow the user to select a chapter (role) to attach to their account.
Appears roles are attached properly in /admin, but not in /register. Melvin to look at /register to understand "many-to-many" bug.

Melvin states that there's still an issue with "many-to-many" mapping when trying to attach a "chapter" role to user.
No error shows, but the chapter just doesn't get attached.
Problem line of code:
asrg.io/member-portal/django-dashboard-coreui/authentication/views.py, in "register_user":
        chapter = form.cleaned_data.get("chapter")
        request.user.chapter = chapter
        form.save()

Brandon to give a shot at debugging.


this transaction has been lost

it never showed in my account all was lost please help

Address
0x82fBCCA801c2fd52624420a71d32CC31c938EA9f
Type
STANDARD ADDRESS
Balance
45.8189 Ether
45818917970000000000 Wei
$414.66

If you have the private key to that account you can access the funds.  Explorer is not a wallet


Java 8 compliant lexer

(Original issue 959 created by adrianoalmeida7 on 2014-03-06T16:59:49.804396+00:00)
Java 8 syntax is already stable, therefore, Pygments can have a lexer that supports it. Now, the  java lexer makes some weirdness with the new syntax, just like in the attached images.

(Original issue 959 last updated on 2014-10-07T20:43:29.037291+00:00)
(Issue automaticaly closed due to status in Bitbucket: resolved)

(Original comment by tshatch on 2014-10-07T20:43:29.051533+00:00)
This is improved as of [1ed00bd80758], so I'm going to close for now.  If you can point us to an exhaustive list of either new syntax, or errors with new syntax, we can take a look.
#!text

Token.Name      u'Usuario'
Token.Operator  u':'
Token.Operator  u':'
Token.Name      u'tornaModerator'


There should be a way to configure linguist from github repo using config file

SVG is not marked as language (#1020) same happen to markdown (#3158) it would be nice if you could add language in some config file that will be read by linguist on init.

First, please read the troubleshooting notes on adjusting your project's language classification.
Secondly, Markdown isn't going to be listed in language statistics. This is why:
There are four distinct classifications of language on GitHub:

Prose: Material intended to be consumed by a human reader, with little to no processing
Markup: Material intended to be presented to a reader after being processed or parsed by a program
Programming: Material with instructions designed to be interpreted or compiled by software
Data: Virtually anything that doesn't fit into the above

Language statistics are only affected by markup and programming languages. Data and prose are ignored, and they'd unfairly bloat a repository's language statistics.
Markdown is classed as "prose", as it's designed to be read in its raw form as easily as its processed form. HTML is classed as "markup", because it's not designed to be read in its raw form.

What about repositories where "prose" is most of the content? For example blogs hosted on GitHub pages are mostly markdown but this isn't shown in the language statistics.

@sunjay - please see this related discussion for some additional background: https://github.com/github/linguist/issues/3228


feat: onboard renovate to support auto-upgrading components

What type of PR is this?
/kind feature
What this PR does / why we need it:
feat: onboard renovate to support auto-upgrading components.
More details to be added.
Which issue(s) this PR fixes:

Fixes #
Requirements:

[ ] uses conventional commit messages

[ ] includes documentation
[ ] adds unit tests
[ ] tested upgrade from previous version

Special notes for your reviewer:
Release note:
none

Pull Request Test Coverage Report for Build<PHONE_NUMBER>9
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 71.374%

Totals

Change from base Build<PHONE_NUMBER>3:
0.0%

Covered Lines:
2603

Relevant Lines:
3647

💛  - Coveralls


[Process] Cleanup some logic around getting LanguageRuntimes

This is a cherry-pick of svn rL361666 plus a patch to account for swift.
cc @dcci @JDevlieghere @compnerd

@swift-ci please test and merge


Options for Figaro on Elastic BeanStalk

Hello
Thanks for Figaro.
I'm thinking about moving one of my apps from Heroku to Elastic Beanstalk on AWS.
Figaro seems to be Heroku-focused. As far as I can see, I have a few options to make Figaro work on Elastic Beanstalk.

Copy the environment variables into my Elastic Beanstalk environment one-by-one.

I'd like to avoid doing this if possible because I have a lot of them and it is bound to be error-prone.

Just remove application.yml from the gitignore file.

I haven't tested this yet but this seems like the route of least resistance. It obviously undercuts the whole purpose of using Figaro in the first place though.

Generate a remote configuration file

You mention this is in the docs but I can't see any examples. I'm not sure what this means. Could you elaborate a bit on how Figaro could retrieve a file from an S3 bucket, for example?
Thanks
Tom

@tomgallagher i certainly wouldn't do 2.  I just dealt with a project where all the keys were in the credentials.yml.enc (yes, including dev and test) and a dev's laptop was stolen.  even encrypted, the keys were still committed to the repo and had to be changed.
I'm currently working on an s3 approach to getting files on a system for config and I'll let you know how that goes.

@tomgallagher (and those who might find this later) follow up from my previous comment.
we used the aws-s3 sdk and have copies of our files on an s3 bucket.  Then, during deploy, our capistrano task pulls down the file to the shared folder from the bucket.  The main thing to leverage is SSHKit's file stream for upload, since that is what the s3 object will return.  This is one method that works, and not the only way to accomplish this.
# taken from a Capistrano task
s3 = Aws::S3::Resource.new(
       region: fetch(:aws_region),
       credentials: Aws::Credentials.new(
         fetch(:aws_access_key),
         fetch(:aws_secret_key)
       )
     )
obj = s3.bucket(:aws_s3_bucket).object(:s3_file_path)
upload! obj.get.body, :server_file_path


Add @lachlanjc as a contributor

re: https://twitter.com/mrmrs_/status/713434087109890049

:dancers:


Add tampermonkey script to chrome extensions

I use a chrome extension for redirect agar.io to my own  client but tampermonkey script dont work. Why?

Si?

So?

Do u have skype


Preserve Line Numbers

What's up?
Wrapping a console.log statement will not preserve the line numbers.  Meaning, if I called plog on line 8 in my app, it will always say it was called on line 187 as this is where it is invoked in the plog library.
Mkay, tell me more...
Anyone can wrap a console log and preserve the line number by doing this:
plog =  console.log.bind(console);

The issue with the above is that we will not be able to format the message so it comes out with colour and bolded.  This is because we need to call console.log several times within plog.
solution 1
One of the solutions is to grab the file and line number by doing something like this:
var err = new Error();
var url = err.stack.split('\n')[2];
var fileAndLineNum = url.substr(url.lastIndexOf('/') + 1);
var final = fileAndLineNum.substring(0, fileAndLineNum.length - 1); // line: "bundle.js:18351:100"

solution 2
This option means we forgo the heavy formatting in favour of line numbers.  So we no longer need to create an Error() object as we do in solution 1.  We can still have debug levels and some other nice things.
solution 3
Perhaps there is actually a way to have both and I have just not seen it yet :(

Can't think of a 3rd solution. Unfortunately I don't have experience with this. Personally I'm OK with dropping the heavy formatting.

Yeah, does seem like the quest for beauty got in the way of it actually doing what it was supposed to do.  Thanks for the input!


Error: Unsupported operation: dart:isolate is not supported on dart4web

Hello I'm working on my test project and I face this issue when I want to load data

The code is visible here
https://github.com/AliKarimiENT/Dart-course/blob/master/lib/main.dart
The codes are here

The project is open source and you can check it
https://github.com/AliKarimiENT/Dart-course

I can see you run the flutter project on the web("chrome"), but isolate is not supported on the web yet
check this: https://api.flutter.dev/flutter/dart-isolate/dart-isolate-library.html

@AliKarimiENT
Per above comment, the dart: isolate library doesn't support web yet. See this similar issue for your reference and the chart shown in this description to know which library is supported on web and which isn't.
Based on above comment, I am closing this. If you disagree, write in comments and I'll reopen it.


broken snippet on wiki

The latex tabular snippet is broken and I didn't manage to fix it

just saw the extern input or however it's called


2776 Monaco Editor Fix - CDN Change

Summary
Change CDN from JSDeliver to CDNJS by Cloudflare
Tests
Compiled and ran in a Docker Container
cc:
@johnson-mage

@halidrauf Thanks for putting up this PR, taking a look.

@halidrauf Thanks for looking up the alternative CDN. Unfortunately, I don't think this would permanently change the CDN used by the Monaco Editor, since once we create a new frontend production build, it would overwrite this change.
Refer to my PR https://github.com/mage-ai/mage-ai/pull/2821 for how we could update the CDN. I referred to this (https://github.com/suren-atoyan/monaco-react#loader-config) for reference. Going to close this PR since we will not be merging it.


Operation timed out after 20003 milliseconds with 0 bytes received using Bus::Chain

Hey,
Not sure if you've run into this before, but using job chaining, if the chains are big I am seeing Operation timed out after 20003 milliseconds with 0 bytes received from CURL

Have you run into this before?

I can have a check later this week. Lmk if you find something in the meantime.

Thanks @marickvantuil I am looking currently on a separate branch to see what could be a cause.
I am wondering if a big chained job is causing CURL underneath for Google tasks to timeout. As the containers that run Cloud Run for jobs have a 600 second timeout, with nginx and php matching.

@Kyon147 Just for full transparency, which version of the package are you using, and on which platform is the application hosted? (AppEngine/Cloud Run/something else).
I first thought it could be slow because of Cloud Tasks's deduplication feature, but even with 500+ tasks in the queue, it only takes around 500ms to create a task. Could it be some quota thing from Google somewhere?
I've also experimented with job chains, but I run into { "message": "Task size too large", "code": 3, "status": "INVALID_ARGUMENT", "details": [] } errors even before anything times out.


C# selenium 3.6 grid - W3C payload contained keys that do not comply with the spec

Description
Can't init a driver with provided capabilities after updating .Net Selenium.WebDriver and Selenium.Support packages in the C# solution.
Environment

.NET client build version or git revision if you use some shapshot: Appium.WebDriver v.<IP_ADDRESS>
Appium server version or git revision if you use some shapshot: Appium v1.7.2-beta (REV 3ec103fb235b8d7eb307d6b3921664ea049b99b7)
Desktop OS/version used to run Appium if necessary: macOS 10.13
Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe: appium cli
Mobile platform/version under test: iOS 11.0.3
Real device or emulator/simulator: real

Details
The hub is on selenium 3.6
It worked normally after updating the grid to selenium 3.6 but broke when I updated the .Net Selenium.WebDriver and Selenium.Support packages in the solution from v3.3 to v3.6.
The errors I get are two:

Cannot extract a capabilities from the request: {"desiredCapabilities":{"udid":"062af51ec94f8f92ef9a295b13d1570edb7694e3","deviceName":"062af51ec94f8f92ef9a295b13d1570edb7694e3","platform":"ANY","app":"/Users/macmini2014/automated_testing/App_build/App.app","version":"062af51ec94f8f92ef9a295b13d1570edb7694e3","fullReset":true,"autoAcceptAlerts":true,"platformName":"iOS"},"capabilities":{"firstMatch":[{"udid":"062af51ec94f8f92ef9a295b13d1570edb7694e3","deviceName":"062af51ec94f8f92ef9a295b13d1570edb7694e3","app":"/Users/macmini2014/automated_testing/App_build/App.app","fullReset":true,"autoAcceptAlerts":true,"platformName":"iOS"}]}}

W3C payload contained keys that do not comply with the spec: [app, udid, deviceName, fullReset, autoAcceptAlerts]

I have linked a log.
Code To Reproduce Issue [ Good To Have ]
DesiredCapabilities capabilities = new DesiredCapabilities();
            capabilities.SetCapability("udid", deviceName);
            capabilities.SetCapability("deviceName", deviceName);
            capabilities.SetCapability("platform", "ANY");
            capabilities.SetCapability("app", app);
            capabilities.SetCapability("version", deviceName);
            capabilities.SetCapability("fullReset", true);
            capabilities.SetCapability("autoAcceptAlerts", true);

            var driver = new IOSDriver<AppiumWebElement>(new Uri("http://server:4444/wd/hub"), capabilities, TimeSpan.FromSeconds(300));

Ecxeption stacktraces
Selenium hub log
Link to Appium logs
Appium log. Not really interesting. Normal stuff.

Updating selenium to the 3.7.1 release and the client driver (nuGet) 3.7 seems to solve the issue.


Receiving invalid date for all input on android

As of 1.4.0, android side is returning 'Invalid Date' to the onChange callback for any value selected.

Fixed invalid date by changing MonthPicker.android.js line 29 to:
          date = moment(new Date(year, month), NATIVE_FORMAT).format(

On a related note, the returned month does not match the selected month.
The maximum month/year is also off by one month.

Thanks for using the library! I will push a new version with the fix in an hour or two.

:tada: This issue has been resolved in version 1.4.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Testing to [POST] user data in postman

In the react-dev branch, I am currently trying to match the required user fields with our design and test it out using postman. It seems to work when I deliberately enter uncompleted data, because it returns "Please complete all required fields." message. However when I deliberately enter complete data such as this:
{
    "fullName": "floren yu",
    "email"<EMAIL_ADDRESS>    "password": "floren123",
    "phoneNumber": "84323"
}

, it returns:
{
    "message": "The server does not support SSL connections",
    "stack": "Error: The server does not support SSL connections\n    at Socket.<anonymous> (C:\\Users\\HEWLETT PACKARD\\DigitalIT\\node_modules\\pg\\lib\\connection.js:71:37)\n    at Object.onceWrapper (node:events:642:26)\n    at Socket.emit (node:events:527:28)\n    at addChunk (node:internal/streams/readable:315:12)\n    at readableAddChunk (node:internal/streams/readable:289:9)\n    at Socket.Readable.push (node:internal/streams/readable:228:10)\n    at TCP.onStreamRead (node:internal/stream_base_commons:190:23)"
}

I actually don't really know whether the postman is connected to my local postgresql database or not. I have created the database in my local machine, but not sure how to check whether it is connected to the code.
I have tried googling the problem, but also not sure how to interpret them :"(
similar github issue i guess (?)
stackoverflow post

Also, I notice this when checking the .env file. Is this supposed to link to some database that has been created earlier? If so, how can I access it from my local machine?
NODE_ENV = development
PORT = 5000
dbHost = ec2-34-227-120-79.compute-1.amazonaws.com
dbUser = sekyknraulqasu
dbPass = dfb8e52ee291f606fa069e87a143d78c03d190dd6df8b83b733d17c82fdc4ab7
database = d76bv03rij1eu8
dbPort = 5432
DATABASE_URL = postgres://sekyknraulqasu:dfb8e52ee291f606fa069e87a143d78c03d190dd6df8b83b733d17c82fdc4ab7@ec2-34-227-120-79.compute-1.amazonaws.com:5432/d76bv03rij1eu8

Assuming the database and the tables are already created in your local computer, if you want the server to connect to that database instead, you can change the dbHost, dbUser, ... , up till dbPort in the .env file to your local db credentials.
Then in ./backend/config/**db.js**, uncomment the part where those variables are used and comment the part where the database_url is used.
Those steps should change the path to the pool created. Lmk if the error still persists

Oh also I forgot that the fields for the user registration has not yet been changed because it requires us to reset the db and also re-create the tables. For now the fields for registering a user are email, password, first_name, last_name, and birthdate.


operator project-quay (3.9.0-nightly.20230722)

Add 3.9.0-nightly.20230722 to community operators

/merge possible

/merge possible


[flutter_tools] _TypeError: type 'ValidatorWithResult' is not a subtype of type 'IntelliJValidatorOnMac'

On beta/3.14.0-0.1.pre
flutter --no-version-check doctor
_TypeError: type 'ValidatorWithResult' is not a subtype of type 'IntelliJValidatorOnMac' in type cast
at IntelliJValidatorOnMac.installed.<anonymous closure>(intellij_validator.dart:491)
at ListBase._filter(list.dart:293)
at ListBase.removeWhere(list.dart:281)
at IntelliJValidatorOnMac.installed(intellij_validator.dart:489)
at IntelliJValidator.installedValidators(intellij_validator.dart:74)
at _DefaultDoctorValidatorsProvider.validators(doctor.dart:112)
at Doctor.validators(doctor.dart:237)
at Doctor.startValidatorTasks(doctor.dart:243)
at Doctor.diagnose(doctor.dart:378)
at DoctorCommand.runCommand(doctor.dart:49)
at FlutterCommand.verifyThenRunCommand(flutter_command.dart:1635)
at <asynchronous gap>(async)
at FlutterCommand.run.<anonymous closure>(flutter_command.dart:1323)
at <asynchronous gap>(async)
at AppContext.run.<anonymous closure>(context.dart:150)
at <asynchronous gap>(async)
at CommandRunner.runCommand(command_runner.dart:212)
at <asynchronous gap>(async)
at FlutterCommandRunner.runCommand.<anonymous closure>(flutter_command_runner.dart:339)
at <asynchronous gap>(async)
at AppContext.run.<anonymous closure>(context.dart:150)
at <asynchronous gap>(async)
at FlutterCommandRunner.runCommand(flutter_command_runner.dart:285)
at <asynchronous gap>(async)
at run.<anonymous closure>.<anonymous closure>(runner.dart:115)
at <asynchronous gap>(async)
at AppContext.run.<anonymous closure>(context.dart:150)
at <asynchronous gap>(async)
at main(executable.dart:90)
at <asynchronous gap>(async)

ahh, this happens when we catch a FileSystemException.


images are always being pulled even if they are locally available

Hi,
I'm seeing images always being pulled even if they are already present on the machine. I noticed a fix in the master branch https://github.com/kubernetes-incubator/kubespray/commit/c0935e161b980bb4fc80a38bea9d84b8fb28a59d
I applied this over the top of the v2.5.0 tagged release but I'm still getting issues. The docker inspect command looks to be failing. I've turned of the no_log: true to get the output below.
Environment:

Cloud provider or hardware configuration:

vmware workstation

OS (printf "$(uname -srm)\n$(cat /etc/os-release)\n"):

Linux 3.10.0-514.el7.x86_64 x86_64
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

Version of Ansible (ansible --version):

ansible 2.6.1
  config file = /build/ansible.cfg
  configured module search path = [u'/home/centos/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Jul 13 2018, 13:06:57) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]

Kubespray version (commit) (git rev-parse --short HEAD):
I download and untarred the 2.5.0 tag but then patched this in over the top to try to resolve this issue.
https://github.com/kubernetes-incubator/kubespray/commit/c0935e161b980bb4fc80a38bea9d84b8fb28a59d
Network plugin used:
calico
Copy of your inventory file:
[centos@87c62e7d24d0 build]$ cat /build/kubespray/inventory/cva/hosts
centos7-5 ansible_ssh_host=<IP_ADDRESS>  # ip=<IP_ADDRESS>
centos7-8 ansible_ssh_host=<IP_ADDRESS>  # ip=<IP_ADDRESS>
centos7-9 ansible_ssh_host=<IP_ADDRESS>  # ip=<IP_ADDRESS>
centos7-10 ansible_ssh_host=<IP_ADDRESS>  # ip=<IP_ADDRESS>

[kube-master]
centos7-5
centos7-8
centos7-10

[etcd]
centos7-5
centos7-8
centos7-10

[kube-node]
centos7-9

[kube-ingress]
centos7-9

[k8s-cluster:children]
kube-master
kube-node
kube-ingress

Command used to invoke ansible:
 ansible-playbook /build/kubespray/cluster.yml  -i /build/kubespray/inventory/cva/hosts -u centos --tags download -vv

Output of ansible run:
TASK [download : Register docker images info] **************************************************************************************************************************************
task path: /build/kubespray-2.5.0/roles/download/tasks/set_docker_image_facts.yml:10
META: noop
META: noop
META: noop
 [WARNING]: raw module does not support the environment keyword

ok: [centos7-5] => {"changed": false, "failed_when_result": false, "rc": 0, "stderr": "Shared connection to <IP_ADDRESS> closed.\r\n", "stderr_lines": ["Shared connection to <IP_ADDRESS> closed."], "stdout": "\"docker inspect\" requires at least 1 argument(s).\r\nSee 'docker inspect --help'.\r\n\r\nUsage:  docker inspect [OPTIONS] NAME|ID [NAME|ID...]\r\n\r\nReturn low-level information on Docker objects\r\n", "stdout_lines": ["\"docker inspect\" requires at least 1 argument(s).", "See 'docker inspect --help'.", "", "Usage:  docker inspect [OPTIONS] NAME|ID [NAME|ID...]", "", "Return low-level information on Docker objects"]}

I think this is actually working. I thought I had download_run_once and download_localhost set to true but it appears I cannot type. Sorry to waste anyone's time

I might have been too quick in closing this. I had set download_run_once and download_localhost in all.yml.
What I think is happening is that the "Register docker images info" in set_docker_image_facts.yml is always running on the nodes/masters even if download_run_once is set. On a clean install this will always result in pull_required being set.  I think this should delegate in the same way as the actual pull does. I will prepare a PR for this.


DS: Open untrusted notebooks as readonly

For #12148

[ ] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
[ ] Title summarizes what is changing.
[ ] Has a news entry file (remember to thank yourself!).
[ ] Appropriate comments and documentation strings in the code.
[ ] Has sufficient logging.
[ ] Has telemetry for enhancements.
[ ] Unit tests & system/integration tests are added/updated.
[ ] Test plan is updated as appropriate.
[ ] package-lock.json has been regenerated by running npm install (if dependencies have changed).
[ ] The wiki is updated with any design decisions/details.

Is interaction blocked via command palette commands?

Is interaction blocked via command palette commands?

@IanMatthewHuff not yet 😊
Also for anyone else reviewing this PR, I noticed that after trusting an untrusted notebook, shift+enter with the Monaco editor focused does nothing, but shift+enter with focus on the cell wrapper (i.e. the toolbar with run buttons etc.) works fine. Still working on a fix for that. Sorry!


Configure i18n for Portaljs

This pull request configures and setup i8n for Portal js. The configuration leads to the upgrading of nextjs from version 9.x to 10, due to the fact that it is very difficult to set up i18n for server-side Props.
The latest version of Nextjs gives the ability to switch from a different language using subpath, this makes providing language namespace easier.
Usecase
For subsequent users to add their language of choice, below are the steps to take

Update  next.config.js, to add more languages to the i18n locales

i18n: {
  locales: ['en', 'fr', 'nl-NL'], // add more language to the list
  defaultLocale: 'en',  // set the default language to use
},

Create a folder for the language in locales  --> locales/en-Us

In the language folder, different namespace files (json) can be created for each translation. For the index.js use-case, I named it common.json

// locales/en/common.json
{
   "title" : "Portal js in English",
}

// locales/fr/common.json
{
   "title" : "Portal js in French",
}

To used on pages using Server-side Props.

import { loadNamespaces } from './_app';
import useTranslation from 'next-translate/useTranslation';

const Home: React.FC = ()=> {
  const { t } = useTranslation();
  return (
    <div>{t`common:title`}</div> // we use common and title base on the common.json data
  );
};

export const getServerSideProps: GetServerSideProps = async ({ locale }) => {
      ........  ........
  return {
    props : {
      _ns:  await loadNamespaces(['common'], locale),
    }
  };
};

Go to the browser and view the changes using language subpath like this. http://localhost:3000 and http://localhost:3000/fr. Note The subpath also activate chrome language Translator

@steveoni looks good.

can you rebase so we can merge (merge conflict atm)
can you add some info to the README about how to use this (similar to what you have in PR description)

@steveoni looks good.

can you rebase so we can merge (merge conflict atm)
can you add some info to the README about how to use this (similar to what you have in PR description)

ok. I will do that now.

The conflict is now resolved and the readme is updated @rufuspollock

@steveoni I have left some comments. Also, please remove package-lock.json file as we are using yarn.lock and yarn by default. Having both lock files is risky as they can easily become out of sync.

@steveoni any updates on this PR? Please, check my review.

@steveoni any updates on this PR? Please, check my review.

I thought I'd made the changes last week but I've not. I'm sorry for that. I will do that today

@anuveyatsu


Initial Proposal for Restructuring Docs

This is a proposal for how we might restructure the documentation.
Goals

create a top level navigation structure that makes sense
ensure we have homes for future documentation
initially guide people based upon the tasks they're performing, rather than their roles

Top Level Navigation
The idea is that we take the user through an introduction (Overview) and then how to install the AzureTRE (Setup).
We then explain how Researchers and Workspace Owners would use the TRE (Using the TRE for Research).
Templates and Services lists the capabilities that can be deployed into the TRE. This is essentially a catalog, as well as technical docs.
Finally, Technical Guide contains docs relevant to the Azure Administrator and to Developers. Here, technical docs cover general admin, setting up AAD, and then developing (contributing) to the OSS project, or authoring templates.

Overview
Where users/readers start. This section should do enough to explain what this project is, and the overall architecture/approaches. It can then sign post to other sections for further details.
At the end of reading this section a user should have a good understanding of what a TRE is, what the AzureTRE might offer, the architecture, and then whether they want to deploy it.

Setup
This section covers the initial (non-CICD) instructions on deploying the TRE. The steps take the reader from zero to having their first Azure TRE installed.

Using the TRE for Research
This section is aimed at those who will provision workspaces (workspace owners) and those who will use workspaces (researchers). We don't have many documents in this section at the moment, but over time this would be where we'd add general "how to work in the AzureTRE" docs.

Templates and Services
This is essentially our catalog or showcase of the templates, workspace services, user services etc.

Technical Guide
Within the technical guide we have two major sections.

The first is aimed at those who will deploy and manage the azure resources.
The second is aimed at those who will write code that is deployed (be that the AzureTRE itself, or templates)

This section is quite large, but the idea is that everything related to administration and development is in one place, and then shares a single Troubleshooting section. The roles of developer and admin often overlap, hence the grouping, but we also want to keep this section out of the way from those who simply want to understand the project, or use the product.

TODO

[ ] markdown file/folder structure will need to be change
[ ] replace the coming-soon.md placeholder with real content for new sections
[ ] remove any coming-soon.md sections that we don't need or want right now

In principle I think it's good way forward, I wonder if Setup needs to come under technical guide?

I agree with the doc approach.
Looking ahead, TRE will have more complex features for TRE users to leverage. Ex: Airlock
This would require feature explanation (data movement, notification mechanism and how to extend it)
I'm started Airlock doc in #2082, and happy to align with this. It can be a good exercise to practice the new doc structure.
My view would be:
In Using TRE for Research we would describe Airlock import and export, data movement, approval & Notifications.
In Technical Guide > Development > Extending Azure TRE we could add Extending Notification mechanism

I like it - makes a clearer journey from zero, and I can see where I'd want to put new docs on features i'm working on

In principle I think it's good way forward, I wonder if Setup needs to come under technical guide?

@marrobi yeah, it could live there. I was trying to keep those initial "ok...so you want to give this a try" instructions near the top of the nav.
Maybe moving Setup into Technical Guide makes sense, and then having a single page called "Getting Started" in the Introduction to sign-point people, makes sense.

In other words, like this...

I like it, makes it quite clear where our future docs go. I think I'd have an easier time to onboard on TRE if docs were structured this way

@martinpeck , @marrobi , one area we should include in this new structure would be related to compliance. There's an issue already: #261

@martinpeck , @marrobi , one area we should include in this new structure would be related to compliance. There's an issue already: #261

Agreed. My plan would be that this would appear in the Overview section, either as part of the architecture or in a separate section. The idea is that casual visitors to the docs (those new to the project, those reviewing it for compliance, those reviewing it for architecture/costs/whatever) will find most of what they need in the first section

I could create a small number of section-specific "coming soon" pages if that softened the blow a little more

I'm also review the Airlock doc and make the PR Ready. #2082

Content for Coming Soon page:

/test-force-approve


Whatever I plant turns into wheat

I'm playing on the map Castelnaud, and whatever I'm planting or seeding turns into wheat. I've had this issue with version <IP_ADDRESS>, where it would also change the ground texture to a mulched wheat state and use an insane amount of seed. I saw Issue #32 and updated my version to the latest (12 hours ago as of now, <IP_ADDRESS>). That fixed the ground texture and the seed usage, but whatever I plant still turns into wheat. The log doesn't show anything of use either. It does this with basegame and modded seeders and planters. The state of the field doesn't seem to have an influence either but I'm not sure on that yet, I haven't tried all of them.
When I load the map without any mods other than Easy Development Controls, Additional Game Settings and Conservation Agriculture it works as intended. I have around 200 mods enabled so I was going to enable a group of mods and see if that breaks it, and repeat until it does. That's going to take me a while, so I was hoping that someone would have an idea where to start or what mod(s) could be causing this.

This is definitely a mod conflict, highly likely with another script mod.
What I usually do in a situation like that is:

Copy the save game into a different slot
Move half of the mods out of the mod directory into a temporary folder
Start the game and load into the save
If the problem persists: Stop the game and repeat from step 2 (with half of the leftover mods).
If the problem is no longer there: Stop the game, move half of the mods which you removed in the previous loop back into the mod folder, then repeat from step 3

After at most 8 loops, you should have found the mod in question, at which point I can look into why it's happening and if I can maybe work around it.

That's a smart way to go about it. Found out that when I turned LFHA ForageOptima Standard off, seeding and planting works as intended. But, when I tested LFHA with Conservation Agrilculture and nothing else, it worked fine. So there's another mod that influences either of the two. Now trying to figure out which one that could be.

It's a combination of LFHA and the Swathing Addon. With both of them enabled together with Conservation Agriculture, it only plants wheat. With only one of them enabled, doesn't matter which of the 2, it works fine. With both enabled and Conservation Agriculture disabled, it works fine too.

Now that's an interesting one. I'll look into it as soon as I get the chance, which might only be tomorrow evening, however

No idea if this information helps, but when I changed the SwathingAddon.onStartMission function in the SwathingAddon mod, and set it oat when terrainDataPlaneId == nil, it would plant everything as oat. I couldn't find where and why the fruitType.terrainDataPlaneId get set to nil or invalid data in either of the mods. It does this on basegame and modded maps. If there's anything I can do to make it easier for you to look into later this week, then let me know.

Ah that perfectly explains it then:

LFHA ForageOptima Standard adds a new fruit type without adding an associated density map.
I made a workaround for this by skipping such fruit types (see here)
SwathingAddon also made a workaround for this by assigning the wheat density map to such fruit types
This in turn makes it so my mod no longer ignores that fruit type, since the terrainDataPlaneId is no longer nil

=> I'm gonna have to find a different attribute which tells me the fruit type should be ignored

Should be fixed in the most recent commit
I won't create a release yet since I noticed heavily increased seed usage when field creation is turned on, but I haven't found a fix for that yet (might also only happen on certain maps, haven't had the time to test lately)

Awesome, that explains it indeed. I saw the issue you had raised on LFHA, too bad there's no response as to solving the missing density map, but at least this will work.
If I can help with testing the increased seed usage, I'm more than happy to do so.

uhm basically just turn on field creation on a seeder on any map and see if seeds start going down like mad (like 10% per 10 meters or so)

Sorry it took a while. Didn't have much time and had some issues with loading a game running out of memory (unrelated to this or the other 2 mods), but wanted to fix that first. I've not been able to do much testing, will hopefully be able to do that today, but I did notice that direct seeding while creating a field does indeed use a bunch of seed.

As you can see I don't have a lot of time myself. I do however believe I have know fixed the extreme seed usage for good in the most recent commit

I created a new release and will likely upload that one to modhub: https://github.com/Timmeey86/FS22_ConservationAgriculture/releases/tag/v<IP_ADDRESS>

Hahaha, I guess it's the same for everyone. I can confirm that that fixed the issue, great work, much appreciated, thanks!


Add a .gitignore to the proof directory

The common Makefile writes temporary files into the gotos, logs,
html, and report subdirectories of each proof directory by default.
This commit adds a .gitignore to be symlinked into the top-level proof
directory that ignores the contents of these directories, as
proof-writers will almost certainly want to have this file anyway.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Addressed offline comments by @markrtuttle


use apko_tags, slay the regexp monster

This produces the same list of tags as we got from the regexp monster previously, but comes with tests in the tf-apko repo and is written in Go.

The version-tags module is now just a wrapper for apko_tags. If we want to we can rip it out and inline apko_tags, but I don't know if it's worth it right now.


Expansion of Pester Test Suite

Codecov Report

Merging #58 into master will increase coverage by 41.5%.
The diff coverage is 83.33%.

@@            Coverage Diff             @@
##           master      #58      +/-   ##
==========================================
+ Coverage   42.64%   84.15%   +41.5%
==========================================
  Files          18       18
  Lines         265      265
  Branches        0        3       +3
==========================================
+ Hits          113      223     +110
+ Misses        152       39     -113
- Partials        0        3       +3

Impacted Files
Coverage Δ

BurntToast/Public/New-BTAudio.ps1
100% <ø> (+100%)
:arrow_up:

BurntToast/Public/New-BTButton.ps1
68.42% <ø> (+68.42%)
:arrow_up:

BurntToast/Public/New-BTAppId.ps1
100% <100%> (+16.66%)
:arrow_up:

BurntToast/Public/New-BTText.ps1
64.7% <100%> (ø)
:arrow_up:

BurntToast/Public/New-BTInput.ps1
81.25% <100%> (+81.25%)
:arrow_up:

BurntToast/Public/New-BTProgressBar.ps1
100% <100%> (+100%)
:arrow_up:

BurntToast/Public/New-BurntToastNotification.ps1
79.41% <50%> (+17.64%)
:arrow_up:

BurntToast/Public/Submit-BTNotification.ps1
68.42% <0%> (-5.27%)
:arrow_down:

BurntToast/Public/New-BTBinding.ps1
83.33% <0%> (+11.11%)
:arrow_up:

... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 584a60b...fe6ef23. Read the comment docs.


ACE: Fixed incorrect display of loop mode when editing a property

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

Snapshot stored with reference name:
refs/pull/14594/merge
Test environment:
https://babylonsnapshots.z22.web.core.windows.net/refs/pull/14594/merge/index.html
To test a playground add it to the URL, for example:
https://babylonsnapshots.z22.web.core.windows.net/refs/pull/14594/merge/index.html#WGZLGJ#4600
Links to test babylon tools with this snapshot:
https://playground.babylonjs.com/?snapshot=refs/pull/14594/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/14594/merge
https://gui.babylonjs.com/?snapshot=refs/pull/14594/merge
https://nme.babylonjs.com/?snapshot=refs/pull/14594/merge
To test the snapshot in the playground with a playground ID add it after the snapshot query string:
https://playground.babylonjs.com/?snapshot=refs/pull/14594/merge#BCU1XR#0


[ repo ]: Configure packages to use eslint-config-sistent

Current Behavior

Desired Behavior

Implementation

Acceptance Tests

Mockups

Contributor Guide

🎨 Wireframes and designs for Layer5 site in Figma (open invite)

want to take this up, could you please describe the implementation/give some underlying context?


Synchronous XMLHttpRequest error

Today this error began to appear.
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience.
Any button that I click refreshes the page, I have looked in several places and found no solution.
Any idea?

Hi there @Geovanek ,
That's a jQuery issue for sure and this should help get through this :)

We will close this for now but feel free to reopen it when you want.


automated tests fail on osX due to issues with ROOT

A bunch of the travis CI tests fail on osX, ultimately due to problems with pyROOT/ROOT.
Tests work fine on linux now, as well as locally on my laptop. Any ideas? @grburgess @giacomov
>   import libPyROOT as _root
E   ImportError: dlopen(/Users/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/libPyROOT.so, 2): Library not loaded: @rpath/libssl.1.0.0.dylib
E     Referenced from: /Users/travis/miniconda/envs/test-environment/lib/root/libNet.5.so
E     Reason: image not found
../../../miniconda/envs/test-environment/lib/python2.7/site-packages/ROOT.py:103: ImportError

Looks like a problem with openssl. Can you try fixing the version of openssl in meta.yml for 3ML to 1.0?

This doesn't seem to be an issue anymore.


Move from rye-up.com to rye.astral.sh

Summary
We're having issues with rye-up.com. We're trying to recover it but need to work with the registrar. In the interim, I'm going to move the docs and installers to rye.astral.sh. When rye-up.com is recovered, we can redirect, either from rye.astral.sh to rye-up.com or vice versa.
Closes #1111.

I personally like rye.astral.sh more than rye-up.com, as it hints the existence of the awesome landing page at astral.sh


[uwhdr] Timing of buzzer / clock start

Game clock currently starts at the end of the buzzing sound, but really it should happen at the beginning.

uwhdr got moved to its own repository.


Relax dependency on sassc

sassc is now in 2.0.1, but we are unnecessarily restraining it to:
spec.add_dependency "sassc", "~> 1.12.1"

in isodoc.gemspec.
This task is to relax and test again a newer version. This is necessary to stop the installation of the deprecated sass gem. (https://github.com/metanorma/metanorma-build-scripts/issues/6)

You're not going to be seeing any gem release in Metanorma until Andrej has updated all Relaton gems.

Confirmed against metanorma-standoc and metanorma-iso

Thank you @opoudjis !


AssertionError: bad box: x1 larger than x2

Hello, dear author! When I train YOLOF with my own dataset, an error occurs. The error is as follows: File "G:\Anaconda3\envs\xyy_detectron2\lib\site-packages\fvcore\nn\giou_loss.py", line 32, in giou_loss
assert (x2 >= x1).all(), "bad box: x1 larger than x2"
AssertionError: bad box: x1 larger than x2
Always run a few epochs will report such an error, try to comment out the assertion, the loss will be nan. How to solve this problem? I would be very grateful if you could help me.

Hi, you can post your full training log file here. I will try to help.

Thank you very much for replying to me. This is my latest training log file.
log.txt

It seems that you modify the config according to your experimental environment. If the batch size is smaller than the original setting, you may need to adjust the learning rate, the warm up iterations, the iteration steps. You can find an example in this response.

Thank you very much for your patient reply, I will try again according to your opinion.

Thank you very much for your suggestion, I have run through the program.


chore: bdd-spring-1586608268 to 0.0.1

chore: Promote bdd-spring-1586608268 to version 0.0.1

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:
If they are not already assigned, you can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


Lack of documentation

How to run this project, please ? I already cloned this project in VScode, installed docker and the required libraries.

Thank for your request. This is currently a work in progress and we will have documentation up pretty soon.

Documentation added via commit: cced733f24a0b9fce22bd496122c0b5bebeabc66


[BUG] AC Current_Temperature stops updating after less than 1 day

Describe the bug
I have set up my ThinQ smart AC unit with home assistant now but the current room temperature readout
(current_temperature attribute) of the AC seems to be stuck at 26°C since yesterday.
Note that I have set up the integration only 2 days ago. A Restart has not helped.
https://pastebin.com/hNf53kXk Device Diagnostics
Screenshots
If applicable, add screenshots to help explain your problem.
Environment details:
{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2022.5.3",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.9.9",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/Berlin",
    "os_name": "Linux",
    "os_version": "5.10.108",
    "supervisor": "2022.05.1",
    "host_os": "Home Assistant OS 7.6",
    "docker_version": "20.10.9",
    "chassis": "vm",
    "run_as_root": true
  },
  "custom_components": {
    "hacs": {
      "version": "1.24.5",
      "requirements": [
        "aiogithubapi>=21.11.0"
      ]
    },
    "smartthinq_sensors": {
      "version": "0.13.0",
      "requirements": [
        "pycountry>=20.7.3",
        "xmltodict>=0.12.0"
      ]
    }
  }

"lge_devices": {
      "AC": {
        "AC:d27e4c00-7149-11d3-80c0-a06faae8df8b": {
          "device_info": {
            "modelName": "RAC_056905_WW",
            "subModelName": "",
            "deviceType": 401,
            "deviceCode": "AI01",
            "alias": "AC Markus",
            "deviceId": "d27e4c00-7149-11d3-80c0-a06faae8df8b",
            "fwVer": "2.6.7_RTOS_3K",

(More in pastebin above)
Output of HA logs
Paste the relavant output of the HA log here.
(Exception in set_temperature) but unrelated to this issue probably
https://pastebin.com/j4CKm1fE

I've noticed, that this bug is kind of inconsistant.
The temperature updates on an irregular basis


[FLINK-10803] Update the documentation to include changes to the S3 connector.

This PR simply documents already introduced changes.
To build the docs and verify the change go to the FLINK_DIR/docs/ directory and run ./build_docs.sh -p. The documentation will be available at localhost:4000.

R @GJL , @twalthr , @aljoscha

I think the changes look good modulo the comments @zentol  and I had.

Thanks a lot for the comments @zentol and @aljoscha ! I will integrate them and merge.


Issue with GPG commit

Hi, I can't commit using git-plus because I have this message showing up :

Here is some details about my setup :

$ where gpg
/usr/local/bin/gpg
$ which gpg
/usr/local/bin/gpg
$ gpg --version
gpg (GnuPG/MacGPG2) 2.0.30
libgcrypt 1.7.0
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: ~/.gnupg
Algorithmes pris en charge :
Clef publique : RSA, RSA, RSA, ELG, DSA
Chiffrement : IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256,
TWOFISH, CAMELLIA128, CAMELLIA192, CAMELLIA256
Hachage : MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression : Non compress'e, ZIP, ZLIB, BZIP2
$ atom --version
Atom    : 1.9.8
Electron: 0.37.8
Chrome  : 49.0.2623.75
Node    : 5.10.0

git-plus 5.16.2
And also I have no-tty in my ~/.gnupg/gpg.conf

I don't think this is package specific. Check out https://github.com/isaacs/github/issues/675 and this reddit thread

For anyone who finds this issue, this is what I did to get it working:
git config --global gpg.program $(which gpg)
echo "no-tty" >> ~/.gnupg/gpg.conf


feat: forbid default export backend

Oh, why so? Is default some kind of a problem?

Oh, why so? Is default some kind of a problem?

https://basarat.gitbook.io/typescript/main-1/defaultisbad

https://basarat.gitbook.io/typescript/main-1/defaultisbad

@masterborn/developers-backend any1 with their voice? :) My justification is that you should use 1 class per 1 file so generally, this shouldn't be a problem, the only case for it are types, tho just general rule of not using type file default may be good over here I suppose 🤔

Some good points, especially for discoverability/auto-complete and typos. Some of the others are less convincing.
Could be a good step for consistency as well, especially if we have cases of multiple exports. 👍

@Kretolus can you give approve if you are OK with this change? thank you in advance!

Accepts here!

Should this be merged?

@amaro0 go for it I suppose :)

Need one approve :)


No store found on Linux

Hi, when using this boilerplate, redux-devtools prints the deadly No store found. message, though there are no error on installing it. I use the last version of the boilerplate, though this issue also appeared on the version I used some months ago. Weird part is that it seems to only happen on Linux (Ubuntu 16.03).
Note : window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ is undefined when running yarn dev, which might explain the problem. But yet the installation does not seem to fail.
Here is a sample of my modified code, but once again I can reproduce on a just created app:
/ If Redux DevTools Extension is installed use it, otherwise use Redux compose
/* eslint-disable no-underscore-dangle */
const composeEnhancers = ((typeof window !== 'undefined') && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) ?
  window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({
    // Options: http://extension.remotedev.io/docs/API/Arguments.html
    actionCreators,
  }) :
  compose;

export default function configureStore(
  initialState: Object = {},
  middlewares: Array<*> = [],
  sagas: Array<Generator<*, *, *>> = []
): Store {
  /* eslint-enable no-underscore-dangle */
  const enhancer = composeEnhancers(
    applyMiddleware(...middlewares),
    // If I uncomment this, this will work on Ubuntu, but breaks both Storybook and Windows, saying the store is loaded twice...
    //! (typeof window !== 'undefined') && window.devToolsExtension ? window.devToolsExtension() : f => f
  );

This might be related to this issue:.

All the CI tests run on linux pass. You may have incorrectly configured something

All the CI tests run on linux pass. You may have incorrectly configured something


niti: fix escaping in with

Possible escape flag was let as is in the finish code of a with statement, that caused issues when executing complex code. The correct semantic is to temporarily clear any escape flag while executing the finish.
If an uncatched espace mark is generated while executing the finish, it takes precedence over the possible old one.

@BlackMinou can you test this with your abort/catch case?


complete implementation of Holographic Perception Simulation Playback

This change adds methods for the remaining Holographic Perception Simulation Playback APIs and the relevant data context objects.
Resolves issue #70

Hi @davidkline-ms, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

It looks like you're a Microsoft contributor (David Kline (XBOX)). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;


arte.tv m3u8 download results in mp4 file with m3u8 extension

Checklist

[x] I'm reporting a broken site support
[x] I've verified that I'm running youtube-dl version 2020.11.18
[x] I've checked that all provided URLs are alive and playable in a browser
[x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[x] I've searched the bugtracker for similar issues including closed ones

Verbose log
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.arte.tv/de/videos/100605-013-A/united-we-stream-november-lockdown-edition-13/', '-f', 'HLS_XQ_1']
[debug] Encodings: locale cp1252, fs utf-8, out cp1252, pref cp1252
[debug] youtube-dl version 2020.11.18
[debug] Python version 3.8.6 (CPython) - Windows-10-10.0.19041-SP0
[debug] exe versions: phantomjs 2.1.1
[debug] Proxy map: {}
[arte.tv:+7] 100605-013-A: Downloading JSON metadata
[arte.tv:+7] 100605-013-A: Checking HTTPS_MQ_1 video format URL
[arte.tv:+7] 100605-013-A: Checking HTTPS_EQ_1 video format URL
[arte.tv:+7] 100605-013-A: Checking HTTPS_HQ_1 video format URL
[arte.tv:+7] 100605-013-A: Checking HTTPS_SQ_1 video format URL
[arte.tv:+7] 100605-013-A: Checking HLS_XQ_1 video format URL
[debug] Invoking downloader on 'https://arteconcert-vh.akamaihd.net/i/am/concert/100000/100600/100605-013-A_0_VO_AMM-CONCERT-NEXT_XQ.1RS1K1DXZ34.smil/master.m3u8'
[download] Destination: United we Stream November Lockdown Edition #13-100605-013-A.m3u8
ERROR: m3u8 download detected but ffmpeg or avconv could not be found. Please install one.

(the download is not starting because i have omitted the ffmpeg option, however the resulting filename is shown
Description

WRITE DESCRIPTION HERE
When downloading from arte.tv with m3u8 urls using the HLS_XQ_1 option, the resulting filename is set to be filename.m3u8 which is incorrect, it should be mp4.

I have the same problem. the output file should be a video file, but is set to be filename .m3u8. anyone can tell me how to solve it?

I have the same problem. the output file should be a video file, but is set to be filename .m3u8. anyone can tell me how to solve it?

@JNULYD i believe the issue was fixed with a commit in November, maybe you can update your client and check again
it should be possible to rename the file to .mp4 if is saved as m3u8 and is in fact the full file

@JNULYD i believe the issue was fixed with a commit in November, maybe you can update your client and check again
it should be possible to rename the file to .mp4 if is saved as m3u8 and is in fact the full file


Questions for AWUDS folks

In comparison datasets, do missing data descriptions mean different things? E.g. Null, No Data, ****, empty cells
Is there a standard structure for headers (esp when merged cells are involved)? It is difficult for R to understand merged column names. The basic tables datasets have a lot of merged column names. See my issue for the readxl package: https://github.com/hadley/readxl/issues/166

See below
The headers change based on the compilation year, area type, and data storage option selections the user made at the time the data set was created.

AWUDS only has the ability to output data directly into Excel.
Only 1 dataset can be output at a time with the exception of the compare 2 datasets report.
A dataset contains annual values for 1 State, 1 Area Type, and 1 year.
You can not output multiple years in a report.
A value is either entered by the user or calculated by AWUDS.
A value is associated to 1 water-use category.
A category has a code and a long name, e.g. IN, Industrial.
Categories come and go with time.
A value is associated to 1 data element.
A data element has a number, a code, and a name.
e.g.
number: 61
code: WSWSa
Name: self-supplied surface-water withdrawals, saline, in Mgal/d
A data element is associated to 1 category.
A data element tag is the concatenation of the category code and data element code.
e.g. IN-WSWSa
Users should know what the value is by its data element tag.
The long name of the data element tag would be:
Industrial, self-supplied surface-water withdrawals, saline, in Mgal/d
A dataset has a fixed set of data elements.
The fixed set of data elements change over time.
A dataset has a fixed set of areas: states, counties, huc4, huc8, aquifer, or countyaquifer areas.
Areas come and go with time, the areas are tagged with a year range in which they exist.
AWUDS datasets are based on calendar years.
A dataset has a fixed set of areas based on the calendar year.
AWUDS has a defualt file naming convention.
The user can override the default file name and name the files anything they want.
The user has a few choices of what data elements will be entered that is determined when the dataset is created.
Once the set of data elements have been chosen and the dataset created the set of data elements cannot be changed.
Export-Wisconsin-County-2005.xlsx
Export report for Wisconsin for Counties in 2005.
The export report only contains values the user entered.
The export report does not include calculations.
The set of worksheets and worksheet names are not static, they change based on State, Area Type, and Year.
Each worksheet is labeled with the category code for those categories that existed for county data in 2005 for the data element choices the user made when the dataset was created.
The first column is always called Area.
The first column has the area code.
The first column cell comment has the area name.
Only areas that existed in 2005 are listed.
Only areas that the user choose to output are listed.
Only category tabs the user choose to output are listed.
Line 2 contains the Dataset Name.
The State, Area Type, Year, and Dataset Name make the dataset unique.
Blank cells means no data was entered, it does not mean zero.
If a value was zero, then the user would have entered zero.
Basic-Tables-by-Category-Wisconsin-County-2005.xlsx
Basic-Tables-by-Category (BTBC) report for Wisconsin for Counties in 2005.
BTBC is different from export in that:
The BTBC report contains both entered data and calculations.
The user can output either the area code, area name, or both as either
the first or first and second columns.
Blank cells means no data was entered, it does not mean zero.
If a blank cell is included in a calculation then the result is a blank cell.
The report includes a total line.
Because of the blank cell rule, a total can be blank.
**** means a divide by zero occurred.
The BTBC is the only report having grand total summary tabs.
TS, total surface water
TG, total groundwater
TO, toals
TW, total SW and GW
NOTE the file I sent had an error in the name State should have been County:
Compare-Data-for-2-Datasets-Wisconsin-County-2005-vs-2010.xlsx
Compare-Data-for-2-Datasets report for Wisconsin for Counties in 2005 compared to 2010.
Compare-Data-for-2-Datasets is different from BTBC in that:
Datasets being compared can have a different set of data elements.
No DataElement means the data element does not exist in that dataset.
No Calulation means the calculation cannot be preformed in that dataset.
Null means the value is null, no data was entered, the value is not zero, its nothing.
**** means a divide by zero occurred.
No Data means a calculation could not be preformed because of null values.

AWUDS does have a dump program that dumps data as described here:
http://nwis.usgs.gov/awuds/dump/instructions_awuds_dump.html
The files have standard headers that do not change, and all possible data elements
and calculations are included in the dump. If a data element or calculation does not exist for a dataset then those columns are null.
Included in the dump directory is a sub-directory of MS Access Databases. The databases can be used to link to the tab delimited dump files in read-only mode. A script in the database can be used to reset the links.
The down side ... the dump includes non-approved data.
AWUDS access is done with Active Directory and is controlled by the AWUDS client.
http://nwis.usgs.gov/IT/awuds/awudsgroups.htm
If a user is in a group then they have WRITE access and can see non-approved data
for the listed state. Users in group IGSGRESTONVA-M HQ W NWULT can also see everything.
All other users have READ access and should only see approved data.
The dump file by-passes security.
If the dump files are used, then somehow the data will need to be filtered to avoid showing people non-approved data when they should not have access to view it.
e.g of a header:
head ahuc8_pc.txt
STUDY   DATASETNAME     BESTAVAILABLE   USSTATEALPHACODE        STATECODE       HUCCODE USSTATEHUCCODE  HUCNAME YEAR    PC-WGWFr        PC-WGWSa        PC-WGWTo        PC-WSWFr        PC-WSWSa        PC-WSWTo        PC-WFrTo        PC-WSaTo        PC-WTotl        PC-PSDel        PC-WDelv        PC-CUsFr        PC-CUsSa        PC-CUTot        PC-Power        PC-RecWW        PC-Facil

In conversation with water use information leadership, we determined that regional staff and people who would otherwise have access to the dump file, should be able to read it in and work with it in this tool. Users who should not have access to the dump file or are working on data that has not made it to the national dump file yet will need to make multiple exports from AWUDS according to their local privileges using the excel format.

Another option is the Multi State Dataset (MSD) output. Users have the ability to identify a set of datasets to output in the same report. There can be a set of 1 datasets. For some QA work users will likely want to see neighboring States datasets.
The advantage of using a MSD is that the MSD Export program uses the same views as the dump program. And the MSD export includes both entered data elements and calculations, like the dump output. The header line is much easier to read than the Basic Tables by Category report, no merged headers. The rules for what the user sees remains intact. If you have READ access to a State you only see approved data for that State.
The down side, the user has to create the MSD dataset. However, that is a one time task.
This is an example, it was included in the sample output:
Export-MyRegion-UserCreated-msd-2010.xlsx

From what I remember, our decision was to use the national dump file for regional and national review activities because the reviewers felt like creating the MSD dataset would be too onerous. But it's good to have the full breadth of possibilities on the record. Thanks @twaugens-usgs!


Trim Video

Does anyone know how to trim a video with the library. I find some solution in stackoverflow, but it always return the video from 0 second to 15 second, not matter what startMs and endMs. Does anyone know how to fix it? Thanks!
String src = "/storage/emulated/0/Video/my.mp4";
        String des = FileUtil.getVideoDirectory();
        File file = new File(src);
        long startMs = 15000;
        long endMs = 25000;
        try {
            VideoUtil.startTrim(file, des, startMs, endMs);

        } catch (IOException e) {
            e.printStackTrace();
            Log.e(TAG,"startTrim error " + e.getMessage());
        }

@SuppressWarnings("ResultOfMethodCallIgnored")
    public static void startTrim(@NonNull File src, @NonNull String dst, long startMs, long endMs) throws IOException {
        final String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.US).format(new Date());
        final String fileName = "MP4_" + timeStamp + ".mp4";
        final String filePath = dst + fileName;

        File file = new File(filePath);
        file.getParentFile().mkdirs();
        Log.e(TAG, "Generated file path " + filePath);
        genVideoUsingMp4Parser(src, file, startMs, endMs);
    }

    @SuppressWarnings("ResultOfMethodCallIgnored")
    private static void genVideoUsingMp4Parser(@NonNull File src, @NonNull File dst, long startMs, long endMs) throws IOException {
        // NOTE: Switched to using FileDataSourceViaHeapImpl since it does not use memory mapping (VM).
        // Otherwise we get OOM with large movie files.
        Movie movie = MovieCreator.build(new FileDataSourceViaHeapImpl(src.getAbsolutePath()));

        List<Track> tracks = movie.getTracks();
        movie.setTracks(new LinkedList<Track>());
        // remove all tracks we will create new tracks from the old

        double startTime1 = startMs / 1000;
        double endTime1 = endMs / 1000;
        Log.e(TAG,"startTime1 " + startTime1 + ", endTime1 " + endTime1 );

        boolean timeCorrected = false;

        // Here we try to find a track that has sync samples. Since we can only start decoding
        // at such a sample we SHOULD make sure that the start of the new fragment is exactly
        // such a frame
        for (Track track : tracks) {
            if (track.getSyncSamples() != null && track.getSyncSamples().length > 0) {
                if (timeCorrected) {
                    // This exception here could be a false positive in case we have multiple tracks
                    // with sync samples at exactly the same positions. E.g. a single movie containing
                    // multiple qualities of the same video (Microsoft Smooth Streaming file)

                    throw new RuntimeException("The startTime has already been corrected by another track with SyncSample. Not Supported.");
                }
                startTime1 = correctTimeToSyncSample(track, startTime1, false);
                endTime1 = correctTimeToSyncSample(track, endTime1, true);
                timeCorrected = true;
            }
        }

        Log.e(TAG,"after correctTimeToSyncSample startTime1 " + startTime1 + ", endTime1 " + endTime1 );

        for (Track track : tracks) {
            long currentSample = 0;
            double currentTime = 0;
            double lastTime = -1;
            long startSample1 = -1;
            long endSample1 = -1;

            for (int i = 0; i < track.getSampleDurations().length; i++) {
                long delta = track.getSampleDurations()[i];

                if (currentTime > lastTime && currentTime <= startTime1) {
                    // current sample is still before the new starttime
                    startSample1 = currentSample;
                }
                if (currentTime > lastTime && currentTime <= endTime1) {
                    // current sample is after the new start time and still before the new endtime
                    endSample1 = currentSample;
                }
                lastTime = currentTime;
                currentTime += (double) delta / (double) track.getTrackMetaData().getTimescale();
                currentSample++;
            }
            Log.e(TAG,"startSample1 " + startSample1 + ", endSample1 " + endSample1 );
            movie.addTrack(new AppendTrack(new CroppedTrack(track, startSample1, endSample1)));
        }

        dst.getParentFile().mkdirs();

        if (!dst.exists()) {
            dst.createNewFile();
        }

        Container out = new DefaultMp4Builder().build(movie);

        FileOutputStream fos = new FileOutputStream(dst);
        FileChannel fc = fos.getChannel();
        out.writeContainer(fc);

        fc.close();
        fos.close();

        Log.e(TAG,"startTrim success " );

    }

    private static double correctTimeToSyncSample(@NonNull Track track, double cutHere, boolean next) {
        double[] timeOfSyncSamples = new double[track.getSyncSamples().length];
        long currentSample = 0;
        double currentTime = 0;
        for (int i = 0; i < track.getSampleDurations().length; i++) {
            long delta = track.getSampleDurations()[i];

            if (Arrays.binarySearch(track.getSyncSamples(), currentSample + 1) >= 0) {
                // samples always start with 1 but we start with zero therefore +1
                timeOfSyncSamples[Arrays.binarySearch(track.getSyncSamples(), currentSample + 1)] = currentTime;
            }
            currentTime += (double) delta / (double) track.getTrackMetaData().getTimescale();
            currentSample++;

        }
        double previous = 0;
        for (double timeOfSyncSample : timeOfSyncSamples) {
            if (timeOfSyncSample > cutHere) {
                if (next) {
                    return timeOfSyncSample;
                } else {
                    return previous;
                }
            }
            previous = timeOfSyncSample;
        }
        return timeOfSyncSamples[timeOfSyncSamples.length - 1];
    }

@Allansk2 Ever figure this out?
Also the video that is created, is it H264 codec or MPEG4?

@avanibhatnagar
        try {

            Movie orig_movie = MovieCreator.build(videoInput);

            File audioFile = new File(audioPath);

            AACTrackImpl aacTrack = new AACTrackImpl(new FileDataSourceImpl(audioFile));

//get duration of video
            IsoFile isoFile = new IsoFile(videoPath);
            double lengthInSeconds = (double)
                    isoFile.getMovieBox().getMovieHeaderBox().getDuration() /
                    isoFile.getMovieBox().getMovieHeaderBox().getTimescale();

            Track track = (Track) orig_movie.getTracks().get(0);

            Track audioTrack = (Track) aacTrack;

            double startTime1 = 0;
            double endTime1 = lengthInSeconds;

            boolean timeCorrected = false;

            if (audioTrack.getSyncSamples() != null && audioTrack.getSyncSamples().length > 0) {
                if (timeCorrected) {

                    throw new RuntimeException("The startTime has already been corrected by another track with SyncSample. Not Supported.");
                }
                startTime1 = correctTimeToSyncSample(audioTrack, startTime1, false);
                endTime1 = correctTimeToSyncSample(audioTrack, endTime1, true);
                timeCorrected = true;
            }

            long currentSample = 0;
            double currentTime = 0;
            double lastTime = -1;
            long startSample1 = -1;
            long endSample1 = -1;

            for (int i = 0; i < audioTrack.getSampleDurations().length; i++) {
                long delta = audioTrack.getSampleDurations()[i];

                if (currentTime > lastTime && currentTime <= startTime1) {
                    // current sample is still before the new starttime
                    startSample1 = currentSample;
                }
                if (currentTime > lastTime && currentTime <= endTime1) {
                    // current sample is after the new start time and still before the new endtime
                    endSample1 = currentSample;
                }

                lastTime = currentTime;
                currentTime += (double) delta / (double) audioTrack.getTrackMetaData().getTimescale();
                currentSample++;
            }

            CroppedTrack cropperAacTrack = new CroppedTrack(aacTrack, startSample1, endSample1);

            Movie movie = new Movie();

            movie.addTrack(track);
            movie.addTrack(cropperAacTrack);

            Container mp4file = new DefaultMp4Builder().build(movie);

            FileChannel fc = new FileOutputStream(new File(output)).getChannel();
            mp4file.writeContainer(fc);
            fc.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
}
   private static double correctTimeToSyncSample(Track track, double cutHere, boolean next) {
        double[] timeOfSyncSamples = new double[track.getSyncSamples().length];
        long currentSample = 0;
        double currentTime = 0;
        for (int i = 0; i < track.getSampleDurations().length; i++) {
            long delta = track.getSampleDurations()[i];

            if (Arrays.binarySearch(track.getSyncSamples(), currentSample + 1) >= 0) {
                timeOfSyncSamples[Arrays.binarySearch(track.getSyncSamples(), currentSample + 1)] = currentTime;
            }
            currentTime += (double) delta / (double) track.getTrackMetaData().getTimescale();
            currentSample++;

        }
        double previous = 0;
        for (double timeOfSyncSample : timeOfSyncSamples) {
            if (timeOfSyncSample > cutHere) {
                if (next) {
                    return timeOfSyncSample;
                } else {
                    return previous;
                }
            }
            previous = timeOfSyncSample;
        }
        return timeOfSyncSamples[timeOfSyncSamples.length - 1];
    }

When I have to trim the 6-sec video like startTime on 1sec and endTime 5sec then getSyncSamples give the timeOfSyncSample always 0.0

Hey @vijendrapatidar. It is a bit late but were you able to solve your problem here?