Introduce a Ballerina connector for Gemini REST API

We are planning to introduce a new Ballerina connector for the latest Gemini REST API by generated using it's OpenAPI specification.
Related links:

https://ai.google.dev/gemini-api/docs

This includes the following tasks:

Create a new repository under 'ballerina-platform' organization.
Create the OpenAPI specification manually or by converting it from other API descriptor formats.
Generate the connector client.
Implement a test suite covering the core functionalities.
Write documentation with examples.

Hi Team,
I would like to work on this project.
Thank You
Dilshan F.

👋 Welcome, @dilshanfardil ! 🚀
We're thrilled to have you join the Ballerina Hacktoberfest community! The issue has been assigned to you, and we’re excited to see your contributions.
To help you get started, here are a few essential resources:

Connector Contributor Guide: Make sure to go through our Ballerina Hacktoberfest connector contributor guidelines and follow the exact steps, to contribute effectively.
Learn Ballerina: Whether you're new to Ballerina or looking to enhance your skills, check out our official learning resources.
Community & Support: If you have technical questions, feel free to ask on Stack Overflow with the Ballerina tag, or join us on Discord to connect with other community members.

No contribution is too small, and your feedback is always welcome! Don’t hesitate to ask questions, propose new ideas, or report issues.
We are currently in the process of creating a GitHub repository for this connector module and will update you once it’s available. In the meantime, please go through the relevant resources and documentation related to the connector.
Happy coding and welcome aboard! 🎉

Hi Team,
Gemini don’t use OpenAPI specs; they use protocol buffer specs that are converted to discovery documents. So in order to crate the Open API spec I have used the protocol buffer.
I used this gnostic in order to generate the Open API spec.
Thank You
Dilshan F.

Hi Team,
When checking the Gemini protocol buffers we could see that there are few versions

v1
v1beta
v2beta
v3beta

In the official documents also they are mentioning on v1beta version and it contains lot of features including file uploads as well. But as per the api-versioning-doc the v1 beta version includes early-access features that may be under development and is subject to rapid and breaking changes and also there is no guarantee that the features in the Beta version will move to the stable version.
Due to this instability, I will use the stable version v1 in order to create the connector.
Thank You
Dilshan F.

Using the stable version would be the optimal choice here

Hi @NipunaRanasinghe, @xlight05 and @Nuvindu
After reviewing the exposed APIs in both v1 and v1beta, there are significant differences between them, with v1beta offering several useful features that are not available in v1, such as:

File uploads
Embeddings
Model tuning, etc.

You can find the relevant functions here.
Given these differences, I explored the possibility of integrating the v1beta version into the connector. Following a discussion with @xlight05, we learned that Google introduces new features in v1beta, and once those features are stable, they are promoted to v1. However, it appears that stable APIs are not being promoted to a v2 version, as referenced here
Upon examining SDKs like JavaScript, Python, and Android, we noticed that they also incorporate v1beta features. With this in mind, the question arises—should we release these v1beta features as well? In my view, certain functions from v1beta should be included in the connector.
Could we consider releasing both versions, structured as follows:

module-ballerinax-gemini-v1: A stable version for customers to use in production, ensuring no breaking changes.
module-ballerinax-gemini-v1beta: A version that includes all v1beta features, with the caveat that some customers may need to accept the potential risks of using new features.

WDYT ? @NipunaRanasinghe @Nuvindu @xlight05
Thank You
Dilshan F.

Hi @dilshanfardil ,
IMO, releasing the stable version is sufficient for now. And we can do a release for the beta version later if additional features are requested by a user.

Hi @Nuvindu and Team,
Since I am using the stable version, there are two open api specs. In the repo I could see that the module name as module-ballerinax-googleapis.gemini. So how can we proceed.

generative_service.txt
model_service.txt

Shall I merge this two spec to one or shall I create two repos as

module-ballerinax-googleapis.gemini.model.service
module-ballerinax-googleapis.gemini.generative.service

Thank You
Dilshan F.

Hi @dilshanfardil,
I have briefly gone through these specs and I think we can proceed with merging them into a single spec because both specs use the same endpoint URL.
However, if these APIs are managed and released separately within the product, then it would be better to keep them as separate Ballerina packages. Could you check and confirm?
(Eg: We have used separate modules for the DocuSign connector as it has separately managed APIs https://developers.docusign.com/docs/)
For now, my suggestion is that we can proceed with merging. @NipunaRanasinghe @xlight05 WDYT?

@Nuvindu , we had a offline chat with @NipunaRanasinghe what we discussed was this could have indepddeant releases, to add more, there's lots of modules with beta tag. its safer to go with separate packages rather than having it in one.  currently the plan is to prioritize generative with the existing repo and then move to model.  we'll have the generative one in the current repo. We can change the repo name later on.

Okay. +1

Agreed. +1

Hi @NipunaRanasinghe @xlight05 @Nuvindu
Upon reviewing the generated code from the .bal file, we noticed that it does not include any authorization details in the methods. Additionally, the proto files also lack a mechanism to pass the access token.
@display {label: "Connection Config"}
public type ConnectionConfig record {|
    # The HTTP version understood by the client
    http:HttpVersion httpVersion = http:HTTP_2_0;
    # Configurations related to HTTP/1.x protocol
    ClientHttp1Settings http1Settings?;
    # Configurations related to HTTP/2 protocol
    http:ClientHttp2Settings http2Settings?;
    # The maximum time to wait (in seconds) for a response before closing the connection
    decimal timeout = 60;
    # The choice of setting `forwarded`/`x-forwarded` header
    string forwarded = "disable";
    # Configurations associated with request pooling
    http:PoolConfiguration poolConfig?;
    # HTTP caching related configurations
    http:CacheConfig cache?;
    # Specifies the way of handling compression (`accept-encoding`) header
    http:Compression compression = http:COMPRESSION_AUTO;
    # Configurations associated with the behaviour of the Circuit Breaker
    http:CircuitBreakerConfig circuitBreaker?;
    # Configurations associated with retrying
    http:RetryConfig retryConfig?;
    # Configurations associated with inbound response size limits
    http:ResponseLimitConfigs responseLimits?;
    # SSL/TLS-related options
    http:ClientSecureSocket secureSocket?;
    # Proxy server related options
    http:ProxyConfig proxy?;
    # Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
    boolean validation = true;
|};

and, a sample method
remote isolated function GenerativeService_BatchEmbedContents(string model, BatchEmbedContentsRequest payload, map<string|string[]> headers = {}) returns BatchEmbedContentsResponse|error {
        string resourcePath = string `/v1/models/${getEncodedUri(model)}:batchEmbedContents`;
        http:Request request = new;
        json jsonBody = payload.toJson();
        request.setPayload(jsonBody, "application/json");
        return self.clientEp->post(resourcePath, request, headers);
}

We can pass the headers and there is no point that we can pass it as a query param. Without this being included in the OpenAPI specification, can we consider adding it manually?
If we proceed with this approach, there are multiple mechanisms to invoke the API. One commonly used method is passing the API key as query parameters; however, this doesn't seem very secure.
Is there a standard we should follow in such scenarios, or should we proceed with query parameters despite the concerns?
Looking forward to your thoughts.

Hi @NipunaRanasinghe @xlight05 @Nuvindu
Upon reviewing the generated code from the .bal file, we noticed that it does not include any authorization details in the methods. Additionally, the proto files also lack a mechanism to pass the access token.
@display {label: "Connection Config"}
public type ConnectionConfig record {|
    # The HTTP version understood by the client
    http:HttpVersion httpVersion = http:HTTP_2_0;
    # Configurations related to HTTP/1.x protocol
    ClientHttp1Settings http1Settings?;
    # Configurations related to HTTP/2 protocol
    http:ClientHttp2Settings http2Settings?;
    # The maximum time to wait (in seconds) for a response before closing the connection
    decimal timeout = 60;
    # The choice of setting `forwarded`/`x-forwarded` header
    string forwarded = "disable";
    # Configurations associated with request pooling
    http:PoolConfiguration poolConfig?;
    # HTTP caching related configurations
    http:CacheConfig cache?;
    # Specifies the way of handling compression (`accept-encoding`) header
    http:Compression compression = http:COMPRESSION_AUTO;
    # Configurations associated with the behaviour of the Circuit Breaker
    http:CircuitBreakerConfig circuitBreaker?;
    # Configurations associated with retrying
    http:RetryConfig retryConfig?;
    # Configurations associated with inbound response size limits
    http:ResponseLimitConfigs responseLimits?;
    # SSL/TLS-related options
    http:ClientSecureSocket secureSocket?;
    # Proxy server related options
    http:ProxyConfig proxy?;
    # Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
    boolean validation = true;
|};

and, a sample method
remote isolated function GenerativeService_BatchEmbedContents(string model, BatchEmbedContentsRequest payload, map<string|string[]> headers = {}) returns BatchEmbedContentsResponse|error {
        string resourcePath = string `/v1/models/${getEncodedUri(model)}:batchEmbedContents`;
        http:Request request = new;
        json jsonBody = payload.toJson();
        request.setPayload(jsonBody, "application/json");
        return self.clientEp->post(resourcePath, request, headers);
}

We can pass the headers and there is no point that we can pass it as a query param. Without this being included in the OpenAPI specification, can we consider adding it manually?
If we proceed with this approach, there are multiple mechanisms to invoke the API. One commonly used method is passing the API key as query parameters; however, this doesn't seem very secure.
Is there a standard we should follow in such scenarios, or should we proceed with query parameters despite the concerns?
Looking forward to your thoughts.

We usually rely on auth fields of openapi specs when generating connectors. The openapi tool automatically generates auth configs accordingly. We need to see why those fields are missing in openapi spec. We need to look at discovery APIs to clarify this.
I had an internal discussion with library team. It seems like we haven't converted any discovery apis to openapi specs ourselves.  One thing we can do is to explore the openapi spec used in google calendar package and its discovery API whether the discovery API contains the auth related details.

Thanks for the input, @xlight05 I'll review the current implementation of some sample APIs. There should be a way to pass the API key, so I'll explore the possibilities and come up with a plan.

Hi @xlight05 @Nuvindu and @NipunaRanasinghe
I reviewed the usages, and in the discovery APIs, we are exposing the key and access token as parameters. You can refer to the attached discovery API for details. I have updated the OpenAPI spec accordingly to reflect the same behavior.
If you could review this and provide the (+1), I’ll proceed to create the PR.

genarative-openapi.txt
discovery-api.json

Thank you
Dilshan F.


Move this repo to https://github.com/jakartaee

In the steering committee we voted to moved all specification projects from eclipse-ee4j to jakartaee. As such this repo should move to in due time.
Moving is fairly automatic, and redirects will be automatically put in place from the current location here to the new location.
If someone can authorise the move (e.g. @gunnarmorling @MattGill98) I can take care of it if needed.
Extra info:
"We voted on it in 2019 and then in 2020 we added it explicitly to our 2021 plan and voted on that plan.  I think we just need to start executing.  I sent about 30 emails like the following in an attempt to add some shape to it and kick off the move in the spec projects.

https://www.eclipse.org/lists/jakartaee-platform-dev/msg02940.html
https://www.eclipse.org/lists/messaging-dev/msg00028.html
https://www.eclipse.org/lists/jakartaee-tck-dev/msg01417.html
https://www.eclipse.org/lists/ejb-dev/msg00264.html
"

From: https://www.eclipse.org/lists/jakarta.ee-spec/msg02073.html
Also note that many projects have indeed moved: https://github.com/jakartaee/

Sounds great - make it so 🎉

Repo has been moved ;) Thanks!

Thanks! Note that @gsmet and @starksm64 are Red Hat's representatives looking after Bean Validation/Jakarta EE these days; I'm not involved with it any longer.

@gunnarmorling too bad you aren't involved anymore, but it is what it is I guess. The project still lists you as the team lead: https://projects.eclipse.org/projects/ee4j.bean-validation/who
Maybe that needs to be updated?

Yes, that would be good indeed. We had some discussions internally before, I'll ping Guillaume and Scott again.


Unexpected character '#'

Giving this a test-drive and am getting blocked by the following error:
>> Error: Parsing file node_modules/reactcss/src/reactcss.coffee: Unexpected character '#' (10:0)

Here's the code I'm using (compiled with Browserify and Babel, using NPM3):
import ReactCSS from 'reactcss';

export default class SideMenu extends ReactCSS.Component {
    render() {
        return (

        );
    }
};

Not sure what I'm doing wrong? Maybe it's something to do with NPM3?

Hey, really sorry about that @bramdevries, I had the package.json pointing to the .coffee files instead of the compiled .js ones. If you go ahead and update reactcss to 0.3.1 on NPM that should solve the issue!

Just updated to 0.3.1 and now I get the following:
>> Error: Cannot find module '../src/check-class-structure' from 'node_modules/reactcss/lib'```

Seems like it's going wrong here: https://github.com/casesandberg/reactcss/blob/master/src/inline.coffee#L4

Hey @bramdevries, There was a legacy require in there, it should be fixed now if you update to 0.3.2
https://github.com/casesandberg/reactcss/commit/abdd96dc35bcdc014fad0c2b3eabf16f39591d06

Hmm it's solved the compile errors, but now I'm getting runtime errors:
import ReactCSS from 'reactcss';

export default class SideMenu extends ReactCSS.Component {

    classes() {
        return {
            'default': {
                sidemenu: {
                    background: 'red'
                }
            }
        }
    }

    render() {
        return (

        );
    }
};

Gives this error:
Uncaught ReferenceError: React is not defined

Does adding this make it work?
import React from 'react';

Or are you not importing react where you are rendering it?

Okay so doing this worked:
import React from 'react/addons';
import ReactCSS from 'reactcss';

export default class SideMenu extends ReactCSS.Component {

    classes() {
        return {
            'default': {
                sidemenu: {
                    background: 'red'
                }
            }
        }
    }

    render() {
        return (

Test

        );
    }
};

The documentation doesn't mention having to import both React and ReactCSS, I assumed ReactCSS replaced React

You are totally right, that is my bad. I will update that now!
Thanks for working through this with me


Add DeployerPHP receipt for spiral app

Add deployment receipt for spiral framework
https://deployer.org/docs/7.x/recipe/common

https://github.com/deployphp/deployer/pull/3582


Create APP Perfect.md

📝 Description
Add a brief description.
💣 Is this a breaking change (Yes/No):

[ ] Yes
[x] No

🚧 How to migrate?
Don't need.
📝 Additional Information
lol

Dear @Coding-Aryan , we found your app is too simple. Please update it. You can try to connect it to the agent you created. For example, add an action with the "perfect" Ai Agent you created. add a input component. and the Input variable in the action is {{input1.value}}.


SSI ContextLoader to make context configurable/overridable

Currently credential.rs has the bankaccount credential context hardcoded but we should make this configurable so clients can use different values- ex V2 instead of v1 etc..
also it is not only the bankaccount credential that we need- there maybe many VC contexts we support in the future so we should be able to add more than pub const BANK_ACCOUNT_CREDENTIAL_CONTEXT and without changing code if possible
https://github.com/knox-networks/ssi/blob/5765319f5fe419b48ea89ac3b69d613f3bb6ec9c/core/src/credential.rs#L14

https://github.com/knox-networks/ssi/issues/122 should be done as part of this


Automated cherry pick of #3106: fix: server-create allow create server with empty disk

Cherry pick of #3106 on release/2.12.
#3106: fix: server-create allow create server with empty disk

Codecov Report

:exclamation: No coverage uploaded for pull request base (release/2.12@6931d59). Click here to learn what that means.
The diff coverage is 0%.

@@              Coverage Diff               @@
##             release/2.12   #3109   +/-   ##
==============================================
  Coverage                ?   7.17%
==============================================
  Files                   ?     478
  Lines                   ?   76807
  Branches                ?       0
==============================================
  Hits                    ?    5510
  Misses                  ?   70833
  Partials                ?     464

Flag
Coverage Δ

#aFlag
7.17% <0%> (?)

Impacted Files
Coverage Δ

pkg/compute/models/guests.go
0.66% <0%> (ø)

pkg/mcclient/options/servers.go
0% <0%> (ø)

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 6931d59...a6768fa. Read the comment docs.

/approve
/lgtm


MTS200 thermostat

I have a Meross MTS200 thermostat for several months now. Everything works well with the Meross app on the smartphone.
Everything seemed fine with the Meross LAN Home Assistant integration activation and climate card in HA, but after a few months the current temperature in HA was no longer up to date. Then I activated the Meross Iot addon via Meross cloud, but the same problem. Now I try to activate the Meross addon with local broker, but I cannot pair the MTS200, the device is in pairing mode. I can start the pairing app and log in, I have Http and Mqtt codes but the pairing does not work; Any idea what else I can do?
regards
Robert

solved by delete the meross pairing first


Doesnt work with blender 3.1.2

Hey,
when i install this addon to blender 3.1.2 and try to activate it, it reports as follows:
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 3.1\3.1\scripts\modules\addon_utils.py\", line 387, in enable mod.register()

File "C:\Users\xxx\Roaming\Blender Foundation\Blender\3.1\scripts\addons\Sollumz-main\__init__.py", line 36, register auto_load.register()

File "C:\Users\xxx\Roaming\Blender Foundation\Blender\3.1\scripts\addons\Sollumz-main\auto_load.py", line 37, in register bpy.utils.register_class(cls)

ValueError: register_class(...): allready registered as a subclass 'portalGizmoGroup'

What version of Sollumz are you installing?

Not a real issue, tested on Blender 3.1.2, using Sollumz 3614b45 and Sollumz (recommended version) 6e2ab97 from https://github.com/Ekinoxx0/Sollumz/tree/dev


[Bug]: SameFileError when running multiple tests

Bug Description
I have some insight about the initial issue I had brought up about the SameFileError: it only occurs when multiple tests are ran at the same time. For example, I can run each of these tests separately and they work fine, but there is an issue when I try to do all three together (error message pasted in the "Relevant log output").
Here is the buildspec that raised the issue, though it may be more efficient to create one that does a "Hello world":
buildspecs:
  abaqus_thermal:
    type: script
    executor: sawtooth.pbs.router
    description: Abaqus CFD Software
    tags: [benchmark, sawtooth, openmpi, abaqus, thermal]
    pbs:
     - "-l walltime=00:10:00"
     - "-l select=1:ncpus=1:mpiprocs=1"
    run: |
      module load openmpi/4.0.5_ucx1.9
      module load ABAQUS/2021hf6
      module load python/3.8-anaconda-2020.07
      source activate py2
      export MV2_ENABLE_AFFINITY=0
      mpirun -np 1 python /projects/hpc_intern/tests/sawtooth/abaqus/run_vnv.py -exe abq673 -thermal
  abaqus_standard:
    type: script
    executor: sawtooth.pbs.router
    description: Abaqus CFD Software
    tags: [benchmark, sawtooth, openmpi, abaqus, standard]
    pbs:
     - "-l walltime=00:10:00"
     - "-l select=1:ncpus=1:mpiprocs=1"
    run: |
      module load openmpi/4.0.5_ucx1.9
      module load ABAQUS/2021hf6
      module load python/3.8-anaconda-2020.07
      source activate py2
      export MV2_ENABLE_AFFINITY=0
      mpirun -np 1 python /projects/hpc_intern/tests/sawtooth/abaqus/run_vnv.py -exe abq673 -standard
  abaqus_explicit:
    type: script
    executor: sawtooth.pbs.router
    description: Abaqus CFD Software
    tags: [benchmark, sawtooth, openmpi, abaqus, explicit]
    pbs:
     - "-l walltime=00:10:00"
     - "-l select=1:ncpus=1:mpiprocs=1"
    run: |
      module load openmpi/4.0.5_ucx1.9
      module load ABAQUS/2021hf6
      module load python/3.8-anaconda-2020.07
      source activate py2
      export MV2_ENABLE_AFFINITY=0
      mpirun -np 1 python /projects/hpc_intern/tests/sawtooth/abaqus/run_vnv.py -exe abq673 -explicit```

### Version

devel

### Relevant log output

```shell
Polling Jobs in 12 seconds
________________________________________
Job Queue: ['5351903.sawtoothpbs', '5351904.sawtoothpbs', '5351905.sawtoothpbs']
Pending Jobs
________________________________________
+-----------------+---------------------+---------------------+----------+
|      name       |      executor       |        jobID        | jobstate |
+-----------------+---------------------+---------------------+----------+
| abaqus_thermal  | sawtooth.pbs.router | 5351903.sawtoothpbs |    Q     |
| abaqus_standard | sawtooth.pbs.router | 5351904.sawtoothpbs |    Q     |
| abaqus_explicit | sawtooth.pbs.router | 5351905.sawtoothpbs |    Q     |
+-----------------+---------------------+---------------------+----------+
Polling Jobs in 12 seconds
________________________________________
Job Queue: ['5351903.sawtoothpbs', '5351904.sawtoothpbs', '5351905.sawtoothpbs']
Pending Jobs
________________________________________
+-----------------+---------------------+---------------------+----------+
|      name       |      executor       |        jobID        | jobstate |
+-----------------+---------------------+---------------------+----------+
| abaqus_thermal  | sawtooth.pbs.router | 5351903.sawtoothpbs |    F     |
| abaqus_standard | sawtooth.pbs.router | 5351904.sawtoothpbs |    F     |
| abaqus_explicit | sawtooth.pbs.router | 5351905.sawtoothpbs |    F     |
+-----------------+---------------------+---------------------+----------+
Polling Jobs in 12 seconds
________________________________________
Job Queue: ['5351904.sawtoothpbs']
Completed Jobs
________________________________________
+-----------------+---------------------+---------------------+----------+
|      name       |      executor       |        jobID        | jobstate |
+-----------------+---------------------+---------------------+----------+
| abaqus_thermal  | sawtooth.pbs.router | 5351903.sawtoothpbs |    F     |
| abaqus_explicit | sawtooth.pbs.router | 5351905.sawtoothpbs |    F     |
+-----------------+---------------------+---------------------+----------+
Pending Jobs
________________________________________
+-----------------+---------------------+---------------------+----------+
|      name       |      executor       |        jobID        | jobstate |
+-----------------+---------------------+---------------------+----------+
| abaqus_standard | sawtooth.pbs.router | 5351904.sawtoothpbs |    F     |
+-----------------+---------------------+---------------------+----------+
Polling Jobs in 12 seconds
________________________________________
Traceback (most recent call last):
  File "/projects/hpc_intern/buildtest/bin/buildtest", line 17, in <module>
    buildtest.main.main()
  File "/projects/hpc_intern/buildtest/buildtest/main.py", line 76, in main
    cmd.build()
  File "/projects/hpc_intern/buildtest/buildtest/cli/build.py", line 570, in build
    self.builders = self.run_phase()
  File "/projects/hpc_intern/buildtest/buildtest/cli/build.py", line 870, in run_phase
    valid_builders = self.poll_jobs(poll_queue, valid_builders)
  File "/projects/hpc_intern/buildtest/buildtest/cli/build.py", line 1075, in poll_jobs
    builder_queue = self.buildexecutor.poll(poll_queue)
  File "/projects/hpc_intern/buildtest/buildtest/executors/setup.py", line 277, in poll
    executor.gather(builder)
  File "/projects/hpc_intern/buildtest/buildtest/executors/pbs.py", line 150, in gather
    builder.post_run_steps()
  File "/projects/hpc_intern/buildtest/buildtest/buildsystem/base.py", line 710, in post_run_steps
    self.copy_stage_files()
  File "/projects/hpc_intern/buildtest/buildtest/buildsystem/base.py", line 307, in copy_stage_files
    shutil.copy2(
  File "/apps/local/anaconda/3.8/lib/python3.8/shutil.py", line 432, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/apps/local/anaconda/3.8/lib/python3.8/shutil.py", line 241, in copyfile
    raise SameFileError("{!r} and {!r} are the same file".format(src, dst))
shutil.SameFileError: '/projects/hpc_intern/buildtest/var/tests/sawtooth.pbs.router/abaqus/abaqus_standard/0/abaqus_standard.o5351904' and '/projects/hpc_intern/buildtest/var/tests/sawtooth.pbs.router/abaqus/abaqus_standard/0/abaqus_standard.o5351904' are the same file

Reproduce Bug
1. Create a buildspec with three different queues that submits to PBS
2. Run the buildspec such that all three tests are queued
3. The error will occur after the tests are completed
...

Post question in Slack

[X] I agree that I posted my question in slack before creating this issue

Is there an existing issue

[X] I confirm there is no existing issue for this issue

@croodm i have a hotfix for this issue in this PR: https://github.com/buildtesters/buildtest/pull/841


install-snapshot: Comma separated "repo" is not parsed properly

I am trying to install builds from OSS liquibase and liquibase-pro. I followed the instructions in the readme and set up the plugin like this:
      - name: Install Snapshot Liquibase
        env:
          GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
        run: |
          mvn -B versions:set-property -Dproperty=liquibase-core.version -DnewVersion=0-SNAPSHOT
          mvn -B liquibase-sdk:install-snapshot \
            "-Dliquibase.sdk.branchSearch=${{ steps.extract_branch.outputs.branch }},master" \
            "-Dliquibase.sdk.repo=liquibase/liquibase,liquibase/liquibase-pro"
          buildOverview="$(mvn -B -q liquibase-sdk:get-build-info '-Dliquibase.sdk.buildInfo.outputKey=overview')"
          echo "::notice :: Installed Snapshot Liquibase $buildOverview"

but I get this error:
[INFO] Looking for s3-integration-tests,master from a run in liquibase,liquibase-pro
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.725 s
[INFO] Finished at: 2022-08-03T12:34:12Z
[INFO] ------------------------------------------------------------------------
Error:  Failed to execute goal org.liquibase.ext:liquibase-sdk-maven-plugin:0.9.1:install-snapshot (default-cli) on project s3-remote-accessor-extension: https://api.github.com/repos/liquibase/liquibase,liquibase-pro {"message":"Not Found","documentation_url":"https://docs.github.com/rest/reference/repos#get-a-repository"} -> [Help 1]

Configuring the plugin with the repo owner's name also causes the same error:
"-Dliquibase.sdk.repo=liquibase,liquibase-pro"

This is probably because the latest code hasn't been released yet.

Confirmed, this works as desired in db59d146e58a1dc0bf8e38182b306150ea63c4c7

This should be fixed in #3


Phi 2 model

Is there a way to load Phi 2 model?

Unfortunately its not possible to run the original phi-2 model on the browser with llm.js mainly due to the memory limitation on the WASM engine.


Request: Transform parking into extra lane, bike lane or sidewalk

Describe your idea
The tool will allow to transform parking lanes into:

Bike path
Sidewalk
Car lane

Notes or questions?
Tool name: "Transform parking lanes"

Duplicate of #515
@krzychu124 can u close 602

@Monniasza Apologies for not posting full response earlier (my gaming rig died so I was forced to use my TV for internet lol). We already had an issue #515 tracking ideas for a lane customiser tool so please subscribe to notifications on that issue if you want to track any future updates.


Excessive API call usage

It appears that the recommended configuration for this action will make 11 calls to the GitHub REST API per push and per language, which can add up quickly and make it too easy to reach the rate limit of 1000 calls per hour with the default Actions token.

getWorkflowPath() makes two calls, and seems to be called twice from github/codeql-action/init@v1.

It looks like one is constructing a cache key like ".github/workflows/filename.yml:jobid".
The other seems to be linting the job definition?

github/codeql-action/init@v1 then makes two calls to update the status.
github/codeql-action/autobuild@v1 also makes two calls to update the status.
github/codeql-action/analyze@v1 makes another two calls to update the status, plus one more in between to actually upload the results.

I'd expect just two or three calls to actually be needed: one (maybe) to update the status to "working" at the start, one to upload the results, and one to update the status to "completed" at the end.
If the cache key and linting are needed, could you convince the Actions team to supply the workflow file path via an environment variable or context property so you don't have to make two API calls to fetch it? It looks like they already conditionally provide this information in github.workflow (and maybe also GITHUB_WORKFLOW) if the workflow yaml file doesn't name the workflow itself.
FYI, this came up when I was working with GitHub Developer Support to try to figure out why we kept hitting the API rate limits, and I noticed that this action was responsible for a significant fraction of the calls. The support person suggested I report it to you directly.

Thanks for raising this issue. We haven't put much effort into minimizing API calls since this is the first we've heard that it can be a problem. With this in mind, we're doing a review of all the calls and seeing if there are some that can be dropped or merged.
With that in mind, are you running the code scanning workflow on every push to any branch? Our recommended setup is to run on push to the default branch, and also on pull request.

No. We're running it on pushes to master, pull requests targeting master, and a weekly cron. But since most of our pull requests target master and most of our pushes are updating PRs, that still winds up running on most pushes.
You can see our workflow yourself here.
P.S. You may want to review your documentation at https://github.com/github/codeql-action#usage, it shows a configuration that does run on every push and PR.

Hi @anomiex. We've made some changes to how our API rate limiting works that should hopefully help here. Specifically, calls to update the analysis status are fairly cheap so we have decided to exclude them from the normal API rate limiting. I hope this helps lessen the concern about CodeQL Action requests using up too much of the rate limit quota for your Actions token.
Hopefully we can also make more improvements in this regard in future; as you've suggested, having the workflow file available on the runner rather than having to fetch it from the API would seem very useful.

Fwiw, the fact that github.workflow is unreliable is a real thorn in my side. It'd be really nice if this team could tell the actions team that it should be published as a reliable variable (GITHUB_WORKFLOW_PATH) so that the rest of us could benefit from not having to beg.

Thanks for the feedback: as I understand it, the request is to expose an Actions context value and environment variable that consistently returns the full path to the workflow file within the repo, unlike github.workflow/GITHUB_WORKFLOW which returns the workflow name if there is one and the file path otherwise. We'll pass that on.
We have no further planned work on reducing API call usage after https://github.com/github/codeql-action/issues/567#issuecomment-870409715, and will remain careful to avoid introducing unnecessary API call overhead in future. With that in mind, I am closing this issue, but please file fresh issues for us if you encounter further trouble with API limits and we will be happy to investigate.


Option to change error message or use the argument key in argument method

@click.argument('--type', metavar='--type <message_type>')
def f(msg_type):
    pass

The above will fail because the type is passed as a keyword argument. The below will work:
@click.argument('--type', 'msg_type', metavar='--type <message_type>')
def f(msg_type):
    pass

but when --type is not passed from the command line the error text returned is:
Error: Missing argument "msg_type".
I don't want the user to see the msg_type key because this is for the program's internal use.
Is there a way to change the error text for argument?

You can subclass argument to change the behavior of the metavar if you want. You could also potentially subclass the error itself.
If this is still an issue for you in click 7 please reopen with a complete example.


Loading multiple avatars in desktop view slows down the client

Describe the bug
In large rooms, the client slows down because it has to load all the avatars. This only seems to happen in desktop view, when Participants list is visible, along with user avatars.

See performance issues as the command /users is loading.
See the yellow banner (in Firefox) saying "A web page is slowing down your browser".
Notice that shouldn't happen.

Expected behavior
There shouldn't be significant performance issues when loading a large amount of user avatars.
Environment:

OS: Manjaro ARM, Linux 5.10
Browser: Mozilla Firefox
Version: 84.0
IRC server software, name and/or version: Oragono 2.4.0.

Additional context
I'm experiencing the problem in my Pinebook Pro, which is not a very powerful computer, but this shouldn't happen anyway, there has to be some caching for avatars. The process of computing and loading avatars should be more efficient.

I'm not entirely sure how to fix this, but I wonder if it could be as simple as just showing the first 200 (?) participants and a "search" field. I'm not too fond of adding the search field though, so if anyone has input, then please let me know.
Maybe this is a good opportunity to add something like https://gitlab.com/catamphetamine/virtual-scroller

I'm not entirely sure how to fix this, but I wonder if it could be as simple as just showing the first 200 (?) participants and a "search" field. I'm not too fond of adding the search field though, so if anyone has input, then please let me know.
Maybe this is a good opportunity to add something like https://gitlab.com/catamphetamine/virtual-scroller

Fixed on v5.16!

The fix was caused by adding https://github.com/Nordaaker/convos/commit/8290b5313fcf418b691c1e48a082ccb6fed97e38#diff-c7f96b376f69fdc3cf178c699a4aef95339f1b2f8023a5545ef52acdf61c89ed
The change only updates the participant list, which is a local change instead of updating the whole user interface like it used to, when the participant list was part of store/Conversation.js


Use password-env to access password by env key

@toolmantim this was my thinking on how to handle the problem of "allow env to be used in plugin configuration without leaking it in pipeline.yml".

This is really similar to what I ended up with here: https://github.com/buildkite-plugins/calibre-buildkite-plugin

(btw now that Boomper is live, I'm removing the readme version check from the plugin linter)

I wonder if people would accidentally just add a $ sign beforehand, and set it to the literal value 😱

Almost certainly. I thought about ways to add syntax to pipeline.yml to deal with this specifically, but I couldn't think of either how it would be implemented or any prior art.


[Refactoring] Fix more wrong indentation. More PEP8 enforcement

Removed tabs

We can open this against the upstream now that CI is integrated there.


Make GPIO Port methods public

This change allows external code to assign pins to peripherals.
Prevents hotfixes like: https://github.com/akiles/embassy/blob/267ec334ac766097efb4c847c14b6e2fde44f9af/embassy-nrf/src/buffered_uarte.rs#L158-L164

Is there any chance of Nordic releasing an MCU with 3 or more GPIO ports? In that case this API wouldn't work anymore

Is there any chance of Nordic releasing an MCU with 3 or more GPIO ports? In that case this API wouldn't work anymore

You are right!
What we actually need is something like a fn psel_bits() -> u32 method for pins.
Closing for now.

What we actually need is something like a fn psel_bits() -> u32 method for pins.
Closing for now.


for loops should always iterate nonempty streams at least once

for should even iterate {finished} at least once, or throw. See https://github.com/ceylon/ceylon/issues/5866

Fixed.


Provide documentation on image contents

There should be a readme that provides clear documentation on what software is provided in the images, most importantly for the SDK images since they contain a variety of things.  We shouldn't require that consumers locate and parse through a Dockerfile to have an understanding of what they're getting.  As example, the contents of the VMs for Azure DevOps agents are nicely documented: https://github.com/microsoft/azure-pipelines-image-generation#image-contents.

Closing as the basic content is described in the readme which is available in GitHub and DockerHub.  A good example is the SDK readme - https://hub.docker.com/_/microsoft-dotnet-framework-sdk/


Update to v2.3.0

Checklist

[x] Used a personal fork of the feedstock to propose changes
[ ] Bumped the build number (if the version is unchanged)
[x] Reset the build number to 0 (if the version changed)
[ ] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[ ] Ensured the license file is being packaged.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.
I do have some suggestions for making it better though...
For recipe:

noarch: python recipes are recommended to have a lower bound on the python version. This recommendation will become a requirement in the future.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@conda-forge-admin, please rerender

@chengzhuzhang, it looks like a test is failing.  We may need to patch the release to fix this:

/home/conda/feedstock_root/build_artifacts/e3sm_diags_1606894934352/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/lib/python3.9/site-packages/cdutil-v3.0_40_g524a4f5-py3.6.egg/cdutil/region.py:140: UserWarning: Only axis bounds (min, max) can be specified for axis, other arguments are ignored.
/home/conda/feedstock_root/build_artifacts/e3sm_diags_1606894934352/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/lib/python3.9/site-packages/acme_diags/driver/qbo_driver.py:77: RuntimeWarning: divide by zero encountered in true_divide
  period = 1 / frequency
/home/conda/feedstock_root/build_artifacts/e3sm_diags_1606894934352/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/lib/python3.9/site-packages/acme_diags/driver/qbo_driver.py:81: ComplexWarning: Casting complex values to real discards the imaginary part
  psd_sumN[ilev] = 2 * np.nansum(fyy[(period <= 40) & (period >= 20)])
/home/conda/feedstock_root/build_artifacts/e3sm_diags_1606894934352/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/lib/python3.9/site-packages/acme_diags/driver/qbo_driver.py:129: RuntimeWarning: divide by zero encountered in true_divide
  period0 = 1 / frequency0
/home/conda/feedstock_root/build_artifacts/e3sm_diags_1606894934352/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/lib/python3.9/site-packages/acme_diags/driver/qbo_driver.py:137: RuntimeWarning: invalid value encountered in multiply
  Pxf0 = period_end0 * np.sum(psd_x0)
/home/conda/feedstock_root/build_artifacts/e3sm_diags_1606894934352/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/lib/python3.9/site-packages/acme_diags/plot/cartopy/qbo_plot.py:97: UserWarning: This figure includes Axes that are not compatible with tight_layout, so results might be incorrect.
  plt.tight_layout()
Traceback (most recent call last):
  File "/home/conda/feedstock_root/build_artifacts/e3sm_diags_1606894934352/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/lib/python3.9/site-packages/acme_diags/acme_diags_driver.py", line 275, in run_diag
    single_result = module.run_diag(parameters)
  File "/home/conda/feedstock_root/build_artifacts/e3sm_diags_1606894934352/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/lib/python3.9/site-packages/acme_diags/driver/streamflow_driver.py", line 95, in run_diag
    gauges_path = '/{}/GSIM/GSIM_catchment_characteristics_all_1km2.csv'.format(parameter.reference_data_path.strip('/'))
AttributeError: 'StreamflowParameter' object has no attribute 'reference_data_path'
No handles with labels found to put in legend.
TestAllSets.results_dir=all_sets_results_test/
............all_sets_results_test/qbo/qbo-test/qbo_diags.png
..F..
======================================================================
FAIL: test_streamflow (test_diags.TestAllSets)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/conda/feedstock_root/build_artifacts/e3sm_diags_1606894934352/test_tmp/tests/system/test_diags.py", line 265, in test_streamflow
    self.check_streamflow_plots()
  File "/home/conda/feedstock_root/build_artifacts/e3sm_diags_1606894934352/test_tmp/tests/system/test_diags.py", line 174, in check_streamflow_plots
    self.assertTrue(os.path.exists(full_png_path))
AssertionError: False is not true

----------------------------------------------------------------------
Ran 17 tests in 106.721s

FAILED (failures=1)
Tests failed for e3sm_diags-2.3.0-pyhd8ed1ab_0.tar.bz2 - moving package to /home/conda/feedstock_root/build_artifacts/broken
WARNING:conda_build.build:Tests failed for e3sm_diags-2.3.0-pyhd8ed1ab_0.tar.bz2 - moving package to /home/conda/feedstock_root/build_artifacts/broken
WARNING conda_build.build:tests_failed(2895): Tests failed for e3sm_diags-2.3.0-pyhd8ed1ab_0.tar.bz2 - moving package to /home/conda/feedstock_root/build_artifacts/broken
TESTS FAILED: e3sm_diags-2.3.0-pyhd8ed1ab_0.tar.bz2
##[error]Bash exited with code '1'.
Finishing: Run docker build

If you don't immediately know what is wrong, let's fix this tomorrow.

This is expected because the test data is not available. We don't want to upload the data to github any more.  We will have another PR to address this testing problem. The tests all passed locally, with data paths provided.

This is expected because the test data is not available. We don't want to upload the data to github any more. We will have another PR to address this testing problem. The tests all passed locally, with data paths provided.

I agree that the data for tests shouldn't be on GitHub if it's big.  But it's also a problem if these tests don't work without it.  I can disable the offending test with a patch here this time but it will be important in the future that all tests pass.  If the data isn't on GitHub, the test should be capable of downloading it from where it is hosted before running.  Or there should be a separate set of tests requiring local data that we do not try to run here.

@xylar I don't think the Disable test_streamflow is sufficient to make the tests pass. All references to streamflow also have to be removed. (Deletes lines 275-295 in all_sets.cfg -- https://github.com/E3SM-Project/e3sm_diags/blob/master/tests/system/all_sets.cfg#L275. Also remove references to streamflow in lines 50-55 of test_run.py -- https://github.com/E3SM-Project/e3sm_diags/blob/master/tests/test_run.py#L50.)

@xylar I can merge the test changes for e3sm_diags but I'm not sure how that gets translated to this conda-forge feedstock.

@forsyth2 The commit xylar had should work. I tested as well.

@chengzhuzhang Oh interesting, thanks. I tried locally and that commit is fine to make the tests pass. I think my environments on Cori and Compy might just be picking up older versions -- I'll investigate.

@forsyth2 the reality is that the tests did pass when I took out test_streamflow or I wouldn't have merged.  I'm a little worried that the failing test indicates an actual problem.
There are 2 ways of updating conda-forge.  We can add another patch to the code like the one that disabled the test.  Or you can make a new release.  I always prefer new releases.

@xylar Alright, it looks like it was a problem on my end, so I won't worry about commenting out all the streamflow test related code now. We're planning to move all the testing data to a new location before the next release anyway.

We're planning to move all the testing data to a new location before the next release anyway.

That's a really good idea.  In general, e3sm_diags could use having all those big binary files scrubbed from its commit history.  It take ages and lots of bandwidth to clone.


Add support for eden_version input in test workflow

When the workflow is triggered from the outside, action/checkout defaults to checking out the latest master which is not always desired. For better compatibility with older EVE release the user should be able to specify the version of eden to be used in the test workflow. If no version is specified, the workflow should resert to the default behavior.

@uncleDecart this is a WIP, I want to run the tests and see if this implementation works. For the cause of this change see the discussion with @eriknordmark here

@europaul Ideally, when referencing workflow in EVE here it should reference and use eden files specified in that branch. There was a bug in checkout I thought I fixed it here

@uncleDecart you are right! But I assume we still haven't found a solution how to backport the fix to 0.9.2 - this is why the jobs are failing. How about creating a branch from 0.9.2, perhaps calling it something similar, backporting the commit with the fix to that branch and then referencing the branch in EVE's 11.0-stable

make sense

One yetus failure:

@uncleDecart it looks like the solution from here doesn't work. See latest comments on the issue  and our own test results
Should we use the one proposed in the current PR instead?

Looks good to me, but right now we can't see if it's working or not. I'll create small example to check it out and let you know

@europaul works. I'd suggest we bump checkout to v4, since there's no reason to use 3.5.3 anymore and let's merge this and backport to 0.9.2-stable branch so that we can point EVE 11-stable to 0.9.2-stable Eden (in case we need any other backporting)

@europaul works. I'd suggest we bump checkout to v4, since there's no reason to use 3.5.3 anymore and let's merge this and backport to 0.9.2-stable branch so that we can point EVE 11-stable to 0.9.2-stable Eden (in case we need any other backporting)

I think we can leave the checkout version as it is - we still use v3 for all the other workflows for example and I don't see any new features in the latest release that we would need.

@europaul updating to v4 makes sense, because they update to node20, since node16 EOL is 11 sept. 23


How to run the MATLAB script?

I know this might sound silly but I can't figure out how to actually run a .m file I have open. Is there anything in the GUI or is it console-run?

When you have installed the extension, you open a matlab-File. Then press "CTRL+SHIFT+P" and the commmand window open. Then you type in, run matlab File. Which matlab terminal is opening depends on your configuration in the extensions setting.
I will write an example on how to use the extension soon.

So the Matlab Terminal opens in Windows (forgot to answer that question, sorry)

And the Extension isn't supported in Windows RN

Okay, just waiting for that then I suppose.


extra semicolon with SQLDatabaseChain when used with Oracle

System Info
SQLDatabaseChain is appending a semicolon to created SQL. which is not liked by cx_oracle (or Oracle database by implication) - since it appends another semicolon in the end. making two semicolons in effect and causing error
sqlalchemy.exc.DatabaseError: (cx_Oracle.DatabaseError) ORA-00933: SQL command not properly ended
https://cx-oracle.readthedocs.io/en/latest/user_guide/sql_execution.html
Need a way to control this behavior.
https://python.langchain.com/en/latest/modules/chains/examples/sqlite.html#
Who can help?
No response
Information

[X] The official example notebooks/scripts
[ ] My own modified scripts

Related Components

[ ] LLMs/Chat Models
[ ] Embedding Models
[ ] Prompts / Prompt Templates / Prompt Selectors
[ ] Output Parsers
[ ] Document Loaders
[ ] Vector Stores / Retrievers
[ ] Memory
[ ] Agents / Agent Executors
[ ] Tools / Toolkits
[X] Chains
[ ] Callbacks/Tracing
[ ] Async

Reproduction
Steps:
from langchain import OpenAI, SQLDatabase, SQLDatabaseChain
import cx_Oracle
db = SQLDatabase.from_uri("oracle://ora-user-name:ora-user-password@ora-host-name:1521/service")
llm = OpenAI(temperature=0, verbose=True)
db_chain = SQLDatabaseChain.from_llm(llm, db, verbose=True)
db_chain.run("How many employees are there?")
sqlalchemy.exc.DatabaseError: (cx_Oracle.DatabaseError) ORA-00933: SQL command not properly ended
[SQL: SELECT COUNT(*) FROM YOUR_TABLE_NAME;]
(Background on this error at: https://sqlalche.me/e/20/4xp6)
Expected behavior
Need a way to optionally suppress a semicolon being appended. or if it could be avoided in favor of cx_oracle - since it doesnt like a semicolon anyways in SQL

Generated by a 🤖
Answer
To prevent LangChain's SQLDatabaseChain from appending an extra semicolon when used with Oracle and cx_Oracle, you can modify the _call method of the SQLDatabaseChain class. In the _call method, after generating the SQL command, you can remove the extra semicolon before executing the query. Here's the modified code snippet:
sql_cmd = self.llm_chain.predict(
    callbacks=_run_manager.get_child(),
    **llm_inputs,
).strip()

# Remove extra semicolon if using Oracle and cx_Oracle
if self.database.dialect == "oracle":
    sql_cmd = sql_cmd.rstrip(";")

# Continue with the rest of the code

Add this code snippet right after the sql_cmd is generated in the _call method of the SQLDatabaseChain class. This will remove the extra semicolon when using Oracle and cx_Oracle.
Source

langchain/chains/sql_database/base.py

This response is meant to be helpful and save users time. It is not meant to be a precise solution.
Please leave a 👍 if this is helpful and 👎 if it is irrelevant

Thank you for a quick response.
I used a workaround in the interim. Worked for me since I am strictly Oracle based.
sqlchain\Lib\site-packages\sqlalchemy\engine\default.py def do_execute(self, cursor, statement, parameters, context=None):         new_statement = statement.rstrip(';')         cursor.execute(new_statement, parameters)
Your solution is much safer.
`sqlchain\Lib\site-packages\langchain\chains\sql_database\base.py
if self.database.dialect == "oracle":
sql_cmd = sql_cmd.rstrip(";")
`


How to make a widget moving(change its position) iteratively?

I want to make a widget change its position many times by looping after clicked.
I have tried using a for loop, but when I click the widget, it just move to the final position after the whole loop is done.
Any idea to make this possible?

Hello @hcygeorge  , you should do it in a thread. Such thread can be initiated by the button click. When you make changes to a widget by a separate thread you must use the update_lock to prevent concurrent access. Here is an example, here a label and a progress_bar are update by a thread
import remi.gui as gui
from remi import start, App
import threading
import time

class MyApp(App):
    def __init__(self, *args):
        super(MyApp, self).__init__(*args)

    def main(self):
        # margin 0px auto allows to center the app to the screen
        wid = gui.VBox(width=300, height=200, margin='0px auto')
        self.lbl = gui.Label('Thread status', width='80%', height='50%')
        self.lbl.style['margin'] = 'auto'

        self.progress_bar = gui.Progress()

        wid.append(self.lbl)
        wid.append(self.progress_bar)

        # Here I start a parallel thread that executes my algorithm for a long time
        t = threading.Thread(target=self.my_intensive_long_time_algorithm)
        t.start()

        # returning the root widget
        return wid

    def my_intensive_long_time_algorithm(self):
        time.sleep(3.0)

        #use the update lock when you want to change a widget
        with self.update_lock:
            self.lbl.set_text('Algorithm started')
            self.progress_bar.set_value(1)

        #DO other activities outside the update lock, otherwise the widgets are not updated
        #here you can do your calculations, I use a sleep to simulate calculations time
        time.sleep(1.0)

        #use the update lock when you want to change a widget
        with self.update_lock:
            self.lbl.set_text('Algorithm 20%')
            self.progress_bar.set_value(20)

        #DO other activities outside the update lock, otherwise the widgets are not updated
        #here you can do your calculations, I use a sleep to simulate calculations time
        time.sleep(1.0)

        #use the update lock when you want to change a widget
        with self.update_lock:
            self.lbl.set_text('Algorithm 40%')
            self.progress_bar.set_value(40)

        #DO other activities outside the update lock, otherwise the widgets are not updated
        #here you can do your calculations, I use a sleep to simulate calculations time
        time.sleep(1.0)

        progress = 40
        for i in range(0, 10):
            #use the update lock when you want to change a widget
            with self.update_lock:
                self.lbl.set_text('Now executing a for statement')
                progress += 11
                self.progress_bar.set_value(progress)

            #DO other activities outside the update lock, otherwise the widgets are not updated
            #here you can do your calculations, I use a sleep to simulate calculations time
            time.sleep(0.5)

        #DO other activities outside the update lock, otherwise the widgets are not updated
        #here you can do your calculations, I use a sleep to simulate calculations time
        time.sleep(1.0)

        #use the update lock when you want to change a widget
        with self.update_lock:
            self.lbl.set_text('Algorithm terminated')
            self.progress_bar.set_value(100)

if __name__ == "__main__":
    start(MyApp, debug=True, address='<IP_ADDRESS>', port=0, update_interval=0.1)


How to leverage kube-batch via python SDK

Is this a BUG REPORT or FEATURE REQUEST?:
/kind feature
What happened:
I am a newcomer in k8s CRD (but familiar with k8s itself), can anyone tell me how to leverage kube-batch via python SDK, which means:
how to use python SDK to perform action like kubectl create/delete on podgroup?
I check the k8s native sdk and the tutorial but don't find the useful interface/guidance

hm... we need to ask k8s python-client on how to generate CRD client. kube-batch will use this python client :)

Hi @k82cn
Sorry but I may confuse on your answer, do you mean that currently we have NO approach to leverage kube-batch (CRUD pod group) via python SDK, only kubectl CLI is available?

Oppps, I just find
kubernetes.client.CustomObjectsApi which should work!
May you give some sample for this, in kube-batch usage?

ok, sure; we'll introduce some doc for it :)

Thanks :)


ciao: Add ciao_cleanup.yml playbook

This playbook cleanups a ciao cluster

Signed-off-by: Alberto Murillo<EMAIL_ADDRESS>

If it's under examples dir, I'd add the cleanup of mariadb and keystone in order to do a full cleanup.

LGTM


Default is not selected properly for AJAX case

The default select2 works, and also select2 with ajax and some custom formatting works fine.
But once you combine them in an edit view (or after form submission), the selected value still selected in DOM is not put back into the select2 display field.
This should not be the case as it makes those actions not work with this element.
	$(document).ready(function() {
		$('.user-select-admin').select2({
			ajax: {
				url: '<?php echo $this->Url->build(['plugin' => false, 'prefix' => 'admin', 'controller' => 'Members', 'action' => 'search', '_ext' => 'json']); ?>',
				dataType: 'json',
				delay: 250,
				data: function (params) {
					var queryParameters = {
						q: params.term
					};

					return queryParameters;
				},
				processResults: function (data, params) {
					return {
						results: data.users
					}
				}
			},
			placeholder: "<?php echo __('Select a user'); ?>",
			minimumInputLength: 2,
			templateResult: userFormatResult,
			templateSelection: userFormatSelection,
		});

	});

	function userFormatResult(user) {
		markup += "" + user.username + "";
		if (user.gender == 1 || user.gender == 2) {
			markup += ' (' + (user.gender == 2 ? 'F' : 'M') + ')';
		}

		return markup;
	}

	function userFormatSelection(user) {
		return user.username;
	}

Once you searched it will select again as per normal AJAX handling.
But the default ("demo") is not selected, leaving an empty/blank field from the start (which is incorrect):
<select name="user_id" class="user-select-admin form-control" required="required" id="user-id">
    <option value=""> - [ bitte auswählen ] - </option>
    <option value="1e7fb971-2fd4-4b00-9988-7c29ac1f0dbe" selected="selected">demo</option>
</select>

This seems to be a bug in the init process of AJAX as select type.

Without select2:

Select2 added becomes:

(on page load)

So, it turns out that the user.text is the trick.
Maybe the docs should be a bit more clear on the necessity of this specific check.
		function userFormatResult(user) {
			if (user.loading) return user.text;
			markup = "" + user.username + "";
			if (user.gender == 1 || user.gender == 2) {
				markup += ' (' + (user.gender == 2 ? 'F' : 'M') + ')';
			}

			return markup;
		}

		function formatRepoSelection(user) {
			return user.username || user.text;
		}

For me, it felt like text property was also a field on the user, like username, gender and alike and does not magically represent the text from the select field.

For me, it felt like text property was also a field on the user, like username, gender and alike and does not magically represent the text from the select field.

Good news, this is documented at the section about The Select2 data format.

This appears to be more of a usage question than a bug report or common feature request.  As we continue to keep the Select2 issue tracker geared towards these two areas, bug reports and common feature requests, we are redirecting usage questions to other communities such as the mailing list, IRC, or Stack Overflow.


Some files have DOS-style line endings, some have Unix style

src/parse/tokentree.hpp, and src/parse/ttstream.hpp, for example.

I'll open a PR changing all DOS line endings to unix, and removing trailing whitespace.

ast/types.cpp is unix, while ast/types.hpp is dos 😝


Error loading HTML editor 9.4.1

Description of bug
Receiving a page load error when trying to edit HTML.
An error has occurred. DotNetNuke.Services.Exceptions.ModuleLoadException: Value cannot be null. Parameter name: source ---> System.ArgumentNullException: Value cannot be null. Parameter name: source at System.Linq.Enumerable.Any[TSource](IEnumerable1 source, Func2 predicate) at DNNConnect.CKEditorProvider.Utilities.SettingsUtil.CheckSettingsExistByKey(List`1 editorHostSettings, String key) at DNNConnect.CKEditorProvider.Web.EditorControl.LoadAllSettings() at DNNConnect.CKEditorProvider.Web.EditorControl.CKEditorInit(Object sender, EventArgs e) at System.Web.UI.Control.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.AddedControl(Control control, Int32 index) at System.Web.UI.ControlCollection.Add(Control child) at DotNetNuke.UI.UserControls.TextEditor.OnLoad(EventArgs e) --- End of inner exception stack trace
Affected version

[ ] 10.0.0 nightly build
[ ] 9.4.1 nightly build
[ X] 9.4.1 latest supported release

I cannot reproduce on a clean or upgraded installation.
From the looks of it, it is something do do with the CkEditor provider settings.
Do you have more info in the Admin Log or in the /Portals/_default/logs folder ?
Anything else you may think is out of the ordinary on this site compared to a new install ?

Looks like it was a cache issue after upgrading to 9.4.1. It'working now.

Awesome, thanks for reporting back :) Closing the issue now.


WinHttp client can't connect to nbio TLS server

This is something I am trying to figure out. No problems with any other clients, but we have one developer that has a c++ app that is using winhttp api to establish a websocket to my nbio TLS server and it appears the nbio server isn't reading the client tls key exchange packet, it is re-sending the 'server Hello done' after a tcp timeout. The client is able to connect to a very basic gorrilla tls websocket server I wrote simply to determine if the problem is isolated to nbio

I also add that winhttp is successfully connecting when tls is disabled in the client and server

here is a pcap stream of the connection
example.pcapng.gz

here is a pcap stream of the connection
example.pcapng.gz

I tried this client with VersionTLS12, it works fine. working on it.
tlsConfig := &tls.Config{
	InsecureSkipVerify: true,
	MinVersion:         tls.VersionTLS12,
	MaxVersion:         tls.VersionTLS12,
}

problem located here:
https://github.com/lesismal/llib/blob/master/std/crypto/tls/handshake_server.go#L868
working on it.

fixed:  https://github.com/lesismal/llib/commit/d120a1b3a60c2db4d9a0d4f7d5e894ef2fa5c5c3
sorry for this stupid enum state value

NP, thanks for figuring it out. Appears to work for the simple test clients servers; will test with my larger app shortly. Any idea as to why this bug wasn't preventing other clients from connecting via tls?

NP, thanks for figuring it out. Appears to work for the simple test clients servers; will test with my larger app shortly. Any idea as to why this bug wasn't preventing other clients from connecting via tls?

for tls1.2, the server side returns before send changeCipherSpec msg due to a wrong value of stateServerHandshakeSendFinished2:
https://github.com/lesismal/llib/blob/master/std/crypto/tls/handshake_server.go#L1006

I also have two commits to optimize batch write during tls handshake after https://github.com/lesismal/llib/commit/d120a1b3a60c2db4d9a0d4f7d5e894ef2fa5c5c3
then we get these batch packets in Wireshark:

the handshake messages were sent separately before as we got in your pre example:

Any idea as to why this bug wasn't preventing other clients from connecting via tls?

only versions below 1.3 are affected, if other clients support 1.3, server and client will select 1.3.
and maybe some other clients using tls version below 1.3 change the ticket https://github.com/lesismal/llib/blob/master/std/crypto/tls/handshake_server.go#L135
then would not enter this bug branch:
https://github.com/lesismal/llib/blob/master/std/crypto/tls/handshake_server.go#L164
need more debug for details.


API to disable bracket pair colorization for specific ranges

This is related to an issue reported against the C/C++ Extension: https://github.com/microsoft/vscode-cpptools/issues/10022
The C/C++ Extension can dim/color ranges associated with disabled C/C++ conditional preprocessor ranges.  When this range includes one or more single-brackets, pairs are mismatched.

hey there I can fix this;

#149552 is a similar problem.

how can fix this?

how to fix this?


Provide API on Harbor to fetch scan result.

include both overview and result.
The details of API and implementation is TBD.

Fixed in #2572 #2525


feat: Integrate Arweave into gallery page

Don't know how to get the reputation and stake for a trading post - I'd assume this would be from the DAO?

Reputation will be calculated on the frontend, and stake will be an ArQL call.
CC @zorbyte (how to get stake?)

@t8 What exactly is this "calculation". Let's chat in discord 😄

Here is my proposed reputation calculation:

This is completely up for discussion, and I'm interested to hear others' opinions on this!
CC @samcamwilliams

@ anyone that's following along: Just switched over from using ArQL to the new Arweave GraphQL endpoint.
There might be some merge conflicts once #23 is merged (dependencies etc), but we'll cross that bridge when we get there 😅
@martonlederer Would love some help with infinite loading and polishing the design 😄

I propose that we merge this before merging #23 and fix merge conflicts from that PR.
I also created the dev branch for the purpose of finishing MVP 1 before merging into master. (Master has a visually functioning demo at this point in time)

I've gone ahead and merged this.
Still need to pull the reputation and stake for a trading post.
The design should also be updated, with infinite loading as well 😄


Update links to docs after successful project creation via CLI

WHY are these changes introduced?
Fixes #524
This PR adds a couple more links to documentation when scaffolding out a new project via CLI.

Before
After

Checklist

[x] I've read the Contributing Guidelines
[x] I've considered possible cross-platform impacts (Mac, Linux, Windows)
~[ ] I've added a changeset if this PR contains user-facing or noteworthy changes~
~[ ] I've added tests to cover my changes~
~[ ] I've added or updated the documentation~

🚢


add bind-prop

Background
Turns out that properties and attributes differ in that an attribute is the initial value whereas the property is the dynamic value.

$ accessor
return value

elem.checked
(Boolean) Will change with checkbox state

$( elem ).prop( "checked" )
(Boolean) Will change with checkbox state

elem.getAttribute( "checked" )
(String) Initial state of the checkbox; does not change

for more info, see 'Attributes vs. Properties' here: http://api.jquery.com/prop/
Why add this?
This would generally be a nice thing to have, but specifically it would allow for binding properties of https://styleguide.myshopify.com/components/form UI components such as indeterminate on checkboxes.
@qq99 @pushrax @maartenvg @katdrobnjakovic

cc @Shopify/tnt

I think rather than building this in, we should consider removing jQuery. Before discussing the actual PR, what do people think of that?

I think rather than building this in, we should consider removing jQuery. Before discussing the actual PR, what do people think of that?

@tmlayton tried that and ran into a heap of complications. I think it’s a laudable goal, though.

I think rather than building this in, we should consider removing jQuery. Before discussing the actual PR, what do people think of that?

@pushrax I support it in principle, but honestly with the time sensitivity of what I need this for, I really don't want to see this get side tracked.

@richardmonette would you be able to spin up a codepen that shows this in use?

I support pushing this in now, and trying again at jQuery at a later date

The trouble is that adding this now will make the jQuery :fire: more difficult later. If you need it urgently then we can deal with that though.

@nwtn http://codepen.io/anon/pen/dMOqON

Cool, thanks @richardmonette. Once the questions about the tests are resolved, I’m :+1:

OK, so not using $.prop and tests updated accordingly.

:+1:

So, just to confirm, you can't use bind-indeterminate in this case? In fact where do we need bind-attribute that bind-<x> doesn't work? I assume due to a module returning a large set of attributes to bind?
Can we change bind-attribute to perform the functionality in this PR instead?

In fact, where do we need bind-attribute that bind- doesn't work?

bind-disabled isn't a thing

bind-disabled isn't a thing

I assume you mean bind-attribute, and if you do then we should just add it here.

Oh but apparently doing el.disabled = true actually sets the property. tg-remote-noserialize is one where el['tg-remote-noserialize'] = true wouldn't work

bind-attribute has been used in the past for adding non-standard attribute such as tg-remote-noserialize to DOM nodes (which prevents serialization of the children) nodes.

Just to make sure I'm on the same page:

node[x] is a property
node.attributes[x] is an attribute

I don't believe there is another way to set disabled than through node.disabled.
I see what you mean about custom attributes names though. I'd rather have bind-attributes than dynamically created binding attributes.

I thought disabled could be set via attribute?

Going back to this PR though, can we just add indeterminate to the list of properties?

Agreed. It's weird having both a generic and a list of specific prop-setters. So unless we deprecate most or all currently defined properties, there's not much we gain by adding a generic solution.

Closing in favour of https://github.com/Shopify/twine/pull/61


Volume Slider seen by HomeKit as a light

When I set up the plugin, HomeKit sees the volume slider as a light.  This becomes a problem when I ask Siri to turn off the lights when I'm watching the TV and she mutes the TV.  There is no way to change it in HomeKit settings and the only option I see in the plugin settings is to just ignore the slider entirely.  Is there a way to make HomeKit see it as a volume slider instead of a light dimmer?

Unfortunately that is not possible, plugins for homebridge are not able to to use the homekit volume slider. For this reason as a workaround the the volume is represented as a light bulb.

Unfortunately that is not possible, plugins for homebridge are not able to to use the homekit volume slider. For this reason as a workaround the the volume is represented as a light bulb.

Thanks for the quick reply.  Hopefully this will be fixed in a future update.  Nice plugin.  Otherwise it works great.

mb as Fan?

As fan would be possible but i have no plans currently to add that as it would introduce complexity

I change the code to the fan every time after the update) so I would really like to add this function. Thanks for the plugin

Will see what I can do👍

I change the code to the fan every time after the update) so I would really like to add this function. Thanks for the plugin

Could you share the code please? Does it work with siri as the light bulb doesnt seem to.


Dist folder not available in release

"dist/substance.cjs.js" is declared as "main" in package.json. This file or folder is not available/released.

Are you using the npm release? This is not working if you just depend on the Git repo, because it does not contain the bundled and transpiled files.

In package.json if you use:
{
  ...
  "substance": "1.0.0-beta.5.8"
}

it should work.

Yeah your'e right.
I required substance in a completely new project and it worked.
Must be some old other issues with the project.. thanks


Harry/try wait

running CI

This change is

Sorry not ready for review yet, wanted to run CI and got the target repo wrong.

@harrysarson I think you can open a draft PR, which will run the CI while being unmergeable until you convert it as a normal PR.


renderPretty is broken

Current Behaviour
For the following Kriti template:
{"name": {{$.user.name}}, "age": {{$.user.age}} }

If I parse the above template and try to render it using renderPretty, I get the following:
ghci> import Kriti.Parser
ghci> x = parser "{\"name\": {{$.user.name}}, \"age\": {{$.user.age}} }"
ghci> fmap renderPretty x
Right "{{age: $.user.age,name: $.user.name,}}"

Now, if I try parsing the rendered template, I get the following error:
ghci> parser "{{age: $.user.age,name: $.user.name}}"
Left (UnexpectedToken (Loc {getSpan = Span {start = AlexSourcePos {line = 0, col = 36}, end = AlexSourcePos {line = 0, col = 38}}, unLoc = TokSymbol (Loc {getSpan = Span {start = AlexSourcePos {line = 0, col = 6}, end = AlexSourcePos {line = 0, col = 7}}, unLoc = SymColon})}) "{{age: $.user.age,name: $.user.name}}")

Ideal behavior
The render of a parsed template should be the same as the original template.

It looks like there is definitely a bug in the pretty printer. We can and should fix this.
However, exact printing is a Hard problem and usually isn't needed. There is an inevitable loss of information in the parsing process. For example. when lexing we discard white-space and comments.
The standard we try to adhere to is: parse (prettyPrint term) == term. We should have roundtrip parsing tests like this. I was working on some a while back but it looks like they never got merged.


⚠ Bofrost.lu has degraded performance

In 86e328d, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1193 ms

Resolved: Bofrost.lu performance has improved in fcb0b2c after 8 minutes.


show admin notice when permalink structure is plain

Fixes #609
Proposed changes:
This displays an admin notice if the permalink structure is plain.  This is because the plugin cannot function correctly with such a permalink structure, it prevents webfinger from working.
Other information:
Tests have been added.
Implementation notes
I am not sure about the implementation.  The admin notice is pretty bold.  Perhaps a more subtle notice makes sense?
The implementation is designed to allow for many warnings.  At the moment there is only this one.  I imagine in future other issues could be detected here.  For example there is currently conflicts with the One User Avatar and Comment Like Dislike plugins.  This would be an appropriate mechanism to flag those issues.
Testing instructions:
Testing:

Create a fresh wordpress instance, but do not set a permalink structure.
Install the activitypub plugin
Observe administrator console.  An error about the permalink structure should be displayed.
Change the permalink structure to anything else.
Observe that the error has disappeared.

Thanks @mexon 😊

Oh merged already 😀  Thanks for the tidy-up!

I hoped to release the new version before Xmas so I was in hurry, but I think I have to test a bit more!


Files Get and Glob add new lines. Impossible to use as documented for secrets.

This will not work:
apiVersion: v1
kind: Secret
metadata:
  name: very-secret
type: Opaque
data:
{{ (.Files.Glob "bar/*").AsSecrets | indent 2 }}

A new line is added to the contents of the file by Glob (and Get for that matter). Lost 4 hours of my life debugging this.

Submitted PR to fix this, input appreciated!

We've reverted this change due to breaking the Prometheus charts that expected this behaviour. Because this is expected behaviour we cannot change this, so we're gonna have to keep this one closed as intentional for Helm 2, but keep it open for Helm 3.

fixed in Helm 3: https://github.com/helm/helm/blob/da729446116954bcb074bd4da742c3e9593f1f10/pkg/engine/files_test.go#L42-L67

I seem to be having a related issue in 3.  When using --set-file, it appears to append a newline, file does not have it.

@ronaldpetty It might be worth raising a new issue describing your issue.


Using pagination

Hi all.
I'm trying to understand how I can use the pagination when requesting info to the other part.
When I make the call, the response contains the nextPageUrl but I don't know how to use it in the next request.
Thanks a lot!!!

Hi there!
Next page url should contain the exact url to fetch the next page (GET request). I don't know if it answers your question

I understand, in the lib, there is currently no way to use nextPageUrl. We may add a way for the client to take advantage of this. We could add a method "getLocationsFromNextPageUrl" for example.
As of now, the only way is to use getLocations(). Pseudo code using it would look like this (it does not handle errors, and may not be 100% correct, but it's an idea)
locations = mutableListOf()

result = getLocations(from, to, 0, limit)
locations.addAll(result.data)

(result.limit .. result.totalCount step result.limit).forEach { newOffset ->
    locations.addAll(
        getLocations(from, to, newOffset, limit).data
    )
}

I've used a different approach:
            var r: OcpiResponseBody<SearchResult<Location>>

            var paginationLimit = DEFAULT_PAGINATION_LIMIT
            var offset = 0

            do {
                r = client.getLocations(null, null, offset, paginationLimit)
                r.data?.list?.forEach { location ->
                    locationsService.putLocation(location.countryCode, location.partyId, location.id, location)
                }
                paginationLimit = r.data?.limit ?: DEFAULT_PAGINATION_LIMIT
                offset += r.data?.list?.count() ?: 0
            } while ( ! r.data?.nextPageUrl.isNullOrBlank())

because the totalCount may change during the process.
I'll try to implement the request using the nextPageUrl as I understand it's the correct way.
Thanks!!!

Yes you are right, totalCount may change if the partner creates new Locations during your polling. Otherwise it should always stay the same
Your approach works indeed ;)

What do you think about this approach? If you all like this implementation, I'll make a PR to implement it in all the clients.
LocationsEmspClient:
    suspend fun getLocationsNextPage(
        previousResponse: OcpiResponseBody<SearchResult<Any>>
    ): OcpiResponseBody<SearchResult<Any>>? =
        previousResponse.data?.nextPageUrl?.let { nextPageUrl ->
            with(transportClientBuilder.build(nextPageUrl)) {
                send(
                    HttpRequest(
                        method = HttpMethod.GET
                    )
                        .withRequiredHeaders(
                            requestId = generateRequestId(),
                            correlationId = generateCorrelationId()
                        )
                        .authenticate(partnerRepository = partnerRepository, partnerUrl = serverVersionsEndpointUrl)
                )
                    .parsePaginatedBody(previousResponse.data.offset)
            }
        }

This allows the user to implement the previous call in this way:
            var r: OcpiResponseBody<SearchResult<Location>>? = client.getLocations(null, null, 0, DEFAULT_PAGINATION_LIMIT)

            while (r?.status_code == OcpiStatus.SUCCESS.code) {
                r.data?.list?.forEach { location ->
                    locationsService.putLocation(location.countryCode, location.partyId, location.id, location)
                }
                r = client.getLocationsNextPage(r)
            }

I like your approach. We finally can take advantage of nextPageUrl, and it eases polling.
Since it would be the exact same logic for each module, we can make it generic. In a common file (OcpiClientUtils in common module or something like that):
suspend inline fun <reified T> getNextPage(
    transportClientBuilder: TransportClientBuilder,
    serverVersionsEndpointUrl: String,
    partnerRepository: PartnerRepository,
    previousResponse: OcpiResponseBody<SearchResult<T>>
): OcpiResponseBody<SearchResult<T>>? =
    previousResponse.data?.nextPageUrl?.let { nextPageUrl ->
        with(transportClientBuilder.build(nextPageUrl)) {
            send(
                HttpRequest(
                    method = HttpMethod.GET
                )
                    .withRequiredHeaders(
                        requestId = generateRequestId(),
                        correlationId = generateCorrelationId()
                    )
                    .authenticate(partnerRepository = partnerRepository, partnerUrl = serverVersionsEndpointUrl)
            )
                .parsePaginatedBody(previousResponse.data.offset)
        }
    }

Then, in each module we can use it (example for Locations):
suspend fun getLocationsNextPage(
        previousResponse: OcpiResponseBody<SearchResult<Location>>
    ): OcpiResponseBody<SearchResult<Location>>? = getNextPage(
        transportClientBuilder = transportClientBuilder,
        serverVersionsEndpointUrl = serverVersionsEndpointUrl,
        partnerRepository = partnerRepository,
        previousResponse = previousResponse
    )

That way, if we need to change the logic for some reason, we just have to update the generic getNextPage
It does not change anything for users, they will have to call client.getLocationsNextPage(r)
What do you think about it?

Good idea!! :+1:


fix(version): update ngx-fabric8-wit to 6.17.7

@fabric8cd snapshot fabric8-ui is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-777-fabric8-ui.int.rdu2c.fabric8.io


feat(list): add experimental list

Closes https://github.com/IBM/carbon-components/issues/1277
Adds in experimental List component
Changelog
New

Two variations of the experimental list, ordered and unordered

Testing / Reviewing
Staging link

Boom. I approve. I pressed squash and merge. Not sure it worked.


[5.3] Simplify Collection@getQueueableClass

This less efficient. PHP is not a lazy language, so this mapping evaluates the entire thing instead of bailing asap.


fix #1715

fixes #1715

TaskLockBox has a set of active tasks
lock requests throws exception for if they are from a task not in
active task set.
TaskQueue is responsible for updating the active task set on
tasklockbox

@gianm have taken care of your comments. please have a look again

:+1:


feat(referrers): shared index  API

Exposes a discovery API that returns the referrers from public workflows of allowed organizations.
In practice, an organization that has been added to the allowList can mark a workflow as public, and its referrers will be exposed through a shared public, index.
Configuration
The list of organizations that can opt to publish referrers in the shared index is defined via a static configuration sntry. This acts as a trusted publisher mechanism.
# example of enabling the index and an org
referrer_shared_index:
  enabled: true
  allowed_orgs:
    - 7ae5a35a-9f01-4711-b293-bd1d161c01a9 # practical_mayer

API changes
This public index is available both via gRPC and HTTP and DOES NOT require authentication
Behavior
For example, let's say we have an artifact associated with five attestations.
By calling the discover endpoint, you'll get all the attestations regardless of whether they belong to a private or a public workflow. They belong to one of your organizations.
$ chainloop discover -d sha256:ebe2e6ffab93f4b2e2743d3557bd094427ea059adc78cfe2cd330a72f61731e8 -k ARTIFACT

{
   "digest": "sha256:ebe2e6ffab93f4b2e2743d3557bd094427ea059adc78cfe2cd330a72f61731e8",
   "kind": "ARTIFACT",
   "downloadable": true,
   "public": true,
   "createdAt": "2023-11-09T21:44:31.372575Z",
   "references": [
      {
         "digest": "sha256:119bdefae108a32a81e599e5cf6872c4e88c902cf5a55c58e82598a4c7fcef53",
         "kind": "ATTESTATION",
         "downloadable": true,
         "public": false,
         "createdAt": "2023-11-14T22:20:40.567136Z",
         "references": []
      },
      {
         "digest": "sha256:4b83ebba199499a1cbbd58517f5818d8e3fd56cb5cc244c26f4dd0729e2fccb2",
         "kind": "ATTESTATION",
         "downloadable": true,
         "public": true,
         "createdAt": "2023-11-14T22:45:57.238998Z",
         "references": []
      },
      {
         "digest": "sha256:d1b54d55787308f9ac3facde069afc7c00bf6897fb07d6109253546bec44f2b7",
         "kind": "ATTESTATION",
         "downloadable": true,
         "public": true,
         "createdAt": "2023-11-14T23:00:08.998459Z",
         "references": []
      },
      {
         "digest": "sha256:e4b6b708d089ed6a0061b6981cfaaaeff3fc2a95f2b370bc8e1450d95913c667",
         "kind": "ATTESTATION",
         "downloadable": true,
         "public": false,
         "createdAt": "2023-11-14T22:23:19.606271Z",
         "references": []
      },
      {
         "digest": "sha256:e6ea5db82aa1084f8dfa96799e0a401d996e214fd75921663d8a2f4c6a2687e3",
         "kind": "ATTESTATION",
         "downloadable": true,
         "public": false,
         "createdAt": "2023-11-14T22:22:45.154694Z",
         "references": []
      }
   ]
}

But there is a way to only get public referrers added to the shared index, by passing the --public flag.
chainloop discover -d sha256:ebe2e6ffab93f4b2e2743d3557bd094427ea059adc78cfe2cd330a72f61731e8 -k ARTIFACT  --public

{
   "digest": "sha256:ebe2e6ffab93f4b2e2743d3557bd094427ea059adc78cfe2cd330a72f61731e8",
   "kind": "ARTIFACT",
   "downloadable": true,
   "public": true,
   "createdAt": "2023-11-09T21:44:31.372575Z",
   "references": [
      {
         "digest": "sha256:4b83ebba199499a1cbbd58517f5818d8e3fd56cb5cc244c26f4dd0729e2fccb2",
         "kind": "ATTESTATION",
         "downloadable": true,
         "public": true,
         "createdAt": "2023-11-14T22:45:57.238998Z",
         "references": []
      },
      {
         "digest": "sha256:d1b54d55787308f9ac3facde069afc7c00bf6897fb07d6109253546bec44f2b7",
         "kind": "ATTESTATION",
         "downloadable": true,
         "public": true,
         "createdAt": "2023-11-14T23:00:08.998459Z",
         "references": []
      }
   ]

This one includes only the public attestations for this org.
HTTP endpoint
The HTTP endpoint is /discover/sha256:...
$ curl -s "http://localhost:8000/discover/sha256:4b83ebba199499a1cbbd58517f5818d8e3fd56cb5cc244c26f4dd0729e2fccb2"

{
  "result": {
    "digest": "sha256:4b83ebba199499a1cbbd58517f5818d8e3fd56cb5cc244c26f4dd0729e2fccb2",
    "kind": "ATTESTATION",
    "downloadable": true,
    "public": true,
    "references": [
      {
        "digest": "sha1:586b1ce3fd6d0f64a09aa0cd7a58470517d558c7",
        "kind": "GIT_HEAD_COMMIT",
        "downloadable": false,
        "public": true,
        "references": [],
        "createdAt": "2023-11-14T22:20:40.570963Z"
      },
      {
        "digest": "sha256:ebe2e6ffab93f4b2e2743d3557bd094427ea059adc78cfe2cd330a72f61731e8",
        "kind": "SBOM_CYCLONEDX_JSON",
        "downloadable": false,
        "public": true,
        "references": [],
        "createdAt": "2023-11-09T10:45:14.353328Z"
      },
      {
        "digest": "sha256:ebe2e6ffab93f4b2e2743d3557bd094427ea059adc78cfe2cd330a72f61731e8",
        "kind": "ARTIFACT",
        "downloadable": true,
        "public": true,
        "references": [],
        "createdAt": "2023-11-09T21:44:31.372575Z"
      },
      {
        "digest": "sha256:f1456d1cc4c943d3376716d3290ac4588f3f350f515543490b6930e4735ac043",
        "kind": "CONTAINER_IMAGE",
        "downloadable": false,
        "public": true,
        "references": [],
        "createdAt": "2023-11-09T21:44:31.377839Z"
      }
    ],
    "createdAt": "2023-11-14T22:45:57.238998Z"
  }
}

Other implementation changes

I've dropped the need of having a referrer <-> organization table since now we are connected to workflows

Refs #435

Never mind, it's merged already