Refactor to library and cli part

Fixes #461
Todo
Library

[ ] replace removed anyhow result with suited ErrorKinds

[ ] mostly done, but rustic_core/backend/stdin.rs is missing

[x] replace anyhow bail! macro at places with returning library errors

[x] research: which errors does the library part expose? (search for usage of bail! macro)

[X] introduce feature flags for clap, merge, and serde -> combine them under cli feature flag

[X] default-features = ["serde"]

CLI

[ ] reimplement commands based on Runnable trait

[ ] check src/commands/start.rs for implementation details

Notes

some errors don't make sense to be bubbled up with ?, we need to introduce a field on an ErrorKind for them

// in ArchiverError
/// `{0:?}`
FromPacker(#[from] PackerError),
/// `{0:?}`
FromTree(#[from] TreeError),

Hi @simonsan
Just had a short glance at abscissa but I think I didn't yet fully get how the framework exactly works.
What I think I understood:

we should use library error handling like you already started to implement (Thanks a lot!)
logging should be already working as abscissa supports the log crate
the CLI command structure is already pretty good, everything already lives under src/commands
abscissa uses a config, pretty similar to what rust uses in src/commands/configfile.rsand mainly some renaming/moving must be done.
It is right that rustic currently uses the same structs for defining config file sections and CLI options and therefore derives clap::Parser as well as Deserialize. I think we should keep this in the first run. We can later decide if we should change something. The good point is that the commands which do config overwrites have all struct which also derive merge::Merge and therefore config::Overwrite can be easily implemented by just calling merge from the Merge trait.

Some points that may need some thinking:

There are progress bars within many functions which is currently implemented by generating and passing an indicatif::ProgressBar struct. I'd think that in order to use in a library we should make this generic over some Progress trait which is trivially implemented by indicatif::ProgressBar and use indicatif::ProgressBar only in the CLI command(s).
There are few other topics in the commands/helper.rs which need to be tackled.
Besides progress bars and logs, some commands do produce output, e.g. backup, snapshots, repoinfo, forget, prune, see the println! usage. This should be moved to suitable structs (many are obvious like backup producing a SnapshotFile, snapshots producing a Vec<SnapshotFile>)

Thanks again for tackling this issue and don't hesitate to call out for help or directions!

Any ideas what's better, because I think it's really important to decouple there. Keeping the clap part in a library does ~doesn't make my brain super happy~ gives me a bit of headache, tbf :D

My suggestion:
The Parser/Args impl should be hidden behind a clap feature flag and Deserialize impl should be hidden behind a serde feature flag (and maybe the same for Merge/merge) for the config option structs which we expose in a library crate. The  CLI crate could then use the library with this features and doesn't have to redefine them.
Another crate just using the the library could manually set the option structs. I would also make all fields pub and impl Default for these structs, so it can be easily used. Another possibility, of course, would be to implement the builder pattern.

EDIT: But also in general I wonder how the approach is for (De)-Serialization? Especially the serde_as seems important?

serde_as is currently mainly used when struct don't implement Deserialize - mostly when FromStr is already implemented - or for binary data that is in fact serialized as BASE64.

Are you reachable via a platform that allows faster communication than this one, e.g. Discord, Matrix, IRC, Telegram?

I'll look for a way to communicate. However, I may be reachable only at some awkward times as I have some other responsibilities like job and family/children... ;-)

Ah, just saw one thing: The structs under repofiles should still always implement Serialize and Deserialize as the repository format is JSON and we need to read/write to the repository also when called as library.

So maybe it doesn't make sense to add the serde feature, as we will anyway depend on serde.

Status update: Library builds now on openSuse Tumbleweed. rocket

Wow! Great!
About interface tests:

This is the full output though, over 5k lines. Used for CI basically.
Could you please take a look at it and give an opinion what needs to be changed there?

Uhmm - actually didn't read through the 5k lines :-) I also don't know if we should expose really all this as public interface. Most likely not..
Generally about the interface:
In the commands there is currently loads of logic. I actually would start with only exposing this functionality to a public interface, i.e. something like rustic_core::snapshots(..), rustic_core::backup(..) and so on...
This would then be a very tight library interface which could be extended later step-by-step with more lower-level APIs (like manually opening a repository or later defining a user-defined backend and use this to open a repository, ...)

If you like I can sketch this in a separate PR.
Also, I'm wondering that now the error types have been overworked if it would make sense to just use this in a first-start PR which we could merge pretty fast. Thinking about getting to the split library/CLI step-by-step...
The next days I unfortunately have only few time - weekend is family-time and in Germany the 1st of May is a holiday...

I created a Discord channel: https://discord.gg/zGZsfkZue6
This evening I'll try to be there at around 21:15 MET (depends on when kids are in bed).
I never used Discord before, so hope everything works out ;-)


Bolt task should allow 'run_as' with restrictive sudo rules

Describe the Bug
Similar to https://github.com/puppetlabs/bolt/issues/1732 and https://github.com/puppetlabs/bolt/issues/1506.
Currently, when executing a task that requires to run_as a different user, Bolt scp's the task to remote nodes and then attempts to chown the tmpfile, presumably so that the task can be read by the run_as user.
Out of the box, it performs this chown by executing /bin/sh -c cd; chown -R <user>:<group> /tmp/<tmpfile> via sudo.
If the user in question does not have sudo access to /bin/sh, this results in:
Could not change owner of '/tmp/94012c72-63e7-43b2-90a2-a4ba6cdf7232' to <user>: Sorry, user <bolt_user> is not allowed to execute '/bin/sh -c cd; chown -R <user>:<group> /tmp/94012c72-63e7-43b2-90a2-a4ba6cdf7232' as root on <node>.

Unfortunately allowing users sudo access to /bin/sh is effectively handing over the keys to the kingdom and is impractical for high-security environments.
Expected Behavior
I expect that we would be able to either define a chown command in inventory or (my preference) that Bolt would directly execute sudo <path>/chown so that administrators could capture that in their sudoers. Alternatively, Ansible gets around this by using setfacl, so thats another approach that is arguably a lot cleaner.
Steps to Reproduce

Have a user that has explict access to a limited number of sudo commands (not including /bin/sh)
Execute a task with a run_as argument

Environment

Version 2.9.0
Platform RHEL7.x

Is the run-as value another non-privileged user or are you trying to  --run-as root in this case?

It's a regular, non-privileged user.

Not stale.
Currently, we're manually supplying sudo in our custom tasks as using --run-as root requires us to give the non-privileged user - bolt in our case - the following sudo rules (where /home/bolt/tmp is the tmp dir):
bolt ALL=(ALL) NOPASSWD:/usr/bin/sh -c cd; chown -R root\:0 /home/bolt/tmp/*
bolt ALL=(ALL) NOPASSWD:SETENV:/usr/bin/sh -c cd; /home/bolt/tmp/*
bolt ALL=(ALL) NOPASSWD:SETENV:/usr/bin/sh -c cd; /home/bolt/tmp/*/*/*/*
bolt ALL=(ALL) NOPASSWD:/usr/bin/sh -c cd; rm -rf /home/bolt/tmp/*

As @breca remarks, this basically gives the user keys to the kingdom since you are able manipulate these rules by creating an arbitrary file under /home/bolt/tmp with some malicious commands which you can then execute, allowing you to run anything as that user. This is especially bad news when you require root for package or service management, for example.
While this does require you being able to log into the machine and get access to the bolt user, preventing this mechanism all-together would be a cleaner solution imho.
We're considering making retrofitted forks of built-in Bolt tasks such as package and service where sudo is used for each command that requires the elevated privileges, which we can then cleanly capture in our sudo rules and ultimately skip --run-as .
I'd be interested to see if @breca 's proposed solutions would be viable. Despite my limited knowledge in Ruby, I'd be happy to help out where possible! Alternatively, I'm also open for advice if anyone has a cleaner method in mind :)
Thanks in advance!

I'm having a hard time parsing out exactly what issues you are having here. Is the root of the issue that you dont want to run the chown as root? I think the following information would be helpful for me:

The commend below seems to me to be the purpose of the run-as-command configuration setting https://www.puppet.com/docs/bolt/latest/privilege_escalation.html#how-run-as-works maybe you could provide and example of how you intend to modify the builtin tasks to support your use case?

We're considering making retrofitted forks of built-in Bolt tasks such as package and service where sudo is used for each command that requires the elevated privileges, which we can then cleanly capture in our sudo rules and ultimately skip --run-as .

It looks like you are configuring a dedicated bolt user on the remote system which is a good step, ultimately the current design requires arbitrary execution for that user as described here https://www.puppet.com/docs/bolt/latest/privilege_escalation.html#escalating-privilege-must-be-generalized

Apologies, I should have been a bit more clear in my previous comment. :slightly_smiling_face:
Allow me clear up the confusion with a second attempt.
The main point I was trying to make is more along the lines of "this works, but it would be nice if we could improve it a bit further" instead of "this doesn't work at all".
As you correctly noticed, we're using a dedicated bolt user on the remote system. However, I would like to limit the amount of privileged actions that this bolt user can perform as much as possible. This means a restrictive sudo environment where we create a sudo rule for each command where it is required. So no bolt ALL=(ALL) NOPASSWD:ALL whatsoever.
For a simple bolt command run or run_command in plans, you can do something like this:
bolt command run 'sudo dnf install -y mypackage'

alongside the following sudo rule:
bolt ALL=(ALL) NOPASSWD:/usr/bin/dnf install -y mypackage

Nice, easy and will work just fine. The interesting part, however, arises when you start using --run-as root, which you'll usually have to do when you want to run tasks such package or service.
As you mentioned, the privilege escalation documentation indeed warns that limited priv escalation will put you in a bit of conundrum.
If you still decide to go with a restricted sudo environment, you'll need the following rules for the user on the remote host:
bolt ALL=(ALL) NOPASSWD:/usr/bin/sh -c cd; chown -R root\:0 /home/bolt/tmp/*
bolt ALL=(ALL) NOPASSWD:SETENV:/usr/bin/sh -c cd; /home/bolt/tmp/*
bolt ALL=(ALL) NOPASSWD:SETENV:/usr/bin/sh -c cd; /home/bolt/tmp/*/*/*/*
bolt ALL=(ALL) NOPASSWD:/usr/bin/sh -c cd; rm -rf /home/bolt/tmp/*
bolt ALL=(ALL) NOPASSWD:SETENV:/usr/bin/env * # required starting from bolt 3.27.1

which you can then test with:
bolt task run --no-host-key-check -u bolt --private-key ./some-priv-key service::linux action=status name=sshd --targets my-remote-host --tmpdir /home/bolt/tmp --log-level trace --run-as root

With that enormous background context aside, I can finally get to the main point of my previous comment :slightly_smiling_face:
Let's zoom in on bolt ALL=(ALL) NOPASSWD:SETENV:/usr/bin/sh -c cd; /home/bolt/tmp/* . With this rule, you basically get root access to a machine if you somehow get a shell to the bolt user on the remote host.
A reproduction example (with some of the ls output omitted):
[bolt@sandbox tmp]$ pwd
/home/bolt/tmp
[bolt@sandbox tmp]$ mkdir /home/bolt/tmp/test
[bolt@sandbox tmp]$ echo -e "#/bin/sh \n touch /root/pwntest\n ls -l /root/" > /home/bolt/tmp/test/pwntest.sh
[bolt@sandbox tmp]$ chmod u+x /home/bolt/tmp/test/pwntest.sh
[bolt@sandbox tmp]$ sudo -n -u root sh -c cd\;\ chown\ -R\ root:0\ /home/bolt/tmp/test
[bolt@sandbox tmp]$ sudo -n -u root sh -c cd\;\ /home/bolt/tmp/test/pwntest.sh
-rw-r--r--. 1 root root      0 Dec 11 22:15 pwntest

Again, this requires you being able to open a shell with the bolt user on the remote host in the first place. One probably has bigger problems if someone with malicious intentions already got that far.
Finally, the key question which both I, and I think OP as well, have: would it technically be possible to perform the privilege escalation without giving the non-privileged user on the remote host access to /bin/sh, or without requiring the above-mentioned sudo rules?
If the answer is "no" or "the current design currently requires arbitrary execution", as you mentioned earlier, that's all right. I can work with that :slightly_smiling_face: . Then we'll simply make sure the bolt user on remote hosts is as isolated as possible. Having the additional layer of defense would have been neat.
Lastly, regarding the first point you brought up.

maybe you could provide and example of how you intend to modify the builtin tasks to support your use case?

My idea would be that I create a copy of the built-in package task where each yum command is prefixed with sudo. This would allow me to get rid of my problematic sudo rules all-together and circumvent the usage of --run-as root as well. As a result, I'd be able to simply run bolt task myproject::package where the script itself which will perform the privilege escalation based on the fine grained sudo rules on the system.
Phew, apologies for the giant essay. Once again, thanks for taking your time to go through this! Cheers!

@breca this is still an open issue can you reopen this bug please?

I sure can't, feel free to open your own issue and reference this one though.


There is no library release supporting recent robotframework versions

You have updated the library to use the recent robotframework versions (requirements.txt) but you have not released  a library version supporting that change.
The current release (3.0.0) does not support the recent robotframework versions (>=3.0.4).

Is this issue currently in development or in a state of analysis? Any new info?


ViewChange: check only one tx per block

This improves the execution service to include previous transactions
so that view change can make sure only one is accepted per block.

In Byzcoin, the whole view change is done quite differently so it's inside that it checks the roster has only one change (and it also rotate for instance). But for instance for the config, I think you can send multiple transactions in one block.


Remove IWebSocketHandler

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

104 of 111 (93.69%)  changed or added relevant lines in 1 file are covered.
3 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.5%) to 94.533%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/GraphQL.AspNetCore3/GraphQLHttpMiddleware.cs
104
111
93.69%

Files with Coverage Reduction
New Missed Lines
%

src/GraphQL.AspNetCore3/UserContextBuilder.cs
3
89.74%

Totals

Change from base Build<PHONE_NUMBER>:
-0.5%

Covered Lines:
1631

Relevant Lines:
1681

💛  - Coveralls


Remove usages of Prototype from OpenStack Cloud

See this blog post for details. Prototype will eventually be removed from Jenkins core. To prepare for this transition, this plugin must be migrated away from Prototype. The blog post contains instructions on how to find and eliminate usages of Prototype. In this plugin, the following usages of Prototype have been identified. This may not be an exhaustive list:
./plugin/src/main/resources/jenkins/plugins/openstack/compute/JCloudsCloud/computerSet.jelly:23:
new Ajax.Request("${rootURL}/cloud/"+item.value.cloud+"/provision", {

CC @olivergondza

@olivergondza Gentle ping. The replacement of this Ajax.Request usage with a call to fetch() should be simple to develop and test. Without this fix, this plugin will break when Jenkins core eventually removes Prototype.js.

@olivergondza Gentle ping

@basil, thanks for the issues and for the Fix. Merged with a slight amendment.

Thanks! Can this please be released?


WebP is not working on macOS builds

Discussed in https://github.com/PintaProject/Pinta/discussions/769

Originally posted by capellavacancies April 17, 2024
I've read online WebP it's supported (source) but when I try to open a WebP file it says it's not supported. Ideas ?

It probably is related to this issue?
https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/103

Yeah, the webp-pixbuf-loader does work to add webP support to Pinta, so it's just matter of packaging it.
I had gotten it packaged properly for macOS, but seem to have not actually merged that in properly

This has been backported to the 2.1 branch and will be in the next minor release

This also isn't working in Windows on 2.1.2

with b930be3 the webp pixbuf loader is packaged with the Windows installer too. You can try out the latest build from https://github.com/PintaProject/Pinta/actions/runs/9056221969 (requires Github login)


Added Haptic Feedback

Fixes issue #1051

Fixes issue #1051

thank you for making this PR @Aditi-Singh16
some comments:

the formatting is off. you can install/see the error with eslint.
there are also the receive screens, and lnurl screens that would need the haptic feedback

also, we're following https://www.conventionalcommits.org/en/v1.0.0/ for our commit/PR description

Fixes issue #1051

thank you for making this PR @Aditi-Singh16
some comments:

the formatting is off. you can install/see the error with eslint.
there are also the receive screens, and lnurl screens that would need the haptic feedback

for receive and lnurl screens, at what event should the feedback be triggered?

PR looks good overall. I have one question.
Also, some notes: we try to avoid merge, instead we rely on rebase when we want to get on par with main. it makes the git history much cleaner. basically you do that by making sure main is up to date, then in you branch you do git rebase main. feel free to google if you don't know the concept of git rebase.

Hi, I got some errors while rebasing and was unable to solve, so created a new PR


Add skipped to failed()

Codecov Report

Merging #610 into master will decrease coverage by 0.16%.
The diff coverage is 0%.

@@             Coverage Diff              @@
##             master     #610      +/-   ##
============================================
- Coverage     76.33%   76.17%   -0.17%
  Complexity      605      605
============================================
  Files            81       81
  Lines          2282     2283       +1
  Branches        324      324
============================================
- Hits           1742     1739       -3
- Misses          322      325       +3
- Partials        218      219       +1


Release 0.9.2

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.


[FLINK-13963] Consolidate Hadoop file systems usage and Hadoop integration docs

What is the purpose of the change
We have hadoop related docs in several places at the moment:

dev/batch/connectors.md (Hadoop FS implementations and setup)
dev/batch/hadoop_compatibility.md (not valid any more that Flink always has Hadoop types out of the box as we do not build and provide Flink with Hadoop by default)
ops/filesystems/index.md (plugins, Hadoop FS implementations and setup revisited)
ops/deployment/hadoop.md (Hadoop classpath)
ops/config.md (deprecated way to provide Hadoop configuration in Flink conf)

We could consolidate all these pieces of docs into a consistent structure to help users to navigate through the docs to well-defined spots depending on which feature they are trying to use.
The places in docs which should contain the information about Hadoop:

dev/batch/hadoop_compatibility.md (only Dataset API specific stuff about integration with Hadoop)
ops/filesystems/index.md (Flink FS plugins and Hadoop FS implementations)
ops/deployment/hadoop.md (Hadoop configuration and classpath)

How to setup Hadoop itself should be only in ops/deployment/hadoop.md. All other places dealing with Hadoop/HDFS should contain only their related things and just reference it 'how to configure Hadoop'. Like all chapters about writing to file systems (batch connectors and streaming file sinks) should just reference file systems.
You can firstly review the first commit. The second one just duplicates the change into the Chinese translation and will be squashed after merge.
Brief change log
See previous section.
Verifying this change
Run ./docs/build_docs.sh -i and open http://localhost:4000 in browser to check the doc changes.
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
The serializers: (no)
The runtime per-record code paths (performance sensitive): (no)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes)
The S3 file system connector: (yes)

Documentation

Does this pull request introduce a new feature? (no)
If yes, how is the feature documented? (docs)

Thanks for the review @aljoscha
I applied the changes and synced the zh file
Do you want to have another look?

merged into master by 5ec02e2947af3e256deab11af7ed8bf087493f82.


Update broken gradle wrapper to 8.3

Updates the gradle wrapper to 8.3 so Java 17 machines can build the source. This pull request updates the wrapper to gradle version 8.3 (latest stable at the time of this pull request).
The gradle wrapper is essential to development so that everyone working on the project is using the same gradle version with the gradlew rather than random versions between developers.

It's always good to keep gradle updated.
GitHub has a security action to ensure that gradlew files are not contained with malicious code aswell. See https://github.com/gradle/wrapper-validation-action

I'll add GitHub's gradlew validation tool to this pull since I mentioned it. Good for security.


[Bug]: DiscordChatExporter empty persist file causes crash

Prerequisites

[X] I have written a descriptive issue title.
[X] I have searched all issues/PRs to ensure it has not already been reported or fixed.
[X] I have verified that I am using the latest version of Scoop and corresponding bucket.

Package Name
discordchatexporter
Expected/Current Behaviour
Current: With the current scoop file it creates an empty Settings.dat file for persistance. The program is tries to parse said file and crashes because it expect it to be in a JSON format.

Expected: The program should not crash when launching
Steps to Reproduce
❯ scoop install extras/discordchatexporter
Installing 'discordchatexporter' (2.40) [64bit] from extras bucket
Loading DiscordChatExporter.zip from cache
Checking hash of DiscordChatExporter.zip ... ok.
Extracting DiscordChatExporter.zip ... done.
Running pre_install script...
Linking ~\scoop\apps\discordchatexporter\current => ~\scoop\apps\discordchatexporter\2.40
Creating shim for 'DiscordChatExporter'.
Creating shortcut for Discord Chat Exporter (DiscordChatExporter.exe)
Persisting Settings.dat
'discordchatexporter' (2.40) was installed successfully!

❯ cd C:\Users\%username%\scoop\apps\discordchatexporter\current

❯ .\DiscordChatExporter.exe

Possible Solution
Solution to this problem would be it create the persistent file in a JSON format {} as content should be enough for the program to not crash and to automatically insert the missing settings into the file at start.
Scoop and Buckets Version
❯ scoop --version
Current Scoop version:
v0.3.1 - Released at 2022-11-15

'extras' bucket:
15d93415a (HEAD -> master, origin/master, origin/HEAD) markdown-monster: Update to version <IP_ADDRESS>

'main' bucket:
b985e470e (HEAD -> master, origin/master, origin/HEAD) luajit: Update to version 2.1.0.beta3.r481.g51fb2f2c-3

'versions' bucket:
29c694513 (HEAD -> master, origin/master, origin/HEAD) zig-dev: Update to version 0.11.0-dev.3773

Scoop Config
❯ scoop config | Format-List

last_update        : 23/06/2023 12:01:19
scoop_repo         : https://github.com/ScoopInstaller/Scoop
scoop_branch       : master

PowerShell Version
❯ $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.4.0-preview.3
PSEdition                      Core
GitCommitId                    7.4.0-preview.3
OS                             Microsoft Windows 10.0.22631
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

Additional Softwares
No response

Working on it


Build failed on latest environment

👀 http://redpen.cc/docs/latest/#_for_developers
$ git rev-parse HEAD
ed621501a7ec1840ba5f97adeea064f2e5be7235
$ ./mvnw clean install
...(omitted)...
[INFO] ------------------------------------------------------------------------
[INFO] Building redpen-core 1.10.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.codelibs:lucene-analyzers-kuromoji-ipadic-neologd:jar:4.10.4-20150608 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
...(omitted)...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.597 s
[INFO] Finished at: 2019-05-15T14:34:48+09:00
[INFO] Final Memory: 8M/28M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project redpen-core: Could not resolve dependencies for project cc.redpen:redpen-core:jar:1.10.3-SNAPSHOT: Failure to find org.codelibs:lucene-analyzers-kuromoji-ipadic-neologd:jar:4.10.4-20150608 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

org.codelibs:lucene-analyzers-kuromoji-ipadic-neologd is gone?
refs #860 I'm talking with @sfujiwara

@vvakame Thank you very much for the valuable report 🙏 !
I confirmed com.github.cstoku:elasticsearch-analysis-kuromoji-unidic-neologd exists inMvan central. Maybe the version in pom.xml is no  longer exist in the Maven central. I will look into this problem soon.

Hi @vvakame and @sfujiwara, I reproduced the build failure and made the hot fix in #862.

I merged the pull request to the master branch. Hopefully the hot fix works in your environments. Please let us know  when you still have problems in building RedPen.

Thanks!
I did successfully build running ./mvnw clean install!

thanks! let's go sfujiwara!


[Consignments] Pass userAgent over when creating submission

Depends on https://github.com/artsy/metaphysics/pull/2450
Addresses https://artsyproduct.atlassian.net/browse/CSGN-177
Related: https://github.com/artsy/convection/pull/682
This fixes an issue where the userAgent wasn't being passed along during a consignment submission.

LGTM!! 🎉 #mergeongreen


Object store should handle absence of metadata table in synced Realms without throwing exception

If a synced Realm pulls down user tables but not the object store's metadata table, we can end up calling create_initial_tables when most of the schema is already in place. If the schema doesn't match the schema in the file, this can lead to us attempting to make non-additive schema changes, leading to sync throwing an "unsupported instruction" exception.
The absence of the metadata table itself appears to be a bug (realm/realm-sync#1491), but the object store could be more resilient to the absence of the metadata table and not attempt to make non-additive schema changes when in additive schema mode.
/cc @tgoyne

Is it enough for you to know the schema or do you also need to know the version it has?
If the schema is enough, it seems that the metadata table is unnecessary.

What we need to change is how we handle the transition from Realms without a schema version to having a schema version. Previously this would only occur in a newly-created Realm, in which case we want to make the schema in the Realm file match the schema provided by the app. Now, with sync v2.x, a Realm without a schema version could also be one that was downloaded by sync. In that case we need to ensure that we stick to performing only additive schema operations, rather than attempting to make the schema in the Realm match that provided by the app.
When in additive schema mode, the schema version is only necessary to determine whether indexes should be added or removed. This prevents two different clients that have different ideas as to which properties should be indexed from repeatedly adding and removing indexes. This should work fine when the schema version isn't synced, since each client will only add or remove indexes if its stored schema version was older than new schema version being used by the app (i.e., when the app developer makes a change to their app's schema).

Search indexes are not being synced anymore in 2.0 as far as I remember, if that is what you mean
by repeatedly adding and removing indexes.

Can you provide some confirmation of that? I know t was discussed at one point, but I don’t recall that change being made.

Ok, it looks like that was done in realm/realm-sync#1330.


@Shreyas1994 you can use backticks to format code:
https://guides.github.com/features/mastering-markdown/
```
I have done this for you.

CatPhotoApp

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

On a side note I am able to pass this challenge with your code after, resetting the code (using RESET Button).
Please go through Help I have found a bug
Let us know if you are still facing issues

There's an illegal whitespace character in your input, which is why resetting the code and typing it manually fixes the error. CSS is very picky about whitespace characters. To avoid this problem please always type your answer by hand rather than copying and pasting any of it from somewhere else (even from our own page). Thanks and happy coding!


What is CI? ci.debian.net? Took me some time

I hope I am not the only one wondering what CI is. Finding that out was not a quick search. Do other people find it more quickly? And I am still not sure it is what this patch refers to. Do give a hint about that, or use the full term, or apply the patch, or something. Thank you.

CI is a general term meaning continuous integration. ci.debian.net is just one, but that's not the one this refers to. This project has its CI on github actions. I guess I forgot the term CI wouldn't be familiar to some people. Anyway, it's not relevant, so I just removed the phrase "used in CI".


Improve NuGet package restore performance (OSOE-167)

NuGet package restore can be sped up by setting the MSBuild property RestoreUseStaticGraphEvaluation to true.

I've done measurements with OSOCE. Note to self: Done with balanced power settings, not much going on in the background apart from Winamp.
Spreadsheet with measurements: Measurements.xlsx
Local
“You should see something like All projects are up-to-date for restore. If you see that, your restore works 100% the same in both cases.” After git clean -fxd and git submodule foreach --recursive git clean -fxd each time:
No restore message after the first one, then only a second restore will bring up “All projects are up-to-date for restore.” This is the same for dotnet restore /p:RestoreUseStaticGraphEvaluation=true and just dotnet restore too. Same with dotnet restore Lombiq.OSOCE.sln or dotnet restore .\Lombiq.OSOCE.sln though it seemingly goes through all the projects to restore them.
Starting with an already built solution:

Measure-Command { dotnet restore --force } ~3s
Measure-Command { dotnet restore --force /p:RestoreUseStaticGraphEvaluation=true } ~3,8s

After git clean -fxd and git submodule foreach --recursive git clean -fxd each time, see spreadsheet (haven't tried with NuGet cache clear since realistically your local NuGet cache is always up to date):

Measure-Command { dotnet restore --force } ~2,7s
Measure-Command { dotnet restore --force /p:RestoreUseStaticGraphEvaluation=true } ~2,5s
Measure-Command { dotnet restore } ~2,5s
Measure-Command { dotnet /p:RestoreUseStaticGraphEvaluation=true } ~2,3s

Without git clean, starting with an already restored solution:

Measure-Command { dotnet restore } ~1,1s
Measure-Command { dotnet restore /p:RestoreUseStaticGraphEvaluation=true } very slightly above ~1,1s

GitHub Actions
Does it actually work or is the build/app broken? It works, see build.
Measurements: See attached Excel.

Under e925820f360ffd400f92c29ba951960bb193acd6 I tried repeated builds on purpose to avoid the effect of downloading the packages, which shouldn’t be affected by static graph, see build. Interestingly, these repeated builds for the root solution were faster under Windows by about 30% (but the first build still takes twice as much under Windows). However, while static graph sped it up under Linux by a tiny bit (~1,6%), for Windows, it was slightly slower… NuGetTest brings the usual, with Linux being faster, but static graph also only bringing ~3% of perf increase under Ubuntu but making it ~9% slower under Windows!
However, under a8e988ccc8e06ce549375ab4cdcb4a364550f18c I also tried with NuGet cache clearing, see build. This is perhaps the more relevant, since on GHA we do single such builds. The root Ubuntu built is 0,5% faster but the Windows one 3,5% slower, while the NuGetTest builds are both ~4,5% faster.

It’s thus inconclusive whether this switch makes the build reliably faster. It seems that under Linux it does help a bit. However, it also reliably slows down the root solution build under Windows, i.e. the build that’s the slowest already. This would make waiting for the whole workflow to finish longer (by around 21s for the usual 10-minute builds - note that this is only about the Build and Static Code Analysis step, not the whole run). At the same time, we’d gain ~1,5s on the root Ubuntu build, ~3s on the NuGetTest Ubuntu and 15s on the NuGetTest Windows builds; this is not waiting time but ~20s compute time. So, we’d wait longer and it’s also a net loss in compute time. However, the differences are so small that we can't really tell.


Support local web interface?

Maybe I'm wrong, but the local web interface that is available through the ngrok CLI tool doesn't seem to be available via the node agent. Is that right?
When I navigate to http://localhost:4040 there is nothing found.
Is there a way to enable the local web interface through the node agent? I can't find anything in the api docs.

There is a solution on the roadmap for this, but currently the introspection interface is only available in the downloaded agent CLI.

Okay, thanks. I'll just spawn the CLI process in the meantime.


Allow collectable types to specify how they handle the Array-like Type Literal

Feature Request
In this issue, I will call the "Array-like Type Literal" the "{} operator".
Problem
Currently, the Type{} operator works in a very simple way.
It first creates the Type by initializing it without any arguments and then adds each element using the << operator.
This has multiple issues:

It only works with resizable collections
This means that StaticArray, Slice, BitArray and some third-party collections cannot be created this way.
..which will cause them to either use the [] macro for creation or not support this at all, which are both bad choices.
StaticArray is extra special in this regard as there are helper macros for numbers (Int32.static_array(el1, el2, ...))

It is faster to create a Deque from an Array which will never be used again instead of using a literal.

Code:
require "benchmark"

Benchmark.ips do |x|
  x.report("Using collection operator") { Deque{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20} }
  x.report("From array") { Deque.new([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) }
end

Results:
Using collection operator   7.49M (133.49ns) (± 0.58%)  336B/op   2.19× slower
               From array  16.38M ( 61.04ns) (± 0.67%)  256B/op        fastest

Click here for a benchmark!

Types cannot apply any other optimizations
It is possible that a collection could apply advanced optimizations in certain scenarios.
For example, if I have a collection for storing bytes (UInt8), I could improve performance by defining a String with the final data at compile-time and then copying its data to the heap when this collection is created.

All these issues arise because of the simplicity of this operator.
Proposal
Collections should be able to define a custom handler for the array-like literal.
I think for this, a new macro hook should be perfectly suited.
To ensure this macro is not abused for non-collection-types, the compiler could ensure that the macro always evaluates to the given datatype.
Of course, the default handler for these literals would remain the same to avoid breaking changes.
Using such a macro, StaticArray could easily be supported:
struct StaticArray(T, N)
  private macro collection_created(elements)
    %ret = uninitialized typeof({{elements.splat}})[{{elements.size}}]
    {% for el, i in elements %}
      {% el.raise "StaticArray{} does not support splats as its size needs to be known at compile-time" if el.is_a?(Splat) %}
      %ret.unsafe_put({{i}}, {{el}})
    {% end %}
    %ret
  end
end

And resizable types could be initialized more efficiently:
class Deque(T)
  private macro collection_created(elements)
    {% if elements.any?(&.is_a?(Splat)) %}
      Enumerable.collection_created(elements)
    {% else %}
      # Optimized creation
      Deque(typeof({{elements.splat}})).build_unsafe(initial_capacity: {{elements.size}}) do |%ptr|
        {% for el, i in elements %}
          %ptr[{{i}}] = {{el}}
        {% end %}
    {% end %}
  end
end

There is a discussion on #13060 of how it would be very cumbersome for users to override just part of the literal behavior and keep the rest if the same macro is also responsible for all the splat expansions, generic type inference, initial capacity calculation etc.


Add disclaimer

Disclaimer: The architecture as described in ChatArena may only be used to
create a benevolent AGI. Any implementation must comply with Asimov’s rules
and the United Nations Charter.

why? I am building something similar using langchain with nextjs called PaRoDiZe and it is definitely fun to have non-benevolent characters get into a debate!


Blockscout error-ing out with 500s on VALIDATOR_RG address

Expected Behavior
Not get 500 error
Current Behavior
Going to blockscout URL for VALIDATOR_RG in baklava:
https://baklava-blockscout.celo-testnet.org/address/0x71f6ef75c6417d66ed2b01620a0335f714c90a56/transactions
causes 500.
Other addresses work fine (like GROUP_RG address)
https://baklava-blockscout.celo-testnet.org/address/0x59186b71b33f4d96ec525e9ee21a8cf989d5ace7/celo
I recently did few key rotations and also setup attestation metadata, so not sure exactly which one is causing blockscout errors.

Seeing the same on 16 June with
https://explorer.celo.org/address/0xb33e9e01e561a1da60f7cb42508500e571afb6eb/celo

Same here on 16 June for RG contract for running validator.
https://explorer.celo.org/address/0x588ed7deeff8df7c00ff187c398936b101583ec7/celo

Looks like it's working now, for some reason an outdated version of blockscout web server was deployed.


$query->limit(1)->one()

Hi! I would like to ask if the following
$activeQuery->orderBy('id DESC')->limit(1)->one();
results more effective than
$activeQuery->orderBy('id DESC')->one();
I will later try benchmark results

Yes, it is.
There ia a note about it in the documentation


[soundcloud] Can't add metadata info to m4a

$ youtube-dl https://soundcloud.com/thelivingtombstone/tombmobilehiphop1 --verbose --add-metadata
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['https://soundcloud.com/thelivingtombstone/tombmobilehiphop1', '--verbose', '--add-metadata']
[debug] Encodings: locale 'UTF-8', fs 'utf-8', out 'UTF-8', pref: 'UTF-8'
[debug] youtube-dl version 2013.12.26
[debug] Python version 3.3.3 - Linux-3.12.6-1-ARCH-x86_64-with-arch-Arch-Linux
[debug] Proxy map: {}
[soundcloud] thelivingtombstone/tombmobilehiphop1: Resolving id
[soundcloud] thelivingtombstone/tombmobilehiphop1: Downloading info JSON
[download] TombMobileHiphop1-31218527.m4a has already been downloaded
[ffmpeg] Adding metadata to 'TombMobileHiphop1-31218527.m4a'
[debug] ffmpeg command line: ffmpeg -y -i TombMobileHiphop1-31218527.m4a -c copy -metadata title=TombMobileHiphop1 -metadata date=20111221 -metadata 'artist=The Living Tombstone' -f m4a TombMobileHiphop1-31218527.m4a.temp
ERROR: TombMobileHiphop1-31218527.m4a.temp: Invalid argument
Traceback (most recent call last):
  File "/usr/lib/python3.3/site-packages/youtube_dl/YoutubeDL.py", line 942, in post_process
    keep_video_wish, new_info = pp.run(info)
  File "/usr/lib/python3.3/site-packages/youtube_dl/PostProcessor.py", line 508, in run
    self.run_ffmpeg(filename, temp_filename, options)
  File "/usr/lib/python3.3/site-packages/youtube_dl/PostProcessor.py", line 102, in run_ffmpeg
    self.run_ffmpeg_multiple_files([path], out_path, opts)
  File "/usr/lib/python3.3/site-packages/youtube_dl/PostProcessor.py", line 99, in run_ffmpeg_multiple_files
    raise FFmpegPostProcessorError(msg)
youtube_dl.PostProcessor.FFmpegPostProcessorError: TombMobileHiphop1-31218527.m4a.temp: Invalid argument

I have
$ youtube-dl --version
2021.12.17

yet
$ youtube-dl -i --yes-playlist 'https://music.youtube.com/playlist?list=OLAK5uy_n58EKRGeKcOlbTEpKGy_98h1vVoJfFo-g&feature=share'
[youtube:tab] OLAK5uy_n58EKRGeKcOlbTEpKGy_98h1vVoJfFo-g: Downloading webpage
[download] Downloading playlist: Album - Iowa
[youtube:tab] playlist Album - Iowa: Downloading 14 videos
[download] Downloading video 1 of 14
[youtube] L871Dxqj_gU: Downloading webpage
[download] Destination: /home/chriselrod/Music/Album - Iowa/01-[515].m4a
[download] 100% of 948.29KiB in 00:21
[ffmpeg] Correcting container in "/home/chriselrod/Music/Album - Iowa/01-[515].m4a"
[ffmpeg] Post-process file /home/chriselrod/Music/Album - Iowa/01-[515].m4a exists, skipping
[ffmpeg] Adding metadata to '/home/chriselrod/Music/Album - Iowa/01-[515].m4a'
ERROR: file:/home/chriselrod/Music/Album - Iowa/01-[515].temp.m4a: Invalid argument

With config
# Always extract audio
-x

# Do not copy the mtime
--no-mtime

--add-metadata

-o '~/Music/%(playlist_title)s/%(playlist_index)s-%(title)s.%(ext)s'

Your problem is similar to the original but not the same. If you want help with it, posting in an ancient closed issue is probably not the right thing. You should open a new issue, unless an issue for the actual same problem is already active (#30839).

FWIW, I'm now using a different computer (one where the distro is willing to ship proprietary software) to download, and then rsyncing. Seemed easier, and seems to avoid the problem.


⚠ Bofrost.lu has degraded performance

In 10cb0c4, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 974 ms

Resolved: Bofrost.lu performance has improved in 0ec59b1 after 20 minutes.


Unknown prop 'replace' on  tag  using  component

When using the replace flag on a Link component, it get's passed down to the  tag and causes an error.

I don't see how that's possible. We omit the replace and to props from the ones that get provided to the <a> tag: https://github.com/ReactTraining/react-router/blob/master/packages/react-router-dom/modules/Link.js#L59

Do you mean the react-native version? That would be susceptible to this. #4854 fixes it.

I merged that in, so it should fix this (assuming you're on RN). A 4.0.1 is coming shortly.


Embedding the Webview for Android doesn't really embed the Webview

I've been reading the docs about embedding the Webview, and the Android tutorial doesn't really embed the Webview (http://docs.phonegap.com/develop/1-embed-webview/android/)
It just creates a cordova-android project, add some plugins and launch an intent that show a native view when you click a button.
That's not embedding a webview, that can be done on a regular cordova project with a plugin that launches an intent.
I think this doc should tell how to really integrate a cordova webview inside a native project, mixing the cordova webview with other native elements on the same screen as the old docs did.

@jcesarmobile - Hey there, yes, you're absolutely right in that the approach documented is not addressing the way most would typically go about this. There's work in progress to help make this whole process more automated, but in the meantime we could add the [session/samples Anis and Eddy did for PhoneGap Day to use for some docs if that could help.


Streetlabels mixes the offset done by Polyline Offset

Describe the bug
We have a map where we want to display direction flows in the street. We use Polyline offset  for that and that works fine.
As soon as we add the streetLabels Renderer it mixes the offset. Negative becomes positive for some.
Screenshots
Left with StreetLabels, right without

Can anyone point me to a possible solution? Or where i should look in the code?

Ok, it's due to this
if (this._getBearing(startCoords, stopCoords) < 0) {
       layer = this._getLineStringReverse(layer);
}

When i leave it the lines aren't swapped. The text is up side down for some polylines but that's ok for the moment.


Fix(snackbar): add the same format for future implementation

Resolves #690 #636 #526
What does this PR do?
Add the same implementation for all the snackbars in the app
How should this be tested?

Make run
Navigate through the app
Check if the snackbars work properly

@Edgar097 also take a look at the conflicts


handle view <--> table materialization changes

Fixes https://github.com/fishtown-analytics/dbt/issues/891 by loosening the conditional logic checks for existing models.
Previously, dbt failed to handle the case where the model relation already existed if it was of a different type than the one that was expected. This PR changes this behavior, such that an existing relation of an unexpected type will still be handled appropriately by the materialization code.

@cmcarthur yeah - I wrote the tests first, observed that they failed, then changed the code. Going to merge this now


Unable to simulate a recorded activity of native app on mobile device

The documentation URL
https://jmeter.apache.org/usermanual/get-started.html#what_cant
Feedback
In the user manual, you haven't mention that simulation of a native app is not possible with JMeter.
I have recorded the requests for a mobile application and tried executing it. While executing, it's not opening the browser/ application in the mobile. Unable to simulate the exact process in the mobile device.

Are you proposing to change the documentation in jmeter.apache.org/index.html under heading 'JMeter is not a browser' to state 'JMeter is not a browser or Mobile/Native Application'? Or are you requesting a new section in get-started.html repeating this? I find it quite clear from both pages that JMeter will not be driving the operation of a Mobile or Native application on the device, rather 'it works at protocol level'. Happy for others to chime in though if they feel it unclear.

This issue is duplicate or expanded part of #6062


Show user's bookings on their admin profile page

do you just want a list of upcoming bookings on the page or have this as a section (surely we do not want nor need admins accessing an individual's pass):


Eimis Synapse admin tool

The idea is to merge https://github.com/eimis-ans/discovery-rooms in https://github.com/eimis-ans/matrix-enrollment-script and rename the last one synapse-tools
We could add a command that 'd look like this:
do-discovery-room --remote-homeserver https://url.org

We should also build a docker images for this project

done some times ago


Build warning

Hello,
I am getting the error below during compilation. Is this something to be concerned with?

1>------ Rebuild All started: Project: LCPermits.Web, Configuration: Debug Any CPU ------
1>  LCPermits.Web -> C:\ngs-projects\LCPermitsProduct\LCPermits\LCPermits\LCPermits.Web\bin\LCPermits.Web.dll
1>  '"C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.5"' is not recognized as an internal or external command,
1>  operable program or batch file.
1>C:\ngs-projects\LCPermitsProduct\LCPermits\LCPermits\LCPermits.Web\LCPermits.Web.csproj(2805,5): warning MSB3073: The command ""C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.5" -project "C:\ngs-projects\LCPermitsProduct\LCPermits\LCPermits\LCPermits.Web\tsconfig.json"" exited with code 9009.
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

Looks like you have problem with TypeScript. i would check or install it again.

Edit CSProj, find $(TscToolExe) replace it with tsc

Thanks, this worked but I got these 2 warnings now. Can I ignore these?

1>------ Rebuild All started: Project: LCPermits.Web, Configuration: Debug Any CPU ------
1>  LCPermits.Web -> C:\ngs-projects\LCPermitsProduct\LCPermits\LCPermits\LCPermits.Web\bin\LCPermits.Web.dll
1>C:\ngs-projects\LCPermitsProduct\LCPermits\LCPermits\LCPermits.Web\Modules/Northwind/Customer/CustomerEditor.ts(4,67): warning TS2559: Type 'CustomerRow' has no properties in common with type 'LookupEditorOptions'.
1>
1>C:\ngs-projects\LCPermitsProduct\LCPermits\LCPermits\LCPermits.Web\Modules/Organization/BusinessUnit/BusinessUnitEditor.ts(4,71): warning TS2559: Type 'BusinessUnitRow' has no properties in common with type 'LookupEditorOptions'.
1>
1>C:\ngs-projects\LCPermitsProduct\LCPermits\LCPermits\LCPermits.Web\LCPermits.Web.csproj(2806,5): warning MSB3073: The command ""C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.5\tsc.exe" -project "C:\ngs-projects\LCPermitsProduct\LCPermits\LCPermits\LCPermits.Web\tsconfig.json"" exited with code 2.
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

Change them like this:
export class CustomerEditor extends Serenity.LookupEditorBase<Serenity.LookupEditorOptions, CustomerRow>

export class BusinessUnitEditor extends Serenity.LookupEditorBase<Serenity.LookupEditorOptions, BusinessUnitRow>

The first error was resolved. The 2nd one still remains:


Develop sqlsrv schema

Description
In codeigniter 3 using sqlsrv handler we could use a different scheme than "dbo" for example "adm", "tools", the full name being configured as follows: [DBNAME]. [SCHEMA]. [TABLENAME] however in the version 4.1 to obtain a record the full name looks like this: [DBNAME]. [TABLENAME] and to insert or update then if you take [DBNAME]. [SCHEMA]. [TABLENAME] from the key database configuration file " schema ", then it occurs to me that the table name" schema.tableName "is used in the model for sqlsrv. If the schema is not set then it takes "dbo" by default.
`private function getFullName(string $table): string
{
$tableExploded = explode('.', $table);
if (count($tableExploded) === 2)
{
$this->db->schema = str_replace('"', '', $tableExploded[0]);
$tableName        = $tableExploded[1];
}
else
{
$tableName = $table;
}
	if ($this->db->escapeChar === '"')
	{
		return '"' . $this->db->getDatabase() . '"."' . $this->db->schema . '"."' . str_replace('"', '', $tableName) . '"';
	}
	return '[' . $this->db->getDatabase() . '].[' . $this->db->schema . '].[' . str_replace('"', '', $tableName) . ']';
}

`
Checklist:

[x] Securely signed commits
[ ] Component(s) with PHPdocs
[ ] Unit testing, with >80% coverage
[ ] User guide updated
[x] Conforms to style guide

@hdrodriguez this is over my MSSQL head but your description makes me think it would be worthwhile. Could you add a test case demonstrating the difference?

Thanks, @hdrodriguez this is a bug indeed. But as @MGatner said we have to fix it "globally". Please check this PR #4246.
I would appreciate your feedback.

Thank you very much for your comments @michalsn and @MGatner  I think that PR 4246 covers more things and takes into account the use of aliases, which is very important when working with relationships, however the change that I have proposed only affected getFullName and focused in the passage of a schema through the model >>> protected $ table = "schema.table", at PR 4246 could we include what was my code trying to achieve?
I could add my tests but they would conflict with PR 4246.
should I close this PR?

This PR will be automatically closed after solving the issue.


Make moq-transport totally generic

Let's iterate on that PR.
This PR makes the moq-transport crate totally generic in the quic implementation viewpoint.
It removes every mention of quinn in moq-transport and the warp relay.
It now entirely relies on the webtransport-generic crate.
To use moq with a transport implementation, the application must instanciate and stablish a webtransport session
that implements the Connection trait of the webtransport-generic crate.
the moq-demo-quinn crate shows an example of application using quinn underneath.
Let me know your thoughts and don't hesitate to suggest or apply changes.

I took at stab at this with #51. It was a pain but I think I figured out the required traits to avoid wrapping everything in Box like this PR.


Fail to run crypto example

[+] global_eid: 2
[+] sha256 input string is abc
[+] Expected SHA256 hash: ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
calc_sha256 invoked!
Input string len = 3, input len = 3
[+] SHA256 result is ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
[+] calc_sha256 success ...
[+] Starting aes-gcm-128 encrypt calculation
[1]    2483 segmentation fault (core dumped)  ./app

Hi @lengyijun , thanks for the report!
Could you please double check if your Intel SGX SDK is the latest version 2.12. If you are using docker, please pull the latest sgx-rust:1804-1.1.3 again.

▶ sgx_sign -version

This is sgx_sign from Intel(R) Software Guard Extensions, version <IP_ADDRESS> for Linux.

I will update to 2.12 and test it again later.

➜  bin git:(master) ✗ ./app
[+] global_eid: 2
[+] sha256 input string is abc
[+] Expected SHA256 hash: ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
calc_sha256 invoked!
Input string len = 3, input len = 3
[+] SHA256 result is ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
[+] calc_sha256 success ...
[+] Starting aes-gcm-128 encrypt calculation
[1]    17413 segmentation fault (core dumped)  ./app

➜  bin git:(master) ✗ sgx_sign -version

This is sgx_sign from Intel(R) Software Guard Extensions, version <IP_ADDRESS> for Linux.

And I'm not testing in docker.
➜  bin git:(master) ✗ neofetch
     -+ssssssssssssssssssyyssss+-         OS: Ubuntu 20.04.1 LTS x86_64
    .ossssssssssssssssssdMMMNysssso.       Host: OptiPlex 7070
   /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 5.4.73-custom
  +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 11 mins
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 1887 (dpkg), 7 (snap)
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: zsh 5.8
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Resolution: 1920x1080
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   Terminal: /dev/pts/0
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   CPU: Intel i7-9700 (8) @ 4.700GHz
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   GPU: Intel UHD Graphics 630
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Memory: 587MiB / 15669MiB

@lengyijun what's the output of 'dpkg -l | grep -i sgx'?

I met the same problem.
[+] global_eid: 2
[+] sha256 input string is abc
[+] Expected SHA256 hash: ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
calc_sha256 invoked!
Input string len = 3, input len = 3
[+] SHA256 result is ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
[+] calc_sha256 success ...
[+] Starting aes-gcm-128 encrypt calculation
Segmentation fault (core dumped)

Maybe it's because all the following functions:
sha256(),  aes_gcm_128(), aes_cmac(), rsa() in app.c don't have a return value in the end of main logic(C doesn't need a return value in the end necessarily so compiler doesn't report an error)
when I put return 0 to  all the functions mentioned, the result comes.
for example aes_gcm_128()
...
printf("[+] aes-gcm-128 decrypt complete \n");
return 0;

And the result will be right like
[+] global_eid: 2
[+] sha256 input string is abc
[+] Expected SHA256 hash: ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
calc_sha256 invoked!
Input string len = 3, input len = 3
[+] SHA256 result is ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
[+] calc_sha256 success ...
[+] Starting aes-gcm-128 encrypt calculation
[+] aes-gcm-128 args prepared!
[+] aes-gcm-128 expected ciphertext: 0388dace60b6a392f328c2b971b2fe78
aes_gcm_128_encrypt invoked!
aes_gcm_128_encrypt parameter prepared! 16, 16
rsgx calling returned!
[+] aes-gcm-128 returned from enclave!
[+] aes-gcm-128 ciphertext is: 8b2f0fd33bc9a392539c17a42acdfe78
[+] aes-gcm-128 result mac is: 1f6b73897cfc62f3266b8f39de52b8a0
[+] Starting aes-gcm-128 decrypt calculation
[+] aes-gcm-128 expected plaintext:88a7d51d5b7f0000a0b4d51d5b7f0000
aes_gcm_128_decrypt invoked!
aes_gcm_128_decrypt parameter prepared! 16, 16
rsgx calling returned!
[+] aes-gcm-128 decrypted plaintext is: 88a7d51d5b7f0000a0b4d51d5b7f0000
[+] aes-gcm-128 decrypt complete
[+] Starting aes-cmac test
[+] aes-cmac expected digest: 51f0bebf7e3b9d92fc49741779363cfe
[+] aes-cmac result is: 51f0bebf7e3b9d92fc49741779363cfe
rsa chipertext_len: 256
rsa plaintext_len: 128
rsa_key success.

I think there may be something wrong with the compiler?

Well, it seems that there is something wrong with g++ compiler.
I add return 0 in the end of function sha_256(), and the compiled result is
...
    36b3:	e8 48 fc ff ff       	callq  3300 <calc_sha256>
    36b8:	85 c0                	test   %eax,%eax
    36ba:	75 74                	jne    3730 <_Z7sha_256v+0xf0>
...
    36c0:	85 ff                	test   %edi,%edi
    36c2:	75 60                	jne    3724 <_Z7sha_256v+0xe4>
...
    3719:	31 c0                	xor    %eax,%eax
    371b:	48 83 c4 10          	add    $0x10,%rsp
    371f:	5b                   	pop    %rbx
    3720:	5d                   	pop    %rbp
    3721:	41 5c                	pop    %r12
    3723:	c3                   	retq

Seems right and the function will return successfully.
On the contrary, if I DO NOT add return 0 ,the compiled result will be
...
    36b3:	e8 48 fc ff ff       	callq  3300 <calc_sha256>
    36b8:	85 c0                	test   %eax,%eax
    36ba:	75 24                	jne    36e0 <_Z7sha_256v+0xa0>
    36bc:	8b 7c 24 0c          	mov    0xc(%rsp),%edi
    36c0:	85 ff                	test   %edi,%edi
    36c2:	74 31                	je     36f5 <_Z7sha_256v+0xb5>
...
    36f5:	48 8d 35 66 29 00 00 	lea    0x2966(%rip),%rsi        # 6062 <_IO_stdin_used+0x62>
    36fc:	bf 01 00 00 00       	mov    $0x1,%edi
    3701:	4c 8d 63 20          	lea    0x20(%rbx),%r12
    3705:	31 c0                	xor    %eax,%eax
    3707:	e8 a4 f0 ff ff       	callq  27b0 <__printf_chk@plt>
    370c:	48 8d 2d 65 29 00 00 	lea    0x2965(%rip),%rbp        # 6078 <_IO_stdin_used+0x78>
    3713:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
    3718:	0f b6 13             	movzbl (%rbx),%edx
    371b:	48 89 ee             	mov    %rbp,%rsi
    371e:	bf 01 00 00 00       	mov    $0x1,%edi
    3723:	31 c0                	xor    %eax,%eax
    3725:	48 83 c3 01          	add    $0x1,%rbx
    3729:	e8 82 f0 ff ff       	callq  27b0 <__printf_chk@plt>
    372e:	4c 39 e3             	cmp    %r12,%rbx
    3731:	75 e5                	jne    3718 <_Z7sha_256v+0xd8>
    3733:	bf 0a 00 00 00       	mov    $0xa,%edi
    3738:	e8 63 ed ff ff       	callq  24a0 <putchar@plt>
    373d:	48 8d 3d 39 29 00 00 	lea    0x2939(%rip),%rdi        # 607d <_IO_stdin_used+0x7d>
    3744:	e8 c7 ed ff ff       	callq  2510 <puts@plt>
    3749:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

0000000000003750 <_Z11aes_gcm_128v>:
    3750:	f3 0f 1e fa          	endbr64

Don't care about address 0x36f5 - 0x3744. They are contents from original file
    printf("[+] SHA256 result is ");

    int i;
    for(i = 0; i < 32; i ++) {
        printf("%02x", output_hash[i]);
    }
    printf("\n");
    printf("[+] calc_sha256 success ...\n");

And we can see address 0x3749, we want the function returns but actually the machine code doesn't do such thing. So the program will continue executing from 0x3740, which is the start address of function aes_gcm_128(). So we can see a printf result and segmentation fault, which is caused by an unalloced stack storage for
uint8_t aes_gcm_plaintext[16]

Maybe it's something wrong with the g++ compiler?

@Xynnn007 i believe it's an UB. and compiler can do anything on UB. and it seems gcc-9 is "doing anything" here. @uraj am i correct?

Yes, functions that are not void yet without return statements have undefined behaviors, unless that function is "main", according to the standard.

@dingelish @uraj thanks for explanation


fix: dataTree mutation

Description
In this PR we fix the mutation of dataTree which got enabled by changes here
Fixes #14699

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

How Has This Been Tested?
Cypress Test case

[x] Try mutating Api response data and verify mutation doesn’t work

Checklist:

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

/ok-to-test sha=023696e

/ok-to-test sha=d664954

/ok-to-test sha=0338b07

tested #15877 - looks good

/ok-to-test sha=f43226d

/ok-to-test sha=0d86e77

/ok-to-test sha=0d86e77

/ok-to-test sha=0d86e77


Uplift packages to use button 2.0 and button-group 2.0

Summary
Closes #1163 and #1051
Deployment URL
https://terra-core-deployed-pr-1206.herokuapp.com/
Additional Details
Packages uplifted to Button 2.0

terra-alert
terra-collapsible-menu-view
terra-date-picker
terra-date-time-picker
terra-search-field
terra-status-view
terra-toggle-button

Packages uplifted to ButtonGroup 2.0

terra-collapsible-menu-view
terra-time-input

@benbcai Can you sync with @mmalaker on what all areas need to be reviewed for functional verification.

@bjankord Yes, I'll get in touch with @mmalaker on what and which packages to review.

Tested: PR #1206
Resolves: Issue #1163 #1051
Added Updated Color Enhancements to original: #1070 #1051
Reviewed:

Follows pattern considerations documented in Cerner Design Standards: Buttons and Button Groups
Follows UX defined design implementation for Terra-Button and Terra-Button-Group
Follows defined theme designs: terra-theme

Verified @neilpfeiffer, Ready for Release.

Pass

UX Review

Functional verification completed. The components utilizing button and button group 2.0 display and function as expected.

Closes #1051


linker error on rocksdb with gcc

using gcc 6.5 on ubuntu 18.04
find_package(RocksDB CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME}
                      PRIVATE RocksDB::rocksdb
                              RocksDB::rocksdb-shared)

/home/ladmin/vcpkg/installed/x64-linux/debug/lib/librocksdbd.a(format.cc.o): In function `rocksdb::Zlib_Uncompress(rocksdb::UncompressionContext const&, char const*, unsigned long, int*, unsigned int, int)':
/home/ladmin/vcpkg/buildtrees/rocksdb/src/v5.15.10-2d53c7e6ef/util/compression.h:526: undefined reference to `inflateInit2_'
/home/ladmin/vcpkg/buildtrees/rocksdb/src/v5.15.10-2d53c7e6ef/util/compression.h:535: undefined reference to `inflateSetDictionary'
/home/ladmin/vcpkg/buildtrees/rocksdb/src/v5.15.10-2d53c7e6ef/util/compression.h:551: undefined reference to `inflate'
/home/ladmin/vcpkg/buildtrees/rocksdb/src/v5.15.10-2d53c7e6ef/util/compression.h:577: undefined reference to `inflateEnd'
/home/ladmin/vcpkg/buildtrees/rocksdb/src/v5.15.10-2d53c7e6ef/util/compression.h:585: undefined reference to `inflateEnd'
/home/ladmin/vcpkg/installed/x64-linux/debug/lib/librocksdbd.a(block_based_table_builder.cc.o): In function `rocksdb::Zlib_Compress(rocksdb::CompressionContext const&, unsigned int, char const*, unsigned long, std::__cxx11::basic_string<char,std::char_traits<char>, std::allocator<char> >*)':
/home/ladmin/vcpkg/buildtrees/rocksdb/src/v5.15.10-2d53c7e6ef/util/compression.h:445: undefined reference to `deflateInit2_'
/home/ladmin/vcpkg/buildtrees/rocksdb/src/v5.15.10-2d53c7e6ef/util/compression.h:455: undefined reference to `deflateSetDictionary'
/home/ladmin/vcpkg/buildtrees/rocksdb/src/v5.15.10-2d53c7e6ef/util/compression.h:457: undefined reference to `deflateEnd'
/home/ladmin/vcpkg/buildtrees/rocksdb/src/v5.15.10-2d53c7e6ef/util/compression.h:471: undefined reference to `deflate'
/home/ladmin/vcpkg/buildtrees/rocksdb/src/v5.15.10-2d53c7e6ef/util/compression.h:480: undefined reference to `deflateEnd'
collect2: error: ld returned 1 exit status
CMakeFiles/runtime_db.dir/build.make:87: recipe for target 'runtime_db' failed
make[2]: *** [runtime_db] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/runtime_db.dir/all' failed
make[1]: *** [CMakeFiles/runtime_db.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Hi @gocarlos
Thanks for posting this issue.
Sorry for the late reply.
rocksdb has been updated. Could you please update vcpkg and try to build it again?

This issue should be fixed now.
I cannot reproduce this on both  Ubuntu 18.04 and  Ubuntu 16.04.


Add forc plugins command flag to only emit plugin file names instead of full paths

Follow up to #1199. Refer to that PR for context.

Should the behaviour perhaps be opposite, in the sense that we show only the plugin name (forc-fmt, forc-explore, etc.) by default, but show the full path using a command flag? eg. -v/--verbose


Reword first test description for Inventory Update challenge

Pre-Submission Checklist

[x] Your pull request targets the staging branch of FreeCodeCamp.
[x] Branch starts with either fix/, feature/, or translate/ (e.g. fix/signin-issue)
[x] You have only one commit (if not, squash them into one commit).
[N/A] All new and existing tests pass the command npm run test-challenges. Use git commit --amend to amend any fixes.

Type of Change

[x] Small bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds new functionality)
[ ] Breaking change (fix or feature that would change existing functionality)
[ ] Add new translation (feature adding new translations)

Checklist:

[ ] Tested changes locally.
[x] Closes currently open issue (replace XXXX with an issue no): Closes #9025

Description

Modified  seed/challenges/01-front-end-development-certification/advanced-bonfires.json
Changed line 204 from
message: updateInventory() should return an array. to
message: The function updateInventory should return an array.

Thanks @joechan3 :sparkles:


Need to remove workaround for Webkit CORS bug

Hi Niklas,
Thanks for your library, it obviously took a good deal of work and with bleeding edge technology as well.
I would really like to use it for my project http://happybirthdayyousuck.com, (my business partner is paranoid so there is a temporary login: hbys / immortality) ... but I am struggling with getting CORS to work with images that are stored on S3.  It's strange because one out of three images appear in the rendered canvas, but the other two do not, and it's not clear to me what the difference between them is.
By setting breakpoints and stepping through the code, I noticed that the images that fail to load, seem to be cached, that is, they are not re-downloading in Chrome's Network tab during the loadImage method.  The image that does load, is re-downloading.
So, to try and move the issue forward, I attached a cachebusting parameter to the method that tries to do the CORS loading, like so:
} else if ( supportCORS && !options.allowTaint && options.useCORS ) {
    // attempt to load with CORS

    img.crossOrigin = "anonymous";
    imageObj = images[src] = {
        img: img
    };
    images.numTotal++;
    setImageLoadHandlers(img, imageObj);
    // added 'cachebuster' parameter in line below.
    img.src = src + "?cachebuster=" + new Date().getTime();

... at this point the images download, but now I am running into exceptions like:
Uncaught TypeError: Cannot read property 'length' of null
See screenshot:

... I comment out more text rendering code until the render call completes with no exceptions, but at this point the canvas is blank (tainted?).
Any advice for getting this to work?  I really appreciate your help.
Thanks,
Kevin

Hi @niklasvh,
I am fetching the images from CMS(Contentful) in my HTML and then trying to generate PDF of that HTML.
But in the generated PDF, images are missing.(seems to be an issue of cross origin).
Please suggest me how can i get rid of this issues.
Below is my code-:
function downloadPDF() {
var canvasToImage = function(canvas){
var img = new Image();
var dataURL = canvas.toDataURL('image/png');
img.crossOrigin = "Anonymous";
img.src = dataURL;
return img;
};
var canvasShiftImage = function(oldCanvas,shiftAmt){
shiftAmt = parseInt(shiftAmt) || 0;
if(!shiftAmt){ return oldCanvas; }
var newCanvas = document.createElement('canvas');
newCanvas.height = oldCanvas.height - shiftAmt;
newCanvas.width = oldCanvas.width;
var ctx = newCanvas.getContext('2d');
ctx.mozImageSmoothingEnabled = false;
ctx.webkitImageSmoothingEnabled = false;
ctx.msImageSmoothingEnabled = false;
ctx.imageSmoothingEnabled = false;
var img = canvasToImage(oldCanvas);
ctx.drawImage(img,0, shiftAmt, img.width, img.height, 0, 0, img.width, img.height);
return newCanvas;
};
var canvasToImageSuccess = function(canvas){
var pdf = new jsPDF('l','px'),
pdfInternals = pdf.internal,
pdfPageSize = pdfInternals.pageSize,
pdfScaleFactor = pdfInternals.scaleFactor,
pdfPageWidth = pdfPageSize.width,
pdfPageHeight = pdfPageSize.height,
totalPdfHeight = 0,
htmlPageHeight = canvas.height,
htmlScaleFactor = canvas.width / (pdfPageWidth * pdfScaleFactor),
safetyNet = 0;
while(totalPdfHeight < htmlPageHeight && safetyNet < 15){
var newCanvas = canvasShiftImage(canvas, totalPdfHeight);
pdf.addImage(newCanvas, 'png', 0, 0, pdfPageWidth, 0, null, 'NONE');
// var alias = Math.random().toString(35);
// pdf.addImage(newCanvas, 0, 0, pdfPageWidth, 0, 'png', alias, 'NONE');
totalPdfHeight += (pdfPageHeight * pdfScaleFactor * htmlScaleFactor);
if(totalPdfHeight < htmlPageHeight){
pdf.addPage();
}
safetyNet++;
}
var pageName = document.location.pathname.match(/[^/]+$/)[0];
pdf.save(pageName + '.pdf');
};
html2canvas($('body')[0],
{
onrendered: function(canvas){
canvasToImageSuccess(canvas);
}
});
}
Below is the image in the HTML which is missing from the generated PDF-:

Hi @niklasvh,
I am fetching the images from CMS(Contentful) in my HTML and then trying to generate PDF of that HTML.
But in the generated PDF, images are missing.(seems to be an issue of cross origin).
Please suggest me how can i get rid of this issues.
Below is my code-:
function downloadPDF() {
var canvasToImage = function(canvas){
var img = new Image();
var dataURL = canvas.toDataURL('image/png');
img.crossOrigin = "Anonymous";
img.src = dataURL;
return img;
};
var canvasShiftImage = function(oldCanvas,shiftAmt){
shiftAmt = parseInt(shiftAmt) || 0;
if(!shiftAmt){ return oldCanvas; }
var newCanvas = document.createElement('canvas');
newCanvas.height = oldCanvas.height - shiftAmt;
newCanvas.width = oldCanvas.width;
var ctx = newCanvas.getContext('2d');
ctx.mozImageSmoothingEnabled = false;
ctx.webkitImageSmoothingEnabled = false;
ctx.msImageSmoothingEnabled = false;
ctx.imageSmoothingEnabled = false;
var img = canvasToImage(oldCanvas);
ctx.drawImage(img,0, shiftAmt, img.width, img.height, 0, 0, img.width, img.height);
return newCanvas;
};
var canvasToImageSuccess = function(canvas){
var pdf = new jsPDF('l','px'),
pdfInternals = pdf.internal,
pdfPageSize = pdfInternals.pageSize,
pdfScaleFactor = pdfInternals.scaleFactor,
pdfPageWidth = pdfPageSize.width,
pdfPageHeight = pdfPageSize.height,
totalPdfHeight = 0,
htmlPageHeight = canvas.height,
htmlScaleFactor = canvas.width / (pdfPageWidth * pdfScaleFactor),
safetyNet = 0;
while(totalPdfHeight < htmlPageHeight && safetyNet < 15){
var newCanvas = canvasShiftImage(canvas, totalPdfHeight);
pdf.addImage(newCanvas, 'png', 0, 0, pdfPageWidth, 0, null, 'NONE');
// var alias = Math.random().toString(35);
// pdf.addImage(newCanvas, 0, 0, pdfPageWidth, 0, 'png', alias, 'NONE');
totalPdfHeight += (pdfPageHeight * pdfScaleFactor * htmlScaleFactor);
if(totalPdfHeight < htmlPageHeight){
pdf.addPage();
}
safetyNet++;
}
var pageName = document.location.pathname.match(/[^/]+$/)[0];
pdf.save(pageName + '.pdf');
};
html2canvas($('body')[0],
{
onrendered: function(canvas){
canvasToImageSuccess(canvas);
}
});
}
Below is the image in the HTML which is missing from the generated PDF-:


Myself

I change a bunch of things to avoid conflicts with Myself's patch and make the game not crash. Please review because I don't know what I'm doing. Reordering rages, natural magic, and some kind of auction data all need to be reviewed. Note that without these changes the game crashes in the status screen and when rearranging items in or out of battle, and possibly under other conditions as well.

I've added an update for bcg_junction to this pull request; if you'd prefer I split this up into two different pull requests, let me know.

Fixed a bug where dance would not change the battle background.
Fixed mistakes in tags for certain items (in particular, items with spell procs or break effects)
Adjusted the distribution of junction effects to be much more uniform, while preserving theming where possible.
Added two new junction effects.
Altered the auto-potion junction to not trigger against "no counter" abilities.


feature request: search for topics LIKE a phrase (full text search for topic title)

Currently the topic: operator only matches exact topics.
It would be really helpful to be able to do searches like:
stream: updates topic: "project5:"
This would give me a list of topics whose title begins with "project5:".
This would be incredibly useful when bookmarking the search/view. Users could then establish
basic naming conventions and easily filter streams to sets of topics relevant to them.
If someone could comment with a possible plan of attack for implementing this, I might be able to dive in and try a PR.
EDIT: Zulip already highlights / matches text in topic titles. Maybe this only needs the front-end JS to filter topic titles by a search/match (instead of the current behavior of ===)?
(Suggested labels: "area: search" .)

Hi @Pugio,
I think this issue was raised before: https://github.com/zulip/zulip/issues/12328#issue-444515508, but no one has contributed to it as of now.
I went through the codebase and it seems that for searching, it calls json/messages GET method, with narrow query parameter with value like so,
[{"negated":false,"operator":"topic","operand":"URLS compiling quickly"}]
I too would like to contribute to this issue with a PR.

@zulipbot claim

I too would like to contribute to this issue with a PR, if thats ok with you.

Go for it, and thank you! Let me know if you'd like comments or help.

I think changing topic: to do contains instead of equals is a bad idea because it means we can no longer do searches in a specific topic (because we will also get results from other topics that have the same name with a prefix / suffix).
If you click in the header while viewing a topic you get a search that searches for topics within the current topic:

This should never yield results from other topics.
When in a stream searching for topic: autocompletes topic within the stream:

Selecting one of these should yield results from only this topic and never from any other topic.
So I think we should keep topic: as is and introduce a topic-contains: as suggested in #12328. To make the feature discoverable searching for topic:foo could offer an autocomplete option contains "foo" that when selected uses the topic-contains:foo syntax.

This seems like a different UX idea for #12328.


Relax the trait bounds of HashSet::raw_table{,_mut}

Removes the trait bounds T: Eq + Hash, S: BuildHasher from HashSet<T, S, A>::raw_table{,_mut}.
Considering that the HashMap counterpart doesn't have these bounds, they are likely unintentional.

@bors r+

:pushpin: Commit 5b9682243c9dde8b1ca82c9c1c44d8e940c2e273 has been approved by Amanieu
It is now in the queue for this repository.

:hourglass: Testing commit 5b9682243c9dde8b1ca82c9c1c44d8e940c2e273 with merge e8c96d03b59ae840b69e7380be0490aa0aaf789d...

:sunny: Test successful - checks-actions
Approved by: Amanieu
Pushing e8c96d03b59ae840b69e7380be0490aa0aaf789d to master...


Restore functionality

Can we restore backup on a device using NetiMobileDevice?
i found functionality for backup but not for restore

I haven't currently implemented this into the project, however I know it should be possible.
If you want to have a go at implementing it please feel free, if not I can probably add it sometime in the next week.


v2.9.14

This is an automated message from CI:
Docker Image for build 1 is available on DockerHub as jc21/nginx-proxy-manager:github-pr-1716
Note: ensure you backup your NPM instance before testing this PR image! Especially if this PR contains database changes.


SAK-49472 Samigo ability to export the student scores

Not a big fan of the button position, I contributed the patch as it was provided by UPV.

I'm going to check other tools and try to be consistent with the export option.

I moved the button to the top area, in the same position of the assignments tool:

Also moved the logic into it's own bean.


Hybrid envrionment.  Can't add external contacts to o365 groups.  global admin.  Can't see group settings.

Hybrid envrionment.  Can't add external contacts to o365 groups.  global admin.  Can't see group settings.
[Enter feedback here]

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

ID: 9f5592e2-3fee-9034-5b33-2d1687d60ba2
Version Independent ID: 5b8dee58-e383-9a26-570a-47f5c81121cb
Content: Manage guest access in Microsoft 365 groups - Microsoft 365 admin
Content Source: microsoft-365/admin/create-groups/manage-guest-access-in-groups.md
Service: o365-administration
GitHub Login: @MikePlumleyMSFT
Microsoft Alias: mikeplum

@msbemba  Thank you very much for the contribution and sharing this explanation. @dimmthewitted
Hope this comment is helpful for you. Considering the nature of the issue, as advised, please open a service ticket in your tenant and follow with them for the resolution. We proceed to close it as here we are limited to documentation fixes and improvements only.
We will be very happy if you can share the outcome or resolution with us if you see documentation update is required. We will certainly update this documentation with that valuable information. Thanks again, for taking out some time to open the issue. Appreciate and encourage you to do the same in future also.


Bug in Sign In page

sign In page and sign In page not looking good. There is problem in texts.
If  this issue not assigned then assign me. If it is then it's Ok.

@MAVRICK-1

@GOURAVSINGH19 okay go ahead try to solve both sign in and signup in a single issue

@MAVRICK-1  I already solve this in #107 issue


pkg/deploy/gce: add launcher option to run on Free Tier instance

This issue is about providing a very-low cost solution for users to try Camlistore out.
Google Cloud is now providing an "Always Free" Tier, so we should take advantage of that.
When that option is ticked, we should make sure to create a project/instance that matches the specs described at
https://cloud.google.com/free/

Need to finish issue #819 first though.

https://camlistore-review.googlesource.com/10346

Will this CL make the micro-free tier available in the launcher in the next
monthly release?
https://camlistore.org/launch/
I'd like to delete my current Camlistore instance as I keep stopping and
starting  GCE VM to avoid paying $15+ monthly cloud fees.
On Wed, Jun 7, 2017 at 4:31 PM, mpl<EMAIL_ADDRESS>wrote:

https://camlistore-review.googlesource.com/10346
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/camlistore/camlistore/issues/912#issuecomment-306955049,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAsyruz6apUe1bJN8v15LS_XYZ4caF2tks5sBzLNgaJpZM4MkkTq
.

First and foremost, please note that the Free Tier feature should really be considered a sort of trial/demo thing. f1-micro is tiny and has very little memory, so there's no guarantee Camlistore can perform properly on it in the long run. Also there's only 5GB/month of GCS in the Free Tier, so as soon as you go over that, you start paying the regular price.
I have not cut any release as usual early this month, because there were too few changes that landed in may to make it worth a release imo.
That said, I do hope to make a release early in July, which would coincide as usual with an update to the launcher. So yes, if CL 10346 has landed in the meantime, the launcher will then have the Free Tier feature.
In any case, you should know that it is trivial to run an instance of the Camlistore website (including the launcher), so if needed you could do it yourself or I could do it for you.


Can not import ESM bundle for browser with NextJS 14

Issue Description
When importing Human on a NextJS 14 project, the framework tries to import the node bundle instead of ESM for browsers, despite adding 'use client' on top of the page file.
Since node bundle requires a tfjs backend, the error below comes in:
./node_modules/@vladmandic/human/dist/human.node.js:7:1678
Module not found: Can't resolve '@tensorflow/tfjs-node'

I know that this is not an issue within the Human package at all and it's about NextJS SSR. However I guess you may help me to achieve the desired solution.
I already tried to load Human within a separated dynamic loaded component with dynamic(() => import('@/components/Human'), { ssr: false }), but it also did not work.
I also tried to import it inside a useEffect of the Human component created as you did in your class constructor in NextJS demo, but it also did not work.
I also tried to import Human explicitly from @vladmandic/human/dist/human.esm but it did not found the path.
Everything works fine if I use Vite instead of NextJS to create my project.
Steps to Reproduce

Create a new project with npx create-next-app app-name and choose all default configs.
Run npm i
Change app/page.tsx to add 'use client' on top the file and add import to Human import { Human } from '@vladmandic/human.
Run npm run dev
Access the URL on your browser

Expected Behavior
NextJS identify that I'm using a client component on that page and load ESM bundle of Human package instead of node bundle.
Environment

Human library version? 3.2.0
Built-in demo or custom code? Custom code. Just create a project and import Human.
Type of module used (e.g. js, esm, esm-nobundle)? esm
TensorFlow/JS version (if not using bundled module)?
Browser or NodeJS and version (e.g. NodeJS 14.15 or Chrome 89)? Arc 1.28.0
OS and Hardware platform (e.g. Windows 10, Ubuntu Linux on x64, Android 10)? macOS 14.2.1 on M2 Pro (arm64)
Packager (if any) (e.g, webpack, rollup, parcel, esbuild, etc.)?
Framework (if any) (e.g. React, NextJS, etc.)? NextJS

Diagnostics

Check out any applicable diagnostic steps

Additional

For installation or startup issues include your package.json
For usage issues, it is recommended to post your code as gist
For general questions, create a discussion topic

can you share the code?  I had some issues at first with Next.js 14, but got it working.  Ensure that you are explicitly using the "use client"; where appropriate.

@jpieters You can check the issue/example of the code in this repo: https://github.com/tembra/human-nextjs-14
There I tried many ways to load Human, each one in a specific intuitive named route, and they all fail.

http://localhost:3000/ default way
http://localhost:3000/no-ssr
http://localhost:3000/lazy-loaded
http://localhost:3000/dom-content-loaded
http://localhost:3000/load-on-button-click

Notice that even on /load-on-button-click the error occurs during the build time. It seems that TypeScript/NextJS is executing the code inside the callback function that is assigned to a variable, but never called.
Even if NextJS is pre-rendering client components/pages on the server for the initial page load, it does not makes sense that this function is being executed.
Said that I think that import keyword is the problem, with TypeScript/NextJS trying to immediately find/import the module during the build time. Thinking this way I also tried to use (and also change/adapt) the webpack configuration from next.config.js of the human-next demo.
If you can share how you got it working it will be awesome. I'm really out of ideas.

After digging deeper on webpack configuration I managed to get it working using this next.config.mjs configuration:
/** @type {import('next').NextConfig} */
const nextConfig = {
    webpack: (config, { webpack, isServer }) => {
        if (isServer) {
            config.plugins.push(
                new webpack.IgnorePlugin({
                    checkResource(resource) {
                        if (resource === '@vladmandic/human') {
                            // ignore human package on server
                            return true
                        }

                        return false
                    },
                })
            )
        }

        return config
    }
}

export default nextConfig

With this configuration all my examples of the shared code work. Except the /dom-content-loaded because it was implemented wrong (the DOMContentLoaded event is already dispatched when useEffect runs).
However I still want to know WHY the module is being imported/resolved by webpack on server rendering if it is lazy loaded inside a callback.
Anyone has any thoughts/explanations or am I missing something in my code?

since this is not an issue with human itself, this is better suited for discussions.
also, i'm not a next.js user, so really cannot help much. i've experimented with next long time ago and while i liked the concept, i really did not like how its build/packaging process and weird webpack worked.


Cross-hair doesn't invert colours

In vanilla, the cross-hair isn't rendered just as texture specified in assets/minecraft/textures/gui/icons.png, it's actually used as a mask to invert colours (which allows you to see it whether you're looking at something dark or something bright). Because this mod makes the cross-hair (it's a HUD element) render as a texture with transparency, that colour inversion feature seems to be broken.
Ideally it should use the transparency level to figure out how much it should invert the colours by (like overlay the inverted colour with however much transparency was specified by the pixel). Making it just not affect the cross-hair at all though would probably be easier and still fine for most use-cases (like mine, I just want this so I can have partially transparent inventories).
Vanilla:

With semi-translucency fix:

With semi-translucency fix (and a resource pack making the cross-hair 50% transparent, so you can see that the transparency does work):

(tested in 1.19.2 using Quilt and mod version 1.1-fabric, in-case that matters)

Huh. Weird. Didn't know that this caused that, but now that you point it out, yeah, I've noticed that.
I'm not sure if I can fix that, or if I even have the knowledge to.

fixed with 2d06db763d24c50bd49dec2fbad2c4270bef9dad


Please add hpp files to fixed_math_include_files

When I try to install this library, I found fixed_math.hpp is not installed.
It seems to be caused by the lack of GLOB patterns.
This PR tries to solve it.

Thx, You are right.

@toge I published release v1.0.1 with this fix, hope it helps You.

Thanks for quick response!


encode Lambda incorrectly uses default settings

Describe the bug
encode Lambda with hard-coded defaults overwrites specified MediaConvert template settings, including CMAF segmentLength which was my particular issue.
https://github.com/awslabs/video-on-demand-on-aws/blob/f9b59fab658ce86d7f8336786a78b7063de462b9/source/encode/index.js#L60
https://github.com/awslabs/video-on-demand-on-aws/blob/f9b59fab658ce86d7f8336786a78b7063de462b9/source/encode/index.js#L119
https://github.com/awslabs/video-on-demand-on-aws/blob/f9b59fab658ce86d7f8336786a78b7063de462b9/source/encode/index.js#L219
Instead of preserving only custom template settings, the function should also preserve MediaConvert template settings.  I believe this is most easily accomplished by removing the conditional and merging/preserving template settings regardless of if it's custom or set in MediaConvert.  I've created a pull request for this: https://github.com/awslabs/video-on-demand-on-aws/pull/107
To Reproduce

create a CMAF MediaConvert template with segment length 3 seconds
specify this template in the environment vars and ingest a video

Expected behavior

output should include segment length of 3 seconds, instead of the hard-coded default of 30 seconds.

Please complete the following information about the solution:

[x] Version: 5.1.0
[x] Region: us-east-1
[x] Was the solution modified from the version published on this repository?
[x] If the answer to the previous question was yes, are the changes available on GitHub?
[x] Have you checked your service quotas for the sevices this solution uses?
[ ] Were there any errors in the CloudWatch Logs?

Again thanks for this we will review the PR in the next release.

Closing this ticket, this was updated in 5.2.


onboarding and removing organizers

Update the "How to onboard new organizers" section.
Add the "How to remove retired chapter organizers" section.

Thanks so much for your PR, @moon-rlady! That was a long needed revision of the current version ☺ I added a few thoughts and ideas - I'm happy to support / juggle ideas when needed. Let me know!

Hi @cosimameyer,
Thank you very much for your support and for your contribution. Could you please let me know where I can see the thoughts and ideas you've added? I'm having trouble finding them out. 🙈

@moon-rlady no worries :) They are here: https://github.com/rladies/rladiesguide/pull/148
Or if you scroll a bit up and you should see this:

If you want to see them in the file, you can follow this link: https://github.com/rladies/rladiesguide/pull/148/files
It should look like this for you:

You can either add your changes to the file directly (locally or in the browser-based version) and push them or reply in a comment in the "chat" window you see in the screenshot :)


Relative path patch

Following PR #160 and the advice of @yunjunz from #253, absolute path designations reverted back to relative path.
@ehavazli @bbuzz31 as a sanity check, do you recall any specific reason from previous discussions regarding why an absolute path would be preferred over relative paths?

Thanks @yunjunz, does this PR address your issues?
@sssangha: If greenlighted by ohters can you:

backport the change to the release-v1.1.2 branch
make a re-release of the v1.1.2 release from the v1.1.2 branch.

Following PR #160 and the advice of @yunjunz from #253, absolute path designations reverted back to relative path.
@ehavazli @bbuzz31 as a sanity check, do you recall any specific reason from previous discussions regarding why an absolute path would be preferred over relative paths?

I believe this change was applied to make MintPy processing more portable/flexible. If it is defeating the purpose, there is no reason to stick with abspath.

Thanks @yunjunz, does this PR address your issues?

Yes, thank you @dbekaert and @sssangha.


Should type in contenteditable div even if it has invisible child with contenteditable=false (#2205)

…

@testcafe-build-bot \retest

Here we use isDisplayNone instead of IsElementHidden, because the situation is possible when textNode is inside a div with height = 0 and width = 0. In this case text is still visible, so I think textNode should not be ignored

FPR

/cc @helen-dikareva


Merge refs/heads/update-dependencies into alpha

Merge refs/heads/update-dependencies into alpha

This PR has been merged into alpha. Thanks for your contribution!


[feature] adapter-cloudflare: make build target configurable

Describe the problem
I would like the build target to be configurable for the adapter-cloudflare package. I want to use es2022 to get top level await but es2020 is hardcoded: https://github.com/sveltejs/kit/blob/master/packages/adapter-cloudflare/index.js#L49
Describe the proposed solution
I'd like the build target to be configurable by the user.
Alternatives considered
I've considered:

making my code conform to es2020 using the vite-plugin-top-level-await plugin
patching adapter-cloudflare using https://www.npmjs.com/package/patch-package

Right now I'm using a patch, as I run into problems with the vite-plugin-top-level-await plugin and requiring es2022 is fine for my use-case.
Importance
would make my life easier
Additional Information
No response

Is there any reason not to just always use es2022?

According to https://github.com/cloudflare/workers-sdk/pull/2720, es2022 is okay


[WIP] rcS replace old tone_alarm usage with tune_control

There's still more to fix.

flash v4, getting error tones upon boot

flashed v2, getting same error tones, solid lite Blue and error messages on qgroundcontrol

Blocking boot in many situations.

@davids5 @simonegu looks like tone_alarm stm32 is pretty out of sync with kinetis and samv7.

@dagar There is no documentation anywhere of tune_control (or the system it replaces). Personally I'd like every module, driver, whatever have at least the kind of high level docs we find in https://github.com/PX4/Firmware/blob/master/src/templates/module/module.cpp ... and allow them to be auto extracted.
Thoughts?

If we switch tune_control to use ModuleBase then we should get the generated documentation.

tune_control is just a command, so you don't need to use ModuleBase. But we should replace https://github.com/PX4/Firmware/blob/master/src/systemcmds/tune_control/tune_control.cpp#L65, with the PRINT_MODULE_* methods.

So will PRINT_MODULE_* allow PX4_INFO to also output usage on command line?

So will PRINT_MODULE_* allow PX4_INFO to also output usage on command line and automatically get picked up in docs?

Yes exactly. You use it instead of PX4_INFO


Show one line in diff when cost component labels change

I originally did this by separating the cost component name from the labels, but this modified the JSON output. After discussing with @alikhajeh1 we agreed not to change the JSON output format at the moment, so this change parses the labels from the name instead. The one change to the JSON output is we update the name of the diff cost components to
be show something like Instance usage (Linux/UNIX, on-demand, t3.small → t3.large).
This also updates the output to replace -> with → and - with ─ (so the line is continuous).
Before:
~ module.base.module.eks.module.node_groups.aws_eks_node_group.workers["default"]
  +$207 ($75.55 -> $283)

    - Instance usage (Linux/UNIX, on-demand, t3.small)
      -$45.55

    + Instance usage (Linux/UNIX, on-demand, t3.large)
      +$243

After:
~ module.base.module.eks.module.node_groups.aws_eks_node_group.workers["default"]
  +$207 ($75.55 → $283)

    ~ Instance usage (Linux/UNIX, on-demand, t3.small → t3.large)
      +$197 ($45.55 → $243)

Merging this and will fix the Azure test in another PR.


⚠ Bofrost.at has degraded performance

In bfbbcfb, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1316 ms

Resolved: Bofrost.at performance has improved in 6286d2c after 15 minutes.