Generics error with typedef

Can't seem to be able to use typedef and generics while it works when using the full function signature.
Dart SDK version: 2.16.2 (stable) (Tue Mar 22 13:15:13 2022 +0100) on "macos_x64"
class Foo {}

typedef Bar<T extends Foo> = void Function(T);

class Daz<T extends Foo> {
  void load(T t) {}

  void fus(void Function(T) fn) {}

  void foo(Bar fn) {}

  void daz() {
    fus(load); // OK
    foo(load); // error
    foo(load<T>); // error
  }
}

Bar means Bar<Foo> (instantiate to bounds). You mean to write Bar<T> in foo signature:
  void foo(Bar<T> fn) {}

Then foo(load) will compile.
load<T> does not compile because load is not a generic function itself so it expects no type arguments of its own.


[GSB] Rework construction of nested types to make it lazier

Our handling of nested types was scattered in several places, and
(worse) correct computation of archetype anchors required us to
"explode" out all of the potential archetypes for every associated
type with the given name to ensure that we get the right one.
Make nested type construction somewhat more lazy: if asked for a
nested type for a specific associated type, just create the nested
type for that associated type (instead of all of them). If asked for
a nested type by name, either return the one we already have or create
the one that's most likely to be the archetype anchor. Overall, this
should result in many fewer potential archetypes being constructed.

@swift-ci please smoke test and merge


improve readme.md file

readme.md file should conatain the details of your website and aslo  details about step by step contributing

Can you assign this work to me? And I will always contribute to any issue, cause it makes me think and grow further


Error: contains invalid WIN32 path characters.

When I want to run project locally yarn dev I get an error
 Error: D:\own\uk.reactjs.org\public\page-data\D:\own\uk.reactjs.org\examples\hello-world contains invalid WIN32 path characters.

Does anyone know how to fix this ?

I am facing the same. Any solution?

I am facing the same. Any solution?

unfortunately no


Migrated from bash scripts to test-containers

About the changes
Relatively major refactor superseding https://github.com/Unleash/sdk-integration-tester/pull/15 to improve resiliency and speed of the tests

src/client-spec.test.ts was refactored for speed. Previously it was spinning up an SDK container and running all client tests for that container. This requires for each pair (test-scenario, SDK) to reset the SDK and the server resulting in test-scenarios*SDKs Docker container resets. Actually, it's better to configure the server once for one of the client-test scenarios and run all SDKs against that configuration (because the server is set up with a read-only configuration), resulting in test-scenarios+SDK number of resets. m*n > n+m
Controlling the containers from inside the tests allows us to run different instances of the SDK or the server giving us better control over our runtime.

Important folders

src/sdks folder contains all the SDK implementations
src/servers folder contains different server implementations
src/lib folder contains different utils and interface definitions

Future
This enables us to start thinking about a more declarative configuration for tests, something like:
adminToken: '*:*.unleash-insecure-admin-api-token'
clientToken: '*:development.unleash-insecure-api-token'
servers:
  - type: OSSServer
    image: unleashorg/unleash-server:latest
    postgresImage: postgres:alpine3.15
  - type: MockServer
sdks:
  - type: node
  - type: python
    excluding:
      '12'
  - type: java
    client: io.getunleash:unleash-client-java:5.1.0
tests:
  load:
    file<EMAIL_ADDRESS>    excluding:
      '09'
      '13'
      '14'
      '15'

Running locally
Test Suites: 3 passed, 3 total
Tests:       229 passed, 229 total
Snapshots:   0 total
Time:        143.613 s

I like the idea. :)


[FEATURE]Analysis of search with menu at the bottom of the page on mobile

Describe how this feature will help us improve
Analysis of the possibility of adding 'search' at the bottom of the screen on mobile devices is needed. So that the user does not have to take their hands off the screen.
Describe the solution you'd considered
Consider adding search together with menu as the icon may suggest user such use.

I've added alternative buttons set on the left to the style guide. My idea is to replace old button with this set, much better imo:)

I've added search to menu view on mobile, so I think it can solve it. as icon on to bottom nav suggest menu and search.

It is done and should look as below:


Add Getblock to Builder Tools

Getblock Polkadot RPC provider
👋👋 Hello there! Welcome. Please follow the instruction below.
Click the Preview tab and select a PR template:

Add Showcase
Add Builder Tool
Update documentation or Fix a Bug

@JoGetBlock most importantly you will have to add the file ./builder-tools/getblock.png to this PR (i.e. in the same directory as the other Builder Tools images).  As you can see, the Portal does not build without it.  Logo images 2x as wide as they are high are recommended.

@JoGetBlock the last changes were not "required" since, at this time:

the project image is still not included in this PR (preventing the Portal from even building, which you would see if you had done this locally as recommended here);

the getstarted: link is not quoted, generally a syntax error;

that link isn't what I was hoping to see in Add Getblock to Builder Tools #1023 (review) because

this page doesn't even mention Cardano;
what I was talking about: well integrated Builder Tools often write Get Started pages on the Dev Portal as an orientation for Cardano developers specifically... e.g. what Blockfrost has written here: https://developers.cardano.org/docs/get-started/blockfrost

I'll watch this while other reviewers have a look at this, but so far I believe little effort has been put into either creating a proper submission or establishing that this tool is part of the Cardano ecosystem.

My mistake, didn't get this right, let me redo all these corrections once more and create a decent getstarted for you.

@JoGetBlock had to touch up your code a bit because we were getting GitHub build check warnings because of the unquoted JS string fixed in https://github.com/cardano-foundation/developer-portal/pull/1023/commits/21a771a673ea27987f4969b43e0501fee314d251.

p.s. @JoGetBlock note this still does not build because you will have to commit your project image file ./builder-tools/getblock.png to this branch.

Added the image, thank you

Also created a pull request to add the get started page https://github.com/cardano-foundation/developer-portal/pull/1056, not sure that this is how it's supposed to be done, but forgive me, I'm not from the development team.
Please, feel free to suggest any corrections

Also created a pull request to add the get started page https://github.com/cardano-foundation/developer-portal/pull/1056, not sure that this is how it's supposed to be done, but forgive me, I'm not from the development team.
Please, feel free to suggest any corrections

Also created a pull request to add the get started page https://github.com/cardano-foundation/developer-portal/pull/1056, not sure that this is how it's supposed to be done, but forgive me, I'm not from the development team.
Please, feel free to suggest any corrections

@rphair created a new get-started page  #1079

As per https://github.com/cardano-foundation/developer-portal/pull/1079#issuecomment-1580817383 I have closed the newer pull request because the new getstarted page as well as its missing update to the sidebars.js menu should be included here instead.
But first as we insisted in https://github.com/cardano-foundation/developer-portal/pull/1023#pullrequestreview-1425544149 you have to fix the merge conflict.  GitHub itself can give you suggestions about how to do this if you hit the Resolve conflicts button below.
My guess is that you are not doing a local build of the Developer Portal, because otherwise your new code would be more easily included & merged with what's here already.  Can you please get someone with developer skills on your team to help you begin with these instructions:

https://developers.cardano.org/docs/portal-contribute#installation

... referring them first to what I've just posted?  Once you get a working local build & commit your new code (builder tools addition + new getstarted page + sidebar entry) we can consider this submission based on its own merit.

@JoGetBlock the portal builds correctly now but:

the added get-started.md page is not included in the navigational structure (see top level file sidebars.js)
it begins with a table rather than the standard Docusaurus header (see how other *.md files begin for the correct syntax)
it's in a subdirectory getblock which is inappropriate because there's only one file (it should be called getblock.md like all the other one-page contributions).

Given the repeated problems coming from inattention to the guidelines & consistency with other contributed material, I would be OK with closing this submission but I'll leave this to other reviewers.

Closing this but please if you want to fix the PR let me know and we can open it again.


CRM457-2203: XML import

Description of change
Add a new form to upload an XML file and that, if the file contains disbursements and work items in the expected format, will create a new claim and import details from the file.
Link to relevant ticket

Pending a review of the visual side of things, LGTM!


Netlify badge for mobile site might be incorrect

Link leads to netlify deployments of main site

Thanks, have added new badge

Thanks, have added new badge


TechDocs URL Reader method won't work with Azure DevOps Server 2020

Expected Behavior
TechDocs should still generate using the URL Reader method with Azure DevOps Server 2020
Current Behavior
When opening a Docs site that is configured to use the URL Reader format using Azure DevOps Server 2020 you get a 404 error page suggesting that perhaps you are missing an index.md but if you look at the browser console there is a 404 error loading an index.html from an API route. Opening that route gets you to this error:
NotFoundError: Failed to read tree from https://ados-servername/organization/project/_git/repository, 404 Not Found
at AzureUrlReader.readTree (webpack-internal:///../backend-common/src/reading/AzureUrlReader.ts:106:15)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async UrlReaderPredicateMux.readTree (webpack-internal:///../backend-common/src/reading/UrlReaderPredicateMux.ts:59:16)
at async getDocFilesFromRepository (webpack-internal:///../techdocs-common/src/helpers.ts:243:20)
at async DocsBuilder.build (webpack-internal:///../../plugins/techdocs-backend/src/DocsBuilder/builder.ts:81:25)
at async eval (webpack-internal:///../../plugins/techdocs-backend/src/service/router.ts:151:13)
Possible Solution
From walking through the code what we've found is that the URL is not being parsed correctly for Azure DevOps Server. This URL comes from the getAzureDownloadUrl function here:
https://github.com/backstage/backstage/blob/d941f6187b6490878cfea67a46ce573130659765/packages/integration/src/azure/core.ts#L108
What we are seeing is that both the organization and project variables contain the same values like this: organization/project/_git. You could potentially fix it with something simple like this:
if (url.includes('dev.azure.com'))
{
   return `${protocol}://${resource}/${organization}/${project}/_apis/git/repositories/${repoName}/items?recursionLevel=full&download=true&api-version=6.0${scopePath}`;
}

return `${protocol}://${resource}/${organization.replace('/_git','')}/_apis/git/repositories/${repoName}/items?recursionLevel=full&download=true&api-version=6.0${scopePath}`;

Steps to Reproduce
These steps assume that you are using Azure DevOps Server 2020

Create a valid catalog-info.yaml file and add it to your repo
In your catalog-info file add a backstage.io/techdocs-ref annotation using the URL Reader format for it's value: url:https://ados-servername/organization/project/_git/repository
Make sure you have a \docs folder with at least an index.md
Add a mkdocs.yml file in the root of you repo with this as the body of the file:

site_name: 'example-docs'
nav:
  - Home: index.md
plugins:
  - techdocs-core

Start up Backstage
Register your catalog-info
Navigate to the Docs area
Then click on the Read Docs button for the repo you setup in the previous steps

Notice that you get a 404 error page suggesting that perhaps you are missing an index.md but if you look at the browser console there is a 404 error loading an index.html from an API route. Opening that route gets you to this error:
NotFoundError: Failed to read tree from https://ados-servername/organization/project/_git/repository, 404 Not Found
at AzureUrlReader.readTree (webpack-internal:///../backend-common/src/reading/AzureUrlReader.ts:106:15)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async UrlReaderPredicateMux.readTree (webpack-internal:///../backend-common/src/reading/UrlReaderPredicateMux.ts:59:16)
at async getDocFilesFromRepository (webpack-internal:///../techdocs-common/src/helpers.ts:243:20)
at async DocsBuilder.build (webpack-internal:///../../plugins/techdocs-backend/src/DocsBuilder/builder.ts:81:25)
at async eval (webpack-internal:///../../plugins/techdocs-backend/src/service/router.ts:151:13)
Context
We are currently running Backstage using a fork, we'd really like to move away from that as it is a large amount of overhead to manage the merges. Getting this working would get us to that point.
Your Environment
The key element to this is using Azure DevOps Server 2020

@OrkoHunter here is the first issue for the problems we ran into yesterday getting the URL Reader working with Azure DevOps Server 2020. I'm going to log a sperate issue around the how the archive.zip is extracted.

Hey thanks for the detailed issue @awanlin ! Happy to review any PR which solves this for you.

hey @awanlin any chance you can create a PR from the changes in your fork that you mentioned is working for you?

@nadworny I would love to but my work is going through the process of developing a policy for contributing to open source project like this so I need to wait for that to be in place first. I've tried my best to be very detailed here with the exact code changes needed and listed the lines and methods to be changed

Just wanted to mention that this is also an issue when using Software Templates with Azure DevOps Server 2020

@OrkoHunter I've been given the green light to contribute a few fixes this will be the first one as it's pretty straightforward and should have a low impact on other things. Can you assign this to me please?
Also, I could use some help. I've create a fork, got it cloned to my local. From there I created a topic branch and have my change ready to commit. Is this the right track?
Thanks in advance!

Good to hear - assigned! I see you made the PR successfully.


Ignore StatusReasonForbidden-type errors when polling a ClusterClaim

Summary of Changes
This PR resolves #72 by notifying the user of StatusReasonForbidden -type errors but ignoring the error and continuing to poll, skipping claim status checks.

/lgtm


Apollo kotlin spawns non-deamon background threads by default

Summary
Run this code on Kotlin/JVM:
fun main() {
     ApolloClient.Builder().serverUrl("https://example.com").build()
}

Expected
The JVM terminates immediately when running main.
Actual
JVM just runs forever and doesn't terminate.
Version
apollo-kotlin 3.3.0, JVM
Description
By default, ApolloClient creates a background dispatcher:
https://github.com/apollographql/apollo-kotlin/blob/a5e7a68d862a0f592cb1237b7380a58137152042/apollo-runtime/src/jvmMain/kotlin/com/apollographql/apollo3/internal/dispatchers.kt#L14
Which is used here:
https://github.com/apollographql/apollo-kotlin/blob/a5e7a68d862a0f592cb1237b7380a58137152042/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/ws/WebSocketNetworkTransport.kt#L81
This creates a non-daemon background thread that keep the JVM running.
This code DOES terminate immediately on JVM (because it avoids WebSocketNetworkTransport) :
fun main() {
        ApolloClient.Builder().serverUrl("https://example.com")
            .subscriptionNetworkTransport(HttpNetworkTransport.Builder().serverUrl("https://example.com").build())
            .build()
}

Possible Solution
You can do something like this, which uses daemon threads:
val threadCount = AtomicLong(0)
...
Executors.newSingleThreadScheduledExecutor { Thread(it, "background-dispatcher-${threadCount.getAndIncrement()}").also { it.isDaemon = true } }

Hi 👋 . The general expectation is to call apolloClient.dispose() when done with the ApolloClient to properly join the threads. Daemons threads are an interesting idea but I'm concerned it would just hide them so someone creating a lot of client without disposing them would end up with a lot of zombie threads.

ah, I see. 🤔
the dispose method has no kdoc, so it is unclear that it is supposed to cancel background threads.
https://apollographql.github.io/apollo-kotlin/kdoc/apollo-runtime/com.apollographql.apollo3/-apollo-client/index.html
Maybe make ApolloClient Closable, so we can .use { ... } and ensure it gets closed?

Yep, all good points 👍 . We also have Closeable in other places like JsonReader so I think it makes a lot of sense. Do you want to make a PR?

Looks like apollo uses okio.Closeable which is multiplatform, and then is employs okio.use
We could add a Disposable interface and then add it to any existing type (e.g. ApolloStore, ApolloClient, NetworkTransport, HttpEngine, etc)  that has a dispose function?
in the apollo-api module, in package com.apollographql.apollo3.api ?
interface Disposable : okio.Closeable {
  /**
   * Disposes/cancels/closes any resources (connections, i/o, Threads, [CoroutineScope]s, etc) that are held by this object.
   * Do not use this object after it has been disposed, as behavior is undefined.
   */
  fun dispose()

  /**
   * Calls [dispose]
   */
  override fun close() {
    dispose()
  }
}

Thoughts?

Sounds good: https://github.com/apollographql/apollo-kotlin/pull/4142
There are lots of dispose() functions that could probably use a similar treatment.

Closing this, but opened this to do a similar refactoring across other types:
https://github.com/apollographql/apollo-kotlin/issues/4150


Spike: Evaluate how to split validating data from validating signatures

Objective

[ ] Support the goal of breaking up the image promoter monolith by closely examining the code and describing how we could pursue a more modular design

Steps

[ ] Present a 1-2 page proposal describing the necessary implementation steps and listing pros/cons/tradeoffs. Shouldn't be technical.
- [ ] Core Problem to be Solved: What should an image have for it to be a candidate for a promotion?
- [ ] Build provenance attached (signed or unsigned TBD)
- [ ] Images will have to go through a CVE scanner and certain classes are unacceptable for promotions (examining what "certain classes might be" -- will require SIG Security's involvement)
- [ ] SBOMs: Do we recommend an SBOM during the promotion process, or not?
[ ] Define the requirement using collected input from SIG Testing, K8s-Infra, Security would be very valuable
[ ] Seek input from SIG members and achieve buy-in so the group can reach consensus and move forward

Context and things to think about while working on this task

Work is partly dependent upon other research and decisions (see project board)

/remove-lifecycle stale

/remove-lifecycle stale

I'm not working on this at the moment.
/unassign


Bypass switches not showing up

          Thank you for your efforts...

Running v06.6
Dsc panel- I believe it's evl-3
I'm seeing the status of all of my 15 zones.
Integration is creating 17 entities
I'm not seeing the option under Advanced Config to create the Bypass switches nor am I seeing in devices/entities.

I had created a lot scripts that need to be modified to mimic the control panel using the Envisalink integration. Once I can sort the Bypass issue, which is my primary requirement, then I will update the automation/scripts/etc....
Device info
Envisalink 4: DSC
by eyezon
Firmware: 01.04.188
Hardware: 4
Originally posted by @najikarim in https://github.com/ufodone/envisalink_new/issues/1#issuecomment-1566249031

@najikarim I assume that Device Info you provided is directly from the UI's device page?
Did you create your setup strict from the HA UI or do you have an envisalink_new section in your configuration.yaml?  If the latter, could you post that configuration here (minus any password/code you have have in there).
If possible, it would also be helpful to see the config entry for the device.  That will be in the HA config/ directory in a file called .storage/core.config_entries and the entry would look something like:
      {
        "entry_id": "5642069b18e3c6e6f4459de93905322d",
        "version": 1,
        "domain": "envisalink_new",
        "title": "Alarm",
        "data": {
          "host": "<IP_ADDRESS>",
          "user_name": "user",
          "password": "***",
          "partition_set": "1",
          "zone_set": "1-8",
          "code": "***",
          "port": 4025,
          "discovery_port": 80,
          "evl_version": 4,
          "panel_type": "DSC"
        },
        "options": {},
        "pref_disable_new_entities": false,
        "pref_disable_polling": false,
        "source": "user",
        "unique_id": "01:02:03:04:05:06",
        "disabled_by": null
      }

Again, make sure to remove any password/code that may be present.

I assume that Device Info you provided is directly from the UI's device page?
Yes, that came from the UI.

Did you create your setup strict from the HA UI or do you have an envisalink_new section in your configuration.yaml?
I started with configuration.yaml. Since that did not work (no bypass switches), I commented all the entries in the configuration.yaml relating to the Envisalink.

I then used the Envisalink_new UI to configure all the parameters. I then rebooted the system (Homeassistant is running on a Pi 4).
I erased UserName, Password, Alarm Code from the attached..

If possible, it would also be helpful to see the config entry for the device. That will be in the HA config/ directory in a file called .storage/core.config_entries

I do not have such a file in my config directory, may be that is the problem:

I do not have such a file in my config directory, may be that is the problem:

It looks like the .storage directory is filtered out by default but you can go into the File Editor add-on's configuration and remove it from the Ignore Pattern setting.

I started with configuration.yaml. Since that did not work (no bypass switches)

There isn't currently an option to enable the bypass switches in the configuration.yaml but you can still turn it on via the UI's advanced configuration for the integration even with the core settings in configuration.yaml.
However, I suspect config state got messed up as part of the procedure you followed and I'd like to track down what happened.  I haven't been able to reproduce this myself so if you still have the configuration.yaml settings that you used, could you attach them and also that config entry from core.config_entries file?  Also check to see if there are multiple envisalink_new entries in that file.
Thanks!

As I mentioned all entries have been commented and there are no other Envisalink entries in the configuration.yaml
I had added the the create_bypass_switches after the first attempt but then commented it out…
#envisalink:
#envisalink_new:
host:  xx.xx.xx.xx
panel_type: DSC
user_name: xxxx
password: xxxx
create_bypass_switches: true
code: "xxxx"
port: 4025
evl_version: 4
keepalive_interval: 60
zonedump_interval: 10
timeout: 10
panic_type: Police
zones:
1:
Here is the core.config_entries and that is the only entry that contains envisalink:
{
"entry_id": "7e61e55df5bdaf195807f469e54d450b",
"version": 1,
"domain": "envisalink_new",
"title": "Alarm",
"data": {
"host": "xx.xx.xx.xx",
"user_name": "xxxxxx",
"password": "xxxxxx",
"partition_set": "1",
"zone_set": "1-15",
"port": 4025,
"discovery_port": 80,
"evl_version": 4,
"panel_type": null,
"code": "xxxx"
},
"options": {
"panic_type": "Police",
"keepalive_interval": 60,
"timeout": 30
},
"pref_disable_new_entities": false,
"pref_disable_polling": false,
"source": "user",
"unique_id": "xx:xx:xx:xx:xx:xx",
"disabled_by": null
}
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows
From: @.>
Sent: Monday, May 29, 2023 9:17 PM
To: @.>
Cc: @.>; @.>
Subject: Re: [ufodone/envisalink_new] Bypass switches not showing up (Issue #35)
I do not have such a file in my config directory, may be that is the problem:
It looks like the .storage directory is filtered out by default but you can go into the File Editor add-on's configuration and remove it from the Ignore Pattern setting.
I started with configuration.yaml. Since that did not work (no bypass switches)
There isn't currently an option to enable the bypass switches in the configuration.yaml but you can still turn it on via the UI's advanced configuration for the integration even with the core settings in configuration.yaml.
However, I suspect config state got messed up as part of the procedure you followed and I'd like to track down what happened. I haven't been able to reproduce this myself so if you still have the configuration.yaml settings that you used, could you attach them and also that config entry from core.config_entries file? Also check to see if there are multiple envisalink_new entries in that file.
Thanks!
—
Reply to this email directly, view it on GitHubhttps://github.com/ufodone/envisalink_new/issues/35#issuecomment-1567734141, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AM2OTPXI3QI4CMHHWO6FCLLXIVYEPANCNFSM6AAAAAAYTI54VA.
You are receiving this because you were mentioned.Message ID: @.***>

This line is the problem:
"panel_type": null,

Unfortunately I've been unable to reproduce this issue though.
Have you tried deleting the device from the UI and then re-adding it?  I'm curious if it ends up in the same state?  If it does, can you enable debug logging for the integration when going through the delete / re-add steps?
To enable debug logging, you'll need to add something like this to configuration.yaml:
logger:
  default: info
  logs:
    custom_components.envisalink_new: debug

Well, good news finally...
Un-installing the integration and re-installing it back fixed the problem. The new integration created 32 entities, boolean sensors and bypass switches.
Thank you for your patience and advise.
Sent from my T-Mobile 5G Device
Get Outlook for Androidhttps://aka.ms/AAb9ysg

From: ufodone @.>
Sent: Tuesday, May 30, 2023 8:48:18 PM
To: ufodone/envisalink_new @.>
Cc: najikarim @.>; Mention @.>
Subject: Re: [ufodone/envisalink_new] Bypass switches not showing up (Issue #35)
This line is the problem:
"panel_type": null,
Unfortunately I've been unable to reproduce this issue though.
Have you tried deleting the device from the UI and then re-adding it? I'm curious if it ends up in the same state? If it does, can you enable debug logging for the integration when going through the delete / re-add steps?
To enable debug logging, you'll need to add something like this to configuration.yaml:
logger:
default: info
logs:
custom_components.envisalink_new: debug
—
Reply to this email directly, view it on GitHubhttps://github.com/ufodone/envisalink_new/issues/35#issuecomment-1569452921, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AM2OTPTUMFQTK2FCEW35JOLXI25QFANCNFSM6AAAAAAYTI54VA.
You are receiving this because you were mentioned.Message ID: @.***>

Mine works on two different systems...
Device info
Envisalink 3: DSC
by eyezon
Firmware: 01.12.205
Hardware: 3
(this one is an old one but works fine)
Device info
Envisalink 4: DSC
by eyezon
Firmware: 01.04.176
Hardware: 4

Mine works on two different systems...
Device info Envisalink 3: DSC by eyezon Firmware: 01.12.205 Hardware: 3 (this one is an old one but works fine)
Device info Envisalink 4: DSC by eyezon Firmware: 01.04.176 Hardware: 4
Dashboard I made... using Mushroom Template card... icons change depending on state and can press to toggle bypass on/off.

Mind sharing your lovelace for the Zone status?

For that I used mushroom template card... I create everything in a vertical stack to keep organized, then add individual stacks.. that one is a grid of 3 wide (making it a grid I can easily change if want)... then I use mushroom templates... here is example and you should be able to make work with your entities...

For the Icon:
{% if is_state('binary_sensor.home_alarm_zone_5_front_door','off') %}
{% set icon = "mdi:door-closed" %}
{% elif is_state('binary_sensor.home_alarm_zone_5_front_door','on') %}
{% set icon = "mdi:door-open" %}
{% endif %}
{{icon}}
For color:
{% if is_state('binary_sensor.home_alarm_zone_3_hallway_motion','off') %}
{% set color = "green" %}
{% elif is_state('binary_sensor.home_alarm_zone_3_hallway_motion','on') %}
{% set color = "red" %}
{% endif %}
{% if is_state('switch.home_alarm_zone_3_hallway_motion_bypass','on') %}
{% set color = "orange" %}
{% endif %}
{{color}}
Note: that the color gets overridden by the bypass state set to orange regardless if off or on.
I put the "Hallway" in Secondary information,  (not shown in screen grab) and default Tap Action is Toggle.


[FEATURE REQUEST] Detect Scene Grid Scale for Token Height

Description
Currently, Terrain Height Tools assumes a grid scale of 1 when calculating line of sight for tokens. This leads to a token height mismatch on grids with scales with values other than 1.
The case where I encountered this is when I set a scene's grid scale to 0.5, and doubled all my tokens' widths and heights to match. For a Size 1 token, instead of being treated as "Size 1", my tokens were treated as "Size 2" (or H2) when calculating line of sight. Ideally, it would be great if the token's "height" was calculated with grid scale in mind to save some mental math effort of "halving" all the displayed height values for a particular scene.

Thanks for the report, this should now be implemented from v0.3.6.


input of a sentence

hi @bowbowbow, I am doing the end-of-the-year check up.
it processes the preprocessed data, but some people may utilize it for a sentence
that they want to process.
is it possible to input a sentence and check the output events within the input sentence?
if so, please add the description for it in README
thanks, yours sincerely, Yang

Internal communication.


Use activeConfiguration.projectDir where appropriate

This PR reverts some of the refactoring done in the nested project work and utilizes activeConfiguration.projectDir directly rather than using only activeContentRecord.projectDir since all of these operations rely on the configuration. This makes it a bit easier to understand what some of those functions are relying on, and a bit simpler.
This also makes the activeConfigChanged listener function use optionality again rather than terminating early to avoid errors caused by the active content record becoming undefined but the file watchers were still firing.
Intent
Part of #1984
Type of Change

[x] Bug Fix

[ ] New Feature

[ ] Breaking Change

[ ] Documentation

[ ] Refactor

[ ] Tooling

I'm going to approve this because I understand what you are doing with the changes, but it would be helpful if you could outline the sequence in which my earlier logic fails? Granted my logic reached back into the selected contentRecord, but I am thought that had an advantage of making sure we're not acting on a change to a config file which is not active.
I'm sure you can explain it pretty quickly. :-)

This is in two parts. I attempted to explain with my comments above, but I can try to reword a bit.
A handful of methods here relied on getActiveContentRecord to fetch the projectDir and configurationName to make API calls. Instead we should be using the getActiveConfig result to avoid making API calls that we know are going to fail. This can occur if the Content Record is referencing a configurationName that doesn't exist for example. Which would make refreshing the files lists, and refreshing R/Python packages fail.
This could be seen if you delete a Configuration used in the selected Content Record. That error is screenshotted in the issue this links to.
Some of the methods make sure that configuration exists, but that makes the getActiveContentRecord calling and attribute referencing redundant so it is removed here.
The next part is the activeConfigChanged listener. It checks if there is an active content record and returns early if there isn't one. Logically this makes sense since we don't set a configuration without a deployment, but in the code it doesn't dispose of the previous configWatchers which could lead to a situation where the previous watchers are still setup and firing.
To solve that I made the entire listener handle the undefined case without failing early. It is a chunk of logic but thanks to ? optional chaining on the individual config watchers, and the refresh methods handling an undefined config as well all of the code gets skipped without missing a dispose.
The dispose() could have been moved up to always occur, and still had the earlier failure, but the watchers already need to be optionally chained since we cannot guarantee a root for setting up file watching, and each of the refresh methods already need to handle undefined configurations since getActiveConfig() can return undefined.

I think the zoomed-out explanation is rather than bouncing out early at high level function, we can instead have low level functions handle undefined themselves which prevents us from needing to:

re-arrange logic (like dispose()) before those checks
forgetting where those checks happen to prevent issues like sendRefreshedFilesLists having a potentially undefined config

The change to bail out of activeConfigChanged could have worked if dispose() was moved up, and we checked if the configuration existed rather than using activeDeployment.configurationName. But the philosophy shift is relying on those low level functions to handle the state themselves.


feat: generate a random lightning address for new alby accounts

Describe the changes you have made in this PR
Generate a random lightning address for new Alby accounts, so the user sees it before their account is created. If nothing is entered, it will use the placeholder value.
Type of change
(Remove other not matching type)

feat: New feature (non-breaking change which adds functionality)

Screenshots of the changes [optional]

Add screenshots to make your changes easier to understand. You can also add a video here.
How has this been tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist

[ ] My code follows the style guidelines of this project and performed a self-review of my own code
[ ] New and existing tests pass locally with my changes
[ ] I checked if I need to make corresponding changes to the documentation (and made those changes if needed)

@rolznz Since we are moving away from signups in the extension it probably doesn't make sense to still merge this. I'll convert it to a draft PR.

OAuth connector will be used instead


API to retrieve plan output

Feature description 💡
When running plans on Terrakube remote executors, we can't save the plan on local files, as it shows the error below:
Error: Saving a generated plan is currently not supported
Terraform Cloud does not support saving the generated execution plan locally
at this time.

There are issues opened on Terraform and Opentofu to have this working on the client side, though Terraform Cloud has an API that allows us to retrieve the JSON plan just like terraform show -json planfile.
Is there any API call on Terrakube to do the same? Or is there another way to get the plan body? I could get the command output, though when it has errors it can be messy.
Anything else?
No response

Hello @igorbrites
You could see where the binary terraform plan is saved in the backend storage using:
https://terrakube-api.minikube.net/api/v1/organization/{{ORG_ID}}/job/{{JOB_ID}}
{
    "data": {
        "type": "job",
        "id": "65",
        "attributes": {
            ...
            "terraformPlan": "http://terrakube-minio:9000/terrakube/tfstate/d9b58bd3-f3fc-4056-a026-1163297e80a8/3a1cfa51-7e41-4999-9409-fbf3235b1906/65/9f27fd65-450c-43d3-ab03-9bfa9c8b6cd9/terraformLibrary.tfPlan",
           ....
        },
        "relationships": {
            "organization": {
                "data": {
                    "type": "organization",
                    "id": "d9b58bd3-f3fc-4056-a026-1163297e80a8"
                }
            },
            "step": {
                "data": [
                    {
                        "type": "step",
                        "id": "477db67d-ebf1-42f1-83a4-590cb0c93bd6"
                    },
                    {
                        "type": "step",
                        "id": "6253e0be-15f2-4744-b1ef-a6a0b746826e"
                    },
                    {
                        "type": "step",
                        "id": "9f27fd65-450c-43d3-ab03-9bfa9c8b6cd9"
                    }
                ]
            },
            "workspace": {
                "data": {
                    "type": "workspace",
                    "id": "3a1cfa51-7e41-4999-9409-fbf3235b1906"
                }
            }
        }
    }
}

Write some script to download the file locally and just run:
terraform show -json terraformLibrary.tfPlan

Maybe this can help you

I guess in the future we could add some endpoint similar to this to download the json terraform plan result
https://developer.hashicorp.com/terraform/cloud-docs/api-docs/plans#retrieve-the-json-execution-plan

Other option could be to use this request:
https://terrakube-api.minikube.net/api/v1/organization/{{ORG_ID}}/job/{{JOB_ID}}/step?filter[step]=stepNumber==100
{
    "data": [
        {
            "type": "step",
            "id": "9f27fd65-450c-43d3-ab03-9bfa9c8b6cd9",
            "attributes": {
                "name": "Terraform Plan from Terraform CLI",
                "output": "https://terrakube-api.minikube.net/tfoutput/v1/organization/d9b58bd3-f3fc-4056-a026-1163297e80a8/job/65/step/9f27fd65-450c-43d3-ab03-9bfa9c8b6cd9",
                "status": "completed",
                "stepNumber": 100
            },
            "relationships": {
                "job": {
                    "data": {
                        "type": "job",
                        "id": "65"
                    }
                }
            }
        }
    ]
}

Once you get the property "output" you could download it using

Using curl will print something like this:
user@pop-os:~/git/simple-terraform$ curl --location 'https://terrakube-api.minikube.net/tfoutput/v1/organization/d9b58bd3-f3fc-4056-a026-1163297e80a8/job/65/step/9f27fd65-450c-43d3-ab03-9bfa9c8b6cd9' \
--header 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXX'
***************************************
Running Terraform PLAN
***************************************

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # null_resource.next will be created
  + resource "null_resource" "next" {
      + id = (known after apply)
    }

  # null_resource.next2 will be created
  + resource "null_resource" "next2" {
      + id = (known after apply)
    }

  # null_resource.next3 will be created
  + resource "null_resource" "next3" {
      + id = (known after apply)
    }

  # null_resource.next4 will be created
  + resource "null_resource" "next4" {
      + id = (known after apply)
    }

  # null_resource.previous will be created
  + resource "null_resource" "previous" {
      + id = (known after apply)
    }

  # time_sleep.wait_30_seconds will be created
  + resource "time_sleep" "wait_30_seconds" {
      + destroy_duration = "45s"
      + id               = (known after apply)
    }

  # module.time_module.random_integer.time will be created
  + resource "random_integer" "time" {
      + id     = (known after apply)
      + max    = 5
      + min    = 1
      + result = (known after apply)
    }

Plan: 7 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + fake_data     = {
      + data     = "Hello World"
      + resource = {
          + resource1 = "fake"
        }
    }

Awesome! I'll give it a shot, thanks!

I guess in the future we could add some endpoint similar to this to download the JSON terraform plan result
https://developer.hashicorp.com/terraform/cloud-docs/api-docs/plans#retrieve-the-json-execution-plan

IMHO we could have one to get the JSON and another to get the actual plan file. In my case, I use the plan file to create a comment on GitHub PRs, so I'm going to use the first option you provided.


Refactor integration tests to remove random collection sampling

Resolves #215
cc @betolink just getting started on this. I have some sample code that can generate a list of 100 most popular collections, in order, given a provider.
Before I continue, I would like input!
Next steps may be:

Refactor things to be less quick-and-dirty. First consideration for me is the mismatch between "DAACs" in the tests and "providers" in the script that generates the popular lists.
Modify the tests to read the new source instead of randomly selecting. Can use first N rows from the file, depending on the test; currently not every test uses the same number of collections. Can create a fixture for providing the data in these files as a mapping of DAACs -> list of collections.
A "blocklist" of known-bad collections
?

Worked on this with @itcarroll during hack day. Notes: https://github.com/nsidc/earthaccess/discussions/755

We considered the usefulness of random sampling tests. We don't think we should be doing this for integration tests, especially when they execute on every PR. We could, for example, run them on a cron job and create reports, but that seems like overkill when we have a community to help us identify datasets and connect with the right support channel if there's an issue with the provider.
We may still consider a cron job for, for examle, recalculating the most popular datasets on a monthly basis.

We decided we can hardcode a small number and expand the list as we go. Other things like random tests on a cron or updating the list of popular datasets on a cron can be addressed separately.

We will update the .txt files to .csv files and add boolean field for "does the collection have a EULA?" and then we'll use that field to mark those tests as xfail.

Two major milestones:

@danielfromearth updated the script which generates the top collection lists to use all providers supported by earthaccess :tada: Still TODO: Make them CSVs with a boolean representing whether the collection has a EULA
I just got the test_onprem_download.py module working without randomization! :tada: Still TODO: Refactor the other 3 integration test modules to share this behavior. Let's try and remove duplicate code while we're at it!

Also still TODO: Run generate.py in GHA on a monthly/quarterly cron and auto-open a PR with the changes to top collections?

If we want to determine whether a collection has a EULA, this example was provided:
curl -i -XGET "https://cmr.earthdata.nasa.gov/search/collections.json?concept_id=C1808440897-ASF&pretty=true"

The metadata "eula_identifiers" : [ "1b454cfb-c298-4072-ae3c-3c133ce810c8" ] is present in the response. We're not 100% sure whether this can be used authoritatively. Discussion in progress: https://nsidc.slack.com/archives/C2LRKMDEV/p1724179804149239

Looks like part of this issue may be related to work on EULAs in this issue.

For some reason, running
nox -s integration-tests -- --cov=earthaccess --cov-report=term-missing --capture=no --tb=native --log-cli-level=INFO

is failing, when
nox -s integration-tests

is passing.

Looks like this was a coincidence with intermittent uptime on an external dependency.

Wow, this is a big one! I can start today but I'm not sure if I can finish today! great work @mfisher87 !!

Thanks for taking a look, @betolink ! There are some opportunities for refactoring, but I really tried to keep the scope narrow in this PR to avoid growing even bigger :)


ImportError: DLL load failed while importing hwm14: The specified module could not be found.

Hi, I'm having some trouble getting the module working. I've tried both the pip install and install from source code methods in python 3.10 and python 3.8. Every time the install process runs fine, but when I try the test it gives the following error.
======================================================================
ERROR: test (unittest.loader._FailedTest)
ImportError: Failed to import test module: test
Traceback (most recent call last):
File "C:\Users\mouse\anaconda3\envs\test\lib\unittest\loader.py", line 436, in _find_test_path
module = self._get_module_from_name(name)
File "C:\Users\mouse\anaconda3\envs\test\lib\unittest\loader.py", line 377, in get_module_from_name
import(name)
File "C:\Users\mouse\pyHWM14\tests\test.py", line 2, in
from pyhwm2014 import HWM14
File "C:\Users\mouse\pyHWM14\pyhwm2014_init.py", line 7, in
from . import hwm14
ImportError: DLL load failed while importing hwm14: The specified module could not be found.
In the folder "C:\Users\mouse\pyHWM14\pyhwm2014" there is a file called "hwm14.cp38-win_amd64.pyd" (and a corresponding cp310 file from the python 3.10 install). I think this is the file it should be looking for at this point? But I'm not sure why it's having this issue.

It's because the wrapper code has not been compiled in Windows. Any contribution in compiling the wrapper in Windows and submission of related solution via pull request is more than welcome.


Circular dependency problem with webpack

warning message from my project:
WARNING in [entry] [initial]
Circular dependency between chunks with runtime (main, src_Runtime_Optimized_wasm_index_js-src_Runtime_Optimized_wasm_snippets_wasm-bindgen-rayon-3e-460835)
This prevents using hashes of each other and should be avoided.

webpack 5.89.0 compiled with 1 warning in 824 ms

Looking at the bundled code, it seems that the Circular dependency is formed in the order of
pkg.js -> workerHelpers.js -> workerHelpers.worker.js -> pkg.js
This article looks like the same case:
https://stackoverflow.com/questions/73157442/webpack-warning-using-webworker-circular-dependency-between-chunks-with-runtime
I also tried running the webpack tests inside the test directory of this repository and saw the same warnings:
WARNING in [entry]
Circular dependency between chunks with runtime (219, index)
This prevents using hashes of each other and should be avoided.

webpack 5.89.0 compiled with 1 warning in 209 ms

Is it safe to ignore this warning?

Is it safe to ignore this warning?

Yes. For Wasm threads this sort of circular dependency between a Worker and the main JS is essential. It's a shame bundlers don't handle it better, but it's an old and well-known issue and for now can be only ignored.


i hava a error

i use the sample like the wiki .i write this code - (void)loadArticles
{
RKObjectMapping* articleMapping = [RKObjectMapping mappingForClass:[Article class]];
[articleMapping addAttributeMappingsFromDictionary:@{
                                                     @"title": @"title",
                                                     @"body": @"body",
                                                     @"author": @"author",
                                                     @"publication_date": @"publicationDate"
                                                     }];

RKResponseDescriptor *responseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:articleMapping method:RKRequestMethodAny pathPattern:nil keyPath:@"articles" statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful)];

NSURL *URL = [NSURL URLWithString:@"http://www.uxiyi.com/a.json"];
NSURLRequest *request = [NSURLRequest requestWithURL:URL];
RKObjectRequestOperation *objectRequestOperation = [[RKObjectRequestOperation alloc] initWithRequest:request responseDescriptors:@[ responseDescriptor ]];
[objectRequestOperation setCompletionBlockWithSuccess:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) {
    RKLogInfo(@"Load collection of Articles: %@", mappingResult.array);
} failure:^(RKObjectRequestOperation *operation, NSError *error) {
    RKLogError(@"Operation failed with error: %@", error);
}];

[objectRequestOperation start];

}
the url result is
{ "articles": [
{ "title": "RestKit Object Mapping Intro",
"body": "This article details how to use RestKit object mapping...",
"author": "Blake Watters",
"publication_date": "7/4/2011"
},
{ "title": "RestKit 1.0 Released",
"body": "RestKit 1.0 has been released to much fanfare across the galaxy...",
"author": "Blake Watters",
"publication_date": "9/4/2011"
}]
}
the Article.h is
#import <RestKit/RestKit.h>
#import <RestKit/CoreData.h>
@interface Article : NSManagedObject
@property (nonatomic, copy) NSString* title;
@property (nonatomic, copy) NSString* body;
@property (nonatomic, copy) NSString* author;
@property (nonatomic) NSDate*   publicationDate;
@end
but the error appear like this
2015-02-18 19:51:26.624 huifeidm[1366:19452] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Article 0x7aa31b30> valueForUndefinedKey:]: the entity (null) is not key value coding-compliant for the key "title".'
*** First throw call stack:
(
0   CoreFoundation                      0x01679946 __exceptionPreprocess + 182
1   libobjc.A.dylib                     0x01302a97 objc_exception_throw + 44
2   CoreFoundation                      0x01679561 -[NSException raise] + 17

You need to use RKEntityMapping. Take a look at https://github.com/RestKit/RestKit#managed-object-request

GitHub Issues is for reporting bugs in RestKit and discussing changes to RestKit itself. Please check the documentation, wiki, and existing issues before opening a new issue.
Additionally, please do not post general usage questions to Issues, but instead take them to Stack Overflow.


cloudflare wrangler not working with the analog-app example

Please provide the environment you discovered this bug in.
to reproduce run BUILD_PRESET=cloudflare-pages nx build analog-app && npx wrangler pages dev dist/apps/analog-app/analog/public
Which area/package is the issue in?
Don't know / other
Description
I'm interested in debugging an issue with cloudflare wrangler (Idk if actual deployment works) where a server load function doesn't return JSON, instead it's returning the index/home HTML.
then I went to try some analog example that has a load function to check and noticed that it doesn't even load the page
Please provide the exception or error you saw
500 Request Error
performance is not defined

Other information
No response
I would be willing to submit a PR to fix this issue

[X] Yes
[ ] No

Have you tried this one?
https://developers.cloudflare.com/pages/framework-guides/deploy-an-analog-site/

holy moly, I managed to make my project work. I had messed up with the .env, vite.config and main.server.ts files
thanks @dalenguyen the cloudflare guide shed some light 👍


configure tslint to pick files from src folder

@mgechev How to configure tslint to pick files from src folder.

Hello @vijaygawade18 , please look for lint config here tools/config/seed.tslint.json. And add additional folders that you need.


[feat]: Link previews on hover

Summary
Tasks from #36
This PR will add tooltip previews to internal links (ie. other pages of the site) with an option to disable them in config.
Changes

Create a tooltip component
Add tooltip styles
Add a property called linkPreviews in config/siteConfig.js
Add packages - @floating-ui/react, framer-motion, marked

@khalilcodes it seems you have added some new dependencies by running npm install in packages/template folder instead of running pnpm add <pkg> -F @flowershow/template in the root of the workspace. That's why all the tests are failing with the following error:

@olayway oh right 😅  will update now

@khalilcodes can you fix it, please? 🙏

@olayway can you check e2e failing ?

@khalilcodes

Will close this and resubmit a version once monorepo is done.


Creating Basic Category Page

Description
Creating a Basic Category Page and Handle Category Route to Link CategoryItems.
**Fixes #118 **
Type of change

[ ] This change requires a documentation update
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

[ ] Test

Please also list any relevant details for your test configuration
Test Configuration:

OS:
Browser:
Browser Version:

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes

It's not the final page, I will update it with the Search Box and other things.


fast question

Your project is very good but I have one question: does your project compensate for the time it takes to receive the answer from the time server? I mean, I request the time, the server answers at t = 0, but there is a delay between the time the server answers and the time I receive it. Does your project corrects for that delay? thanks!

yes


A warning  message of classes page

When there are more than one class on classes page, a warning: 'Each child in a list should have a unique "key" prop'  showed.
To Reproduce

Sign in with a Teacher account
Go to the classes page
Add classes if you have less than two classes.
The warning will show at the terminal

Expected behavior
No warning
Screenshots

Hi, I found this warning message while I was doing micro-internship on this app. I am working on this and will open a PR soon. Thanks.


[v0.1] 3D Modeling - Generic Fish

3D model a generic fish for development

[x] Design
[x] Modeling
[ ] QA

Is this Good?

Is this Good?

not yet

asd
1.asd
1.asd

This image style is similar to the game that you told me the super hot. I will make the fish alive by fill the body to cover it bone lol and also I will add it some fins. In this image, it's body looks too short. I will make it longer. Because this is the generic fish, the fish will be full red or orange. Maybe I will make different textures after we make sure the fish is working in the first demo?

This image just a sample. Just show you what I will add and change. The color of the fish may not the same as the image. And also, I will change the style of the body like it's head

Yes yes yes! This style is perfect! Please use less curves and try your best to use only flat surface skin.

Yeah. I will try my best. It seems like I finish the design by now.

Yup, design phase are mark as finished.

I forgot to put this image on here yesterday.
I already start modeling a little bit today.

@Leong15 Need Fixing :

[ ] Fix the port side of the fish (Img1)
[ ] Fix the looping of the fish (Fish should start at moving posture, NOT default posture) (Img2)
[ ] Rework the animation (Find fish reference on YouTube)

I'm sorry about the first problem. I fix it and I'll upload it after I solve other problem that you mentioned.
However, I don't understand the second and fourth problem.
(start at moving posture, NOT default posture) It's that mean the fish's body should not straight line?

I'm sorry about the first problem. I fix it and I'll upload it after I solve other problem that you mentioned.

Well done! Looks good so far!

Tested


Enforce host spread via minDomains

How to categorize this PR?

/area high-availability
/kind enhancement
What this PR does / why we need it:
Earlier host spread was only done on a best effort basis. Now the minDomains configuration can be used for shoots with failure tolerance node, and workload resources with high-availability-config.resources.gardener.cloud/host-spread="true" being set.
Which issue(s) this PR fixes:
Fixes #10340
Special notes for your reviewer:
Release note:

Host spread for shoots with failure tolerance `node` (`.spec.controlPlane.highAvailability.failureTolerance.tye`) is now accomplished via `minDomains`. Earlier, this happened at a best effort basis only. If a seed was having less than 3 nodes at the time the control-plane pods were scheduled, the desired pod distribution was not possible.

/retest-required

/test all


Add expand and collapse all buttons to attribute tree

The attribute tree used in the service inventory and the history page can be nested quite deep. This requires many clicks to open.

It would improve usability if a button to expand the tree is added or something to expand from a specific node?
Do we also need a collapse all?

Hey team! Please add your planning poker estimate with Zenhub @LauraStordeur @matborowczyk


CellMeasurer with multiple flexGrow columns - wrong height

I have a table, where all columns are flexGrow={1}. Some of the columns have wrapping content - so I am using CellMeasurer to set their height. Sometimes the height is wrong.
I have created a "simple" repro here: https://codesandbox.io/s/oow8mxov0y
It generates two rows - one with wrong height, and second one with correct height.
I have simplified my use case... but I am using a custom rowRenderer and cellRenderer. I am also not including react-virtualized/style.css, but instead using my own.
I have noticed, that if I set flexGrow to 0, then it works. Not sure if it is the only reason.

Hey @bbenejc, not sure if this will help you at this point, but I had the same issue and found the solution, and I imagine other people have or will come across it.
How do I fix this?
You have to pass a style object to the node being wrapped in CellMeasurer, with a value for the fixed axis.
i.e. if you have a fixed width for a column, you need to pass something like style={{width: 40}}. If you were using a fixed height, it would be like style={{height: 40}}.
So the cellRenderer code from your repro would look like:
    return (
      <CellMeasurer
        cache={this._cache}
        columnIndex={columnIndex}
        key={`${rowIndex}-${columnIndex}`}
        parent={parent}
        rowIndex={rowIndex}
      >
        <div
           className={css.td}
           style={{width: columnData.width /* or some other way to derive this value */}}
         >{cellData}</div>
      </CellMeasurer>
    );

Why is this fix necessary?
You have to pass this as an inline style, and not through CSS, because the CellMeasurer grabs the value directly off the DOM node. As a point of interest: before I worked this out I was seeing (random?) column widths during the "false" render when the values are calculated that had nothing to do with my CSS or Column width props.
I couldn't find a mention anywhere that inline styling is required for proper measuring, and only one example in the docs explicitly passes a style value like this. @wuweiweiwu or @bvaughn, could someone add this to the CellMeasurer documentation? If you prefer I could send a pull request, but you are probably able to word it better.

@keann's recommendation (https://github.com/bvaughn/react-virtualized/issues/1174) of recalculating the measurement should fix the underlying issue.


Update to 3.0.1

Checklist

[ ] 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)
[ ] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[ ] Ensured the license file is being packaged.

From the OSX py>39 builds:
 error: linking with `x86_64-apple-darwin13.4.0-clang` failed: exit status: 1
    = note: x86_64-apple-darwin13.4: error: unable to execute command: Segmentation fault: 11
            x86_64-apple-darwin13.4: error: linker command failed due to signal (use -v to see invocation)

Seems like another case of https://github.com/conda-forge/polars-feedstock/issues/259

Linux build fail with a different error

@conda-forge-admin, rerender

All platforms except windows passes.
On windows, the issue is with unpacking arrow into a folder that already has a long name and with the arrow repo having files that are long, this results in a file with absolute path having more than 255 characters.
Options:

Unvendor arrow
Skip windows
try to download arrow somewhere else.

On windows, the issue is with unpacking arrow into a folder that already has a long name and with the arrow repo having files that are long, this results in a file with absolute path having more than 255 characters.

Another potential option, we worked around this issue in perspective's CI by placing the build directory at a known short path, D:\psp-rust
https://github.com/finos/perspective/blob/master/.github/workflows/build.yaml#L206
https://github.com/finos/perspective/blob/master/.github/workflows/build.yaml#L218C25-L218C36

This is ready


Git Bash / mintty image previews do not work any more

What system are you running Yazi on?
Windows
What terminal are you running Yazi in?
mintty 3.7.0 (x86_64-pc-msys) (This is the Git Bash terminal installed with Git for Windows)
Did you try the latest code to see if this problem got fixed?
Not tried, and I'll explain why below
yazi --debug output

Yazi
    Version: 0.2.5 (c65a14c 2024-04-23)
    OS: windows-x86_64 (windows)
    Debug: false

Emulator
    Emulator.via_env: ("xterm", "mintty")
    Emulator.via_csi: Ok(Unknown([]))
    Emulator.detect: Mintty

Adaptor
    Adaptor.matches: Iterm2

Desktop
    XDG_SESSION_TYPE: None
    WAYLAND_DISPLAY: None
    DISPLAY: Some("needs-to-be-defined")

SSH
    shared.in_ssh_connection: false

WSL
    /proc/sys/fs/binfmt_misc/WSLInterop: false

Variables
    SHELL: Some("C:\\Users\\KhanH\\scoop\\apps\\git\\2.44.0\\usr\\bin\\bash.exe")
    EDITOR: None
    ZELLIJ_SESSION_NAME: None
    YAZI_FILE_ONE: Some("C:\\Users\\KhanH\\scoop\\apps\\git\\current\\usr\\bin\\file.exe")
    YAZI_CONFIG_HOME: None

file(1)
    Version: Ok(Output { status: ExitStatus(ExitStatus(0)), stdout: "file-5.45\nmagic file from /usr/share/misc/magic\n", stderr: "" })

Text Opener
    default: Some(Opener { run: "code \"%*\"", block: false, orphan: true, desc: "code", for_: None, spread: true })
    block: Some(Opener { run: "code -w \"%*\"", block: true, orphan: false, desc: "code (block)", for_: None, spread: true })

tmux
    TMUX: false

Ueberzug++
    Version: Err(Error { kind: NotFound, message: "program not found" })

--------------------------------------------------
When reporting a bug, please also upload the `yazi.log` log file - only upload the most recent content by time.
You can find it in the "C:\\Users\\KhanH\\AppData\\Roaming\\yazi\\state" directory.

Describe the bug
Image Previews do not seem to work anymore on Git Bash / mintty. I tried yazi on Git Bash a few months ago and it seemed to work.

Expected Behavior
Images should show on Git Bash as it supports iterm and sixels.
To Reproduce
Run yazi on Git Bash.
Configuration
no config
Anything else?
No response

Does the image preview in Yazi v0.2.4 work in Mintty?

I tested 0.1.5 and a few of the 0.2.x versions (include 0.2.4) but they do not work.


Enhancing lint.sh with additional checks for Chart.yaml

This PR is enhancing current CirckeCi initial linter.
It looks like most of the time submitted Chart.yaml (a super common case for new charts) has missing fields. this PR is enabling field validation against yaml-schemas/Chart.yaml schema file with https://github.com/23andMe/Yamale CLI tool.
Also, this change will allow adding schema[s] for values.yaml.
Maintainer GitHub account validation is another new test. List of maintainers got parsed with yq tool and validated via curl against https://github.com/<account_name>
this should make @unguiculus life slightly easy.
Examples of outputs:
Successful validation
circleci@515ce1f45960:/charts$ sudo test/circle/lint.sh stable/kanister-operator/
From https://github.com/kubernetes/charts
 * branch            master     -> FETCH_HEAD
test/circle/lint.sh: line 78: Exit: command not found

Running helm dep build on the chart at stable/kanister-operator
No requirements found in stable/kanister-operator/charts.

Running helm lint on the chart at stable/kanister-operator
==> Linting stable/kanister-operator
Lint OK

1 chart(s) linted, no failures

Linting the Chart.yaml and values.yaml files at stable/kanister-operator
Validating /charts/stable/kanister-operator/Chart.yaml...
Validation success! 👍
Validating maintainers names

Checking the Chart version has increased for the chart at stable/kanister-operator
New higher version 0.2.1 found

Missing field in Chart.yaml
==> Linting stable/weave-cloud
Lint OK

1 chart(s) linted, no failures

Linting the Chart.yaml and values.yaml files at stable/weave-cloud
Validating /charts/stable/weave-cloud/Chart.yaml...

Error!
Schema: test/circle/yaml-schemas/Chart.yaml
Data file: /charts/stable/weave-cloud/Chart.yaml
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/yamale/command_line.py", line 29, in _validate
    yamale.validate(schema, data)
  File "/usr/local/lib/python3.6/site-packages/yamale/yamale.py", line 39, in validate
    schema.validate(d)
  File "/usr/local/lib/python3.6/site-packages/yamale/schema/schema.py", line 56, in validate
    raise ValueError(error_str)
ValueError:
Error validating data /charts/stable/weave-cloud/Chart.yaml with schema test/circle/yaml-schemas/Chart.yaml
	appVersion: Required field missing

incorrect maintainer name
==> Linting stable/kanister-operator
Lint OK

1 chart(s) linted, no failures

Linting the Chart.yaml and values.yaml files at stable/kanister-operator
Validating /charts/stable/kanister-operator/Chart.yaml...
Validation success! 👍
Validating maintainers names
Error: depohmel65 is not valid GitHub account

/assign @unguiculus
/assign @mattfarina
/assign @viglesiasce

I've modified lint.sh so it can be used locally. I was trying to add something like lint_my_chart.sh, but got stuck with questions: where to place it, where should readme go, what execution to support etc
for now, it can be used with following CMD:
from charts folder
docker run -ti -v $(pwd .):/charts -w /charts/test circleci/python:3.6.4 bash -c "sudo circle/install.sh && circle/lint.sh ../stable/weave-cloud"

/approve

/ok-to-test

/lgtm


Code cleanup

Fixed JsRelease failure if the context has already been cleared
Added wrappers to the API surface to catch/convert exceptions
Removed writes to cout/cerr
Moved cassert includes next to their usages

/cc @digitalinfinity @sethbrenith @jackhorton @mike-kaufman @akrantz


Changed structure of statistics_shares table

Because BTC mining has considerably more shares than the standard INT column type can handle, I changed valid, invalid, pplns_valid and pplns_invalid all to BIGINT.

Thanks, that must have been a simple oversight on my part when migrating the shares table to a BIGINT format. Thanks for the PR! This will not affect current installations but for those interested, a simple alter table can do the trick.


⚠ File access (beta) has degraded performance

In dab8b6e, File access (beta) (https://beta.fyle.uk/file/fish) experienced degraded performance:

HTTP code: 200
Response time: 2826 ms

Resolved: File access (beta) performance has improved in 56a16b9.


CORS error No 'Access-Control-Allow-Origin' header is present on the requested resource

Hello, this is my request:
axios({       method: 'POST',       url:${SERVER_ADDRESS}/api/v1/manager/restaurant/${restaurantName}/payment-methods,       crossDomain: true,       data: {         payment_methods: checkedPayments       },     })       .then(() => {         dispatch(loadPayments(restaurantName));       }).catch((error) => {       console.log(error);         dispatch(paymentsError());       });
the server is laravel 5, it is responding with:
XMLHttpRequest cannot load http://localhost:8000/api/v1/manager/restaurant/accusamus/payment-methods. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access.
Server headers are set with CORS middleware like this:
    return $next($request)
        ->header("Access-Control-Expose-Headers", "Access-Control-*")
        ->header("Access-Control-Allow-Headers", "Access-Control-*, Origin, X-Requested-With, Content-Type, Accept")
        ->header('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS, HEAD')
        ->header('Access-Control-Allow-Origin', '*')
        ->header('Allow', 'GET, POST, PUT, DELETE, OPTIONS, HEAD');

Theese are the response headers, which I get when I use postman:
Access-Control-Allow-Headers →Access-Control-, Origin, X-Requested-With, Content-Type, Accept
Access-Control-Allow-Methods →GET, POST, PUT, DELETE, OPTIONS, HEAD
Access-Control-Allow-Origin →
Access-Control-Expose-Headers →Access-Control-*
Allow →GET, POST, PUT, DELETE, OPTIONS, HEAD
Cache-Control →no-cache
Connection →close
Content-Type →text/html; charset=UTF-8
Date →Sat, 03 Dec 2016 10:33:04 GMT
Host →localhost:8000
X-Powered-By →PHP/7.0.13
X-RateLimit-Limit →60
X-RateLimit-Remaining →59
phpdebugbar-id →0ff14bef1824f587d8f278c87ab52544
AXIOS sends preflight which is:
Request URL:http://localhost:8000/api/v1/manager/restaurant/accusamus/payment-methods
Request Method:OPTIONS
Status Code:200 OK
Remote Address:[::1]:8000
Response Headers
view source
Allow:GET,HEAD,POST
Cache-Control:no-cache
Connection:close
Content-Type:text/html; charset=UTF-8
Date:Sat, 03 Dec 2016 10:25:27 GMT
Host:localhost:8000
X-Powered-By:PHP/7.0.13
Request Headers
view source
Accept:/
Accept-Encoding:gzip, deflate, sdch, br
Accept-Language:en-US,en;q=0.8
Access-Control-Request-Headers:content-type
Access-Control-Request-Method:POST
Connection:keep-alive
Host:localhost:8000
Origin:http://localhost:3000
Referer:http://localhost:3000/restaurant-profile/payment
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36
Am I doing something wrong? I can't figure it how to do this. Witch Chrome plugin CORS everything works fine, but this is not the way.
Please help, help is really appreciated, spent hours with this.

Looks like your server does not include the Access-Control-Allow-Origin header in response to a preflight request (OPTIONS). A CORS request will fail if Access-Control-Allow-Origin is missing.
Here are some great articles that explain how CORS works:

https://www.html5rocks.com/en/tutorials/cors/
https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS

Hope this helps!

it was problem in server not acception OPTIONS requests, because routes were declared as GET::sometnig or POST:: something, so the preflight couldn't pass and the POST request was decliend, hope this will help another people to prevent hours of googling

@andylaci How exactly did you fix this? i am also using axios with laravel-cors and i would like to know what you did to make the server accept OPTIONS

hmm, backend developers solved it finally 😕 Don't know their names, but I think they inserted some global filters there.

@andylaci i found a good example from the vue-auth demo https://github.com/websanova/laravel-api-demo

Hey everyone, I had this problem too, not sure is it's the same as everyone else but I had
axios.get('localhost:3000/posts')
.then((res) => { ... })
which I was able to make work by simply adding
axios.get('_http://_localhost:3000/posts')....

My server added Access-Control-Allow-Origin header to options request.
still get the error.
And it's strange that axios actually received 200 & the data server returned. Don't know why I still get the error.

Same. Using Flask with flask-cors

Create a middleware with the headers..
then bind your routes in that middleware group

having the same issue with webpack dev server. Already added the headers:
headers: { "Access-Control-Allow-Origin": "*" },
Still won't work. I also tried the proxy approach (with variants):
proxy: {
            '/api': {
                target: {
                    host: "localhost",
                    protocol: 'http:',
                    port: '8082',
                    secure: false
                },
                pathRewrite: {
                    '^/api': ''
                }
            }
        }

So, maybe I'm missing somethign regarding axios?

I had the same issue sending a POST request from a Vue app to Laravel API. The comment on 4 Dec by @andylaci helped! Fixed by adding a new route responding to the OPTIONS request method in the backend. This gives back the access control headers required for the POST request to proceed.

Hi @DavidCWebs Is it possible to have a snippet of the code you entered? It will definitely help make things clearer.

Hi @shraddha18 , I've added all relevant code and a few notes to this gist: https://gist.github.com/DavidCWebs/4e4adde53a9c54f94e25e8a72f1251e8
Let me know if you need more info!

I have the same problem: My server declares the CORS headers but still get the error (In fact I'm using CORS JS for express

But console said:

Not sure why this was closed.  I can see 200s for both the OPTIONS and the subsequent request (PUT). axios still reports it as an error.

install this https://github.com/barryvdh/laravel-cors.. if it still gives this issue use ngrok to test your apis

his error is caused by CORS security. When Browser hits the request to another domain, by default, it denies the request.
Possible Solutions:
We need to allow this origin to Laravel server side. So we need to create one middleware at the backend and apply this middleware to every API request. By putting this middleware, we are explicitly told Laravel that we are allowing this request to access our resources.
Download the following Laravel Specific CORS package to avoid this issue and follow the steps.
composer require barryvdh/laravel-cors
Add the Cors\ServiceProvider to your config/app.php provider’s array
Barryvdh\Cors\ServiceProvider::class,
To allow CORS for all your routes, add the HandleCors middleware in the $middleware property of app/Http/Kernel.phpclass:
protected $middleware = [
// ...
\Barryvdh\Cors\HandleCors::class,
];
You can publish the config using this command:
php artisan vendor:publish --provider="Barryvdh\Cors\ServiceProvider"
Now, try again, it will save the data into the database. I have not set the redirect after saving the data but will set in short, while you can check the values in the database.

@gbrits thanks for the tip!  This was the case for me.  I couldn't figure out why CORS wasn't working for me.  Turns out I was debugging some things using die('...'); in my code which didn't allow the middleware headers to be sent in the response.  Removing the die did the trick.  Thanks!

I just realized my comment last year got 100+ downvotes. I don't know why - was I doing something bad/insecure? I posted about adding http to the request to get it to work when running on localhost (I think my actual situation was axios failing in a test env).

didn't check the thread for longer, but the success to this issue is to

allow Access-Control-Expose-Headers: Access-Control-Allow-Origin on the server side,
Access-Control-Allow-Origin: * < server
set axios option crossDomain: true < axios
don't forget to enable Access to OPTIONS requests as well < server

Disable the chrome security.Create a chrome shortcut right click -> properties -> target, paste this "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir="c:/chromedev"

in my own case, I manage the nginx installation. It was working until I switched to another VPS instance, and even with the same nginx configs, it's not working and I've no clue why.

There is no option as crossDomain inside the Axios. Please study the source-code before giving/using wrong clues.

Guys, just download a plugin to intercept request like "ModHeaders" in Chrome and then in the response headers add "Access-Control-Allow-Origin" with value "*". That will simulate as your server is sending you that in the header response.

I use Flask and by adding flask-cors, I could solve this problem !!!!!!!!

My solution is
axios.get('https://cors-anywhere.herokuapp.com/' + yourUrl)

tried all the solution mentioned above. nothing works.
finally found one - https://github.com/expressjs/cors
i hope it helps you guys

CORS issue occured to me suddenly, "in the middle of the development", and what helped was to clear the cache. I'm talking about Laravel, so here are the commands:
php artisan cache:clear
php artisan config:clear
php artisan route:clear

php artisan config:cache
php artisan route:cache

I found that when your (backend) method's response isn't interpretable by the front-end, you can receive a CORS-looking issue. For example, I was using die('message'); in my Laravel method and I received a CORS complaint, despite my CORS being whitelisted. After changing my response to just be return ['status' => 'success']; which formats over into JSON to the FE - problem solved. Curious if this may be the issue for some of you too.

I found that when your (backend) method's response isn't interpretable by the front-end, you can receive a CORS-looking issue. For example, I was using die('message'); in my Laravel method and I received a CORS complaint, despite my CORS being whitelisted. After changing my response to just be return ['status' => 'success']; which formats over into JSON to the FE - problem solved. Curious if this may be the issue for some of you too. :)

Thanks a lot! :1st_place_medal:

Just avoid using the word "localhost".  Why not IP instead?

If you are using nodejs, use
var cors = require('cors');
var express = require('express');
var app = express();
app.use(cors());

It fix CORs at server, if you cant send CORS request, test the Route locally, sometimes route dont work on production (For example, caused by nginx), and wrongly shows the CORS error. That was my case.
Try a simple route, like
app.post ('/test', (req, res) => {
	res.send('test route');
})

I noticed that the route starting with / auth was giving error in Nginx, and said that it was because of CORS
I fixed only by changing the location of the route with error
From '/auth/login' to /login/
Hope this helps

Hello
I think CORS request with Axios doesn't work because Axios doesn't set "origin" in request header :
Origin: http://
I try with JQuery and it works perfectly. The only difference is that request build with JQuery contains "origin" header.

I too had this issue with axios, which got solved by using jQuery ajax function (definitely not proud of it though). Looks like axios doesn't handle cross domain requests that well...

I wonder how anyone solved this problem. I've been trying to make this work for 3 days on a demo project I wish to present, but this has been halting me ever since. YouTube tutorials make it seem so simple, yet everything I do exactly like them fail, and it seems like the OPTIONS request does not send the request headers I specify.
Instead of passing around a configuration object, I used the supposedly working axios.defaults in one module, like this :
   axios.defaults.headers.common = {
      ...axios.defaults.headers.common,
      'Access-Control-Allow-Origin': 'http://localhost:3000',
      "Content-Type": 'application/json',
      "Authorization": token ? `Token ${token}` : undefined
   };
   axios.defaults.preflightContinue = true;
   //axios.defaults.crossDomain = true;
   axios.defaults.withCredentials = !!token;

When I perform the actual request, I can check that the options are indeed set : console.log(axios.defaults);, but the request ends with a code 200 (success) and I get

As for the server, I'm using Django, and I watched about half a dozen videos, read the official docs, etc. and then fiddled some more. Nothing works.

It seems you are trying to call <IP_ADDRESS>:3000 from localhost:3000 , and browser are treating them as separate domains.
FYI, access-control-allow-origin header needs to be set by the server, not the client. So in your case, you need to check how to configure cors with django, and allow CORS requests from localhost.

I tried everything I can find on from Django's side. Nothing works. As for <IP_ADDRESS>:3000, I have no idea why it echoes this in the console because the browser URL is localhost:3000 and I'm requesting localhost:8000/path/to/api/.

hmm, definitely different origin (different port = different origin)
you tried following these steps?
https://stackoverflow.com/questions/35760943/how-can-i-enable-cors-on-django-rest-framework

Yes. Never really had to bother with CORS before (had everything running from he same domain and port). And I have read nothing but conflicting discussions about what to send, and what the server is supposed to respond from various sources. In fact, even in this very thread some comments suggest things that aren't even valid options! Perhaps the specs will be refined down the road, but this is all very frustrating, just like how browsers now block the access to LAN routers that expose HTTPS management consoles with expired SSL certificates. Good job, Google!
Anyhow, I ended up setting CORS_ORIGIN_ALLOW_ALL = False with a set of white list local domains, and it seems to partly work.... now the URL returns an error 405 which has nothing do do with this anymore. Arrgh!

@yanickrochon even I facing the same kind of error message in console log, but my get request working perfectly fine no issues for response, when I try to make a post request on same API path, it gives error what you have mentioned above! :(
const url = 'http://localhost/xxx-api/contacts.php';             axios({                 method: 'post',                 url,                 data: postData,                 config: {                     headers: {                         'Content-Type': 'multipart/form-data',                         // 'Content-Type': 'application/x-www-form-urlencoded',                     }                 }             })             .then(resp => {                 console.log('Submission response', resp);             })             .catch(err => console.error(err));
Error it throws:

Working with get request:

@yanickrochon even I facing the same kind of error message, but my get request working perfectly fine no issues for response, when I try to make a post request on same API, it gives error similar what you have mentioned above!
const url = 'http://localhost/xxx-api/contacts.php'; axios({ method: 'post', url, data: postData, config: { headers: { 'Content-Type': 'multipart/form-data', // 'Content-Type': 'application/x-www-form-urlencoded', } } }) .then(resp => { console.log('Submission response', resp); }) .catch(err => console.error(err));
Error it throws:

Working with get request:

The issue was $_POST was not able to read normal JSON data, turned into as a FormData it worked and error is gone now.
updated code below:
`const {name, email, city, country, message} = this.state.contact;
const formData = new FormData();
        formData.append('name', name);
        formData.append('email', email);
        formData.append('city', city);
        formData.append('country', country);
        formData.append('message',message);
        const url = 'http://localhost/xxx-api/contacts.php';
        axios({
            method: 'post',
            url,
            data: formData,
            config: {
                headers: {
                    'Content-Type': 'multipart/form-data',
                }
            }
        })
        .then(resp => {
            console.log('Submission response', resp);
        })
        .catch(err => console.error(err));`

@jsbimra  can you try this : axios.get(url,{crossDomain : true}).then("your code goes here") .
I hope this will solve your problem.

@Satsh24 does not work

If your backend is Nodejs then -- this is your fix ..
npm install cors
var express = require('express')   , cors = require('cors')   , app = express(); app.options('*', cors()); // preflight OPTIONS; put before other routes app.listen(80, function(){   console.log('CORS-enabled web server listening on port 80'); });
https://stackoverflow.com/questions/46904400/why-do-i-get-an-options-request-after-making-a-post-request

I wonder how anyone solved this problem. I've been trying to make this work for 3 days on a demo project I wish to present, but this has been halting me ever since. YouTube tutorials make it seem so simple, yet everything I do exactly like them fail, and it seems like the OPTIONS request does not send the request headers I specify.
Instead of passing around a configuration object, I used the supposedly working axios.defaults in one module, like this :
   axios.defaults.headers.common = {
      ...axios.defaults.headers.common,
      'Access-Control-Allow-Origin': 'http://localhost:3000',
      "Content-Type": 'application/json',
      "Authorization": token ? `Token ${token}` : undefined
   };
   axios.defaults.preflightContinue = true;
   //axios.defaults.crossDomain = true;
   axios.defaults.withCredentials = !!token;

When I perform the actual request, I can check that the options are indeed set : console.log(axios.defaults);, but the request ends with a code 200 (success) and I get

As for the server, I'm using Django, and I watched about half a dozen videos, read the official docs, etc. and then fiddled some more. Nothing works.

Hello, I have encountered the same problem. I have checked a lot of information and have not solved it. How do you deal with it?

Replace Content-Type: application/json by  application/x-www-form-urlencoded or multipart/form-data works for me.

I just realized my comment last year got 100+ downvotes. I don't know why - was I doing something bad/insecure? I posted about adding http to the request to get it to work when running on localhost (I think my actual situation was axios failing in a test env).

Your comment was off topic. It doesn't throw the same error that this thread addresses. You probably get something like "Access... has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https." This thread is meant to address errors related to missing headers.
Again, off topic, but to your point when a method wants a URL give it a URL. You probably could have gotten away with "//localhost:3000" (browser inserts the protocol of the current page) and maybe gotten warnings. But the modern best practice is always include the schema (protocol). https://en.wikipedia.org/wiki/URL#Syntax

Afrer several desperate hours I realized that cause of my CORS error was request header
"Content-Type": 'application/json'
when I removed it, requests started working like a charm

This is not a solution 👎
We need to use the Content-Type: "aplication/json" but we can't do it because the server doesn't allow us to use custom Content-Type headers.

Hey everyone, I had this problem too, not sure is it's the same as everyone else but I had
axios.get('localhost:3000/posts')
.then((res) => { ... })
which I was able to make work by simply adding
axios.get('http://localhost:3000/posts')...

For getting data of localhost port 3000 in developer mode of work , you can use  next code
axios.get('/posts.json')
Because,  port 3000  present content of public folder in react app, like default folder all time when you developing your react app. Except you change this setting

I faced the same problem,  then I realized CORS must be enabled from the server middleware, not from the client.
I'm using the Laravel framework, and this article helped me out:
https://medium.com/@petehouston/allow-cors-in-laravel-2b574c51d0c1

A few have mentioned this, but if you're using Flask, you should really try adding flask_cors before doing anything on the front-end. First pip install flask-cors==3.0.7, then:
from flask_cors import CORS

app = Flask(__name__)
CORS(app)

Ok this is beyond me but for some reason, removing a trailing / I had at the end of my url fixed this error for me.

This Might Be Helpful For You...

Just in case it helps anyone, I finally solved this after banging my head for hours and wandering tirelessly across the wild stretches of Internet forums,
I'm using Laravel (5.8) on the server-side and Vue (CLI 3) for the front-end with axios for my server calls. Chrome constantly gave me CORS error even when I had CORS middleware on the server. I had to do 2 things.

My CORS implementation included Access-Control-Allow-Origin and Access-Control-Allow-Methods, but not Access-Control-Allow-Headers. Chrome was constantly screaming about this particular header and I was not reading the err msg carefully, so I included that. My CORS now looks like this:

         if(env('APP_DEBUG'))         {             return $next($request)                     ->header('Access-Control-Allow-Origin', '*')                     ->header('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS')                     ->header('Access-Control-Allow-Headers', '*');         }         else {             return $next($request);         }
for safety, I have included APP_DEBUG check, so that cross-origin requests are not served in deployment.

I had to enable OPTIONS route, which is invoked by the clients before making actual GET or POST call. If you do not have OPTIONS route in your api, this will still fail even when CORS is correct. I added the following route to my api.php:

    if(env('APP_DEBUG')) {         Route::options('/{any?}', function() {})->where('any', '.*');     }
and with Almighty's grace I'm all good now. Hope this helps someone down the road.

Solved it finally, been there and did following at my api server (i have built api in node express js and client in next js using axios)

npm i cors --save

and then in node server index.js
const cors = require('cors')

app.use(cors())

"proxy": "http://localhost:8000",
use this in package.json

I found that when your (backend) method's response isn't interpretable by the front-end, you can receive a CORS-looking issue. For example, I was using die('message'); in my Laravel method and I received a CORS complaint, despite my CORS being whitelisted. After changing my response to just be return ['status' => 'success']; which formats over into JSON to the FE - problem solved. Curious if this may be the issue for some of you too.  I got this the second time and I forgot about die() and CORS! So, you saved my life twice! Thanks!

axios.get("http://localhost:8000/api/###", { 	headers: { 	  'Access-Control-Allow-Origin': '*', 	} 	}).then(function (response) { 		console.log('response is : ' + response.data); 	}).catch(function (error) { 		  console.log(error.response); 	}) });

Hello all, I was stuck on this problem. However, I found a solution to this. Please take a look at these links. I hope it will help you.
**This is only applicable to nodejs server, however. **
https://expressjs.com/en/resources/middleware/cors.html
https://github.com/troygoode/node-cors-client/blob/master/pages/index.js

This problem will not be solved until backend allows. So guys stop looking for solution in front end and focus only backend how to allow cors. That's the solution.

Install this package cors by running this commands
npm i cors

after that add this
app.use(cors())

to your code after
const app = express()

It should look like this
const express = require('express')
const cors = require('cors')
const app = express()

app.use(cors())

I Hope this help

For now the only solution that i found that works on front end is this, not ideal using a proxy for for now it works.
  const getData = async () => {
    await axios
      .get(
        'https://cors-anywhere.herokuapp.com/' +
          '<YOURPAGE>',
      )
      .then(({ data }) => setData(data.data))
  }


[18.06] vendor: update containerd to b41633746

Cherry-pick of https://github.com/moby/moby/pull/37411 for 18.06
git checkout -b 18.06-backport-vendor-containerd ce-engine/18.06
git cherry-pick -s -S -x f0e61582664d16c5a608c3a742cc12b6b006bca6

no conflicts, cherry-pick was clean
Brings in updated MaskPaths that are used in code paths directly using containerd (eg. buildkit) to address CVE-2018-10892 for those paths (containerd equivalent of https://github.com/moby/moby/pull/37404)
Full diffs:

containerd: https://github.com/containerd/containerd/compare/08f7ee9828af1783dc98cc5cc1739e915697c667...b41633746ed4833f52c3c071e8edcfa2713e5677
containerd/console: https://github.com/containerd/console/compare/9290d21dc56074581f619579c43d970b4514bc08...5d1b48d6114b8c9666f0c8b916f871af97b0a761
containerd/typeurl: https://github.com/containerd/typeurl/compare/f6943554a7e7e88b3c14aad190bf05932da84788...a93fcdb778cd272c6e9b3028b2f42d813e785d40
containerd/ttrpc: https://github.com/containerd/ttrpc/compare/d4528379866b0ce7e9d71f3eb96f0582fc374577...94dde388801693c54f88a6596f713b51a8b30b2d

z/s390x https://jenkins.dockerproject.org/job/Docker-PRs-s390x/10326/console failing on a flaky test, tracked through https://github.com/moby/moby/issues/32673
09:57:56 FAIL: docker_api_swarm_test.go:296: DockerSwarmSuite.TestAPISwarmLeaderElection
09:57:56
09:57:56 [da2b4d49d2f62] waiting for daemon to start
09:57:56 [da2b4d49d2f62] daemon started
09:57:56
09:57:56 [d2ea874610a3f] waiting for daemon to start
09:57:56 [d2ea874610a3f] daemon started
09:57:56
09:57:56 [dfa813efc7a77] waiting for daemon to start
09:57:56 [dfa813efc7a77] daemon started
09:57:56
09:57:56 [da2b4d49d2f62] exiting daemon
09:57:56 assertion failed: error is not nil: Error response from daemon: rpc error: code = DeadlineExceeded desc = context deadline exceeded
09:57:56 [d2ea874610a3f] daemon started
09:57:56 Attempt #2: daemon is still running with pid 10343
09:57:56 [d2ea874610a3f] exiting daemon
09:57:56 [dfa813efc7a77] exiting daemon

Janky https://jenkins.dockerproject.org/job/Docker-PRs/50022/console also failing on the same flaky test
10:04:47 FAIL: docker_api_swarm_test.go:296: DockerSwarmSuite.TestAPISwarmLeaderElection
10:04:47
10:04:47 [df9696a4c5d38] waiting for daemon to start
10:04:47 [df9696a4c5d38] daemon started
10:04:47
10:04:47 [dcf3351cf97a6] waiting for daemon to start
10:04:47 [dcf3351cf97a6] daemon started
10:04:47
10:04:47 [de4c85d404e6f] waiting for daemon to start
10:04:47 [de4c85d404e6f] daemon started
10:04:47
10:04:47 [df9696a4c5d38] exiting daemon
10:04:47 assertion failed: error is not nil: Error response from daemon: rpc error: code = DeadlineExceeded desc = context deadline exceeded
10:04:47 [dcf3351cf97a6] exiting daemon
10:04:47 [de4c85d404e6f] exiting daemon

Argh; s390x https://jenkins.dockerproject.org/job/Docker-PRs-s390x/10327/console hitting another flaky (https://github.com/moby/moby/issues/36903)
12:22:27 FAIL: docker_api_swarm_service_test.go:62: DockerSwarmSuite.TestAPISwarmServicesCreate
12:22:27
12:22:27 [d1ce8a9a425de] waiting for daemon to start
12:22:27 [d1ce8a9a425de] daemon started
12:22:27
12:22:27 docker_api_swarm_service_test.go:93:
12:22:27     waitAndAssert(c, defaultReconciliationTimeout, d.CheckActiveContainerCount, checker.Equals, 0)
12:22:27 docker_utils_test.go:435:
12:22:27     c.Assert(v, checker, args...)
12:22:27 ... obtained int = 1
12:22:27 ... expected int = 0
12:22:27 ... output: "3592939f8b49\n"
12:22:27
12:22:27 [d1ce8a9a425de] exiting daemon


mr_show: fix base SHA on git-show due to merged MRs

For open merge-requests the "git-show" command ranging from the
/ to the head MR commit is fine, but once the MR
is merged, the diff will be empty, since the code is present in
/. The user should be able to call lab mr show -p
and see the patches of that MR regardless it being merged or not,
like it's possible through the WebUI.
This patch fixes it by using the merge-request base commit SHA instead
of the target-branch. The MR base SHA points to the parent commit of the
first commit in the MR, meaning that it'll be always a valid SHA on the
target-branch. The head SHA will be kept the same: "mr.SHA".
Signed-off-by: Bruno Meneguele<EMAIL_ADDRESS>

Being honest, I'm not sure why the test is failing. Running it manually just works. 🤦

Things are getting worse and worse:
--- FAIL: Test_ciStatus (0.58s)
ci_status_test.go:18: Connection to gitlab.com closed by remote host.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
ci_status_test.go:19: exit status 128

🤦

Had enough for today:
--- FAIL: Test_snippetCreate (1.36s)
    snippet_create_test.go:37: 2022/05/04 14:27:57 ERROR: snippet_create.go:109: failed to create snippet: POST https://gitlab.com/api/v4/projects/lab-testing/test/snippets: 400 {message: {error: Repository Error creating the snippet}}


Create the TERMS_OF-USE.md to keep consistency across all projects

Is your feature request related to a problem? Please describe.
Register form on all AnitaB.Org Open source applications need to have common Terms of Use. At the moment developers getting the content from https://anitab.org/terms-of-use/.
Describe the solution you'd like
If we have TERMS_OF_USE.md in the /documentation repo, developers can use .md parser in their project so that any changes made to this policy will automatically apply to that project. This ensures the policy is up to date and consistent across all AnitaB.Org Open Source projects.
Describe alternatives you've considered
NA
Additional context
I believe the content of the Terms of Use of the AnitaB above can be used across all projects as indicated in the screenshot below.

@isabelcosta , can you please see if this issue is valid? Thanks 😉


Cannot use as a library for multiple cameras

Currently is is difficult to use this as a library to communicate with multiple cameras in the same node because of global state. It would be nice if usb_cam.cpp was refactored to move all of the state into a class.
I would be happy to offer a pull request if it would be accepted.

:+1: I like it!

Should I leave the original API as well for backwards compatibility?

We can remove it and just do a major version tick.

Also, since the headers are installed incorrectly, I doubt anyone is use it outside of usb_cam.