add/enable GTM support

Pre-Flight checklist

[x] Testing

[x] Code is tested
[x] Changes have been manually tested

What are the relevant tickets?
#73
What's this PR do?

Adds the missing pieces from the support of GTM
Removed the duplicate HTML for partials
Generally, Ports the context processor from the xPRO to pass the GTM/GA config values to the Django templates
Note:

I didn't port GTM related configuration/code for the checkout/payment part since it's not yet part of MITxOnline.
How should this be manually tested?

This is basically just that addition of the boilerplate code, but to test it you'll have to create accounts on https://tagmanager.google.com and https://analytics.google.com/analytics/web/?authuser=5#/a206499573w284900088p250338982/admin/property/settings.
Once the accounts are created you will need to set two configuration values GTM_TRACKING_ID and GA_TRACKING_ID which you will find after creating a project on the GTM console mentioned above and the analytics admin property creation relatively.

Where should the reviewer start?
Probably, after setting the configuration values when you visit different pages on the website you should see similar Requests (https://www.googletagmanager.com/gtm.js?id=XXXXX),  https://www.google-analytics.com/j/collect?....
Some Screenshots from the Google Consoles:

@pdpinch You can take a look at the screenshots that I've added from my own test account's Analytics/GTM board as I didn't have MIT's test account if there was one. These are from the basic site events for visiting the pages.
Based on the above, I've added Ready for Review tag, let me know if you'd thought otherwise.

For anyone reviewing this, If you'd like to test, you can ask me for the relevant GTM/GA keys and console access if needed.

LGTM 👍 ,
Not related to this PR perhaps but I noticed one thing, we have defined gtm_tracking_id and ga_tracking_id in AppContextSerializer but we do not have any endpoint or usability in this project. maybe in the later requirements.
class AppContextSerializer(serializers.Serializer):
    """Serializer for the application context"""

    public_path = serializers.SerializerMethodField()
    gtm_tracking_id = serializers.SerializerMethodField()
    ga_tracking_id = serializers.SerializerMethodField()

LGTM 👍 ,
Not related to this PR perhaps but I noticed one thing, we have defined gtm_tracking_id and ga_tracking_id in AppContextSerializer but we do not have any endpoint or usability for this in this project. maybe in the later requirements.
class AppContextSerializer(serializers.Serializer):
    """Serializer for the application context"""

    public_path = serializers.SerializerMethodField()
    gtm_tracking_id = serializers.SerializerMethodField()
    ga_tracking_id = serializers.SerializerMethodField()

Good point, we don't have an API endpoint to get and use the configurations so the serializer is not used. I believe we can remove it since it's unused, what are your thoughts @asadiqbal08 ?

Actually, I am not sure about the actual reason for introducing this Serializer in code base. mean the relevant ticket and purpose.

Actually, I am not sure about the actual reason for introducing this Serializer in code base. mean the relevant ticket and purpose.

Okay, I'll go ahead with the merge after the rebase.

Codecov Report

Merging #140 (7049dd8) into main (6301b74) will increase coverage by 6.97%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #140      +/-   ##
==========================================
+ Coverage   90.29%   97.26%   +6.97%
==========================================
  Files         208      120      -88
  Lines        6049     2747    -3302
  Branches      286        0     -286
==========================================
- Hits         5462     2672    -2790
+ Misses        501       75     -426
+ Partials       86        0      -86

Impacted Files
Coverage Δ

main/middleware.py

courses/urls.py

main/views.py

openedx/constants.py

cms/models.py

main/sentry.py

authentication/api.py

courses/views/v1/__init__.py

users/serializers.py

openedx/views.py

... and 77 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 6301b74...7049dd8. Read the comment docs.


Use timestamp column to order batches while importing

Importing using ascending identifiers for order have some cons, like item updated in different source (e.g. webserver) while it was already imported to newly created index (while resetting) will be outdated when we switch the index aliases.
To prevent this behavior we can check if it possible to use timestamp column for sorting. Fetching batches sorted by e.g update_at column will prevent described behavior, but will make import a bit longer.
As far as I can see it will never cause infinite loops (need to be properly tested with specs).
For now it includes only support for ActiveRecord, but seems that adding Mongoid and Sequel support is a manner of extracting code to Orm adapter (with small tunning).

@pyromaniac What do you think about this?

Cool stuff. I'd like to hear what @pyromaniac thinks about it too :)

Well, it will be slower then ordering by id, we will need indexes on updated_at column. Also I'm not sure this solution will resolve all the our issues. Let's finish it and will see


Add IPv6 to existing cluster

Hi, I have an existing K3S cluster, I have recently acquired IPv6 address space, I cannot change the pod CIDRs to allow it. Flannel is halfway broken. How can I add IPv6 to existing cluster, which is strictly on IPv4, I do not want to re-create my cluster either, that is too much of a hassle.

Calico doesn’t work, any CNI i’ve found hasn’t worked at all. I’m getting quite angry why you can’t add a pod CIDR for IPV6 when clearly you should be able to

The Kubernetes PodCIDR IPAM doesn't currently support this. It will not add additional CIDRs once the node already has one assigned. This means that IPv6 must be enabled when the cluster is first created, not after the fact.

How do i go about this!

Uninstall and reinstall k3s, or build a new cluster on separate nodes, with IPv6 configured when bringing up the first server.


Add DisplayName field to keycloakRealm

I can't find a way to set displayName field for keycloakRealm
If there's no current way to set it right now it would be nice to add displayName field to keycloakRealm CRD.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

@mostoja, thank you for bringing this up.
Currently, the operator does not support setting the displayName field for keycloakRealm. However, we have added this feature request to our backlog. It’s a relatively small change, and we hope to implement it soon.


The website Deep Hunt doesn't work

The website refered in the README.MD Deep Hunt does not work.
The link skip to a URL named https://medium.com/m/global-identity?redirectUrl=https%3A%2F%2Fdeephunt.in%2F
Is the URL changed? What is the new one?

It's just the same, there were no issues when I checked. Hope it works for you now. Closing the issue until further reports


Add python E2E test

This PR add python E2E test with feature parity as Java E2E test.
An example test workflow run: https://github.com/aws/amazon-cloudwatch-agent-operator/actions/runs/8365537415/job/22903829040
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

The test files look very similar. Can they be combined into a single file that variables handle the differences?

The test files look very similar. Can they be combined into a single file that variables handle the differences?

They are similar, but there is several difference between python and Java tests:

They use different terraform setup as we have separate terraform folders for java & python separately, the input parameters are different:https://github.com/aws-observability/aws-application-signals-test-framework/tree/main/terraform
The valiadator is different, we also separate valiadtor template for java & python separately: https://github.com/aws-observability/aws-application-signals-test-framework/tree/main/validator/src/main/resources/expected-data-template

The only part that Python and Java share the same steps are setting up CW operator.
It is possible to combined into a single file, but one concern is: if we want to monitor the java & python test separately,  which might be more convenience for problem detection and debugging? And in the future, as we add more support for more languages, the single workflow will seems to be overload. Probably make more sense to separate them?


Change the time for standup update timing.

currently standup acceptance time is 6 am IST. We need to update it to 12 am IST

@heyrandhir please assign this issue to me!

@heyrandhir please assign this issue to me!

Sorry this is already assigned to me. Missed to update here.

As confirmed by @ankushdharkar here https://discord.com/channels/673083527624916993/735598747949465640/1168026715176570930 . We will be sticking with the current time window of 6am to 5.59 am IST.


Migrate away from deprecated GitHub Authorizations API

From GitHub:

We will remove the Authorizations API endpoint on November 13, 2020. We recommend updating your application to use the web flow https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow
You can learn more about these changes by visiting our developer blog https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/

Unfortunately the version of OctoKit this app uses is extremely old, and this migration might be too much effort to be worth the trouble.

Unfortunately the version of OctoKit this app uses is extremely old, and this migration might be too much effort to be worth the trouble.

Marking this project unmaintained for the foreseeable future, due in part to this: 0624757a7daab1861ff17f5921b3744b0dbe3b33


counter_absolute does not work with the latest docker image

I'm using the docker image fhemberger/mqtt_exporter:latest which should be version 1.4.
When I use the an counter_absolute metric, the log file gives me the following warnings and does not publish the metric to prometheus.
WARNING: Metric type: counter_absolute, is not a valid metric type. Must be one of: ['gauge', 'counter', 'summary', 'histogram']
WARNING: Metric type: counter_absolute, is not a valid metric type. Must be one of: ['gauge', 'counter', 'summary', 'histogram']

As I saw in the tests, the counter_absolute should work. Do I do something wrong here?
My config looks like this:
# Config file for Mosquitto broker system metrics

# Metric definitions
metrics:
  - name:     'mqtt_broker'
    help:     'System events from broker'
    type:     'gauge'
    topic:    '$SYS/broker/#'
    label_configs:
      - source_labels:  ['__msg_topic__']
        target_label:   '__topic__'
      - source_labels:  ['__value__']
        regex:          '^(\d+([,.]\d*)?)$|^([,.]\d+)$'
        action:         'keep'

  - name:     'mqtt_broker_version'
    help:     'Mosquitto version (static)'
    type:     'gauge'
    topic:    '$SYS/broker/version'
    label_configs:
      - source_labels:  ['__msg_topic__']
        target_label:   '__topic__'
      - source_labels:  ['__value__']
        regex:          '^\D+((?:\d+[\.]?)+)$'
        target_label:   'version'
        replacement:    '\1'
        action:         'replace'
      - source_labels:  ['__value__']
        replacement:    '1'
        target_label:   '__value__'
        action:         'replace'

  - name:     'mqtt_broker_changeset'
    help:     'Mosquitto build changeset (static)'
    type:     'gauge'
    topic:    '$SYS/broker/changeset'
    label_configs:
      - source_labels:  ['__msg_topic__']
        target_label:   '__topic__'
      - source_labels:  ['__value__']
        target_label:   'changeset'
        action:         'replace'
      - source_labels:  ['__value__']
        replacement:    '1'
        target_label:   '__value__'
        action:         'replace'

  - name:     'mqtt_broker_timestamp'
    help:     'Mosquitto build timestamp (static)'
    type:     'gauge'
    topic:    '$SYS/broker/timestamp'
    label_configs:
      - source_labels:  ['__msg_topic__']
        target_label:   '__topic__'
      - source_labels:  ['__value__']
        target_label:   'timestamp'
        action:         'replace'
      - source_labels:  ['__value__']
        replacement:    '1'
        target_label:   '__value__'
        action:         'replace'

  - name:    'mqtt_broker_uptime_seconds'
    help:    'Mosquitto total uptime in seconds'
    type:    'counter_absolute'
    topic:   '$SYS/broker/uptime'
    label_configs:
      - source_labels:  ['__msg_topic__']
        target_label:   '__topic__'
      - source_labels:  ['__value__']
        regex:          '^(\d+) seconds$'
        replacement:    '\1'
        target_label:   '__value__'
        action:         'replace'

Could you try to use the image tag v1.4.0 explicitly? We had an issue with the latest tag which still resolves to v1.2.3(see #30).

Thanks,
that does the job.


Background Color of Navigation Drawer

Hey its a question not an issue, i have just noticed that navigation drawer background color is being picked up from of toolbar of extending activity, so if there's a way we can  customize the background color of navigation drawer

@mhafeezgr8 use app:background="@drawable/bg" attribute
<nl.psdcompany.duonavigationdrawer.views.DuoMenuView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:background="@drawable/bg"
/>


Ability to use converters and a type factory

 Issue by robsonfelix
Tuesday Aug 16, 2016 at 04:36 GMT
Originally opened as https://github.com/gsscoder/commandline/issues/343

Giacomo, your library rocks!
I am trying to accommodate some needs we have for a project using the library and I need your help. We successfully added a way to use custom types (classes) as Options property types by changing the TypeConverter class on the MakeType function delegate by adding a try/catch with the constructor. That way we redirected the constructor to some other static factory method that was able to create the value instance.
The other thing we did was to change the ReflectionExtensions class on the SetValue method by adding a way to get the TypeDescriptor for a particular property once the original property.SetValue method failed on setting the property value.
However it looks like adding a Type Factory to the ParserSettings (instead of hardcoding such factory into the TypeConverter class) is too complicated. That would be the ideal scenario.
Is there anything you suggest we do to make this change easier?
We believe the changes we did are very good for other developers to use (we created a sort of type-variant class set that can work interchangeably with boolean, integer and other numeric types, text, etc). Hence the need to use other types (rather than struct or base .NET CLR types). As for the changes we did to your code, they can be gladly shared.

 Comment by nemec
Tuesday Aug 23, 2016 at 21:05 GMT

Hi @robsonfelix, if I understand you correctly, you're trying to add the ability for Options/Values to be custom classes with no default constructor?
class Options
{
    [Option('n')]
    public MyClass Nothing { get; set; }
}

class MyClass
{
    public MyClass(int counter)
    {
    }
}

The easiest way I can think of is to allow custom TypeConverters to be created and applied to the property. Then you simply check that the converter can convert from typeof(string) and let the converter create the new instance (along with populating its data from the option value).
Within the code, you'd have to use reflection to get any TypeConverterAttributes attached to the property (not the property Type itself, though you can do that too) and use them to convert the "string value" into a real type.
public class CustomDateTimeOptions
{
    [System.ComponentModel.TypeConverter(typeof(CustomDateTimeConverter))]
    [Option('d', "date", Description = "Store the date.")]
    public DateTime CurrentDate { get; set; }
}

You can, of course, do what you're suggesting with an entry in the parser settings, but you'll have to make sure those factories are passed into the inner parts of the code where conversion happens.

Doesn't it already (see line 61)? What would you plan to change?
https://github.com/commandlineparser/commandline/blob/master/src/CommandLine/Core/TypeConverter.cs#L52-L63

@nemec Ah, yes it does, just not in latest release so I hadn't realized. That would solve my issues perfectly then! Guess I'll wait! Thanks

So a change you’re waiting on is in the develop branch?
I’m working to try to get a release out relatively quickly. Anything in that develop branch will be part of it.
E.Newton
Sent from my iPhone

On Sep 27, 2018, at 10:53 AM, Shmueli Englard<EMAIL_ADDRESS>wrote:
@nemec Ah, yes it does, just not in latest release so I hadn't realized. That would solve my issues perfectly then! Guess I'll wait! Thanks
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Yup and great!

I dont think this works in the latest version. I tried annotating my option's property, but the converter is not invoked. Instead I had to register it using TypeDescriptor.AddAttributes().


Tibialyzer can't detect my client

Hey,
I just downloaded Tibialyzer (it's on my desktop and I run it as administrator), typed in the names of my characters, downloaded new adresses but it seems like it doesn't "connect" to my client. When I type a command ingame (like creature@demon) nothing happens or if I have the summary window opened and I kill a random creature, it doesn't count the exp or the loot. I already used the "select tibia client" option, but even if I select the windows process/task of my Tibia 11, it still ain't working.
Am I missing something? Thanks in advance for your help.

Download version 1.4.2, you downloaded an old version.
On Oct 8, 2016, 19:41, at 19:41, Broda922<EMAIL_ADDRESS>wrote:

Hey,
I just downloaded Tibialyzer (it's on my desktop and I run it as
administrator), typed in the names of my characters, downloaded new
adresses but it seems like it doesn't "connect" to my client. When I
type a command ingame (like creature@demon) nothing happens or if I
have the summary window opened and I kill a random creature, it doesn't
count the exp or the loot. I already used the "select tibia client"
option, but even if I select the windows process/task of my Tibia 11,
it still ain't working.
Am I missing something? Thanks in advance for your help.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/Mytherin/Tibialyzer/issues/219

Oh thanks a lot, didn't know I downloaded an old version.


Invalid Username Or password

Hello!
So when i try run it i get
Error: Invalid credentials. Invalid username or password.
at call (/root/Afk-Bot/node_modules/yggdrasil/src/utils.js:35:40)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async auth (/root/Afk-Bot/node_modules/yggdrasil/src/Client.js:18:12)
[ERROR] Invalid credentials. Invalid username or password.
My settings.json looks like this
{
"bot-account": {
"username"<EMAIL_ADDRESS>"password": "password",
"type": "Microsoft"
},
The credentials are defiantly correct

I was updated Mineflayer lib in last commit. It's probably fix your problem.

I've had the same problem, is there a fix?  Changing the mineflyer lib didnt help either


net/tcp: add window scale support

Summary
net/tcp: add window scale support
net/tcp: change the tcp optdata to dynamic arrays
net/tcp: remove the invalid break during tcp option loop
Reference here:
https://tools.ietf.org/html/rfc1323
Impact
High performance network throughput request if the receiving window exceeds 64K
Testing
HTTP streaming

@yamt
I upload a new commit. When the window scale is enabled, the received buffer is easily over 64K. I modified the related data type to uint32_t to avoid the TCP window overflow. Please review again. Thank you.

LGTM, @yamt please take a look.


Select Component Z-index Bug

Describe the bug
The select component doesn't appear correctly.
To Reproduce
Steps to reproduce the behavior:

Go to https://6267ebb4dd54f5004a65f14a-xabmjaqqco.chromatic.com/?path=/docs/components-pagination--basic-usage
Go to select section.
Click show code.
Click select.

Screenshots

Solution
To fix this problem, we should increase the popover's z-index value in select. Z-index is a common problem. We should set as correctly all of our components' z-index values. We can research the best practices on this topic.

I agree @DamlaDemir,
Although just setting z-index to 2 here solves this problem, we might need to organize a hierarchy and maybe a documentation for setting z-indexes as this one has a potential of being a bigger problem, once our design system gets bigger and used in several projects.
@muratcorlu  @leventozen


Support environment variables in yaml config files.

@ashby-bowles Do you think this will satisfy #36?

@fuzzybinary does this also allow us to configure the platform name as well? One issue we are running into is being able to configure tests for both iPad and iPhone simulator on team city

Platform name is already configurable through -DconductorPlatformName.

@fuzzybinary Sorry I meant device name. I keep doing that.


Set up normal CI/CD using Github Actions

It is recommended that we also use a normal CI/CD alongside the CI we're going to implement and use with this assignment.

We have to wait for the project skeleton to be implemented to implement github actions to install/build/run the project with a workflow file. See issue #1 for status.

As specified in #5 this does not seem to be needed anymore.


Created Stacker.rst

Codecov Report

Merging #421 (449470a) into main (909fe4d) will decrease coverage by 1.70%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #421      +/-   ##
==========================================
- Coverage   50.77%   49.07%   -1.70%
==========================================
  Files          95      105      +10
  Lines       17102    19544    +2442
==========================================
+ Hits         8684     9592     +908
- Misses       8418     9952    +1534

see 63 files with indirect coverage changes


Fix 498

Reworked Dshlw and Shlw to stay in Verilog emitter.
Moved SplitExpression to Veirlog Emitter. This may have a negative effect on CSE.

master with splitexp before cse - 47866 eliminated
current PR with splitexp after cse - 37746 eliminated
include split/cse/dce in Verilog emitter, no splitexp in optimization - 47573 eliminated (9827 in second cse/dce run)

I think this is acceptable, to include more optimization in the VerilogEmitter. Alternatively, we can change SplitExpression to not split tail(add(...)), tail(sub(...)), bits(shl(...)), and bits(dshl(...)).

So we definitely don't want a regression on how much gets removed.
To make sure I understand why we're seeing what we're seeing:

SplitExpressions helps CSE
Moving it to Verilog Emitter causes CSE to get less done in the optimization transform
We need SplitExpressions to run after shift wraps are inserted so that we don't emit nested expression.

Instead of running CSE again in the VerilogEmitter (which I think is fine if that's the only way to keep QOR, but should be avoided if possible) could we:

Run SplitExpressions both before CSE and in the VerilogEmitter, or
Be careful to not introduce nested expressions in the VerilogEmitter?

No, the problem is that split expression is splitting up:
node x = tail(add(a, b), 1)

to
node y = add(a, b)
node x = tail(y, 1)

And so VerilogWrap actually does nothing right now.

@jackkoenig I believe we can kill this PR, as the new phase stuff should make this no longer needed?

I think maybe this PR is outdated but I don't think the Phase stuff fixes #498, we still need to stop inserting Dshlw in SplitExpressions, because we still want SplitExpressions in LowFirrtlOptimization

Yeah, I was going to fix #498 in stage/phase, but didn't. It seemed like that was already enough of an omnibus PR... It can be updated if needed, though.

Thanks for the heads up @seldridge. I think we should close this PR

Closing because Jack said it should be closed, and since the future fix to #498 will now need to be Dependency API-compliant.


VIRTUAL_PORT anything else than '8080' causes 502 Bad Gateway

When wanting to reverse proxy into a container that has a non-standard port (like 8081) the config will automatically resolve to
upstream xx.mattsmeets.com {
                                ## Can be connect with "proxy_default" network
                # jenkins.1.xxxx
                        server 10.x.x.x down;
}

while when setting this to 8080 this would be
upstream xx.mattsmeets.com {
                                ## Can be connect with "proxy_default" network
                        # jenkins.1.xx
                        server 10.x.x.x:8080;
}

Will probably have something to do with https://github.com/jwilder/nginx-proxy/blob/master/nginx.tmpl#L6, but not sure how I would solve this.
This is after setting the actual container config to 8081:8080 and then VIRTUAL_PORT to 8081
Note: I am running the containers in a swarm together with the lets encrypt companion

It seems that this was caused by an unrelated issue within the swarmpit ui. Created ticket on their repository


Converting TensorFlow dataset example

Hi,
I want to use TensorFlow datasets with this repo, I noticed you made some conversion script,
can you give a simple example of using it?
Thanks

Do you want to convert a dataset script to the tfds format ?
If so, we currently have a comversion script nlp/commands/convert.py but it is a conversion script that goes from tfds to nlp.
I think it shouldn't be too hard to do the changes in reverse (at some manual adjustments).
If you manage to make it work in reverse, feel free to open a PR to share it with the community :)

In our docs: Using a Dataset with PyTorch/Tensorflow.


chore: Fixed all current linter warnings

[ ] Bug fix
[ ] New feature
[X] Chore
[ ] Breaking change
[ ] There is an open issue which this change addresses
[X] I have read the CONTRIBUTING document.
[ ] My commits follow the Git Commit Guidelines
[ ] My code follows the code style of this project.
[ ] My change requires a change to the documentation.

[ ] I have updated the documentation accordingly.

[ ] I have added tests to cover my changes.
[X] All new and existing tests passed.

This is a tiny cleanup change to make eslint not return any errors or warnings for the project. While working on #2016, I saw there were some linting issues and had to double-check if my change caused them. It didn't! I hope by fixing these issues anyways, I'll make it easier for future contributors to pay attention to linting errors before submitting.
Before
$ yarn lint
yarn run v1.22.4
$ eslint src

/Users/harry/code/reactstrap/src/__tests__/PopperContent.spec.js
  151:11  warning  'wrapper' is assigned a value but never used  no-unused-vars

/Users/harry/code/reactstrap/src/__tests__/TooltipPopoverWrapper.spec.js
  732:13  warning  'wrapper' is assigned a value but never used  no-unused-vars

/Users/harry/code/reactstrap/src/CarouselControl.js
  24:5  warning  The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md  jsx-a11y/anchor-is-valid

/Users/harry/code/reactstrap/src/setupTests.js
  3:18  warning  'ReactWrapper' is defined but never used  no-unused-vars

/Users/harry/code/reactstrap/src/TooltipPopoverWrapper.js
  169:42  warning  Unexpected mix of '&&' and '||'  no-mixed-operators
  169:53  warning  Unexpected mix of '&&' and '||'  no-mixed-operators

✖ 6 problems (0 errors, 6 warnings)

✨  Done in 5.54s.

After
$ yarn lint
yarn run v1.22.4
$ eslint src
✨  Done in 4.51s.

Thanks


Fabo/show connection infos

Added information about the current connection as the addressbook might attempt to connect to a lot of offline nodes in some cases.
Video:

❤ Thank you!

Sorry for the bad screencast :D anyone has nice tooling for that?

can you also share a static screenshot? i can't tell what i'm supposed to be reviewing 🎥😆

This is the initial "Loading..." view before the login screen.

hard to test without a testnet. using localnode i connect, using localnode without actually running localnode i hang on "connecting to 'gaia-6002'" without any ip addresses. Maybe good to have a final message when you run out of ip addresses to try?

ah it did work! forgot that testnet is up just no new blocks coming in


ESP32 slave role Multiple SCO connection problem (IDFGH-13031)

Answers checklist.

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

General issue report
Describe the bug
I have an ESP32 board and want to make it a Bluetooth relay between a phone and a headphone the problem occurs with phones that force the ESP32 to be in a slave role the phone that doesn't require role change works correctly forces the ESP32 to make only one SCO connection with the phone and when I make a second SCO connection I got error code 0x0A which is from bluetooth.h corresponds to (ERROR_CODE_SYNCHRONOUS_CONNECTION_LIMIT_TO_A_DEVICE_EXCEEDED)
HINT: the ESP32 is in a slave role with the phone but master with the headphone but when it is a slave role with the phone I get an error
code 0x0A with the headphone despite ESP32 being a master with the headphone.
To Reproduce
Steps to reproduce the behavior:

I have combined the HFP AG and UNIT examples from the btstack examples.
make an ACL connection to the headphone and the phone
try to initiate a call an SCO connection is successfully created with the phone while with the headphone error code 0x0A

Expected behavior
The ESP32 should route audio back and forth between the phone and headphone without any problem as it do when it is a master role
HCI Packet Logs
Unfortunately, I didn't take packet logs as the problem relies only on the ESP32 role.
Environment:  (please complete the following information):

Current BTstack branch: latest release.
esp-idf version: 5.1.4
Bluetooth Controller : ESP32.
Remote device: Samsung Galaxy A22 and an old headphone as I am faced with newer headphones and later I will raise an
issue with this.

Additional context
To Avoid opening another Issue I also face a problem with connection to various headphones such as DL19 and Sound Core life Q30 if you can look at this problem also it will be good but I want to fix the problem of multiple SCO connection as this is the main problem.

@AbdelRahman3li ESP32 now only support one SCO connection. Maybe you can try with multiple eSCO connections.

@AbdelRahman3li ESP32 now only support one SCO connection. Maybe you can try with multiple eSCO connections.

Hi BetterJincheng,
Thanks for your reply, can you explain more I am setting CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN=3 and the problem happens only when the phone forces the ESP32 to be in a slave role.

@AbdelRahman3li We limited the number of (e)SCO connection in slave role to 1 in the Bluetooth Controller. CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN=3 can support just one slave connection and no more than 2 master conncetions or just three master connections.

@BetterJincheng Thank you for your clarification, is there any way to increase the number of (e)SCO connection in slave role to 2?

@AbdelRahman3li Sorry, I'm afraid not.

@BetterJincheng Thank you very much, regarding the second Issue of the ESP32 is unable to connect to modern headphones like Sound Core life Q30 despite I am able to connect with them with my phone but with ESP32 using the HFP_AG example of btstack or the esp-idf examples even is a2dp_source I get an error code 0x04 as if the headphone is not exist.

@AbdelRahman3li Error code 0x4 is page timeout that means failures occured in the process of device connection. The whole console log will do help. Please attach the log. Thanks

@BetterJincheng The console log for when trying to connect to the DL19 Headset using HFP_AG example of esp-idf 5.1.4 is as follows my ESP32 Chip is ESP32-D0WD-V3 (revision v3.0)
hfp_ag> con
Connect.
hfp_ag> W (70527) BT_SDP: SDP - Rcvd conn cnf with error: 0x4  CID 0x40

W (70537) BT_HCI: hcif conn complete: hdl 0xfff, st 0x4
I (70537) BT_APP_HF: APP HFP event: CONNECTION_STATE_EVT
I (70547) BT_APP_HF: --connection state DISCONNECTED, peer feats 0x0, chld_feats 0x0
hfp_ag> con
Connect.
hfp_ag> W (138497) BT_SDP: SDP - Rcvd conn cnf with error: 0x4  CID 0x41

W (138497) BT_HCI: hcif conn complete: hdl 0xfff, st 0x4
I (138507) BT_APP_HF: APP HFP event: CONNECTION_STATE_EVT
I (138517) BT_APP_HF: --connection state DISCONNECTED, peer feats 0x0, chld_feats 0x0

@BetterJincheng and this is the HCI logs when I attempt to connect to the DL19 headset with the HFP_AG example
[02:21:33.097] LOG -- hfp_ag_demo.c.198: USER:'a'
Establish HFP service level connection to 76:09:E4:A5:64:A1...
[02:21:33.100] LOG -- hfp.c.665: Create HFP context 0x3ffdeabc: role 1, addr 76:09:E4:A5:64:A1
[02:21:33.102] LOG -- l2cap.c.2544: create channel addr 76:09:E4:A5:64:A1 psm 0x1 mtu 1691 -> local mtu 1691, sec level 0
[02:21:33.109] LOG -- l2cap.c.2509: create channel 0x3ffdedd0, local_cid 0x0045
[02:21:33.119] LOG -- hci.c.7694: Create_connection to 76:09:E4:A5:64:A1
[02:21:33.128] LOG -- hci.c.326: create_connection_for_addr 76:09:E4:A5:64:A1, type fd
[02:21:33.129] LOG -- hci.c.7713: conn state 0
[02:21:33.138] CMD => 05 04 0D A1 64 A5 E4 09 76 18 CC 00 00 00 00 01
[02:21:33.142] EVT <= 0F 04 00 05 05 04
[02:21:48.504] EVT <= 03 0B 04 FF FF A1 64 A5 E4 09 76 01 00
[02:21:48.506] LOG -- hci.c.3818: Connection_complete (status=4) 76:09:E4:A5:64:A1
[02:21:48.507] LOG -- hci.c.2632: Outgoing connection to 76:09:E4:A5:64:A1 failed
[02:21:48.512] LOG -- l2cap.c.1141: L2CAP_EVENT_CHANNEL_OPENED status 0x4 addr 76:09:E4:A5:64:A1 handle 0xffff psm 0x1 local_cid 0x45 remote_cid 0x0 local_mtu 1691, remote_mtu 672, flush_timeout 0
[02:21:48.523] LOG -- l2cap.c.1158: ERTM mode 0, fcs enabled 0
[02:21:48.533] LOG -- sdp_client.c.507: SDP Client Connection failed, status 0x04.
Connection failed, status 0x04
[02:21:48.543] LOG -- hfp.c.815: rfcomm service not found, status 0x04
[02:21:48.544] LOG -- l2cap.c.2515: free channel 0x3ffdedd0, local_cid 0x0045
[02:21:48.553] LOG -- l2cap.c.1419: l2cap_stop_rtx for local cid 0x45
[02:21:48.563] LOG -- l2cap.c.363: Stop Retransmission timer
[02:21:48.564] LOG -- l2cap.c.349: Stop Monitor timer

and this is when I used gap_inquiry example it rarely discover the device once every 20 attempts
Start scanning...
[02:47:43.883] CMD => 01 04 05 33 8B 9E 05 00
[02:47:43.887] EVT <= 0F 04 00 05 01 04
[02:47:50.288] EVT <= 01 01 00
Inquiry scan complete.
Start scanning...
[02:47:51.672] CMD => 01 04 05 33 8B 9E 05 00
[02:47:51.675] EVT <= 0F 04 00 05 01 04
[02:47:58.077] EVT <= 01 01 00
Inquiry scan complete.
Start scanning...
[02:48:14.748] CMD => 01 04 05 33 8B 9E 05 00
[02:48:14.751] EVT <= 0F 04 00 05 01 04
[02:48:21.140] EVT <= 01 01 00
Inquiry scan complete.
Start scanning...
[02:48:23.120] CMD => 01 04 05 33 8B 9E 05 00
[02:48:23.124] EVT <= 0F 04 00 05 01 04
[02:48:29.526] EVT <= 01 01 00
Inquiry scan complete.
Start scanning...
[02:48:30.785] CMD => 01 04 05 33 8B 9E 05 00
[02:48:30.789] EVT <= 0F 04 00 05 01 04
[02:48:37.191] EVT <= 01 01 00
Inquiry scan complete.
Start scanning...
[02:48:40.339] CMD => 01 04 05 33 8B 9E 05 00
[02:48:40.343] EVT <= 0F 04 00 05 01 04
[02:48:40.855] EVT <= 02 0F 01 A1 64 A5 E4 09 76 01 00 00 04 04 24 79 57
Device found: 76:09:E4:A5:64:A1 with COD: 0x240404,
[02:48:47.745] EVT <= 01 01 00
Inquiry scan complete.

@AbdelRahman3li Thanks for the log files. W (70527) BT_SDP: SDP - Rcvd conn cnf with error: 0x4  CID 0x40 means nothing but failure to find the target device. The example of inquiry can also support this point. I think you need to make sure that the peer device is in the state of "page scan" or ""inquiry scan".
There doesn't seem to be anything wrong with the logs. The gap_inquiry example can find other devices except DL19. It's hard to say that the problem is on our side.

@BetterJincheng Thanks for the reply, But I can connect to the DL19 or SoundCore Life Q30 with my phones so why ESP32 couldn't I tried 2 ESP32 boards and both have the same behavior I thought of maybe I need to make the headset in a state to accept the paging request before sending a page request maybe the phone does this before sending the connection request.
and for The gap_inquiry example the last one it detected the DL19 with BD ADDR 76:09:E4:A5:64:A1 but this is out of 20 attempts and also when I tried to connect I got 0x04 error code.

@AbdelRahman3li You need to make the headset in a state of "inquiry scan"  so ESP32 can find the device using gap_inquiry example. That is to say, you need to make the headset discoverable. Maybe you need to disconnect all other links to the headset.

@BetterJincheng Thank you very much I will try your suggestion to pair the ESP32 with the Soundcore Life Q30 headset you can consider this Issue as solved.


fix: outline button typo

:tada: This PR is included in version 1.8.22 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


pythonPackages.webscrapbook init at 1.1.0

Result of nixpkgs-review pr 150090 run on x86_64-linux 1

2 packages failed to build:

python38Packages.webscrapbook
python39Packages.webscrapbook

user was banned https://github.com/NixOS/moderation/blob/main/moderation-log.md


Build error on Vercel, but not GitHub Actions or on local machine

Details
After updating to 13.4.0 (and 13.4.1) it seems that Nextra will fail to deploy on Vercel even though it builds successfully my local machine as well as on GitHub Actions running next build.

The Vercel deployment log is at the bottom of this issue.
Sandbox repo
I've created a fresh repository which can be cloned and added to Vercel, but the deployment will fail at build-time.
https://github.com/jontmy/nextra-vercel
I used Nextra to add a documentation page in the /pages directory, but with the /app directory alongside with a single dummy page.
Steps to reproduce

Use create-next-app@latest to create a fresh Next.js app with version 13.4.1 as of time of writing. Ensure the app router is selected, even though we will be placing the docs in the pages directory.

npx create-next-app@latest

Follow the steps in Docs Theme | Get Started to get a working documentation page up and running.

Move the pre-generated layout.tsx and page.tsx in /app to a new sub-directory in /app.

Start the dev server and navigate to localhost:3000, where you'll see that the documentation page works fine on your machine.

npm run dev

Build the documentation, and this will also work fine on your local machine (and GitHub Actions).

npm run build

Deploy on Vercel. You will get the following error:

Maybe same problem

Nextra doesn't use the new /app directory yet.

Nextra doesn't use the new /app directory yet.

I'm not use /app, still /pages

Closing as it now builds successfully on Vercel with Next.js >=13.4.3.


Update Podfile to use targets. (cocoapods 1.0)

The Podfile of the example project wasn't installing because of outdated cocoapods conventiosn. It works now..  Would you be interested in supporting iOS 8 UIAlertController's? I forked this because I need those myself. Or a good work around for localizing and UI Testing the UIAlertView, but since this object is "deprecated" on iOS 9.0, I guess it would be a good idea to migrate things to UIAlertControllers.

Sure, feel free to send a pull request switching to UIAlertController.  Be sure to increase the min required version to iOS 8 so we don't need to worry about backwards compatibility.


testing examples , error ErrorCode:InvalidProtobuf

model from "git clone https://www.modelscope.cn/manyeyes/sensevoice-small-onnx.git"
dotnet /tmp/test/AliParaformerAsr.Examples.dll
Unhandled exception. Microsoft.ML.OnnxRuntime.OnnxRuntimeException: [ErrorCode:InvalidProtobuf] Load model from /tmp/test/./sensevoice-small-onnx/model.int8.onnx failed:Protobuf parsing failed.
at Microsoft.ML.OnnxRuntime.InferenceSession.Init(String modelPath, SessionOptions options, PrePackedWeightsContainer prepackedWeightsContainer)
at Microsoft.ML.OnnxRuntime.InferenceSession..ctor(String modelPath, SessionOptions options)

1.Whether to install and enable git lfs.
2.Check if the model exists or if its size is normal in the local path.

This issue has been pending for too long and will be closed. If the problem is still unresolved, please raise the issue again


Fix 416 if there are spaces in range header

According to RFC 2616:

4.2 Message Headers
...
The field-content does not include any leading or trailing LWS: linear white space occurring before the first non-whitespace character of the field-value or after the last non-whitespace character of the field-value. Such leading or trailing LWS MAY be removed without changing the semantics of the field value.

But if header Range doesn't contain <range-end>, but contains space after - → then parseInt(' ', 10) returns NaN and ecstatic responses with 416 Range Not Satisfiable.
Real client request and response example:

Codecov Report

Merging #221 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master     #221   +/-   ##
=======================================
  Coverage   75.86%   75.86%
=======================================
  Files           9        9
  Lines         518      518
  Branches      117      117
=======================================
  Hits          393      393
  Misses         45       45
  Partials       80       80

Impacted Files
Coverage Δ

lib/ecstatic.js
73.75% <100%> (ø)
:arrow_up:

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 e999ff6...9558d22. Read the comment docs.

Thanks!

No problem :)
Also Range header has more complex format, then just bytes=<start>-<end>, but I am not ready yet to make PR to support it fully :) This PR is fixing error I met in practise, as you can see from screenshots from wireshark.

Yeah I feel you. I'll definitely accept it if you wanna flesh out range requests some more!!


PowerShell adapter PR

@mgreenegit there's 6 test failures due to the PS adapter, can you take a look and address before I re-review?

Just fyi, working out a few changes in advance of starting the Windows adapter

From: Steve Lee @.>
Sent: Tuesday, April 2, 2024 7:03:50 PM
To: PowerShell/DSC @.>
Cc: Michael Greene (POWERSHELL) @.>; Mention @.>
Subject: Re: [PowerShell/DSC] PowerShell adapter PR (PR #363)
@SteveL-MSFT approved this pull request.
LGTM, @anmenagahttps://github.com/anmenaga can you review?
—
Reply to this email directly, view it on GitHubhttps://github.com/PowerShell/DSC/pull/363#pullrequestreview-1975258574, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABHQMO2FKE7NTSFRT63XFQ3Y3NBONAVCNFSM6AAAAABEQ3DVPCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSNZVGI2TQNJXGQ.
You are receiving this because you were mentioned.Message ID: @.***>

@anmenaga ready!

Sounds good to me

From: Steve Lee @.>
Sent: Wednesday, April 3, 2024 4:44:24 PM
To: PowerShell/DSC @.>
Cc: Michael Greene (POWERSHELL) @.>; Mention @.>
Subject: Re: [PowerShell/DSC] PowerShell adapter PR (PR #363)
@SteveL-MSFT commented on this pull request.

In powershell-adapter/windowspowershell.resource.ps1https://github.com/PowerShell/DSC/pull/363#discussion_r1550549455:

@@ -0,0 +1,165 @@
+# Copyright (c) Microsoft Corporation.

It may make sense to separate once they start to diverge, but I think they are the same right now so it may be better to avoid confusion why there's two same scripts to maintain (like when we find bugs)
—
Reply to this email directly, view it on GitHubhttps://github.com/PowerShell/DSC/pull/363#discussion_r1550549455, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABHQMO7FKIQ4FLFG3ZLQ7Y3Y3RZ3RAVCNFSM6AAAAABEQ3DVPCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSNZYGEZDEMJWGI.
You are receiving this because you were mentioned.Message ID: @.***>

:shipit:

HOLD OFF
working on windows powershell support

@anmenaga @SteveL-MSFT
added WindowsPowerShell adapter. ready for another review.

@SteveL-MSFT @anmenaga
I don't think we can work around this?
https://github.com/PowerShell/DSC/actions/runs/8608080015/job/23589768568#step:4:1043

@anmenaga can you help @mgreenegit figure out the test failures?

Failing tests involve Binary resources.
I was under impression that we do not declare support for those in the fist version of upcoming release of DSC?
If that is the case, then these tests should be removed.

The underlying reason is for v1, it needed to run winrm quickconfig. I don’t think we can do that within a build runner?

From: Andrew @.>
Sent: Wednesday, April 10, 2024 1:12:34 PM
To: PowerShell/DSC @.>
Cc: Michael Greene (POWERSHELL) @.>; Mention @.>
Subject: Re: [PowerShell/DSC] PowerShell adapter PR (PR #363)
Failing tests involve Binary resources.
I was under impression that we do not declare support for those in the fist version of upcoming release of DSC?
If that is the case, then these tests should be removed.
—
Reply to this email directly, view it on GitHubhttps://github.com/PowerShell/DSC/pull/363#issuecomment-2048358962, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABHQMO2TFNYH3ZHKED4FTD3Y4WMLFAVCNFSM6AAAAABEQ3DVPCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBYGM2TQOJWGI.
You are receiving this because you were mentioned.Message ID: @.***>

The underlying reason is for v1, it needed to run winrm quickconfig. I don’t think we can do that within a build runner?

I don't see a technical problem with that; we can run anything within a build script;
However, the real question is - do we intend to declare support for old binary resources? That will require additional work (and we already have plenty with the need to remove script-based and class resources dependency on PSDesiredStateConfiguration module/PS DSC subsystem.

I didn’t know you could perform admin level actions. Thanks @anmenaga. Ready for review.

Good point

From: Steve Lee @.>
Sent: Thursday, April 11, 2024 9:10:44 AM
To: PowerShell/DSC @.>
Cc: Michael Greene (POWERSHELL) @.>; Mention @.>
Subject: Re: [PowerShell/DSC] PowerShell adapter PR (PR #363)
@SteveL-MSFT requested changes on this pull request.

In build.ps1https://github.com/PowerShell/DSC/pull/363#discussion_r1561272858:

@@ -14,6 +14,10 @@ param(
[switch]$SkipLinkCheck
)

+if ($isWindows) {

winrm quickconfig -quiet

We should do this in the test and not the build script. Probably in a BeforeAll {} block

In powershell-adapter/Tests/TestClassResource/0.0.1/TestClassResource.psd1https://github.com/PowerShell/DSC/pull/363#discussion_r1561275438:

+GUID = 'b267fa32-e77d-48e6-9248-676cc6f2327f'

+# Author of this module
+Author = 'Microsoft'
+
+# Company or vendor of this module
+CompanyName = 'Microsoft Corporation'
+
+# Copyright statement for this module
+Copyright = '(c) Microsoft. All rights reserved.'
+
+# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
+FunctionsToExport = @()
+
+# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
+CmdletsToExport = '*'
⬇ Suggested change
-CmdletsToExport = ''
+# this wildcard is required due to https://github.com/PowerShell/PSDesiredStateConfiguration/issues/101
+CmdletsToExport = ''

In powershell-adapter/Tests/powershellgroup.resource.tests.ps1https://github.com/PowerShell/DSC/pull/363#discussion_r1561276601:

     ($resources | ? {$_.Type -eq 'PSTestModule/TestPSRepository'}).Count | Should -Be 1

 }

It 'Windows PowerShell adapter supports File resource' -Skip:(!$IsWindows){

   $r = dsc resource list --adapter Microsoft.DSC/WindowsPowerShell

   $LASTEXITCODE | Should -Be 0

   $resources = $r | ConvertFrom-Json

   ($resources | ? {$_.Type -eq 'PSDesiredStateConfiguration/File'}).Count | Should -Be 1

}

It 'Get works on Binary "File" resource' -Skip:(!$IsWindows){

   $testFile = 'c:\test.txt'

⬇ Suggested change

   $testFile = 'c:\test.txt'

   $testFile = '$testdrive\test.txt'

In powershell-adapter/Tests/powershellgroup.resource.tests.ps1https://github.com/PowerShell/DSC/pull/363#discussion_r1561276840:

   ($resources | ? {$_.Type -eq 'PSDesiredStateConfiguration/File'}).Count | Should -Be 1

}

It 'Get works on Binary "File" resource' -Skip:(!$IsWindows){

   $testFile = 'c:\test.txt'

   'test' | Set-Content -Path $testFile -Force

   $r = '{"DestinationPath":"' + $testFile.replace('\','\\') + '"}' | dsc resource get -r 'PSDesiredStateConfiguration/File'

   $LASTEXITCODE | Should -Be 0

   $res = $r | ConvertFrom-Json

   $res.actualState.result.properties.DestinationPath | Should -Be "$testFile"

}

It 'Get works on traditional "Script" resource' -Skip:(!$IsWindows){

   $testFile = 'c:\test.txt'

⬇ Suggested change

   $testFile = 'c:\test.txt'

   $testFile = '$testdrive\test.txt'

In powershell-adapter/Tests/winps_resource.dsc.yamlhttps://github.com/PowerShell/DSC/pull/363#discussion_r1561278956:

$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/config/document.json
resources:

name: Get info from classic DSC resources
type: Microsoft.Windows/WindowsPowerShell

type: Microsoft.DSC/WindowsPowerShell

Since WindowsPowerShell is part of Windows, we want the typename of this resource to be Microsoft.Windows/WindowsPowerShell whereas PowerShell 7 being cross platform would be Microsoft.DSC/PowerShell

In powershell-adapter/windowspowershell.dsc.resource.jsonhttps://github.com/PowerShell/DSC/pull/363#discussion_r1561279745:

@@ -1,8 +1,12 @@
{

"manifestVersion": "1.0",
"type": "Microsoft.Windows/WindowsPowerShell",

"$schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/bundled/resource/manifest.json",
"type": "Microsoft.DSC/WindowsPowerShell",

As noted above
⬇ Suggested change

"type": "Microsoft.DSC/WindowsPowerShell",

"type": "Microsoft.Windows/WindowsPowerShell",

In powershell-adapter/~/.config/powershell/Microsoft.PowerShell_profile.ps1https://github.com/PowerShell/DSC/pull/363#discussion_r1561281287:

@@ -0,0 +1 @@
+$env:psmodulepath = $env:psmodulepath.trimend(';')

Why is this file here? seems accidentally included?
—
Reply to this email directly, view it on GitHubhttps://github.com/PowerShell/DSC/pull/363#pullrequestreview-1994621602, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABHQMOZI3GXLN74P4IYZK2LY42YYJAVCNFSM6AAAAABEQ3DVPCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSOJUGYZDCNRQGI.
You are receiving this because you were mentioned.Message ID: @.***>

Addressed all comments


Reuse visitor instances in getter methods

String getName() {
    return this.accept(new UserVisitor<String>() {
        @Override
        public String of(String name, int age) {
            return name;
        }
    });
}

should probably become
private static final UserVisitor<String> GET_NAME_VISITOR = new UserVisitor<String>() {
     @Override
     public String of(String name, int age) {
         return name;
     }
 };
String getName() {
    return this.accept(GET_NAME_VISITOR);
}

in generated code

I've just released 0.13 version. It has been refactored to deliver almost no allocations in generated methods.

+1000! Awesome. Will update and check out the new code and report back.

Just checked the new generated code - +1000 ontop of that earlier 1000. That's looking much nicer, and from what I can see (without running benchmarks) my code which does A LOT of iteration of A LOT of ADT4j instances seems to be running MUCH MUCH faster.
What the hell - have another +1000 :)

What's your opinion about generated code for equals and compareTo. Should we try to improve it? Should we try to get read of boolean and int boxing? Or should we better live current version as is?

I just noticed there is a little problem with the generated *AcceptorEqualsVisitor classes: they do not implement Serializable even though valueClassIsSerializable is at true.

@jbgi Can you test HEAD of master? It should be fixed now.


Alternative way to support devices on Smart Home Gateway

As reported in #19 several libraries using the Local Developer API of the Aqara gateway can break things. This issue is for tracking an alternative way to implement support for devices on the Smart Home Gateway by combining just the broadcasts from the Local Developer API with miIO-methods for listing and controlling the devices.
Current status is that there is a call: device.call('get_device_prop', [ 'lumi.0', 'device_list' ]) that lists the devices, but I'm not sure how to map that into the type of subdevice yet.
Update: Current type mapping:
1 - lumi.switch
2 - lumi.motion
3 - lumi.magnet
7 - lumi.ctrl_neutral2
8 - lumi.cube
9 - lumi.ctrl_neutral1
10 - lumi.sensor_ht

To help with figuring out the mapping you can install the latest miio CLI via npm install -g miio and call the above command on your gateway with: miio --control lumi.gateway.v3 --method get_device_prop --params '["lumi.0","device_list"]'.
This should return a flat array with the devices. Each device seems to have 5 entries:

The first index is the identifier of the subdevice and matches the Developer API
The second index seems to be the type of device. I need help figuring these out as I don't have access to all devices.
The rest is three numbers that I have no idea what they could stand for

You can compare that output to the output of miio --discover and see if you can find the type ids of your devices.
The types I know of right now:
1 - lumi.switch
8 - lumi.cube
10 lumi.sensor_ht

FYI:
root@rpb1:pi# miio --control lumi.gateway.v3 --method get_device_prop --params '["lumi.0","device_list"]'
INFO  Attempting to control lumi.gateway.v3
INFO  Got result:
[
"lumi.158d00015618e0",	//Model info: lumi.sensor_ht (sensor)
10,
1,
0,
2,
"lumi.158d00015ae3d2",	//Model info: lumi.motion (motion)
2,
1,
0,
11,
"lumi.158d00014cf5bf",	//Model info: lumi.ctrl_neutral1 (power-switch)
9,
1,
18,
1,
"lumi.158d00015aea5c",	//Model info: lumi.sensor_ht (sensor)
10,
1,
0,
2
]

@fxdpz Thanks!

I installed miio 0.12.0 version.
But log is
/var/lib/homebridge $ miio --control lumi.gateway.v3 --method get_device_prop --params '["lumi.0","device_list"]'
INFO  Attempting to control lumi.gateway.v3
WARNING  Could not find device

@sankooki My mistake, that command works for the 3rd gen gateway, you might have the one called lumi.gateway.v2 instead. Try adjusting the command to: miio --control lumi.gateway.v3 --method get_device_prop --params '["lumi.0","device_list"]'
If that doesn't work you can run miio --discover to find the address of your device and replace the model name in the command with the address of your gateway.

I have a gateway.v3.  but
Device ID: 52231412
Model info: Unknown
Address: <IP_ADDRESS>    // gateway v3 ip
Token: 71761b2e28df3afaa4da62eefad5a209 via auto-token
Support: Unknown

@sankooki Alright, I've been depending on hostname lookup to figure out the model of the device but I realize now that it might fail more often than I would've hoped. I've added a new issue in #27 to implement a fix for that.
Does using --control with the IP work for listing your devices?

/var/lib/homebridge $ miio --control <IP_ADDRESS> --method get_device_prop --params '["lumi.0","device_list"]'
INFO  Attempting to control <IP_ADDRESS>
INFO  Got result:
[
"lumi.158d0000efec7e",
1,
1,
0,
10,
"lumi.158d0000f6fcda",
2,
1,
0,
10,
"lumi.158d0000e75d33",
3,
1,
0,
10,
"lumi.158d0001104c5a",
11,
1,
22,
1,
"lumi.0",
0,
0,
0,
0
]

@sankooki Thanks! Interesting to see that your gateway lists lumi.0 as a device, I would not have expected that.
The last device, the one with id lumi.158d0001104c5a what kind of device is that? It has an id I haven't seen before.

that's zigbee plug.

@sankooki Thanks for your help! I've updated the type listing to include it.

I'm pleasured.

I wonder why gateway's model and support are shown as Unknown.
The device names itself as "lumi-gateway-v3_miio....." (hostname)
Hope my dump will help you somehow:
`[1] % miio --control <IP_ADDRESS> --method get_device_prop --params '["lumi.0","device_list"]'
INFO  Attempting to control <IP_ADDRESS>
INFO  Got result:
[
"lumi.158d0000e87e4a",
10,
1,
0,
1,
"lumi.158d0001032fdf",
2,
1,
0,
10,
"lumi.158d0000f8614b",
3,
1,
0,
10,
"lumi.158d0001118dbd",
8,
1,
0,
3
]`
% miio --discover
`Device ID: 45835427
Model info: Unknown
Address: <IP_ADDRESS>
Token: xxxxxxxxxxxxxxxx via auto-token
Support: Unknown
Device ID: 158d0000e87e4a
Model info: lumi.sensor_ht (sensor)
Address: Owned by 45835427
Token: Automatic via parent device
Support: At least basic
Device ID: 158d0001032fdf
Model info: lumi.motion (motion)
Address: Owned by 45835427
Token: Automatic via parent device
Support: At least basic
Device ID: 158d0000f8614b
Model info: lumi.magnet (magnet)
Address: Owned by 45835427
Token: Automatic via parent device
Support: At least basic
Device ID: 158d0001118dbd
Model info: lumi.cube (controller)
Address: Owned by 45835427
Token: Automatic via parent device
Support: At least basic`

Oh, is it the same issue with host lookup? Didn't see that other issue

@Gromina Looks like the same issue, going to look into that issue in the next few days and see what I can do about it.

52: lumi.motion.aq2   Light and motion sensor of Aqara.
More devices on the way, will update tomorrow or later

Hi, i need help. How can i set prop value for subdevice of gateway ? get_device_prop_exp - OK, but how send command to subdevice ?

Hi, i need help. How can i set prop value for subdevice of gateway ? get_device_prop_exp - OK, but how send command to subdevice ?

Where did you find the options for subdevices? Could you show me?
{"result":{"life":98676,"cfg_time":0,"token":"0d570a3591ce4a5a4e460c903af21b20","mac":"04:CF:8C:A0:F2:A7","fw_ver":"1.4.1_170","hw_ver":"MW300","uid":4166460975,"model":"lumi.gateway.v3","mcu_fw_ver":"0143","wifi_fw_ver":"SD878x-14.76.36.p84-702.1.0-WM","ap":{"rssi":-38,"ssid":"omprslow","bssid":"68:FF:7B:6A:24:2D"},"netif":{"localIp":"<IP_ADDRESS>","mask":"<IP_ADDRESS>","gw":"<IP_ADDRESS>","gw_mac":"68:FF:7B:6A:24:2D"},"mmfree":172304,"ot":"otu","otu_stat":[243,190,1710,139,1471,17],"ott_stat":[10, 0, 21, 218]},"id":1030}

My subdevices
{"result":["lumi.158d00033b117e",11,0,0,1,"lumi.158d000325e853",2,1,0,11,"lumi.158d00031e7d4d",3,1,0,10,"lumi.158d00036ccf70",1,1,0,10],"id":1000}

There is no way to get even status parameters.
'{"id":1000,"method":"get_device_prop_exp","params":[["lumi.158d000325e853","status"]]}'

null resault, like to
{"result":[[]],"id":1000}

Thanks a lot!


Document Cron job templates (in particular "Automatic firmware update")

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:

[x] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
[x] I have searched the existing issues and I am convinced that mine is new.

Is your feature request related to a problem? Please describe.
Automatic updates are very useful, but it's not entirely clear how the "Automatic firmware update" Cron job template works. It can be found here: https://your.router/ui/cron > (+) button > Command > Automatic firmware update.
Describe the solution you like
Update the docs to describe what the jobs do in more detail. Currently, they are not listed at all. In particular, we were interested in how to configure the update to only perform the ones were no restart is required, or if that is even directly supported.
Describe alternatives you considered
Open an issue/ask in the form each time there is a question.

There is no granularity in updates and that is why no more information is given. Updates are applied, reboots are done as required by the update.
Cheers,
Franco

reboots are done as required by the update.

The docs should certainly at the very least mention this. I could only find this information on this very page.

There is no inconsistency in firmware update behaviour between GUI, console and cron in terms of reboot behaviour. What do you expect of it that would not match reality?

This is the entry:

That it will reboot if necessary is a pretty important tidbit of information that imho should be mentioned there. Otherwise we expect people to know this indirectly from having noticed the GUI or console do a certain thing when manually applying updates. I for one hadn't made the connection.

I am not fully aware if the actual firmware page documents this as you expect. The information would make a lot more sense there as opposed to a cron job description.
One of the downsides of people asking for documentation of cron jobs is that they are heavily bound to the current implementation and settings and user changes. It would probably be better to point to the actual script being executed than to try and describe what each script does (and why), but that’s only my opinion.
Cheers,
Franco


feat(Stream): raceAll implementation

Type

[ ] Refactor
[x] Feature
[ ] Bug Fix
[ ] Optimization
[ ] Documentation Update

Description
I implemented raceAll using high-level API, not sure if it's a correct way. I just don't understand the low-level API yet:)

Now it should be a correct way

@tim-smart I think i'm done, could you review, please?

@tim-smart a strange thing is happening.
https://effect.website/play#a7005d4f9f10
The program is finished, but the process is hanging. I didn't get the reason yet, will investigate, but it looks like a deep bug somewhere out of this PR scope

I improved the docs, refactored the takeWhile predicate function body to be more readable.
It stucks on the docs generation now, and the reason is this behaviour that looks like a bug

@tim-smart a strange thing is happening.
https://effect.website/play#a7005d4f9f10
The program is finished, but the process is hanging. I didn't get the reason yet, will investigate, but it looks like a deep bug somewhere out of this PR scope

That seems to be exiting fine. Not sure what the docs issue is then.

No, it's not exiting. I am checking it locally on my machine.

I'm sorry, i provided a wrong code. This one is not exiting
https://effect.website/play#2bd210998527

It does exiting as expected if run it with NodeRuntime.runMain, but doesn't with 'Effect.runPromise`

NodeRuntime waits until program is finished and forcefully kills the process. Effect.runPromise just runs the program.
I assume the issue is somewhere here https://github.com/Effect-TS/effect/blob/main/packages/effect/src/internal/core.ts#L1532-L1537

Yes, the issue is here.
I modified the node_modules/effect/dist/esm/internal/core.js like this
export const never = /*#__PURE__*/async(() => {
  const interval = setInterval(() => void 0, 2 ** 31 - 1);
  console.log('set interval');
  return sync(() => {
    console.log('clear interval');
    clearInterval(interval)
  });
});

and the output is
tsx ./src/bugs/effect.interrupt.bug.ts
set interval
0
1
2
3
4
5

There are no clear interval log

I modified the code like this, and it works now. Looks like a dirty workaround, not sure if it's a good idea to do it. What do you think about it?
export const raceAll = <S extends ReadonlyArray<Stream.Stream<any, any, any>>>(
  ...streams: S
): Stream.Stream<
  Stream.Stream.Success<S[number]>,
  Stream.Stream.Error<S[number]>,
  Stream.Stream.Context<S[number]>
> =>
  Effect.all([Deferred.make<void>(), Deferred.make<void>()]).pipe(
    Effect.map(([halt, forever]) => {
      let winner: number | null = null;
      return Stream.mergeAll(
        streams.map((stream, index) =>
          stream.pipe(
            Stream.takeWhile(() => {
              if (winner === null) {
                winner = index;
                Deferred.unsafeDone(halt, Exit.void);
                return true;
              }
              return winner === index;
            }),
            Stream.interruptWhen(
              Deferred.await(halt).pipe(
                Effect.flatMap(() =>
                  winner === index ? Deferred.await(forever) : Effect.void,
                ),
              ),
            ),
          ),
        ),
        { concurrency: streams.length },
      );
    }),
    Stream.unwrap,
  );

I think we need @mikearnaldi here, because the bug looks serious

Here is an even easier code to reproduce
import { Effect, Schedule, Stream } from 'effect';

const program = Stream.fromSchedule(Schedule.spaced('1 second')).pipe(
  Stream.interruptWhen(Effect.never),
  Stream.take(1),
  Stream.runCollect,
);

Effect.runPromise(program);


upgrade contracts demonstration

fixes #515
This PR incorporates a test/demo for the upgradeable contracts that were previously merged in #552, to show that they are indeed upgradeable.
To test, run the test script. No other setup is required
cd test/ping-pong
docker-compose build
./upgrade-test.sh

It will run the ping-pong test twice, upgrading the State contract in between (from State.sol to StateV2.sol. The only difference between the two contracts is a constant value version, which gets incremented. The first time
the ping-pong test runs, look for the info log output State contract version is 0.0.1.  The second time the test
runs, the contract's version will be 0.0.2. The test takes a little while (~5 mins) so be patient.
The console output should provide helpful hints about progress.
Note that to make the test run, an endpoint has been added to client to enable a contract's version to be queried.  This is a significant change just to enable a test but it is likely to be useful to track contract versions in future. It also requires us to add a contract (StateV2) that is only needed for test purposes. We may wish to remove this in future.
The PR also adds instructions for how to do an upgrade.

Closed for now. Will revisit after initial deployment.


Missing desktop file for ranger

Describe the bug
The desktop file for ranger exists, but it's not symlinked under /run/current-system/sw/share/applications/.
To Reproduce
Steps to reproduce the behavior:

Install ranger
ranger.desktop isn't under /run/current-system/sw/share/applications/

Expected behavior
I expect ranger.desktop to be symlinked under /run/current-system/sw/share/applications/
Notify maintainers
@toonn @magnetophon
Metadata

system: "x86_64-linux"
host os: Linux 5.4.43, NixOS, 20.03.2015.e7752db2fb6 (Markhor)
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.3.5
channels(root): "home-manager-20.03, nixos-20.03.2015.e7752db2fb6"
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute: ranger
# a list of nixos modules affected by the problem
module:

I don't know how nix-env -i  works but installing declaratively does add .desktop file to the specified directory

@dmarcoux, did you install ranger using home-manager? I'm not sure that links anything under /run/current-system. Check your ~/.nix-profile for the desktop files maybe?

@toonn I did install ranger using home-manager. I checked ~/.nix-profile, but it symlinks to /nix/var/nix/profiles/per-user/my_user/profile. The symlink is broken since the last directory (so profile) doesn't exist. I do have /nix/var/nix/profiles/per-user/my_user and under it, many directories related to home-manager (like home-manager, home-manager-1-link, home-manager-2-link`, etc...). In the most recent home-manager generations, I do have ranger's desktop file and many others. Is this all expected?

I'm not sure. @rycee, could you weigh-in on how HM deals with desktop files?

Home Manager doesn't do anything with desktop files.
If ~/.nix-profile is a broken link it might possibly mean that the packages are installed through users.users.<name?>.packages.
In any case I think this is not a bug. Since the package was installed into a user profile it will not show up in /run/current-system/sw/share/applications, which belongs to the system profile.

I have installed ranger with home.packages.

@dmarcoux Yeah, then the desktop file should show up in the user profile. Either in ~/.nix-profile/share/applications or in /etc/profiles/per-user/$USER/share/applications.

@rycee The desktop file is in /etc/profiles/per-user/$USER/share/applications.
Thank you everyone for clarifying this. I'll close the issue. I hope this can also help someone else in the future.


Question

How does this project differ from ZeroRPC.
The reason that I ask is that this project appears to have not been maintained for several years.
And it would be great to have a modern Zero RPC framework that is maintained.
Thank you for your work.
Fig

Hi as a solo maintainer, I only add features on request. Thanks.


Media queries params support added

Also eachDecl is deprecated.

Happy to take this but there's a small linting error in test.js

I updated test.js

Brilliant, thanks a bunch for the PR 🚀

Nice. Why don't you want to publish updated module on npm?

Forgot to tag - Travis should be on the case now.


wasi: Move ReadDir out of the FileEntry structure.

Decouple file fd from ReadDir so that it is possible to return
multiple ReadDir structs for a given fd (one per call to ReadDir).
Future work necessary to support e.g. directory-entry-stream
see https://github.com/WebAssembly/wasi-filesystem/blob/main/wit/types.wit#L787
Signed-off-by: Edoardo Vacchi<EMAIL_ADDRESS>

So here's how I was thinking the refactoring would eventually occur, the order isn't too important
ReadDir is renamed to Readdir ;)
Readdir gets managed independent of file (this PR)
Logic that populates Readdir fields is moved to functions of Readdir, the fields are unexported for some sort of iterator API. Temporarily, these functions need to pass an fsapi.File which is used as needed to implement rewind, etc. (e.g. via File.Seek)
An interface is extracted from sys.Readdir: fsapi.Readdir package. This becomes the result of File.Readdir. the File parameter is removed from functions on the interface.
The File.Readdir implementation is made for both fsFile and osFile. e.g sysfs.osReaddir and sysfs.fsReaddir. When File.Readdir, returns fsapi.Readdir, it populates a field with the calling file, and this field is reset on rewind for the fsFile impl (which doesn't support Seek)
This is later extended to prove File.Readdir can be called multiple times and the results don't interfere with eachother, but if called only once, it re-uses the FD of the current file vs re-opening one always.
I hope these notes help!

thanks for the detailed writeup, I am renaming ReadDir => Readdir and ReadDirTable => ReaddirTable etc in this PR


[Extension] Unable to change GH settings in existing config

For example, users may want to switch their config from main to a different branch for testing purposes.

:tada: This issue has been resolved in version 3.18.2 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Openapi3 generates a schema with "type": "object" for models that extends string...

The following Cadl constructs:
@locationOf(TResource)
model Location<TResource> extends string {};

model LocationResponse<TResource> {
    @header("Location") location: Location<TResource>;
}

will be emitted as (when used in a response):
    "responses": {
          "201": {
            "description": "Accepted",
            "headers": {
              "Location": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
      }
     ```

The fact that something `is` or `extends` a string should presumably mean that the type should be `string` in openapi. If you add properties to something that `is` or `extends` a string, I would expect the emitter to error out.

A little more discussion on the subject established:

Using is for primitive types is more intuitive and should be allowed.

Using extends  means I want to explicitly create a new type that inherit the primitive type. However this isn't something that is supported in every language and shouldn't really need to have that if we have is. Make it an error for now until real demand for this comes


uploader terminal is line-by-line

Due to the way uploader is currently implemented in Go, when it enters "terminal mode" (-s), it really is only reporting lines whenever a newline comes in. Incomplete lines won't be reported until that happens.
It's useful for basic debugging, but clearly not the same as a regular serial terminal emulator.

Closing this, since uploader has been superseded by Folie v2.


Acknowledge contributors

Small ask, but it would be nice to be acknowledged for the contributed code in way or another.
Could be as simple as a CONTRIBUTORS file.

That’s a great idea! I’ll add one to the repo


⚠ Samsung has degraded performance

In 1718fc2, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2541 ms

Resolved: Samsung performance has improved in 9dcea8b.


Change iconName to Optional

Why:
Closes #12089
What's being changed:
Changed Required Note to Optional
Check off the following:

[x] I have reviewed my changes in staging (look for "Automatically generated comment" and click Modified to view your latest changes).
[x] For content changes, I have completed the self-review checklist.

@tobi6112
Thanks so much for opening a PR! I'll get this triaged for review :zap:


Cannot start nuxt:  Cannot use import statement outside a module

Hi,
Since yesterday Nuxt doesnt start with nuxt-graphql-client.
Please check your Stackblitz from Quick Start, im getting the same error.
https://stackblitz.com/edit/nuxt-graphql?file=README.md
package.json hasn't change, I dont know how to roll back or what has changed.
cosmiconfig-typescript-loader has import { TypeScriptLoader } from "./loader"; but I dont see any recent changes in this repo
thank you
error:
 ERROR  (node:11056) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.                                                                                08:49:58
(Use `node --trace-warnings ...` to show where the warning was created)

 ERROR  Cannot start nuxt:  Cannot use import statement outside a module                                                                                08:49:58

  import { TypeScriptLoader } from "./loader";
  ^^^^^^

  SyntaxError: Cannot use import statement outside a module
  at Object.compileFunction (node:vm:352:18)
  at wrapSafe (node:internal/modules/cjs/loader:1033:15)
  at Module._compile (node:internal/modules/cjs/loader:1069:27)
  at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
  at Module.load (node:internal/modules/cjs/loader:981:32)
  at Function.Module._load (node:internal/modules/cjs/loader:822:12)
  at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:170:29)
  at ModuleJob.run (node:internal/modules/esm/module_job:198:25)
  at async Promise.all (index 0)
  at async ESMLoader.import (node:internal/modules/esm/loader:385:24)

 ERROR  [unhandledRejection] Cannot use import statement outside a module                                                                                08:49:58
  08:49:58

  import { TypeScriptLoader } from "./loader";
  ^^^^^^

  SyntaxError: Cannot use import statement outside a module
  at Object.compileFunction (node:vm:352:18)
  at wrapSafe (node:internal/modules/cjs/loader:1033:15)
  at Module._compile (node:internal/modules/cjs/loader:1069:27)
  at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
  at Module.load (node:internal/modules/cjs/loader:981:32)
  at Function.Module._load (node:internal/modules/cjs/loader:822:12)
  at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:170:29)
  at ModuleJob.run (node:internal/modules/esm/module_job:198:25)
  at async Promise.all (index 0)
  at async ESMLoader.import (node:internal/modules/esm/loader:385:24)

Same issue here!

@tasiotas @michtio I was a bit busy earlier today, but I now have the time to properly investigate this.

thank you!
I had to make a temp json file with my data, just so I can keep working, because this issue completely locked me out.
I noticed that this repo is also trying to handle this issue.
https://github.com/kamilkisiela/graphql-config/releases/tag/v4.3.2

Same issue here!

@tasiotas @michtio @DenFin A quick update. We've narrowed it down to a strange ESM module resolution bug upstream in two different dependencies. A fix is on the way.

@tasiotas @michtio @DenFin
This has been resolved. Be sure to upgrade the module to v0.1.7, delete the node_modules folder and your lockfile

You're the best @Diizzayy


Ovt

This adds open-vm-tools 9.4.6 and libdnet as a dependency to the boot2docker image, plus a few kernel modules that are recommended for use with vmware.
open-vm-tools and libdnet are built using this little project: https://github.com/vmware/tcl-container. The Dockerfile pulls the binary tarballs from there.

ping @oliverkurth @frapposelli :wink:

@tianon I believe @oliverkurth could be of more help here, but I'm still watching the PR :wink:

@frapposelli ok, fair enough :+1: (thanks for clarifying!)
@oliverkurth I'm really confused here.  Your description mentions "recommended for use with vmware", but @jamtur01 found that the OS won't successfully work without this, and there's no clear information about what this adds that makes it work, or why it doesn't work without this.

@tianon the cli uses vm tools (ovt) for two things: get guest ip and drop ssh keys (put files).
As @jamtur01 pointed out, 1 and 2 are cli driver deficiencies. There's a lot of tech debt in the cli driver, and I started a new go lib to address those issues. https://github.com/zeeyang/fusia
I'm not sure what @jamtur01 mean by 3. Why would you need to run virtual box tools inside fusion?
tldr. this ovt patch is needed. cli fusion driver needs more love.

@zeeyang That should be VMW Tools - they don't auto-start when the VM runs. I had to manually kick them.

@jamtur01 ah. can you do a quick test with this iso. it will help us pin down if it's your iso build or the vmw environment. https://github.com/cloudnativeapps/boot2docker/releases

On 8 January 2015 at 11:02, Zee Yang<EMAIL_ADDRESS>wrote:

As @jamtur01 pointed out, 1 and 2 are cli driver deficiencies. There's a lot of tech debt in the cli driver, and I started a new go lib to address those issues. https://github.com/zeeyang/fusia

Couldn't/shouldn't we instead address these deficiencies in Docker
Machine directly so that we don't carry this technical debt forward?

just so its recorded in this PR - #331 shows that the OVT/VMW tools are not needed for b2d to function. if the only reason to add them is to give us a hint how to talk to it, then perhaps the generated but known MAC Address is enough.
But if the tools add something that can't be worked out another way, it would be great to know.

Sorry for the late reply - holidays and cold intervened.
So here is a list of things that make this PR valuable:

the vmballoon driver is used when the host gets low on memory. Basically, the driver will allocate memory in the guest and make it available to the host.
the vmtoolsd makes it possible to shut down the guest gracefully, by calling 'shutdown' (as opposed to just power off, which is just pulling the power plug). Similarly, it releases dhcp leases when suspending.
You can shutdown/suspend/resume from Fusion/WS or from the cmd line with vmrun (try vmrun -h).
it makes it possible to query the guest using the 'vmrun' (or 'vmware-vim-cmd' for shared VMs), for example to get  information like the IP adddress and others.
you can copy files from/to the vm using vmrun

excellent :) thanks for the list.
I'm only puzzled by the shutdown one - do you mean that vmware doesn't send the ACPI shutdown signal to request a graceful shutdown? mmm, I'm pretty sure it does, but yes, the suspend/resume passthrough is useful - as is anything that helps the vm's time get updated.

@frapposelli is there anything we can do so get shared folders in here like you have working in the test ISO from cloudnativeapps?  This would also help to get to a single ISO for Docker machine as well. :)

Can one of you elaborate on the "technical debt" mentioned above that takes this PR from the realm of "smoothing out VMware issues" into the realm of "required for VMware to even work at all" ?
While all the things this makes better listed above are great, I still don't see any clear-cut case for "this is absolutely required for b2d to function at all in VMware", so I want to understand what actually makes the current ISO not good enough, and what we can do to fix it besides just merging this PR and shoving our "technical debt" that was alluded to above under the rug.  Our rug has plenty of debt underneath it already. :smile:

@tianon i think @oliverkurth already listed the technical reasons why this patch is needed in a previous comment. The issues @jamtur01 pointed out were cli issues that have been addressed in the docker machine fusion driver.

@ehazlett the current ISO from cloudnativeapps doesn't have shared folders enabled, it's just a version that contains this patch and the magic string fix.

As this is becoming fundamental for docker-machine I will send out a new PR soon with the build process for open-vm-tools added to the boot2docker Dockerfile.
Extensive research proved to be impossible to include Shared Folders functionalities (known as vmhgfs internally) in the current TCL 5.x user space (32 bit user space mount.vmhgfs and 64 bit kmod don't play well together), hence the roadmap looks like this:

Boot2Docker based on TCL 5.x will have open-vm-tools functionalities but no shared folders.
Boot2Docker based on TCL 6.x will have full open-vm-tools functionalities.

As this is becoming fundamental for docker-machine ...

This is the part I'm not getting a good answer to.  What about this pull request or about Docker Machine itself makes this necessary?  The list of things this does/fixes are all good things, but they sound like they're "necessary for Docker Machine support" simply because of some technical debt, so I'm interested what that debt is, and what steps are being taken to pay it back properly.

@tianon there are several reasons for why open-vm-tools are needed for Docker Machine:

vmtoolsd communicates the guest OS IP back to the hypervisor, this functionality is a must have for the vmwarevsphere as it doesn't work without it. (the driver currently uses a custom boot2docker ISO).

vmtoolsd also enables file exchange between the Guest and the Host, a functionality that will be used to seed the initial SSH keys as we currently rely on B2D user/password for that, see this comment in the code.

Once B2D switches to a 64 bit user space we're going to have access to the shared folders functionality  that obviously needs tools running inside the GOS.

There are several other reasons that fall in the technical debt bucket, but these three are the most compelling ones right now.
Sounds reasonable?

@frapposelli :heart: :heart:
That's exactly what I was looking for, thanks!  Looking forward to the updated PR. :+1:


make batchCall easier to work with in the client

there's several places in #1611 that I avoided wiring up batchCall because it was trickier to use
it would be nice if we had a typed helper for batchCall that would take in a list of abi-typed calls (like writeContract) and execute them through batchCall

For me the ideal API is:
batchCall([
  {
    resource: { type: "system", namespace: "", name: "RegisterSystem" },
    functionName: "register",
    args: [match]
  },
  {
    resource: { type: "system", namespace: "", name: "NameSystem" },
    functionName: "setName",
    args: [name]
  },
]);

done here: https://github.com/latticexyz/mud/pull/1745

@holic They are for batch calls! https://github.com/latticexyz/skystrife-public/blob/main/packages/client/src/app/amalgema-ui/SummonIsland/Footer.tsx#L93-L97


[Swag] Ship MP t-shirt to Luis.

Hi,
I would like to wear a MicroProfile t-shirt to generate some brand awareness in Sweden. If is possible ship some stickers too .
Es un agrado el poder participar en la comunidad MicroProfile.
Saludos!

Your mpSwag was sent yesterday!
If you would like the international tracker, please let us know. Next week, we can share it internally with you. :)

Que Chevere!,
yes, share the international tracker please.
muchas gracias :-)

Tracking sent!

Hey @LuisGalazM,
Your mpswag was re-sent today. Let's see if this time, it passes aduanas.!


Test findings

findings:

[x] report map names not rendered (filter by map -> name not displayed)
[ ] check if can add cross to notification
[ ] add "remove filter" button
[ ] report: sort craftsman by trade
[ ] email in windows mail with huge logo
[ ] email view online for craftsman gives 500
[ ] email subject misses space in windows mail ("offene pendenzen" template)
[ ] include icon of "isMarked" and "wasAddedWithClient" in edit issues

cross on notification not supported by library

email subject problems likely because https://github.com/swiftmailer/swiftmailer/issues/1218

could not replicate missing spaces. likely windows mail unique problem


NVCC 12 fixes

Fixes #924

Codecov Report

Merging #932 (d369712) into develop (c949687) will decrease coverage by 0.02%.
The diff coverage is n/a.

:exclamation: Current head d369712 differs from pull request most recent head 49d9e11. Consider uploading reports for the commit 49d9e11 to get more accurate results

@@             Coverage Diff             @@
##           develop     #932      +/-   ##
===========================================
- Coverage    90.46%   90.45%   -0.02%
===========================================
  Files          129      129
  Lines         9428     9428
===========================================
- Hits          8529     8528       -1
- Misses         899      900       +1

see 1 file with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

trying a local TPL build now

did you want to add
options.append("-DAXOM_ENABLE_QUEST=OFF")
options.append("-DAXOM_ENABLE_MINT=OFF")

to scripts/spack/packages/axom/package.py?

after adding
options.append("-DAXOM_ENABLE_QUEST=OFF")
options.append("-DAXOM_ENABLE_MINT=OFF")

as mentioned above, spack is able to build axom successfully.

when configuring serac with -DSERAC_ENABLE_CODEVELOP=ON, cmake fails with the following error messages:
[cmake] CMake Error: install(EXPORT "serac-targets" ...) includes target "cuda" more than once in the export set.
[cmake] -- Generating done
[cmake] CMake Error:
[cmake]   Running
[cmake]
[cmake]    '/usr/bin/ninja' '-C' '/home/sam/code/serac/build-Clang-Debug' '-t' 'recompact'
[cmake]
[cmake]   failed with:
[cmake]
[cmake]    ninja: error: build.ninja:35: loading 'CMakeFiles/rules.ninja': No such file or directory
[cmake]
[cmake]   include CMakeFiles/rules.ninja
[cmake]
[cmake]                                 ^ near here

when using -DSERAC_ENABLE_CODEVELOP=OFF, cmake configure successfully, but the actual build fails with a lot of error messages
[build] /usr/lib/gcc/x86_64-linux-gnu/12/include/avx512fp16intrin.h(38): error: vector_size attribute requires an arithmetic or enum type
[build]   typedef __half __v8hf __attribute__ ((__vector_size__ (16)));
[build]                                         ^
[build] /usr/lib/gcc/x86_64-linux-gnu/12/include/avx512fp16intrin.h(44): error: vector_size attribute requires an arithmetic or enum type
[build]   typedef __half __m128h __attribute__ ((__vector_size__ (16), __may_alias__));
[build]                                          ^
[build] /usr/lib/gcc/x86_64-linux-gnu/12/include/avx512fp16intrin.h(62): error: more than one conversion function from "__half" to "<error-type>" applies:
[build]             function "__half::operator __half_raw() const" (declared at line 208 of /usr/local/cuda/include/cuda_fp16.hpp)
[build]             function "__half::operator float() const" (declared at line 217 of /usr/local/cuda/include/cuda_fp16.hpp)
[build]             function "__half::operator short() const" (declared at line 235 of /usr/local/cuda/include/cuda_fp16.hpp)
[build]             function "__half::operator unsigned short() const" (declared at line 238 of /usr/local/cuda/include/cuda_fp16.hpp)
[build]             function "__half::operator int() const" (declared at line 241 of /usr/local/cuda/include/cuda_fp16.hpp)
[build]             function "__half::operator unsigned int() const" (declared at line 244 of /usr/local/cuda/include/cuda_fp16.hpp)
[build]             function "__half::operator long long() const" (declared at line 247 of /usr/local/cuda/include/cuda_fp16.hpp)
[build]             function "__half::operator unsigned long long() const" (declared at line 250 of /usr/local/cuda/include/cuda_fp16.hpp)
[build]             function "__half::operator bool() const" (declared at line 254 of /usr/local/cuda/include/cuda_fp16.hpp)
[build]     return __extension__ (__m128h)(__v8hf){ __A0, __A1, __A2, __A3,
...

I'd like to solve the Axom issue in a follow up PR since it will require some Axom changes.


More tests for ipc json protocol

Add tests for Python ipc json protocol socket reading code, for Python 2.6+ and IronPython.
Since that code reads using the socket functions, it was easiest to make the tests write the test data to a socket, unlike C# where I was able to use a MemoryStream and bypass the socket.
I refactored the C# tests so that the same test data is used for both Python and C# implementations.
There are changes to the product code, so I'll wait until 15.2 is done before merging.

👍


add "prev = ptr" in state_table_find() function

network.c
void* state_table_find(hash_node* hash_table, void* stats_A, int serv_number) {
....
prev = ptr;                                        //zzl added this line
ptr = (hash_elem*) ptr->next;
}
return NULL;
}

@xzhower Thanks for the feedback. You can make a pull request with the change.


Expose SetDirty

After this time, I think this #436 PR isn't going to be merged so I think there could be a simpler way.
What if we leave image tracking on the user, and just expose SetDirty(x, y int, dirty bool) method.
I'm working on a app that shows some images. I know the positions and regions these images occupy.
When the screen changes (I scroll down or something), I can calculate cells that need to be redrawn.
Just need the SetDirty function to force tcell to redraw the cells.
I was already thinking about some hacky ways, that I can set the backgroud color to a darker/lighter, then
screen.Show() and then right back to the original color. But that's not pretty.
Using screen.Sync() is too slow and the screen and all the images blink too much.
Would this be possible? Just expose SetDirty?

So I made it. I think it's hacky, but it's less work.
Before, there where just spaces in the area where the image was.
Now I Set the area to unicode's Braille Blank (or just the rune '\u2800')
I think it is the same width and tcell is forced to redraw the areas where the image was before,
because on the new frame, there are no Braille Blanks, just spaces.
so just:
var imageArea image.Rect = calculateImageArea()
for x := imageArea.Min.X; x < imageArea.Max.X; x++ {
    for y := imageArea.Min.Y; y < imageArea.Max.Y; y++ {
        s.SetContent(x+ctx.X, y+ctx.Y, '\u2800', nil, tcell.StyleDefault)
    }
}

and when there's no image just:
s.SetContent(x+ctx.X, y+ctx.Y, ' ', nil, tcell.StyleDefault)


Test Suite documentation lacks JUnit tag example

Issue type
Wrong or misleading information
Problem description
In pre-test suite Gradle code, you could configure JUnit options in a closure under useJUnitPlatform, e.g.
   useJUnitPlatform {
        excludeTags("IntegrationTest", "BenchmarkTest")
    }

However, with test suites (and useJUnitJupiter()), there is no closure under the JUnit configuration call. Instead, you have to declare an options block inside of the testTask, cast the options variable to JUnitPlatformOptions manually, and call excludeTags on that object. Ignoring the lack of type-safe code here, this approach is not documented anywhere in the test suite documentation, leaving people to guess based on TestNGOptions and extrapolate from there. The documentation should clearly show how to do common JUnit tasks, like filtering on tags.
Context (optional)
No response
Page with the problem
https://docs.gradle.org/8.9/userguide/jvm_test_suite_plugin.html

This issue needs a decision from the team responsible for that area. They have been informed. Response time may vary.

This feels like it might be more than a documentation issue in case new APIs are required to support the use-case described here.

We currently do not expose test framework options at the top level of a test suite, but this is something we intend to do somehow.  Currently, the only way to achieve this is by configuring the task directly.

My interpretation of test suite theory is that, instead of using tags, I should split my tests into different suites (based on how I used tags). This is fine, but I wish you guys would tell me that! All I really want is a straight answer for when I Google how to migrate my tagged tests, but that straight answer does not seem to exist in the Gradle documentation.


Which board to select on PlatformIO?

I have been using ttgo-lora32-v1, and it has worked, but I figured it would make sense to ask, since I haven't seen a definitive answer and the TTGO T-Display doesn't match any of the board names available on platform IO directly.
Having this as part of the guide could be useful, especially with an example for both the 4Mb version and 16Mb

You can use the following settings to successfully use this board with PlatformIO:
platform = espressif32
board = esp32dev

The team at PlatformIO has stubbornly been ignoring requests to support this board for 3 years now, so I wouldn't wait for an official listing.

Lilygo T-Display S3 is now supported in PlatformIO out-of-the-box with "board = lilygo-t-display-s3" in platformio.ini
https://docs.platformio.org/en/latest/boards/espressif32/lilygo-t-display-s3.html
Note that the T-Display non-S3 isn't supported in PlatformIO but a workaround is described here : https://github.com/JakubAndrysek/TTGO_T_Display/blob/master/TTGO_example/platformio.ini

speed shoud lower, if enrounter fatal-error-occurred-invalid-head-of-packet error
#upload_speed = 921600  #too higher
upload_speed = 460800


update loacaton to suport location 4.x

Because napa depends on flutter_map_location ^0.7.1+1 which depends on location ^3.2.4, location ^3.2.4 is required.
So, because napa depends on location ^4.1.1, version solving failed.

Dear @mghase what is napa? Can you please reference that module? I can't find it on https://pub.dev/.

Dear @mghase further on what do you mean with "support location 4.x"? The module here does support that:
https://github.com/Xennis/flutter_map_location/blob/e9afc03d3351da87ffc01d6e27922b9d1e62fbed/pubspec.yaml#L16
That's the latest version https://pub.dev/packages/location/versions .


Nested TCSS looks buggy

Notice how Label is not highlighted properly.
Subsequent rules at the same level of nesting are highlighted properly.

Another example.


InlineDatePicker isn't clearable via keyboard

Environment

Tech
Version

material-ui-pickers
2.1.2

material-ui
3.2.0

React
16.5.2

Browser
Chrome

Peer library
moment

Steps to reproduce

Clear out the input field value
See the console log for the onChange event only firing for the regular DatePicker and not the InlinePicker

Expected behavior

Clearing out the input for an inline date picker should fire onChange event with null value

Actual behavior

Doesn't fire event.
Works fine with regular DatePicker

Live example
(side note: the example sandbox link has very outdated dependancies)
https://codesandbox.io/s/50pn28k03k

Did anyone was able to fix it?

I wanted to ask a question here without creating a whole new bug, since it's related to the inline date picker -- is there a reason the dialogActions are disabled in the inline version? So if I want the ability to set 'today' I have to use the regular modal version?

Thanks @dmtrKovalenko  for the quick work around.
You can close this issue

Thanks @dmtrKovalenko for the quick work around.
You can close this issue

agreed, thanks!


Final benchmarks + bug fixes

The benchmarks have been run and the results will be put in the readme shortly

Wrong repo


Test 2024 01 25

Mostly application additions this merge.
some subtle fixes and catches done on MicroWin and runspace.


Lxc list wrong project names for same name instances

When collecting instance data, instances on a node were being stored in a map whose key was the instance name. This change adds the project name to the key so that values are not overwritten when projects are different but instance names are the same.
Fixes #9693

@tomponline Can you please re-review? I noticed that the exact same problem would occur with node names and fixed that too.
More specifically, when querying instances a map of instance name to node name is used to retrieve the location of the instance. Since instance names are not unique when all-projects=true collisions of keys in that map would cause node names to be misreported.

node names

But nodes don't have projects, so I don't see the problem there?

@tomponline let's merge that one so I can backport it into the snap (along with the unix socket) fix, then @markylaing can send another PR to sort out the URL thing.

@stgraber ok thanks

Testsuite passed