Nitro proxy settings are not taking effect.

Environment

Operating System: Linux
Node Version:     v19.6.0
Nuxt Version:     3.2.2
Nitro Version:    2.2.3
Package Manager<EMAIL_ADDRESS>Builder:          vite
User Config:      nitro, css, postcss
Runtime Modules:  -
Build Modules:    -

Reproduction
export default defineNuxtConfig({
  nitro: {
    devProxy: {
      '/proxy/rust': {
        target: 'http://<IP_ADDRESS>:8000',
        prependPath: true,
        changeOrigin: true,
      },
    }
  }
})

Describe the bug
nitro proxy is not using settings described in nuxt.config.ts
Additional context

$fetch('/proxy/rust/some_route')

rust backend is running on <IP_ADDRESS>:8000
nuxt running on <IP_ADDRESS>:3000
Logs
Nuxi 3.2.2                                                                                08:35:08
Nuxt 3.2.2 with Nitro 2.2.3                                                                                08:35:08
                                                                                08:35:09
  > Local:    http://localhost:3000/
  > Network:  http://<IP_ADDRESS>:3000/
  > Network:  http://[fd01:c7ca:2637:0:468a:5bff:fed7:4e72]:3000/

ℹ Vite client warmed up in 1137ms                                                                                08:35:12
✔ Nitro built in 623 ms

http://<IP_ADDRESS>:3000/proxy/rust/some_route
[HTTP/1.1 404 Not Found]

Hi. devProxy is not supported through direct fetch. You can either fetch with full URL (http://localhost:3000/proxy/...) or better use new runtime proxy via route rules https://nitro.unjs.io/config#routerules

nice this seems to work thx..!
one thing though the docs are going all over the place..
first it was vite proxy then nitro proxy then routeRules, this makes things mighty confusing..
it would be nice if docs could be updated..

Happy it is working for you now. Indeed we need to unify docs little bit more. For context, vite proxy is also only dev only and inherits more limitations. devProxy is more powerful and using Node.js HTTP module but only works in development environment and not supporting direct fetch. New runtime proxy via route rules (you can directly use sendProxy in server routes too) is powered by native fetch and streaming support. Probably best option for universal usage.

@piO I'm having an issue with nitro routeRules proxy... basically it 'fails to fetch' when sending a form-data body... I have another POST call with JSON body and it goes through without issues...
I've confirmed its nitro since I tried setting up an nginx to proxy requests and everything works fine.

Is it happening for dev environment too @ekrausso? Any chance you can make a small reproduction ?

@pi0 yes both in production and dev... I'll see if I can make a small repro and get back to you

It's still not working.

I am also having the same problem, I have no problem with the GET and POST methods, but DELETE gives me an error.

Error log when executing DELETE http://<IP_ADDRESS>:3000/api/v2/users/sign_out

[nuxt] [request error] [unhandled] [500] fetch failed (http://<IP_ADDRESS>:3000/api/v2/users/sign_out)                                            10:50:06 PM
  at async sendProxy (./node_modules/h3/dist/index.mjs:506:20)
  at async Object.handler (./node_modules/h3/dist/index.mjs:1247:19)
  at async Server.toNodeHandle (./node_modules/h3/dist/index.mjs:1322:7)

My environment is as follows

- Operating System: Darwin
- Node Version:     v18.12.1
- Nuxt Version:     3.4.0
- Nitro Version:    2.3.3
- Package Manager<EMAIL_ADDRESS>- Builder:          vite
- User Config:      ssr, devServer, app, modules, css, vite, runtimeConfig, pinia, build, nitro, typescript
- Runtime Modules<EMAIL_ADDRESS><EMAIL_ADDRESS>- Build Modules:    -

It's still not working. "nuxt": "^3.3.2",

Got it work. Found i've mis-configured base url

I may have missed something, but I don't think the documentation (for neither Nuxt or Nitro) mentions that proxy.to can be used, like in @pi0's example:

defineNuxtConfig({
  routeRules: {
    '/proxy/rust/**': { proxy: { to: 'http://<IP_ADDRESS>:8000/**' } }
  }
})

Even though proxy is working, I can't get headers working like so (I expect following should inject headers into proxy request).
@pi0, could you kindly clarify it?
nitro: {
    routeRules: {
        '/proxy/**': {
            proxy: `https://some-host.com/api/**`,
            headers: {
                'x-api-key': '12345',
            },
            cors: true,
        },
    },
},

Also doesn't work:
nitro: {
    routeRules: {
        '/proxy/**': {
            proxy: {
               to: `https://some-host.com/api/**`,
               headers: {
                   'x-api-key': '12345',
               },
           },
            cors: true,
        },
    },
},

ohh，thanks，this problem has bothered me for a long time，my problem is : devProxy does not proxy when refreshing the page.....

"Me too. Have you found a solution?"

Hi. devProxy is not supported through direct fetch. You can either fetch with full URL (http://localhost:3000/proxy/...) or better use new runtime proxy via route rules https://nitro.unjs.io/config#routerules
defineNuxtConfig({
  routeRules: {
    '/proxy/rust/**': { proxy: { to: 'http://<IP_ADDRESS>:8000/**' } }
  }
})

I can use proxy in this way. however it fails when doing useFetch with multipart data.
"nuxt": "^3.5.1",
  routeRules: {
    "/arjuna/**": {
      proxy: {
        to: `${API_URL}/**`,
      },
    },
  },

I saw similar issue reported under different titles in Nuxt3.
Since I was not able to find a proper fix for this solution, I fixed it by

Removed entry from  routeRuels in nuxt.config.js-            "/api/**": {
-                proxy: "http://localhost:3001/api/**"
-            }

Created a server route ( server/api/[...].js) as show below├── nuxt.config.js
├── pages
├── public
├── server
│   └── api
│       └── [...].js

Added following content to server route handler// server/api/[...].js
import { proxyRequest, getRequestURL } from "h3";

export default defineEventHandler((event) => {
  const reqUrl = getRequestURL(event);
  return proxyRequest(event, "http://localhost:3001" + reqUrl.pathname + reqUrl.search );
});

This minimal route handler was working fine for my use case

Do you mind to report this to nitro repo with a minimal reproduction? 🙏🏼

I saw similar issue reported under different titles in Nuxt3. Since I was not able to find a proper fix for this solution, I fixed it by

Removed entry from  routeRuels in nuxt.config.js-            "/api/**": {
-                proxy: "http://localhost:3001/api/**"
-            }

Created a server route ( server/api/[...].js) as show below├── nuxt.config.js
├── pages
├── public
├── server
│   └── api
│       └── [...].js

Added following content to server route handler// server/api/[...].js
import { proxyRequest, getRequestURL } from "h3";

export default defineEventHandler((event) => {
  const reqUrl = getRequestURL(event);
  return proxyRequest(event, "http://localhost:3001" + reqUrl.pathname + reqUrl.search );
});

This minimal route handler was working fine for my use case

I tried this solution, but it doesn't work :( Having the same trouble when post body with type mutipart/form-data

@nhan-ho-saltovn : it is possible.   mutipart/form-data may need special handling .
Your may need to refer readMultipartFormData  from https://github.com/unjs/h3

@seijikohara Did you ever find a solution to that issue? I am running into the same issue where HTTP GET and POST work, but as soon as I change it to a DELETE, my API does not receive the request even though the JS console reports an internal server error. Then I get the same error logs in my nuxt console.
It only seems to happen on a route using the route rules though, as when I go to a test endpoint on a public server, the HTTP delete works as expected.

@seijikohara @sei-aderr
I found the same issue unjs/h3#375 where someone gave a solution.

Found a fix from unjs/nitro#1137
export NODE_OPTIONS='--no-experimental-fetch'
It seems the experimental fetch doesn't like content-length: 0 for deletes.

@sei-aderr @TM-SunnyDay
I resolved this issue by replacing it with the nuxt-proxy module.

routeRules: {
    '/proxy/rust/**': { proxy: { to: 'http://<IP_ADDRESS>:8000/**' } }
  }

Dear pi0
I checked that out with tow different ways like this
nitro: {
routeRules: {
"/api/xxx": {
proxy: "http://<IP_ADDRESS>:8000/api/xxx",
},
},
devProxy: {
"/api/login": {
target: "http://<IP_ADDRESS>:8000/api/xxx",
changeOrigin: true,
},
}
},
in both way dev and build the respose of the server are the same while dev mode Nuxt accept the answer. But in build mode the request in connction is keep-alive and dev mode connection is close.
afterward i tried to do like this
nitro: {
routeRules: {
"/api/xxx": {
proxy: "http://<IP_ADDRESS>:8000/api/xxx",
headers: {
'Connection': 'close',
},
},
but it was the same as connection: "keep-alive". because the source of the error comes from tcp connection i think the problem source is the connection. Do you?
Woman life freedom

This works perfectly for me
export default defineNuxtConfig({
 ....
  routeRules: {
    '/proxy/**': {
      proxy: 'https://my-api.com/**'
    }
  },
...
}

I think we can close this as this should now be resolved in nitro. If anyone is still experiencing an issue, please see if you can reproduce with pure nitro and raise an issue at https://github.com/unjs/nitro. :pray:

Complete new nuxt 3.9 project scaffolded with bunx nuxi@latest create, and the routeRules seem to do nothing.
How can I figure out if this is in the nuxt part or the nitro part? Do I need to update nitro or enable experimental things somewhere?

💡  I think I realised it (untested yet).
But nitro is only used when building the production server. So everything related to routeRules and devProxy that are nitro settings, isn't working until you are building for production.
In the devserver, I'm using (we are using) Vite of course, so any kind of proxy settings have to be Vite settings, not Nitro.
Little d'oh moment :).

@jorismak Nitro is the same server engine used for development too. routeRules are effective and devProxy is only for development time. When running Nuxt in development, we also add a vite (or webpack) dev middleware that enabled full stack development.
If routeRules is not working as expected, feel free to make a new issue with reproduction or part of your config 🙏🏼

I'm about to ask 'are you sure' but seeing your name and involvement I think you'll know a from b here:).
Routerules directly in nuxt.config I couldn't get it to work. (Proxy that is). Trying to get everything that starts with /api to end up at a different go or php backend that's running. Kept getting 500 no such route errors.
Tried the same with devProxy in a nitro block in nuxt.config, but nothing. The same 500 errors. Sometimes a tiny bit of jaon saying 500, sometimes a full blown html 500 error page from nuxt.
Setting the proxy in a server block in a vite block in nuxt.config worked instantly (well, after fixing some SSL related issues ).
Am I having the wrong expectations from devproxy or proxy rules in routeRules? Or is something not working as it should?

routeRules with proxy rule should work universally and it is the recommended method of defining proxy, unless you really need advanced dynamics or custom behavior (/cc @manniL you know I mentioned you this before, but again)

Of course... now it's working all of sudden. flabbergasted.
I think that the problem les in the fact that I try to proxy to an internal https host, that requires a custom CA to work without errors / warnings.
Setting up Vite's devserver-proxy, showed me an error message in the console running bun run dev showing a SSL client error. That made me disable strict SSL checking, and then Vite worked.
Now trying again with routeRules, and it works. I guess the real reason it didn't work before was a SSL client error buried deep in the stacktrace somewhere. But Nuxt was still responding with 'no such route', but that might be because the proxy failed.
Did a quick test with removing the NODE_EXTRA_CA_CERTS environment var, then I get this:
[nuxt] [request error] [unhandled] [500] fetch failed
  at Object.fetch (node:internal/deps/undici/undici:11730:11)
  at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
  at async sendProxy (./node_modules/h3/dist/index.mjs:1080:20)
  at async Object.handler (./node_modules/h3/dist/index.mjs:1676:19)
  at async Server.toNodeHandle (./node_modules/h3/dist/index.mjs:1886:7)

While the Vite devserver proxy gives me this:
 ERROR  http proxy error at /api/test:                                                                      1:24:22 PM
Error: unable to verify the first certificate
    at TLSSocket.onConnectSecure (node:_tls_wrap:1674:34)
    at TLSSocket.emit (node:events:514:28)
    at TLSSocket._finishInit (node:_tls_wrap:1085:8)
    at ssl.onhandshakedone (node:_tls_wrap:871:12)

Which gave me the proper hint that it was a SSL client error.
With the NODE_EXTRA_CA_CERTS env var both work fine.
Now that I think about this, I'm tested the proxy (now) with a local curl command. In the dev-server I get 'fetch failed', which now seems obvious that Nitro is failing its fetch to reach the proxy.
But first I was testing from nuxt, so I was trying to access the proxied URL with useFetch(). if I then see a 500 error from nuxt with 'fetch failed', I don't think it could be an error in the nitro-proxy trying to reach its target, I'm thinking useFetch() failed. The error sent me in the wrong direction.
And a lot of lessons learned here for me, but yay it's working :).


Undertow 1.3.0.Beta4

Core - Full Integration Build 1299 is now running using a merge of b47b46838ff84293d2afd710c13a88b793c133b6

Windows Build 1692 is now running using a merge of b47b46838ff84293d2afd710c13a88b793c133b6

Linux Build 2163 is now running using a merge of b47b46838ff84293d2afd710c13a88b793c133b6

Windows Build 1692 outcome was SUCCESS using a merge of b47b46838ff84293d2afd710c13a88b793c133b6
Summary: Tests passed: 3372, ignored: 63 Build time: 0:33:25

Linux Build 2163 outcome was SUCCESS using a merge of b47b46838ff84293d2afd710c13a88b793c133b6
Summary: Tests passed: 3372, ignored: 63 Build time: 0:35:26

Core - Full Integration Build 1299 outcome was FAILURE using a merge of b47b46838ff84293d2afd710c13a88b793c133b6
Summary: Tests failed: 2 (2 new), passed: 2911, ignored: 342, muted: 2 Build time: 0:54:03
Build problems:
Failed tests detected
Failed tests
org.jboss.as.test.integration.ejb.mdb.dynamic.DynamicMessageListenerTestCase.test1: <no details avaliable>

org.jboss.as.test.clustering.cluster.ejb.stateful.StatefulFailoverTestCase(SYNC-tcp).jmsConnectionFactoryFailover: <no details avaliable>


Correction for raw affiliation Team Evolution of Vertebrate Dentition, Institute of Functional Genomics of Lyon, ENS de Lyon, CNRS UMR 5242, Université de UCB Lyon1

Correction needed for raw affiliation Team Evolution of Vertebrate Dentition, Institute of Functional Genomics of Lyon, ENS de Lyon, CNRS UMR 5242, Université de UCB Lyon1
raw_affiliation_name: Team Evolution of Vertebrate Dentition, Institute of Functional Genomics of Lyon, ENS de Lyon, CNRS UMR 5242, Université de UCB Lyon1
new_rors: 029brtt94;02feahw73;04zmssz18;038fcbc74
previous_rors: 029brtt94;02feahw73;04zmssz18
works_examples: W2926873483
contact: de441cabca16dd80cc197ee2871b3b1f:f6ee343e0cf40cbd9fc8840debf9 @ ens-lyon.fr

This issue was accepted and ingested by the OpenAlex team on 2024-12-19. The new affiliations should be visible within the next 7 days.


Would like to handle negative condition checks better

At present to check for elements not being displayed we have to do:
 assertTrue(landingPage.cookiesPrompt.is(not(displayed)));
The issue is that this waits for the timeout if the element is not there
would like to do:
 assertTrue(landingPage.cookiesPrompt.is(notDisplayed));
This should return immediately if the element is not there and wait for the implicit wait if it is there.
Would like the same for other element conditions e.g. 'present'

@MikeAScott Great to see the issues channel being used. Let's get started :).
For background to other readers, the 'is' and 'not' operators simply take a Condition and return the logical operation from the result of the Condition... however this doesn't allow you to specify a timeout on the Condition.
So it's the 'displayed' Condition which we want to control with a zero timeout.
Cinnamon actually used to wrap conditions checks like these and return boolean error/success, but it was decided for initial release to be explicit about the exceptions and force the user to decide.
For now, use the 'waitUntil' element method which takes a Condition and has timeout control.
In this case, pass the Condition, and a zero timeout.
BUT currently this needs to be wrapped with a try-catch.
try {
landingPage.cookiesPrompt.waitUntil(displayed, new TimeoutSeconds(0));
return true;
} catch (Exception e) {
return false;
}
I know, this could so easily be wrapped up - wrap it up in your code for now. That's all part of the explicit error handling - we currently don't want Cinnamon to make any assumption or allow unintended 'masking' of error conditions by design.
We should debate whether to add these wrapped checks back in.

Hi Miles,
Thanks for clarifying how the conditions currently work.  I agree that it makes perfect sense for it to work that way when you are expecting something to be there.  However checking the negative is not quite the same.  We know that in this case one cannot scientifically prove that something is not displayed (i.e. it may not be present, the website may have crashed or the internet could be broken :)).  We can though make a reasonably confident  assertion that if something was displayed and is not displayed after an action then the action made it disappear i.e:
assertTrue(landingPage.cookiesPrompt.is(displayed)); landingPage.cookiesContinueButton.click(); assertTrue(landingPage.cookiesPrompt.is(notDisplayed));
Note that the implementation of 'notDisplayed' should not be 'not(displayed)' because we want it to return immediately if it is not displayed or wait until it is not displayed.  This is not the same as waiting for it to be displayed and reversing the condition if it fails.
I agree that your code with the try catch will work. It just does not express the intent very clearly.
Sorry there are way too many double negatives in this post :)

The 'waitUntil' with zero timeout is for when you are not necessarily expecting the element to be there, hence checking the negative with immediate result. There are clearly times when you have control of a page and you just want to know if an element is displayed right now.
I think we should wrap this into Cinnamon, but be explicit about the DSL.
e.g. assertTrue(landingPage.cookiesPrompt.is(displayedNow) / notDisplayedNow or similar semantics, which wrap up a call to waitUntil with a zero timeout.

Given issue #4 shall we close this one?

Hi Miles,
I still would like the negative condition checks.  I think that they should work with more fluent waits as in #4 . I just need to find an hour to have a go at this :)

All I'm saying is, do we need two issues open - can we close this one given #4 is the latest state of this request...


Addition to benchmarks

Hey, first of all, good work on this module here!
I was reviewing your module, as I was interested to utilize it to speed up communication within micro service networks. I also compared it to major solutions like msgpack. While I looked at your benchmarks I quickly saw, that it does not put any strings into account yet. I slightly modified the benchmark to also process some strings and this are the results:
Encode
	JSON
		Time: 1.6408ms
		Size: 249KiB
	js-binary
		Time: 1.9183ms (17%)
		Size: 92KiB (2.7x less)
Decode
	JSON
		Time: 2.2956ms
	js-binary
		Time: 0.6941ms (-70%)

Encoding got 17% slower than JSON.stringify, but decode is still fast. Still pretty good though.
Just wanted to have that shared, will do one to one comparisions next.

Here are the timings:
Benchmark without strings:
Encode
	JSON
		Time: 1.482ms
		Size: 190KiB
	js-binary
		Time: 1.145ms (-23%)
		Size: 51KiB (3.7x less)
	msgpack-lite
		Time: 5.344ms (261%)
		Size: 126KiB (1.5x less)
	msgpack
		Time: 8.449ms (470%)
		Size: 126KiB (1.5x less)
Decode
	JSON
		Time: 2.167ms
	js-binary
		Time: 0.408ms (-81%)
	msgpack-lite
		Time: 9.642ms (345%)
	msgpack
		Time: 4.804ms (122%)

Benchmark with strings:
Encode
	JSON
		Time: 1.6ms
		Size: 249KiB
	js-binary
		Time: 1.846ms (15%)
		Size: 92KiB (2.7x less)
	msgpack-lite
		Time: 5.855ms (266%)
		Size: 178KiB (1.4x less)
	msgpack
		Time: 8.567ms (435%)
		Size: 178KiB (1.4x less)
Decode
	JSON
		Time: 2.402ms
	js-binary
		Time: 0.79ms (-67%)
	msgpack-lite
		Time: 12.292ms (412%)
	msgpack
		Time: 5.554ms (131%)

Run on Intel(R) Core(TM) i7-7820HK CPU @ 2.90GH real clock while benchmark @ ~3.4GH

So msgpack in both of the major libraries is significantly slower. Your module is a bit slower than JSON.stringify on the encode side.
I also made another test with a bit more real world data and smaller payloads, which results in:
Encode
	JSON
		Time: 0.004822ms
		Size: 250B
	js-binary
		Time: 0.002744ms (-43%)
		Size: 76B (3.3x less)
	msgpack-lite
		Time: 0.013257ms (175%)
		Size: 163B (1.5x less)
	msgpack
		Time: 0.018754ms (289%)
		Size: 163B (1.5x less)
Decode
	JSON
		Time: 0.002693ms
	js-binary
		Time: 0.001217ms (-55%)
	msgpack-lite
		Time: 0.00991ms (268%)
	msgpack
		Time: 0.005288ms (96%)

Seems like in all cases msgpack is a bad decision, only if the only thing that matters is network. Still your module delivers a good performance here. Also on the encoding side again this time. Suprisingly enough, the payload mainly consists out of strings and now it performs better again.
All in all it seems like this module could be good choice to improve performance. On the wire as well as on the encoding/decoding side.
Facts on the median:

Around 2x data reduction for the wire
Around ~34% overall performance improvement

For me, dealing with 177 kB of JSON + Buffers I saw that it  was slower than plain JSON+blob for both encode and decode.

@jdalton Seems to depend, had no problems yet in the simulations. Do you have an example on how your payloads were structured?

Arrays of objects and a buffer property.

Ok, had these in my tests too with documents as big as 4MiB, could be a construction issue or something. How deep do your objects go?  Would be cool to know this to see where the limitations here are since msgpack seems to be a really bad option compored to v8s json en/decoding capabilities.

Just one level deep.

Do you have an example object? I would then write a generator function for it and run some tests against it.

And thanks for your input from your experiences here @jdalton :)


Deprecated argument for resolve_conflicts attribute

Description
When deploying a stack from this repo as part of the AWS Observability Accelerator for Terraform, I get the following message from Terraform:
Warning: Argument is deprecated
│
│   with module.eks_blueprints_kubernetes_addons.module.aws_coredns[0].aws_eks_addon.coredns[0],
│   on .terraform/modules/eks_blueprints_kubernetes_addons/modules/kubernetes-addons/aws-coredns/main.tf line 18, in resource "aws_eks_addon" "coredns":
│   18:   resolve_conflicts        = try(var.addon_config.resolve_conflicts, "OVERWRITE")
│
│ The "resolve_conflicts" attribute can't be set to "PRESERVE" on initial resource creation. Use "resolve_conflicts_on_create" and/or "resolve_conflicts_on_update" instead
│
│ (and 3 more similar warnings elsewhere)

[ x] ✋ I have searched the open/closed issues and my issue is not listed.

⚠ Note
Before you submit an issue, please perform the following first:

Remove the local .terraform directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!): rm -rf .terraform/
Re-initialize the project root to pull down modules: terraform init
Re-attempt your terraform plan or apply and check if the issue still persists

Versions

Module version [Required]:

Terraform version:

v1.5.6

Provider version(s):

├── provider[registry.terraform.io/hashicorp/aws] >= 5.0.0
├── provider[registry.terraform.io/hashicorp/kubernetes] >= 2.20.0
├── provider[registry.terraform.io/gavinbunney/kubectl] >= 1.14.0
├── provider[registry.terraform.io/hashicorp/helm] >= 2.10.0
Reproduction Code [Required]

Steps to reproduce the behavior:
cd ~/repos/github/terraform-aws-observability-accelerator/examples/eks-cluster-with-vpc
export TF_VAR_aws_region=us-west-2
export TF_VAR_cluster_name=demo
terraform init
terraform apply

git clone https://github.com/aws-observability/terraform-aws-observability-accelerator.git
Expected behaviour
Stack deploys with no warning messages
Actual behaviour
Stack deploys with warning message
Terminal Output Screenshot(s)

Additional context

See https://github.com/terraform-aws-modules/terraform-aws-eks/issues/2635 for similar issue

This is expected - it is a warning coming from the Terraform provider that a deprecated argument is in use

we will track this in the EKS module under https://github.com/terraform-aws-modules/terraform-aws-eks/issues/2635


Custom Sections issue with properties

I have noticed that when I create a custom section and header that my custom properties don't get "initiated" until the user edits each of the properties. This causes problems since the property isn't available until the user edits everything. Prior to having a custom section (using settings), all of the properties populated automatically.
Is there a setting/command needed to be executed to instantiate the custom parameters?

This can be closed, I re-wrote the section and it appears to be working correctly now.

Thx anyhow! Is the tutorial useful so far? Any general feedback?

Really love it... Wished that the rest was there. Can't be done fast enough... :)
I really like the "proven" practice approach so that I can avoid the pitfalls that you have made/experienced. Hopefully I will be able to add content in the future.
BTW: The problem resurfaced, so there may be other issues. I will continue to research and figure out on my own and report back.
Thanks


fix(build): handle invalid JSON in import.meta.env

Bug Reproduction
When import.meta.env has some invalid JSON value, such as __VITE_IS_LEGACY__ imported by @vitejs/plugin-legacy, Vite will replace the import.meta.env in import.meta.env.SOMEVAR_UNDEFINED to a plain object. Then the javascript file will be an invalid javascript file which will produce a error when handled by proceeding commonjs plugin.
The minimum reproducible set is here: https://stackblitz.com/edit/stackblitz-starters-xr8lwk?file=index.html
Reason
As previous description, vite:define plugin will replace import.meta.env.SOMEVAR_UNDEFINED to {"BASE_URL": "/", "MODE": "development", "DEV": true, "PROD": false, "SSR": false, "LEGACY": __VITE_IS_LEGACY__}.SOMEVAR_UNDEFINED.
The reason is, vite:define will replace the actual import.meta.env with a marker.
https://github.com/vitejs/vite/blob/167006e74751a66776f4f48316262449b19bf186/packages/vite/src/node/plugins/define.ts#L144-L148
The original value of import.meta.env is a object, while the marker is an identifier. The replace strategy of esbuild to handle this two type is different.

Replacement expressions other than arrays and objects are substituted inline, which means that they can participate in constant folding. Array and object replacement expressions are stored in a variable and then referenced using an identifier instead of being substituted inline, which avoids substituting repeated copies of the value but means that the values don't participate in constant folding.
--esbuild documentation

Consider the following example.
import.meta.env.SOMEVAR_UNDEFINED
import.meta.env.SOMEVAR_UNDEFINED

When import.meta.env is a identifier, esbuild will replace it in place.
_hashGeneratedByViteDefine_.SOMEVAR_UNDEFINED
_hashGeneratedByViteDefine_.SOMEVAR_UNDEFINED

After that, vite:define will replace the marker with the original import.meta.env
https://github.com/vitejs/vite/blob/167006e74751a66776f4f48316262449b19bf186/packages/vite/src/node/plugins/define.ts#L181-L183
{"BASE_URL": "/", "MODE": "development", "DEV": true, "PROD": false, "SSR": false, "LEGACY": __VITE_IS_LEGACY__}.SOMEVAR_UNDEFINED
{"BASE_URL": "/", "MODE": "development", "DEV": true, "PROD": false, "SSR": false, "LEGACY": __VITE_IS_LEGACY__}.SOMEVAR_UNDEFINED

Now it's a invalid javascript code.
Solution
Align the type of the original and marker.
I generate a marker which is a valid JSON, so that the replace strategy will be same.
Radical Solution
I found that the value of import.meta.env is spread in config.
{
  "loader": "js",
  "charset": "utf8",
  "platform": "neutral",
  "define": {
    "process.env": "{}",
    "global.process.env": "{}",
    "globalThis.process.env": "{}",
    "process.env.NODE_ENV": "\"production\"",
    "global.process.env.NODE_ENV": "\"production\"",
    "globalThis.process.env.NODE_ENV": "\"production\"",
    "import.meta.hot": "undefined",
    "import.meta.env.BASE_URL": "\"/\"",
    "import.meta.env.MODE": "\"production\"",
    "import.meta.env.DEV": "false",
    "import.meta.env.PROD": "true",
    "import.meta.env.SSR": "false",
    "import.meta.env.LEGACY": "__VITE_IS_LEGACY__",
    "import.meta.env": "_ecc578fd856ad0ab7198de04a00b9405c7a6d2549217f51adfff717ee9f7b851______________________________________________"
  },
  "sourcefile"<EMAIL_ADDRESS>  "sourcemap": false
}

And esbuild will replace it first.
Under this case, import.env.meta will be only be replace when the value of it is not defined. So why not leave a {} for import.meta.env just like process.env?
https://github.com/vitejs/vite/blob/167006e74751a66776f4f48316262449b19bf186/packages/vite/src/node/plugins/define.ts#L20-L27
But I couldn't aware the side effects the this solution, so that I choose to modify the generation of marker.

@bluwy Could you please take some time to review this pull request?

@bluwy I saw that you have viewed this PR. Is it worth merging? Are there any failures?

I have a few concerns with this trick.

It relies on the specific esbuild output, e.g. not adding/removing any spaces between the JSON object, quotes being removed, etc.
It makes the import.meta.env.SOMEVAR_UNDEFINED case where Vite should simply replace as undefined harder to fix. Before, we can probably use a regex for _hashGeneratedByViteDefine_.(.+?)\b to detect the env ahead of time. (related https://github.com/vitejs/vite/issues/17710)

Maybe we need a different approach to solve this. Perhaps we can simply replace import.meta.env as __vite_import_meta_env__ and append the const __vite_import_meta_env__ = ... manually ourselves? That way we can imitate esbuild's JSON object handling without a post-replacement. And we can build a regex with __vite_import_meta_env__.(.+?)\b to identify the unused env vars ahead of time.

Under this case, import.env.meta will be only be replace when the value of it is not defined. So why not leave a {} for import.meta.env just like process.env?

When the user does console.log(import.meta.env), it should log the entire object. It doesn't happen for process.env as it may contain sensitive information.

Ok, got it. I'll try to implement this.

@bluwy I have finished this. Now it will replace the undefined import.meta.env key using define, and will add the manual __vite_import_meta_env__ banner only when there is a bare import.meta.env.

@bluwy Now it replaces import.meta.env after replaceDefine. If it needs to generate sourcemap, it replaces using magic-string to generate ; if not, it replace using regex directly.
I think that there is no need to capture the key. If there still has any keys, the keys' suppose to be undefined in import.meta.env.

I think that there is no need to capture the key. If there still has any keys, the keys' supposed to be undefined in import.meta.env.

Good point, that's a nice optimization.

@bluwy Now it replaces import.meta.env after replaceDefine. If it needs to generate sourcemap, it replaces using magic-string to generate ; if not, it replace using regex directly.

I don't think we should do this because sourcemap handling is very expensive. I'll push some commits and test locally if we can apply the ; trick I mentioned above, which should be faster.

I don't think we should do this because sourcemap handling is very expensive. I'll push some commits and test locally if we can apply the ; trick I mentioned above, which should be faster.

It should replace the undefined key with undefined after replaceDefine. However, I have no idea about sourcemap for this (byt the way, I wasn't aware of sourcemap before), so I used magic-string. Under this premise, I use magic-string to prepend the banner. I think this is an uncommon situation, so a little expensive may be tolerated.

I pushed the commits to optimize the sourcemap handling. I agree that bare import.meta.env or unknown import.meta.env.* are rare, but I think since the refactor also simplifies the code, it's worth it for now. Once the tests pass, I'll run ecosystem-ci and it should be good to go.

/ecosystem-ci run

I saw that there are some ecosystem-ci fail. Is there anything I should do?

You can ignore them. The "latest scheduled" are the results from main, so this PR isn't causing those fails. I'm waiting for another review before merging this.

Okay. Thanks to everyone for reviewing this pr!

It seems that since this change, I'm running into Identifier "__vite_import_meta_env__" has already been declared errors during build when loading a library built that was also built with vite.

It seems that since this change, I'm running into Identifier "__vite_import_meta_env__" has already been declared errors during build when it's bundling a library built that was also built with vite.
What's also unexpected is that this __vite_import_meta_env__ variable is added to the JS output of the library even though it does not use import.meta.env at all.

Please provide a issue to describe the details.

I have a hard time creating a reproduction for this (and issues without reproduction would be rejected), but here is the current error:
error during build:
[commonjs--resolver] node_modules/lib/dist/index.js (3392:6): Identifier "__vite_import_meta_env__" has already been declared
file: node_modules/lib/dist/index.js:3392:6

3390: const create = (createState) => createState ? createImpl(createState) : createImpl;
3391: const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false };
3392: function createJSONStorage(getStorage, options2) {
            ^
3393:   let storage;
3394:   try {

    at getRollupError (/node_modules/vite/node_modules/rollup/dist/es/shared/parseAst.js:392:41)
    at error (/node_modules/vite/node_modules/rollup/dist/es/shared/parseAst.js:388:42)
    at Module.error (/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:13944:16)
    at ModuleScope.addDeclaration (/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:7362:21)
    at ModuleScope.addDeclaration (/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:12075:22)
    at Identifier.declare (/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:6960:39)
    at VariableDeclarator.declareDeclarator (/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:10661:17)
    at VariableDeclaration.initialise (/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:12343:24)
    at convertNode (/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:13167:10)
    at convertNodeList (/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:13177:34)

The compiled output of the lib has three such variables:
$ rg __vite_import_meta_env__ dist/index.js
3001:const __vite_import_meta_env__$2 = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false };
3020:    if ((__vite_import_meta_env__$2 ? "production" : void 0) !== "production") {
3357:const __vite_import_meta_env__$1 = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false };
3363:  if ((__vite_import_meta_env__$1 ? "production" : void 0) !== "production" && equalityFn && !didWarnAboutEqualityFn) {
3380:  if ((__vite_import_meta_env__$1 ? "production" : void 0) !== "production" && typeof createState !== "function") {
3391:const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false };
3709:    if ((__vite_import_meta_env__ ? "production" : void 0) !== "production") {

Is the library has error named lib? I saw that the file is node_modules/lib/dist/index.js.

I think one scenario this can happen is when library code (or its dependencies) include both import.meta.env and process.env
// lib/index.js
export const foo = () => {
  console.log(import.meta.env ? import.meta.env.MODE : undefined);
  console.log(process.env.TEST);
};

// ⇓ vite library build

// lib/dist/index.js
const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false };
const foo = () => {
  console.log(__vite_import_meta_env__ ? "production" : void 0);
  console.log(process.env.NODE_ENV);
};
export {
  foo
};

Then later in main app build, vite:define transforms lib/dist/index.js since it's left with process.env, which probably ends up detecting __vite_import_meta_env__ and injecting the banner __vite_import_meta_env__ again.

But is there any need to use bare import.meta.env in production output of a library?
There is no need to use conditional operation in your code. If you use vite to bundle it, it will replace import.meta.env.SOMETHING_UNDEFINED to undefined directly now or to a object including value of import.meta.env in the past version.

But is there any need to use bare import.meta.env in production output of a library?
There is no need to use conditional operation in your code. If you use vite to bundle it, it will replace import.meta.env.SOMETHING_UNDEFINED to undefined directly now or to a object including value of import.meta.env in the past version.

To clarify, this is not "my code" but just some examples in the wild. So the concern is that Vite library mode author might happen to use such dependencies (without externalized) and leave __vite_import_meta_env__ in their library output unnoticed. I think this is a rather edge case, but ideally this is desired to be handled more robustly somehow.
Another package I remembered which might causes an issue is unjs's std-env https://github.com/unjs/std-env/blob/b4ef16832baf4594ece7796a2c1805712fde70a3/src/env.ts. It uses a bare import.meta.env and process.env, so if library mode build has this dependency bundled, the same issue would probably happen.

Maybe we should create an issue to zustand because there is no need to replace import.meta.env?.MODE with (import.meta.env ? import.meta.env.MODE : undefined). esbuild can replace import.meta.env?.MODE to its value. For example:
import { transform } from 'esbuild'

const result = await transform(
  `console.log(import.meta.env?.MODE)`,
  {
    sourcemap: false,
    minify: true,
    target: ['chrome60'],
    define: {
      'import.meta.env.MODE': JSON.stringify('production'),
    },
  }
)

console.log(result.code)

It will ouput console.log("production");.

Yes, it is zustand as well in my case as well which uses import.meta.env in their original code. Apparently, their bundler transpiles import.meta.env?.MODE !== 'production' to process.env.NODE_ENV !== "production". So I have

app (uses import.meta.env) which imports lib
lib (does not use import.meta.env) which imports zustand
zustand which effectively uses process.env

Okay, I'll try to reproduce it and make a new pr.

I've created https://github.com/vitejs/vite/issues/17874 to track this, let's move the conversation over there


Type regression in 1.2.9

See https://github.com/eBay/nice-modal-react/pull/102#issuecomment-1477486976 for context.
Bubbling this up for visibility because the merged PR hasn't seen any activity. I still cannot upgrade nice-modal-react because of this breakage in types.

Hi @francislavoie , could you please give an example to reproduce?

Should be resolved in v1.2.11.

Unfortunately I still get a similar error:
TS2769: No overload matches this call.
  Overload 1 of 3, '(modal: FC<Props & NiceModalHocProps>, args?: Partial<Omit<Props & NiceModalHocProps, "id">> | undefined): Promise<...>', gave the following error.
    Argument of type '{ title: string; message: any; }' is not assignable to parameter of type 'Partial<Omit<Props & NiceModalHocProps, "id">>'.
      Object literal may only specify known properties, and 'title' does not exist in type 'Partial<Omit<Props & NiceModalHocProps, "id">>'.
  Overload 2 of 3, '(modal: string, args?: Record<string, unknown> | undefined): Promise<unknown>', gave the following error.
    Argument of type 'FC<Props & NiceModalHocProps>' is not assignable to parameter of type 'string'.
  Overload 3 of 3, '(modal: string, args: { title: string; message: any; }): Promise<unknown>', gave the following error.
    Argument of type 'FC<Props & NiceModalHocProps>' is not assignable to parameter of type 'string'.

For comparison, I would get this with v1.2.9:
TS2769: No overload matches this call.
   Overload 1 of 3, '(modal: FC<Props & NiceModalHocProps>, args?: Omit<Props & NiceModalHocProps, "id"> | undefined): Promise<...>', gave the following error.
    Argument of type '{ title: string; content: () => JSX.Element; cancelLabel: string; }' is not assignable to parameter of type 'Omit<Props & NiceModalHocProps, "id">'.
       Object literal may only specify known properties, and 'cancelLabel' does not exist in type 'Omit<Props & NiceModalHocProps, "id">'.
   Overload 2 of 3, '(modal: string, args?: Record<string, unknown> | undefined): Promise<unknown>', gave the following error.
     Argument of type 'FC<Props & NiceModalHocProps>' is not assignable to parameter of type 'string'.
   Overload 3 of 3, '(modal: string, args: { title: string; content: () => Element; cancelLabel: string; }): Promise<unknown>', gave the following error.
     Argument of type 'FC<Props & NiceModalHocProps>' is not assignable to parameter of type 'string'.

We typically call this:
import NiceModal from "@ebay/nice-modal-react";

...

try {
  // do stuff
} catch (e) {
  NiceModal.show(ErrorModal, {
    message: e.message,
  }).catch(console.error);
}

Where ErrorModal is a simple component like:
import React, { PropsWithRef } from "react";
import NiceModal, { useModal } from "@ebay/nice-modal-react";

type Props = {
  message: string;
  invoke?: () => void;
};

export const ErrorModal = NiceModal.create(({
  message,
  invoke,
}: PropsWithRef<Props>) => {
    const modal = useModal();

    const cancel = () => {
      if (invoke) invoke();
      modal.remove();
    };

    return (
      <div>
        {message}
      </div>
    );
  }
)

Oh okay - some of the errors I was seeing were now legitimate type errors that were not properly reported in earlier versions, but others I think are bugs.
I have one like this:
        const result = await NiceModal.show<EditMessageResponse>(EditMessage, {
          title: "Edit Message",
          otherProps: "foo",
        });

It gives me this error:
TS2345: Argument of type 'FC<Props & NiceModalHocProps>' is not assignable to parameter of type 'string'.

I think there's missing an overload that allows a component and a generic promise response. The only overloads with a generic/promise takes a string as the first arg.

Can you give a full example?

https://codesandbox.io/p/sandbox/floral-sun-qmrsgq?file=%2Fsrc%2FApp.tsx%3A24%2C16
Running npx tsc in the terminal shows the error.

Are there any updates on this issue? I am facing something similar issue with the modal.create typing in 1.2.11

@francislavoie for now NiceModa.show infers type of modal props and then constrains args type. So it now doesn't support a single generic type show<T>() because of limitation from: https://github.com/microsoft/TypeScript/issues/26242 .
Suggest using const result: EditMessageResponse = await NiceModal.show(EditMessage, {... instead.

@rimorin any detail or example about create typing issue?

btw, did some further typing improvement in v1.2.12.

Suggest using const result: EditMessageResponse = await NiceModal.show(EditMessage, {... instead.

Thanks, that makes sense :+1:
The problems are resolved for me now!

Thanks @supnate
I have followed your suggestion and it is working now.


Cannot install

There error message:

npm install ataft/plugin-image-zoom
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -4058
npm ERR! enoent An unknown git error occurred
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

Oops, the repository owner changed and the old link did not persist. Try the following:
npm install flexanalytics/plugin-image-zoom

npm install flexanalytics/plugin-image-zoom

I tried this too, but it had the same error:

npm install flexanalytics/plugin-image-zoom
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -4058
npm ERR! enoent An unknown git error occurred
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

Oh, I see, perhaps this is the same as issue #4 where Git client was not installed
Otherwise, perhaps this thread helps: https://stackoverflow.com/questions/49620780/cant-install-any-npm-package-error-4058
After that, I'm at a loss for what's going on. It appears to be a local problem, as this works fine for me and others

Oh, I see, perhaps this is the same as issue #4 where Git client was not installed
Otherwise, perhaps this thread helps: https://stackoverflow.com/questions/49620780/cant-install-any-npm-package-error-4058
After that, I'm at a loss for what's going on. It appears to be a local problem, as this works fine for me and others

Looks like neither of them were my problem.  I've installed git client, no other process are running.
I have installed many packages with npm, but only this one got the error.

Hmm, maybe this due to the install being from a github repository. I'll reopen the issue in case someone else runs into it and can help here.

I found the problem, I think this is because the git client I installed was not the right one.  After installing a version I downloaded from "https://git-scm.com/download/win", I was able to install it on my own machine.
However, it still couldn't work on Vercel.  I'm using Vercel to deploy my doc built with Docusaurus.  There error message is listed below:
19:03:08.920 | Build cache downloaded [90.05 MB]: 3246.323ms
19:03:09.562 | Detected package.json
19:03:09.562 | Installing dependencies...
19:03:09.802 | yarn install v1.22.17
19:03:09.876 | [1/4] Resolving packages...
19:03:10.520 | [2/4] Fetching packages...
19:03:23.988 | error Command failed.
19:03:23.988 | Exit code: 128
19:03:23.988 | Command: git
19:03:23.988 | Arguments: ls-remote --tags --heads<EMAIL_ADDRESS>19:03:23.988 | Directory: /vercel/path0
19:03:23.988 | Output:
19:03:23.989 | Host key verification failed.
19:03:23.989 | fatal: Could not read from remote repository.
19:03:23.989 |
19:03:23.989 | Please make sure you have the correct access rights
19:03:23.989 | and the repository exists.
19:03:23.990 | info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
19:03:24.435 | Error: Command "yarn install" exited with 128

Hmm, maybe github.com needs to be an authorized host in your vercel environment. Perhaps one of the following helps:

https://stackoverflow.com/a/29380765/5551593
https://stackoverflow.com/questions/15214977/cloning-git-repo-causes-error-host-key-verification-failed-fatal-the-remote/29380672#29380672

Looks like issue #6 is similar to your "Host key verification failed" issue. Closing this issue, let's move the dialogue over there.


Added formatting information to Detektion

This helps if any other tool that wants to use Detekt wants to control the formatting of the files or create patches.
I'm working on adding Detekt to the Linter of my company as mentioned in this other PR.
The next step for us is integrating it with our formatter.
To do that we need the new formatted content info before it is applied to the file. With that we create patches for the files and can then propose those changes in our CI tool.
My first idea to accomplish this is adding that info to Detektion.
This way I generate the desired patch output with a custom reporter.
Please do feel free to suggest alternatives.
I have verified and everything still runs fine on my end and all the tests pass.

Hey @hick209 , good to see your going on the limits on our extension model :)
I tried to mimic your needed feature via the current available extension classes:
class FormattingPrintReport : ConsoleReport() {

    override fun render(detektion: Detektion): String? = detektion.notifications
        .filterIsInstance<FormattingNotificationProvider.FormattingNotification>()
        .joinToString("\n\n") { it.content }

}

class FormattingNotificationProvider : FileProcessListener {

    data class FormattingNotification(val path: String, val content: String) : Notification {
        override val message: String = "Modification for KtFile '$path'."
    }

    override fun onFinish(files: List<KtFile>, result: Detektion) {
        files.filter { it.modificationStamp > 0 }
            .map { it.absolutePath() to it.unnormalizeContent() }
            .filter { it.first != null }
            .forEach { result.add(FormattingNotification(it.first!!, it.second)) }

    }

    private fun KtFile.unnormalizeContent(): String {
        val lineSeparator = getUserData(LINE_SEPARATOR)
        require(lineSeparator != null) {
            "No line separator entry for ktFile ${javaFileFacadeFqName.asString()}"
        }
        return StringUtilRt.convertLineSeparators(text, lineSeparator)
    }
}

val LINE_SEPARATOR: Key<String> = Key("lineSeparator")

Would this fulfill your requirements? I'm interessted in adding features to the extension mechanism so no modifying of the core modules are needed.
My proposed implementation however needs LINE_SEPARATOR and KtFile.unnormalizeContent to be moved from KtFileModifier to detekt-api/api/internal.

This does meet our needs! Thank you so for taking a look into this issue and proposing this solution.
I'll update my pull request on Monday so I has the necessary changes do use this processor, if necessary otherwise I'll just drop those changes.
Once again, thanks for taking the time to show me how to accomplish this with the current tools.

Things to be moved from core to api module:

LINE_SEPARATOR
KtFile.unnormalizeContent
KtFile.absolutePath

This could work, but it looks like plenty of changes would be necessary, since there's a lot of code from inside the core module that would need to be exposed in order to make this work.
Do you think I should go ahead and make those changes?

Tested the changes locally here and I can do it importing detekt-core and org.jetbrains.kotlin:kotlin-compiler-embeddable as a dependency to my project.
I think it would be good not to need to add the second one, so I'm going to create a PR to reflect a change that would be necessary for such. 🙂


Could not render map: CodeSandbox works fine but having issue in the localhost

Map does not get render
Code used in the project
function MyMapComponent({ center, zoom }) {
  const ref = useRef(null);
  const [map, setMap] = useState();

  useEffect(() => {
    console.log("this got called", ref.current);
    if (ref.current && !map) {
      setMap(
        new window.google.maps.Map(ref.current, {
          center,
          zoom
        })
      );
    }
  }, [ref, map, center, zoom]);

  return
;
}

const render = (status) => {
  if (status === "LOADING") {
    console.log("Loading...");
    return
{status} ..
;
  }
  if (status === "FAILURE") {
    console.log("Failing...");
    return
{status} ...
;
  }
  if (status === "SUCCESS") {
    console.log("Suceding...");
    return
Success
;
  }
  return null;
};

export default function App() {
  const center = { lat: -25.363, lng: 131.044 };
  const zoom = 4;
  return (

      <Wrapper apiKey="MY_KEY" render={render}>
        <MyMapComponent center={center} zoom={zoom} />
      </Wrapper>

  );
}

This code works perfectly fine in the code sandbox but when I try to render it in my localhost it does not work. I got the empty screen first without passing the render prop, then I looked at the code of the library and passed the render prop. When I passed the render prop the status that I am getting is loading and accordingly, the Loading... status gets rendered on the page(image below). I can see in the library code, that in order to render the children component passed, it should have the status Success.

I am just copying and pasting the same code from the code sandbox where it is working. In my localhost, it seems the useEffect does not get called at all and does not instantiate the map.
How can I solve this? I have tried a lot of things but with no success.
Note: We are using SSR in the codebase. I thought this might be the issue and tried to render the App component once it gets mounted, but it did not work as well.  Any idea would be really helpful.
Also, whenever I make a request to Google Maps API from the code sandbox I can see the request being made but not from my localhost. Here is the screenshot of that:

Are you seeing any errors in the console?

Are you seeing any errors in the console?

No, I did not. Btw, I have solved this problem. It was not because of the maps, it was because of some webpack configuration that I missed. Thanks for the reply.

Are you seeing any errors in the console?

No, I did not. Btw, I have solved this problem. It was not because of the maps, it was because of some webpack configuration that I missed. Thanks for the reply.

What webpack configuration did you miss?

Are you seeing any errors in the console?

No, I did not. Btw, I have solved this problem. It was not because of the maps, it was because of some webpack configuration that I missed. Thanks for the reply.

What webpack configuration did you miss?

I was missing to include the hydrated frontend file, in the entry configuration of client-side scripts in webpack configuration.
entry : { product : ['.src/client/ProductFrontEnd.jsx']} something like this and this file was hydrating the SSR rendered ccontent.


Private fields of KzgDecider get in the way of implementing new loaders

Hi!
I ran into an issue trying to implement my own loader for Plonk with Kzg10. I was trying to impl<M, MOS> AccumulationDecider<M::G1Affine, MyOwnLoader> for KzgAs<M, MOS> analogously to
https://github.com/privacy-scaling-explorations/snark-verifier/blob/fedd7a8ffa44082c20a63e101484e0991ee7cce0/snark-verifier/src/pcs/kzg/decider.rs#L58
The problem is that the fields of KzgDecidingKey are private and AccumulationDecider implementations defined outside of snark-verifier can't use them:
https://github.com/privacy-scaling-explorations/snark-verifier/blob/fedd7a8ffa44082c20a63e101484e0991ee7cce0/snark-verifier/src/pcs/kzg/decider.rs#L6-L13
I'm guessing that this wasn't the intention, and I thought it can make the API more convenient to use if we exposed g2 and s_g2 to external AccumulationDecider implementations, so they could do something like this:
https://github.com/privacy-scaling-explorations/snark-verifier/blob/fedd7a8ffa44082c20a63e101484e0991ee7cce0/snark-verifier/src/pcs/kzg/decider.rs#L70
Would you be willing to accept a PR for this? If so, which way of exposing the fields would you find most appropriate (making field pub, writing a getter method, an Into instance, etc.)?
Ivan

Hi, the use case sounds totally reasonable, feel free to open a PR to expose that!


Adding support for CRAM

This is a suggestion. To add feature to support CRAM formats.

I had done a Parliament2 test run for 1 sample in CRAM format through the docker.  CRAM format was taken as a input.


chore(deps): update common-dev-assets digest to 67f3ce5

This PR contains the following updates:

Package
Update
Change

common-dev-assets
digest
3d44f8a -> 67f3ce5

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

/run pipeline

:tada: This PR is included in version 1.0.2 :tada:
The release is available on:

GitHub release
v1.0.2

Your semantic-release bot :package::rocket:


ATOS token update

official website: https://atoshi.org/
official micro-blog :https://weibo.com/u/7404867544
Founder Tweet: https://twitter.com/liaodoer
etherscan : https://etherscan.io/token/0x4d0528598f916fd1d8dc80e5f54a8feedcfd4b18#tokenInfo
Information Profile: Atoshi and Atos Introduction: ATOSHI plans to build a better next-generation public chain and innovate to a certain extent on the basis of outstanding projects such as Bitcoin and Ethereum, enhance their advantages, improve their shortcomings. Atoshi testnet has been running smoothly for 2 years, can support smart contracts, and has issued many NFTs on Atoshi testnet. ATOSHI have nearly 12 million users, and daily app launched times has exceeded 9.6 million. It has been radiated to Hong Kong, Macau, Taiwan, Malaysia, Singapore, Indonesia, as well as the Middle East, Europe, America, Africa, Oceania and other countries and regions through users in mainland China. Atoshi coin (ATOS) is widely used in a series of APPs such as e-commerce, Detok short video, Atoshi games, Atoshi Life, Atoshi Greetings, Atoshikey, Atoshi AI, etc. Atoshi aims to become” Future World Coin” and create a better cryptocurrency for the world, to realize the "denationalization of money" theory of Nobel Prize winner Friedrich Hayek. Through blockchain technology, we can solve financial inequality, and allow users to conduct global payments in seconds at low cost and empower the world.

Hey, I would have one more suggestion - your SVG file has over 40kB where a logotype like that should fit even <5kB. Can you optimize it?

@MRabenda The new icon has been uploaded, please have a look, thank you

@MRabenda  Hello


Implementing "Learn More About Mammotome® Markers" Form

Another form found in https://www.mammotome.com/products/breast-biopsy-markers/?utm_source=website&utm_content=contact_us_purple_background#miniform with title Learn More About Mammotome® Markers

Since we already have Fieldsets in Form Block, for this form the Fields can be added in 3 fieldsets. Add layout as a separate form configuration (in word) with value wizard that makes the form block render only 1 fieldset at a time, and next/previous buttons.


update wechaty-puppet-wechat to the latest

I'm submitting a update to let the wechaty-puppet-wechat keep latest，and all wechat user can use wechaty-puppet-wechat login in with the ding-dong-bot.ts demo.
[ ] Bug Fix
[ ] Feature
[ -] Other (Refactoring, Added tests, Documentation, ...)

Checklist

[ ] Commit Messages follow the Conventional Commits pattern

A feature commit message is prefixed "feat:"
A bugfix commit message is prefixed "fix:"

[ ] Tests for the changes have been added

Description
please describe the changes that you are making
for features, please describe how to use the new feature
please include a reference to an existing issue, if applicable
Does this PR introduce a breaking change?
[ ] Yes
[- ] No

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.:white_check_mark: choogoo:x: atorberatorber seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Managed CockroachDB Docs

Docs for 3/18 - Console in limited availability.
Changes / additions include:

How to sign up
How to connect to your cluster
How to use the Console
Some FAQs
SQL user management
Cluster management

Closes #3979, #4200.

This change is

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/36fb8535525bb2297481e66d89732869159dc38d/

@jseldess @kannanlakshmi @Amruta-Ranade - Apologies for the last minute reviews, but if you can review by EOD tomorrow, that would be great. I'm trying to get this reviewed and merged by Monday.

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/1495a672f4b24381686fe54f917a816edaa504fd/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/b2ed0a046b21684e346cea19ada82052ca5019cc/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/4e575fa1400e1d01a317df07d23cf7a40ba33616/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/e9776c87337f0db5dd83781b6a751c6143d690be/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/9933efd98f9014ad4796b3cc5a310f1eaa790931/

@kannanlakshmi @vilterp - updated docs based on the UI changes + added screenshots. Still waiting to take screenshots of the Clusters page (all clusters) and Cluster Overview page. These screenshots are non-blocking, so this PR could be merged and those screenshots can be added once the screens are updated.
You can view the most up to date changes here: http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/9933efd98f9014ad4796b3cc5a310f1eaa790931/managed/dev/managed-sign-up-for-a-cluster.html

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/eed5d6da1f88a5c5fd02d1d13a2d04ca5ac35330/

Hey @lhirata
Apologies for missing this on Friday.
In the Sign up for managed cluster page, can you remove the first sentence "The Managed CockroachDB offering is currently in Limited Availability and accepting customers on a qualified basis."
Let's also remove "To be considered for participation:" since there is no waitlist of any sort now.
Cockroach Labs will consider your use case and follow up with you within 1 business day --> to just "Cockroach Labs will follow up with you within 1 business day"
Since this page didn't change, I missed it earlier.
The rest of it all looks great, thanks again for getting all of this done before 3/18!

@jseldess can I get a LGTM from you, if it looks good? Two more screenshots can be added after this PR is merged. I don't want them to hold up the other content

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/80dc2310c3f155982ed62581833d2b9d4bc036a3/

Thanks @jseldess. I only see one v2.1 managed-sign-up-for-a-cluster. Was there something else you wanted to point out? Your comment wasn't complete

Merging now, will open a new PR for screenshots and any other fine-tuning


update 2E2 tests based on upgrade DELETE project endpoint

Description
The endpoint to delete projects now requires all environments to be deleted within. I added a delete to each section, and thus removed the case specific to deleting an environment.
Ran the oss tests to make sure they were also working.

Processing this pull request

Processing #5963.


[BXMSPROD-1929] Centralize composite github actions

Thank you for submitting this pull request
JIRA:
https://issues.redhat.com/browse/BXMSPROD-1929
referenced Pull Requests:
Centralize composite GitHub actions here, merging those from droolsjbpm-build-bootstrap and kogito-pipelines.
Differences from the original ones:

build-chain:

removed default definition-file as it depends on the final project structure, there is no default - this must be provided by any workflow using this action

maven:

made Setup Maven Settings optional since it is not needed in droolsjbpm-build-boostrap related projects, they will have to explicitly set setup-maven-settings to "false".

dsl-tests:

added new input seed-repository which defaults to kiegroup/kogito-pipelines but can be overridden to make the action much more generic.

How to retest a PR or trigger a specific build:

* a pull request please add comment: Jenkins retest this

For the dsl-tests, I would migrate it once and only if we decide to migrate the seed library of kogito-pipelines to here ... So that could be done later IMO
I put a point in my presentation tomorrow to discuss about this :)

For the dsl-tests, I would migrate it once and only if we decide to migrate the seed library of kogito-pipelines to here ... So that could be done later IMO I put a point in my presentation tomorrow to discuss about this :)

It makes sense, in this case I would remove it from this PR and as you said add it at later time when really needed (if so)

As agreed I replicated changes performed here https://issues.redhat.com/browse/BXMSPROD-1937 and I removed dsl-tests just for now.

I propagated the change just merged here https://github.com/kiegroup/droolsjbpm-build-bootstrap/pull/2175, if you agree I would merge this one and make some other improvements (if needed) in separated PRs.

sure, i waited for @Ginxo approval, but i guess it is just formal thing now ;)


Trusted Client Incompatible issue, tried different streamer ALVR versions but no success

Great job and I'm almost there.
Error message '...Ecpected protocol ID: 1686...7063, found 7466...5457'
Tried different versions (20.4, 20.5, 20.6., 21.0.0). No success.

Fixed by itself, have no idea why it works now..

I have the same problem so please open back this issue, cf

using the latest AppImage so ALVR v20.6.1.

Reopen on request. Version 21.0.0 nightly does work here. As I wrote had the issue before but now is working.

I thiiiiink I've more or less resolved this with the new UI, which shows the client's version and protocol version. In the future if the client breaks protocol version I plan on showing a little "What's New?" dialogue box thing so that there's at least some kind of noticable indication that the streamer needs updating


B 21437 int

B-21437
Summary
For office users reviewing Orders, there has been a false assumption that options listed for department indicator will match up to our backend models for service member affiliation. This backlog attempts to remedy this false assumption by introducing an API enum and backend type for DepartmentIndicator.
By doing so, it resolves the API Validation errors causing issues for orders that have department indicators of Army Corps of Engineers or Department of Secretary of Defense, as they have no corresponding backend affiliation. Additionally, it allows us to remove the coupled "Navy and Marines" as well as "Air Force and Space Force" affiliation definitions that do not have true affiliation values.
Additionally, this change does so while not changing the LOA lookup mechanics, as the affiliation/department indicator is only used to filter things for Coast Guard orders.
Verification Steps for the Author
These are to be checked by the author.

[x] Have the Agility acceptance criteria been met for this change?

Verification Steps for Reviewers
These are to be checked by a reviewer.

[ ] Has the branch been pulled in and checked out?
[ ] Have the BL acceptance criteria been met for this change?
[ ] Was the CircleCI build successful?
[ ] Has the code been reviewed from a standards and best practices point of view?

How to test

Access the
Login as a

Backend

[ ] Code follows the guidelines for Logging.
[ ] The requirements listed in Querying the Database Safely have been satisfied.

Screenshots

Warnings

:warning:
This PR does not include changes to unit tests, even though it affects app code.

  Generated by :no_entry_sign: dangerJS against 781ad089a05431af00853e98e47614e60e5e4339

Warnings
⚠	This PR does not include changes to unit tests, even though it affects app code.
Generated by 🚫 dangerJS against 781ad08

I believe this is responding to the frontend components. No changes to tests were required as far as I understand becauseall of the variable names were already correctly set to departmentIndicator for the frontend components. That's what they already had, the only things that required changing were api submission variable names.


⚠ Bofrost.be has degraded performance

In 4632038, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 2170 ms

Resolved: Bofrost.be performance has improved in 229b338.


Implicit casting support for numerics and switch to argument type as return for floor/ceiling

floor and ceiling should not return int or long as that could lead to precision loss when extracting that value. Imagine if one of the two functions used int, then a query like this select ceiling(2147483647.1) (note that<PHONE_NUMBER> is the maximum integer value) would lead to an overflow error or precision loss as the correct return value is<PHONE_NUMBER>.
On top of that, this PR enables "implicit casting" between numerics for the purpose of extraction from a JDBC result set. It should be possible to extract an int out of e.g. double if known to be compatible with int like it would be the case for certain floor/ceiling invocations, like in org.hibernate.dialect.function.ExtractFunction#extractWeek.

This looks good to me.

This looks good to me.


Doesn't install using Yarn

I tried to install this with Yarn using:
yarn add trpc-rtk-query@https://github.com/otahontas/trpc-rtk-query.git
But I get this...
Error: trpc-rtk-query@https://github.com/otahontas/trpc-rtk-query.git#commit=1b9aff8a7d5cb3888c726581bedc522a9d5feafb: Assertion failed: Unsupported workflow

Since this wasn't reproducible, I'm closing the issue. Please feel free to open this one again @jonathanrgreene if there are more unexpected issues when using this library with yarn.


How can I just run this thing on a string?

This library looks useful, but I just have some Python code in a string. How can I just run this tool on that code and get back the results? Specifically I'd like to just get back the list of "Failure" objects that the main code seems to produce.

In the mean time, for anyone else, this more-or-less works:
from pyanalyze.error_code import ErrorCode
from pyanalyze.checker import Checker
from pyanalyze.name_check_visitor import NameCheckVisitor
import ast

code = """print(a)"""
tree = ast.parse(code)

visitor = NameCheckVisitor("x.py", code, tree, checker=Checker())
visitor.check()
failures = visitor.all_failures

for failure in failures:
    print(failure)

You have to make a dummy x.py file in the same directory with nothing in it, and the script will put output in stderr which can be kind of annoying, but you do get the information back.

In the mean time, for anyone else, this more-or-less works:
from pyanalyze.checker import Checker
from pyanalyze.name_check_visitor import NameCheckVisitor
import ast

code = """print(a)"""
tree = ast.parse(code)

visitor = NameCheckVisitor("x.py", code, tree, checker=Checker())
visitor.check()
failures = visitor.all_failures

for failure in failures:
    print(failure)

You have to make a dummy x.py file in the same directory with nothing in it, and the script will put output in stderr which can be kind of annoying, but you do get the information back.

I was thinking to propose a similar solution but already found this one!


Add support for showing the bell tapped analytics events

Allow us to differentiate between push / taps WRT the bell.

Done

Ace. Merging on green.

Failure was danger, I should start finding a way to deal with that properly, for now, this is :+1:


⚠ GitLab Server has degraded performance

In 7cd63ca, GitLab Server (https://gitlab01.its-telekom.eu) experienced degraded performance:

HTTP code: 200
Response time: 11047 ms

Resolved: GitLab Server performance has improved in 4e71a10.


FilePicker : Xamarin.Essentials.PermissionException: StorageRead permission was not granted: Denied for Android 13

[Enter feedback here]

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

ID: bde8b00e-bef2-d10c-268f-2e49e236a89f
Version Independent ID: dad8b07c-2227-c7ed-6369-d10d9b132e99
Content: Xamarin.Essentials: File Picker - Xamarin
Content Source: docs/essentials/file-picker.md
Product: xamarin
Technology: xamarin-essentials
GitHub Login: @jamesmontemagno
Microsoft Alias: jamont

Microsoft support for Xamarin will end on May 1, 2024 for all Xamarin SDKs including Xamarin.Forms. In preparation for this, all issues and PRs in this repository are being closed.
.NET MAUI is the replacement for Xamarin.Forms, and it's documentation can be found here.


revert the 118n fallbacks change

This change can be reverted. I'd rather put it back to true for the sake of consistency.
See https://github.com/ManageIQ/manageiq-schema/pull/535#issuecomment-726170179

@himdel can you review since https://github.com/ManageIQ/manageiq-schema/pull/535#issuecomment-726170179 references: https://github.com/ManageIQ/manageiq/pull/18281

Ahh, rails added a workaround in https://github.com/rails/rails/pull/33574, which will make true work the same way.
So it's only a problem in rails < 5.2.2, we're on 5.2.4+, LGTM :+1:


Incorrect layout generated for notebook containing nested sizers

I was updating an old interface which consists of a dialog containing a notebook, which contains 3 nested sizers each of which holds a BitmapButton, 3 StaticTexts and 3 SpinCtrls.
The layout looks OK in the design window.
In the preview window and on running the code, the BitmapButtons are located the correct sizers, but all the groups of StaticTexts and SpinCtrls appear to be on the notebook pane itself.
I notice in the generated code, the BitmapButtons have the return value from a call to their sizer's GetStaticBox() method as their parent.
However, the StaticTexts and SpinCtrls are all passed self.colour_pane as their parent.
I have created a cut down example which demonstrates the issue and put its files in the attached zip file:
notebook_nested_sizers.zip
I am using wxGlade 1.1.0b1 (from the master branch) with Python 3.12.3 and wxPython 4.2.1 on Linux Mint 22.

Thanks for reporting. I can probably look into this next week.

This is probably the minimum sample to reproduce the issue:
nested_sizers_min_1.wxg.txt
This is the point where the code generation is wrong (for Python), as it check only the direct parent for being a StaticBoxSizer:
        elif self.codegen.for_version[0]>=3 and obj.sizer and obj.sizer.WX_CLASS=="wxStaticBoxSizer":
            sizer_access = self.format_widget_access(obj.sizer)
            self.tmpl_dict['parent'] = '%s.GetStaticBox()' % sizer_access

The fix will require to keep a reference to ...GetStaticBox()) also deeper in the hierarchy when the direct parent is a different sizer.

It should be fixed now in the repository.

I downloaded the latest version from master branch and used it to open both the original notebook_nested_sizers.wxg file I posted and the nested_sizers_min_1.wxg that you posted.
In both cases the controls that should be in the inner sizers are still appearing on the panel when viewed in the Preview window.
When I compare the generated python code for my example, it is identical to what I had before, apart from the timestamp in line 4.

I notice there is a new method get_parent_window2() in edit_base.py, but I can't find anywhere that calls it?

Oh, yes, sorry. I missed to add the changed lines in wcodegen to the commit. Too many files in the working directory...

Confirmed, all my tests are working now.
Thank you.


Fix schema generation

This PR is a fix for #12
What I've done is remove stream.print, this works perfect in my app.
I'm missing something? @kamipo
Rails Version: 4.0.13
Ruby Version: 2.1.5
Mysql2 gem: 0.3.20

Please take a look test failure?
https://travis-ci.org/kamipo/activerecord-mysql-awesome/jobs/219623429

@kamipo yes, I saw test failures, but I don't know why it works with my app removing those lines. Have you experienced something similiar?

As shown in the test failure, these lines are necessary in my app at least.


JNKS-287: cannot use specific image refs with okd; quay.io prunes too often

long term if we need this for okd we'll push permanent tags to quay.io/redhat-developer

/assign @coreydaley
/assign @akram

/label qe-approved
no impact

/label docs-approved
no impact

/lgtm


⚠ Bofrost.be has degraded performance

In 2c5cb47, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 1534 ms

Resolved: Bofrost.be performance has improved in 6136f4b after 6 minutes.


Not calling change on widgets after content has been injected

This can cause CM to incorrectly track cursor position until the document is changed.

I'd like to work on this, where would the code to fix this be found? I was thinking possibly in https://github.com/witheve/Eve/blob/release/src/ide.ts#L902-L946? Also, how would I go about refreshing 'the widgets'?
Is there a resource (developer documentation?) that I can look for this kind of info?
Thanks!


[Extension] add remote config

Signed-off-by: Bariq<EMAIL_ADDRESS>Description
This PR fixes #
Notes for Reviewers
Signed commits

[ ] Yes, I signed my commits.

https://github.com/layer5labs/meshery-extensions/pull/463

Codecov Report

Merging #4643 (97a275a) into master (eb74e07) will decrease coverage by 0.07%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4643      +/-   ##
==========================================
- Coverage   33.05%   32.97%   -0.08%
==========================================
  Files          60       60
  Lines        5086     5082       -4
==========================================
- Hits         1681     1676       -5
- Misses       2964     2967       +3
+ Partials      441      439       -2

Flag
Coverage Δ

gointegrationtests
9.54% <ø> (-0.10%)
:arrow_down:

unittests
25.97% <ø> (+0.04%)
:arrow_up:

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

Impacted Files
Coverage Δ

mesheryctl/internal/cli/root/system/stop.go
25.00% <0.00%> (-3.45%)
:arrow_down:

mesheryctl/pkg/utils/helpers.go
64.70% <0.00%> (ø)

Continue to review full report at Codecov.

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


Lazy Logging With Lambda Expressions

Refactor the code using this way to improve the readability of the classes:
From:
if (logger.isTraceEnabled()) {
    logger.trace("Number is {}", getRandomNumer());
}

To:
logger.trace("Number is {}", () -> getRandomNumber());

Reference:
https://www.baeldung.com/log4j-2-lazy-logging
https://stackoverflow.com/questions/41255503/lambda-support-for-slf4j-api

It is necessary to review if SL4J supports that feature included in Log4j

http://www.slf4j.org/manual.html#fluent

http://www.slf4j.org/manual.html#fluent

// using fluent API, log message with arguments
logger.atDebug().log("Temperature set to {}. Old temperature was {}.", newT, oldT);

// using fluent API, log message with arguments
logger.atDebug().log("Temperature set to {}. Old temperature was {}.", newT, oldT);

https://mvnrepository.com/artifact/org.slf4j/slf4j-api/2.0.0-alpha1
https://mvnrepository.com/artifact/org.slf4j/slf4j-simple/2.0.0-alpha1
https://mvnrepository.com/artifact/ch.qos.logback/logback-classic/1.3.0-alpha5

https://mvnrepository.com/artifact/org.slf4j/slf4j-api/2.0.0-alpha1
https://mvnrepository.com/artifact/org.slf4j/slf4j-simple/2.0.0-alpha1
https://mvnrepository.com/artifact/ch.qos.logback/logback-classic/1.3.0-alpha5

How to tests log messages?
https://stackoverflow.com/questions/1827677/how-to-do-a-junit-assert-on-a-message-in-a-logger

How to tests log messages?
https://stackoverflow.com/questions/1827677/how-to-do-a-junit-assert-on-a-message-in-a-logger

Lack of time


Update moderation with audit log support

need to pr discordgo with x-auditlog-reason support i believe

waiting on https://github.com/bwmarrin/discordgo/pull/399


Technical Debt in StartRecording file

There is an unused field in the StartRecording file which affects the performance and below is the screenshot of the issue.

Technical information

Device: [e.g. Nexus 7 (2013)]
OS: [e.g. LineageOS 15.1]
OpenTracks version: [e.g. v3.2.4]
OpenTracks commit id (only for nightly builds): [e.g. 4b333bb]

Removed unused field TAG from the file and code is running fine without any issues.


Update managers role to allow read-only access to all data

Before we get around to sorting out a proper fine-grained permissions model, we should update the manager role to allow read-only access to all deployment data, as well as write access for starting materials and equipment by default. This would allow groups that want to operate openly internally to promote everyone to managers without needing to give everyone admin access. In the future this would become a configurable default permissions policy global to the deployment instead.

This would be a wonderful stop-gap for our use case, in lieu of "adding" people to samples & collections.


Implement UMD support

Hi,
IFCJs/Components it generates only ESM output. It could be good to create a "Rollup" configuration to implement UMD support.

Hey @jespa007 nice idea! We are aware of the need to execute this in Node.js backends. We have made some tests and adapting this repository to backend might be a bit challenging, and the end result might not be ideal. That's why we have decided to create a new repository called "backend components" (not definitive name) to contain all the functions and logic needed for a backend, including fragment conversion, database, etc. It will also be MIT licensed. It requires more work from our side, but making something specific for backend will probably allow us to go much further. What do you think?

Hi @agviegas .
From my point of view, you have already a well done IFC-Viewer so it's great. For do not mix it up, viewer-backend I would create another repository for exclusively backend_components (for example) that it could be used as an API to perform big processes like generate fragments. IFC.js is already ported in Node.js so I think there's no much more effort that start implementing the backend ;-)


[FancyZones] Allow window to be "locked" in place

Summary of the new feature/enhancement
I am always accidentally moving or resizing my zoned windows, especially edge when i go to click on a tab.  It would be nice if we could "lock" these windows into their zone to protect against accidental nudging.  Either have the window snap back to it's original position, ~allow it to be "maximized" into the zone so it won't accidentally move, or just prevent movement.~  There could be a hotkey to override this behavior to intentionally move a "locked" window.
This should clearly be an optional setting, as i can see now it might annoy some people, or confuse people that are new to the product.

The option to be able to maximize a window is a zone is tracked by https://github.com/microsoft/PowerToys/issues/279

Tracking this idea in https://github.com/microsoft/PowerToys/issues/6611

Tracking this idea in https://github.com/microsoft/PowerToys/issues/6611


CONSIDER adding a target for net461 — why?

> Using .NET Standard 2.0 from .NET Framework has some issues that were addressed in .NET Framework 4.7.2.
Could you please elaborate more on this? Which issues? What exactly are we solving by targeting net461 in addition to just netstandard2.0?

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

ID: 5b3638c9-ea3c-1c9e-2763-5c3e8e965663
Version Independent ID: aff99d6b-9471-9277-160b-670ee8028b53
Content: Cross-platform targeting for .NET libraries
Content Source: docs/standard/library-guidance/cross-platform-targeting.md
Product: dotnet
GitHub Login: @JamesNK
Microsoft Alias: mairaw

@terrajobst Do you know of a blog post or article that discusses the issues netstandard2.0 has with net461? I'll add a link to it in the docs.

Not yet :-(

I thought .NET 4.7.1 fully implemented .NET Standard 2.0... if this is not the case then more detail should definitely be provided about what the problem is


Allow deletion from file view history

The Issue
Files that are streamed end up in file list and cannot be removed currently. The Library section should should both streamed content (history) and downloaded/offline. There should be an easy way to delete one or multiple streams from Library.
On the desktop app, we have a multi-select/clear option for history.
System Configuration

Device:
Android version:

Anything Else

Screenshots

Internal Use
Acceptance Criteria

Definition of Done

[ ]  Tested against acceptance criteria
[ ] Tested against the assumptions of the user story
[ ] The project builds without errors
[ ] Unit tests are written and passing
[ ] Tests on devices/browsers listed in the issue have passed
[ ] QA performed & issues resolved
[ ] Refactoring completed
[ ] Any configuration or build changes documented
[ ] Documentation updated
[ ] Peer Code Review performed

@tzarebczan can you pick either this or #309 and close the other?


Make sure the service_principal parameters are transformed by jinja

vars passed to ansible.aks are not tranformed prior to passing to azure_rm.
For example:
vars:
  app_id: "myid"

include_role:
  name: ansible.aks
vars:
    service_principal: "{{ app_id }}"

Using -vvv I can see the client_id is passed to azure_rm as {{ app_id }} and not myid as I would expect.
I've only included changes for sp in this PR so far. If you are happy with the changes I'll update the other parameter files which are affected in the same way.

@craigminihan Hi. Thanks for the contribution. I need a little bit time to do some test for the PR.


Current release of rulma does not include es/src files

Current release of rulma 0.0.1 does not include any files :(

I guess this is because the 0.0.1 version was published with Yarn https://github.com/yarnpkg/yarn/issues/2851

This is now fixed. The new version was published with NPM, so this is working now.


Change net library to limit based on size rather than message count.

This doesn't really stop a net message over 10kB being sent. For example someone could send a 30kB message and then have to wait 2 seconds for instance.data.net.burst to get above 0 again. Not sure if this is what you intended or not.

I thought about making it work that way. Not sure if I should or not. Plus how would you cancel a net message? Just don't send it?


How to trim columns with empty headers

The user is uploading a template of an excel doc that they convert to a CSV into my web app and I display it in a data table. The template has some random cells filled out waaaaaaaaaaaaaaaaaaaay out to column cs through cv that have nothing to do with the template. Is there a way to possibly check for an empty header and ignore it? I have no idea how to use the parser.
Thanks

You can customize the way the parser interprets the data using custom hooks.
Check out this onParseEntry example.
To summarize, you can inject your own custom parser function that checks the state variable so it knows which column is currently being parsed and returns false if you don't want it included in the output.


040 - Procure-to-Pay

Thank you for your feedback on the data elements. We will consider your feedback as we continually assess how we can improve data definitions.
This is the place to leave your feedback and questions about the following data elements:
• GoodsAndServicesAcceptanceDate
• PaymentTermsText
• CurrentValueOfFundsRate
• DeliveryDate
• InvoiceReceiptDate
• AdditionalPenaltyPaymentAmount
• LateInterestPenaltyPaymentAmount
• AcceleratedPaymentIndicator
• OfferedDiscountRate
• DiscountDate
• DiscountTakenAmount
Also, after reviewing these elements and the selected DAIMS and Fiscal Service Data Registry elements, if you believe that there are data elements that have been excluded from this end-to-end business process, please comment here as well.
The feedback period for these elements closes on 2/16/2018.

Two of the 27 data elements (i.e., DeliveryDate, GoodsAndServicesAcceptanceDate) conflict with the standard ASNI EDI 856 approach that G-Invoicing is taking for Performance related transactions. The EDI standards call for two data elements (Date and Date Qualifier) to report the same information. For example, Delivery Date would be supplied as a date, accompanied by DateTimeQualifier of ‘Delivery’. The same would work for Acceptance Date with the DateTimeQualifier being ‘Acceptance’. Following this industry standard allows us to capture additional dates (e.g., Estimated Delivery, Receipt) without adding additional data elements for each performance step. (There are hundreds of DateTimeQualifiers established for the EDI 856 transaction). G-Invoicing has proposed to the agency community (via the Intragovernmental Transaction Working Group) that we use the terms PerformanceDate instead of Date and TransactionType instead of DateTimeQualifier to make these two data elements more clear, but the application remains of the two the same.

I am an Accountant within the P2P domain, so i will be addressing these elements only.  Most of these Procure to Pay elements are already captured within our Oracle application, but there are a few that would have to be addressed by the Oracle Federal Development team. In general I agree these are FM related elements and should be standard across government.  There are a few other things im not sure should be addressed here or will be pulled in a later phase.

Most of the Procure to Pay elements added are from PPA. There are payments that fall outside of scope of Prompt Pay, so I dont know if there should be an indicator flag of somesort at the transactional level to capture if all these other are applicable or not.
Also alot of these PPA data elements also relate very similarly to FAR elements. Are contract line item, ship to locations, period of performance/service dates, etc going to be tied into this at somepoint? There is a FAR case out there right now to standardize CLINs so just thought I would bring it up as food for thought.

FAR, PPA, and SAM.GOV all interlock in their language/references and with most of these being previously addressed via DATA Act.

What is the difference between this new data element, Delivery Date and the Received date ? Are you trying to distinguish between the date an agency receives a delivery at its Receiving Dock versus the date that the Program Manager actually receives the goods delivered, which may be at a later date.

Good Afternoon,
Good question. The date/time field being proposed could represent almost anything, including delivery, receipt or any of the 1112 other date/time qualifiers for the EDI 856 transaction. Instead of associating several different dates to a single transaction (e.g., an order or invoice), the concept behind the EDI 856 is to allow a separate transaction to be reported for any procurement of fulfillment event related to that same order or invoice. It’s a different (more flexible) way to report the same information, one not requiring any data element changes, as long as the need is contained within the 1114 possibilities already supported by the EDI 856.
Wes Vincent, Accountant
Bureau of the Fiscal Service
FASO/OSD/OSB2
(304) 480-6084
From: jsclafan<EMAIL_ADDRESS>Sent: Monday, February 26, 2018 1:33 PM
To: bureauofthefiscalservice/federalfinancialmanagement<EMAIL_ADDRESS>Cc: Wesley D. Vincent<EMAIL_ADDRESS>Comment<EMAIL_ADDRESS>Subject: Re: [bureauofthefiscalservice/federalfinancialmanagement] 040 - Procure-to-Pay (#8)
What is the difference between this new data element, Delivery Date and the Received date ? Are you trying to distinguish between the date an agency receives a delivery at its Receiving Dock versus the date that the Program Manager actually receives the goods delivered, which may be at a later date.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://hyperlink.services.treasury.gov/?origin=https://github.com/bureauofthefiscalservice/federalfinancialmanagement/issues/8#issuecomment-368601605, or mute the threadhttps://hyperlink.services.treasury.gov/?origin=https://github.com/notifications/unsubscribe-auth/Ai-daAdyd9FD2U93SsJqZMqInVn43jTOks5tYvjSgaJpZM4RoPjy.

Is the original requirement for Accelerated Payment under the Recovery Act still in play? Isn't AcceleratedPaymentIndicator already me through item types of discount terms? Wouldn't it be possible that if accelerated payments needed to be issued in the future, we ask that the vendors represent this as a discount term on their invoices? Recommend delete.


Complete Assignment-1 for Python module

What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
I was trying to create an anagram checker to compare pairs of words to output True of False, the first without a boolean and the second one with.
What did you learn from the changes you have made?
I already knew some things: functions, methods, conditionals, sorting, etc., but hadn't tried to output using booleans.
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
Not really. I tried a few different approaches until it worked.
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
Trying to get output for the second one - getting the boolean to work properly took some time.
How were these changes tested?
The code was tested using Python.
A reference to a related issue in your repository (if applicable)
When I tried to fork the repository, I didn't find a 'create new fork' button. So I hit the dropdown from 'main' after forking and put in 'assignment-1'. After pushing from git, I had to play with some of the dropdowns in the PR tab to get the right comparators (hopefully did).
Checklist

[ X] I can confirm that my changes are working as intended

you did a great job here!
Just a quick note, in part 1, the function is printing the output instead of returning it.
Please go ahead and do the modification and then let me know, Thanks!