random_state not working as expected when using constraints

I am using the following versions of the dependencies:
scipy==1.6.2,
scikit-learn==1.4.1.post1,
numpy==1.22.4,
colorama==0.4.6,
on the latest version of BayesianOptimization (1.4.3). The script is run on a cluster set up with HTCondor (I can gather more information regarding the cluster if required).
CONTEXT: I am trying to optimize a function with 5 input parameters $f(\theta_{hS}, \theta_{hX}, \theta_{SX}, v_{S}, v_{X})$. This function has internal constraints, meaning that if a set of input parameters fail the constraints, the function $f$ returns nothing.
I have set up BayesianOptimization using the nonlinear constraint function from scipy scipy.optimize.NonlinearConstraint as described in the section describing advanced constraints in constraints.ipynb.
THE BUG: my issue is that optimizer.max returns slightly different values for each run whilst keeping everything the same between the runs -- I have changed nothing between the runs, I am running the exact same script but getting slightly different results... Below are the outputs I get between the runs.
1.9774822805041e-0 and 1.9741709457416507e-0
As can be seen the latter decimals differs quite a bit, but the overall order of magnitude remains the same.
I have set random_state=1, so that the seed is the same, hence there should be no randomness affecting the optimization. Below I have included my script
#!/usr/bin/python3 python3
import configurer as config
import functions

import os
import subprocess

import numpy as np
import pandas

from scipy.optimize import NonlinearConstraint

if __name__ == '__main__':

    def TRSM(mH1, mH2, mH3, thetahS, thetahX, thetaSX, vs, vx, SM1, SM2, mode, pathTRSM, pathOutput, **kwargs):

        ####################### kwargs #######################

        if 'BFB' in kwargs:
            BFB = kwargs['BFB']

        else: BFB = 0

        if 'Uni' in kwargs:
            Uni = kwargs['Uni']

        else: Uni = 0

        if 'STU' in kwargs:
            STU = kwargs['STU']

        else: STU = 0

        if 'Higgs' in kwargs:
            Higgs = kwargs['Higgs']

        else: Higgs = 0

        ######################################################

        # input parameters
        dictModelParams = {'mH1_lb': mH1, 'mH1_ub': mH1,
                           'mH2_lb': mH2, 'mH2_ub': mH2,
                           'mH3_lb': mH3, 'mH3_ub': mH3,
                           'thetahS_lb': thetahS, 'thetahS_ub': thetahS,
                           'thetahX_lb': thetahX, 'thetahX_ub': thetahX,
                           'thetaSX_lb': thetaSX, 'thetaSX_ub': thetaSX,
                           'vs_lb': vs, 'vs_ub': vs,
                           'vx_lb': vx, 'vx_ub': vx}

        # some temporary files needed for the executable below
        dataId = f'mH1{mH1}_mH2{mH2}_mH3{mH3}'
        pathExecutionConfig = os.path.join(pathOutput, f'x_config_{dataId}.tsv')
        pathExecutionOutput = os.path.join(pathOutput, f'x_output_{dataId}.tsv')

        # creates contents of pathExecutionConfig
        config.checkCreatorNew(pathExecutionConfig, dictModelParams)

        # for subprocesses.run below
        runTRSM = [pathTRSM, '--BFB', str(BFB), '--Uni', str(Uni), '--STU', str(STU), '--Higgs', str(Higgs), pathExecutionOutput, 'check', pathExecutionConfig]

        # run the executable
        shell_output = subprocess.run(runTRSM, cwd=pathOutput)

        # calculate physical observables from the output from the executable (pathExecutionOutput)
        H1H2, H1H1, H2H2 = functions.ppXNPSM_massfree(pathExecutionOutput, 'mH1', 'mH2', 'mH3',  SM1, SM2,  normalizationSM=1)
        returnValue = (H1H2[mode])[0]

        # Sometimes the output is very small values such that it cannot represent them as floats, hence return as 0.
        if np.isnan(returnValue):
            returnValue = 0

        else: pass

        return returnValue

    def constraintTRSM(mH1, mH2, mH3, thetahS, thetahX, thetaSX, vs, vx, SM1, SM2, mode, pathTRSM, pathOutput):

        dictModelParams = {'mH1_lb': mH1, 'mH1_ub': mH1,
                           'mH2_lb': mH2, 'mH2_ub': mH2,
                           'mH3_lb': mH3, 'mH3_ub': mH3,
                           'thetahS_lb': thetahS, 'thetahS_ub': thetahS,
                           'thetahX_lb': thetahX, 'thetahX_ub': thetahX,
                           'thetaSX_lb': thetaSX, 'thetaSX_ub': thetaSX,
                           'vs_lb': vs, 'vs_ub': vs,
                           'vx_lb': vx, 'vx_ub': vx}

        dataId = f'mH1{mH1}_mH2{mH2}_mH3{mH3}'
        pathExecutionConfig = os.path.join(pathOutput, f'x_constraint_config_{dataId}.tsv')
        pathExecutionOutput = os.path.join(pathOutput, f'x_constraint_output_{dataId}.tsv')

        config.checkCreatorNew(pathExecutionConfig, dictModelParams)
        runTRSM = [pathTRSM, '--BFB', '1', '--Uni', '1', '--STU', '1', '--Higgs', '1', pathExecutionOutput, 'check', pathExecutionConfig]

        shell_output = subprocess.run(runTRSM, cwd=pathOutput)

        try:
            # if returnvalue == 1, then model parameters pass the constraints
            H1H2, H1H1, H2H2 = functions.ppXNPSM_massfree(pathExecutionOutput, 'mH1', 'mH2', 'mH3',  SM1, SM2,  normalizationSM=1)
            returnValue = 1

        # if outputfile (pathExecutionOutput) is empty, the parameters do not pass the constraints
        except pandas.errors.EmptyDataError:
            # if returnValue == -1, then model parameters fail constraints
            returnValue = -1

        return returnValue

    # we do not want to optimize mH1, mH2, mH3 and SM1, SM2, pathTRSM, pathOutput are strings required for TRSM
    def wrapInputBayesianOpt(mH1, mH2, mH3, SM1, SM2, mode, pathTRSM, pathOutput):
        def inputBayesianOpt(thetahS, thetahX, thetaSX, vs, vx):
            return TRSM(mH1, mH2, mH3, thetahS, thetahX, thetaSX, vs, vx, SM1, SM2, mode, pathTRSM, pathOutput)
        return inputBayesianOpt

    def wrapInputBayesianOptConstraint(mH1, mH2, mH3, SM1, SM2, mode, pathTRSM, pathOutput):
        def inputBayesianOptConstraint(thetahS, thetahX, thetaSX, vs, vx):
            return constraintTRSM(mH1, mH2, mH3, thetahS, thetahX, thetaSX, vs, vx, SM1, SM2, mode, pathTRSM, pathOutput)
        return inputBayesianOptConstraint

    from bayes_opt import BayesianOptimization
    from bayes_opt import UtilityFunction
    mH1 = 90
    mH2 = 125.09
    mH3 = 500
    SM1, SM2 = 'bb', 'gamgam'
    mode = 4

    black_box_function = wrapInputBayesianOpt(mH1, mH2, mH3, SM1, SM2, mode,
                                              '/aaa/bbb/ccc/ddd/eee/scannerS/ScannerS-master/build/TRSMBroken',
                                              '/aaa/bbb/ccc/ddd/eee/scannerS/ScannerS-master/build/sh-bbyy-pheno/testing/AtlasLimitsMax_BayesianOpt')

    black_box_constraint = wrapInputBayesianOptConstraint(mH1, mH2, mH3, SM1, SM2, mode,
                                              '/aaa/bbb/ccc/ddd/eee/scannerS/ScannerS-master/build/TRSMBroken',
                                              '/aaa/bbb/ccc/ddd/eee/scannerS/ScannerS-master/build/sh-bbyy-pheno/testing/AtlasLimitsMax_BayesianOpt')

    # Bounded region of parameter space
    pbounds = {'thetahS': (-np.pi/2, np.pi/2), 'thetahX': (-np.pi/2, np.pi/2), 'thetaSX': (-np.pi/2, np.pi/2),
               'vs': (1, 1000), 'vx': (1, 1000)}

    constraint = NonlinearConstraint(black_box_constraint, 0, np.inf)

    optimizer = BayesianOptimization(
        f=black_box_function,
        constraint=constraint,
        pbounds=pbounds,
        random_state=1,
        verbose=0,
        allow_duplicate_points=True,
    )

    init_points = 250
    n_iter = 5
    kind = "ucb"
    kappa='default'
    xi='default'

    print(f'running n_iter = {n_iter}, init_points = {init_points}, kind = {kind}, kappa = {kappa}, xi = {xi}')
    acquisition_function = UtilityFunction(kind=kind)
    optimizer.maximize(
        init_points=init_points,
        n_iter=n_iter,
        acquisition_function=acquisition_function
    )

    BayOutput = (optimizer.max)

    # IGNORE BELOW, WRITES OUTPUT FROM optimizer.max INTO A .json FILE AND ITERATIONS IN A .tsv FILE

    BayOutput['params']['mH1'] = mH1
    BayOutput['params']['mH2'] = mH2
    BayOutput['params']['mH3'] = mH3
    BayOutput['params']['mode'] = mode

    print(BayOutput)

    BayOutputToJson = {'BayOutput': BayOutput, 'init_points': init_points, 'n_iter': n_iter, 'kind': kind, 'kappa': kappa, 'xi':xi}

    import json
    # save settings used in BayesianOptimization and optimizer.maximize and other useful info
    with open("/aaa/bbb/ccc/ddd/eee/scannerS/ScannerS-master/build/sh-bbyy-pheno/testing/AtlasLimitsMax_BayesianOpt/x_BayOptOutput.json", "a") as outfile:
        json.dump(BayOutputToJson, outfile, indent=4)

    # clear old contents of iteration file
    with open(f'/aaa/bbb/ccc/ddd/eee/scannerS/ScannerS-master/build/sh-bbyy-pheno/testing/AtlasLimitsMax_BayesianOpt/x_{mH1}_{mH2}_{mH3}.tsv', 'w') as logs:
        pass

    # save iterations
    with open(f'/aaa/bbb/ccc/ddd/eee/scannerS/ScannerS-master/build/sh-bbyy-pheno/testing/AtlasLimitsMax_BayesianOpt/x_{mH1}_{mH2}_{mH3}.tsv', 'a') as logs:
        logs.write('iteration\ttarget\tconstraint\tmH1\tmH2\tmH3\tthetahS\tthetahX\tthetaSX\tvs\tvx\n')
        for i, res in enumerate(optimizer.res):
            #logs.write(f"Iteration {i}: \n\t{res}\n")
            logs.write(f'{i}\t{res["target"]}\t{res["constraint"]}\t{BayOutput["params"]["mH1"]}\t{BayOutput["params"]["mH2"]}\t{BayOutput["params"]["mH3"]}\t{res["params"]["thetahS"]}\t{res["params"]["thetahX"]}\t{res["params"]["thetaSX"]}\t{res["params"]["vs"]}\t{res["params"]["vx"]}\n')

I can provide more information about the executable and the modules I am using if needed.

Hey @IrHaque,
I tried to make a more minimal example, but I cannot reproduce your error -- see the snippet below.
Are you sure the function you are optimizing is deterministic?
Assuming that is the case, there could be an issue with our code that my example is too simple to produce. The two major sources of randomness are the GP fitting step and the random sampling step of the acquisition function optimization. You could check that the results produced there are identical.
If you can reduce your example significantly while still retaining the problem, I can also have another look.
import numpy as np
from bayes_opt import BayesianOptimization
import matplotlib.pyplot as plt
from scipy.optimize import NonlinearConstraint

maxs_ = []
for _ in range(10):
    def target_function(x, y):
        # Gardner is looking for the minimum, but this packages looks for maxima, thus the sign switch
        return np.cos(2*x)*np.cos(y) + np.sin(x)

    def constraint_function(x, y):
        return np.cos(x) * np.cos(y) - np.sin(x) * np.sin(y)

    constraint_limit = 0.5

    constraint = NonlinearConstraint(constraint_function, -np.inf, constraint_limit)

    # Bounded region of parameter space
    pbounds = {'x': (0, 6), 'y': (0, 6)}

    optimizer = BayesianOptimization(
        f=target_function,
        constraint=constraint,
        pbounds=pbounds,
        verbose=0, # verbose = 1 prints only when a maximum is observed, verbose = 0 is silent
        random_state=1,
    )

    optimizer.maximize(
        init_points=2,
        n_iter=5,
    )
    maxs_.append(optimizer.max['target'])
print(maxs_)

# Out: [1.7926580410885493, 1.7926580410885493, 1.7926580410885493, 1.7926580410885493, 1.7926580410885493, 1.7926580410885493, 1.7926580410885493, 1.7926580410885493, 1.7926580410885493, 1.7926580410885493

Thank you for taking your time checking out my issue @till-m.
I have run your code snippet and I do not see the same issue there. I am fairly sure my function is deterministic, though, I will have to double check that again.
I have been since trying locate the problem and reduce it to a more simple reproducible code snippet as you suggested, however, when I ran my code again with a smaller number of iterations and initial points (eg. init_points = 2, n_iter = 2), I now get the following error message:
Traceback (most recent call last):
  File "/afs/cern.ch/user/i/ihaque/.local/lib/python3.9/site-packages/bayes_opt/bayesian_optimization.py", line 369, in maximize
    x_probe = next(self._queue)
  File "/afs/cern.ch/user/i/ihaque/.local/lib/python3.9/site-packages/bayes_opt/bayesian_optimization.py", line 40, in __next__
    raise StopIteration("Queue is empty, no more objects to retrieve.")
StopIteration: Queue is empty, no more objects to retrieve.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/afs/cern.ch/user/i/ihaque/scannerS/ScannerS-master/build/sh-bbyy-pheno/testing/AtlasLimitsMax_BayesianOpt/tb.py", line 161, in <module>
    optimizer.maximize(
  File "/afs/cern.ch/user/i/ihaque/.local/lib/python3.9/site-packages/bayes_opt/bayesian_optimization.py", line 372, in maximize
    x_probe = self.suggest(util)
  File "/afs/cern.ch/user/i/ihaque/.local/lib/python3.9/site-packages/bayes_opt/bayesian_optimization.py", line 276, in suggest
    y_max_params=self._space.params_to_array(self._space.max()['params']))
TypeError: 'NoneType' object is not subscriptable

I will come back to you if I find what is causing the above.

I now get the following error message:

Quick guess, but it could be that none of the randomly sampled init_points are allowed since they don't fulfill the constraints (thus there is no maximum). Could you try raising the init_points and see if the problem persists?


Export loadGoogleFont to allow custom fonts to be downloaded from google

Allows custom fonts to be downloaded from Google Fonts using loadGoogleFont. Helps fix #13

Great idea, thanks @ninjamar !


Could not decode response body as JSON.

I'm using Laravel to send out messages but getting error: Could not decode response body as JSON.. Can anyone please help?

Please re-install CURL with proper CA bundles on server.


[TC-WNCV-2.4] Yaml need update - Type Attribute with server as DUT

Problem

Need feature map reading or PICS inputs
Need Bit reading and checking for finalization of this test
Need PICs to be added

Proposed Solution
should be easy to finish once #13024 is done

not stale


Add simple-cipher exercise

There is something weird with this PR. You pushed solutions for allergies and Armstrong numbers into the stub files

Sorry, fixed!


Fix typos.

Hello !
Thanks for the binding.
What does this PR do?
Fix typos in documentation.
PR checklist
Please check if your PR fulfills the following requirements:

[x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
[x] Have you read the contributing guidelines?
[x] Have you made sure that the title is accurate and descriptive of the changes?

Have a nice day !

Thanks for your time !


Counter in address bar results is wrong for more than 5 results

if there are more results than 5, the address bar still shows "5".

Adressbar

Overview

fixed with #69


Hyposprays Draw from Jugs

About the PR

I changed it so that you can toggle the hypospray between the current default, which is injecting all targets, and the new mode which allows you to draw from jugs/beakers while still allowing you to inject mobs.
Why / Balance

It feels awkward requiring the hypospray user to pick up each jug of medicine they want to use.
Technical details

First off, apologies for the moving around of files making it harder to review the changes. The main reason I moved files around was because I was getting some conflicts trying to access specific component fields because of how everything was so mixed around everywhere.
I updated the Hypospray code to be more aligned with how Injectors work/were organized in the codebase and named. I'm not sure what the plans were for the hypospray, but calling the Hypospray system the "ChemistrySystem" didn't quite feel right. Now anything to do with the Hypospray is just "HyposprayComponent", "HypospraySystem", or "SharedHypospray..." etc.
I put the code relevant to mode toggling into the new SharedHypospraySystem.cs file.
In HypospraySystem.cs, I added a "UseHypospray" function that determines whether the target is eligible using the previous "onlyMobs" check function that existed to now determine whether you draw or inject from the target. In the new toggle mode, you're only allowed to draw from targets that are not mobs, meaning beakers, jugs, drinks, etc.
In HypospraySystem.cs, I also updated every instance of "Popup.PopupCursor()" to use "Popup.PopupEntity()" instead so that the locale messages would appear on the target you click rather than wherever your cursor may be at the time.
In HypospraySystem.cs, I added a TryDraw() function that is just taken from the InjectorSystem but without the possibility of drawing from bloodstreams. A nullable BloodstreamComponent is still included in the function because _solutionContainers.Draw() requires a check for a BloodstreamComponent for some reason, it's still just impossible to draw from mobs.
I removed ChemistryMixer.cs entirely because it didn't seem to be involved with anything, chemicals still mix fine in the hypospray without it. Not sure what it was for, I hope someone more familiar with the codebase can let me know if I did anything weird. This is my biggest change to the codebase so far. I just moved things around, removed stuff that seemed completely unused, and added things that the tests complained about until the game ran with no crashes involved.
Media

[ X ] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

https://github.com/space-wizards/space-station-14/assets/58439124/4eb58186-1f32-4fa9-bf10-f971151698aa
Breaking changes

HyposprayComponent's onlyMobs field changed to a HyposprayToggleMode enum
HyposprayCompnent's CurrentVolume/TotalVolume were removed in favor of SolutionComponent's Volume/MaxVolume
Most of the hypospray files moved around and renamed...
Changelog

:cl:

tweak: Hyposprays can now be toggled to draw from solution containers like jugs and beakers.

I was waiting SO eagerly for this change. Thank you so much.

I've made all the changes requested, and I believe the test fail isn't related to anything I did since it's about an issue with lizard audio.

can you draw blood with this?

can you draw blood with this?

You can only draw from non-mobs.

this is why we don't trust web edits

I.... I have no clue what that build & test debug failure but it seems irrelevant

I don't reaaally know what else to do at this point...

Does this effect hypopens and borghypo?

Does this effect hypopens and borghypo?

yes


Replace requests lib with aiohttp for non-blocking appointment fetching

The function that fetches appointments was blocking the main thread, mainly
because it was using the requests library that does not support
async/await.
That meant that during the get_appointment duration (which
was ~ the latency of 2 requests + 1 second of sleep) the websocket server
was not able to attend new connections and clients would need to wait until the thread was freed to establish connection.
Moving to the aiohttp library constantly frees the main thread so it is able to attend new
incoming connections, thus making the experience more responsive for clients

Hey Javier, sorry for waiting so long to handle this pull request. I did not even see it for a long time. I have implemented your changes as-is in a newer version for the script.
Thank you for taking the time to make this pull request. I really appreciate it.


Implement New Health Bar for Main Game Screen

Description
Task: [Implement New Health Bar for Main Game Screen] .
Feature: #10
The previous health bar provided in the initial codebase will be replaced with a more appropriate health bar that suits the overall game aesthetic better. New textures, sprites, and pixel art will be designed and applied within the _____ of the Codebase. This implementation should reflect any of the actions completed by other teams that could increase or decrease the health of the main character (combat, item consumption, level up etc.).
Example

Upon the character losing health in battle, or gaining health through levelling up or consuming items, the health bar will dynamically update its appearance to appropriately reflect this.

Dependencies

[x] Dependent on the Damage Implementation by Combat Team/ Enemy Team
[x] Dependent on the Consumable Implementation by Item/Inventory Team
[x] Dependent on the Main Player Implementation by Animal (Player) Team

Milestones
List of steps that need to be completed for this task.

[x] Complete the New Pixel Design for the Health Bar (Aug. 16)
[x] Learn the Implementations within the Codebase Related to the Health Bar (Aug. 20)
[x] Create the Sprite Required for the Health Bar to Dynamically Update (Aug. 23)
[x] Create and Verify Tests to Ensure Correct Functionality for Health Bar (Aug. 23)

Completion Deadline: Aug. 23
Documentation

TBC

Member

Christian Almario (@ChristianMario4 ) (CAllMario101)

Feature implemented and pushed to main.


Identified 0 scans to be processed

When I run the VulnWhisper command against my nessus instance, it connects but shows 0 scan to be processed.

Issue was I was using the program against an instance that was moved, reinstalled NESSUS and it worked.


Toggle math environments

Additions
Added an intention on any math environment to toggle it to a different math environment.
Changes
This includes the inline <-> display toggle, so the intention that does just that is removed.
To do

[x] When next character after cursor is one of the $ $, intention should be triggered (maybe also for other environments?)
[x] Formatting (see comment)
[x] Automatically focus combo box

Test file
\documentclass[11pt]{article}

\usepackage{amsmath}

\begin{document}
    Toggle $y = x^2$ from inline to whatever.

    Cases and split environments stay intact.
    \begin{align*}
        \begin{cases}
            1 & x > 0 \\
            0 & x \le 0
        \end{cases}
    \end{align*}

    Toggle the following to a one-line environment see the alignment characters disappear:
    \begin{align*}
        x &= y \\
        &= x \\
        &= y \\
        &= x
    \end{align*}
\end{document}

Oops I clicked a weird button and now your review has been reset. Sorry @PHPirates.

I know; this is because it's the same behaviour as for the original inline/display toggle intention. I started from that one and only added the other environments.
Maybe you have an idea? From what I remember the intention is triggered when the cursor is in a math environment. (Though I'm not sure why it is triggered at the beginning of the environment, but I suppose that has to do with the definition of being in a (math) environment.)

It's fine.


Typo in output variables for the Open AI service's primary and secondary access keys

Please provide us with the following information:

This issue is for a: (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

the output variables for the Open AI service primary and secondary access keys are currently being set to Open AI endpoint

Any log messages given by the failure

NA

Expected/desired behavior

The output variables should be set to the primary and secondary access keys of the Open AI service

OS and Version?

NA

Versions

Mention any other details that might be useful

Thanks! We'll be in touch soon.

PR for fix: https://github.com/Azure-Samples/container-apps-openai/pull/26


Crystal cannot detect OpenSSL version without pkg-config

Bug Report
Crystal's openss/lib_ssl.pc is incapable of deriving the OpenSSL library version if the operating system, such as FreeBSD 13.0, does not provide OpenSSL as pkg-config module. FreeBSD 13.0 provides OpenSSL 1.1.1k by default, but does not install pkg-config's pc files, so that pkg-config --silence-errors --modversion libssl fails on FreeBSD. Same story for libcrypto.
A fallback of 0.0.0 is unsuitable because then lib_ssl.cr tries to reference all sorts of deprecated symbols (such as SSL_library_init()) that were removed from the library proper, and instead get aliased to newer and/or renamed symbols by C header files in recent OpenSSL versions, for instance through #define SSLv23_method TLS_method or
/usr/include/openssl/evp.h
543:# define EVP_MD_CTX_create()     EVP_MD_CTX_new()

The fallbacks in lib_ssl.pc should be extended to grep the headers, or run openssl version -v and look at the second token printed (and possibly also the first to figure separate numbering worlds, for instance, LibreSSL).
The problematic spot appears to be line 12 here, while line 24 may survive:
     1  require "./lib_crypto"
     2
     3  {% if flag?(:without_openssl) %}
     4    {% raise "The `without_openssl` flag is preventing you to use the LibSSL module" %}
     5  {% end %}
     6
     7  {% begin %}
     8    lib LibSSL
     9      {% from_libressl = (`hash pkg-config 2> /dev/null || printf %s false` != "false") &&
    10                         (`test -f $(pkg-config --silence-errors --variable=includedir libssl)/openssl/opensslv.h || printf %s false` != "false") &&
    11                         (`printf "#include <openssl/opensslv.h>\nLIBRESSL_VERSION_NUMBER" | ${CC:-cc} $(pkg-config --cflags --silence-errors libssl || true) -E -`.chomp.split('\n').last != "LIBRESSL_VERSION_NUMBER") %}
    12      {% ssl_version = `hash pkg-config 2> /dev/null && pkg-config --silence-errors --modversion libssl || printf %s 0.0.0`.split.last.gsub(/[^0-9.]/, "") %}
    13
...
    24  @[Link(ldflags: "`command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libssl || printf %s '-lssl -lcrypto'`")]

crystal -v prints:
Crystal 1.1.1 ()

LLVM: 10.0.1
Default target: x86_64-portbld-freebsd13.0

Downstream reference bug report: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257658

Worth noting this is not isolated to FreeBSD. Similar behaviour is evident on NixOS and other distro's where pkg-config may not be available to the compiler. Had quite the fun debugging session discovering this.
This occurs due to macros in LibSSL and LibCrypto both shelling out to pkg-config and failing silently when not available. There is mention of this in NOTICE.md, but definitely not immediately obvious.
If reworking that discovery process is not possible, perhaps a compiler warning could appear when requiring these libs, but required dependencies are not available?

How could this be improved? We need to discover the available library version which is going to be linked against.
As far as I understand is, pkg-config is the standard tool for doing that.
If that is not available, I'm not sure what we can really do. Is there another standardized way to discover library versions?
Without any other options, the only solution appears to be explicitly specifying the library versions. This can simply be patched in like in https://reviews.freebsd.org/D31435. A less fragile alternative could be to allow this configuration via environment variables.

Possibly a wild approach, but since it's available within the lib (see SSLeay_version), what about linking to and extracting this within a Macro#run context? This would allow the rest of the existing macro expansion to remain as is.

How could this be improved? We need to discover the available library version which is going to be linked against.
As far as I understand is, pkg-config is the standard tool for doing that.
If that is not available, I'm not sure what we can really do. Is there another standardized way to discover library versions?
Without any other options, the only solution appears to be explicitly specifying the library versions. This can simply be patched in like in https://reviews.freebsd.org/D31435. A less fragile alternative could be to allow this configuration via environment variables.

Assuming Crystal will only want to go look for one OpenSSL interface and not care too much about multiple installed OpenSSL versions (if you have two openssl installs on FreeBSD, meaning one in /usr/ and one in /usr/local, you'll have pkg-config for the second, so no worries there for now).
Answering the question, OpenSSL has at least two documented interface sets to obtain the version:

one interface is in the C header files, openssl/opensslv.h has a #define OPENSSL_VERSION_NUMBER (and ..._TEXT),
one is the programmatic interface to call into the library and obtain the number, functions OpenSSL_version_num() and OpenSSL_version(). The C prototypes are in openssl/crypto.h.

Ideally, these versions will match, in practice you will likely encounter situations where you get some versions 0x01010103f  at Crystal's compile time and find that the run-time DSO (libcrypto.so and libopenssl.so) have higher versions such as 0x0101010bf because someone updated OpenSSL to a newer patch level (in this example, from 1.1.1c to 1.1.1k) without recompiling Crystal.
As an upstream user, Crystal may not want to support too old OpenSSL versions (those that are end-of-life) and just require 1.1.1 or 1.1.0 or newer, which simplifies matters quite a bit.
HTH, if not, feel free to ask.    Note that I am not a Crystal programmer, I was helping a fellow project member out on solving Crystal build issues with getting a Crystal application ported to FreeBSD, with what FreeBSD calls a third-party port.

As an upstream user, Crystal may not want to support too old OpenSSL versions (those that are end-of-life) and just require 1.1.1 or 1.1.0 or newer, which simplifies matters quite a bit.

This is a really good point. Are there any supported platforms left that still use OpenSSL 0.9.x or 1.0.x at this point? And even if there are, would they likely be affected by changing the default fallback to 1.0.0 or 1.1.1 (assuming they would likely be linking via pkg-config)

libssl1.0.0 is shipped on Ubuntu 16.04. It has long-term support until 2024, so this ain't going away soon.

libssl1.0.0 is shipped on Ubuntu 16.04. It has long-term support until 2024, so this ain't going away soon.

Remarks:

The OpenSSL version is NOT reflected in file or package names! Ubuntu calls the package libssl1.0.0 and installs libcrypto.so.1.0.0, but as of an up-to-date Ubuntu 20.04 LTS, that's a stale EOL OpenSSL 1.0.2n of 7 Dec 2017.
Similarly, libssl1.1 contains a stale 1.1.1f of 31 Mar 2020. How well Ubuntu patched out security issues, I did not check. There are differences between 1.1.0 and 1.1.1 (TLS v1.3!)
There is some documentation on the web as to the DSO versioning around ELF SONAME and whatnot. Do not take libtool documentation as universal, libtool creates its own version numbering world. In practice, ELF SONAME and ELF NEEDED tag matter, and Ubuntu's OpenSSL packaging makes a mess of all conventions.
You seriously do NOT want to support old LTS operating systems with new language releases. That is going to be a maintenance nightmare for no good. Ubuntu are not going to import Crystal into their existing LTS releases, so why bother.
Be sure to check with OpenSSL 3.0.0 betas (they consider them release candidates) before the next Crystal release,
https://www.openssl.org/docs/manmaster/man7/migration_guide.html seems a useful starting point for this entire endeavour (including older upgrades between 1.1.0 and 1.1.1 for instance).
Finally remember that OpenSSL 1.1.1 is almost three years old.

As an upstream user, Crystal may not want to support too old OpenSSL versions (those that are end-of-life) and just require 1.1.1 or 1.1.0 or newer, which simplifies matters quite a bit.

This is a really good point. Are there any supported platforms left that still use OpenSSL 0.9.x or 1.0.x at this point? And even if there are, would they likely be affected by changing the default fallback to 1.0.0 or 1.1.1 (assuming they would likely be linking via pkg-config)

The question is if some operating system that ships exactly one version of OpenSSL is going to advertise it as package or rather considers it an integral part of the system.

There must be something else/additional at play.
Consider this (on Debian GNU/Linux):
(1) When neither OpenSSL nor pkg-config are installed (prints error as expected):
$ crystal build a.cr

/usr/bin/ld: cannot find -lssl (this usually means you need to install the development package for libssl)
/usr/bin/ld: cannot find -lcrypto (this usually means you need to install the development package for libcrypto)
/usr/bin/ld: cannot find -lcrypto (this usually means you need to install the development package for libcrypto)

(It prints -lcrypto twice because it's actually included twice on the compiler line)
(2) When OpenSSL is installed, but pkg-config isn't (fails without correct/user-friendly error message):
$ crystal build a.cr

/usr/bin/ld: _main.o: in function `__crystal_main':
crystal/src/openssl/lib_ssl.cr:282: undefined reference to `SSL_library_init'
/usr/bin/ld: crystal/src/openssl/lib_ssl.cr:282: undefined reference to `SSL_load_error_strings'
/usr/bin/ld: crystal/src/openssl/lib_ssl.cr:282: undefined reference to `OPENSSL_add_all_algorithms_noconf'
/usr/bin/ld: crystal/src/openssl/lib_ssl.cr:282: undefined reference to `ERR_load_crypto_strings'

(3) When OpenSSL and pkg-config are installed (compiles fine as expected):
$ crystal build a.cr
$ # (It compiled)

What's strange is that this is the compiler line:
Error: execution of command failed with code: 1: `cc "${@}" -o a  -rdynamic -Lcrystal -lyaml -lz `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libssl || printf %s '-lssl -lcrypto'` `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libcrypto || printf %s '-lcrypto'` -lpcre -lm -lgc -lpthread -levent -lrt -ldl

And if pkg-config is available, in default OS installs the ssl-related flags end up being: -lssl -lcrypto -lcrypto.
But if it is not available, due to default values in the command they also end up being: -lssl -lcrypto -lcrypto.
So they're identical, yet it doesn't work if pkg-config is not installed.
So it seems like availability of pkg-config has some other influence which is not being recognized with the current checks?

Could you add a test for pkg-config binary? It could solve the issue on systems where pkg-config is supported by OpenSSL, but the pkg-config binary is not installed.

FreeBSD 14.0 is in alpha/beta builds atm, so this issue has cropped up again.
15.0-CURRENT now sees OpenSSL 3.0.10 built-in, also.

Related: #7244


Record stream files under sidecar directory is not uploaded

Bill of Materials or CLI Version
No response
Execution Environment
JUnit Extensions
Slf4j Logging Implementation
None
To Reproduce
Run current helm chart

Describe the bug
Files under /opt/hgcapp/recordStreams/record0.0.x/sidebar directory were not uploaded to minio storage
Describe the expected behavior
Should upload sidecar file too
Whole JUnit/CLI Logs
N/A

Additional Context
No response

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


Build issue

Hello, there appears to be a build issue. Based on your knowledge of the code, would you be willing to create a docker-compose.yml/Dockerfile to help build on VM? If not, give me 24 hours to learn code and I’ll submit a PR for us. Thank you in advance for your willingness to help.

NH603

I’m still struggling to get app to launch. Whether in Docker or locally. Can you perhaps share node_modules and var/www folders or as much as you can? Any help would be much appreciated.
Thanks again

On Jan 30, 2019, at 11:24 PM, Zach<EMAIL_ADDRESS>wrote:
Hello All,
Just a quick update. I’ve tailored the repo to now successfully build all required docker images, but I continue to struggle to actually access the main app/frontend remotely. While I’m working through that, I’m happy to push what I have so far. Otherwise perhaps you’ve made some more progress than I? ;)

On Jan 30, 2019, at 6:52 AM, Manu González<EMAIL_ADDRESS>wrote:
Hello @NH603, I could wrap this as a Docker container for deploying it easily, but I would need a couple of days to sort it out. If you can wait, I'll ping you when it's ready.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

node_modules directory is created when running npm install. Do you still get the SQLSTATE[HY000] [2002] Connection refused error? if so, I think you still have a DB connection issue (not related to the project). If you get any new error message when deploying, please let me know.

Hi Amandris,
Thank you for the reply. Good news, I was successful in getting the application to load!
However, when entering in the following command, I received a response about "No key/secret.." - see copy from command line below. Is this intended? I used the default  secret you originally had shared in parameters.yml.dist.
"app@XXXXXX:~/directory/app$ bin/console bot:trade
No key/secret/client_idapp@XXXXXX:~/directory/app"
Also, I had enable Binance as the first exchange. Does it take awhile for the Ticker & Differences to populate with api info?
Thanks for all the support! I'm excited to actually start using this.

Hi Amandris,
I was successful in getting the "bin/console bot:trade" command to work, and while the "Ticker" now populates in the app, I'm receiving the following error once the command is inserted into the command line. Do you have any recommendations on how to resolve?
"app@XXXXXX:~/directory/app$ bin/console bot:trade
05/02/2019 07:29:59
bitstamp   Ask:3,418.07  Bid:3,418.06
okcoin     Ask:3,416.03  Bid:3,417.72
binance    Ask:3,465.98  Bid:3,465.95
In ItbitService.php line 148:
Cannot use object of type stdClass as array"
Thank you in advance for your help on this!

I close this issue and create a new one with your last message.

Hi
I have the same problem:
bin/console bot:trade result in No key/secret/client_id
I have set enable: false by bitstamp on config.yml


Multipath descriptors support

Multipath descriptors were proposed as a way to optimize the descriptor backup for the common case of having two derivation chains (one for receiving addresses, one for change).
A BIP was proposed a couple months ago: https://github.com/bitcoin/bips/pull/1354. There is an implementation in Bitcoin Core at https://github.com/bitcoin/bitcoin/pull/22838.
It was previously discussed at length in https://github.com/bitcoin/bitcoin/issues/17190.
I think it would be helpful for us to support them. What do you think?

Yes, I do think we should support them.

I'm working on something. It's a quite invasive change, i'm adding a new variant of DescriptorPublicKey that contains a DescriptorMultiXKey. I think i'll have to change some interfaces as some assumptions necessarily don't hold anymore, for instance
https://github.com/rust-bitcoin/rust-miniscript/blob/9ea094cf825e7775e51848d7f32a391b990e3bed/src/descriptor/key.rs#L406-L411

I've opened a WIP pull request to discuss the approach. https://github.com/rust-bitcoin/rust-miniscript/pull/470


Weird page modification state changes

to reproduce:

go to an unmodified page with pieces in a box
edit one of the pieces -- the piece is marked as modified but the page status remains unmodified (WRONG)
Revert the change to the piece -- the piece is correctly marked as unmodified but the page is now marked modified (WRONG)

Fixed by b73128029534e314a6581853ec6be854ee99bf7b


Compose Navigation

Is there still any plan to migrate to Compose Navigation?
I noticed that the following issue has been closed a few months ago, but I don't see any implementation in the code base:
https://github.com/atick-faisal/Jetpack-Compose-Starter/issues/16
Thanks.

Hi! I considered migrating to compose navigation in the past. But compared to fragment navigation, it felt like a downgrade. I personally do not like how the compose navigation is implemented (Hence the issue was closed). That being said, moving forward, I will migrate this to compose navigation soon. I use this template heavily for all my projects and do not want to carry legacy navigation code. Thanks for checking out. I will close this issue once I implement the compose navigation.

@atick-faisal Thanks for your response and thanks for considering the migration. Just as a reference, you might want to take a look at the following project, and that how the navigation has been implemented there:
https://github.com/android/nowinandroid

By the way, is there any ETA for the migration?

Hi! I have been following the NowInAndroid project closely and I copied and modified several things from it into this project. I look forward to using it for the navigation setup too. Thanks for sharing though. Right now I don't have a fixed eta for it. I hope to do it within the following week.

Hi, @armond1978. Compose navigation is now available. Feel free to check it out.


MissingPluginsException in flutter-test-plugins [kirkstone]

Hi,
I wanted to try out your demo-application from your meta-flutter layer on an i.MX 8M Plus on a [Toradex Verdin Board]. The image builds fine and works as expected, but when it comes to running the linux_plugins demo application using:
flutter-pi --release linux_plugins/3.3.10/release
from the boards terminal, selecting for instance 'Misc' from the main menu, and switching to any one tab either displays a MissingPluginException or prints an error message to the terminal. It seems that the Flutter plugins have not been installed to the image.
Moreover, I cannot use the mouse cursor, since moving the mouse immediately leads flutter-pi to printing an error message to the terminal, as well.
I was trying to increase the engine version to a more recent one, to see if this has any influence on the demo applications, setting FLUTTER_SDK_TAG = "AUTOINC", but this led the yocto build to fail due to non-applicable patches.
Can you please give some advice on how to get the demo app running correctly?

@ardera Hannes can comment on cursor behavior.
@TWeidi One important thing to note is around 1P Linux plugins.  These are not implicitly supported, nor will work out of the box with a Linux embedder.  They will work for a host build of the Linux GTK embedder.  When Flutter indicates it supports Linux with their plugin, it really means it only supports the Flutter Linux GTK embedder.  That said adding missing platform channel support in flutter-pi or homescreen/flutter-auto is not a difficult task.  Are there specific plugins which you want/need support for?  Currently 3.3.10 is the latest build available.  3.7+ is in the works.  The problems you are seeing are most likely 100% 1P plugin issues.

In addition if you try to run your 1P Linux plugins in a debug build, it will appear to work.  This is a Flutter bug.  They are not supposed to work according to Stuart Morgan.

Hello Joel,
thank you very much for your quick reply. Sorry to say, but to me it is not clear what you mean with "1P Linux plugins" as I could not find a source on the web that explains that term in this context. I am wondering why plugins like the "shared_preferences", which seems to be written purely in dart language, cannot be directly integrated in the image, but admittedly I am fairly new to the flutter ecosystem.
Actually, I would really need the flutter_riverpod and the ffi plugins. Since you mentioned that adding platform channel support in flutter-pi or homescreen/flutter-auto is not a difficult task, can you show me some example implementation or hint me to some resources that demonstrate how to achieve this?
Thank you and kind regards
Thomas

Moreover, I cannot use the mouse cursor, since moving the mouse immediately leads flutter-pi to printing an error message to the terminal, as well.

Flutter-pi only supports hardware mouse cursors right now. Some devices don't have hardware mouse cursor support, in which case an error message will be printed. Though I have some updates to mouse cursor support in feature/gstreamer-player-from-pipeline that might make it work on iMX as well.
In the meantime you can use https://gist.github.com/ardera/e7ddf7c8e477d258a26dfa9c40002626 to get a software mouse cursor :)

@TWeidi
In the case of flutter-pi the plugins are static and implemented in C.
In the case of home screen/flutter-auto the plugins are currently static.  I just released the quarters release, it had a few more plugins.
https://github.com/toyota-connected/ivi-homescreen/tree/main/shell/static_plugins
The process is run in an embedder, observe the channel failures.  Cross check the dart code, implement following known pattern.  This is if your flutter plugins require/have a native component.
Ask if you get stuck.
The pattern with meta-flutter is to use a bbappend recipe overriding repo url.  Point it to your fork.

Feel free to re-open if needed be


TypeScript module resolution in fixtures

Hey @jeanfortheweb,
Firstly thanks so much for an awesome library, top notch work!! 💯
Having an issue where, in my project, I have set in tsconfig.json the property: "baseUrl": "./src", means that typeorm-fixture-builder is struggling to resolve entities.
My fixture may look like this for example:
import { payeeFixture } from 'entities/Payee.entity';

export const payees = [payeeFixture(), payeeFixture(), payeeFixture()];

where entities is a folder that could be resolved by eg ../../entities/Payee.entity
But console ouput when I try to install fixtures:
$ /Users/harvey.appleton/Documents/***/***/node_modules/.bin/fixtures install 'src/fixtures/demo/**/*.bundle.ts'
✔ Database connected
ℹ Database reset skipped
Error: Cannot find module 'entities/Payee.entity'
Require stack:
- /Users/harvey.appleton/Documents/***/***/src/fixtures/demo/payee.bundle.ts
- /Users/harvey.appleton/Documents/***/***/node_modules/typeorm-fixture-builder/lib/cjs/cli/task/collect.js
- /Users/harvey.appleton/Documents/***/***/node_modules/typeorm-fixture-builder/lib/cjs/cli/executor.js
- /Users/harvey.appleton/Documents/***/***/node_modules/typeorm-fixture-builder/lib/cjs/cli.js
- /Users/harvey.appleton/Documents/***/***/node_modules/typeorm-fixture-builder/bin/cli.js
error Command failed with exit code 1.

(I've *** out some folder names).
Any advice/ideas as to how I could keep my non-relative modules? I know the work-around would be to change the imports to be relative, but wondering if there's a better way we could fix it.
Cheers!

Hey harvey, if I get this right, I guess, the cli does not know about the custom paths. I feel like https://www.npmjs.com/package/tsconfig-paths could help there, because it makes your baseURL/aliases known to the node/ts-node process. Maybe, we could even load this by default in the CLI.
I'll have a look at it asap, but in the meantime, you could try to use it?

Hey @jeanfortheweb ! thanks for the recommendation.
The way I managed to make it work was this in my package.json:
    "fixtures:demo": "node --require ./node_modules/tsconfig-paths/register ./node_modules/typeorm-fixture-builder/bin/cli.js -- install src/fixtures/demo/**/*.bundle.ts",

Which basically makes node require tsconfig-paths/register, which resolves to the tsconfig.json in my project root. It then calls the cli.js file from the typeorm-fixture-builder package in my node_modules folder.
Like you said, perhaps it would be good to include tsconfig-paths/register by default in the cli file? 🤔

Yes I think I'll make a patch for that solution, since we already using another one!

Just published 2.2.2 which includes tsconfig-paths by default. Please let me know if it's working as intended :)

Works great, thanks @jeanfortheweb ! 🎉


cards details in developer mode / ebsi profile with jwt_vc

remove Description, claims, which are for cards details for users
we just need the Format and header and payload

this is OIDC4CVI test 1


WARCStreamTransform can experience ERR_MULTIPLE_CALLBACK error

https://github.com/N0taN3rd/node-warc/blob/be3897198847fa49023ca4d09f09c0010dd98540/lib/parsers/warcStreamTransform.js#L110-L115
since _consumeChunk calls done, i think this should be:
  _flush (done) {
    if (this.buffered) {
      this._consumeChunk(this.buffered, done, true)
    } else {
      done()
    }
  }

Hey, I just made this change because I ran into the exact error you are talking about. I was using their stream demo code and this fixed it.
106    * @desc Flushes any remaining data 107    * @param {function} done - Function used to indicate we are done processing the chunk 108    * @private 109    */ 110     _flush (done) { 111     if (this.buffered) { 112       this._consumeChunk(this.buffered, done, true) 113     } else { 114       done() 115     } 116   } 117 118 } 119 120 /**

It looks like this repo is no longer maintained. I published a fork with this fix here, NPM package here.
npm install --save @context-labs/node-warc


mayactl volume stats panics

Is this a BUG REPORT or FEATURE REQUEST?
Choose one: BUG REPORT or FEATURE REQUEST
BUG REPORT

What happened:
mayactl volume stats panics
What you expected to happen:
It should not panic.
How to reproduce it (as minimally and precisely as possible):
Run mayactl volume stats --volname=<volname> and you can get the following error
panic: runtime error: index out of range
Anything else we need to know?:
This is the output of curl  http://<IP_ADDRESS>:5656/latest/volumes/info
{"metadata":{"annotations":{"vsm.openebs.io/cluster-ips":"<IP_ADDRESS>","vsm.openebs.io/iqn":"iqn.2016-09.com.openebs.jiva:v123","openebs.io/storage-pool":"default","openebs.io/jiva-replica-count":"2","vsm.openebs.io/volume-size":"1G","vsm.openebs.io/replica-ips":"<IP_ADDRESS>","vsm.openebs.io/controller-status":"Running","openebs.io/jiva-controller-status":"Running","openebs.io/volume-monitor":"false","vsm.openebs.io/replica-count":"2","vsm.openebs.io/controller-ips":"<IP_ADDRESS>","openebs.io/jiva-controller-ips":"<IP_ADDRESS>","openebs.io/jiva-replica-status":"Running","vsm.openebs.io/targetportals":"<IP_ADDRESS>:3260","openebs.io/jiva-target-portal":"<IP_ADDRESS>:3260","openebs.io/jiva-controller-cluster-ip":"<IP_ADDRESS>","deployment.kubernetes.io/revision":"1","openebs.io/capacity":"1G","openebs.io/jiva-replica-ips":"<IP_ADDRESS>","vsm.openebs.io/replica-status":"Running","openebs.io/volume-type":"jiva","openebs.io/jiva-iqn":"iqn.2016-09.com.openebs.jiva:v123"},"creationTimestamp":null,"labels":{},"name":"v123"},"status":{"Message":"","Phase":"","Reason":""}}

looks like response is not picking the ip of the both the replicas.
Environment:

kubectl get pods -o wide

NAME                                   READY     STATUS    RESTARTS   AGE       IP          NODE
maya-apiserver-1130966972-p98nt        1/1       Running   0          56m       <IP_ADDRESS>   kubeminion-02
openebs-provisioner-2382027337-m91rp   1/1       Running   0          56m       <IP_ADDRESS>   kubeminion-01
v123-ctrl-1652046740-gjrmv             1/1       Running   0          54m       <IP_ADDRESS>   kubeminion-03
v123-rep-3072696740-1h0gb              1/1       Running   0          54m       <IP_ADDRESS>   kubeminion-03
v123-rep-3072696740-b5bq7              1/1       Running   0          54m       <IP_ADDRESS>   kubeminion-01

This issue is fixed as part of moving the cli to COBRA. Fix will be available in 0.6.


IDF 4.4 compatibility problem (MEGH-4130)

With latest ESP IDF 4.4,  any IDF commands: set-target, build, menuconfig, will cause error. Examples used are switch and led_light.
4 problems were found in the manifest file /Users/user1/esp/esp-rainmaker/components/esp_rainmaker/idf_component.yml:
Invalid manifest format
Invalid dependency format
Dependency version spec format is invalid
Unknown keys in dependency details: rules
CMake Error at /Users/user1/esp/esp-idf/tools/cmake/build.cmake:452 (message):
Call Stack (most recent call first):
  /Users/user1/esp/esp-idf/tools/cmake/project.cmake:384 (idf_build_process)
  CMakeLists.txt:16 (project)

-- Configuring incomplete, errors occurred!

@eos1d3 , can you upgrade your idf component manager using pip install --upgrade idf-component-manager and retry?

Hi, just tested with the above command, it fixes the problem now. Why is the command needed as other IDF versions do not need it?

@eos1d3 ESP IDF versions before v4.4 do not use component manager by default and hence, the manifest file gets ignored. idf v5.0 already has the latest component manager python package and so, that too works fine. v4.4 had some changes that caused these failures and they were eventually fixed after the release, hence the issues and the requirement if manually updating it.

Thanks for your help!


[Automated] Update eventing-istio-eventing nightly

/assign @knative/eventing-wg-leads
/cc @knative/eventing-wg-leads
Produced via:
for x in eventing-core.yaml eventing-crds.yaml in-memory-channel.yaml mt-channel-broker.yaml; do
  curl https://storage.googleapis.com/knative-nightly/eventing/latest/$x > ${GITHUB_WORKSPACE}/./third_party/eventing-latest/$x
done

Details:

/approve


Speech Recognition wont start a second time

Hello @PingAK9, awesome work and great sample!
I've deployed this to my phone with the following configuration:

Phone: Pixel XL (first generation)
Unity: 2017.4.3f1
Android API Level: 27

The application runs exactly as expected the first time I press the microphone button. Speech is understood and spoken back properly using TTS. However, the second time I press the microphone button it doesn't work. Android makes the Beep sound like it is starting to listen, but then it immediately makes another double-beep failure sound and nothing is recognized.
Any idea what could be wrong or how I could fix it?
Thanks!!!

Hello @jbienzms
As your describe, you choose don't show android native popup, In this case. you must "press and hold" red button.
when i test this bug. i find out a new bug in android (i forgot hide loading screen when  nothing is recognized). Can you update new version.
Thank you!

Hello @jbienzms
As your describe, you choose don't show android native popup, In this case. you must "press and hold" red button.
when i test this bug. i find out a new bug in android (i forgot hide loading screen when nothing is recognized). Can you update new version.
Thank you!

This is happening to me also on IOS iphone 7

Hello @yosi1202
SR. I don't have iPhone7, But when I test on Ipadmini 3. It works well
All of my code is open, Can you check it yourself.


subsys: shell rework

Me and @nordic-krch  have reworked Zephyr shell Task 8872.
New one has a lot of useful features that were missing in the old one.
We have changed commands concept.

Shell commands are now organized in a tree structure and grouped into the following types:

Root command (level 0): Kept in the section variable area. Root command is always static.
Static subcommand (level > 0): Number and syntax must be known during compile time. Kept in the software module.
Dynamic subcommand (level > 0): Number and syntax does not need to be known during compile time. Created in the software module.

On one command level all commands must be the same type: static or dynamic.
An example usage of dynamic commands concept is described here:
https://devzone.nordicsemi.com/b/blog/posts/new-command-line-interface-part-1

Commands execution
Each command or subcommand on each level can either have or not have a handler. Shell executes the handler that is found deepest in the command tree and further subcommands (without a handler) are passed as arguments. Characters within parentheses are treated as one argument. Each command or subcommand without a handler can be treated as an argument, or it can still have a subcommand with a handler and there is no problem for the user to execute it.
It is recommended to use subcommands over options. Options apply mainly in the case when an argument with '-' or "--" is requested.

Commands help
Every user-defined command, subcommand, or option can have its own help description. The help for commands and subcommands can be created with respective macros: SHELL_CMD_REGISTER, SHELL_CMD. In addition, you can define options for commands or subcommands using the macro SHELL_OPT. By default, each and every command or subcommand has these two options implemented: "-h" and "--help".
In order to add help functionality to a command or subcommand, you must call the help function shell_help_print inside of a command handler.

New features:

Multi-instance - you can have independent shells on different transmission mediums

Multiline commands - Shell will correctly print and allow to edit commands longer than 1 line.

Integration with Log module - you can read logs on the shell screen, filter them dynamically (activate logs only for needed modules), suspend or resume. At the same time you can type, edit or execute a command.

Smart completion with the Tab key. One can prompt and partially/fully complete commands or its subcommands.

Commands history - Executed commands can be listed by history command or recalled with up / down arrows.

Built-in commands - Shell related commands already implemented and available for the user:

clear - clears the screen
history - prints recently called commands
resize - command shall be called each time terminal width has changed. It will ensure correct text formatting (currently it is only working with UART flow control on)
shell colors - switch on / off colored syntax
shell echo - switch on / off shell echo
shell backspace_mode - allows to adjust backspace escape code during runtime.
shell stats - gives an information about lost (not printed) logs

Easy command edition with buttons: Tab/Backspace/Delete/Arrows/Home/End

Meta Keys:

ctrl + a - Moves the cursor to the beginning of the line.
ctrl + c - Preserves the last command on the screen and starts a new command in a new line.
ctrl + e - Moves the cursor to the end of the line.
ctrl + l - Clears the screen and leaves the currently typed command at the top of the screen.
ctrl + u - Clears the currently typed command.
ctrl + w - Removes the word or part of the word to the left of the cursor. Words separated by period instead of space are treated as one word.

Wildcards support for: * and ?

Kconfig configuration to optimize resources usage.

@carlescufi  FYI

@jukkar @jhedberg please take a look. Shell is ready thus bluetooth and network commands adaptation can start. Checkout samples/subsys/shell to see how to port.

Codecov Report

Merging #9362 into master will decrease coverage by <.01%.
The diff coverage is 38.94%.

@@            Coverage Diff             @@
##           master    #9362      +/-   ##
==========================================
- Coverage   52.52%   52.51%   -0.01%
==========================================
  Files         201      201
  Lines       25359    25361       +2
  Branches     5299     5299
==========================================
- Hits        13320    13319       -1
- Misses       9944     9947       +3
  Partials     2095     2095

Impacted Files
Coverage Δ

include/misc/dlist.h
92.59% <ø> (ø)
:arrow_up:

subsys/shell/shell_service.c
100% <ø> (ø)
:arrow_up:

subsys/logging/log_output.c
2.66% <0%> (-0.06%)
:arrow_down:

subsys/logging/log_core.c
69.75% <0%> (-0.19%)
:arrow_down:

subsys/shell/legacy_shell.c
47.16% <47.16%> (ø)

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 b9e8cd1...e06dd56. Read the comment docs.

few quick observations:

backspace does not work
works fine with qemu_cortex_m3, not with qemu_x86
fails to build with native_posix

Otherwise, it looks great :)

@nashif thank you for checking it :)
In order to make backspace work (in PuTTY) you need to change terminal settings:
PuTTY -> Terminal->Keybord -> change" Control-H" to "Control-?"
Now we will work to make tests green :)

@jarz-nordic using screen here, not putty. it works with current shell implementation without having to change anything.

Possibly you are having settings excluding "del" button.
I guess that currently for your terminal del and backspace are behaving in the same way.

@nashif I have reproduced the issue with "screen" application.
This is limitation of "screen", it is sending the same VT100 code for delete and backspace button.
I see three solutions for this problem:

Implement new shell in the same way as old one. This will exclude "delete" button - well it will behave in the same way as backspace button.
Implement a command in the shell to work in mode where delete and backspace are treated in the same way.
You can fix the problem on terminal side:
a) Create a file: $HOME/.screenrc
b) add following line inside this file: bindkey -d -k kb stuff "\010"
This was proposed here: https://bugs.launchpad.net/ubuntu/+source/vte/+bug/29787/comments/13
I tested 3. and it is working fine for me.

Implement new shell in the same way as old one.

Please implement terminal line editing capabilities in a way that they just work on a typical Linux system (like thousands of other tools there work). Thanks.

@pfalcon this is what I did. In standard Linux shell you have possibility to use Backspace and Delete buttons and they realize different functions :).
Old shell implementation assumes that Backspace and Delete are sending the same escape code so you have no possibility to realize different functions for them.
There are many terminals and each is behaving in different way. For instance "minicom" is working correctly out of the box: Backspace and Delete are sending different (and correct) escape codes.
Screen out of the box is sending the same escape code for Backspace and Delete button (incorrect behaviour). To fix the Screen application you need to do what I've proposed.
In my opinion the best solution is to combine point 2 and 3. I can implement a command to configure shell in the "old mode" where Backspace and Delete are not distinguished.

@jarz-nordic: Ok, thanks for the detailed reply. I hope to give it a try with "picocom" I use (and that's part of the issue - everyone uses their own favorite terminal app, so the shell should "work with any of them", which entails working "as any other app working over serial".) Btw, while an individual terminal app may of course do adhoc processing, I'd assume that overall the key codes they send would be governed by system-wide termcap/terminfo database.

@nashif @pfalcon : I have fixed backspace. It shall work by default with all terminals (including delete key).
There is no need to add any key binding for screen or to add any parameter when running picocom.

Per https://github.com/zephyrproject-rtos/zephyr/issues/8872, this is targeted for 1.14, so setting milestone as such.

Each file/module can create a "root" command and subcommands: static and dynamic (syntax and number not needed during compilation time).

Somewhere after this sentence in the PR description, would be nice to add an example (from user perspective).

Commamands history,
Build-in commands,
Easy command edidtion

@jarz-nordic , I don't know if it makes sense to ask to fix the typos in the description. Maybe it's not too much, but for some, seeing 3 mistakes in 3 natural-language lines may set superfluous expectations regarding what to see in the thousands of lines of the programming code ;-).

So, I've read https://github.com/zephyrproject-rtos/zephyr/issues/8872, I've read the description here, and I'm still now sure, what problem this PR fixes. #8872 says "New shell subsystem will be ported from nRF5 SDK", and description here touts cool features. But overall, it looks like a change for a purpose of a change, because it's unclear what real problems it solves.
For reference, for me, the only problem with the existing shell is the lack of history support. The other features like completion and line editing are there.
This is not an abstract question - this PR completes throws away and replaces the old shell and its related interfaces, and (apparently) requires ripple of updates thru the entire tree. For what exactly benefit? Why new shell wasn't written with the idea to support interfaces (command handlers first of all) of the existing shell? Should it be scaled down to be more modest and not require so many changes throughout the tree?

@pfalcon : I will shortly update PR description.
The most important difference for me are:

Integration with Log module,
Multi-instance - I think I saw that you were complaining this is missing in current shell
Dynamic commands, brief concept is available here:
https://devzone.nordicsemi.com/b/blog/posts/new-command-line-interface-part-1
Tab button can prompt, autocompleate commands and its subcommands and its subcommands...

In my opinion migrating old command handlers to new shell is not big effort. You need to use 1 macro to register a root command. Command handler is almost the same, new shell adds 1 extra argument: shell instance. Body of the handler can stay unchanged.

@pfalcon : Regarding "Why new shell wasn't written with the idea to support interfaces (command handlers first of all) of the existing shell?"
This has been discussed some weeks ago with @nashif . We agreed that Nordic will provide a new shell and an example how to migrate old commands.

@jarz-nordic:

Regarding "Why new shell wasn't written with the idea to support interfaces (command handlers first of all) of the existing shell?"
This has been discussed some weeks ago with @nashif .

Any references? (Did the discussion happened online in comments?)

Tab button can prompt, autocompleate commands and its subcommands and its subcommands...

Ok, to clarify, the old shell has autocompletion, but only for first command word (and can't show autocomplete choices on empty prompt - though bash works the same way for example).

@pfalcon : it was an online meeting with discussion where we have presented Nordic CLI.
We have shared our concerns that command approach is different but conclusion was that new features are worth to change shell. It was also a reason why this implementation will be in release 1.14, to give some time for migration.

Multi-instance - I think I saw that you were complaining this is missing in current shell

I don't remember saying that. But thanks for quick reply and discussion. I do hope to make a detailed review, but as "pre-discussion" already started, please let me share my pre-concerns as start with reviewing this. Note that they are based on very quick and partial peeking at 1% lines of your code, and things I had in mind. I need to do complete review to either confirm or withdraw them. But in case I get interrupted with review, please let me dump those nonetheless.
So, there would be 2 main "pre-concerns": a) layering; b) reuse by other shells and breaking already available reused.

Layering. Ideally, the shell would be layered as: [console or I/O drivers] (should be "invisible") -> console or I/O subsystem -> getchar() ANSI C/POSIX call -> generic line editing lib -> shell -> command handlers, ideally independent from shell as much as possible. Note that current shell, or more specifically, Zephyr console handling, is awful. For example, line editing happens in UART drivers (which of course means that line editing is not available to other "console" drivers - unless they duplicate the code). I yet have to see how much of improvement the new shell has in this regard. But I already have suspicion it doesn't fit with the ideal picture above (simply because Zephyr's console subsystem, which would enable the above, need more work, and nobody contributes to it ;-)).

"command handlers, ideally independent from shell as much as possible". Let me start with the direct link: https://github.com/micropython/micropython/blob/master/ports/zephyr/modzephyr.c#L56 . So, there's old Zephyr shell, there's new Zephyr shell ..., but there're also 3rd-party shells. For example, by the link above you're looking at MicroPython, which has its own shell (interpreter REPL). And yet it was possible to plug Zephyr's shell command handlers into it! That's because the handlers had a completely particular shell independent signature: handler(int argc, char **argv), and used normal printf/print for output. You want to change it with handler(const struct shell *shell, size_t argc, char **argv) signature, which may amount to inability to call handlers from 3rd-party shells in worst case, or extra mileage to mock const struct shell *shell in somewhat better case. So again, let me look what benefit passing that arg gives, vs just continuing to use older handlers as is.

Anyway, please let me try to find answers to the questions above myself first, before actually going to criticize the choices/suggest something else.

@jarz-nordic: samples/subsys/shell/shell_module from your patch hangs for me on qemu_x86, with 100% qemu CPU usage on host. Can you have a look?

@pfalcon : Yes I will take a look tomorrow, I will try to fix it.

Now I'm trying on qemu_cortex_m3. And at once, the screenshot. Guess what I've typed there? ("foo" again.) Everyone, everyone who played with colors on console made such a mistake. The best way out of it is not to play with colors. If you can't, avoid any assumptions about what background of the console can be - for starters, and for production-wise, be sure to test on any popular color settings out there.

Next comment to the same screenshot.  Unless it's another display artifact, it tries to conceal user's input from the user themselves. I want to see what I typed, verbatim, then the output - all previous commands, not just while I'm typing it, and then it going away from the screen.

History doesn't seem to work for me.

Please activate history with ninja menuconfig

Please activate history with ninja menuconfig

Ok, so looking at this commit: https://github.com/zephyrproject-rtos/zephyr/pull/9362/commits/80ac82e7c4858fe975d2bec800241c07b6f7b7a5
(For after-rebase references:
 subsys: shell: Default configuration update

Default configuration has been set to activate only minimal number
of shell features. With such configuration it shall be possible
to run shell example on all platforms including these
with small amount of memory resources.

)
I'd suggest to make 2 samples apps: shell-minimal, which would work on as smallest systems as possible, and shell-features, which would demonstrate as many features as possible (and has history enabled of course).
Otherwise, as I mentioned, the only feature I missed in the old shell is history, so no surprise I went to look for it ;-).

@pfalcon : I am not able to reproduce your finding regarding concealing user input.
May you please let me know what are your terminal settings? I assume you are using picocom. I tried it and it was working fine.

@jarz-nordic : So far, I was using just standard "run" target for BOARD=qemu_cortex_m3, i.e. standard Linux console. It's Ubuntu 16.04, under X11, so TERM=xterm, standard Ubuntu black-on-whitr terminal theme, standard Gnome Terminal app.
Indeed, your screenshot shows how I would expect, but that's not what I see with my setup. It would look as if after user command is input, it's printed not with "\r\n" line ending, but with just "\r" (assuming raw terminal).

@jarz-nordic : And to confirm, is your standard development system Windows or Linux?

I am using Linux Mint 19 Cinamon. I will test it a bit deeper tomorrow.

Same here, will try on a real hardware over serial too.
Thanks!

@pfalcon @jarz-nordic I tested on qemu_cortex_m3 with standard Ubuntu terminal (TERM=xterm-256color). I changed background to white and in such case the white commands are not visible. But the console is not concealing anything from user - the foo and bar are first printed verbatim and the warning command not found comes in the next line. So works fine in my opinion. (Revision d6674702d)

@Qbicz : Thanks for confirmation. Will be looking what can be wrong on my side.
Did you try qemu_x86? Can you confirm whether it locks up on start for your or not?
Also for reference, I'm using 80ac82e7c4858fe975d2bec800241c07b6f7b7a5 (which is the latest commit in this PR).

@pfalcon : qemu_x86 needs to be fixed - we will start working on this today.
Regarding concealing issue I will implement an improvement. As for now, once command is executed shell sends escape code to move to new line: 0x1b, 'E'
I will change it to send explicitly \r\n.

Ok, figured out "user input concealed" issue. I lied when I told that I use Gnome Terminal. I actually run MATE desktop environment on top of stock Ubuntu 16.04, and thus its MATE Terminal is used by default. I have MATE Terminal 1.12.1 here.
So, when I try ol' good (and ugly) Xterm, or Gnome Terminal 3.18.3, I get proper line feed after I type the command, it looks like on your screenshots guys. But with MATE Terminal, I get no line feed, and output happens on the same line.

As for now, once command is executed shell sends escape code to move to new line: 0x1b, 'E'
I will change it to send explicitly \r\n.

Definitely please do. It's easy to classify that as a particular user's problem, the fact that it was the first thing I saw should give an idea of what terminal zoo can be around in the wild. It's really good idea to use the simplest control sequence for a particular purpose.

Tested on frdm_k64f with my usual command picocom -b115200 /dev/ttyACM0. When running in MATE Terminal I expectedly get the same "input concealment" issue. Otherwise, backspace works (out of the box) as expected, thanks for that! (Tested inside both MATE Terminal and Gnome Terminal).

@pfalcon @nashif

qemu_x86 fixed by @pizi-nordic ,
backspace and delete shall work more stable with multiline commands
I hope that "user input concealed" is no longer an issue, @pfalcon please verify if you can.

So, now the remaining obvious issue is possible white text on white background.

What you'd do for this is, instead of explicit set VT100 attribute always (i.e. set text color to red, then set it to white), is to use "bracket" scheme - set needed color, then reset the VT100 attributes (ESC "[0"). Should work.

Problem solving qemu was related with bad thread creation. You can find attached patch prepared by Piotr.
shell-thread-fix.zip
Thank you for valuable comments. I will update source accordingly.

What we are working on right now is:
1. Migrating shell Rx to be interrupt driven.

2. Adding ring buffer for received data.

Those changes will come as separate PR.

@jarz-nordic @nordic-krch

Those changes will come as separate PR.

Does this mean that this PR is self-contained and ready for review?

@carlescufi : Yes, in my opinion we are ready for review.
Except mentioned changes we need to migrate existing commands from old shell to new shell, but it will be also made in separate task.

Could this PR be kept in sync with zephyr master, it would then be easier to base other work on top of this (like the net-shell rework at #9825)?

We will update this branch today.

@jukkar @jarz-nordic rebased. will see if shippable confirms correctness.

@nordic-krch is this PR still DNM? I would like to merge it ASAP and have module owners work on top of master rather than this PR. What is blocking us from merging it now?

@nashif let me clean after last upmerge and we can remove DNM label.

recheck

please add shell_root_cmds_sections to scripts/sanitycheck to have it as whitelisted section.


TS2345 error while trying to run the cli

Hello there!
I was trying to run your CLI with the command you put in your repo:
$ deno install -A -f --unstable -n attain<EMAIL_ADDRESS>when I did, deno cached all of the dependencies and then outputted this error:
error: TS2345 [ERROR]: Argument of type '{ depth: number; sorted: boolean; trailingComma: boolean; compact: boolean; iterableLimit: number; }' is not assignable to parameter of type 'InspectOptions'.   Object literal may only specify known properties, and 'sorted' does not exist in type 'InspectOptions'.         sorted: true,         ~~~~~~~~~~~~     at https://deno.land/std@v0.61.0/testing/asserts.ts:26:9
are you familiar with this problem? I also tried to run v1.0.0 but it outputted the same problem again.

Which deno version are you using?

deno 1.1.2

hum. I think the 0.6x.x deno standard libraries are required to use up to deno 1.2.x version. this might be a problem.


Need help to create x509 binding

Hello Colleagues,
We evaluating btp-operator and in the process trying to create x509 based binding for Destination service.
Below is my yaml to create the service
apiVersion: services.cloud.sap.com/v1
kind: ServiceInstance
metadata:
  name: test-destination2
spec:
  serviceOfferingName: destination
  servicePlanName: lite
  externalName: test-destination-config
  parameters:
    credential-type: X509_GENERATED

Below is my yaml to create the binding
apiVersion: services.cloud.sap.com/v1
kind: ServiceBinding
metadata:
    name: destination-binding-mtls
spec:
    serviceInstanceName: test-destination2
    externalName: destination-binding-mtls
    secretName: destination-binding-mtls

The creation of the service and the binding is successful but the secret that gets created is having the credential-type as binding-secret and not x509. Could you please help what am I doing wrong here ?

Hi @saiharish ,
Your yaml is not correct;
Please follow the SAP Help documentation.
for instance:
{
  "xsuaa": {
  "credential-type": "x509",
  "x509": {
    "key-length": 4096,
    "validity": 365,
    "validity-type": "DAYS"
  }
}
}

I hope that helps;

Thank you @ptesny ...It worked


Stack animation is not working properly

When user starts dragging the top page - the bottom page immediately overlaps it. See attached screenshots. This bug is appearing constantly on my Nexus S (Android 4.1.2) and on emulator (Android 4.2)

your commit not solve that issue yet.

i fixed my issue with following code:
 @TargetApi(Build.VERSION_CODES.LOLLIPOP)
    protected void animateStack(View left, View right, float positionOffset, int positionOffsetPixels) {

        if (mState == State.IDLE) {
            return;
        }

        if (mState == State.GOING_RIGHT) {

            if (right != null) {

                manageLayer(right, true);
                mScale = (1 - SCALE_MAX) * positionOffset + SCALE_MAX;
                mTrans = -getWidth() - getPageMargin() + positionOffsetPixels;
                ViewHelper.setScaleX(right, mScale);
                ViewHelper.setScaleY(right, mScale);
                ViewHelper.setTranslationX(right, mTrans);

                if (API_21) {
                    right.setZ(mScale);
                }
            }

            if (left != null) {

                left.bringToFront();

                if (API_21) {
                    left.setZ(1);
                }
            }
        } else if (mState == State.GOING_LEFT) {

            if (left != null) {

                mScale = (1 - SCALE_MAX) * (1 - positionOffset) + SCALE_MAX;
                mTrans = positionOffsetPixels;
                ViewHelper.setScaleX(left, mScale);
                ViewHelper.setScaleY(left, mScale);
                ViewHelper.setTranslationX(left, mTrans);

                if (API_21) {
                    left.setZ(mScale);
                }
            }

            if (right != null) {
                manageLayer(right, true);
                if (API_21) {
                    right.setZ(1);
                }

                right.bringToFront();
            }
        }
    }

and add API 21 as API 11 in static values like following:
API_21 = Build.VERSION.SDK_INT >= 21;
this is what i want, might be useful for some one else.


Compact menu has no hover

There is no hover shown for the compact menu activity bar contribution:

I cannot reproduce on any platform. The hover animation is working for @misolori and myself.

@sbatten I can still reproduce this on OS X,  pls see the attached recording:

To reproduce:

enable the setting: remote.containers.enableWebAccess": true
open a folder in a container
copy the web URL from the output shown when provisioning the container

Open the URL in Chrome or Safari.

@egamma OH! I see, I thought you meant the hover highlighting, not the hover text.


Support I-Frames through PostMessage

Safari has a rule that disallows an I-Frame to access deviceorientation events to get rotation data. On aframe.io, we've had to limit the example scenes we show on mobile to scenes hosted on the same domain.
We can work around this by using postMessage. The parent window has a small script that continuously emits a postMessage with device orientation data. Then we have webvr-polyfill listen to the postMessage and send that data through the polyfill to support the I-Frame use case.

Are you suggesting to add a listener for these synthetic deviceorientation
events? If so I think that's reasonable. Open to PRs.
On Mon, Nov 14, 2016 at 5:24 PM Kevin Ngo<EMAIL_ADDRESS>wrote:

Safari has a rule that disallows an I-Frame to access deviceorientation
events to get rotation data. On aframe.io, we've had to limit the example
scenes we show on mobile to scenes hosted on the same domain.
We can work around this by using postMessage. The parent window has a
small script that continuously emits a postMessage with device orientation
data. Then we have webvr-polyfill listen to the postMessage and send that
data through the polyfill to support the I-Frame use case.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/googlevr/webvr-polyfill/issues/173, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AAQ8gKXh5s2YzKR7E1EjORMMsTQN22-Mks5q-Qm1gaJpZM4KyBCI
.

@ngokevin can you share the code snippet that does this device orientation update via postMessage ?
I was considering using iframes as a way to load scenes asynchronously via the frame into a page

I don't have code snippets, but the pseudocode is:
window.top script:
window.addEventListener('devicemotion', function (evt) {
  iframes.forEach(function (iframe) {
    iframe.contentWindow.postMessage({name: 'devicemotionpolyfillupdate', acceleration: evt.acceleration, ...});
  });
});

Polyfill / I-Frame content script:
window.addEventListener('message', function (evt) {
  if (evt.data.name !== 'devicemotionpolyfillupdate') { return; }
  // Tell polyfill to update camera using device motion data.
});

Added an example usage of iframes in the cardboard-vr-display README, as well fixed the issue with working with cross-origin iframes


Check all relevant permission for user while accessing pages

If a user tries to access the post create page then the user should have access to at least read access for categories, tags, medium, formats, and post create action.
Then show the error component that user doesn't have enough permissions.

@pallavimshr Please show relevant actions and resources as well in the error card.


os-neutron install fails from Kilo to Liberty

Tracking of the following OSA bug:
https://bugs.launchpad.net/openstack-ansible/+bug/1577799

Duplicate of https://github.com/rcbops/rpc-openstack/issues/1134


the steps meaning

What are the steps mentioned in "The steps are completed if the system assigned default setting is on" ?
Could you please point it out for me or give some suggestions?
Thanks a lot.

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

ID: 46153f4a-dfb9-899a-77be-01de4c1fd2ac
Version Independent ID: 603dd139-9a35-d332-59cc-c0ab629d9224
Content: Configure Kubernetes cluster - Azure Machine Learning
Content Source: articles/machine-learning/how-to-attach-kubernetes-anywhere.md
Service: machine-learning
Sub-service: core
GitHub Login: @ssalgadodev
Microsoft Alias: ssalgado

@Leoer Thanks for the question. By default, any new Azure ML workspace is created with system assigned identity and if your workspace is not created with system assigned identity then the new roles are required for your managed identity before proceeding with the steps to assign K8s compute to your workspace. The steps are the following as mentioned in the section for different ways to attach the cluster.

Got it. Thanks!
If I don't use Arc Kubernetes, it still can attach a Kubernetes cluster to an Azure ML workspace? I mean that if only AKS can attach a Kubernetes cluster to an Azure ML workspace according to this article?
Hope you don't mind although my expression is a little unclear. Thanks

@Leoer You can attach an AKS cluster to Azure ML workspace only. Are you referring to a K8s cluster that isn't hosted on Azure?
If Yes, then I think that is currently not supported.

Got it. Thanks for your reply.

Thanks @Leoer. We will now proceed to close this thread.


setup.py: Use platform specifiers instead of extras_require

Use platform specifiers to declare dependencies that apply only to
Python 3.4 and older, rather than extras_require. The latter does not
seem to work with the current versions of setuptools, and only
the former is mentioned in the documentation.

@mgorny on which setuptools version current implementation doesn't work?
Can you describe your environment and provide steps to reproduce?
I tested that on Python 3.4.6 with pip 9.0.1 and setuptools 28.8.0 python setup.py install works.
Also tested with the same Python 3.4.6, but latest setuptools 35.0.1 that python setup.py install works.
Your approach fails in AppVeyor with Python 3.4.4, pip 9.0.1 and setuptools 18.2.

setuptools 34.4.1 on Gentoo. I don't have typing installed, and I just run:
$ python3.6 setup.py test
running pytest
Searching for typing
Reading https://pypi.python.org/simple/typing/
[...]

i.e. it starts trying to download typing on python3.6.
setuptools 18.2 is almost 2 years old. I doubt anyone would be using that in a real deployment but if you insist, I guess I can make the switch between the old and new syntax conditional to setuptools version.

Oh, so the issue is not about not being installed typing on Python 3.4, but about being installed on 3.6. This is indeed not very good.
I tried and can reproduce this issue on Python 3.6, but not on Python 3.5, which is strange (on the latest setuptools and pip).

@mgorny let's raise minimal required version for setuptools and switch to modern dependency specification style. I'll update your PR accordingly.

@mgorny thanks for the contribution!


Allow using RDKit_jll v2022.3.1 and test on Windows

Fix #13.

Codecov Report

Merging #21 (eb9ec43) into main (fda6969) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #21   +/-   ##
=======================================
  Coverage   93.02%   93.02%
=======================================
  Files           8        8
  Lines         172      172
=======================================
  Hits          160      160
  Misses         12       12

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 fda6969...eb9ec43. Read the comment docs.

I was wondering why CI was still using RDKit_jll v2021 and I just realised you check in the Manifest.toml file (which I should have updated in hindsight).   However I recommend deleting it, I don't think it's really useful for CI, unless you always remember to keep it up to date.

thanks, I dropped the Manifest but it looks the tests are still failing (which was a bit unexpected...). I'm not really where the issue may come from...


Enable styling on ColorVisual

It is currently not possible to add styling tags to any objects apart from UIComponents. To add a bit more flexibility, ColorVisuals should be able to get styled, to add the possibility of for example rounding corners on the background color of GridPanes.

Added in 3aafc0adf61c2469aca9439a840a53221bfd0b99.


Diverging Generator Loss

The generator loss diverges and does not converge
Even after adding Gaussian noise to input the G_loss diverges. Please Help

Which GAN are you using? Are your inputs scaled or normalised?


Installation asking for Proxy settings

Description
I tried to install FILES (clasic installer: files_stable.exe). After uncompressing the packages it can not be installed due to the following message:
"Proxy authentication required (407)".
I couldn't find a setting or documentation on how I can add my proxy credentials.
Steps To Reproduce
1- Download files from WebPage.
2- Execute Files.Stable.exe
After extracting files the error is displayed.

Requirements

Offer a way to set up proxy info to allow product installation

Files Version
stable version at 2023-12-20
Windows Version
Windows 11
Log File
No log available

Does it work to install the preview version?

Does it work to install the preview version? It sounds like the installer is failing to access the installation files from the server.

I dind't try the previous version.
I need to mention our company implemented a proxy with user authentication and I need to use it while installing, that's why the installer can't access the server's files.

You can try use the below offline files
This one is Files
https://cdn.files.community/files/stable/Files.Package_<IP_ADDRESS>_Stable_Test/Files.Package_<IP_ADDRESS>_x64_ARM64_Stable.msixbundle
This one is WinAppSDK which you might also need to install.
https://cdn.files.community/files/stable/Files.Package_<IP_ADDRESS>_Stable_Test/Dependencies/x64/Microsoft.WindowsAppRuntime.1.4.msix

I dind't try the previous version.

I meant the preview version listed on the download page, this uses a different installer and it sometimes has better error handling when there is an issue with the installer.

Reference

Perfec!!!
This installer already work for me.
Thank you!


Contradictory explanations of question mark filter pattern

What is the current behavior?

In the "Workflow syntax for GitHub Actions" docs page, it says, in the filter pattern cheat sheet:

?: Matches zero or one single character. For example, Octoc?t matches Octocat

whereas, a bit further down, it says:

'*.jsx?' The ? character matches zero or one of the preceding character. E.g. page.js, page.jsx

(copied out of the table, emphasis mine)
What changes are you suggesting?

I would expect the latter behaviour is the correct one, as that would be consistent with regexes, but I have not tested the behaviour of the question mark in GitHub Actions.
Additional information

Thanks for opening an issue @MetRonnie! I'll get this triaged for the team to take a look 👀

Thanks for letting us know about this issue. 💯
It does like the docs need to be updated -- I'll check with the devs to confirm what the expected behavior should be.

The devs have confirmed that this is a bug, and it's currently being reviewed internally. I'm not sure if/when this will be resolved, but thanks again for letting us know 👍


Serialization Errors / Documentation Bugs?

While working on a different Nostr project, I used this library to generate some test events. I'm not totally sure if there are errors in my code, but I suspect there are bugs in this library that make the events it produces invalid.
If I run:
kind_0_event = user.create_event(
  kind: Nostr::EventKind::SET_METADATA,
  content: {
    name: 'Whatever',
    display_name: 'Whatever',
    about: 'Whatever,
    picture: 'Whatever',
    website: 'Whatever',
    banner: 'Whatever'
  }
)

Then check kind_0_event.serialize.to_s, I get text that contains:
 {:name=>\"Whatever\",

The content hash appears to not be valid JSON, and is instead using the Ruby syntax for a hash with symbols (as opposed to {"name":"Whatever"}. As a result, Digest::SHA256.hexdigest(kind_0_event.serialize.to_json) produces a SHA256 hash that other programs won't be able to match.
I assume the fix is to add an implicit .to_json call on content in create_event, but the documentation doesn't tell you to do this and the library doesn't do it for you.
--
Next, to validate a signature, the documentation says:
other_public_key = Nostr::PublicKey.new('10be96d345ed58d923a734560680f1adfd2b1006c28ac93b8e1b032a9a32c6e9')
event.verify_signature # => false

but other_public_key is never actually called - I assume it should be some form of
crypto = Nostr::Crypto.new
other_public_key = Nostr::PublicKey.new('10be96d345ed58d923a734560680f1adfd2b1006c28ac93b8e1b032a9a32c6e9')
crypto.check_sig!(<hash of event>, other_public_key, <signature of event>)

Thanks for the feedback, @tfreedman.
To serialize the event as JSON, do event.to_h.to_json. I'll add a method to_json directly on the event to make it easier and I'll also document it on the website.
To sign and validate a signature, the documentation says:

To sign an event, use the private key associated with the event's creator. Here's how to sign a message using a predefined keypair:

require 'nostr'

private_key = Nostr::PrivateKey.new('67dea2ed018072d675f5415ecfaed7d2597555e202d85b3d65ea4e58d2d92ffa'),
public_key = Nostr::PublicKey.new('7e7e9c42a91bfef19fa929e5fda1b72e0ebc1a4c1141673e2794234d86addf4e'),

event = Nostr::Event.new(
  pubkey: public_key.to_s,
  kind: Nostr::EventKind::TEXT_NOTE,
  content: 'We did it with security, now we’re going to do it with the economy.',
  created_at: Time.now.to_i,
)

# Sign the event with the private key
event.sign(private_key) # <------------

puts "Event ID: #{event.id}"
puts "Event Signature: #{event.sig}"

I can see how that part about other_public_key can be confusing. What I mean is this:
require 'nostr'

private_key = Nostr::PrivateKey.new('67dea2ed018072d675f5415ecfaed7d2597555e202d85b3d65ea4e58d2d92ffa'),
public_key = Nostr::PublicKey.new('7e7e9c42a91bfef19fa929e5fda1b72e0ebc1a4c1141673e2794234d86addf4e'),

event = Nostr::Event.new(
  pubkey: other_public_key.to_s,  # <--- this public key is not the key which pairs with the private key below
  kind: Nostr::EventKind::TEXT_NOTE,
  content: 'We did it with security, now we’re going to do it with the economy.',
  created_at: Time.now.to_i,
)

# Sign the event with the private key
event.sign(private_key)

puts "Event ID: #{event.id}"
puts "Event Signature: #{event.sig}"

I'll also update the documentation to make it more transparent. Thanks for the feedback.


Unable to compile my capture.cpp via cmake(Clion)

Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):

Consider checking out SDK examples.
Have you looked in our documentations?
Is you question a frequently asked one?
Try searching our GitHub Issues (open and closed) for a similar issue.

All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)

Required Info

Camera Model
D435

Firmware Version
(Open RealSense Viewer --> Click info)

Operating System & Version
Win10

Kernel Version (Linux Only)

Platform
PC

SDK Version
2.54.1

Language
C++

Segment
Robot

Issue Description
Dear developers, when I use CLion and CMakeLists.txt to compile my own capture.cpp, I encountered a problem that it cannot be compiled.
First encountered compile error as shown below:
FAILED: test.exe
cmd.exe /C "cd . &&
D:\mingw64\bin\c++.exe -g  CMakeFiles/test.dir/capture.cpp.obj -o test.exe -Wl,--out-implib,libtest.dll.a -Wl,--major-image-version,0,--minor-image-version,0
-LC:/PROGRA~2/INTELR~1.0/bin/x64 -lrealsense2  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
CMakeFiles/test.dir/capture.cpp.obj: In function `set_viewport(rect const&)':
C:/Program Files (x86)/Intel RealSense SDK 2.0/samples/example.hpp:135: undefined reference to `__imp_glViewport'
C:/Program Files (x86)/Intel RealSense SDK 2.0/samples/example.hpp:136: undefined reference to `__imp_glLoadIdentity'
C:/Program Files (x86)/Intel RealSense SDK 2.0/samples/example.hpp:137: undefined reference to `__imp_glMatrixMode'
...
CMakeFiles/test.dir/capture.cpp.obj: In function `window::window(int, int, char const*)':
C:/Program Files (x86)/Intel RealSense SDK 2.0/samples/example.hpp:524: undefined reference to `glfwInit'
C:/Program Files (x86)/Intel RealSense SDK 2.0/samples/example.hpp:525: undefined reference to `glfwCreateWindow'
C:/Program Files (x86)/Intel RealSense SDK 2.0/samples/example.hpp:528: undefined reference to `glfwMakeContextCurrent'
C:/Program Files (x86)/Intel RealSense SDK 2.0/samples/example.hpp:530: undefined reference to `glfwSetWindowUserPointer'
C:/Program Files (x86)/Intel RealSense SDK 2.0/samples/example.hpp:531: undefined reference to `glfwSetMouseButtonCallback'

I checked the example.hpp file, a series of functions such as glViewport can be found in gl.h of mingw, functions such as glfwInit can also be found in glfw3.h of mingw.
How can I fix this error and implement capture.cpp using CMake on CLion?
Below is my CMakeList.txt
cmake_minimum_required(VERSION 3.26)
project(test)

set(CMAKE_CXX_STANDARD 17)

include_directories("C:/Program Files (x86)/Intel RealSense SDK 2.0/include")
include_directories("C:/Program Files (x86)/Intel RealSense SDK 2.0/samples")
include_directories("C:/Program Files (x86)/Intel RealSense SDK 2.0/third-party")

link_directories("C:/Program Files (x86)/Intel RealSense SDK 2.0/bin/x64")

add_executable(test capture.cpp)

target_link_libraries(test realsense2.dll)

After installing OpenGL, FreeGLUT,GLEW, GLFW, I got libopengl32.a, libglu32.a, libglfw3.a in mingw's lib, and then added these three .a files to CMakeLists.txt, I successfully ran own capture.cpp.
Interestingly, Intel not only wants to promote its own DX, but also uses OpenGL in this project, but while using OpenGL, it does not fully compile the relevant library files. This thing tormented me for two days, thanks a lot for the Intel RealSense SDK.
Below is my new CMakeList.txt:
cmake_minimum_required(VERSION 3.26)
project(test)

set(CMAKE_CXX_STANDARD 17)

include_directories("C:/Program Files (x86)/Intel RealSense SDK 2.0/include")
include_directories("C:/Program Files (x86)/Intel RealSense SDK 2.0/samples")
include_directories("C:/Program Files (x86)/Intel RealSense SDK 2.0/third-party")

link_directories("C:/Program Files (x86)/Intel RealSense SDK 2.0/bin/x64")

add_executable(test capture.cpp)

target_link_libraries(test realsense2.dll libglfw3.a libopengl32.a libglu32.a)

Thanks so much @No-9527149 for sharing the details of your solution!


spreadsheet error handling

closes #67

There are helpful messages for connecting to the spreadsheet
Sequel::Error errors are caught/rescued to provide a slightly better message to the user
General 500 errors get a generic error

The error messages for something being wrong with the data are still fairly technical. I could get more specific about handling them, but I wasn't sure if it was worth the effort.
Errors that get technical detail:

don't have a required field or misspelled a column name (either in the code or in the spreadsheet)
have a column in the spreadsheet that doesn't exist in the datamodel
using a trait that doesn't exist
invalid data format (using text instead of a number, for example)

To get a generic 500 error I commented out the begin/rescue block and triggered one of the above errors.
@skcain I don't know if the design of this page really matters, but if anything really bothers you let me know.

rebased for funsies.