url_launcher: WebViewActivity.java uses or overrides a deprecated API.

Steps to Reproduce

See https://github.com/Hope-Studio/inNENU-flutter/runs/886996626?check_suite_focus=true
Gradle reports that url_launcher is using a deprecated API in WebViewActivity.java
Expected results:
Actual results:
Run flutter build apk --target-platform=android-arm64
  flutter build apk --target-platform=android-arm64
  shell: /bin/bash -e {0}
  env:
    FLUTTER_HOME: /opt/hostedtoolcache/flutter/1.17.5-stable/x64
Running Gradle task 'assembleRelease'...
Note: /opt/hostedtoolcache/flutter/1.17.5-stable/x64/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.5.0/android/src/main/java/io/flutter/plugins/urllauncher/WebViewActivity.java uses or overrides a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

Logs

Duplicate of #37616
Its just a warning. You can generate the production app and run it without any issue.

Closing this as duplicate of 37616


fix DeprecationWarnings

The following deprecation warning is thrown in tests/jax_utils_test.py due to a chex import error. This PR will add a rule to ignore this specific deprecation warning.
This is the traceback:
tests/jax_utils_test.py:19: in <module>
    import chex
venv/lib/python3.10/site-packages/chex/__init__.py:17: in <module>
    from chex._src.asserts import assert_axis_dimension
venv/lib/python3.10/site-packages/chex/_src/asserts.py:26: in <module>
    from chex._src import asserts_internal as _ai
venv/lib/python3.10/site-packages/chex/_src/asserts_internal.py:34: in <module>
    from chex._src import pytypes
venv/lib/python3.10/site-packages/chex/_src/pytypes.py:54: in <module>
    PRNGKey = jax.random.KeyArray
venv/lib/python3.10/site-packages/jax/_src/deprecations.py:51: in getattr
    warnings.warn(message, DeprecationWarning, stacklevel=2)
E   DeprecationWarning: jax.random.KeyArray is deprecated. Use jax.Array for annotations, and jax.dtypes.issubdtype(arr, jax.dtypes.prng_key) for runtime detection of typed prng keys.

Flax is using jax.linear_util.wrap_init, which is a deprecated API:
DeprecationWarning: jax.linear_util.wrap_init is deprecated. Use jax.extend.linear_util.wrap_init instead.

This PR will switch to jax.extend.

Codecov Report

Merging #3352 (070c8be) into main (7f27932) will decrease coverage by 0.07%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #3352      +/-   ##
==========================================
- Coverage   83.03%   82.97%   -0.07%
==========================================
  Files          55       55
  Lines        6521     6518       -3
==========================================
- Hits         5415     5408       -7
- Misses       1106     1110       +4

Files Changed
Coverage Δ

flax/core/axes_scan.py
95.52% <100.00%> (ø)

flax/core/partial_eval.py
100.00% <100.00%> (ø)

flax/jax_utils.py
44.06% <100.00%> (ø)

... and 4 files with indirect coverage changes


Offer rayon crate feature that parallelizes index-building

Our IndexedCrate type builds a variety of indexes based on the underlying rustdoc crate.
Rustdoc crates' JSON can be ~450MB in size for particularly large crates, so our indexes can be significant in size too. They could probably be built in parallel using rayon.
We don't want to require rayon, since that may not be suitable for all use cases. But we should offer it as a non-default option in case the performance improvement is worth it. For example, cargo-semver-checks would enable it, whereas the rustdoc Trustfall playground would probably not enable it.
Required steps:

[ ] add optional rayon feature
[ ] adjust CI to run tests both with and without the feature, so both configurations are known correct
[ ] implement rayon parallelization for index-building
[ ] benchmark (on your own machine) how much faster rayon makes IndexedCrate::new() on the rustdoc JSON of a large crate like aws-sdk-ec2

to generate rustdoc JSON, clone that repo, cd into the crate's directory, and use the RUSTDOCFLAGS="-Z unstable-options --document-private-items --document-hidden-items --output-format=json --cap-lints=allow" cargo doc --lib --no-deps shell command which will put aws-sdk-ec2.json into the target/doc directory of the workspace

This is a good first issue for someone who is already familiar with Rust, somewhat familiar with rayon, and wants to start contributing to this project. It is not a good first issue for folks new to Rust, since it requires understanding advanced Rust concepts such as Send + Sync auto-traits etc.
Comment to temporarily claim the issue, in case multiple people are interested in it!

I have 2h tomorrow I can spend on this (in ~22h from the time I posted this comment). I'll do a test implementation and go from there c:

Hey, welcome to the project and thanks for looking into this! Feel free to reach out with any questions, I'm happy to help!

Closed by #424 ?

Indeed, thank you!


Automated cherry pick of #8947: fix(region): change_ipaddr: retain eip_id on detach and attach

Cherry pick of #8947 on release/3.3.
#8947: fix(region): change_ipaddr: retain eip_id on detach and attach

Codecov Report

Merging #8951 (841f5aa) into release/3.3 (9a6c26d) will decrease coverage by 2.71%.
The diff coverage is 0.29%.

@@              Coverage Diff               @@
##           release/3.3   #8951      +/-   ##
==============================================
- Coverage         6.78%   4.07%   -2.72%
==============================================
  Files              676     281     -395
  Lines           118955   59485   -59470
==============================================
- Hits              8076    2424    -5652
+ Misses          110267   56870   -53397
+ Partials           612     191     -421

Flag
Coverage Δ

aFlag
4.07% <0.29%> (-2.72%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

pkg/cloudcommon/notifyclient/notify.go
2.22% <0.00%> (-0.36%)
:arrow_down:

pkg/compute/models/buckets.go
1.10% <0.00%> (-0.07%)
:arrow_down:

pkg/compute/models/capabilities.go
0.00% <0.00%> (ø)

pkg/compute/models/cloudproviderregions.go
0.00% <0.00%> (-0.27%)
:arrow_down:

pkg/compute/models/cloudproviders.go
0.87% <0.00%> (+0.01%)
:arrow_up:

pkg/compute/models/cloudregions.go
1.54% <0.00%> (-0.09%)
:arrow_down:

pkg/compute/models/cloudsync.go
0.00% <0.00%> (ø)

pkg/compute/models/dbinstance_accounts.go
2.05% <0.00%> (-0.03%)
:arrow_down:

pkg/compute/models/dbinstance_backups.go
2.78% <0.00%> (-0.17%)
:arrow_down:

pkg/compute/models/dbinstance_databases.go
3.33% <0.00%> (-0.07%)
:arrow_down:

... and 710 more

Continue to review full report at Codecov.

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


HIVE-20608: Fix incorrect derivation of command args

Fix incorrect derivation of command args

Added JIRA number.  Added test case.
The test case discussion can also be found on the JIRA itself https://issues.apache.org/jira/browse/HIVE-20608


Add possibility to estimate tech debt in code

Expected Behavior
Detekt allows to configure some rules which would help dev teams see estimated cost in either time or money value of the tech debt they have.
Current Behavior
Currently not implemented in Detekt
Context
Idea comes from the new feature introduced recently in Dart Code Metrics.
Here is a brief visual representation of what the feature is about: https://twitter.com/_incendial/status/1467185701569822720?s=20
I believe such metric could be useful for some orgs/teams, so people could have some estimated numbers for their plannings/prioritisation sessions.

Right now we generate an stimated time about how many time it will take to solve it. We know that this value is really loose. We could add the option to customize the time of each rule. We talked about that some time ago here: https://github.com/detekt/detekt/pull/3339#issuecomment-753401606 Would this be enough?
As a side note. Detekt already allow you to create your own reports: https://detekt.github.io/detekt/extensions.html#custom-reports

Yes, having an option to customize times for rules might be enough, I believe. Thanks for sharing.
Currently I am not really involved into some Android project where I could try out things and provide feedback you might want to implementation. Opened issue mainly due to seeing such thing for Flutter projects and thinking that it might be a good addition for Android devs as well.

We could add the option to customize the time of each rule. We talked about that some time ago here: #3339 (comment) Would this be enough?

To add to this: I think in general is a good idea. I still have to find a real use case for those numbers though. I see several tools generating those "complexity" reports, but the number are generally really arbitrary and not really meaningful to the developers.
Potentially having those metrics configurable would help to make it more concrete for each codebase.

Good idea, I'll start taking a look at this shortly.

I'm not sure if this is going to be possible without introducing breaking changes. I tried implementing this in Rule:
abstract class Rule(
    override val ruleSetConfig: Config = Config.empty,
    ruleContext: Context = DefaultContext()
) : BaseRule(ruleContext), ConfigAware {

    open val defaultDebt: Debt = Debt.TEN_MINS

    val issueDebt: Debt
        get() = valueOrNull<Int>("issueDebt")?.let { Debt(mins = it) } ?: defaultDebt

and then this in an extending class:
class TestRule(config: Config) : Rule(config) {
    override val defaultDebt = Debt.FIVE_MINS
    override val issue = Issue("TestRule", Severity.Defect, "A Test Rule", issueDebt)
}

However, it failed due to a circular dependency in looking up configuration. The way the rules look up configuration values is by using the id of the Issue object that's defined in the class that inherits Rule, meaning that a configured debt value cannot be provided for Issue, as looking up the rule id will call final override val ruleId: RuleId get() = issue.id, which will return null because issue isn't fully instantiated yet.
I have a different solution in mind - one that will, among other things, have a rule's ID be defined when defining the rule itself - but it's going to break any third-party rules that have been written to extend Detekt's rule set. @cortinico @BraisGabin let me know what you think.

I'm on mobile so I can't check it now but I remember that the debt is defined in the issue. And it is passed on the reportIssue function. Wouldn't it as easy as check there if the debt has been overwritten in the configuration and change the value? This way we don't need to change the rule.

It would be possible, but that would increase boilerplate even more by forcing the developer to have to do something like clone the rule's issue object and pass in the configured debt time each time they call reportIssue(). Furthermore, this still leaves in place the problem that tightly coupling a rule's ID to issue.id has imposed the limitation that configurability of an issue (e.g. like the debt times here) is not possible outside of some real kludge-y stuff, and that limitation isn't even visible until somebody runs into that wall at runtime execution. Maybe this might be something that would be better for a Detekt 2.0, where the implementation can be done in a more future-proofed way and not have to worry about backwards compatibility.

Another thought occurred to me: we could introduce a reimplementation of the Rule class and deprecate the old one so that developers could switch to the new Rule implementation at some point in the future. I originally started down this line initially with code like this:
abstract class Rule(
    override val ruleSetConfig: Config = Config.empty,
    ruleContext: Context = DefaultContext()
) : BaseRule(ruleContext), ConfigAware {

    abstract val id: String

    abstract val severity: Severity

    abstract val description: String

    abstract val defaultDebt: Debt

    /**
     * A rule is motivated to point out a specific issue in the code base.
     */
    val issue: Issue by lazy { Issue(id, severity, description, debt) }

    private val debt: Debt
        get() = valueOrNull<Int>("debtTime")
            ?.let { Debt(mins = it) }
            ?: defaultDebt

    /**
     * An id this rule is identified with.
     * Conventionally the rule id is derived from the issue id as these two classes have a coexistence.
     */
    final override val ruleId: RuleId get() = id

with the extending classes then looking like this:
class CommentOverPrivateFunction(config: Config = Config.empty) : Rule(config) {

    override val id = "CommentOverPrivateFunction"

    override val severity = Severity.Maintainability

    override val description = "Comments for private functions should be avoided. " +
        "Prefer giving the function an expressive name. " +
        "Split it up in smaller, self-explaining functions if necessary."

    override val defaultDebt = Debt.TWENTY_MINS

but switched to attempt something that wouldn't break backwards compatibility. Maybe I could do something create class IssueConfigurableRule and have all of the rules in Detekt's codebase extend that class, after which the original Rule class could be deprecated and eventually discarded in the future.

If we need to change the rule api I would vote to don't do it at least until 2.0. This feature isn't that important to do something like that.
But I don't see why would my idea increase the boiler plate in the rules. Can't we just read the debt value from the configuration on the reportIssue function? We will come the issue in there if needed. The change shouldn't polute each rule.

report() doesn't take in an instance of Issue directly - it takes in an
instance of the Finding interface, whose issue property is immutable.
It'd be possible to refactor the debt field in Issue to be mutable so
that it'd be possible to write finding.issue.debt = configuredDebt, but
that would be removing some data security in Issue because of this
workaround.
I'm going to try getting up PR tomorrow with the IssueConfigurableRule I
mentioned earlier so that there'll be something visual to discuss.
El dg., 19 de des. 2021, 15:02, Brais Gabín @.***> va
escriure:

If we need to change the rule api I would vote to don't do it at least
until 2.0. This feature isn't that important to do something like that.
But I don't see why would my idea increase the boiler plate in the rules.
Can't we just read the debt value from the configuration on the reportIssue
function? We will come the issue in there if needed. The change shouldn't
polute each rule.
—
Reply to this email directly, view it on GitHub
https://github.com/detekt/detekt/issues/4359#issuecomment-997397431, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AC7SZ4PYS4GUI63D4GR5BEDURXQWPANCNFSM5JOAEUYQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID:
@.***>

Sorry, I didn't have a computer around until now. What I was talking is that we could add code here:
https://github.com/detekt/detekt/blob/e2cc197669c9f3ec5a279a7d7568e73527ba0a0d/detekt-api/src/main/kotlin/io/gitlab/arturbosch/detekt/api/Rule.kt#L81-L84
The same way that we change the severity value we can change the debt value. We will need to clone the SmellCode but it would work. I know, that's not a neat solution. But we shouldn't change the api of Rule just to allow this customazation.
As I said in #4385 we already have a draft for how we will like to define a Rule and it's way simpler. All this things shouldn't be handled by the rule but by the core of detekt (or not even the core but just a report transformation but that's another topic). But that change will happend in 2.0.
If you are interseted in those topics we can move the discussion to other issue/discussion. But I think that to implment this feature we should do it keeping the public API or just wait for 2.0.

If I'm not mistaken, CodeSmell, CorrectableCodeSmell, and ThresholdedCodeSmell are all exposed and extendable in third-party libraries, so there wouldn't be a way to define some general copy method like in the data classes without requiring the third-party classes to be redefined as well, lest those objects get overridden. For example, if I make FooSmell() : CodeSmell() and modify the code to say:
class CodeSmell() {
    open fun copy(newIssue: Issue): CodeSmell {
        ...
    }
}

then modify report to read:
 fun report(finding: Finding) {
     (finding as? CodeSmell)?.internalSeverity = computeSeverity()
     val reportedFinding = (finding as? CodeSmell)?.let { it.copy(issue.copy(debt = configuredDebt)) } ?: finding
     report(reportedFinding, aliases, ruleSetId)
 }

then any instance of a class that extended CodeSmell but did not override copy() would be "downgraded" to CodeSmell. That is to say, it'd still be modifying the public API.
Ultimately, I think it would be better to put this off to 2.0 and modify the new Rule interface mentioned in the PR, because these solutions look like they'd either make the code more brittle or will require action by third-party developers.

Agree, I tag this issue as future breaking change so we remember about it for 2.0

Now Debt concept has been removed by #6460 I believe this should be closed.

Now Debt concept has been removed by #6460 I believe this should be closed.

Agree 👍 closing


Simplify targets and settings for cton-util wasm.

This makes licm and simple_gvn tests require a target ISA. Those passes don't inherently require a target ISA, though in any realistic use case they'll have one, and this allows them to have access to the contained Flags.
This also moves the responsibility for asking for cfg and domtree computations the code that needs them, to reduce the number of places that implicitly know about pass dependencies.
And it adds a more complete way to specify flags and isa to cton-wasm via the command-line.

This PR seems to contain a number of unrelated changes that I would prefer to deal with in separate PRs.

For passes that need to access the Flags, I don't understand the benefit of giving them a TargetIsa when you can just pass a &Flags reference. If these passes really are ISA independent, I don't want the possibility of them sneaking in ISA-dependent behavior that then requires more testing.
Regarding the "host" ISA in the lookup function. This opens the door for file tests that behave differently on different host ISAs I really want to avoid that because we would need much more CI coverage. LLVM has tests like this and it's causing a world of problems. Most realistic ISAs also need further information about CPU features to be useful, and I don't want to do CPU detection in Cretonne.
I don't think it makes sense to pass the dominator tree to legalize_function() just to invalidate it there. If the legalizer doesn't use the dominator tree, it shouldn't be responsible for invalidating it. I wouldn't want to pass in the loop analysis for invalidation either.
For the command line, I would prefer a syntax that is closer to the set and isa directives in test files. So something like --set foo and --set foo=bar. Compare to the standard -DFOO and -DFOO=BAR flags to a C compiler. For the --isa option, I think the argument should be the whole isa line, so --isa "intel haswell".

Thanks for the feedback! I'm submitting a new series of pull requests.


WIP - feat: Added docker support

This feature adds docker support which should hopefully aid the user experience (UX) in setting up the project and will resolve any mismatching versions on peoples machines.
This won't support if user's wish to take advantage of the pyautogui due to the nature that this is running inside a container and won't have access to view the host's display. I am not sure the % of people who don't utilize this feature, maybe there can be some discussion, if everyone is using this, then there isn't much point of containerizing the python app and maybe just do the web ui instead.
There are two docker files, one for the python app and the other for the web ui.
To build the project with docker you can run docker compose up --build and you'll see both containers, each running on the same port as they originally were configured to 3000 and 8000
I also added the zod npm package to the frontend and built a environment.ts file to have some type-safe environment variables, then swapped out the base urls with the referenced environment variable. I had to make a few frontend changes due to the project not building with next build due to some Typescript errors. (Apologies for a lot of code change with the frontend, my formatter and linter made consistencies with " and ' being used interchangeably throughout the project.
What it looks like for a user's first time setup (assuming docker is installed and the you're in the path of the repo):

We still need the initialization, as the program will not run without config.json present.

windows docker run --rm -v "$(pwd):/app" -w /app python:3.11-slim-bookworm python3 init.py
linux docker run --rm -v "$(pwd):/app" --user $(id -u):$(id -u) -w /app python:3.11-slim-bookworm python3 init.py

We can then spin up the containers using docker compose.

docker compose up --build

Accessible over the previous ports.
TODO:

[ ] Update README

Nice!

Just pushed changes to the README, moved some things around with the introduction of an alternative method of running the app, things like the previous requirements are technically no longer a requirement if you opt for the Docker approach, so moved things into sub headings for building with docker and building from source.
Feel free to recommend changes if there are better ways for the flow of reading it to improve.
Visible version here if you want a visual reference of the README.


update inventory doc , inventory move

update inventory doc , inventory move

Coverage increased (+0.02%) to 77.885% when pulling 802401368eaf0bc12df216b46af9dc9b8c271ddd on adityahenanda:dev into 3099447eace20ec9026c14c76ab58df771f99912 on danliris:dev.


Docker depends on utillinux

Hi,
I'm using
Docker needs blkid (depends on utillinux).
I enable docker with the following configuration only:
virtualisation.docker.enable = true;

I get the following status:
● docker.service - Docker Application Container Engine
   Loaded: loaded (/nix/store/avhm5zj9rzq6rbh9idlzndqzvp26v7r2-unit-docker.service/docker.service)
   Active: failed (Result: exit-code) since Fri 2015-08-28 13:15:26 UTC; 1min 53s ago
  Process: 10372 ExecStartPost=/nix/store/q3riq7z8n850lgqrzrn31qjf5j3yb92k-unit-script/bin/docker-post-start (code=exited, status=0/SUCCESS)
  Process: 10371 ExecStart=/nix/store/dnk6r07m4ds4ji2n2p4kbpp3abv4h-docker-1.8.1/bin/docker --daemon=true --group=docker (code=exited, status=1/FAILURE)
 Main PID: 10371 (code=exited, status=1/FAILURE)

Aug 28 13:15:26 n4 systemd[1]: Started Docker Application Container Engine.
Aug 28 13:15:26 n4 docker[10371]: Warning: '--daemon' is deprecated, it will be removed soon. See usage.
Aug 28 13:15:26 n4 docker[10371]: time="2015-08-28T13:15:26Z" level=warning msg="please use 'docker daemon' instead."
Aug 28 13:15:26 n4 docker[10371]: time="2015-08-28T13:15:26.447966291Z" level=info msg="Listening for HTTP on unix (/var/run/docker.sock)"
Aug 28 13:15:26 n4 docker[10371]: time="2015-08-28T13:15:26.482644879Z" level=error msg="[graphdriver] prior storage driver \"devicemapper\" failed: Could not query and save base device UUID:exec: \"blkid\": executable file not found in $PATH"
Aug 28 13:15:26 n4 docker[10371]: time="2015-08-28T13:15:26.482713086Z" level=fatal msg="Error starting daemon: error initializing graphdriver: Could not query and save base device UUID:exec: \"blkid\": executable file not found in $PATH"
Aug 28 13:15:26 n4 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Aug 28 13:15:26 n4 systemd[1]: Unit docker.service entered failed state.
Aug 28 13:15:26 n4 systemd[1]: docker.service failed.

The path from utillinux is missing from the service unit:
[Unit]
After=network.target
Description=Docker Application Container Engine

[Service]
Environment="LOCALE_ARCHIVE=/nix/store/2mbqc6p36xlyl21d4mf1zhmprmqijwkk-glibc-locales-2.21/lib/locale/locale-archive"
Environment="MODULE_DIR=/run/current-system/kernel-modules/lib/modules"
Environment="PATH=/nix/store/z0rgmk4hqwhskmskm0c65680v4652n32-kmod-21/bin:/nix/store/p48nbf29nkv54vbvwqfqccwym58zf6bb-coreutils-8.24/bin:/nix/store/vmfzhzfh5w3hzxh7y0i4pf28h6jbqi62-findutils-4.4.2/bin:/nix/store/qrk6cndaf867z1blcfa9hpxrlar265j7-gnugrep-2.21/bin:/nix/store/5i5salk61869jjac0mgvj4n4agg2k2q0-gnused-4.2.2/bin:/nix/store/p0smmqn5jvf8hc34k8blixarpv3kj5q0-systemd-217/bin:/nix/store/z0rgmk4hqwhskmskm0c65680v4652n32-kmod-21/sbin:/nix/store/p48nbf29nkv54vbvwqfqccwym58zf6bb-coreutils-8.24/sbin:/nix/store/vmfzhzfh5w3hzxh7y0i4pf28h6jbqi62-findutils-4.4.2/sbin:/nix/store/qrk6cndaf867z1blcfa9hpxrlar265j7-gnugrep-2.21/sbin:/nix/store/5i5salk61869jjac0mgvj4n4agg2k2q0-gnused-4.2.2/sbin:/nix/store/p0smmqn5jvf8hc34k8blixarpv3kj5q0-systemd-217/sbin"
Environment="TZDIR=/nix/store/pl3066vi01b5ynjxi9wf51yyg8dnv43b-tzdata-2015f/share/zoneinfo"

X-RestartIfChanged=false

ExecStart=/nix/store/dnk6r07m4ds4ji2n2p4kbpp3abv4h-docker-1.8.1/bin/docker --daemon=true --group=docker
ExecStartPost=/nix/store/q3riq7z8n850lgqrzrn31qjf5j3yb92k-unit-script/bin/docker-post-start
LimitNOFILE=1048576
LimitNPROC=1048576

If I add utillinux as a buildInputs on the derivation, it doesn't solve the issue. The unit is generated by:
https://github.com/NixOS/nixpkgs/blob/release-15.09/nixos/modules/virtualisation/docker.nix
I'm using nixos 15.09:
[root@n4]# nixos-version
<IP_ADDRESS>be7d99 (Dingo)

I have this fixed already, will push during the weekend, tnx!
On Fri, Aug 28, 2015 at 3:34 PM Florian Duraffourg<EMAIL_ADDRESS>wrote:

Hi,
I'm using
Docker needs blkid (depends on utillinux).
I enable docker with the following configuration only:
virtualisation.docker.enable = true;
I get the following status:
● docker.service - Docker Application Container Engine
Loaded: loaded (/nix/store/avhm5zj9rzq6rbh9idlzndqzvp26v7r2-unit-docker.service/docker.service)
Active: failed (Result: exit-code) since Fri 2015-08-28 13:15:26 UTC; 1min 53s ago
Process: 10372 ExecStartPost=/nix/store/q3riq7z8n850lgqrzrn31qjf5j3yb92k-unit-script/bin/docker-post-start (code=exited, status=0/SUCCESS)
Process: 10371 ExecStart=/nix/store/dnk6r07m4ds4ji2n2p4kbpp3abv4h-docker-1.8.1/bin/docker --daemon=true --group=docker (code=exited, status=1/FAILURE)
Main PID: 10371 (code=exited, status=1/FAILURE)
Aug 28 13:15:26 n4 systemd[1]: Started Docker Application Container Engine.
Aug 28 13:15:26 n4 docker[10371]: Warning: '--daemon' is deprecated, it will be removed soon. See usage.
Aug 28 13:15:26 n4 docker[10371]: time="2015-08-28T13:15:26Z" level=warning msg="please use 'docker daemon' instead."
Aug 28 13:15:26 n4 docker[10371]: time="2015-08-28T13:15:26.447966291Z" level=info msg="Listening for HTTP on unix (/var/run/docker.sock)"
Aug 28 13:15:26 n4 docker[10371]: time="2015-08-28T13:15:26.482644879Z" level=error msg="[graphdriver] prior storage driver "devicemapper" failed: Could not query and save base device UUID:exec: "blkid": executable file not found in $PATH"
Aug 28 13:15:26 n4 docker[10371]: time="2015-08-28T13:15:26.482713086Z" level=fatal msg="Error starting daemon: error initializing graphdriver: Could not query and save base device UUID:exec: "blkid": executable file not found in $PATH"
Aug 28 13:15:26 n4 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Aug 28 13:15:26 n4 systemd[1]: Unit docker.service entered failed state.
Aug 28 13:15:26 n4 systemd[1]: docker.service failed.
The path from utillinux is missing from the service unit:
[Unit]
After=network.target
Description=Docker Application Container Engine
[Service]
Environment="LOCALE_ARCHIVE=/nix/store/2mbqc6p36xlyl21d4mf1zhmprmqijwkk-glibc-locales-2.21/lib/locale/locale-archive"
Environment="MODULE_DIR=/run/current-system/kernel-modules/lib/modules"
Environment="PATH=/nix/store/z0rgmk4hqwhskmskm0c65680v4652n32-kmod-21/bin:/nix/store/p48nbf29nkv54vbvwqfqccwym58zf6bb-coreutils-8.24/bin:/nix/store/vmfzhzfh5w3hzxh7y0i4pf28h6jbqi62-findutils-4.4.2/bin:/nix/store/qrk6cndaf867z1blcfa9hpxrlar265j7-gnugrep-2.21/bin:/nix/store/5i5salk61869jjac0mgvj4n4agg2k2q0-gnused-4.2.2/bin:/nix/store/p0smmqn5jvf8hc34k8blixarpv3kj5q0-systemd-217/bin:/nix/store/z0rgmk4hqwhskmskm0c65680v4652n32-kmod-21/sbin:/nix/store/p48nbf29nkv54vbvwqfqccwym58zf6bb-coreutils-8.24/sbin:/nix/store/vmfzhzfh5w3hzxh7y0i4pf28h6jbqi62-findutils-4.4.2/sbin:/nix/store/qrk6cndaf867z1blcfa9hpxrlar265j7-gnugrep-2.21/sbin:/nix/store/5i5salk61869jjac0mgvj4n4agg2k2q0-gnused-4.2.2/sbin:/nix/store/p0smmqn5jvf8hc34k8blixarpv3kj5q0-systemd-217/sbin"
Environment="TZDIR=/nix/store/pl3066vi01b5ynjxi9wf51yyg8dnv43b-tzdata-2015f/share/zoneinfo"
X-RestartIfChanged=false
ExecStart=/nix/store/dnk6r07m4ds4ji2n2p4kbpp3abv4h-docker-1.8.1/bin/docker --daemon=true --group=docker
ExecStartPost=/nix/store/q3riq7z8n850lgqrzrn31qjf5j3yb92k-unit-script/bin/docker-post-start
LimitNOFILE=1048576
LimitNPROC=1048576
If I add utillinux as a buildInputs on the derivation, it doesn't solve
the issue. The unit is generated by:
https://github.com/NixOS/nixpkgs/blob/release-15.09/nixos/modules/virtualisation/docker.nix
I'm using nixos 15.09:
[root@n4]# nixos-version
<IP_ADDRESS>be7d99 (Dingo)
—
Reply to this email directly or view it on GitHub
https://github.com/NixOS/nixpkgs/issues/9492.

@fduraffourg can you confirm the fix?

It's OK now.
Thanks


Provide location object as redux.actionCreators.action argument

This is my intent (choose one)

[ ] I want to report a bug
[X] I want to request a feature or change
[ ] I want to provide or change a feature

The problem
redux.actionCreators.action functions are currently executed with a single argument: params.
params is the result of react-router's matchPath utility.
In some cases this information is not enough.
Proposed solution
In order to let action creators have more information about the current request's url, we might consider providing the whole location object as second argument.

Closed by #829.


Add loopback to bind IPs

Currently in case IP set to localhost, it will be rediscovered from available interfaces. This blocks use-cases like localhost proxy on client side, as described in https://github.com/kubernetes/kubeadm/issues/487
Let me know if you prefer an additional method instead of changing this one, or you have any concerns about using localhost as a bind interface (even for local testing).

Does this PR has a chance to be merged, or there are some underlying restrictions I'm not aware of, and we should seek for other solution?

Does this PR has a chance to be merged, or there are some underlying restrictions I'm not aware of, and we should seek for other solution?

Please open this PR against the main kubernetes/kubernetes repo at https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/util/net/interface.go. Code changes are made in that location and are later synced here automatically.
(You'll also get faster feedback on the k/k repo)
Closing.
/close


Text copying does not work

Windows Terminal version
1.18.3181.0
Windows build number
22H2 19045.3930
Other Software
No response
Steps to reproduce
In CMD, when selecting text, the selection is immediately reset, that is, there is no way to copy the text with the right mouse button, Shift+Ctrl+C, Ctrl+C do not work.
BUT, in the standard CMD everything works, even the selection via SHIFT + arrows on the keyboard works!!!
Expected Behavior
No response
Actual Behavior
In CMD, when selecting text, the selection is immediately reset, that is, there is no way to copy the text with the right mouse button, Shift+Ctrl+C, Ctrl+C do not work.
BUT, in the standard CMD everything works, even the selection via SHIFT + arrows on the keyboard works!!!

Could you maybe grab a screen recording of what you're describing? (ScreenToGif is excellent for this).
Does this repro in tabs for other shells (e.g. powershell) in your Terminal?
Have you made any changes to your settings? If so,
Could you share your settings.json file/?

Не могли бы вы сделать запись экрана того, что вы описываете? (ScreenToGif отлично подходит для этого).

I apologize for creating a topic about the problem in vain, and maybe not in vain))
When recording the problem on video, I found out why I had this problem, the qTranslate program was to blame.
The problem can be solved by adding Windows Terminal to the qTranslate program exception

Thanks for following up! Hopefully someone else in the future is able to find this helpful 😄


Indentation problem, expected 2 spaces (TOP-OF-PAGE)

The indentation should be 0.
./src/ecc/#jcs#mm_lis_sel_versions_reorg.prog.abap[72, 1]                  - Indentation problem, expected 2 spaces (indentation)
Source:

try again, 2.38.5

Checked and issue is gone. Thanks.


Updated the Backport workflow and added delete backport workflow

Description
Updated the existing Backport workflow per the latest working configuration. Added the workflow to delete backport branches.
Copied from:

https://github.com/opensearch-project/OpenSearch/blob/044f53630a08b0021097e422c9f31f15fb98219d/.github/workflows/backport.yml
https://github.com/opensearch-project/OpenSearch/blob/044f53630a08b0021097e422c9f31f15fb98219d/.github/workflows/delete_backport_branch.yml

Issues Resolved
Related to #692.
Check List

[ ] New functionality includes testing.
[ ] New functionality has been documented.

[ ] New functionality has javadoc added

[x] Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Codecov Report

Merging #1159 (948ab2b) into main (70e86d1) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main    #1159   +/-   ##
=========================================
  Coverage     91.89%   91.89%
  Complexity      703      703
=========================================
  Files            87       87
  Lines          2037     2037
  Branches        171      171
=========================================
  Hits           1872     1872
  Misses          122      122
  Partials         43       43

Continue to review full report at Codecov.

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

So after merging this PR, I can add the backport 1.2 label and then the automatic backport workflow should pick it up, right?

So after merging this PR, I can add the backport 1.2 label and then the automatic backport workflow should pick it up, right?

Yes it will pick up but it will fail with merge conflicts since the backport.yml file is not present in 1.2 yet. If you want to do the auto-backport, you can first auto-backport the previous PR which adds the backport.yml, then you can backport this PR.


html/template: URL auto-escaper may produce invalid markup

What version of Go are you using (go version)?
go version go1.8 linux/amd64
What operating system and processor architecture are you using (go env)?
Any environment.
What did you do?
https://play.golang.org/p/vkxq91HMhf
What did you expect to see?
The template produces fully valid markup, i.e. a, as if using url.PathEscape.
What did you see instead?
The square brackets remain unescaped in the path. According to the W3 Validator, this is invalid:

@rsc do you think there might be some security implications in changing this?

/cc @mikesamuel

Square brackets are allowed in URIs as in IPv6 numeric hosts per RFC 6874.
IP-literal = "[" ( IPv6address / IPv6addrz / IPvFuture  ) "]"

so we ought not fix this by breaking https://play.golang.org/p/ZO713Uf8_Z
We could normalize URLs which would address the problem but, IIRC, that's a tricky operation without current core library support that requires making assumptions about the page encoding.

The template produces fully valid markup

This is impossible for URIs without non-local reasoning.  For example,
template.New("asdf")
    .Parse(`<a href="{{if .IsHost}}http://{{end}}{{.UrlPart}}{{if .IsHost}}/{{end}}">`)

In this instance, we would need to either

have the escaping directive know about the context based on information available at runtime
do a second pass at the end of the href value to normalize the URL.

Unless there are security consequences to not validating here, I would leave as-is.

It sounds like we shouldn't make any change here.  Closing.  Please comment if you disagree.


Fix transaction isolation issues

tl;dr
We were getting an error when trying to perform concurrent identity updates, even when they were on different inbox_ids and with different addresses. The error was:
ERROR: could not serialize access due to read/write dependencies among transactions (SQLSTATE 40001)

This adds a test to detect these issues and resolves it by lowering the transaction isolation level.
Fixes

https://github.com/xmtp/xmtp-node-go/issues/391

Why was this happening?
I isolated the issue to the GetAllInboxLogs query. When replacing that with a fixed [] and running only CreateIdentity updates, the issue totally goes away. All other behaviour is the same for CreateIdentity since there are no existing inbox logs (it's the first update).
This post explains how you can run into this scenario with serializable transactions and empty queries. The gist is that serializable transactions try to lock data as narrow as your query, but sometimes they can only lock portions of the heap that are larger. I've confirmed in the query planner that sometimes this query leads to a heap scan that touches 4 rows and sometimes it uses an index scan that touches 0 rows.
What's the fix
I changed the way we do locking to use a pg_advisory_xact_lock instead of relying on SELECT ... FOR UPDATE. The advantage of using advisory locks is that it will behave the same whether or not there are existing inbox_log entries already in the DB or not, since it doesn't rely on locking any particular row. Instead it locks the inbox_id itself.  All the locking really buys us is a guarantee that if it detects a conflict on the commit the previous transaction will be done when it retries. Otherwise you could retry 3X before the first transaction ever finished.
I also changed the transaction isolation level to repeatable_read. I don't actually think this gives us the protection we need, and this will have to be revisited. Namely that two transactions can both run with the same initial set of identity updates, both are valid updates, and both will get written.
What we could do to get us the proper protections is have a nullable last_sequence_id field on each row with a unique index that covers (inbox_id, last_sequence_id). That would guarantee postgres checks for conflict and fails if two rows both try and update with the same previous state. But it feels a little heavy-handed and I'd like to explore lighter ways of getting the same thing.
Another idea is to have a separate table that just stores (inbox_id, last_sequence_id) and have every update write to that table. That would also get the same result, but without bloating our actual table. Postgres will detect conflicts if two transactions try to write to the same row at REPEATABLE READ.

Great finds on this investigation, simple solutions for a complex problem. Let me know if I can help anywhere. Have some comments/questions, also learning at the same time as you.

We were getting an error when trying to perform concurrent identity updates

Are we getting this error in spite of the retries? I would have expected the retries to succeed, otherwise we won't be able to recover in the event that we get a true serialization conflict. Would it be worth adding exponential backoff with jitter, to prevent the conflicting retries happening simultaneously?

The gist is that serializable transactions try to lock data as narrow as your query, but sometimes they can only lock portions of the heap that are larger

The second answer in the post you linked states: Since the table is small, both a and b would end up on the same index page (the root page). If the index is empty, the whole index will be locked... If you enter some more rows and use values that go on different index pages, there would be no serialization error. Is it simply the case that with a bigger table size we wouldn't have these conflicts, and relying on retries would do the trick while the table is small?

I also changed the transaction isolation level to repeatable_read. I don't actually think this gives us the protection we need, and this will have to be revisited. Namely that two transactions can both run with the same initial set of identity updates, both are valid updates, and both will get written.

Isn't this prevented by the advisory lock?

Are we getting this error in spite of the retries?

Yes, but increasing the number of retries or decreasing the level of concurrency can get it to pass.

Is it simply the case that with a bigger table size we wouldn't have these conflicts, and relying on retries would do the trick while the table is small?

That's what I thought, so yesterday I wrote 10k entries into the table and tried it. Same issue. Maybe every empty result set lands on the same page, so it'll always be an issue for CreateInbox but subsequent updates will be fine? Idk

Isn't this prevented by the advisory lock?

In this case, Postgres isolation is actually too good. Both transactions will be working with a snapshot of the DB state before either transaction committed. This is true even on the lowest isolation level Postgres offers.

That's what I thought, so yesterday I wrote 10k entries into the table and tried it. Same issue.

Double-checking, that's 10k entries with different inbox_ids, right? At that point I would expect the pg_locks table to switch from recording the relation locktype to the page locktype. Serializable is such a beautiful abstraction that it would be a shame if it falls over just on this simple case.

In this case, Postgres isolation is actually too good. Both transactions will be working with a snapshot of the DB state before either transaction committed. This is true even on the lowest isolation level Postgres offers.

Good point! Would it solve the problem if we acquired the advisory lock before the transaction started, and released it after?

Good point! Would it solve the problem if we acquired the advisory lock before the transaction started, and released it after?

Definitely might. I haven't tried that yet. There's a bit of nuance to acquiring locks outside of a transaction where they don't automatically expire. Think you need to set a timeout in the DB to make sure you can't perma-deadlock

@richardhuaaa in any case, WDYT about merging this PR as-is (which will fix our issues with test parallelism and prevent issues with platform SDK tests).
Then we can tinker with some of the suggestions. It does feel worthwhile to try the lock-before-the-transaction-starts approach and see how it feels.


Crypt firmware not work

Hi!  I tested this bootloader and it works well.  But when I use this with an encrypted firmware, the bootloader produces the wrong decryption.  I am reading the firmware from the controller's memory and it does not match the unencrypted firmware.  What am I doing wrong?  I am using APP_ADDR 0x6000, my microcontroller is STM32F103RCT6.  I changed the memory size to 256 kb.

1)Have you tried using tools/hex-crypt to generate the encrypted file?

Both the bootloader and hex-crypt use the same AES key and IV.

「Denis Kutuzov (R8CEH) @.***>」在 2023年1月17日 週二，下午8:23 寫道：

Hi! I tested this bootloader and it works well. But when I use this with
an encrypted firmware, the bootloader produces the wrong decryption. I am
reading the firmware from the controller's memory and it does not match the
unencrypted firmware. What am I doing wrong? I am using APP_ADDR 0x6000, my
microcontroller is STM32F103RCT6. I changed the memory size to 256 kb.
—
Reply to this email directly, view it on GitHub
https://github.com/sfyip/STM32F103_MSD_BOOTLOADER/issues/14, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/APJZW2F5BH6YI5AKNAXPIADWS2FLPANCNFSM6AAAAAAT5ZM7QY
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Seems I missed to write the extended linear address during across page boundary at line 181 in tools/hex-crypt/hex-crypt.cpp

Yes. I will fix it today. Thanks for the detail information.🙂

Fixed hex-crypt.cpp but not yet tested.


[GitHub Actions] Fix typo (envrionment => number)

Why:
Closes: #25435
What's being changed (if available, include any code snippets, screenshots, or gifs):

Check off the following:

[ ] I have reviewed my changes in staging, available via the View deployment link in this PR's timeline.

For content changes, you will also see an automatically generated comment with links directly to pages you've modified. The comment won't appear if your PR only edits files in the data directory.

[ ] For content changes, I have completed the self-review checklist.

@iamazeem Thank you for opening a PR and linking it to your issue! ✨
I'll get this triaged for review! :zap:

This shouldn't have been merged. Environment is a valid input type. I'm fixing this in https://github.com/github/docs/pull/29781

@FidelusAleksander
At the time, I wasn't aware of the environment input parameter.
Later I found its usage in an example under workflow_dispatch.
Please look at https://github.com/github/docs/issues/25938 also.
There may already be an active PR for this. Thanks!

Thanks @iamazeem  I will mention this issue


Added getInterfaceName method

I added a simple method that retrieve the name of the bluetooth interface (i.e. hci0) in order to correctly identify the adapter.
Signed-off-by: pierantoniomerlino<EMAIL_ADDRESS>

I'm curious what this functionality will be used for?  Linux does not guarantee device names (e.g. /dev/hci0) to always be the same on a given system.  Especially if there's multiple Bluetooth dongles on the system.  If you need to differentiate adapters, I'd suggest using the existing functions getAddress() or getAlias().

The hciconfigcommand lists the interfaces based on their names (i.e. hci0), so I think that this information can be useful to select the right adapter, or at least should be reported by the library.
I agree that Linux doesn't guarantee the interface name, as in the case of ethernet interfaces, but IMHO the interface name could be easier to use (i.e. the user select the default adapter using the hci0 interface).
Thanks.

The "default" adapter is not guaranteed to be hci0 though.  I've found on systems where I've added a dongle that occasionally the built-in Bluetooth adapter would end up being hci1 and the dongle would be hci0.  Also, hciconfig gives the MAC address of the adapter, which is much safer to use and already provided by the library.  Just my two cents.


Displaying on non-owned titles in network zone

First off: Great little tool. Works wonderfully.
We're part of a consortium and have an Institution Zone and Network Zone across a bunch of other institutions.
When we search in the IZ, HT links show as expected.
When we search in the NZ, HT links show on anything they find a match with, whether or not we own it or have access to it.
Is it feasible/possible to hide those (non-)connections?

Hi @sulfurchesh. We use multiple campuses within a single institution, so pardon my NZ ignorance. Is there something in the PNX record that could be used to distinguish the records that should match HT inventory?
Here's what I'm thinking. Let's say your institution code is MY_INST. If you only wanted to check HT inventory on items held by your institution, you could add a ng-if directive to the hathi-trust-availability component that looks something like this:
<hathi-trust-availability ng-if="$parent.$ctrl.result.pnx.delivery.institution.some('MY_INST')"
></hathi-trust-availability>

^ In this case, the component would only check for HT availability if the PNX record contains a delivery/institution of "MY_INST".
Do you think that might work for you?

Geoff: Thanks for the quick feedback. I did some poking in our implementation and found a couple of examples for you to show IZ v NZ.
IZ record (we own, also in HT):
https://ocul-qu.primo.exlibrisgroup.com/permalink/01OCUL_QU/1m1jubc/alma993135583405158
This shows a delivery.bestlocation.organization of 01OCUL_QU
NZ record (we don't own, shows in HT):
https://ocul-qu.primo.exlibrisgroup.com/permalink/01OCUL_QU/1vvea0g/alma991528860305151
This has a null delivery.bestlocation
I tried setting our template to:
template: '<hathi-trust-availability ng-if="$parent.$ctrl.result.pnx.delivery.bestlocation.organization('01OCUL_QU')" msg="Full Text Available Online at HathiTrust" ignore-copyright="true" entity-id="OurIDP"></hathi-trust-availability>'

And it doesn't show the HT link on either -- I suspect that I've made a stupid error in there somewhere.

Hey @sulfurchesh. Thanks for the examples. I did not realize the you were using VE.
I think you're pretty close. If you want to restrict the HT lookup to cases where the bestlocation is 01OCLU_QU, then your template would look something like this:
template: '<hathi-trust-availability ng-if="$parent.$ctrl.result.delivery.bestlocation.organization === '01OCUL_QU'" msg="Full Text Available Online at HathiTrust" ignore-copyright="true" entity-id="OurIDP"></hathi-trust-availability>'

Alternatively, if you wanted to limit HT lookups to titles that have at least one copy owned by 01OCLU_QU, then you might be able to do something like this:
template: '<hathi-trust-availability ng-if="$parent.$ctrl.result.delivery.holding.some(h => h.organization === '01OCUL_QU')" msg="Full Text Available Online at HathiTrust" ignore-copyright="true" entity-id="OurIDP"></hathi-trust-availability>'


Updated composer to allow non-https connections

WPackagist can not use https-connections right now.
In the mean time, this could be a fix.
Cfr: https://github.com/roots/bedrock/issues/241

Thanks for bringing this up. It's been fixed upstream though in https://github.com/outlandishideas/wpackagist/issues/138. And fixed in Bedrock by https://github.com/roots/bedrock/commit/48999fe6f452b57a7012444811aa1a9fc13e6669

Does updating the wpackagist repo url to https fix this for others? I am still getting non-https svn urls from wpackagist which cause the same exception.


JavaScript showing as text in the header of some tabs

Hello Friends!
I was scrolling through the site and found a minor issue. When you go to the News, API, or Platform Support tabs the following text will appear in the dark gray header:
_function (obj) { obj || (obj = {}); var __t, __p = '', __e = _.escape, __d = obj.obj || obj; __p += ' \n \n \n\n \n \n \n \n\n\n \n \n \n\n \n \n \n\n \n \n \n'; return _p }
It almost matches the color, so it's easy to miss. I've attached a screen shot for reference. Please keep up the great work!

 I missed one place where a change had to be made that would now _render_ a template var instead of just including a string


Feedback on Tutorial: SAP HANA XS Classic, Develop your first SAP HANA XSC Application

Hi,
I don't have Databases/Schemas options to start my application.  Did I do something wrong when accessing the cockpit?
I found the Database / Schema - it was under another system - Europe (trial), not the U.S. I don't know if this will present a problem, but I'm going to continue to use the Europe one for now.

Are you trying under HANA MDC?


.lead in Glyphwise different results with and without linebreak

Glyphwise(
    "Foo\nBar",
    lambda g: Style(
        fnt,
        100,
    ),
)
.lead(10)

When you plug in the strings a: "Foo\nBar" and b: "Foo Bar", b will cause the text to form a downwards facing staircase, while a will just have a normal increased leading between the 2 lines.
Is that intentional? It is the same with .xalign.

It is intentional as there's a multiline keyword that you can pass to Glyphwise to make it always return nested lines from Glyphwise, regardless of text input, i.e.
(Glyphwise(
    "A B",
    lambda g: Style(
        Font.JBMono(),
        100,
    ),
    multiline=True
)
.lead(10))

will return this nested structure:
<®:P:/1...>
 | <®:P:/3...>
 | - <®:P:RecordingPen(15mvs) {frame=Rect(0.00,0.00,60.00,73.00),glyphName=A}>
 | - <®:P: {frame=Rect(60.00,0.00,60.00,73.00),glyphName=space}>
 | - <®:P:RecordingPen(21mvs) {frame=Rect(120.00,0.00,60.00,73.00),glyphName=B}>

though without the multiline, you get this unnested structure:
<®:P:/3...>
 - <®:P:RecordingPen(15mvs) {frame=Rect(0.00,20.00,60.00,73.00),glyphName=A}>
 - <®:P: {frame=Rect(60.00,10.00,60.00,73.00),glyphName=space}>
 - <®:P:RecordingPen(21mvs) {frame=Rect(120.00,0.00,60.00,73.00),glyphName=B}>

I could see there being an argument to have multiline be True by default, though at the moment it's False for one-line text inputs by default. The staircase effect you're noticing and the xalign result all come from the same behavior, as they're treating the individual glyphs as the "lines." An alternative to setting the multiline keyword would be to call .up on the result before running methods like xalign or lead, as that would "raise" the nesting level of the result, pushing the un-nested glyphs into their own line, like this:
(Glyphwise(
    "A B",
    lambda g: Style(
        Font.JBMono(),
        100,
    ),
    multiline=False
)
.up()
.lead(10))

<®:P:/1...>
 | <®:P:/3...>
 | - <®:P:RecordingPen(15mvs) {frame=Rect(0.00,0.00,60.00,73.00),glyphName=A}>
 | - <®:P: {frame=Rect(60.00,0.00,60.00,73.00),glyphName=space}>
 | - <®:P:RecordingPen(21mvs) {frame=Rect(120.00,0.00,60.00,73.00),glyphName=B}>

Happy to help! Yeah I can close it out


[Bug] (only on linuxserver/homeassistant) PermissionError: [Errno 13] Permission denied: 'solcast-sites.json'

This error was first reported by @florie1706 in https://github.com/BJReplay/ha-solcast-solar/issues/32 at https://github.com/BJReplay/ha-solcast-solar/issues/32#issuecomment-2173672386
It can be repro'd with a fresh pull of linuxserver/homeassistant and a fresh manual install of BJReplay/ha-solcast-solar (and also a HACS manual install of ha-solcast-solar).
chmod 777 config within the linuxserver/homeassistant container doesn't resolve the issue.
To repro:
Create a new container - this created a new container for me, and mapped the default port onto 8124, and the config onto a host folder that I had created (hals).
I logged into the container, checked the directories, pulled the repro, and moved the ha-solcast-solar folder into custom components, and restarted HA (from the GUI - not shown).

docker run -d   --name=homeassistantls  -e PUID=1000   -e PGID=1000   -e TZ=Australia/Melbourne -p 8124:8123  -v ./hals:/config lscr.io/linuxserver/homeassistant:latest
docker exec -it homeassistantls /bin/bash
ls
root@2fd2f1d6ad2a:/# ls
app  bin  command  config  defaults  dev  docker-mods  etc  home  init  lib  lsiopy  media  mnt  opt  package  proc  root  run  sbin  srv  sys  tmp  usr  var
root@2fd2f1d6ad2a:/# cd config
root@2fd2f1d6ad2a:/config# ls
automations.yaml  blueprints  configuration.yaml  deps  home-assistant.log  home-assistant.log.1  home-assistant.log.fault  home-assistant_v2.db  home-assistant_v2.db-shm  home-assistant_v2.db-wal  scenes.yaml  scripts.yaml  secrets.yaml  tts
root@2fd2f1d6ad2a:/config# mkdir custom_components
root@2fd2f1d6ad2a:/config# cd~
root@2fd2f1d6ad2a:/# git clone https://github.com/BJReplay/ha-solcast-solar
Cloning into 'ha-solcast-solar'...
remote: Enumerating objects: 2207, done.
remote: Counting objects: 100% (588/588), done.
remote: Compressing objects: 100% (166/166), done.
remote: Total 2207 (delta 469), reused 480 (delta 398), pack-reused 1619
Receiving objects: 100% (2207/2207), 926.06 KiB | 3.09 MiB/s, done.
Resolving deltas: 100% (1378/1378), done.
root@2fd2f1d6ad2a:/# cd ha-solcast-solar/
root@2fd2f1d6ad2a:/ha-solcast-solar# ls
CODEOWNERS  LICENSE.md  README.md  custom_components  hacs.json
root@2fd2f1d6ad2a:/ha-solcast-solar#  cd custom_components/
root@2fd2f1d6ad2a:/ha-solcast-solar/custom_components# ls -al
total 12
drwxr-xr-x 3 root root 4096 Jun 18 16:09 .
drwxr-xr-x 5 root root 4096 Jun 18 16:09 ..
drwxr-xr-x 3 root root 4096 Jun 18 16:09 solcast_solar
root@2fd2f1d6ad2a:/ha-solcast-solar/custom_components# mv solcast_solar/ /config/custom_components/

Another thought, is solcast-usage.json getting created in /config?

 This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-06-18 16:11:59.113 ERROR (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - sites_data Exception error: Traceback (most recent call last):
  File "/config/custom_components/solcast_solar/solcastapi.py", line 148, in sites_data
    async with aiofiles.open(apiCacheFileName, 'w') as f:
  File "/usr/local/lib/python3.12/site-packages/aiofiles/base.py", line 98, in __aenter__
    self._obj = await self._coro
                ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiofiles/threadpool/__init__.py", line 94, in _open
    f = yield from loop.run_in_executor(executor, cb)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/homeassistant/util/loop.py", line 131, in protected_loop_func
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: 'solcast-sites.json'

2024-06-18 16:11:59.154 ERROR (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - sites_usage error: Traceback (most recent call last):
  File "/config/custom_components/solcast_solar/solcastapi.py", line 215, in sites_usage
    async with aiofiles.open(apiCacheFileName, 'w') as f:
  File "/usr/local/lib/python3.12/site-packages/aiofiles/base.py", line 98, in __aenter__
    self._obj = await self._coro
                ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiofiles/threadpool/__init__.py", line 94, in _open
    f = yield from loop.run_in_executor(executor, cb)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/homeassistant/util/loop.py", line 131, in protected_loop_func
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: 'solcast-usage.json'

2024-06-18 16:12:28.103 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/homeassistant/components/http/ban.py", line 85, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/homeassistant/components/http/auth.py", line 242, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/homeassistant/components/http/headers.py", line 32, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/homeassistant/components/diagnostics/__init__.py", line 280, in get
    data = await info.config_entry_diagnostics(hass, config_entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solcast_solar/diagnostics.py", line 32, in async_get_config_entry_diagnostics
    "energy_forecasts_graph": coordinator.solcast._dataenergy["wh_hours"],
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'wh_hours'

What do we know?
A brand new pull and set up of linuxserver/homeassistant and a brand new manual install of solcast repros.
It looks like there is a permissions problems - possibly with aiofiles.open for write.  I note that linuxserver notes that:
Rebase to alpine 3.19, upgrade to python 3.12. Restructure python packages so all packages are internal (no more venv in /config). Use upstream project's wheels. Due to an upstream issue, on first start of the newly updated container, some custom integrations may be disabled in HA due to missing dependencies. A subsequent container restart should fix that and the integrations should be re-enabled.
@florie1706 - if you can list any other integrations that you're using that are successfully writing config files to your config folder, that might help so we can see what they're doing.

I think I have some good news, @BJReplay and @florie1706.
I changed the solcastapi.py to use /options/[filenames]... and the permission errors went away.
It is likely that the file "solcast.json" will be similarly affected for linuxserver instances.
Why? Maybe the change to use aiofiles. Of that I am not certain, but it seems the most likely explanation. 🤷
I cannot be certain, because I have well busted through my API limit for today, because other testing, so solcast.json will not get created for my linuxserver install. But I bet that fails, too.
I will craft a commit for crash-testing.

Pull request will be submitted after a successful test, @florie1706.
Commit https://github.com/BJReplay/ha-solcast-solar/commit/2e8d961ef16ca1f1e3a638ebf0e01bb06a0a2c39 adds the /config/ path.
There are two changed files. __init__.py and solcastapi.py.

Note that I appear to have crossed some streams here. Still trying to work it out how it happened, but 2e8d961 contains some other fixes that I'm actively testing in other branches. They seem fine so far, so test away. I blame GitHub desktop...

@autoSteve that did the trick, working as expected now :) Thank you so much.

I'll almost certainly release this in 4.0.32-beta1, @florie1706.
Because why?  Like adjustments to handle having multiple accounts (shouldn't be a thing because Solcast T&C, so shhh! don't ask...), and prevention of inadvertent frequent Solcast forecast calls (weird happenstance, don't ask...), and handling of "tally" variable issues (don't ask, I hope I've got that one...).
Ugh. It is what it is.
Watch out for that beta+, but given that you manual install it likely won't impact you unless you update in future. But by then there'll be a release that covers this corner case for Docker.

I may regret this, but closing. It seems sorted for now -ish, well in the next release...


Disable Yul compilation pipeline along with optimizer in coverage command

Motivation
When compiling contracts for coverage reporting, the optimizer is set to disabled. However, the yul IR pipeline is not. It isn't intended to be run without the optimizer, and doing so can frequently cause stack too deep errors in many codebases.
Solution
Set via_ir in the solc config settings to false before the project is built

needs nightly formatting cargo +nightly fmt


[Issue] Code 3 is likely banned. Checked and they aren't banned

I have been running my instance with 70 workers and 140 available level 30 accounts but when i log in all the spare accounts get used up and the console just shows mainly S
I checked the log and its returning loads of banned accounts. However when i use an account banned checker they all log in and return their level fine. i am running with proxies that are fine on a different much larger instance with only low level accounts that dont have this issue

[2017-06-04 14:52:20][    INFO][root] Starting up!
[2017-06-04 14:52:28][ WARNING][worker-2] Zirax83 received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:52:29][ WARNING][worker-45] Lynxstone received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:52:33][ WARNING][worker-13] xelav2 received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:52:39][ WARNING][worker-8] krecik002 received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:52:47][ WARNING][worker-5] yatan87 received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:52:48][ WARNING][worker-1] Dexzify received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:52:59][ WARNING][worker-10] NickDynmo received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:53:11][ WARNING][worker-12] MrPurple56 received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:53:13][ WARNING][worker-16] No player level
[2017-06-04 14:53:13][ WARNING][worker-11] Artrex received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:53:14][ WARNING][worker-16] Zelgias received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:53:22][ WARNING][worker-18] Frenotx received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:53:23][ WARNING][worker-17] No player level
[2017-06-04 14:53:24][ WARNING][worker-17] Starsteps received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:53:31][ WARNING][worker-20] No player level
[2017-06-04 14:53:32][ WARNING][worker-22] trashcan17 received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:53:32][ WARNING][worker-20] starchii received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:53:37][ WARNING][worker-19] Tekzzz received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:53:46][ WARNING][worker-21] No player level
[2017-06-04 14:53:46][ WARNING][worker-21] manoelarocha received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:53:47][ WARNING][worker-23] Enimism received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:53:48][ WARNING][worker-26] Pokalicious received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:53:52][ WARNING][worker-24] Elysian101 received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:53:54][ WARNING][worker-30] omgscream received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:53:58][ WARNING][worker-31] urmomsbox received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:54:00][ WARNING][worker-33] Blackskull345 received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:54:03][ WARNING][worker-9] Ponixflieger received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:54:04][ WARNING][worker-27] No player level
[2017-06-04 14:54:05][ WARNING][worker-27] Roikax received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:54:12][ WARNING][worker-29] iFLIP07 received code 3 and is likely banned. Removing until next run.
[2017-06-04 14:54:15][ WARNING][worker-34] No player level
[2017-06-04 14:54:16][ WARNING][worker-34] AmethystXIII received code 3 and is likely banned. Removing until next run.

If the account get "flagged" they won't work anymore correctly.
generate new account and try again with the new ones.
my 120 old accounts showing this "code 3" error too, the new account still working.

Yeah, i use "fresh" level 30 accounts and they don't log in but i use some level 3 accounts and they work a charm - bit annoying..

I have the same problem, code 3, but when I log the account on my mobile device there is not flag neither shadowban.
However this only happens with some lvl 30 accounts, others works right.

yeah i can log in to the level 30 accounts on my phone that are returning code 3. Some have the black warning message, some don't. They dont seem to be shadowbanned either. Not sure if its the API maybe returning a wrong code or multiple exceptions returning the same code in the monocle code

I have the same issue. Using level 30 I get a massive percentage with the above error, but using purely low level I never get it. Any ideas? Would be nice to get the CP/IV but not at the expense of having most of my accounts not playing ball....


[25119] Change test-infra Kafka outside service to NodePort

This PR closes #25119 and addresses #19465 by:

Change .test-infra/kubernetes/kafka-cluster/04-outside-services from LoadBalancer to NodePort
Refactor .test-infra/kubernetes/kafka-cluster/05-kafka/10broker-config.yml to query OUTSIDE_HOST from k8s node InternalIP and OUTSIDE_PORT to query outside-${KAFKA_BROKER_ID}'s NodePort
Added nodeIPAddress and nodePort methods to .test-infra/jenkins/Kubernetes.groovy and cooresponding .test-infra/kubernetes/kubernetes.sh to enable Node InternalIP and NodePort querying within a jenkins job context
Refactor the following with usePublicIps=false

.test-infra/jenkins/job_PerformanceTests_xlang_KafkaIO_Python.groovy
.test-infra/jenkins/job_PerformanceTests_KafkaIO_IT.groovy

terraform code to validate and provision Google Cloud networking requirements to support usePublicIps=false (Note: I already executed the terraform code, per personal communication, on apache-beam-testing GCP project)

I was unable to test end-to-end the new workflow from jenkins job creation to seeing a Dataflow Job executing successfully in my own Google Cloud environment.  However, I was able to validate:

Using a private IP compute engine instance in the same GCP network, https://kafka.apache.org/quickstart worked using the kubernetes cluster's node InternalIP and NodePort as the --bootstrap-server
Spinning up .test-infra/dockerized-jenkins and seeding job_PerformanceTests_xlang_KafkaIO_Python.groovy from github.com/damondouglas/beam from branch 25119-fix-test-infra-kafka-service built the test job using the queried kubernetes Node InternalIP and NodePort as the bootstrap_server arguments

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[x] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
~Update CHANGES.md with noteworthy changes.~
~If this contribution is large, please file an Apache Individual Contributor License Agreement.~

See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI.

Run Python xlang KafkaIO Performance Test

adter a seedjob looks like it still trying to access to loadBalancer somewhere (which is replaced to NodePort in this PR)
eval 'kubectl --kubeconfig=/home/jenkins/jenkins-slave/workspace/beam_PerformanceTests_xlang_KafkaIO_Python/config-beam-performancetests-xlang-kafkaio-python-37 --namespace=beam-performancetests-xlang-kafkaio-python-37 get svc outside-0 -ojsonpath='\''{.status.loadBalancer.ingress[0].ip}'\'''

Run Python xlang KafkaIO Performance Test

@Abacn is the jenkins job seeding from https://github.com/damondouglas/beam/tree/25119-fix-test-infra-kafka-service?

Run Python xlang KafkaIO Performance Test

Run Java KafkaIO Performance Test

Run Python xlang KafkaIO Performance Test

Run Java KafkaIO Performance Test

Run Python xlang KafkaIO Performance Test

Run Java KafkaIO Performance Test

Run Python xlang KafkaIO Performance Test

@Abacn I set this to draft to take a break and focus on other projects.  The job set the parameters like this:  kafkaBootstrapServerAddresses=$NODE_IP_0:32401,$NODE_IP_1:32402,$NODE_IP_2:32403","--kafkaTopic=beam-sdf","--readTimeout=1500","--numWorkers=5","--autoscalingAlgorithm=NONE","--experiments=use_runner_v2,use_unified_****"
I was expecting instead of $NODE_IP_ to be an actual IP address.

Run Java KafkaIO Performance Test

Run Python xlang KafkaIO Performance Test


Fix: prettier work locally and integrate with node.js CI

making sure prettier work locally and integrate with node.js CI
fixes: #134

@Tsalmas-Anastasios @GeorgeApos This is crucial to keep formatting align with codebase.

@GeorgeApos @Tsalmas-Anastasios I have investigate that this is not causing any issue so safe to merge.


No data scenario - frontend behavior

Description
Handle scenario where no data was ingested yet and the user tries to access the dashboard.
Suggestions

Display a message that no data was ingested yet and provide a link to the ingestion page.
Disable the buttons until data was ingested.

Fixed with #33


Add E2E route agent restart tests

@tpantelis Hi , I corrected what you commented about before.
Two caveats though :

@tpantelis Hi , I corrected what you commented about before.
Two caveats though :

@tpantelis and another concern , this patch won't pass gates untill the :
https://github.com/submariner-io/shipyard/pull/405/files
PR is merged since this one uses shipyard PR's AwaitRouteAgentPod function.
Am I correct?
Thanks

@tpantelis and another concern , this patch won't pass gates untill the :
https://github.com/submariner-io/shipyard/pull/405/files
PR is merged since this one uses shipyard PR's AwaitRouteAgentPod function.
Am I correct?
Thanks

@tpantelis and another concern , this patch won't pass gates untill the :
https://github.com/submariner-io/shipyard/pull/405/files
PR is merged since this one uses shipyard PR's AwaitRouteAgentPod function.
Am I correct?
Thanks

This can't be merged until the shipyard PR is merged. That said, I think it would be fine to put that function in submariner since the route agent is specific to submariner, ie I don't see it would be generally useful outside of submariner.

@tpantelis and another concern , this patch won't pass gates untill the :
https://github.com/submariner-io/shipyard/pull/405/files
PR is merged since this one uses shipyard PR's AwaitRouteAgentPod function.
Am I correct?
Thanks

This can't be merged until the shipyard PR is merged. That said, I think it would be fine to put that function in submariner since the route agent is specific to submariner, ie I don't see it would be generally useful outside of submariner.


docs: Fix persistent cache doc id

Clashes with https://docs.dagger.io/1230/better-logs/
Follow-up to https://github.com/dagger/dagger/pull/2035

Which go project did you build?

This one https://github.com/dagger/dagger/pull/2035/files#diff-e2725288b217e47befa3990b2af454e3ef6991773ecaaf061f604a2a4068c487


Improve build script

Make single script to build engine, third party libraries, tests. Copy libs to their folder, build inside 'bin' folder.