Undying unconfigurable process

I am observing some odd behavior the last weeks:

way-displays is running
sending a command to way-displays does not work, it says it is not running
trying to make changes through a plain swaymsg command (swaymsg output \* scale 2) get reverted immediately by way-displays
killing the running instance immediately pops up a new one (this one is now clear since it is a systemd service)

❯ way-displays -s SCALE '' 2
ERROR: way-displays not running, check $XDG_VTNR
❯ ps aux | grep way-displays
janek     718100  0.0  0.0  10556  6712 ?        Ss   06:52   0:00 way-displays > /tmp/way-displays..janek.log 2>&1
❯ echo $XDG_VTNR
2
❯ pgrep way-displays
718100

❯ pkill way-displays
❯ ps aux | grep way-displays
janek     723001  0.6  0.0  10556  6764 ?        Ss   06:56   0:00 way-displays > /tmp/way-displays..janek.log 2>&1

❯ systemctl --user status way-displays | cat
● way-displays.service - Auto Manages Your Wayland Displays
     Loaded: loaded (/etc/xdg/systemd/user/way-displays.service; enabled; preset: enabled)
     Active: active (running) since Tue 2024-06-11 06:56:16 EAT; 2min 19s ago
       Docs: https://github.com/alex-courtis/way-displays
   Main PID: 723001 (way-displays)
      Tasks: 1 (limit: 76795)
     Memory: 1.2M ()
        CPU: 25ms
     CGroup<EMAIL_ADDRESS>             └─723001 way-displays ">" /tmp/way-displays..janek.log "2>&1"
❯ pacman -Qo /etc/xdg/systemd/user/way-displays.service
/etc/systemd/user/way-displays.service is owned by manjaro-sway-settings 16.19.6-7

sending a command to way-displays does not work, it says it is not running

The client determines whether the server is running by looking for a pid at /tmp/way-displays.${XDG_VTNR}.pid. What do you see in your /tmp?
It then finds the socket to use by looking at ${XDG_RUNTIME_DIR}/way-displays.${XDG_VTNR}.sock. What's in your ${XDG_RUNTIME_DIR}?
I suspect that the XDG_VTNR is different for the service. Are you using a login manager that sets 2?

trying to make changes through a plain swaymsg command (swaymsg output * scale 2) get reverted immediately by way-displays

Working as intended. way-displays will react to changes and apply its configuration. Canonical case: display arrives, sway sets it to default resolution.

this one is now clear since it is a systemd service

That's pretty cool. Can you please share your setup as a recipe?

That's pretty cool. Can you please share your setup as a recipe?

It's not by me but the fellow great manjaro-sway maintainer, see https://github.com/manjaro-sway/desktop-settings/blob/sway/community/sway/etc/systemd/user/way-displays.service :)
Seems to work fine again, I think I accidentally had two processes running as mentioned in https://github.com/alex-courtis/way-displays/issues/161


retrospective release of bap-ida-python.1.4.0

hey, that's the missed bap-ida-python.1.4.0
And now I think we won't' have any uninstallable issues

Thanks!


Disable apistub gen artifact gen for python pipeline

Python APIStub generator has a new change that seems to have broken apistubgen for azure-core-tracing-opencensus. This PR is to temporarily remove this apistub gen step since we haven't rolled out change to utilize this artifact yet.

@praveenkuttappan instead of disabling is it easy enough to rollback the version of the apistub tool we use? Also is there any way to try to test/check for these breaks when new changes are made to apistub?

We will add a pipeline to test this tool against all python packages.

@praveenkuttappan instead of disabling is it easy enough to rollback the version of the apistub tool we use? Also is there any way to try to test/check for these breaks when new changes are made to apistub?

@tjprescott has submitted a PR to fix actual issue in apistubgen. This PR is to unblock any pipeline failures until that's merged.

This is a temporary change to unblock python team.


Remove setup.py in favor of pyproject.toml

Were you able to test the PyPi install on a board with Python 3.7 installed?

Hmm, I'm not sure if this works on Python 3.7. I'm also not sure I did it correctly. Here's what I tried:

Made sure Python 3.7 was the latest.
Made sure pip3 corresponded to the latest python.
Copied entire Displayio folder to home directory
Inside of folder, ran pip3 install -e .
Received error Directory '.' is not installable. File 'setup.py' not found.

However, PlatformDetect (which doesn't have a setup.py file) installs just fine. So it probably just can't be installed in the manner I tried.

You might need to upgrade pip, I can't remember if that can cause the error you got.

Oh yep, you're correct. I was running Pip version 9. Upgrading to latest fixed it. It still worked fine with PyPI and PlatformDetect even on the older version, so I'm comfortable with this change.


WIP: Admin key from Google KMS

resolves #154

Note: there are still some issues regarding testnet.

I can share our code on this. This is how we're pulling public keys from Google KMS on Dapper wallet:
// GetPublicKeyWithKeyConfig retrieves the Public Key given the keyConfig
// Example Name: "projects/PROJECT_ID/locations/LOCATION_ID/keyRings/RING_ID/cryptoKeys/KEY_ID/cryptoKeyVersions/1
func (k *kmsProvider) GetPublicKeyWithKeyConfig(ctx context.Context, keyConfig *KeyConfig) ([]byte, error) {
	// generate request
	reqName := fmt.Sprintf("projects/%s/locations/%s/keyRings/%s/cryptoKeys/%s/cryptoKeyVersions/%s",
		k.projectID,
		k.locationID,
		keyConfig.KeyRingID,
		keyConfig.KeyID,
		keyConfig.KeyVersion,
	)
	req := &kmspb.GetPublicKeyRequest{
		Name: reqName,
	}

	resp, err := k.kmsClient.GetPublicKey(ctx, req)
	if err != nil {
		return nil, fmt.Errorf("Unable to GetPublicKey: %s", err)
	}

	pemKey := resp.GetPem()

	// PEM decode public key
	block, _ := pem.Decode([]byte(pemKey))
	if block == nil || block.Type != PEMBlockTypePublicKey {
		return nil, errors.New("Unable to decode PEM block containing public key")
	}

	pub, err := x509.ParsePKIXPublicKey(block.Bytes)
	if err != nil {
		return nil, err
	}
	pubKey := pub.(*ecdsa.PublicKey)
	xBytes := PadBytes(pubKey.X.Bytes(), ECCoupleComponentSize)
	yBytes := PadBytes(pubKey.Y.Bytes(), ECCoupleComponentSize)
	pubKeyParamBytes := append(xBytes, yBytes...)

	return pubKeyParamBytes, nil
}

This is how we convert the result []byte into *flow.AccountKey (the algo params are the same as key creation):
// AccountKeyFromBytes converts byte array to *flow.AccountKey
func AccountKeyFromBytes(pubKey []byte) (*flow.AccountKey, error) {
	cryptoPubkey, err := crypto.DecodePublicKey(crypto.ECDSA_P256, pubKey)
	if err != nil {
		return nil, err
	}

	return &flow.AccountKey{
		PublicKey: cryptoPubkey,
		SigAlgo:   crypto.ECDSA_P256,
		HashAlgo:  crypto.SHA2_256,
	}, nil
}

Thanks @tehranifar! We are using the Flow SDKs Google KMS API so I think that same code is there some where.
This issue however was actually simpler than it first seemed like. When creating a testnet account via the faucet one must choose SHA2-256 as the hash algorithm on the creation form here https://testnet-faucet-v2.onflow.org, not SHA3-256. So Googles generated keys must be SHA2.


PeerBox, a distributed app for storing and sharing files

PeerBox

a distributed web app for storing and sharing files

There is a lot of potential for a Dropbox-like 'cloud' storage app built on IPFS technologies. With IPFS performing most of the heavy lifting of a traditional file sharing and storage application, it is a great domain to demonstrate the ecosystem as a foundation for DApps.
What
PeerBox is a website where you can upload, download, and share content with yourself or anyone else. Content is uploaded under namespaces, or bins, like #interplanetary and can be public or private (behind keys). You can share specific files or entire bins and revert changes to a bin. You can be anonymous or not. That's the core.
Why
The foundation of cloud file storage apps is pretty much uploading and downloading with a bunch of additional features on top like sharing, access controls, in-app editing, and local <-> cloud sync. It seems like a fairly explored feature space (albeit with a day's research) where our work on decentralized protocols and incentive mechanisms like FileCoin gives us some unique differences.
How
With the research and work that's going on with dynamic-data, this is a good app to explore and push our peer-* building blocks and work on CRDT, ACL, and identity primitives. The core bin/content representation can utilize new or existing (a permutation of treedoc or one of the sets?) CRDTs along with ACL work to enable users and permissions (If I understand those correctly). We should build from what we've learned from PeerPad where we can but try to refine and push it.
Front-end wise, the client would follow our web app patterns: React + CSS 😅, maybe Redux. There are two main pages to the app: a homepage for the website and a Bin page. Authenticated users would also have an overview page displaying a user's accessible bins.
There are a lot of interesting integrations such as using FileCoin to ensure storage and provision of content, local <-> cloud sync through IPFS-Desktop, displaying a local node's pinned files like a web-view via IPFS-Companion, and web-based editing of PeerPad-able files.
I tried to keep this high level as I figured it's best to raise the idea before diving into details. I'm still ramping upipfs-shipyard and dynamic-data work so would love your thoughts.
What do you think? Worth pursuing?
A screenshot of an example UI (Dropbox's):

Tagging @pgte @diasdavid @lidel @fritzy. I'm not sure who else is relevant here, please ping others as you see fit :)

FYSA we are currently designing user interfaces related to "File Browser" in new WebUI, relevant threads being (feel free to join, read existing ideas or provide examples of good GUIs for inspiration):

Design: Share files via IPFS https://github.com/ipfs-shipyard/pm-ipfs-gui/issues/34
Design: Add files to IPFS https://github.com/ipfs-shipyard/pm-ipfs-gui/issues/35
Design: File Browser https://github.com/ipfs-shipyard/pm-ipfs-gui/issues/9

When done, we will implement these refined interfaces in the new WebUI and Companion, but these building blocks and established design patterns could prove to be useful elsewhere as well.
The key here is to avoid duplicated effort, especially when it comes to designing GUIs for the most common operations.
If GUI design work is reused, I feel this could enable "PeerBox" work to focus more on the research side related to CRDTs, ACLs and sync.
An open question to me is if  "PeerBox" should be a separate dapp spawning own node, communicating with user's node via window.ipfs, or is it something that we could slowly integrate  as a set of standard features within existing apps, namely IPFS Desktop (and new WebUI), by adding things like ACLs, encryption, and sync over time.
Thoughts?

@lidel Thanks for the briefing! I've just spent some hours exploring the conversations that have happened over the past month. I'm still working through it but my thoughts on your thoughts so far are:
First, your open question on whether these features should just be a standard set of features in existing apps. Yeah, you guys have already done a lot of work with this general idea! Some of these could be core features available in Desktop/WebUI and I definitely think integrating work on ACL and encryption would be awesome. The WebUI's file browsing/adding/sharing design covers a lot of what would be needed for this and reusing as much of that would be great, perhaps sharing core components / functions.
An app like PeerBox (name is totally open to change) could connect to a gateway or a local node but is intended to communicate with the rest of the swarm, not necessarily view local content. We could use it as a view into a local node's pinned files but I think that's the domain of WebUI. We are talking with the swarm to find the latest version of a bin and to also broadcast any operations we perform like adding/removing files. A local node could be very useful to help ensure that content is available when requested from elsewhere through PeerBox, and a sync feature is super interesting there.
File sharing via an app is a simple way to interact with IPFS without needing to install anything, host a node (at least for downloading), or even know you're using a p2p swarm. It provides a way to associate items that aren't necessarily connected via the protocol by allowing users to curate collections (bins), organize them them with human-readable folder/file patterns, then access them from anywhere. For example, when people in an organization add documents to IPFS from different nodes they can use this to easily organize and make it available to each other. It's also an easier way to reference your own content hosted on IPFS when you're not at your node because you can just remember all your files are under "#lidels-bin" and download it on whatever computer you're at, with an in-browser node.
Some use-cases:

Being on a library computer and downloading a paper you worked on last night
Uploading a video on a friend's computer for your access later
A useful, simple introduction to IPFS without having to run a node yourself
Organizations could..

host their datasets in a way that's easy for consumers to explore and download
host releases, like: #ipfs/releases/desktop/latest.exe

It would be interesting to sync a ipfs-desktop client with a bin, where that desktop's node listens to changes on the bin. Allows a way to ensure provision of content.
There's also an cool use case for just a view into a remote node's pinned files that allows upload/download.


Update to pulumi-terraform f106438be1cfc8

@jen20 this is an interim that fixed up something else - we need to spend more time on this app!


Add properties to Android device

(UCO CP-50) Add properties to Android device to represent information captured by tools

This is being tracked in OC-122.

This proposal was added to UCO 0.8.0.  The resulting page is here.


Add tests using custom-components/integration_blueprint#50 as base

I just pulled the files over and replaced references to integration_blueprint with {{cookiecutter.project_name}} and IntegrationBlueprint/Blueprint with {{cookiecutter.class_name_prefix}}.
What might be missing is instructions on how to run the tests, check for coverage, etc but figured someone else could tackle that.
Resolves #10

Thank you very much for your contribution. Some general comments you can already process during my code review:

The test folder is not at the right place. When generating a project with cookiecutter, only the files in {{cookiecutter.project_name}} will be processed for replacing Jinja tags and copied to the destination.
Could you add some explanations about how to use the test suite in the {{cookiecutter.project_name}}/CONTRIBUTIN.mdfile ?
It will be perfect if you can update ./docs/guide.rst to explain what is doing the test suite and how to do use it. Could be in another PR.

Thank you very much for your contribution. Some general comments you can already process during my code review:

The test folder is not at the right place. When generating a project with cookiecutter, only the files in {{cookiecutter.project_name}} will be processed for replacing Jinja tags and copied to the destination.
Could you add some explanations about how to use the test suite in the {{cookiecutter.project_name}}/CONTRIBUTIN.mdfile ?
It will be perfect if you can update ./docs/guide.rst to explain what is doing the test suite and how to do use it. Could be in another PR.

🤦🏾♂  clearly I moved too quickly on this - I have resolved bullet 1.
I will add an item for bullet 2 tomorrow, and bullet 3 sometime this weekend. The code has a lot of comments so I will likely just be pulling those together and making them into a single doc

🤦🏾♂  clearly I moved too quickly on this - I have resolved bullet 1.
I will add an item for bullet 2 tomorrow, and bullet 3 sometime this weekend. The code has a lot of comments so I will likely just be pulling those together and making them into a single doc

Now the project generated by the cookiecutter template succeed to pass the test suite with 100% coverage. Houra !
There are some warnings with config_flow.py tests about some mocking function not awaited.
I'm not in my confort zone but I made some investigations and took inspiration from standard tests suite in Home Assistant core code and other custom component using pytest-homeassistant-custom-component
It seem's to be a best practice and make sens in config_flow test suite to avoid calling the async_setup and async_setup_entry coroutines. So I implement a patch and warnings are gone.
@raman325 Can you check the modification I suggest in this commit ?

Now the project generated by the cookiecutter template succeed to pass the test suite with 100% coverage. Houra !
There are some warnings with config_flow.py tests about some mocking function not awaited.
I'm not in my confort zone but I made some investigations and took inspiration from standard tests suite in Home Assistant core code and other custom component using pytest-homeassistant-custom-component
It seem's to be a best practice and make sens in config_flow test suite to avoid calling the async_setup and async_setup_entry coroutines. So I implement a patch and warnings are gone.
@raman325 Can you check the modification I suggest in this commit ?

good find and good fix. I will submit the same change here

good find and good fix. I will submit the same change here

Only thing to note is that you do not need to pass the fixture in as a parameter to test_successful_config_flow because you have already set autouse to True for the fixture

Only thing to note is that you do not need to pass the fixture in as a parameter to test_successful_config_flow because you have already set autouse to True for the fixture


sg_roles_mapping error

i add a role mapping about the hosts only connect
but all the hosts can login kibana
configure file as:
sg_zqc_system_log_index:
users:
- zqc
- zqc1
hosts:
- <IP_ADDRESS>
search guard <IP_ADDRESS>

Please do not ask questions here.
For that refer to https://groups.google.com/forum/#!forum/search-guard
Github is a place only for reporting bugs or feature requests.
If you report a bug please include always the following informations:

Search Guard and Elasticsearch version
JVM version and operating system version
Number of nodes in your cluster
Description of the bug

These informations are optional but are very valueable and
typically would lead to get bugs fixed faster:

Steps to reproduce
Logfiles on DEBUG level
A failing unittest


RSS Getting a 404

Version of the custom_component

0dc231c
Configuration

  - platform: emscrss
    name: Earthquakes
    radius: 300
    magnitude: 3.0

Describe the bug
Getting this error in the logs:
This error originated from a custom integration.

Logger: georss_client
Source: custom_components/emscrss/sensor.py:123
Integration: emscrss (documentation, issues)
First occurred: 12:53:05 PM (50 occurrences)
Last logged: 4:58:10 PM

Fetching data from https://www.emsc-csem.org/service/rss/rss.php?typ=emsc failed with status 404

Debug log

Not bothering to generate logs as I confirmed the URL is indeed giving a 404 in my browser.  I suspect the RSS feed has moved (or is possibly defunct).
If you really want debug logs, just ask and I'll generate some.

Add your logs here.

Fetching data from https://www.emsc-csem.org/service/rss/rss.php?typ=emsc failed with status 404
Same for me. But it's not the first time down for a long time, it happened before. There is no information that the service has moved. Maybe they didn't notice it yet ;-)

Hi,
thanks for looking at this.
Sadly, w/o RSS this integration will not work anymore.
BR

I don't know how to solve this quite as thoroughly as this integration did, but for folks in the US, there does exist the USGS integration.  Looks like some quakes are reported outside the US, but the number is low enough I believe the data's incomplete.
Using USGS I get behavior similar to this integration by adding this to configuration.yaml:
geo_location:
  - platform: usgs_earthquakes_feed
    feed_type: "past_day_all_earthquakes"

template:
  - sensor:
      name: usgs_earthquakes_feed
      state: "{{ this.attributes.quakes | count }}"
      attributes:
        quakes: >
          {%- set entities = integration_entities("usgs_earthquakes_feed") %}
          {%- set ns = namespace(entities = []) %}
          {%- for entity_id in entities %}
            {%- set ns.entities = ns.entities + [ entity_id ] %}
          {%- endfor %}
          {{ ns.entities }}

Then I created a card like this:
type: conditional
conditions:
  - entity: sensor.usgs_earthquakes_feed
    state_not: '0'
card:
type: markdown
  content: >
    |Time|Title|Magnitude|

    |----|-----|---------:|
    {%- for entry in state_attr("sensor.usgs_earthquakes_feed", "quakes") %}

    |{{ relative_time(state_attr(entry, "time")) }} ago | {{
    state_attr(entry, "place") }} | {{ state_attr(entry, "magnitude") }}|

    {%- endfor -%}

The geo_location domain also provides this nifty map, so you could also do something like this:
type: conditional
conditions:
  - entity: sensor.usgs_earthquakes_feed
    state_not: '0'
card:
  title: Earthquakes!
  type: vertical-stack
  cards:
    - type: map
      geo_location_sources:
        - all
    - type: markdown
      content: >
        |Time|Title|Magnitude|

        |----|-----|---------:| {%- for entry in
        state_attr("sensor.usgs_earthquakes_feed", "quakes") %}

        |{{ relative_time(state_attr(entry, "time")) }} ago | {{
        state_attr(entry, "place") }} | {{ state_attr(entry, "magnitude") }}|

        {%- endfor -%}

Hello,
Is it possible the integration to receive the earthquake data from this page: https://www.emsc-csem.org/Earthquake_information/

Hello
I checked their app, it retrieves data from this geojson. Can it be implemented? (I don't know how to build integrations, unfortunately)

It is simple extracting the data from the json with some small code in the configuration.yaml and some rest platform.
This is my code I use to get some WAQI data, this should be something similar. I dont know how to do integrations as well.
- platform: rest   resource: https://api.waqi.info/feed/A181300/?token=89b6adc56d9d63642354ae1a9b8fc9774730baa4   scan_interval: 600   name: WAQI Butel   value_template: "{{ value_json.data.aqi | int }}"   unique_id: waqi_butel

It is simple extracting the data from the json with some small code in the configuration.yaml and some rest platform.
This is my code I use to get some WAQI data, this should be something similar. I dont know how to do integrations as well.
- platform: rest   resource:https://api.waqi.info/feed/A181300/?token=<token>   scan_interval: 600   name: WAQI Butel   value_template: "{{ value_json.data.aqi | int }}"   unique_id: waqi_butel

My (newbie) Home Assistant solution for the EMSC monitor, see the code below.
Please note: I am only interested in the latest earthquake within a region roughly the rectangle region left top Iceland, right bottom Turkey.
I use the following URL for that:
https://www.seismicportal.eu/fdsnws/event/1/query?limit=1&minlat=34.443&maxlat=68.270&minlon=-23.921&maxlon=41.365&format=json&minmag=4.0

limit=1   -> means I only want the latest quake
minlat=34.443&maxlat=68.270&minlon=-23.921&maxlon=41.365 -> is the region I'm interested in
minmag=4.0  -> only magnitude 4.0 and above
You can create this URL at the website of EMSC and then past it in the code.
In de configuration.yaml
rest:
  # EMSC Earthquakes
  - resource: https://www.seismicportal.eu/fdsnws/event/1/query?limit=1&minlat=34.443&maxlat=68.270&minlon=-23.921&maxlon=41.365&format=json&minmag=4.0
    timeout: 50
    scan_interval: 900 #'00:01'
    sensor:
      - name: "EMSC Earthquakes"
        value_template: "OK"
        json_attributes_path: "features[0].properties"
        json_attributes:
            - lastupdate
            - time
            - flynn_region
            - lat
            - lon
            - depth
            - mag
            - magtype
            - unid

Next, I added a Markdown Card (on one of my dashboards.
If you open the YAML-editor of that card, you can paste it in.
type: markdown
content: >
  <ha-icon icon="mdi:earth"></ha-icon>Latest earthquake >=4.0 in the EU:

  Location:  {{ state_attr('sensor.emsc_earthquakes', 'flynn_region') | title }}

  Magnitude (4>): {{ state_attr('sensor.emsc_earthquakes', 'mag') }} ({{ state_attr('sensor.emsc_earthquakes', 'magtype') | title}})

  Depth: {{ state_attr('sensor.emsc_earthquakes', 'depth') }} km

  Date: {{ state_attr('sensor.emsc_earthquakes', 'time')[0:10] }} Time: {{ state_attr('sensor.emsc_earthquakes', 'time')[11:19] }}

This gives you an idea how you could use the information.
I am new to Home Assistant, so maybe a wizard would do a better job, but this works for me.


blockchain log causes a crash

Platform: Ubuntu 18.10 Linux i686
Version: https://github.com/input-output-hk/cardano-cli/releases/tag/v1.0.0-alpha3
Expected Behaviour: cardano blockchain log should be printed and the program should exit.
Actual Behaviour: cardano blockchain log is printed by program crashes.
Output:

RUST_BACKTRACE=1 ./cardano-cli blockchain log mainnet
< snipped lots of hashes >
65904a89e6d0e5f881513d1736945e051b76f095eca138ee869d543d
af2800c124e599d6dec188a75f8bfde397ebb778163a18240371f2d1
thread 'main' panicked at 'block location', libcore/option.rs:1000:5>
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::panicking::default_hook::{{closure}}
at libstd/sys_common/backtrace.rs:71
2: std::panicking::rust_panic_with_hook
at libstd/panicking.rs:227
at libstd/panicking.rs:477
3: std::panicking::continue_panic_fmt
at libstd/panicking.rs:391
4: rust_begin_unwind
at libstd/panicking.rs:326
5: core::panicking::panic_fmt
at libcore/panicking.rs:77
6: core::option::expect_failed
at libcore/option.rs:1000
7: <cardano_storage::iter::reverse::ReverseIter<'a> as core::iter::iterator::Iterator>::next
8: cardano_cli::main
9: std::rt::lang_start::{{closure}}
10: main
11: __libc_start_main
12:

Notes:

From a UX point of view It might help to have timestamps or some kind of sequence data with the hashes
The blockchain seemed to be fully synced

Backtrace from a debug build:
        65904a89e6d0e5f881513d1736945e051b76f095eca138ee869d543d
        af2800c124e599d6dec188a75f8bfde397ebb778163a18240371f2d1

thread 'main' panicked at 'block location', libcore/option.rs:1000:5
stack backtrace:
  ...
   9: <core::option::Option<T>>::expect
             at libcore/option.rs:312
  10: <cardano_storage::iter::reverse::ReverseIter<'a> as core::iter::iterator::Iterator>::next
             at cardano-deps/storage/src/iter/reverse.rs:39
  11: cardano_cli::blockchain::commands::log
             at src/blockchain/commands.rs:247
  12: cardano_cli::subcommand_blockchain
             at src/main.rs:356
  13: cardano_cli::main
             at src/main.rs:77

Same behaviour on OSX


MM-15128 - add support for interactive dialogs with no elements

Summary
I think this simple change is what is needed to support interactive dialogs with no elements. Since my react/js knowledge is a little limited, I'm not sure if we need to check if the elements array is non null before we render or not.
Ticket Link
Part of MM-15128
Related Pull Requests

Has server changes Pull request #10755

Hi @andresoro,
Thanks for the PR. :+1:
I've testing it with the demo plugin. See https://github.com/mattermost/mattermost-plugin-demo/pull/28 for the PR that I used.
After creating the dialog with /dialog no-elements the web app crashes and I see the following error in the dev console:
Unhandled promise rejection TypeError: "props.elements is null"
    InteractiveDialog interactive_dialog.jsx:36

Let me know, if you need further information on how to debug this or have other questions.

Hey @hanzei it looks like I need to add a check to see if the elements array is null or not. I suspected something like this would happen. I appreciate the update for the demo plugin and I am going to use that to test these changes further. Going to continue to work on this.

I used the plugin mentioned above to test and debug the component. Checking for null in the constructor and the render is what's needed to display the interactive dialog properly. The "Confirm" button wasn't doing anything but I'm not sure if that's by design with the plugin or with the dialog component. Also, it seems like there is a blank space left over from Modal.Body since there are no elements.
It would look cleaner if the Modal.Body was dropped when the elements array is null.

Thanks for the update! The dialog opens now!

The "Confirm" button wasn't doing anything but I'm not sure if that's by design with the plugin or with the dialog component.

The problem is caused by a TypeError:
Unhandled promise rejection TypeError: "elements is null"
    _callee$ interactive_dialog.jsx:56

Would you please fix this? Then we can queue this PR for PM review.

Went ahead and fixed that error and also changed the Modal.Body to display only if there are elements. I'm not sure if the way I did it was proper or hackish since my react/JS knowledge is rusty.

@andresoro Thanks for the update. This works great! One visual problem I've noticed is that modal-header has a border-bottom and .modal-footer has a border-top. This makes up for a doubled border. Would you be open on changing this that it only shows one border?

Two borders would be the expected behavior when we have elements to display, correct? So we should only have one border when there are no elements.

Setup Test Server label detected. Spinmint test server created if build succeeds (checks pass and no conflicts with base branch).

@andresoro I see your points. Let's ask our Product Manager @jasonblais what he thinks about this.

Thanks for the contribution! Happy to take a look at it and see how it looks with two borders when there are no elements.
Looks like the build failed, can you help take a look at it @andresoro when you have the chance?

Hey @jasonblais, I ran the commands that the CI ran and it works on my machine. I also did some searching and found that someone else had this same issue on mattermost-mobile #2405. Unsure how to proceed with this one.

some lint errors
/root/mattermost-webapp/components/interactive_dialog/interactive_dialog.jsx
   68:16  error  Trailing spaces not allowed  no-trailing-spaces
   70:1   error  Trailing spaces not allowed  no-trailing-spaces
  192:1   error  Trailing spaces not allowed  no-trailing-spaces

Setup Test Server label detected. Spinmint test server created if build succeeds (checks pass and no conflicts with base branch).

Spinmint test server created at: https://i-0aa9d0e8366ab00ca.test.spinmint.com
Test Admin Account: Username: sysadmin | Password: sysadmin
Test User Account: Username: user-1 | Password: user-1
Internal IP: <IP_ADDRESS>
Instance ID: i-0aa9d0e8366ab00ca

Spinmint test server destroyed

Setup Test Server label detected. Spinmint test server created if build succeeds (checks pass and no conflicts with base branch).

@cpanato The generated test server wasn't loading for me when I tried to access it. I've tried to generate a new one, but it seems to fail.
Next week, please help take a look?

Spinmint test server destroyed

Setup Test Server label detected. Spinmint test server created if build succeeds (checks pass and no conflicts with base branch).

Setup Test Server label detected. Spinmint test server created if build succeeds (checks pass and no conflicts with base branch).

Spinmint test server created at: https://i-07fd5f252b2116062.test.spinmint.com
Test Admin Account: Username: sysadmin | Password: sysadmin
Test User Account: Username: user-1 | Password: user-1
Internal IP: <IP_ADDRESS>
Instance ID: i-07fd5f252b2116062

@andreistanciu24 @hanzei Following the previous conversation about having a "double" border on a dialog with no elements:
Is there a way to check that if there are no elements, then do not render the border-bottom for modal-header, for instance?

Been testing, and otherwise it's looking really good 👍

Apologies, looks like I at-mentioned the wrong username..re-posting below:
@andresoro @hanzei Following the previous conversation about having a "double" border on a dialog with no elements:
Is there a way to check that if there are no elements, then do not render the border-bottom for modal-header, for instance?

Spinmint test running for more than 7 days. This test server was terminated.

So I did a bit of research on this and found that React allows for inline styling within components. The docs say it is not the best way to style components but it also allows for conditional styling based on the components props. In our case it's whether or not there are elements in the dialog.
So I modified the Modal.Header tag to the following:
<Modal.Header closeButton={true} style={elements == null && {borderBottom: '0px'}}>

Which essentially changes the border-bottom attribute to not show if there aren't elements. I tested with /dialog no-elements and the output looks like:

Setup Test Server label detected. Spinmint test server created if build succeeds (checks pass and no conflicts with base branch).

Spinmint test server created at: https://i-02f16f0469e1316fa.test.spinmint.com
Test Admin Account: Username: sysadmin | Password: sysadmin
Test User Account: Username: user-1 | Password: user-1
Internal IP: <IP_ADDRESS>
Instance ID: i-02f16f0469e1316fa

Spinmint test server destroyed

@asaadmahmood @cpoile Gentle reminder to review this PR

@cpoile thanks for the review. I'll make the changes and push 👍.

Great, just remember to click request re-review so I know to come back. Thanks!


#195 Add more built-in colours for both RGBA and RGB

Close #195

Just a few more colours and you could make yourself some salmon in tomato-olive sauce ;-)
I assumed you simply wanted a handful of extra colours but I should have asked, sorry. I've never done any kind of code generation but I'd be more than happy to work on something more comprehensive if you'd like. If not, should I go ahead and merge or leave that to you?

All done - thanks again!
I'm not feeling the need for anything more comprehensive at the moment. Maybe in a few days after I've let it percolate for a while, but currently I'm very happy with the colour based recipe recommendation. ;-)
Code generation is good fun and occasionally super useful. I use it in cases where I'm always going to load in a big lump of data, parse it, and then have to search it for information. If you instead take that lump of data and just generate a module - which is just a text file - then you get to compile it right into your code base, full type safety, no loading.
Here's an example, if you're interested, it's a little thing that generates tile information for Dwarf Fortress style asset packs (which is just a grid of ascii symbols):
https://github.com/davesmith00000/roguelike-tutorial/blob/main/part1/project/TileCharGen.scala
Which is called from:
https://github.com/davesmith00000/roguelike-tutorial/blob/main/part1/build.sbt#L31


V rodriguezd 1310881 document fixes

Document fixes for issues 2150, 2133 and 2035

Docs Build status updates of commit 748c931:
:warning: Validation status: warnings

File
Status
Preview URL
Details

msteams-platform/build-your-first-app/build-first-app-overview.md
:warning:Warning
View
Details

msteams-platform/resources/schema/manifest-schema.md
:bulb:Suggestion
View
Details

msteams-platform/tabs/how-to/authentication/auth-flow-tab.md
:white_check_mark:Succeeded
View

msteams-platform/build-your-first-app/build-first-app-overview.md

Line 50, Column 1: [Warning-hard-coded-locale] Link 'https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/prepare-your-o365-tenant#enable-custom-teams-apps-and-turn-on-custom-app-uploading' contains locale code 'en-us'. For localizability, remove 'en-us' from links to most Microsoft sites.

msteams-platform/resources/schema/manifest-schema.md

Line 3, Column 14: [Suggestion-duplicate-descriptions] Attribute 'description' with value 'Describes the schema supported by the manifest for Microsoft Teams' is duplicated in 'resources/schema/manifest-schema-dev-preview.md(3,14)', 'resources/schema/manifest-schema.md(3,14)'. NOTE: This Suggestion will become a Warning on 1/29/21.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

Docs Build status updates of commit 82a7d35:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

msteams-platform/resources/schema/manifest-schema.md
:bulb:Suggestion
View
Details

msteams-platform/build-your-first-app/build-first-app-overview.md
:white_check_mark:Succeeded
View

msteams-platform/tabs/how-to/authentication/auth-flow-tab.md
:white_check_mark:Succeeded
View

msteams-platform/resources/schema/manifest-schema.md

Line 3, Column 14: [Suggestion-duplicate-descriptions] Attribute 'description' with value 'Describes the schema supported by the manifest for Microsoft Teams' is duplicated in 'resources/schema/manifest-schema-dev-preview.md(3,14)', 'resources/schema/manifest-schema.md(3,14)'. NOTE: This Suggestion will become a Warning on 1/29/21.

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

Docs Build status updates of commit 346adea:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

msteams-platform/build-your-first-app/build-first-app-overview.md
:white_check_mark:Succeeded
View

msteams-platform/resources/schema/manifest-schema.md
:white_check_mark:Succeeded
View

msteams-platform/tabs/how-to/authentication/auth-flow-tab.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

Docs Build status updates of commit 0e74230:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error-PullRequestMergeConflict] Cannot sync git repo to specified state. Please make sure the pull request is mergeable.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

Hi @v-rodriguezd, I have a couple questions regarding updates to build-first-app-overview.md:

I wonder if the new note should come at the end of the procedure? It seems this would be your next option only after you've checked Teams for custom app uploading and signed up for an M365 test account.
"While registering your app ...": Is "registering your app" referring to sideloading/uploading? If not, this is a new concept we aren't fully explaining in this topic.

I have made the change. Please let me know if it's  correct.

Docs Build status updates of commit d20a0d0:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

msteams-platform/build-your-first-app/build-first-app-overview.md
:white_check_mark:Succeeded
View

msteams-platform/resources/schema/manifest-schema.md
:white_check_mark:Succeeded
View

msteams-platform/tabs/how-to/authentication/auth-flow-tab.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

H @v-rodriguezd, looks good! I would just recommend updating the first part of the note (see below).
Current: "To enable custom teams apps and turn on custom app uploading, refer ..."
Suggested revision: "If you still can't sideload apps, refer to ..."
Hope this helps--please let me know if you have questions.

H @v-rodriguezd, looks good! I would just recommend updating the first part of the note (see below).
Current: "To enable custom teams apps and turn on custom app uploading, refer ..."
Suggested revision: "If you still can't sideload apps, refer to ..."
Hope this helps--please let me know if you have questions.

Resolved

Docs Build status updates of commit 7cdf6ae:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

msteams-platform/build-your-first-app/build-first-app-overview.md
:white_check_mark:Succeeded
View

msteams-platform/resources/schema/manifest-schema.md
:white_check_mark:Succeeded
View

msteams-platform/tabs/how-to/authentication/auth-flow-tab.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


added support for param == 0 in Clayton sampler

I also cleaned up the call to _claytonsample a bit.

Looks good!