Fixed acrylic themes

Resolved / Related Issues
Items resolved / related issues by this PR.

Closes #issue...
Related #issue...

Details of Changes
Add details of changes here.

Added...
Fixed...

Validation
How did you test these changes?

[x] Built and ran the app
[x] Tested the changes for accessibility

Screenshots (optional)
Add screenshots here.

All good except for Glass, part at the right of tabs is a different color:


Include information about ALL chunk groups in stats

Feature request

Include information about all chunk groups in stats.  Currently stats.toJson provides details about named chunk groups, but there is no way (as far as I can tell) to know what the other chunk groups are.
What is the expected behavior?
Stats contains enough information to know all the chunk groups that exist (named and otherwise) and which chunks are in each).
What is motivation or use case for adding/changing the behavior?
This would be helpful information for bundle analysis, for understanding things like duplicated code and how bundles change between builds.
How should this be implemented in your opinion?
This could be implemented with a new top-level chunkGroups property on the stats object, containing all the data about the chunk groups.
Alternately, a simple solution that would meet my needs would be for each chunk to list the chunk groups it is a part of (e.g. by the chunk group ids).
Are you willing to work on this yourself?
Yes, given some guidance towards the preferred solution.

We have this option https://webpack.js.org/configuration/stats/#statschunkgroups...


Add balena & balenaHub support

Hey there - cool project! I work at balena and wanted to try your container to see if it runs, which it does, beautifully. So, I added a docker-compose file and balena config that allows the app to be pushed to a balena device without requiring any further configuration - it includes a container with a browser to show the output on a screen and an FBCP container for running the small TFTs. This makes it possible to get up and running in a few minutes - zero command line stuff needed! I've tested this setup on a Pi3 and a Pi4.
In addition to powering the deploy button, the balena.yml and logo will also allow the project to be listed on https://hub.balena.io :)

For reference, the docs for what I added are here: https://www.balena.io/docs/learn/deploy/deploy-with-balena-button/

Awesome work! Well done on getting Balena support! It makes deployment even easier now.
I'm happy to accept the new changes. However can you update the yml to point to the existing app icon under public/logo512.png & remove the /logo.png

@Ryandev thanks for the feedback - changes made! I didn't notice you already had a much better logo than my attempt 😂

I'm no designer, but thanks! That's all merged in now 🙂

Awesome, now listed on balenaHub too!


Tampered nodes when creating a private endpoint cluster

When creating a cluster with the code and setting the control plan to private, then the nodes will get immediately tampered, preventing default namespace to go through correctly.
This is happening because the control plane API subnet is wrong and it should be the same as where the workernodes are.
WRONG

CORRECT

Found the problem. This is in this part of the code:
locals {
  release = "1.0"
  # Subnet OCID local accessors
  lbaas_subnet_ocid    = length(data.oci_core_subnets.LBAASSUBNET.subnets) > 0 ? data.oci_core_subnets.LBAASSUBNET.subnets[0].id : null
  nodepool_subnet_ocid = length(data.oci_core_subnets.ENDPOINTSUBNET.subnets) > 0 ? data.oci_core_subnets.LBAASSUBNET.subnets[0].id : null

So this is always passing on the LBAASSUBNET on local accessor nodepool_subnet_ocid, so regardless of what this is, it'll always pass on the subnet OCID where the LBaaS sits on.
The fix is simple. Working on it now


CSP-566-Added status field in employers,partners,admins,apprentices

Added status field in employers, partners admins & apprentices. Updated the testcase for GetApprenticeMember for Apprentice entity. Refactored the namespaces

I have created new PR (https://github.com/SkillsFundingAgency/das-aan-hub-api/pull/56) for CSP-566 as it was getting complicated, issue with merging. The changes were small and easy so replicated these on new branch, hence closing this one.


Update RefModel, RefParameter and RefProperty to allow relative refs

Let me know what you think. There was some duplicated code between the RefXXX classes and I thought it would be nice to centralize that.
I added tests to swagger-models. Let me know if you are ok with that (there were no tests previously in the module, not sure if that was intentional).
Normally I would test RefModel, RefParameter and RefProperty using JMockit (to assert that it was correctly delegating to GenericRef). Assuming you are ok with these changes. What are your thoughts on adding JMockit as a dependency to the swagger-models module (assuming it doesnt break the build)?
Please note I added the getRefFormat() to the RefXXX classes because I'm pretty sure that will come in handy inside swagger-parser:SwaggerResolver when we update it to resolve relative paths.

@Helmsdown FYI the PR couldn't pass the CI build.

@wing328  The test failure is due to the coverage expectations not being met. These are the first tests for swagger-models module. I thought I had the coverage expectations to configured to allow the current state of coverage to pass (but its still tripping up on the number of uncovered classes). I'll tweak with the coverage expectations for swagger-models module to get it to pass.
@olensmar I absolutely agree. This will require creating some new RefXXX classes and appropriate deserializers (nothing too hard). I would like to suggest a different name for this section, https://github.com/swagger-api/swagger-spec/blob/master/guidelines/REUSE.md#operations. This section is really referring to paths, not operations.
This is the example given, I would think of this as "ref path"
{
  "paths": { //this parent object is not explicitly stated, but I assuming that is an oversight
    "/health": {
      "$ref": "http://localhost:8000/health.json#/health"
    }
  }
}

This is my opinion of what a "ref operation" would be
{
  "paths": {
    "/health": {
      "get": {
        "$ref": "http://my.company.com/operations.json#/get"
      }
    }
  }
}

I think both are valid use cases and would like to implement both. If this is OK with you, I'll submit a change to the guidelines page (and perhaps the swagger 2.0 spec wiki page itself) when we get swagger-core changes merged in.

@olensmar I have some preliminary changes to support path/operation and response references on another branch. These additional changes are more intrusive. What do you think merging this pull request first, and then reviewing a second pull request?

Thanks Tony!!!!!

@Helmsdown - 1.5.1-SNAPSHOT is now available in sonatype with the PR if you need to test anything.


Display link to OpenAPI Spec in API Directory listing

API Services Portal Issue
User Story
As an API Consumer,
I want to be able to consistently find the OpenAPI spec
so that I have a logical next step to follow to access an API after finding an API listing in the Directory.
Test Case
ENV

[x] DEV
[x] TEST
[x] PROD

TESTCASE
View an API Directory listing for a dataset which has a resource with bcdc_type: webservice and format: openapi-json
EXPECTED
A button is shown (at the top of the Details section on page right) for each resource meeting the above criteria, with a link to:
A) the resource url (a JSON file), or B) a Swagger console for the file (ie https://openapi.apps.gov.bc.ca/?url=<API-SPEC>)
and button text of either:
A) the resource name, or B) a consistent label, e.g. 'OpenAPI Spec.'
ACTUAL
No resources are shown.
Notes
Many teams have an API console (which might include some additional documentation) already, e.g. https://ches.api.gov.bc.ca/api/v1/docs

This is duplicated with more detail in a newer issue - https://github.com/bcgov/api-services-portal/issues/1044


Challenges ID3

confirmed:ID3
DocumentType:verified
Nationality:verified
DeviceDetails:verified
Experience:verified
Screenshot:verified

confirmed:ID3
DocumentType:verified
Nationality:verified
DeviceDetails:verified
Experience:verified
Screenshot:verified


request error, please check your internet connection

Thanks, but the app shows request error, please check your internet connection page. I added my working api key and checked internet permission and the problem still exist. Thanks again.

are there any errors in the debug log?

same issue no log related

Same error:
If it helps these are the console logs:
I/flutter ( 4481): Fetched Weather for: Mountain View/US
I/flutter ( 4481): NoSuchMethodError: The method '[]' was called on null.
I/flutter ( 4481): Receiver: null
I/flutter ( 4481): Tried calling: [](0)

Ah.. I think I figured this out.
The OneCall API needs a different API key, which needs billing enabled.
Uri dailyUrl = Uri.parse(
      'https://api.openweathermap.org/data/2.5/onecall?lat=${location.latitude}&lon=${location.longitude}&units=metric&exclude=minutely,current&appid=$apiKey',
    );

A minor change to add API checks would sort this out.

Ah.. I think I figured this out. The OneCall API needs a different API key, which needs billing enabled.
Uri dailyUrl = Uri.parse(
      'https://api.openweathermap.org/data/2.5/onecall?lat=${location.latitude}&lon=${location.longitude}&units=metric&exclude=minutely,current&appid=$apiKey',
    );

A minor change to add API checks would sort this out. Some quick bad coding.. but here it is:
       ...
      final response = await http.get(dailyUrl);
      if (response.statusCode == 401) {
        print('Authentication error: 401 Unauthorized');
        isLoading = false;
        isRequestError = true;
        return;
      }
      final dailyData = json.decode(response.body) as Map<String, dynamic>;
      ....

OR
Just subscribe to OneCall 3.0: https://openweathermap.org/api/one-call-3 and give it some time to register and then change the URL to something like this:
Uri dailyUrl = Uri.parse(
      'https://api.openweathermap.org/data/3.0/onecall?lat=${location.latitude}&lon=${location.longitude}&units=metric&exclude=minutely,current&appid=$apiKey',
    );

Hmmm that's weird, my billing is turned off and I'm using the OneCall version 2.5 as stated in the readme. I will double check again it could be a regional thing. in the meantime when I have the time I will try to update the code to handle it


Adding UnbindStatus to ServiceBindings

Add a UnbindStatus field to ServiceBindingStatus. The field tracks the status of the ServiceBinding with respect to what needs to be done or has been done for unbinding the ServiceBinding.
When a BindingInstance is created, the UnbindStatus is set to Not Required. This indicates that an unbind request does not need to be made for the ServiceBinding when it is deleted.
When a unbind request is made for a ServiceBinding, the UnbindStatus is set to Required. This indicates that an unbind request does need to be made for the ServiceBinding when it is deleted.
When a unbind request is successful for a ServiceBinding, the UnbindStatus is set to Succeeded. This indicates that no further unbind requests need to be made for the ServiceBinding, and it unblocks the controller from removing the finalizer for the ServiceBinding.
When the controller gives up on sending unbind requests due to failures, the UnbindStatus is set to Failed. This indicates that no further unbind requests need to be made for the ServiceBinding, but it blocks the controller from removing the finalizer for the ServiceBinding. This keeps the resource around so that the user can negotiate unbind directly with the broker. The user must force-delete the ServiceBinding to remove it.
Relates to first point in #1423

Going to rework this.

I'm not sure what this means - if we have sent a bind, we need to do an unbind, whether the binding has completed or not.  Am I missing something?

Fixes https://github.com/kubernetes-incubator/service-catalog/issues/1423

The situation was if you created a ServiceInstance without a ref service instance class successfully, you then could bind to it. But the reconcile loop for the bind could not complete until the service instance class was fully resolved. Thus if you fat-fingered the class in your SI, and then bound to it, you could never delete the binding or the service instance.

We shouldn't be trying to do a binding until the service instance becomes
ready - does the instance become ready in the case you're talking about?
On Thu, Nov 2, 2017 at 4:00 PM, Scott Nichols<EMAIL_ADDRESS>wrote:

The situation was if you created a ServiceInstance without a ref service
instance class successfully, you then could bind to it. But the reconcile
loop for the bind could not complete until the service instance class was
fully resolved. Thus if you fat-fingered the class in your SI, and then
bound to it, you could never delete the binding or the service instance.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/kubernetes-incubator/service-catalog/pull/1526#issuecomment-341540612,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAWXmDbGVy8Gi_9dDfYKBilKYwGKwHjzks5syh9bgaJpZM4QQGFe
.

The service instance is ready but the service instance class seems to not
resolve to a real ref yet.
I agree it should not allow you to bind in this case (until async bindings).
These are the repo steps:

Go through the walkthrough without starting the service broker.
A. kubectl create -f contrib/examples/walkthrough/ups-broker.yaml
B. kubectl create namespace test-ns
C. kubectl create -f contrib/examples/walkthrough/ups-instance.yaml
D. kubectl create -f contrib/examples/walkthrough/ups-binding.yaml
E. At this point you can't get rid of the binding. Try kubectl delete -n
test-ns servicebindings ups-binding
F. The instance can't be deleted either because of the associated
binding.

On Thu, Nov 2, 2017 at 1:15 PM Paul Morie<EMAIL_ADDRESS>wrote:

We shouldn't be trying to do a binding until the service instance becomes
ready - does the instance become ready in the case you're talking about?
On Thu, Nov 2, 2017 at 4:00 PM, Scott Nichols<EMAIL_ADDRESS>wrote:

The situation was if you created a ServiceInstance without a ref service
instance class successfully, you then could bind to it. But the reconcile
loop for the bind could not complete until the service instance class was
fully resolved. Thus if you fat-fingered the class in your SI, and then
bound to it, you could never delete the binding or the service instance.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<
https://github.com/kubernetes-incubator/service-catalog/pull/1526#issuecomment-341540612
,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AAWXmDbGVy8Gi_9dDfYKBilKYwGKwHjzks5syh9bgaJpZM4QQGFe
.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/kubernetes-incubator/service-catalog/pull/1526#issuecomment-341544693,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Aezx8Ci9Q1Qf9x8DZdNaDylTOJwlCVhPks5syiLrgaJpZM4QQGFe
.

I think we might have a mismatch on 'ready' - when I say it, I mean that the service instance has a status with ready condition status true.  Do you mean the same thing?

I was going off of the bug and what the code says.

We had a unit test that tested for the incorrect behaviour, so first step was to fix the unit test and that failed the test, and then I fixed the code

I will rework to add UnbindStatus. brb

Ok PR has been reworked to add UnbindStatus. Take a look

You can remove this if statement since you test was already performed earlier in the function.
https://github.com/n3wscott/service-catalog/blob/f8ded1e8db36054020e034f6e28ab3fed386ef7e/pkg/controller/controller_binding.go#L279

You can remove this if statement since the test was already performed earlier in the function

I don't want to because it will be harder to reason about the assumed logic at this point when we refactor all this out.

You can remove this if statement since the test was already performed earlier in the function

I don't want to because it will be harder to reason about the assumed logic at this point when we refactor all this out.

I disagree. Or I don't understand what will be harder. But I don't care enough to belabor the point.

Thanks a bunch for the review @staebler !!

This is going to need some more work now that #1512 has been merged.

It is only fair. :D rebasing now.

Moving to new PR. https://github.com/kubernetes-incubator/service-catalog/pull/1544
I could not get github to rollback and... 👎


Binary release of version 7.0.0 missing for Centos 8

Hi,
I was expecting to find the binary release of version 7.0.0 for Centos 8 on JFrog. However, the latest rpm seems to be missing. Do I need to look elsewhere?
Thanks,
Martin

@kou might have the best answer to this.

CentOS 8 reached EOL on 2021-12: https://www.centos.org/centos-linux-eol/
We provide packages for AlmaLinux 8 instead: https://arrow.apache.org/install/
(We should remove "CentOS 8" from the page...)

Thank you for the quick response, @kou.
Would you consider releasing binaries for Centos Stream?

Could you open an issue on JIRA? https://issues.apache.org/jira/projects/ARROW/issues

https://issues.apache.org/jira/browse/ARROW-15916


Windows build appears to be broken

On my windows machine:
When I run  nwbuild -r _public, the program starts and runs fine. However, when I run nwbuild -p win64 -f _public(or with the -v X.Y.Z) the script completes and I get a folder with the executable and a few other files. When I run this executable (.exe), a window appears, but it is completely blank. If I press the button to open the developer console, the app crashes.
I am not able to find any log files, or any other information on what is going on.
I am building with node-webkit-builder version 1.0.11. I have tried with multiple versions of NW.js (0.12.1, 0.12.0, and 0.11.6) none of them work. Building on osx for osx works fine for this project.
Where can I start to look to debug this? Is it somehow my fault, or might there be an error somewhere in the build process?

One potential cause is long file paths. Windows has a 256 character limit on file path lengths. You can check with Path Length Checker

I had the same problem and found out some paths had more than 256 characters... I removed them and everything works fine. Thanks for this advice adam!

I found that to be the problem too. The issue now is that it is kind of hard to fix that in my case as I have dependencies with very long path names in them.. Will see what I can do. Thanks for the advice!
FYI: It is possible to have longer path names if you use the newest .NET apis. It supports up to 16k length path names. The strange thing on windows is that explorer does not use these newer APIs.. I am not sure what is causing this issue, but if it is copying files from one place to another, then it can be solved by using the robocopy (robust copy) which supports 16k long file paths.

FYI: It is possible to have longer path names if you use the newest .NET apis.

@stephan-nordnes-eriksen that wouldn't help most people as they'll be shipping their apps to end users :+1:

Well, that's true, indeed. But if the only reason things stop working is because the builder isn't able to copy over files with long file names, then that would be a quick fix :)

@stephan-nordnes-eriksen I didn't get that the first time. Really? Are you sure? o_O. Sounds like that shouldn't be true since the app files get put in AppData on the end user's machine.

Not sure if irony or not. Robocopy is installed on all windows machines and would be good of the client end as well. Then the responsibility is up to the developer to use safe methods to access files with long file paths.

Why would I use it in the client though? Not sure what you're suggesting

I am suggesting that if the reason why the builder is failing is simply because it copies files, and breaks because they have file names that are too long, then use robocopy in stead. Problem solved. If the same thing happens on the client side, again, use robocopy and the problem is gone.

In my case, I've had all my files go into the .exe and have problems on client machines. I'm saying I'm pretty sure NW.js itself copies your inner app files to AppData. I'm not sure what can be done about that. You might have to make a proof of concept :+1:

I see. I will investigate further when I am back on my windows machine, but that will be in 2 months because I am living as a nomad right now.


chore(package): update rollup to version 0.45.1

Codecov Report

Merging #135 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master    #135   +/-   ##
======================================
  Coverage    97.5%   97.5%
======================================
  Files           1       1
  Lines         120     120
======================================
  Hits          117     117
  Misses          3       3

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 d799154...fc9f64f. Read the comment docs.


The Repository Not Work on Colab....How Possible

I usually used this Repository perfectly on Google Colab until 2 weeks ago. Yesterday i try to use and at last step Running WEB UI it not work give me an error. It not load Gradio assistant. THIS IS THE LINE NOT LET ME OPEN GRADIO on browser:
start web
[20]
12 s
12345
@title 启动web
%cd /content/Retrieval-based-Voice-Conversion-WebUI
%load_ext tensorboard
%tensorboard --logdir /content/Retrieval-based-Voice-Conversion-WebUI/logs
!python3 infer-web.py --colab --pycmd python3
/content/Retrieval-based-Voice-Conversion-WebUI
Use Language: en_US
2024-04-18 12:31:53.251224: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-04-18 12:31:53.251283: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-04-18 12:31:53.252766: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-04-18 12:31:53.260346: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-04-18 12:31:54.365734: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
2024-04-18 12:31:56 | INFO | fairseq.tasks.text_to_speech | Please install tensorboardX: pip install tensorboardX
2024-04-18 12:31:57 | INFO | httpx | HTTP Request: GET https://api.gradio.app/gradio-messaging/en "HTTP/1.1 200 OK"
Traceback (most recent call last):
File "/content/Retrieval-based-Voice-Conversion-WebUI/infer-web.py", line 1540, in
app.queue(concurrency_count=511, max_size=1022).launch(share=True)
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1865, in queue
raise DeprecationWarning(
DeprecationWarning: concurrency_count has been deprecated. Set the concurrency_limit directly on event listeners e.g. btn.click(fn, ..., concurrency_limit=10) or gr.Interface(concurrency_limit=10). If necessary, the total number of workers can be configured via max_threads in launch().
2024-04-18 12:31:59 | INFO | httpx | HTTP Request: GET https://api.gradio.app/pkg-version "HTTP/1.1 200 OK"
2024-04-18 12:31:59 | INFO | httpx | HTTP Request: GET https://checkip.amazonaws.com/ "HTTP/1.1 200 "
2024-04-18 12:32:00 | INFO | httpx | HTTP Request: POST https://api.gradio.app/gradio-initiated-analytics/ "HTTP/1.1 200 OK"

Currently colab notebook may not be able to use because of Goole's policy.


Nothing is extracted and no error is given

I'm trying to bundle up my css&scss files into a single "style.css" file using webpack. However the configs I added using examples I found all over the internet seem to do nothing and even worse, they don't crash. It seems that the module is content to ignore everything and not throw any warning as to why my configuration is bad :/
The config is as follows:
let debug = process.env.NODE_ENV;
let webpack = require('webpack');
let path = require('path');
let ExtractTextPlugin = require("extract-text-webpack-plugin");

module.exports =
{
  context: __dirname,
  devtool: debug ? 'inline sourcemap': null,
  entry: ['./js/main.jsx'],
  output:
  {
    path: __dirname,
    filename: 'js/bundle.js'
  },
  module: {
    loaders: [
      {
        loader: "babel-loader",
        exclude: /node_modules/,
        // Skip any files outside of your project's `src` directory
        include: [
          path.resolve(__dirname, ""),
        ],

        // Only run `.js` and `.jsx` files through Babel
        test: /\.jsx?$/,

        // Options to configure babel with
        query: {
          plugins: ['transform-runtime'],
          presets: ['es2015', 'react'],
        }
      },
      // Extract SCSS
      { test: /\.scss$/,
        use: ExtractTextPlugin.extract({
          loader:         'scss-loader',
          fallbackLoader: 'style-loader',
        })},

      // Extract plain-ol' vanilla CSS
      { test: /\.scss$/,
        use: ExtractTextPlugin.extract({
          loader:         'scss-loader',
          fallbackLoader: 'style-loader',
        })}
    ]
  },
  plugins: [
    new webpack.optimize.DedupePlugin(),
    new webpack.optimize.OccurenceOrderPlugin(),
    new ExtractTextPlugin("style.css", {allChunks: true}),
    //new webpack.optimize.UglifyJsPlugin( {mangle: false, sourcemap: false} ),
  ],
};

Any help would be much appreciated.

Could you include a whole project? It's possible your configuration is correct, but you are missing something like references to CSS to extract.

@George3d6 It looks like your config needs to be updated:
new ExtractTextPlugin("style.css", {allChunks: true}), to new ExtractTextPlugin({filename: 'style.css', allChunks: true});


Add linux-aarch64, linux-ppc64le, and osx-arm64 platforms

Checklist

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


Merge Release 1.5 to Master, Publishing 1.5 docs live

This PR merges all changes from the release-1.5 branch into the live master branch for publishing.

This change is

The CLA issue is due to https://github.com/kubernetes/kubernetes.github.io/pull/1480 as far as I can see. The PR was merged without CLA. Removing that should fix it.

I had @grodrigues3 manually merge to make these changes, that've already been merged to 1.5, back to master

SGTM


Feature/80 new upload widget

Adds new endpoint resource_create_with_schema to be used with new uploader widget at https://github.com/aivuk/ckan-uploader.

@aivuk Great work so far, but I think it's worth do a couple of refactors now to make our life easier down the line:

Let's call blueprint endpoints rather than the API directly. This will make easier to handle authentication, CSRF and removes the need to know the package_id at the component level. If we make them return the same output as now you'll only have to change the URL in the component. Below is an overview of the changes to get you started
Let's not override resource_form.html, otherwise we are overriding ckanext-scheming entirely. All necessary markup should be in ckan_uploader.html as this is the snippet that scheming will use. Let's not use hidden fields to pass params, you can pass them directly to the module with data- arguments, eg data-module-resource_id="{{ data.id }}"

I'll keep playing with it and provide more feedback
Snippet / template:
diff --git a/ckanext/validation/templates/scheming/form_snippets/ckan_uploader.html b/ckanext/validation/templates/scheming/form_snippets/ckan_uploader.html
index b601c59..7085341 100644
--- a/ckanext/validation/templates/scheming/form_snippets/ckan_uploader.html
+++ b/ckanext/validation/templates/scheming/form_snippets/ckan_uploader.html
@@ -1,6 +1,12 @@
-  <input name="id" value="{{ data.id }}" type="hidden"/>
-

-    {{ _('File') }}
-

-

+

+  {{ _('File') }}
+
+

+

+
+{% asset 'ckanext-validation/ckan-uploader-js' %}
+{% asset 'ckanext-validation/ckan-uploader-css' %}

Blueprint changes:
diff --git a/ckanext/validation/blueprints.py b/ckanext/validation/blueprints.py
index 3ec0dc3..4d7ecde 100644
--- a/ckanext/validation/blueprints.py
+++ b/ckanext/validation/blueprints.py
@@ -2,7 +2,20 @@

 from flask import Blueprint

-from ckantoolkit import c, NotAuthorized, ObjectNotFound, abort, _, render, get_action
+from ckan.lib.navl.dictization_functions import unflatten
+from ckan.logic import tuplize_dict, clean_dict, parse_params
+
+from ckantoolkit import (
+    c, g,
+    NotAuthorized,
+    ObjectNotFound,
+    abort,
+    _,
+    render,
+    get_action,
+    request,
+)
+

 validation = Blueprint("validation", __name__)

@@ -44,3 +57,50 @@ def read(id, resource_id):
 validation.add_url_rule(
     "/dataset/<id>/resource/<resource_id>/validation", view_func=read
 )
+
+
+def _get_data():
+    data = clean_dict(
+	unflatten(tuplize_dict(parse_params(request.form)))
+    )
+    data.update(clean_dict(
+	unflatten(tuplize_dict(parse_params(request.files)))
+    ))
+
+
+
+def resource_file_create(id):
+
+    # Get data from the request
+    data_dict = _get_data()
+
+    # Call resource_create
+    # TODO: error handling
+    context = {
+        'user': g.user,
+    }
+    data_dict["package_id"] = id
+    resource = get_action("resource_create")(context, data_dict)
+
+    # If it's tabular (local OR remote), infer and store schema
+    if is_tabular(resource):
+        update_resource = t.get_action('resource_table_schema_infer')(
+            context, {'resource_id': resource_id, 'store_schema': True}
+        )
+
+    # Return resource
+    # TODO: set response format as JSON
+    return resource
+
+
+def resource_file_update(id, resource_id):
+    # TODO: same as create, you can reuse as much code as needed
+    pass
+
+
+validation.add_url_rule(
+    "/dataset/<id>/resource/file", view_func=resource_file_create, methods=["POST"]
+)
+validation.add_url_rule(
+    "/dataset/<id>/resource/<resource_id>/file", view_func=resource_file_update, methods=["POST"]
+)

Great @amercader, I started to work on that but I still couldn't find a way to get the package_id from the upload component. If I change the uploader to be loaded from its own scheming template, I need to access this id to know which endpoint to use (create or update a resource)

@aivuk You are right, the changes I suggested (which we should still implement) don't solve the uploader snippet not having access to the dataset id. We need to resort to extracting it from the URL. I'll discuss with Ian (scheming maintainer) to see if we can change the snippets upstream so the resource field snippets get the dataset id properly.
In the meantime let's do something like this in the snippet:
diff --git a/ckanext/validation/templates/scheming/form_snippets/ckan_uploader.html b/ckanext/validation/templates/scheming/form_snippets/ckan_uploader.html
index b601c59..d2224e9 100644
--- a/ckanext/validation/templates/scheming/form_snippets/ckan_uploader.html
+++ b/ckanext/validation/templates/scheming/form_snippets/ckan_uploader.html
@@ -1,3 +1,6 @@
+  {% set package_id = data.package_id or h.get_package_id_from_resource_url() %}
+
   <input name="id" value="{{ data.id }}" type="hidden"/>

     {{ _('File') }}

To register the helper:
diff --git a/ckanext/validation/helpers.py b/ckanext/validation/helpers.py
index b6c856d..d43a489 100644
--- a/ckanext/validation/helpers.py
+++ b/ckanext/validation/helpers.py
@@ -1,8 +1,9 @@
 # encoding: utf-8
 import json
+import re

 from ckan.lib.helpers import url_for_static
-from ckantoolkit import url_for, _, config, asbool, literal, h
+from ckantoolkit import url_for, _, config, asbool, literal, h, request

 def get_validation_badge(resource, in_listing=False):
@@ -99,3 +100,9 @@ def bootstrap_version():

 def use_webassets():
     return int(h.ckan_version().split('.')[1]) >= 9
+
+
+def get_package_id_from_resource_url():
+    match = re.match("/dataset/(.*)/resource/", request.path)
+    if match:
+        return model.Package.get(match.group(1)).id
diff --git a/ckanext/validation/plugin/__init__.py b/ckanext/validation/plugin/__init__.py
index 5ea63d8..9c3211c 100644
--- a/ckanext/validation/plugin/__init__.py
+++ b/ckanext/validation/plugin/__init__.py
@@ -27,6 +27,7 @@ from ckanext.validation.helpers import (
     bootstrap_version,
     validation_dict,
     use_webassets,
+    get_package_id_from_resource_url,
 )
 from ckanext.validation.validators import (
     resource_schema_validator,
@@ -117,6 +118,7 @@ to create the database tables:
             u'bootstrap_version': bootstrap_version,
             u'validation_dict': validation_dict,
             u'use_webassets': use_webassets,
+            'get_package_id_from_resource_url': get_package_id_from_resource_url,
         }

     # IResourceController

@aivuk great work! There are still some things to iron out though:

Remind me why do we need to modify the resource create and resource update actions included in ckanext-validation? IIRC
we moved the infer schema logic to its own action to avoid having to touch these

There are problems in sync mode (ckanext.validation.run_on_create_sync/ckanext.validation.run_onupdatesync are True), because we are calling resource_create/resource_update to create a temp resource, to store the schema, etc and we don't want to run the validation at that point, just when the user actually saves the resource. I'll try to work on this as it's related to other issues I've solved in the past

I really don't like the UI of the File / URL fields:

Let's try to mimic as much as possible the standard file/ url picker field both in terms of design and functionality. I know it's more work but it does a good job of clearly indicating two different options (file or UtRL), allows to clear the value and switch to the other type ,etc

It's good that the button label changes but I think it could be made clearer to the user what's happening:

Can we display a progress bar or at least a spinner while the file is uploaded and the schema inferred?
Perhaps when we have received the schema and the schema field is populated we could highlight the background slightly for a few seconds

Regardless of the UI, if I try to submit a URL to an external file I get an exception

This is as far as I got. I'll keep playing with it and give more feedback

Remind me why do we need to modify the resource create and resource update actions included in ckanext-validation? IIRC
we moved the infer schema logic to its own action to avoid having to touch these

In the past I was using the resource_create and resource_update to create/update a resource using the ckan-uploader widget. I did need to have the returned schema to use it on the schema field of the resource edit form. But currently, with the blueprint endpoint I'm not doing the infer in the resource_create / resource_update action anymore, but on the blueprint. I just commented the lines doing the inference in the actions, it's better to remove them

Can we display a progress bar or at least a spinner while the file is uploaded and the schema inferred?

Perhaps when we have received the schema and the schema field is populated we could highlight the background slightly for a few seconds

Sorry, forgot to change the color of the progress bar in my last update. Here is how it looks:
Screencast from 02-06-2023 11:48:15 AM.webm
It's simple to change the color, we just need to change it on https://github.com/frictionlessdata/ckan-uploader/blob/main/src/lib/CkanUploader.svelte#L167

Thanks @aivuk, btw this is the screenshot I meant to include in my previous message:

Another think I missed is adding tests. We should add some tests covering at least the endpoints (expected responses, resources created / updated etc)

@amercader My last updates is mimicking the UI from the old widget and I solved the bug when using external URLs, please look at it when possible. thanks!

@aivuk sorry I didn't mean to push a new build of uploader, was just playing around. I'll revert it.
I got these failures locally, I had to upgrade to the latest framework version to get rid of them. I'll push that too.
I'm cleaning up things a bit, I'll let you know when it's ready to review


HAWQ-289. Fix faultinjector in client and server for hawq

The overall fix looks good. +1

Looks good. +1


Sync eng/common directory with azure-sdk-tools for PR 7251

Sync eng/common directory with azure-sdk-tools for PR https://github.com/Azure/azure-sdk-tools/pull/7251  See eng/common workflow

I'm going to check-enforcer override as nothing running (and failing) will actually test these changes. This is a new pipeline, one that will have to be created manually within the next few days.

/check-enforcer override


Error handling for missing or corrupt binaries

Detect binaries from json input which fails to decompress.
Does not stop perf or find evaluation from proceeding when kernel binary loading fails.
Error tolerance when failing to retrieve hsa object from miopen.

looks like hip tidy is falling in the CI


"import xgcm" yields "AttributeError: 'NoneType' object has no attribute 'expandtabs'"

Hello,
when I do "import xgcm" in Python, I get the "AttributeError: 'NoneType' object has no attribute 'expandtabs'".
I tested several xgcm installations (conda, pip, pip+git) in newly created conda environments on Mac and Linux platforms. The error stays the same.
One example:
python
Python 3.7.6 | packaged by conda-forge | (default, Mar 23 2020, 23:03:20)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import xgcm
Traceback (most recent call last):
File "", line 1, in
File "/work/lib/python3.7/site-packages/xgcm/init.py", line 6, in
from .grid import Grid, Axis
File "/work//lib/python3.7/site-packages/xgcm/grid.py", line 759, in
class Grid:
File "/work/lib/python3.7/site-packages/xgcm/grid.py", line 1067, in Grid
@docstrings.dedent
File "/work/lib/python3.7/site-packages/docrep/decorators.py", line 26, in update_docstring
doc = func(self, args[0].doc, *args[1:], **kwargs)
File "/work/lib/python3.7/site-packages/docrep/init.py", line 517, in dedent
s = inspect.cleandoc(s)
File "/work/lib/python3.7/inspect.py", line 619, in cleandoc
lines = doc.expandtabs().split('\n')
AttributeError: 'NoneType' object has no attribute 'expandtabs'

I also tested with an installation of pip install flake8 flake8-expandtab; still the same error.
Could anyone help me importing xgcm working?
Thanks a lot! A.

Hi @angilkaka,
thanks for using xgcm and posting this issue. I have never encountered this. Could you post a complete list of installed conda packages in your environment for starters?
Could you try to set up a fresh conda environment with minimal dependencies, so we can narrow down if the problem is with xgcm itself?
@rabernat @dcherian do you have a clue what could be going on here?

Could you post a complete list of installed conda packages in your environment for starters?

Perhaps we could explain how to do this? 😉 Not everyone will know.

Could you try to set up a fresh conda environment with minimal dependencies, so we can narrow down if the problem is with xgcm itself?

Also this?

Just got the same error. I think it has to do with docrep 0.3.0 released a few days ago:

Several methods have been deprecated in version 0.3. See Migrating from 0.2.8 to 0.3.0 for details!

Perhaps we could explain how to do this? 😉 Not everyone will know.

Sorry, that was a bit hasty indeed. @angilkaka you can do conda list in your terminal with your active environment and past the output here. Or just conda list docrep (to get just the installed versionnumber of docrep, following @malmans2 suggestion).
If docrep is indeed at version 0.3.0, I  suggest you set up a new conda environment
I really want to understand docrep better and integrate it more consistently in xgcm, but currently I have some higher priority task on my list. Perhaps in the meantime we can pin the version of docrep to <3.0?

I was able to reproduce the error in a fresh environment with
conda create -n xgcm_issue_test xgcm ipython

Then I tried to downgrade docrep with
conda install -n xgcm_issue_test docrep=0.2.7

which indeed did fix the issue.
This should definitely be fixed asap.
For a quick fix I suggest pinning to v0.2.7 (0.2.8 was not released on conda-forge it seems).
I want to understand docrep in more detail and use it consistently in xgcm, but I have other more pressing issues in the pipeline right now and would like to deal with this once I have a bit more bandwidth.

Hello,  indeed, downgrading docrep to 0.2.7 solved my "import xgcm" AttributeError.
Thanks so much. I really appreciate your support. A.

Ill reopen this until we have a fix on our side. Glad this helped.

Was this fixed by #213?

Yes it should be. We should test this after a new release.

Closed via #214

Just an FYI on a personal experience / practice.
I rebuilt a personal xgcm environment and received this error on import:
'NoneType' object has no attribute 'expandtabs'
My approach was taking a particular pangeo environment (via: https://github.com/csiro-dcfp/pangeo_hpc/blob/master/pangeo_environment.yml ) and then adding conda install -c conda-forge xgcm.
The obvious problem seems that I ended up with docrep 0.3.2  pyh44b312d_0   conda-forge
Downgrading docrep later via conda install -c conda-forge docrep=0.2.7 fixed the problem.

That is weird @Thomas-Moore-Creative. Eventually this will be fixed with #319 I believe.

I just started receiving this issue out of nowhere today. I'll try downgrading my xgcm but unless upgrading xrft somehow
affected xgcm, this seems to be unwarranted.
More details: I upgraded xrft on to get access to some recent changes to that library and then found that "import xgcm" produced the above error. I'm on docrep 0.2.7, any advice on how to fix this issue?

Hi @avik2007, can you post your xgcm version?

.... a blast from the past but thanks @jbusecke et al for fixing this docrep issue in v0.6.0 (2021/11/03).  This issue got me again on a new platform ( with an older version of xgcm ) and had me stumped (again) for a minute but a simple update did the trick.

Awesome to hear!


[TASK] block transactional journeys from being created

They are in fact created solely via the connected transactionalEmail. I have to make tE auto-set options.createJourney=true for creates only.
Not sure if we can specify the journey-key somehow through that.
Updating that journey (basically name and description) is possible though

wrong assumption. not doing that


Added timeline and trigger translation

hope that these are all currently missing translations for DE done, only missing are the common replacements (seperate PR)

Thanks for all the translations, as always!!


Look into using a boost alternative

Distribute boost along
std::filesystem
https://github.com/cginternals/cppfs
more?

std::fs is c++17+ so i would great appreciate this :)


Fixed 2 typing errors

Xamarin.Auth Pull Request
Fixes 2 typing errors

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

Thanks a lot.
I'm a bit ashamed. The only excuse is that it is sooooo much to do and so little time.


Use the parameters from the vars file instead

Use the parameters from the vars file instead, this will fix:
https://bugzilla.redhat.com/show_bug.cgi?id=1844496
Signed-off-by: raul<EMAIL_ADDRESS>

fixes #5607

@Mergifyio refresh

The checks failed for causes non related to the patch
fatal: [mds2]: FAILED! => changed=false
attempts: 3
msg: 'Failed to download metadata for repo ''AppStream'': Cannot prepare internal mirrorlist: Curl error (28): Timeout was reached for http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=vag [Resolving timed out after 30005 milliseconds]'

This PR isn't relevant. See my comments in the BZ.


Variable availableIncludes is not used by the scope class

I also had to modify the unit tests in order for this to pass, since now there's no second call to getAvailableIncludes method

But it probably should be. I think this is where it is needed to add the available resources as links to the response.

This is a breaking change and would need to wait for 1.0

This change conflicts with #331, which I'll be merging as soon as we hit 1.0. Thank you!


Autoformat gofmt not work correctly

When I use gofmt from bash, it display my code with tabspace like 4 or 8 but when use gofmt with autoformat in vim, my code still use global setting tabstop=2. How can I avoid tabstop when use with only golang.

I do not entirely understand the question. You want to display tabs like 4 spaces in vim for golang files?
What are your current indentation settings for golang files? (shiftwidth, tabstop, expandtab)

I'm not settings for golang file, I use global settings in vimrc shiftwidth=tabstop=2. I use it for ruby and other stuff. Can I use this plugin without vimrc settings only for golang file?

Why don't you set shiftwidth and tabstop to 4 for golang files?
au filetype go set shiftwidth=4
au filetype go set tabstop=4

I didn't know I can do that. Thank you so much.


feat: Port RingTheory/RingInvo

Everything compiles properly, not done with style/removing unnecisary lemmas

The whole RingInvoClass business needs to be backported before we can merge this PR. The mathlib3 PR for this is found here.

The whole RingInvoClass business needs to be backported before we can merge this PR. The mathlib3 PR for this is found here. I'm removing the WIP, help, and question tags because I think this PR is finished up to these changes.

The mathlib3 PR is merged now! I will wait to see how mathport translates that file once that happens, and then we can finish things up here :)

All that's left is to decide whether we want instance hasCoeToRingEquiv I'm not sure what the answer here is


Join the slack channel for the discussion

Hello everyone,
Join the channel below to share our ideas and suggestions for making the Open Devin AI project successful. Here's the link: https://join.slack.com/t/opendevindisc-etw8056/shared_invite/zt-2eyriiqtw-eYvbpgXdR6iPZjNOX6498w

@neubig can you join the channel


Session Refresh does not update StartTime and TimeOfDeath

Verified issue does not already exist?
Yes
What error did you receive
Functions that require -TssSession throw error Authentication failed or expired token
Please run the command using -Verbose
N/A you can't run Verbose on $session.SessionRefresh()
Provide a test case or steps to reproduce
$global:session = New-TssSession -SecretServer https://vault.company/SecretServer -Credential $cred
$global:session
Wait 20+ minutes if the Secret Server instance defaults to a 20 minute session timeout
$global:session.SessionRefresh()
$global:session
Observe that StartTime and TimeOfDeath is not updated after you run $global:session.SessionRefresh()
$global:session.IsValidToken() is also $false and should be $true
Expected behavior
StartTime and TimeOfDeath is updated to the new values after refreshing a session token and IsValidToken() should return an accurate $true if the token is valid.  The TimeOfDeath timestamp is important for checking for token expiration and being able to renew it prior to it expiring.  I have a custom Get-Session function which checks/renews and if needed will create a brand new session and prompt for credentials.
What Edition of Secret Server?
Professional
What version of Secret Server
11.0
What PowerShell host was used when producing this error
PowerShell Core (pwsh)
PowerShell Host Version
Name                           Value
----                           -----
PSVersion                      7.1.5
PSEdition                      Core
GitCommitId                    7.1.5
OS                             Microsoft Windows 10.0.22000
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

Thank you for fixing this.  Do you know when it will be released?

Released

Not sure how/why, but this bug seems to have reared it's ugly head...
Initially, token has an invalid time of death.
PS C:\Windows\System32> $session
SecretServer                       SecretServerVersion TokenType StartTime             TimeOfDeath

                                       11.6.000039         SdkClient 2/14/2024 12:33:34 PM 1/1/0001 12:00:00 AM

It seems as though the session token is expired the moment you refresh it.
SecretServer                       SecretServerVersion TokenType StartTime             TimeOfDeath

####                                                                               2/14/2024 12:28:44 PM 2/14/2024 12:28:44 PM

PS C:> $session.sessionrefresh()
True
PS C:> $session.isvalidtoken()
False
PS C:> $PSVersionTable
Name                           Value

PSVersion                      7.3.8
PSEdition                      Core
GitCommitId                    7.3.8
OS                             Microsoft Windows 10.0.14393
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0


Forward slash conversion bug

The ENCODE-JSON type functions convert forward slashes into a backward and forward slash combo.
For example:
CL-USER> (json:encode-json '(("example" . "/")))
{"example":"/"}
that is not a letter "v" it is a backward slash "" then a forward slash. The previous should output
{"example":"/"}
note the difference.
it also works with ENCODE-JSON-TO-STRING
CL-USER> (json:encode-json-to-string '(("example" . "/")))
"{"example":"\/"}"
I am going to try to find the culprit in the source. Should I find it I will submit a pull request with the fixed version. Does anyone here have a workaround I could use?

Hello, actually this may seem surprising but it is not a bug, it is a valid JSON representation of /.
If you look at the syntax spec on json.org you can see this. It might not be a strictly necessary encoding, but since \ and " are forced to be treated similarly and / is there with them, that was probably why it was done like this. For machine-reading purposes it is all valid so should not be a problem.
Showing the out of a decode in javascript/jquery
> $.parseJSON('{"example":"/"}')
Object {example: "/"}


Dep init seems to hang indefinitely

What version of dep are you using (dep version)?
⇒  dep version
dep: version: no such command

⇒  brew info dep
dep: stable 0.3.0 (bottled), HEAD

What dep command did you run?
dep init
What did you expect to see?
A new project be initialised
What did you see instead?
Nothing until I pressed control-c, then:
^CSignal received: waiting for 1 ops to complete...
panic: canary - shouldn't be possible this SourceMgr has been released, its methods can no longer be called

goroutine 1 [running]:
github.com/golang/dep/internal/gps.(*solver).unselectLast(0xc4201c0000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/private/tmp/dep-20170804-6202-1xy28iy/dep-0.3.0/src/github.com/golang/dep/internal/gps/solver.go:1237 +0x857
github.com/golang/dep/internal/gps.(*solver).backtrack(0xc4201c0000, 0xc42046b380)
	/private/tmp/dep-20170804-6202-1xy28iy/dep-0.3.0/src/github.com/golang/dep/internal/gps/solver.go:987 +0x166
github.com/golang/dep/internal/gps.(*solver).solve(0xc4201c0000, 0x0, 0x0, 0xc4201924e0)
	/private/tmp/dep-20170804-6202-1xy28iy/dep-0.3.0/src/github.com/golang/dep/internal/gps/solver.go:454 +0x787
github.com/golang/dep/internal/gps.(*solver).Solve(0xc4201c0000, 0x4b, 0x16d4440, 0xc420192420, 0xc4200140c4)
	/private/tmp/dep-20170804-6202-1xy28iy/dep-0.3.0/src/github.com/golang/dep/internal/gps/solver.go:399 +0xb1
main.(*initCommand).Run(0xc420153aca, 0xc420015860, 0xc42000c340, 0x0, 0x0, 0x0, 0x0)
	/private/tmp/dep-20170804-6202-1xy28iy/dep-0.3.0/src/github.com/golang/dep/cmd/dep/init.go:172 +0x710
main.(*Config).Run(0xc420062fc0, 0xc420062fc0)
	/private/tmp/dep-20170804-6202-1xy28iy/dep-0.3.0/src/github.com/golang/dep/cmd/dep/main.go:158 +0x855
main.main()
	/private/tmp/dep-20170804-6202-1xy28iy/dep-0.3.0/src/github.com/golang/dep/cmd/dep/main.go:45 +0x253

So it seems doing this in a completely empty directory worked fine, just not the directory with my main.go:
import (
	"encoding/json"
	"fmt"
	"net/http"

	"github.com/Sirupsen/logrus"
	sparta "github.com/mweagle/Sparta"
)

Ok.. so I tried re-rerunning this again, and eventually it actually seemed to sort itself out.. So.. partially a better UI to say it's working would be nice. And maybe there is some form of speedup/tweaking that could be done somewhere.

ack, 11 days! sorry, we usually respond within a couple days at the most. and, sorry that you're running into this - it's a source of continuing frustration for us that we don't have a better story here.
unfortunately, there's not a lot to say here that's not already been said in the various other issues that touch on this. basically, dep was doing a bunch of up-front cloning, which tends to be costly and take a while. the reason we struggle with providing feedback on this is because the subsystem that actually does the cloning doesn't have a good way of communicating back that it's actually doing work - it has no logging context in which to operate.
the best short-term solution we have is #1144, which should help a lot at least for this case, as you didn't actually encounter any problems other than the long clone times. i'm gonna close this in favor of that.

Thanks @sdboyer , shall have a read of that one :)


[Bug]:

Describe the bug
After home assistant Core update 2024.3.0 the integration stop working correctly. After download to previous version everything start working again
Firmware of your Miniserver
Miniserver (Gen 1)
por Loxone
Firmware: <IP_ADDRESS>
HomeAssistant install method
Gassió (HACS)
Version of HomeAssistant
2024.3.0
Version of Pyloxone
0.6.2
Update pyloxone
Yes
Log
Settings for the log can be found on the main page under the section Log Configuration

Same issue downgraded hass os back to February

@elRadix
@mariovw
can you provide error messages? because I see no errors on my system with the newest HA. I can do nothing if I can not reproduce it. I have only a view WARININGS which can be ignored until  Home Assistant Core 2025.3.

Hi @JoDehli,
I am not a code expert but if upgrade to versión 2024.3.0 and I go to the logs I can see the following:

``` Registrador: homeassistant.config_entries
Fuente: config_entries.py:504
Ocurrió por primera vez: 20:33:52 (1 ocurrencias)
Último inicio de sesión: 20:33:52

Error setting up entry PyLoxone for loxone
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/httpx/_transports/default.py", line 69, in map_httpcore_exceptions
    yield
  File "/usr/local/lib/python3.12/site-packages/httpx/_transports/default.py", line 373, in handle_async_request
    resp = await self._pool.handle_async_request(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/httpcore/_async/connection_pool.py", line 216, in handle_async_request
    raise exc from None
  File "/usr/local/lib/python3.12/site-packages/httpcore/_async/connection_pool.py", line 196, in handle_async_request
    response = await connection.handle_async_request(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/httpcore/_async/connection.py", line 101, in handle_async_request
    return await self._connection.handle_async_request(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/httpcore/_async/http11.py", line 143, in handle_async_request
    raise exc
  File "/usr/local/lib/python3.12/site-packages/httpcore/_async/http11.py", line 113, in handle_async_request
    ) = await self._receive_response_headers(**kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/httpcore/_async/http11.py", line 186, in _receive_response_headers
    event = await self._receive_event(timeout=timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/httpcore/_async/http11.py", line 238, in _receive_event
    raise RemoteProtocolError(msg)
httpcore.RemoteProtocolError: Server disconnected without sending a response.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 504, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/loxone/__init__.py", line 175, in async_setup_entry
    if not await miniserver.async_setup():
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/loxone/miniserver.py", line 133, in async_setup
    request_code = await self.lox_config.getJson()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/loxone/api.py", line 105, in getJson
    api_resp = await client.get("/jdev/cfg/apiKey")
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1801, in get
    return await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1574, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1661, in send
    response = await self._send_handling_auth(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1689, in _send_handling_auth
    response = await self._send_handling_redirects(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1726, in _send_handling_redirects
    response = await self._send_single_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1763, in _send_single_request
    response = await transport.handle_async_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/httpx/_transports/default.py", line 372, in handle_async_request
    with map_httpcore_exceptions():
  File "/usr/local/lib/python3.12/contextlib.py", line 158, in __exit__
    self.gen.throw(value)
  File "/usr/local/lib/python3.12/site-packages/httpx/_transports/default.py", line 86, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.RemoteProtocolError: Server disconnected without sending a response.

If you need another log, please let me know how to proceed.

In my HA all entities sync with loxone doesn't work. For example, I have temp, wind a luninity sensors and they doesn't load anything. Also other entities appears ON and they aren't.

I also upgrade to pyloxone V0.6.3 and nothing is fixed.

Hope this help.

Many thanks for support
Mario

Hello again, I activated the debug log and I download the following file.
Here an example now in not loading all the entities:

home-assistant_loxone_2024-03-11T09-15-34.417Z.log
Best,
Mario

@mariovw I know now what has chaneg under the hood. The library called httpx which I use to establish the first connection has been updated since with the new home assistant release. I found some posts where similar errors occurred. The strange thing is that I happened frequently especially when the requested server, in your case the miniserver, response has a special http server implementation. Do you have a big installation? And do you use the internal address or do you use a dns service? And occours the error everytime or does it sometimes connect successfully?
I made a little change on the newest commit on the master branch. Can you copy it manually to your installation and test it?

Hi @JoDehli,
I did the changes you proposed. Now it woks like a charm!
Many thanks for your support!
Best regards,
Mario

Hi @JoDehli ,
I did the changes you proposed and after testing the problem remain...
Answering your questions...

My installation is not too big (more or less I have 6 covers, general lights switch, temp, wind sensors and 5 switchs)
Regarding internal address I can see in the server configuration the following:

Local IP: 192.168.1.XX
Remote address: dns.loxonecloud,com/XXXXXXXXXX

The problem is not the connection. The connection is done. The problem is it seems it doesn't gather now the sensors info

and buttons doesn't work. I have also buttons to open the main door and garage door and doesn't work
Please le me know if you need further details on any point
Best regards,
Mario
Note: I attahced below what I can see in the log
Este error se originó a partir de una integración personalizada.

Logger: homeassistant
Source: custom_components/loxone/api.py:371
Integration: PyLoxone (documentation, issues)
First occurred: 12:33:11 (4 occurrences)
Last logged: 12:33:38

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1302, in close_connection
    await self.transfer_data_task
  File "/usr/local/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 970, in transfer_data
    await asyncio.shield(self._put_message_waiter)
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/loxone/miniserver.py", line 182, in listen_loxone_send
    await self.api.send_websocket_command(device_uuid, value)
  File "/config/custom_components/loxone/api.py", line 371, in send_websocket_command
    await self._ws.send(command)
  File "/usr/local/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 635, in send
    await self.ensure_open()
  File "/usr/local/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 935, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1011 (unexpected error) keepalive ping timeout; no close frame received

@mariovw in your previous log was the problem by establishing the connection. I think at the moment I can not really help as I can not reproduce it.

Same issue and connections do not establish anymore.
May be this helps:
  File "/config/custom_components/loxone/__init__.py", line 218, in handle_websocket_command     await miniserver.api.send_websocket_command(device_uuid, value)   File "/config/custom_components/loxone/api.py", line 369, in send_websocket_command     await self._ws.send(command)   File "/usr/local/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 635, in send     await self.ensure_open()   File "/usr/local/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 935, in ensure_open     raise self.connection_closed_exc() websockets.exceptions.ConnectionClosedError: sent 1011 (unexpected error) keepalive ping timeout; no close frame received

Hi all,
i followed the steps shared by @Tommy032017 and everything is working again.
Thanks everybody!
Mario

@mariovw what did you do? Update to the es beta?

Hi again,
No, I have updated to the latest version but not the beta. But let me tell you about some behavior that I have seen.
A new HA update has arrived. After updating it stopped working again. It seemed strange to me and I tried restarting the Loxone server. And after that everything start working again.
I think that restarting the Loxone server from the beginning would have worked everything.
I hope this helps.

No Updates. Only reinstall Pyloxone and reboots.
13.03.2024 19:12:00 Joachim D. @.***>:

@mariovw[https://github.com/mariovw] what did you do? Update to the new beta?
—
Reply to this email directly, view it on GitHub[https://github.com/JoDehli/PyLoxone/issues/247#issuecomment-1995237615], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AGKQM3ABXOU2JMLXFJKIHFDYYCJG5AVCNFSM6AAAAABENIAPCCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJVGIZTONRRGU].
You are receiving this because you were mentioned.
[Verfolgungsbild][https://github.com/notifications/beacon/AGKQM3E2GPDDJBMSMZ3ANWLYYCJG5A5CNFSM6AAAAABENIAPCCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTW5TUO6.gif]

@Tommy032017 @mariovw The beta should not be used. It was a bad idea to release it. I has a complete different websocket implementation. I work on another implementation which should work as stable as the current release but is better maintainable. Thanks for your help.

Hi all,
After new HA update (2024.3.3) it stop working again. I tried lot of things... Reinstall, update, reset the loxone server,... But no exit... The pyloxone loads in HA but doesn't read well the devices...
Someone has the same issue?
Best

@mariovw I have also the newest version installed without any issues. I think it is a problem with your connection between the miniserver and you ha installation. If there is a problem the connections shuts down and newer comes back. I had that in the past with a user which had the ha and the loxone in different networks. The solution was to keep them on the same network. I think you should search on your side for such problems.

Hi @JoDehli,
Thanks for you feedback! It helps me to solve the problem!
It's true I have my HA and Loxone server in two different netwoks. Connecting all in the same network wasn't feasible to me or at least I would need lot of time to setup everything. But I was thinking in another solution. My Loxone server has to ports open in my main router. One for internal communication (port 80) and another one for external communications. The solution to allow the communications between Loxone and HA is open the port 80 in the router where HA is connected allowing access through this port between the two routers.
Now everything is working again. Nevertheless I don't know why it was working in the past...
Hope this helps to others with the same problem
Thanks to all,

@mariovw I think it has to do with the update of the http lib which ha uses. Hopefully the problem is solved forever and not until the next ha update ;-)

Hi Again,
after rebooting it crashes again! So sadly it's not the final solution.
I'll play with the router for IP Forwading options and try to enhance the communication between the two networks.
I'll let you know any advance


Show warning message when icc is false and bridge-nf-call-iptables is disabled

This pull request is for showing a warning message when --icc=false and net.bridge.bridge-nf-call-iptables is disabled.
If net.bridge.bridge-nf-call-iptables is disabled, iptables does not see bridge traffic. So contaniers can communicate with each other even though icc option is false.
I found this problem when I tested Docker on CoreOS. Since Linux kernel 3.18 rc-1, you have to modprobe br_netfilter explicitly to enable net.bridge.bridge-nf-call-iptables.
It took very long time to investigate this problem because there were no messages and Docker worked correctly other than --icc=false did not work.
So it is kind to show this warning message to find the problem easily.
Please check it.

I'm wondering if this should be just a warning, or a full error. Just outputting a warning doesn't sound logical to me if --icc=false is being ignored.
(I'm not a maintainer, so just my personal thoughts)

I'm wondering if this should be just a warning, or a full error. Just outputting a warning doesn't sound logical to me if --icc=false is being ignored.

I'm wondering it, too.  But exiting with error is not compatible with current version.
So I fixed to show just warn message tentatively.
If exiting with error is better, I will fix it.

If exiting with error is better, I will fix it.

Just leave it (for now); it should be easy to change if a maintainer thinks it's better during review.

@mizzy  What do you think about #11405 ?

@LK4D4 #11405 is better than mine. I wil close this. Thanks!

@mizzy Thanks!

@mizzy thanks for your contribution. Even though it didn't get merged, it is still much appreciated. Don't let it stop you from contributing in the future :smile:


TCC runs slowly

TCC runs after 2 minutes when you log on char

Check memory/cpu usage.

<10% CPU usage and 9GB of RAM when loading
<1% CPU usage and 4GB RAM after

15-17% CPU from 4GB to 9GB RAM when loading

Is there any specific moment when it happens?

Every time I log on char

Can you zip whole TCC folder and upload it somewhere?

https://drive.google.com/file/d/1Y1-7K0iVOLOz4Cyb14N5i8Txa3CTn0ZD/view?usp=sharing

Delete lancer-skills.xml from resources/skills/ and report back if it happens again.

thanks a lot<3


[APIDigester] Allow outputting module diff diagnostics as JSON for other tools to consume

The motivation behind this change is to begin experimenting with automatic semantic versioning suggestions for Swift packages. By serializing the kind of API change in addition to the diagnostic text, it gives tools which use the api digester a little more flexibility in how they interpret the output of a -diagnose-sdk action. The new behavior is gated behind the --json flag.
Example Output:
{
  "version": {
    "major": 0,
    "minor": 1
  },
  "diagnostics": [
    {
      "identifier": "declTypeChange",
      "text": "cake: Constructor S1.init(_:) has parameter 0 type change from Swift.Int to Swift.Double",
      "location": ""
    },
    {
      "identifier": "funcSelfAccessChange",
      "text": "cake: Func S1.foo1() has self access kind changing from NonMutating to Mutating",
      "location": ""
    },
...

@swift-ci please smoke test

@swift-ci please test Windows

@swift-ci please test Windows

@swift-ci please smoke test

@swift-ci please smoke test

@swift-ci please smoke test Linux

@swift-ci please smoke test

@swift-ci please smoke test macOS

@swift-ci please test Windows platform

@swift-ci please test Windows platform


fix integration testing path

oh ok! btw you've managed to fix the notebook job! \o/

and i'm guessing the multiclass-cartree integration test fails because of this: https://github.com/shogun-toolbox/shogun/pull/4869/files#diff-66eff816d6c5ba765a04c543b4301daaR31
@LiuYuHui do you think you wanna create a patch (this is a good exercise how to update integration test/shogun-data repository) to fix the error in the integration test?

oh ok! btw you've managed to fix the notebook job! \o/

Next one, cookbook.. Btw notebooks should be failing on?

and i'm guessing the multiclass-cartree integration test fails because of this: https://github.com/shogun-toolbox/shogun/pull/4869/files#diff-66eff816d6c5ba765a04c543b4301daaR31
@LiuYuHui do you think you wanna create a patch (this is a good exercise how to update integration test/shogun-data repository) to fix the error in the integration test?

ok, first sending a PR against the shogun-data, and sending a PR to shogun?

@LiuYuHui yes basically that's the idea


Add @ScanRoot annotation that can be added to package-info.java

Add a @ScanRoot annotation that can be added to a package-info.java file to annotate a package as the root of a package whitelist.
Will need a method FastClasspathScanner#useScanRootAnnotation() that will perform a scan of the whole classpath, looking for package-info.class files, and checking them for annotations, then whitelisting anything below a @ScanRoot annotation.

Closing this, as it is a bit esoteric (you'd have to scan the whole classpath to find all @ScanRoot annotations in the first place).


repo: Sync release/changelogs

1.19.5
1.20.4
1.21.3
1.22.1
1.22.2

Signed-off-by: Ryan Northey<EMAIL_ADDRESS>Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

/docs


Kogito 3064

Many thanks for submiting your Pull Request :heart:!
Please make sure that your PR meets the following requirements:

[ ] You have read the contributors' guide
[ ] Pull Request title is properly formatted: [KOGITO-XYZ] Subject
[ ] Pull Request contains link to the JIRA issue
[ ] Pull Request contains description of the issue
[ ] Pull Request does not include fixes for issues other than the main ticket
[ ] Your feature/bug fix has a unit test that verifies it
[ ] You've tested the new feature/bug fix in an actual OpenShift cluster

Codecov Report

Merging #43 into master will increase coverage by 11.70%.
The diff coverage is 40.08%.

@@             Coverage Diff             @@
##           master      #43       +/-   ##
===========================================
+ Coverage   44.07%   55.78%   +11.70%
===========================================
  Files         145       64       -81
  Lines        8742     1997     -6745
===========================================
- Hits         3853     1114     -2739
+ Misses       4457      766     -3691
+ Partials      432      117      -315

Flag
Coverage Δ

#cli
55.78% <40.08%> (-12.52%)
:arrow_down:

#operator
?

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

Impacted Files
Coverage Δ

cmd/kogito/command/flag/artifact_flag.go
0.00% <0.00%> (ø)

cmd/kogito/command/flag/build_flag.go
0.00% <0.00%> (ø)

cmd/kogito/command/flag/env_flag.go
0.00% <0.00%> (ø)

cmd/kogito/command/flag/gitsource_flag.go
0.00% <0.00%> (ø)

cmd/kogito/command/flag/image_flag.go
0.00% <0.00%> (ø)

cmd/kogito/command/flag/install_flag.go
0.00% <0.00%> (ø)

cmd/kogito/command/flag/kafka_flag.go
0.00% <0.00%> (ø)

cmd/kogito/command/flag/monitoring_flag.go
0.00% <0.00%> (ø)

cmd/kogito/command/flag/operator_flag.go
0.00% <ø> (ø)

cmd/kogito/command/flag/podresource_flag.go
0.00% <0.00%> (ø)

... and 119 more

Continue to review full report at Codecov.

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


Search API

Is your feature request related to a problem? Please describe.
There doesn't seem to be any way to query searchable models with the Amplify Libraries API plugin, making Libraries unusable for the search case. A first-class api for this would be very useful.
Describe the solution you'd like
Something like list queries but for searching. E.g.:
Amplify.API.query(request: .search(...
Describe alternatives you've considered
The only alternative is to go back to the mobile SDK. Correct me if I'm missing something.

@TheBenck The list query API allows you to specify a predicate for searching your models. Does that meet your needs? If not, can you provide some more detail around your use case and explain what features are missing?

@palpatim Thanks! This is what I needed. Is there more documentation somewhere on the predicate? Also, are sorting and limiting possible like with the functions generated for API.swift?

Hey @TheBenck ,
Search queries are not support out-of-the-box yet. There are available workarounds though. The recommended one is to create a custom query, which means create your own function that returns an instance of GraphQLRequest<[M]> that contains the search query.
For example:
import Amplify

let searchTodoQuery = """
query SearchTodos($filter: SearchableTodoFilterInput) {
  searchTodos(filter: $filter) {
    items {
      id
      name
      done
      createdAt
      description
    }
  }
}
"""

extension GraphQLRequest where R == [Todo] {
    static func search(_: Todo.Type, byKeywords keywords: String? = nil) -> Self {
        var variables: [String: Any] = [:]

        if let matches = keywords {
            variables = [
                "filter": [
                    "name": [
                        "match": matches,
                    ],
                ],
            ]
        }

        return GraphQLRequest(document: searchTodoQuery,
                              variables: variables,
                              responseType: [Todo].self,
                              decodePath: "searchTodos.items")
    }
}

Notes:

I have a model Todo with @searchable
If you check the compiled GraphQL at amplify/build/schema.graphql, you will find the query searchTodos and the related types
then I created an extension to GraphQLRequest where R == [Todo] (the response type is an array of Todo)
that enables me to call:

_ = Amplify.API.query(request: .search(Todo.self, byKeywords: "important")) {
    switch $0 {
    case let .success(result):
        print(result)
    case let .failure(error):
        print("error")
        print(error)
    }
}

Tests:

I created 3 todos using AppSync console, 2 of them had "important" in the name
If I query passing byKeywords: "important" I get 2 results back
If I query not passing byKeywords (or passing nil) I get all 3 results back

Next steps:

I'll mark this issue as a feature request so you or anyone else looking for @searchable support can follow the progress here
We have a documentation PR out that @lawmicha is working at documenting custom queries
We're actively working on adding first-class support for @searchable queries so you won't have to create the custom query yourself and build the filter using the QueryPredicate operators (at least for the majority of cases, more complex/customized cases will have to fallback to custom queries)

we have added some documentation for custom queries here: https://docs.amplify.aws/lib/graphqlapi/advanced-workflows/q/platform/ios however, it does not cover the searchable use case directly.
As mentioned, @drochetti's comment above sums it up as the recomended approach for the workaround.
I've expanded on this example to cover all possible search API parameters from AppSync:
import Amplify
import AWSPluginsCore

struct AppSyncSearchResponse<Element: Model>: Codable {
    let items: [Element]
    let nextToken: String?
    let total: Int?
}

extension GraphQLRequest {
    static func search<M: Model>(_ modelType: M.Type,
                                 filter: [String: Any]? = nil,
                                 from: Int? = nil,
                                 limit: Int? = nil,
                                 nextToken: String? = nil,
                                 sort: QuerySortBy? = nil) -> GraphQLRequest<AppSyncSearchResponse<M>> {
        let name = modelType.modelName
        let documentName = "search" + name + "s"
        var variables = [String: Any]()
        if let filter = filter {
            variables.updateValue(filter, forKey: "filter")
        }
        if let from = from {
            variables.updateValue(from, forKey: "from")
        }
        if let limit = limit {
            variables.updateValue(limit, forKey: "limit")
        }
        if let nextToken = nextToken {
            variables.updateValue(nextToken, forKey: "nextToken")
        }
        if let sort = sort {
            switch sort {
            case .ascending(let field):
                let sort = [
                    "direction": "asc",
                    "field": field.stringValue
                ]
                variables.updateValue(sort, forKey: "sort")
            case .descending(let field):
                let sort = [
                    "direction": "desc",
                    "field": field.stringValue
                ]
                variables.updateValue(sort, forKey: "sort")
            }
        }
        let graphQLFields = modelType.schema.sortedFields.filter { field in
            !field.hasAssociation || field.isAssociationOwner
        }.map { (field) -> String in
            field.name
        }.joined(separator: "\n      ")
        let document = """
        query \(documentName)($filter: Searchable\(name)FilterInput, $from: Int, $limit: Int, $nextToken: String, $sort: Searchable\(name)SortInput) {
          \(documentName)(filter: $filter, from: $from, limit: $limit, nextToken: $nextToken, sort: $sort) {
            items {
              \(graphQLFields)
            }
            nextToken
            total
          }
        }
        """
        return GraphQLRequest<AppSyncSearchResponse<M>>(document: document,
                                                        variables: variables.count != 0 ? variables : nil,
                                                        responseType: AppSyncSearchResponse<M>.self,
                                                        decodePath: documentName)
    }
}

You can drop this code into your project and start using it as it exposes the AppSync search API exactly as provisioned.
Example call pattern:
let filter: [String: Any] = [
    "name": [
        "matchPhrase": "first"
    ]
]
Amplify.API.query(request: .search(Blog6.self,
                                   filter: filter,
                                   limit: 1000,
                                   sort: QuerySortBy.ascending(Blog6.keys.id)))

Sample App project

we have added some documentation for custom queries here: https://docs.amplify.aws/lib/graphqlapi/advanced-workflows/q/platform/ios however, it does not cover the searchable use case directly.
As mentioned, @drochetti's comment above sums it up as the recomended approach for the workaround.
I've expanded on this example to cover all possible search API parameters from AppSync:
import Amplify
import AWSPluginsCore

struct AppSyncSearchResponse<Element: Model>: Codable {
    let items: [Element]
    let nextToken: String?
    let total: Int?
}

extension GraphQLRequest {
    static func search<M: Model>(_ modelType: M.Type,
                                 filter: [String: Any]? = nil,
                                 from: Int? = nil,
                                 limit: Int? = nil,
                                 nextToken: String? = nil,
                                 sort: QuerySortBy? = nil) -> GraphQLRequest<AppSyncSearchResponse<M>> {
        let name = modelType.modelName
        let documentName = "search" + name + "s"
        var variables = [String: Any]()
        if let filter = filter {
            variables.updateValue(filter, forKey: "filter")
        }
        if let from = from {
            variables.updateValue(from, forKey: "from")
        }
        if let limit = limit {
            variables.updateValue(limit, forKey: "limit")
        }
        if let nextToken = nextToken {
            variables.updateValue(nextToken, forKey: "nextToken")
        }
        if let sort = sort {
            switch sort {
            case .ascending(let field):
                let sort = [
                    "direction": "asc",
                    "field": field.stringValue
                ]
                variables.updateValue(sort, forKey: "sort")
            case .descending(let field):
                let sort = [
                    "direction": "desc",
                    "field": field.stringValue
                ]
                variables.updateValue(sort, forKey: "sort")
            }
        }
        let graphQLFields = modelType.schema.sortedFields.filter { field in
            !field.hasAssociation || field.isAssociationOwner
        }.map { (field) -> String in
            field.name
        }.joined(separator: "\n      ")
        let document = """
        query \(documentName)($filter: Searchable\(name)FilterInput, $from: Int, $limit: Int, $nextToken: String, $sort: Searchable\(name)SortInput) {
          \(documentName)(filter: $filter, from: $from, limit: $limit, nextToken: $nextToken, sort: $sort) {
            items {
              \(graphQLFields)
            }
            nextToken
            total
          }
        }
        """
        return GraphQLRequest<AppSyncSearchResponse<M>>(document: document,
                                                        variables: variables.count != 0 ? variables : nil,
                                                        responseType: AppSyncSearchResponse<M>.self,
                                                        decodePath: documentName)
    }
}

You can drop this code into your project and start using it as it exposes the AppSync search API exactly as provisioned.
Example call pattern:
let filter: [String: Any] = [
    "name": [
        "matchPhrase": "first"
    ]
]
Amplify.API.query(request: .search(Blog6.self,
                                   filter: filter,
                                   limit: 1000,
                                   sort: QuerySortBy.ascending(Blog6.keys.id)))

Sample App project

Hi @TheBenck  @randeepbhatia ,
Do you have a example schema you could provide so that we can make sure first class support covers your use case?
Could you also provide us with which parameters you are using with the search API?

which filters are you using?
Do you have a use for the from parameter?
Do you care about the total count in the response?

Hi @TheBenck  @randeepbhatia ,
Do you have a example schema you could provide so that we can make sure first class support covers your use case?
Could you also provide us with which parameters you are using with the search API?

which filters are you using?
Do you have a use for the from parameter?
Do you care about the total count in the response?

Hi @lawmicha
here is the schema for the model that I am trying to use
type Vendor @model
{
id: ID!
name: String!
address: String!
features: String
description: String
email: [AWSEmail]!
imageUrl: [AWSURL]
dineInWaitTime: Int
carryOutWaitTime: Int
isFeatured: Boolean!
location: Location!
rating: Float!
status: String!
tags: [String]
cuisineType: [String]
categories: [String]
hoursOfOperation: AWSJSON # This will be JSON as M,T,W,TH,F,SA,SU and hours in 24 HR clock.
menuType: [MenuModel] @connection(keyName: "byMenuType", fields: ["id"])
}
My goal is to fetch vendors for a given location
Filter them by
a. cuisine type
b. open now flag
c. Dine IN / Take out flag
Sort by
a. Distance
b. Rating
c. Wait times
With Pagination
Don't really care about the total count if pagination can be achieved.

Hi @lawmicha
here is the schema for the model that I am trying to use
type Vendor @model
{
id: ID!
name: String!
address: String!
features: String
description: String
email: [AWSEmail]!
imageUrl: [AWSURL]
dineInWaitTime: Int
carryOutWaitTime: Int
isFeatured: Boolean!
location: Location!
rating: Float!
status: String!
tags: [String]
cuisineType: [String]
categories: [String]
hoursOfOperation: AWSJSON # This will be JSON as M,T,W,TH,F,SA,SU and hours in 24 HR clock.
menuType: [MenuModel] @connection(keyName: "byMenuType", fields: ["id"])
}
My goal is to fetch vendors for a given location
Filter them by
a. cuisine type
b. open now flag
c. Dine IN / Take out flag
Sort by
a. Distance
b. Rating
c. Wait times
With Pagination
Don't really care about the total count if pagination can be achieved.

Thank you so much for your assistance @lawmicha

Thank you so much for your assistance @lawmicha


Added privacy page, added link to page from signup

Description
Create Privacy Policy page with content
Added the Privacy Policy page and changed the current link on the signup page so it links to this page. Also added the proper opacity values to the safelist for the color contrast PR so the List component works properly.
Acceptance Criteria
Implement the Privacy Policy page as per Figma designs
Test Instructions

Pull in branch
Type npm run dev
Navigate to the Signup page
Click Read the full privacy policy to go to the Privacy Policy page

Checklist

[x] Strings use placeholders for translation (No hard coded strings)
[x] Unit tests have been added/updated

Product and Sprint Backlog
Trello

Sorry I just saw something else, at the bottom of the signup page, there's a second "Read the full privacy policy" link and it seems to link to the canada.ca one.

Whoops, not sure how I missed that, thanks. Fixed now.


Temporary measure for the header to point into token's memory

Pointing to a volatile memory is a bit better category of a bug, than pointing to a random location.
#799
Not a fix, but an improvement.
THese are exactly the same changes as https://github.com/Azure/azure-sdk-for-c/pull/800, but this one comes from a correct branch from my fork, and I pulled the most recent changes from our repo's master.

Not a fix, but an improvement.

What's preventing us from actually fixing the issue?

Not a fix, but an improvement.

What's preventing us from actually fixing the issue?

@ahsonkhan , we need to think how to fix it.
Current implementation (and I believe also previous implementation using Mutex) has the same issue.
Azure Core is handling the credential in a thread-safe way. But as soon as we expose it to the transport layer, we are losing that thread-safety.
My proposal is to expose the entire _az_credential or _az_token to the transport layer, and let the transport adapter to use the get_token() api to get the token in a thread-safe way.
But we need @JeffreyRichter feedback here.
(Also, this is not blocking or super important because no one is yet using HTTP in the SDK for C)


Visualization: backend changes on scatterplot viz

Danielle said there would be two backend changes early next week on scatterplot viz: a) smoothedMean option would be removed from scatter; b) including errors passed along from R for smoothed means.
Will adopt them at scatterplot viz. For a), scatterplot controls would need to be changed too

I could check the response from feature site and realized that there exists a new response, SmoothedMeanError.
Probably this needs to be handled correctly (discussing with Danielle)

Hi @dmfalke @bobular,
I have examined and tested the new response with smoothedMeanError and I want to hear your opinion about this.
TL;DR
For Gates demo, we will be fine without further change as it would be a scripted demo, however, in my opinion, we should bypass io-ts error by using union type for some response parameters to avoid a backend issue
For detailed information:
Such a error case occurs when overlay variable is selected with a specific combination of X/Y axis variable. One example that causes an error is: X = Sleeping rooms in dwelling; Y = Persons living in house; Overlay = Country (see below screenshot as well). The smoothedMeanError response is comprised of a string, which, if not empty, contains R error message: e.g., Error in smooth.construct.cr.smooth.spec(object, data, knots) : x has insufficient unique values to support 10 knots: reduce k. - as it stated, the case does not have enough unique x data to compute smoothed mean (see below screenshot for reference).
One issue in the backend change is that some response types are incorrect when smoothedMeanError is not empty (i.e., with message): smoothedMeanY and smoothedMeanSE should return number array but currently return string array, which causes io-ts error. Thus I reported this to Danielle by making an issue at plot.data. So the current feature site shows the io-ts error with the above example and plot option of Smoothed Mean With Raw. Certainly, this issue can be temporarily bypassed by allowing both number and string arrays for those parameters (at data-api.ts).
I have also tested how the current scatter plot viz responds with the bypass (using union type) and actually it works without any further changes. The error cases, India and Kenya in the example case, are plotted without error, but their smoothed mean and confidence interval are basically non-existent because smoothedMeanX/Y/SE response are empty for error case: yes it makes sense anyway. A screenshot is attached for the case.

Thanks for the detailed information, DK. We should definitely not do
anything related to showing errors at this point. I think we need a more
focused discussion on this topic, at least involving Danielle and Steve,
but possibly others as well.
You mentioned an io-ts error on the feature site. I think it’s okay for now
since the demo will be scripted, so it can be avoided.
On Thu, Jun 10, 2021 at 10:47 AM DK @.***> wrote:

Hi @dmfalke https://github.com/dmfalke @bobular
https://github.com/bobular,
I have examined and tested the new response with smoothedMeanError and I
want to hear your opinion about this.
TL;DR
For Gates demo, we will be fine without further change as it would be a
scripted demo, however, in my opinion, we should bypass io-ts error by
using union type for some response parameters to avoid a backend issue
For detailed information:
Such a error case occurs when overlay variable is selected with a specific
combination of X/Y axis variable. One example that causes an error is: X =
Sleeping rooms in dwelling; Y = Persons living in house; Overlay = Country
(see below screenshot as well). The smoothedMeanError response is comprised
of a string, which, if not empty, contains R error message: e.g., Error
in smooth.construct.cr.smooth.spec(object, data, knots) : x has
insufficient unique values to support 10 knots: reduce k. - as it stated,
the case does not have enough unique x data to compute smoothed mean (see
below screenshot for reference).
One issue in the backend change is that some response types are incorrect
when smoothedMeanError is not empty (i.e., with message): smoothedMeanY and
smoothedMeanSE should return number array but currently return string
array, which causes io-ts error. Thus I reported this to Danielle by making
an issue at plot.data https://github.com/VEuPathDB/plot.data/issues/40.
So the current feature site shows the io-ts error with the above example
and plot option of Smoothed Mean With Raw. Certainly, this issue can be
temporarily bypassed by allowing both number and string arrays for those
parameters (at data-api.ts).
I have also tested how the current scatter plot viz responds with the
bypass (using union type) and actually it works without any further
changes. The error cases, India and Kenya in the example case, are plotted
without error, but their smoothed mean and confidence interval are
basically non-existent because smoothedMeanX/Y/SE response are empty for
error case: yes it makes sense anyway. A screenshot is attached for the
case.
[image: scatter-error1]
https://user-images.githubusercontent.com/12802305/121544996-1fe2ac80-c9d8-11eb-8e28-9d438fa5032d.png
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/VEuPathDB/web-eda/issues/134#issuecomment-858686236,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACZEUYQELNUMA7B23QKDPTTSDF6PANCNFSM46DT6QXQ
.


FilenameRule does not find lint errors if missing editorconfig (new in 0.40.0)

Expected Behavior
The filename rule should produce a lint error when the kotlin source file name does not match the symbol declared whether or not an editorconfig is present or if it is missing path section which includes the offending file.
Observed Behavior
Starting in 0.40.0 it does not find this error.
However 0.39.0 does under the same circumstances.
Steps to Reproduce
Create file src/main/kotlin/Wrong.kt
class Right

(no editorconfig)
ktlint src/main/kotlin/Wrong.kt and it does not find any errors
with editorconfig
[*.{kt,kts}]
indent_size = 4

a lint error will be found
src/main/kotlin/Wrong.kt:1:1: class Right should be declared in a file named Right.kt (cannot be auto-corrected)

If you again change the editorconfig file to the below, the lint error will disappear again
[src/test/**/*.{kt,kts}]
indent_size = 4

Your Environment

MacOS
ktlint 0.40.0
Java 11

We also faced this, @romtsn @Tapchicoma, but it looks to be an expected behavior.
May be we will add default for editor config

Interestingly "filename" rule does not use .editorconfig, but I can reproduce this issue. Will check what is the cause.

Found the issue, will fix for the next release.