Don't Discard Page Contents Generated During Build

Brief Description of the Bug
When configured to use a Redis cache, the package currently discards the page contents generated during the NextJS build phase. As a result, initial page contents are generated twice in the common case when deployment follows shortly after build: (1) once during build (slow, developer facing) and (2) again during first page load (slow, user facing (!)).
Severity
Major
Frequency of Occurrence
Always
Steps to Reproduce
Provide detailed steps to reproduce the behavior, including any specific conditions or configurations where the bug occurs:

Build a NextJS project that uses ISR for some pages
Deploy the project using this package configured with a single redis-strings cache handler
Load one of the pages generated just seconds ago using ISR, experience a significant delay while the page is built again so that it can be loaded into the cache

Expected vs. Actual Behavior
Pages generated during the NextJS build phase should not be immediately rebuilt after deployment.
Environment:

OS: MacOS
Node.js version: 20.12.2
@neshca/cache-handler version: 1.3.1
next version: 14.2.3

Attempted Solutions or Workarounds
I've implemented a simple cache handler that loads initial data and HTML from the on-disk files included in the build output. But this should really be the default behavior and included in the handler, not something that a user has to implement—if not only because I probably didn't get it quite right. Another alternative would be to provide a filesystem cache handler which could provide this functionality, but I think users will be surprised that this doesn't work out of the box.
Additional context
It looks like a previous version of this package did implement this behavior, but it was removed right before 1.0.0 was released. (I reused some of the code from that version for my handler.) It wasn't clear to me why that option was removed, and it should probably have fired a warning so users would notice that the package was no longer supporting loading initial values from the filesystem. Next builds are also fairly slow when many pages are being built, so it seems problematic to do all that work and then discard it immediately.
There's language in the current documentation about the package being able to use (say) Redis during the build phase, which perhaps would address this? But that seems at odds with the Redis security model, which states that:

Redis is designed to be accessed by trusted clients inside trusted environments. This means that usually it is not a good idea to expose the Redis instance directly to the internet or, in general, to an environment where untrusted clients can directly access the Redis TCP port or UNIX socket.

At least in my deployment flow, I perform the builds on my local machine, push the Docker container, and deploy that to our Kubernetes cluster. Meaning that the build step does not run inside the trusted environment and so doesn't have access to the Redis instance using during production. Perhaps this is odd? It doesn't seem that way to me, necessarily. And it may be more common for users trying to deploy NextJS applications to non-Vercel environments, which AFAICT is essentially the intended audience for this package...

While implementing this for our starterkit for drupal -next.js projects I have been wondering about this same thing.
We are in the same situation described above, and it seems that basically using this cache handler makes the build step in the normal ISR next.js workflow futile. The data that is built at build time is then never used, I think.
And, coupled with the issue described here: https://github.com/caching-tools/next-shared-cache/issues/556 it also seems to negate a lot of the benefits of ISR in general.
Maybe I am missing something though :-)

Regarding this, I am wondering if something like this could work (in our case we use CircleCI):

Add redis to circleci
during the build, add cached data to the redis instance inside circle ci
export the redis database, pass it on as an artifact
when starting redis in kubernetes, give it that data to import

@vermario: I think that there are a variety of workarounds. The question is whether this library should support this out of the box.
It's also worth pointing out that a previous version did in fact support loading initial values from the filesystem, but that support was removed at some point. It's not clear why.
It does seem like the pre-built files should have enough data for cache insertion, given that the creation time can be used to determine when it's time to rebuild the page for ISR.
I currently have my own hacky workaround, but I'd rather see this library handle it internally so it can be done properly.

I am wondering if I just assumed that this library was meant to work with ISR, but maybe I have imagined it? :-)

I would hope that it doesn't break later ISR page regeneration. I think what's being discussed here is just the initial load. NextJS doing an initial pass on generating ISR pages during the build step, assuming that these will be used as the initial page contents. (Of course, this assumes that the built pages will be rapidly deployed, but that's probably not a bad assumption. If they aren't, the ISR interval could expire before the pages were used.)
The initial page build also ensures that the first page load can always return a stale page immediately, even if an ISR build is triggered due to the contents being stale. That's part of what's so frustrating about this limitation of this library. Here's what's supposed to happen:

next build: creates page /foo
(sometime later): /foo loaded, returns prebuilt contents immediately
(if needed): ISR triggered if page is stale, rebuilt in background
(next load): gets latest /foo contents
and so on

Here's what happens when you use this caching library:

next build: creates page /foo
(sometime later): prebuilt /foo has been discarded, so a full page build is done while the user waits!

Not good.

In addition to this, if you check https://github.com/caching-tools/next-shared-cache/issues/556 , it seems that also under normal operations the stale-while-revalidate mechanism can't work, since the cached contents in redis are evicted straight away. This to my mind makes ISR not compatible at all with this.

After modifying our handler according to @better-salmon 's suggestions in #556, we are able to see that stale while revalidate works nicely (great!) :-)
But the issue discussed in this thread still means that basically if we adopt this library, it means that pre-generating becomes totally futile, since next.js won't be aware of the prebuilt content, and will generate each page when the first user visits it, no matter if it was included in getStaticPaths or not.
I wonder if we are again missing something obvious, maybe @better-salmon you have better information about this?
It seems that somehow what is needed would be to read the json files that next.js generates during build and "import" into redis as initial data?

Trying to investigate this more, we came across the serverDistDir context property on this page: https://caching-tools.github.io/next-shared-cache/api-reference/on-creation
That points to the absolute path of the server directory, which in turn contains the pages directory that has the json and html files for each pre-generated page.
Is the way to to to try and read the contents of that directory and somehow set them into redis when the client is instantiated? is this what you are doing with your custom code @gchallen ?

so, we looked some more into this, and by adding some custom code it seems like we can achieve what we need:
when the client is instantiated for the first time:

we create a list of the HTML files that were generated during build in the pages folder
we iterate over the files, calling the handler to cache the contents according to the file modification date, and with the same attributes in terms of ttl and expiration that the handler would normally assign during runtime

this is visible here: https://github.com/wunderio/next-drupal-starterkit/pull/182/files#diff-e3c8a9ea9ddb0989e98b5e09063f02e372a49e57fbfb4a1bbd69ac55645d25c1
(feel free to take a look and tell us if your implementations are similar or we missed something :) )

Thanks @vermario! That sounds like a nice approach. I was doing something much more hacky, but your approach seems more correct and I'll give it a try. Thanks for sharing!

Thanks! It seems to work ok. A couple of things:

the prepopulation happens when the client is created, which means when the running next.js server is hit by an actual request. I wonder if if's possible to make it happen when npm run start happens?
we see that the client might get instantiated twice (We added a safeguard mechanism based on setting a redis key with no expiration to signal that the cache population has happened already).

Have you examined the NextJS instrumentation hook? That might do what you want WRT being able to do this on startup. In my case I'm using Kubernetes to hit a route before the container is activated, so I think the initialization will happen at that point.
Yup, saw that. I think that's the best you can do!

Also it looks like you're running into a problem I had, which is how to pull the correct expiration value on a per-page basis rather than using a hard-coded value. Is it possible this information is in the .json file?

Nope, it looks like the JSON file only has page contents.
FWIW, one way to avoid the big load on startup is to do what I was doing previously and only check the filesystem on a per-request basis. I merged in your code to set the timestamps with mine and it seems to work properly. However, you still need to track which contents have been loaded from the filesystem so that you don't reload from the filesystem after a revalidation. This seems to be safe, in that the Redis handler from this package will reject the change. However, it's inefficient in the sense that you're reading the same file twice.
Also, one thing I noticed is that revalidatePath in an App route will call revalidateTag with the tag equal to the page key prepended with N_T_. So for that to work, that tag needs to be added to the "PAGE" value loaded from the filesystem in your example above. Otherwise the revalidation will just silently not do anything. I think I had been running into that before and it's super frustrating. You actually also need to set this value in the set method as well.
Anyway, here's what I've come up with so far:
  const redisHandler = createRedisHandler({ client, keyPrefix: buildId })
  const mergedHandler: Handler = {
    name: "mergedHandler",
    async get(key, meta) {
      const existingResult = await redisHandler.get(key, meta)
      if (existingResult) {
        logger.debug(`Returning already cached result for ${key}`)
        return existingResult
      }

      if (await client.get(`${buildId}_${key}:filesystem`)) {
        logger.debug(`Not reloading ${key} from filesystem`)
        return null
      }

      logger.debug(`Looking for ${key} on filesystem`)
      try {
        const jsonPath = path.join(serverDistDir, "pages", `${key}.json`)
        const jsonExists = await fs
          .access(jsonPath, fs.constants.F_OK)
          .then(() => true)
          .catch(() => false)
        if (!jsonExists) {
          logger.debug(`JSON for ${key} does not exist, returning null`)
          return null
        }
        const pageData = JSON.parse(await fs.readFile(jsonPath, "utf8"))
        logger.trace(`pageData for ${key}: ${JSON.stringify(pageData, null, 2)}`)

        const htmlPath = path.join(serverDistDir, "pages", `${key}.html`)
        const htmlExists = await fs
          .access(htmlPath, fs.constants.F_OK)
          .then(() => true)
          .catch(() => false)
        if (!htmlExists) {
          logger.warn(`HTML for ${key} does not exist, returning null`)
          return null
        }
        const html = await fs.readFile(htmlPath, "utf8")

        const htmlFileStats = await fs.stat(htmlPath)
        const htmlFileLastModifiedTime = Math.round(htmlFileStats.mtimeMs / 1000)

        const newValue: CacheHandlerValue = {
          value: {
            kind: "PAGE",
            html,
            pageData,
            postponed: undefined,
            headers: undefined,
            status: undefined,
          },
          tags: [`${NEXT_CACHE_IMPLICIT_TAG_ID}${key}`],
          lastModified: htmlFileLastModifiedTime * 1000,
          lifespan: {
            lastModifiedAt: htmlFileLastModifiedTime,
            staleAge: DEFAULT_STALE_AGE,
            expireAge: DEFAULT_STALE_AGE,
            staleAt: htmlFileLastModifiedTime + DEFAULT_STALE_AGE,
            expireAt: htmlFileLastModifiedTime + DEFAULT_STALE_AGE,
            revalidate: REVALIDATE_LONG,
          },
        }

        logger.debug(`Inserting filesystem value for ${key} into cache`)
        await redisHandler.set(key, newValue)

        const newResult = await redisHandler.get(key, meta)
        if (newResult) {
          await client.set(`${buildId}_${key}:filesystem`, "true")
          return newResult
        } else {
          logger.error(`Value for ${key} does not exist after insertion`)
          return null
        }
      } catch (err) {
        logger.error(`Error looking in filesystem for ${key}: ${err}`)
        return null
      }
    },
    async set(key, cacheHandlerValue) {
      logger.debug(`Insertion for ${key}: ${cacheHandlerValue.tags}`)
      await client.get(`${buildId}_${key}:filesystem`)
      if (cacheHandlerValue.value.kind === "PAGE" && cacheHandlerValue.tags.length === 0) {
        cacheHandlerValue.tags = [`${NEXT_CACHE_IMPLICIT_TAG_ID}${key}`]
      }
      return redisHandler.set(key, cacheHandlerValue)
    },
    async revalidateTag(tag) {
      logger.debug(`Revalidating ${tag}`)
      return redisHandler.revalidateTag(tag)
    },
  }

  return {
    handlers: [mergedHandler],
    ttl: {
      defaultStaleAge: DEFAULT_STALE_AGE,
      estimateExpireAge: () => DEFAULT_STALE_AGE,
    },
  }

Overall I really feel like this is way too much work and requires knowing too much about NextJS internals. I may try implementing a cache handler using Redis from scratch, just to see if it's this package that's muddying the waters somehow.

@vermario @gchallen @lzw1926 hi,
I'm excited to share that the feature you've all been anticipating is now in progress!
I've just opened a PR that introduces pre-population of the cache with pre-rendered pages at application startup, which is expected to bring a noticeable performance improvement. This new functionality will be made possible via a registerPrerenderedPagesCache function, which leverages the CacheHandler class to populate the cache for all Handlers.
To achieve this, it is utilizing Next.js's instrumentation hook to ensure that all pages are pre-generated and the prerender-manifest.json file is created just before the server starts. This way, I can efficiently pre-populate the cache without the need for any additional scripts right before the server startup.
It's worth noting that this is currently an experimental feature and may evolve in future releases.
Feel free to check out the PR here: #743. I appreciate your feedback as I continue to refine this feature!


Suggestion to sideload the plugin rather than replacing the original as install method

Streamlink supports plugin sideloading, if you go to the directory listed on that page (depending on your OS) and put the twitch.py file there, Streamlink should then use your custom file.

If a plugin is added with the same name as a built-in plugin, then the added plugin will take precedence. This is useful if you want to upgrade plugins independently of the Streamlink version.

I didn't know streamlink supported this, thanks.

Isn't weird to have to create appdata\streamlink\plugins folders on windows, when there's already an appdata\roaming\streamlink folder with a config file?


ZFIN-8448: Delete fish and redirect

Add ability to delete fish and provide a publication ID to redirect to with a message.

Closing this PR. Will submit a new one without the message display.


Remove readiness probe

coverage: 79.948%. remained the same
when pulling ba57444c92aa8142f871976c8fe7289f019457da on remove_readiness
into 142e92dbd43cbf8527789d6ba0ff83a239f3560a on main.


Maven based projects migration guide

Would be nice to support maven based part of community. It's a thing, especially in corporate environments

Thank you @jozic for opening this issue.
Maven is definitely something we may want to cover.
At the moment we don't have much knowledge on that topic. Do you know if there is a Maven plugin that support the Scala 3 compiler?

I'm aware of two maven scala plugins, but afaik none of those supports Scala 3 (hopefully i'm wrong here)

https://github.com/davidB/scala-maven-plugin
https://github.com/random-maven/scalor-maven-plugin

Any chance you get your hands on them and make them compile Scala 3? :pray:

that's unlikely, but who knows :)

The @davidB one is the one still under active development; I don't think the other one is relevant anymore.
ticket: https://github.com/davidB/scala-maven-plugin/issues/393

Getting closer with https://github.com/davidB/scala-maven-plugin/pull/447

Just to update info on this open tickect.
The version 4.5.1 of https://github.com/davidB/scala-maven-plugin includes PR from the community for scala 3. (feedback are welcomed)


IGNITE-9962 Complete cache start future with error if register metada…

…ta was failed

The ticket is resolved, closing PR. Please close PRs for resolved tickets. Alternatively, ask a committer to use GitHub UI or scripts/apply_pull_request.sh or mention in commit message 'Fixes #(a number of PR)'. Feel free to reopen if needed.


Add a property to enable/disable skipping of unknown properties in JSON

To help with federated over different gaffer stores with different versions of Gaffer we should enable the FAIL_ON_UNKNOWN_PROPERTIES feature in Jackson. This will mean, if any new fields are added to classes in Gaffer, it won't cause failures for older versions of Gaffer. We should give users the option to disable this in their Store Properties file.

Merged into develop.

There is a new store property (or SystemProperty) that you can set to enable/disable the strict mode in json.


New version: Peppy.Osu! version 2023.913.0

Pull request has been created with WinGet Automation :rocket:
Microsoft Reviewers: Open in CodeFlow

@wingetbot waivers Add Validation-No-Executables


SDK-254 Switch to using ADVANCED closure compiler option

Assuming the reason for needing this in the first place is no longer applicable?
(Just asking the obvious questions in case nobody else has.)

Assuming the reason for needing this in the first place is no longer applicable? (Just asking the obvious questions in case nobody else has.)

yes, I wrote that in the ticket, for the record we switched to "simple" due to a memory leak, but since it's not there anymore we can use the "advanced"

yes, I wrote that in the ticket, for the record we switched to "simple" due to a memory leak, but since it's not there anymore we can use the "advanced"

Ah, sorry, I did not check the ticket, my bad. Clear then, thanks 👍


Problem building firmware on Ubuntu 18.04

Hi Dragos:
I loaded VMware on this old Windows 7 64 bit ADI laptop I have and installed Ubuntu 18.04 on it. After installing the various prerequisites including what I think is the latest gcc-arm-none-eabi (using sudo apt install gcc-arm-none-eabi) I cloned m1k-fw master and did a sudo make flash. That seemed to work and produces a m1000.bin file (reads back as 2.16 as it should).
I then flashed that file to one of my Rev F boards. However when I run Alice I'm getting lots of dropped / bad samples (getting I data samples in the V data array) like the versions I build with the Windows tool chain.
What are you doing differently to get this to work properly?
Thanks
Doug

Hi Doug,
On Linux, I'm using the same CodeSourcery Toolchain. Once you have it on your Linux machine, Makefile can be updated similar to https://github.com/analogdevicesinc/m1k-fw/issues/20 .
Dragos

Hi:
I'm not a Linux user so I don't know much of the command line stuff. What is command used to "extract" the downloaded file? Where exactly should it be extracted to and how?
I think I set up a 64 bit version of Ubumtu 18.04 on VMware. That computer is not connected right now so I can't check any further details. Let me know of any other things that need to be loaded.
Thanks
Doug

Extract
analog@ubuntu:~/Downloads$ tar xvf ./arm-2014.05-28-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
arm-2014.05/arm-none-eabi/
...
arm-2014.05/share/doc/arm-arm-none-eabi/html/libm/ccos.html
Find the location
analog@ubuntu:~/Downloads$ pwd
/home/analog/Downloads
export CROSS before running make
analog@ubuntu:~/Downloads/m1k-fw$ export CROSS=/home/analog/Downloads/arm-2014.05/bin/arm-none-eabi-
or update the Makefile
analog@ubuntu:~/Downloads/m1k-fw$ sed -i '/GIT_VERSION/a CROSS=/home/analog/Downloads/arm-2014.05/bin/arm-none-eabi-' Makefile
Dragos

I down loaded and extracted using tar inside /home/downloads.
looking in the file manager there seems to be a arm-2014.05 folder with things in it.
I changed the Make file in /home/m1k-fw like this:
Makefile.zip
Then from inside m1k-fw I do this and get an error:
doug@ubuntu:~/m1k-fw$ sudo make flash
rm -f *bin *elf *hex *lss *map *sym *.o *.d *.su
CC      build/src/main.o
make: /home/downloads/arm-2014.05/bin/arm-none-eabi-gcc: Command not found
make: *** [asf/sam/utils/make/Makefile.sam.in:406: build/src/main.o] Error 127
Any ideas?
Thanks
Doug

Something is definitely wrong in your path. The user name is missing (you should have something like /home/username/Downloads) and the name of the downloads folder most likely starts with an uppercase character (Downloads). Linux is a case sensitive operating system.
Dragos

OK, in a terminal screen I navigated to where the files were extracted and did a pwd:
/home/doug/Downloads/arm-2014.05/bin
I then cut and pasted this text letter for letter into the Make file adding the arm-none-eabi- to the end:
CROSS=/home/doug/Downloads/arm-2014.05/bin/arm-none-eabi-
And I'm still getting the same error message when I try make in the m1k-fw folder?
I'm not the best typist when using the terminal command line but I think I'm doing this right. (a major reason I don't like using Linux)
Still not the answer to the problem I think.
Thanks
Doug

The new path seems correct. Can you install lib32z1, lib32ncurses5 and try to run make again (sudo apt-get install lib32z1 lib32ncurses5)?
Thanks,
Dragos

Adding those libraries fixed building the firmware binary. Thanks.
I also flashed this new binary to an m1k board and this one now seems to function as well as the one in master (2.16). I'm not seeing any bad, skipped, dropped, missing samples in the data using ALICE.
So I have this version working like yours in Linux.
Would adding these libraries (if possible to do) to the Atmel Studio 7 tool on Windows fix that one as well? It would be great if that could be made to work as well.
Thanks again.
Doug

No, those libraries were required only because you are on a 64-bits machine where you want to run a 32-bits application (the Toolchain).
It's a little bit strange that you get a different result on Windows. Do you use the same 2014.05-28 version?
Thanks,
Dragos

I guess this is all resolved now. Please see my pull request #21 for the changes I'd like added to the firmware.
Thanks.
Doug


Content Audit of Notifier

What?

Find UI things we need to change
Find UI things we need to translate
Find code of UI things to Translate
Find all the things we need to re-write such as content in footer or kill

Why?

We don't want to confuse people

Things we need to re-write or cut

Footer links
https://notifier.cdssandbox.xyz/features/roadmap
https://notifier.cdssandbox.xyz/features
https://notifier.cdssandbox.xyz/features/security
https://notifier.cdssandbox.xyz/support
https://notifier.cdssandbox.xyz/features/messages-status
https://notifier.cdssandbox.xyz/privacy
https://notifier.cdssandbox.xyz/cookies
https://notifier.cdssandbox.xyz/pricing/how-to-pay
https://notifier.cdssandbox.xyz/pricing

https://docs.google.com/document/d/1oYgxP4K-xlN-hfE2bELWdUoJ70wtsssRaZvao1eNjyg/edit


MAGIC_NUMBER false positive when Long constants are used together with kotlin.time.Duration extensions

Describe the bug
The following constant declarations trigger the MAGIC_NUMBER false positive:
import kotlin.time.Duration.Companion.minutes
import kotlin.time.Duration.Companion.seconds

val fooTimeout = 10L.seconds

val barTimeout = 10L.minutes

Environment information

diktat version: 2.0.0
build tool: Maven
how is diktat run: plugin
kotlin version: 1.7.22
operating system: Any

How would you solve this? Just check for .seconds, .minutes and .hours from the nodeText?

How would you solve this? Just check for .seconds, .minutes and .hours from the nodeText?

Yes, need to check that the syntax of the constant is the following:
val a = (some constant).(any method) . And if the expression really fits this pattern, then not to raise a warning.

@orchestr7 Do you know, that range will also be treated as magic number in same conditions?
import kotlin.time.Duration.Companion.seconds

val something1 = 1L.seconds // Not a magic number
val something10 = 10.seconds // Magic number
val something10long = 10L.seconds // Magic number
val someRange = 4..11 // Magic number

Can't figure out yet, I'm not familiar with this project, but looks like this test should fail, but it passes: com.saveourtool.diktat.ruleset.chapter3.MagicNumberRuleWarnTest#check ignore ranges


Find command does not autopopulate search box with selected text in a notebook cell, different from regular editor behavior

Environment data

VS Code version: 1.58.2
Jupyter Extension version (available under the Extensions sidebar): v2021.8.1054968649
Python Extension version (available under the Extensions sidebar): v2021.7.1060902895
OS (Windows | Mac | Linux distro) and version: Ubuntu 20.02.2
Python and/or Anaconda version: 3.8.10
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
Jupyter server running: Remote

Expected behaviour
When text is highlighted in the notebook view, pressing the find keyboard shortcut, e.g. ctrl+f, will populate the find search box with the highlighted text. This is how VS Code behaves for normal editor windows
Actual behaviour
find search box is shown with last searched text
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

start a notebook
add some text to a cell
Some random text
double click the text random to select it
press ctrl+f to activate the find command
find search box is displayed but the prepopulated text is not random

Logs

Output for Jupyter in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Jupyter)

XXX

/duplicate of https://github.com/microsoft/vscode/issues/129319


Removed all the version tags from the code base

This code removes all the @version tags from the code base.

Coverage remained the same at 53.061% when pulling cf9b0705b21e728f490c433d7a40872e4d7e8db8 on feature/ZPI-7-Remove_version_tag_from_code into 558b60941487396019c18861d001eceb9e1bca65 on develop.


Bump version to 1.3.1

Signed-off-by: Sayali Gaikawad<EMAIL_ADDRESS>Description
Bump version to 1.3.1
Issues Resolved
Part of https://github.com/opensearch-project/opensearch-build/issues/1805
Check List

[x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Codecov Report

:exclamation: No coverage uploaded for pull request base (1.3@3ae9db7). Click here to learn what that means.
The diff coverage is n/a.

@@          Coverage Diff           @@
##             1.3     #117   +/-   ##
======================================
  Coverage       ?   83.62%
  Complexity     ?      555
======================================
  Files          ?       61
  Lines          ?     2058
  Branches       ?      146
======================================
  Hits           ?     1721
  Misses         ?      231
  Partials       ?      106

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 3ae9db7...d3f5cee. Read the comment docs.


Support for GitLab on CircleCI

Are you experiencing an issue with...
shields.io
🐞 Description
Circle CI added GitLab support and changed to new GitHub App: https://circleci.com/docs/gitlab-integration/
But there is no GitLab option for status badge
🔗 Link to the badge
No response
💡 Possible Solution
No response

Udpate: I can use GitLab Pipeline status


Add Support for Sub-Ids

Not sure of the best way to implement this, but if I've got a Cycle pull-down with a bunch of options like:

It would be nice if these were automatically added as IDs to the res() object.
CV_LINE_SPLINE_AXIS = 10100,
CV_LINE_SPLINE_AXIS_XPLUS = 10101,
CV_LINE_SPLINE_AXIS_XMINUS = 10102,
CV_LINE_SPLINE_AXIS_YPLUS = 10103,
...

The attached .zip contains a .c4d file with a "CV-Line Spline" Generator Object you can use to test.
cv-line spline.zip

Works great!


Fix Configuration tests

🐞 Bug Report
File configuration_test.go fail to compile.
Affected Command
None
Is this a regression?
Yes
Changes done in Configuration struct leads to compilation error in the TestConf
Update TestConf to address the changes already done in the other file. Ensure all Configuration tests pass successfully
Description and Minimal Reproduction
🔥 Exception or Error
https://github.com/edgexfoundry-holding/edgex-cli/blob/aa74bdf6f371f26a315c80fd2ec7906a80510907/config/configuration_test.go#L34-L72
All paths inside TestConf structure does not exists anymore. (Like IntervalByNameSlugRoute:       "interval/name/" ) It leads to compilation error and failed tests.
🌍  Your Environment
Deployment Environment:
EdgeX Version:
Anything else relevant?

We can start off my dropping the config/testdata/config.yaml file and re-using the res/configuration.toml file @difince recently introduced. The paths will need to be reconstructed in the calls. Oh well.


Moment successor lib Luxon will load properly

Adding a note that Moment has a successor library, Luxon, with a very similar API that will load properly in webpack - along with a lot of other benefits.

Can we merge this note?

Closing for inactivity, @maggiepint please feel free to re-open if you make the changes mentioned above. Also please address the build error:

src/content/plugins/ignore-plugin.md:27:109: dates_times.dates When specifying a month and year, 'of' is unnecessary.

@montogeek, I know you expressed some interest in doing more on the repo. If you want to start tagging and reviewing PRs that would be fantastic. Here's the process I follow:

Tag with the related docs section (e.g. plugins or api) and indicate what the change accomplishes (e.g. correction or enhancement).
Review the content to make sure it's a worthwhile addition and placed correctly (i.e. maybe the change makes sense in another section of the docs). There's no sense in moving to the next step if the changes aren't warranted or need significant refactoring.
Check for build errors, grammar issues, and make sure the CLA is signed.
If the OP followed the commit convention and wrote a descriptive commit message, simply merge the PR. If not, or if there's a bunch of "touchup" commits, use "Squash & Merge" to rollup the commits and/or rewrite the commit message.

I know this sounds like a lot but it's actually not that bad at all once you get into a nice flow. There may be other simplifications and/or things we can automate as well (e.g. auto-tagging via webpack-bot based on which section the edited page is in). I highly recommend sticking with the commit convention as it yields a much cleaner history and allows for things like automatic changelog generation in the future (via standard-version). I walked @TheDutchCoder through this process once as well, and would be happy to do another screenshare if that would help others.
cc @jeremenichelli et. al. - As I mentioned before, I'm doing what I can to finish up the rebuild branch and keep the repo as clean as possible before I stop watching it at the beginning of March. I'll still be around for questions on slack and mentions anywhere on GitHub, but the sooner others get involved the better so it's not a cold cut off and things don't build up. Scanning the rest of the open prs now.

@skipjack Thanks for the guide, I have been following it using comments for now since I am not a member of the repository.

@skipjack Thank you! Sorry for the noise to everybody else!


glibc: fix darwin -> linux cross compilation

Motivation for this change
darwin -> linux cross-compilation of glibc was broken for two reasons. This fixes both of them:

A recent glibc update removed some code we were patching. I fixed this by removing the relevant part of the patch.
When NIX_COREFOUNDATION_RPATH is set, we create a ld.so binary with an RPATH of [], but ld.so expects not to have an RPATH set at all. I fix this by unsetting the variable in the glibc derivation, as suggested by @parthy, but I'm not sure this is the best solution (in particular, I'm not convinced we should be setting NIX_COREFOUNDATION_RPATH at all when host != darwin). However, this does get cross-compilation working for now.

Tested by doing nix-build . --arg crossSystem '(import ./. {}).lib.systems.examples.gnu64' -A hello on Darwin, copying the resulting closure onto a Linux box, and running hello.
This should only change code on the cross-compilation path, so it shouldn't cause any mass rebuilds.
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[ ] NixOS
[x] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

I was able to cross-compile from darwin to gnu64 using this PR.
$ nix-copy-closure --to nix-linuxkit $(nix-build . --arg crossSystem '(import ./. {}).lib.systems.examples.gnu64' -A hello)
$ ssh nix-linuxkit "$(nix-build . --arg crossSystem '(import ./. {}).lib.systems.examples.gnu64' -A hello)/bin/hello"
Hello, world!

Still important.

Still important.

and still stale. Maybe just reopen the PR if you want it to be shipped.

Closing because author did not react in almost 2 years.

This seems important to better support Darwin.


Debug modules

These notebooks fail when running nbdev_test_nbs
Exception: The following notebooks failed:
01_dataset_builder.ipynb
07_property_scorer.ipynb
08_database_proxy.ipynb
09_create_database_tables.ipynb
11_read_wiki_data.ipynb
13_read_wiki_data.ipynb

We need to fix these before we can do most of the other issues. Therefore this issue is a priority. It's also important to make sure the main branch passes all the tests.

I will try to run this tomorrow.

Test 1 and 8 should pass.

Fixed 08_database_proxy d882153b34110d175e1b3791ed0369cb887e2ef7

Fixed 01_dataset_builder da4c5cd

Fixed 07_property_scorer 8bec210b5d7beff81cc38be8e6c69316228eaa98

Fixed 09_create_database_tables 57c8c6b6ddacacea352940d6a7f8b16b4554c949

Fixed 10_insert_to_database 318163b920da5dae2d5a14afc8bdda3e2ed9034b

Fixed 13_read_wiki_data<PHONE_NUMBER>177e7be0f7e0058404de2ca0335c3d

All tests are passing.


Added Contributor profile and blog for Aniruddha1261

Thank you @Aniruddha1261 -- you are almost there. Here are some changes left to do:

[ ] content/authors/Aniruddha1261/index..md --> content/authors/Aniruddha1261/_index.md (remove one '.' and prepend an '_'.
[ ] In content/report/osre23/ucsc/OSAVC/20230525-Aniruddha1261/index.md replace tags: ["GSoC23"] with tags: ["osre23"]


docs: updating discord docs

Description
This PR adds a few images for reference and warnings about how to get message content using the message intent toggle.
Notes for Reviewers
@grantdfoster I'm not sure about some of the nuances of formatting so maybe you can take a look right quick.
Signed commits

[ ] Yes, I signed my commits.

Needs modification. I'll create a new PR.


Discorcondant value from Alfred's #SoftClippedBases and CIGAR string's S

Hi,
I am using alfred version 0.2.1 to qc my RNA-seq data using the following command (alfred qc -r <hg38.fa> -b <target_gene> -o test.alfred.out.gz test.bam)
My test.bam file contains only one read pair for test purposes as described below. In the bam file, CIGAR string of read1 of readpair_11405287 is 10S65M and that of read2 is 32M1216N43M.
I expect to have 10 as #SoftClippedBases but alfred outputted 1 as #SoftClippedBases. Does "#SoftClippedBases" represent the number of reads containing any size of soft-clipped bases rather than the size of soft-clipped bases?
test.bam
readpair_11405287       99      chr17   36486687        255     **10S65M**  =       36493975        8579    GAAACAGTCTCTCCCACAAAACCATGGCGTCGCTCAAATGTAGCACCGTCGTCTGCGTGATCTGCTTGGAGAAGC     F~~a~~~~~~~~~~G~~~~~G~^~~~y~~~~~o~~~~t~~~~w~~~\~~~~~~~~~~~~~~~~~~~C~H~~~~~~     NH:i:1  HI:i:1  AS:i:137        nM:i:1  NM:i:1 readpair_11405287      147     chr17   36493975        255     **32M1216N43M**     =       36486687        -8579   CAGAGTTTCTTTGCAGAATTTAAAGAATTTAGGGGAATCTGCAACATTAAGAAGCTTATTGCTCAATCCACACCT     ~~~~R~~g~~~r~~~~~~~~s~~e~~e~~V~~~~Z~}~~~~~~~~~~~~}~~~~}~~~~}~~~~~~a~S~~~~i~     NH:i:1  HI:i:1  AS:i:137        nM:i:1  NM:i:0
alfred qc output
Sample	test Library	DefaultLib #QCFail	0 QCFailFraction	0 #DuplicateMarked	0 DuplicateFraction	0 #Unmapped	0 UnmappedFraction	0 #Mapped	2 MappedFraction	1 #MappedRead1	1 #MappedRead2	1 RatioMapped2vsMapped1	1 #MappedForward	1 MappedForwardFraction	0.5 #MappedReverse	1 MappedReverseFraction	0.5 #SecondaryAlignments	0 SecondaryAlignmentFraction	0 #SupplementaryAlignments	0 SupplementaryAlignmentFraction	0 #SplicedAlignments	1 SplicedAlignmentFraction	0.5 #Pairs	1 #MappedPairs	1 MappedPairsFraction	1 #MappedSameChr	1 MappedSameChrFraction	1 #MappedProperPair	1 MappedProperFraction	1 #ReferenceBp	83257441 #ReferenceNs	337237 #AlignedBases	140 #MatchedBases	139 MatchRate	0.992857 #MismatchedBases	1 MismatchRate	0.00714286 #DeletionsCigarD	0 DeletionRate	0 HomopolymerContextDel	0 #InsertionsCigarI	0 InsertionRate	0 HomopolymerContextIns	0 **#SoftClippedBases	1** SoftClipRate	0.00714286 #HardClippedBases	0 HardClipRate	0 ErrorRate	0.0142857 MedianReadLength	0:0 DefaultLibraryLayout	2 MedianInsertSize	0 MedianCoverage	0 SDCoverage	0.918795 CoveredBp	140 FractionCovered	1.68837e-06 BpCov1ToCovNRatio	1 BpCov1ToCov2Ratio	inf MedianMAPQ	255 #TotalBedBp	7959 #AlignedBasesInBed	140 FractionInBed	1 EnrichmentOverBed	10418.4

Good point, that's mislabelled. I just changed this to #SoftClippedCigarS and #HardClippedCigarH then it also fits to CigarI and CigarD for insertions and deletions. As you already concluded, Alfred counts the occurrences of CigarS independent of the size of soft-clipped bases.

I appreciate your clarification. Thanks!
On Thu, Jul 30, 2020 at 4:16 AM Tobias Rausch<EMAIL_ADDRESS>wrote:

Good point, that's mislabelled. I just changed this to #SoftClippedCigarS
and #HardClippedCigarH then it also fits to CigarI and CigarD for
insertions and deletions. As you already concluded, Alfred counts the
occurrences of CigarS independent of the size of soft-clipped bases.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/tobiasrausch/alfred/issues/32#issuecomment-666250916,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABFCNNAGLLG2SKUOSLWHCHLR6E25DANCNFSM4PL4ET3Q
.


JavaScript syntax highlighter mistakes

VSCode Version: 1.1.1

OS Version: Windows10 x64 10586.318

This example, wrong.

Remove new, right.

Add (), right.

This issue was moved to Microsoft/TypeScript-TmLanguage#170

This is not .ts file, it is .js file.

Our JavaScript grammar is actually a TypeScript grammar and maintained by the TypeScript team.

OK, I understand, thank you.


Cannot read properties of undefined error while working inside of an interactive transaction and trying to connect relations

Prisma: 4.8.x
Postgres: 13.x
Here's my use case:
I have a collection of users, each user can have multiple roles, and roles can belong to multiple users. In my scenario I can apply and remove roles from users (connect/disconnect).
First my schema:
model User {
    id            String         @id @default(cuid())
    discordId     String?        @map(name: "discord_id") @db.VarChar(255)
    username      String?        @unique() @db.Char(50)
    email         String         @unique() @db.VarChar(255)
    emailVerified DateTime?      @map(name: "email_verified")
    avatar        String?        @db.VarChar(255)
    securityLevel SecurityLevel  @default(GUEST) @map(name: "security_level")
    isDeletable   Boolean?       @default(true) @map(name: "is_deletable")
    isSuperAdmin  Boolean?       @default(false) @map(name: "is_super_admin")
    isAdmin       Boolean?       @default(false) @map(name: "is_admin")
    createdAt     DateTime?      @default(now()) @map(name: "created_at") @db.Timestamptz(6)
    updatedAt     DateTime?      @default(now()) @map(name: "updated_at") @db.Timestamptz(6)
    profile       UserProfile?
    roles         UserRoles[]
    policies      UserPolicies[]
    accounts      Account[]

    @@map("users")
}

model UserRoles {
    user       User        @relation(fields: [userId], references: [id], onUpdate: Cascade, onDelete: Cascade)
    userId     String      @map(name: "user_id")
    role       Role        @relation(fields: [roleId], references: [id], onUpdate: Cascade, onDelete: Cascade)
    roleId     String      @map(name: "role_id")
    assignedBy AssignedBy? @default(SITE)
    assignedAt DateTime    @default(now())

    @@id([userId, roleId])
    @@map("user_roles")
}

model Role {
    id            String         @id @default(cuid())
    name          String         @unique() @db.VarChar(255)
    securityLevel SecurityLevel  @default(ADMIN) @map(name: "security_level")
    isDeletable   Boolean?       @default(true) @map(name: "is_deletable")
    createdAt     DateTime       @default(now()) @map(name: "created_at") @db.Timestamptz
    updatedAt     DateTime       @default(now()) @map(name: "updated_at") @db.Timestamptz
    users         UserRoles[]
    policies      RolePolicies[]

    @@map("roles")
}

I join the role to the user through an explicit relation(join) table. My endpoint calls this function:
async updateUser(
      id: string,
      user: Partial<Omit<User, "id" | "discordId">>,
      roles: Relation | undefined,
      policies: Relation | undefined
    ): Promise<UserResult> {
      let result = await prisma?.$transaction(
        async (trx): Promise<UserUpgradeQueryResult> => {
          const data: Prisma.UserUncheckedUpdateInput = {};

          const queryData: Prisma.UserUpdateArgs = {
            where: { id },
            data,
            select: {
              id: true,
              username: true,
              updatedAt: true,
              // roles: {
              //   include: {
              //     role: true,
              //   },
              // },
              // policies: {
              //   include: {
              //     policy: true,
              //   },
              // },
            },
          };

          if (roles != undefined) {
            queryData.select! = {
              ...queryData.select,
              roles: {
                include: {
                  role: true,
                },
              },
            };
          }

          if (policies != undefined) {
            queryData.select! = {
              ...queryData.select,
              policies: {
                include: {
                  policy: true,
                },
              },
            };
          }

          if (roles?.connect?.length) {
           await relate(
              id,
              roles.connect,
              "userId_roleId",
              trx.userRoles as unknown as Prisma.TransactionClient
            );

          }

          if (roles?.disconnect?.length) {
            await unrelate(
              id,
              roles.disconnect,
              "userId_roleId",
              trx.userRoles as unknown as Prisma.TransactionClient
            );
          }

          let result: any;

          if (user) {
            Object.assign(data, user);
            result = trx.user.update(queryData);
          } else {
            result = trx.user.findUnique({
              where: queryData.where,
              select: queryData.select,
            });
          }

          return (await result) as UserData;
        }

Without going too into detail and off track, the transaction returns a user record, with or without roles depending on if roles is something that requires to be updated on the user (connected/disconnected). Because the relation is a list, when it comes to disconnecting a relation, I cannot use disconnect in queryData, I have to do it manually using trx.userRoles. This works fine.
However when it comes to connecting a role within the transaction, using the transaction client (trx), I get the following error:
TypeError: Cannot read properties of undefined (reading 'roleId')                                                                                11:46:40
    at file:///home/blackout/Projects/workplaces/site-nuxt3/nuxt-app/.nuxt/dev/index.mjs:1219:47
    at async PrismaClient._request (/home/blackout/Projects/workplaces/site-nuxt3/nuxt-app/node_modules/@prisma/client/runtime/index.js:36082:16)
    at async file:///home/blackout/Projects/workplaces/site-nuxt3/nuxt-app/.nuxt/dev/index.mjs:957:13
    at async Proxy._transactionWithCallback (/home/blackout/Projects/workplaces/site-nuxt3/nuxt-app/node_modules/@prisma/client/runtime/index.js:36014:18)
    at async Proxy.updateUser (file:///home/blackout/Projects/workplaces/site-nuxt3/nuxt-app/.nuxt/dev/index.mjs:920:20)
    at async file:///home/blackout/Projects/workplaces/site-nuxt3/nuxt-app/.nuxt/dev/index.mjs:1489:20
    at async Object.handler (file:///home/blackout/Projects/workplaces/site-nuxt3/nuxt-app/node_modules/h3/dist/index.mjs:723:19)
    at async Server.toNodeHandle (file:///home/blackout/Projects/workplaces/site-nuxt3/nuxt-app/node_modules/h3/dist/index.mjs:798:7) {
  clientVersion: '4.8.0'
}

If I pass the prisma (where p is the prisma client) client directly to the relate function, everything works fine.
await relate(
              id,
              roles.connect,
              "userId_roleId",
              p.userRoles
            ); <-- works

 await relate(id, roles.connect, "userId_roleId, trx.userRoles) <-- doesn't work

the relate function:
const relate = async (
  id: string,
  relation: RelationItem[],
  key: string,
  trx: Prisma.TransactionClient
) => {
  if (Array.isArray(relation)) {
    if (relation.length > 1) {
      const data = relation.map((r) => getIndex(key, id, r.id));

      console.log(data);

      return (trx as any).createMany({ data });
    }
    const data = getIndex(key, id, relation[0].id);

    console.log(data);
    return (trx as any).create({ data });
  } else {
    throw new Error("[relate]: Relation must be an array.");
  }
};

This is problematic because if there's a failure anywhere inside the transaction flow I want to roll back all the queries.
Why is this happening?

@BlackoutGG can you reproduce this with a recent version of Prisma?
Note: The error stack looks like there might be a problem in your code 🤔

Hi @BlackoutGG , did you have a chance to look at @Jolg42  comment?
It'd be helpful for us to move your issue forward.
Without further information, we'll have to close this issue. Thank you 🙏

Hey @BlackoutGG ,
With the lack of information and our inability to reproduce this issue, we're now closing it. Feel free to comment if you have any updates about it.
Thank you 🙏


Graph layout spacing (4.0)

[x] joeferner
[ ] mwizeman joeybrk372 jharwig sfeng88

Fix dagre configuration to include labels
Animate all layouts
Fix grid layout differences based on pixelRatio
Change title truncation to use built-in cytoscape truncating instead
of 3 words. Will now wrap to multiple lines instead of long one line.

Tested on collapsed nodes also

Tested all layouts on pixelRatio=1 & 2 devices give same or very
similar results
Adjust snap to grid numbers to match grid layout

Testing Instructions: Test graph layouts on browser on hi-dpi monitors and low. Test title truncation/hovering shows wrapped title
Points of Regression: Graph may show less of a title, it's based on width, where before was 3 words.
NO CHANGELOG because the layouts spacing was off in between releases

@jharwig when you say it will wrap to multiple lines what do you mean? I have some decorations which add text below the vertex title. Will those have issues?

It’s only on mouseover of the node. Although I didn’t test bottom decorations.

@joeferner are you ok with us merging this?


sqlx::query tracing event - avoid string parsing for subscribers

I built a custom tracing Layer which intercepts sqlx::query events in order to gather some query performance statistics across Spans.
It's great that this event exists due to #2185 and the data is super useful, so thanks for that!
However while the layer, I noticed that due to all the integer fields and the elapsed timestamp being emitted as Debug data, it causes some unnecessary parsing work on the subscriber which could potentially be avoided.
For reference: Here's the code that I use to read the submitted data back into my Layer:
#[derive(Debug, Clone, Default)]
struct SqlxQueryDataExtractor {
    summary: String,
    db_statement: String,
    rows_affected: usize,
    rows_returned: usize,
    elapsed: std::time::Duration,
}

impl field::Visit for SqlxQueryDataExtractor {
    fn record_bool(&mut self, _field: &field::Field, _value: bool) {}

    fn record_f64(&mut self, _field: &field::Field, _value: f64) {}

    fn record_i64(&mut self, _field: &field::Field, _value: i64) {}

    fn record_str(&mut self, field: &field::Field, value: &str) {
        match field.name() {
            "summary" => self.summary = value.to_string(),
            "db.statement" => self.db_statement = value.to_string(),
            _ => {}
        }
    }

    fn record_debug(&mut self, field: &field::Field, value: &dyn std::fmt::Debug) {
        match field.name() {
            "elapsed" => {
                let mut elapsed_str = format!("{:?}", value);
                if elapsed_str.ends_with("ns") {
                    elapsed_str.truncate(elapsed_str.len() - 2);
                    self.elapsed = std::time::Duration::from_nanos(
                        elapsed_str.parse::<f64>().unwrap_or_default() as u64,
                    );
                } else if elapsed_str.ends_with("µs") {
                    elapsed_str.truncate(elapsed_str.len() - "µs".len());
                    self.elapsed = std::time::Duration::from_micros(
                        elapsed_str.parse::<f64>().unwrap_or_default() as u64,
                    );
                } else if elapsed_str.ends_with("ms") {
                    elapsed_str.truncate(elapsed_str.len() - 2);
                    self.elapsed = std::time::Duration::from_millis(
                        elapsed_str.parse::<f64>().unwrap_or_default() as u64,
                    );
                } else if elapsed_str.ends_with('s') {
                    elapsed_str.truncate(elapsed_str.len() - 1);
                    self.elapsed = std::time::Duration::from_secs_f64(
                        elapsed_str.parse::<f64>().unwrap_or_default(),
                    );
                } else {
                    panic!("Unhandled time unit");
                }
            }
            "rows_affected" => {
                self.rows_affected = format!("{:?}", value).parse::<usize>().unwrap_or_default()
            }
            "rows_returned" => {
                self.rows_returned = format!("{:?}", value).parse::<usize>().unwrap_or_default()
            }
            _ => {}
        }
    }

    fn record_error(&mut self, _field: &field::Field, _value: &(dyn std::error::Error + 'static)) {}
}

impl<S> Layer<S> for SqlxQueryTracingLayer<S>
where
    S: Subscriber + for<'span> LookupSpan<'span>,
{
    fn on_event(&self, event: &Event<'_>, ctx: Context<'_, S>) {
        if event.metadata().target() != "sqlx::query" {
            return;
        }

        // intercept and parse data:
        let mut query_data = SqlxQueryDataExtractor::default();
        event.record(&mut query_data);

       println!("query_data: {:?}", query_data);
       // ... Use the event data for application purposes
    }
}

As seen, the elapsed, rows_affected and rows_returned fields are all emitted as dyn Debug - which means a consumer can only handle them by printing those fields and parsing them again. tracing unfortunately neither supports u64 nor time::Duration, so switching to those is not an Option.
A change would make the data cheaper to consume it moving towards i64 for the rows_ field and eg. something along elapsed_us which logs a plain i64 number for the elapsed time.
Changing the format for an existing field would however be a backward incompatible change. So either new fields would need to be added in addition to the existing ones or such a change could be performed with a new major version.
Since parsing a Duration in a fairly undefined string format is probably the biggest pain point right now, the biggest improvement would be to add elapsed_us in addition to elapsed. The changes to rows_ fields seem like something that could be done on the next major version change.

Since the logging format is not documented, I would not personally consider a change to it to be breaking. That's an implementation detail meant purely for informational and debugging purposes.
I'd be interested in discussing a stable log format, perhaps to a specific target, or another way to get this information out programmatically without having to parse log records.


Couldn't detect input encoding on Windows

I must have read too much into a few hints of windows support, when determining feasibility of using the tool from the Daedalus main process . I'm not really in a position to debug, so would appreciate any help in understanding feasibility of the linked use-case.
Win10
echo "Ae2tdPwUPEZ6ocSdVwf4ncX6RwJbfxzz2apqt5qoQGsEcbn3XkXGo79GfEC" | cardano-address address inspect
user error (Couldn't detect input encoding? Data on stdin must be encoded as bech16, bech32 or base58.)

echo "DdzFFzCqrhsmpr7JDY5JpDkXDcNLEYiSxyYPsCLE2sCpNxy19jiuJak98ac2Kep157PAyDpFQ4D5GZgukPhmfTFMU6ox3UpNp6iXf1sh" | cardano-address address inspect
user error (Couldn't detect input encoding? Data on stdin must be encoded as bech16, bech32 or base58.)

Ubuntu 18.04
echo "Ae2tdPwUPEZ6ocSdVwf4ncX6RwJbfxzz2apqt5qoQGsEcbn3XkXGo79GfEC" | cardano-address address inspect
{
    "stake_reference": "none",
    "address_style": "Icarus",
    "address_root": "6431c0baa7132ad66b05be0590e47f4e4ef52a52a22db1e43cd7f570",
    "network_tag": null
}

echo "DdzFFzCqrhsmpr7JDY5JpDkXDcNLEYiSxyYPsCLE2sCpNxy19jiuJak98ac2Kep157PAyDpFQ4D5GZgukPhmfTFMU6ox3UpNp6iXf1sh" | cardano-address address inspect
{
    "stake_reference": "none",
    "address_style": "Byron",
    "address_root": "3d7e904aba4ee1e21b2c3ebb77267c987e2c3a0ccde969a93ae617ae",
    "derivation_path": "581c354a2abbc5db82403cf5dca3a9bbf9121d5c83284c95d9e4aa264915",
    "network_tag": null
}

Tested from the context of Daedalus Bridge:

I believe this is because of an untrimmed \r on Windows. Will fix.

Fixed in a5c9b203206f4bde54a0598785889884004a2ca3

Curiously, this still fails with the same error when executing within a Node.js child process
@rvl ran into another platform specific bug

Just updated the Daedalus code to use a spawned process, although it just hangs. Reproducible via via the Daedalus nix-shell on linux:
[nix-shell:~/code/iohk/daedalus]$ cardano-address address inspect
37btjrVyb4KG5pZKzLb6SAKtkBeKC99E6shTz874jhgcEjPRrxafJG96hP5w7xW3xwjoWxPQNZyvQ8K4RG6awvCuUcjX5DCJQRA3C9Air5bkbSeBSj
^C

[nix-shell:~/code/iohk/daedalus]$ echo 37btjrVyb4KG5pZKzLb6SAKtkBeKC99E6shTz874jhgcEjPRrxafJG96hP5w7xW3xwjoWxPQNZyvQ8K4RG6awvCuUcjX5DCJQRA3C9Air5bkbSeBSj | cardano-address address inspect
{
    "stake_reference": "none",
    "address_style": "Byron",
    "address_root": "f3bc1b4dcd320af11686c03f144d2886e4b6719d34105d5d0d69dd5e",
    "derivation_path": "581cececdc43d62416a06a2e6ca422ea8d434cc488e6a0b0575703aa56d4",
    "network_tag": 459045235
}

This is still not working with https://github.com/input-output-hk/cardano-addresses/commit/dc729b0ba5ba112ee2bfe471c4df947ea7c76f28. I have the same outcome using both the available binary and in the Daedalus nix-shell.
@rvl any ideas?


Update editions-and-offerings.rst

Removed mention of cloud offering in Free section

Summary

Ticket Link

Hello @it33,
Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.


Support Autocomplete on TextField

Seems to work with PostalCode at least.
Added with: https://github.com/limefrogyank/BlazorFabric/commit/f4aafbc85311cc030f3f672e0c099ea965196f99


Converting ModalManager component to use CSS Modules

Summary
Converting ModalManager component to use CSS Modules. Fixes #672
Deployment Links

https://terra-core-deployed-pr-673.herokuapp.com/static/#/site/modal-manager
https://terra-core-deployed-pr-673.herokuapp.com/static/#/tests/modal-manager-tests

@PaulSolDev Could you take a look at this for functional review. The deployment links for functional review are in the PR description.

In IE 11 the disclose/dismiss functionality, when conducted within the modal work,flow appears abrupt.  Disclose doesn't appear to animate at all, but simply appear.  Dismiss shows animation, but is choppy.

Everything looks good in Safari.

@PaulSolDev The IE11 issues seem latent and existed before the css modules conversion. How would you feel about approving this conversion and logging an issue to look into the IE11 issues?

This looks good in macOS Chrome and macOS Firefox

I logged #687 to track that animation issue.

@tbiethman I'm good with that plan of action.
Functional review complete.  No new issues identified.


[Feature Request] Multiline Comments

Hi,
I know that you can make single line comments using # *** but having a system to make multiline comments, such as:
# comment start
comment  continues
***
***
# comment ends
Would be great! This is to enable long descriptive notes into these Google Docs that do not belong within the Anki Card.

I think this was related to what I was being discussed in #53. I do like your idea more though

released in V1.7.0


Tiled 1.5 Parallax Layer Support

This is not an issue, it is a question and if possible I would like to contribute.
The latest version of Tiled (1.5) officially support parallax scrolling: https://thorbjorn.itch.io/tiled/devlog/206681/parallax-scrolling-is-here

In my opinion it would be great if LibGDX supports that as well. Reading the property values is most likely not that difficult and could become part of the TiledMapTileLayer class or whatever it is called.
But maybe also the TiledMapTileRenderer should support it correctly? But how do you achieve the exact same result as in Tiled?
I personally always achieved a parallax effect by multiplying the camera position with a specific value to move that layer faster/slower, meaning that before rendering a layer I would modify the camera position temporarily, render the layer, and reset the camera position to its original values.
Is this the correct way to do it? What is the exact formula for the camera position modification because a simple "camera.position.x *= parallaxFactor.X" will most likely not be sufficient.
If someone could give me a little bit feedback I am happy to prepare a PR for it, if it is something useful.
What do you think?

Hey @Quillraven, as you have probably noticed by the lack of responses, there isn't really anyone in the team responsible for the whole tilemap stuff. There are also a bunch of other open issues/PRs related to tile maps which could use someone looking at them.
If you still want to go ahead and create a PR for parallax support that would be appreciated, but you should be prepared that it might not be reviewed anytime soon. Nonetheless, general information on working from source can be found on the official website.

@crykn thank you for the response :) I am happy to help and will prepare a PR in the next couple of weeks but would be interesting for me to understand, what is a good approach for the parallax effect.
As mentioned, I always temporarily adjust the camera position but I am not sure if this is a good way to do it. If someone has an advice I appreciate it.
Otherwise, I will look in more detail into this topic and see what I can come up with.


Make generator run in parallel

Existing implementation doesn't make use of parallelism in any step, we should make use of multiple cores.

it is parallel

Thanks for the correction Pavel. I found generator slow when I last used it and opened this after not seeing any par* usage within the codebase. Clearly cats-effect makes it run in parallel to some degree and I didn't check it back then. However I still think we can make it faster.


Don't lint if somebody is only labelling a PR

Must have seen me mucking around with labels. :wink: Definitely agree.

As per #2 - we never get a repeated comment now, so it doesn't really matter that the service does more work than it needs to - we don't get the extra comments anyway. Maybe we will want to look at reducing the work done in the future, but for now let's call this one done. :+1:


add mongodb writer to writer plugin manager

resolves https://github.com/zendframework/zend-log/issues/37

Ouch... there's another problem.
Evidently, Travis is installing ext/mongodb, vs ext/mongo, with current builds. ext/mongodb does not ship the MongoClient or Mongo classes that were present in the various 1.* builds. As such, tests currently do not run.
I'm not quite sure how to resolve this, but I'm a bit reluctant to expose the mongo writer unless we know it also works with ext/mongodb. Thoughts?

I'd say let's make two separate writers: 1) mongo 2) mongodb for ext-mongo and ext-mongodb.

About travis: I can install both extensions for travis, this is no big deal.

I guess we run into the same problems as mentioned in the zend-session component. We should use an extra repo (e.g. zend-log-mongodb) for specific writer, which relies on dependencies.

@weierophinney If you want me to change this to separate repos, please create those repos for me so I can make the split. Otherwise it should be ready to merge.

ping @weierophinney

Merged to develop for release with 2.9.0.


Migration Announcement: go-gitlab moves to GitLab.com

🗣 Migration Announcement: go-gitlab moves to GitLab.com
We're excited to announce that this Go package previously hosted at github.com/xanzy/go-gitlab
is moving to a new home at gitlab.com/gitlab-org/api/client-go! :tada:
-> When: ~soon, we'll provide an update in the coming days.~ 2024-12-10 at 14:00 UTC
What does this mean for you?
This migration will be straightforward:

To continue using the package, simply update your import path and
go.mod reference from github.com/xanzy/go-gitlab to gitlab.com/gitlab-org/api/client-go.
No other breaking changes are expected.

Why the move?
This transition ensures better alignment with GitLab's ecosystem and simplifies maintenance.
If you are contributing to this package you are most likely a familiar GitLab user already.
The project remains open source with the same license and community-driven,
with ongoing contributions encouraged and welcomed.
Maintainers Update
Sander (@svanharmelen), the original author of the package, has stepped down and offered
GitLab contributors to maintain it.
We extend our heartfelt thanks to Sander for his amazing work in creating and maintaining this library! :pray:
Moving forward, Timo (@timofurrer) and Patrick (@RicePatrick) will continue maintaining
the project to ensure its stability and growth.
Next Steps

We'll update this issue with an exact date of the migration.
Feel free to share your feedback and suggestions here in the issue.

Thank you for being part of this journey!
We're looking forward to continuing the development of this library together with the vibrant Go and GitLab communities.
Happy coding! :rocket:
- Timo

Migration date: 2024-12-10 at 14:00 UTC
Quick Updates:

Decided on final migration time: Tuesday 2024-12-10 at around ~14:00 UTC we'll start the migration.
Decided on final location: we'll migrate to https://gitlab.com/gitlab-org/api/client-go.

Important information:

If you want your issues, pull requests, comments etc. to be linked to your GitLab account, please make sure your e-mail addresses can be mapped. See https://docs.gitlab.com/ee/user/project/import/github.html#accounts-for-user-contribution-mapping
All contributions to this project during the migration will be "dangling on GitHub" - we'll make sure to let you know if this has happened and help to migrate the contribution over to GitLab.
This project will be archived once the migration is complete.
All old releases will still be available. Your project won't be broken because of this but you'll stop receiving updates.

Note - We will also be adding a deprecation notice on the NewClient function and on the module declaration that includes a notice of the migration.
During testing how best to communicate the migration of this module we examined using only the module deprecation pattern and noticed that the warning return is largely buried within the go get command, and users would only notice it if they were carefully examining the results of each line.
To ensure the migration is as visible as possible, we will therefore include a deprecation notice on the function as well. The deprecation will not be present on the migrated module, so only users still referencing the GitHub module path will have the deprecation on the function.
Hopefully this helps as many people migrate as possible!

Successfully migrated: 2024-12-10 at 16:00 UTC

We've successfully migrated to https://gitlab.com/gitlab-org/api/client-go.
When updating github.com/xanzy/go-gitlab to the latest version (v0.115.0) you'll receive deprecation warnings.
Latest release is v0.116.0 for https://gitlab.com/gitlab-org/api/client-go.

Migration
The migration itself should be a simple search and replace. Something along the lines of:
git grep github.com/xanzy/go-gitlab | cut -d: -f1 | sort | uniq | xargs -n1 sed -i 's#github.com/xanzy/go-gitlab#gitlab.com/gitlab-org/api/client-go#'
go mod tidy
go build


Refactor index.html; Reactivity

Currently, charts and information are not displayed correctly between roughly 35% and 60% of a 16:9 display. This would cause tablets and non-standard aspect ratios to not display properly.
Additionally, the positions of titles and tables are inconsistently structured when resizing the window

Done in #62.


Failing e2e tests

Below specs are failing (tested with dev-17, release branch release/1908-01):
regression/my-account/update-profile.e2e-spec.ts, update profile when a user is logged in:

should be able to update its profile CypressError: cy.click() cannot be called on a <select> element. Use cy.select() command instead to change the value.
should be able to see the new updated profile CypressError: Timed out retrying: Expected to find element: 'cx-update-profile-form .ng-value .ng-value-label', but never found it.

regression/site-context/language/language-my-account-pages.e2e-spec.ts, Language switch - my-account pages:

should change language in the page CypressError: cy.click() cannot be called on a <select> element. Use cy.select() command instead to change the value.

regression/site-context/language/language-registration-page.e2e-spec.ts, Language switch - registration page:

should change language in the page CypressError: cy.click() cannot be called on a <select> element. Use cy.select() command instead to change the value.

This tests have already been handled in the Gladiator's sprint board.
Update-Profile: https://github.com/SAP/cloud-commerce-spartacus-storefront/issues/3871
language-my-account-pages: https://github.com/SAP/cloud-commerce-spartacus-storefront/issues/3868
language-registration-page: https://github.com/SAP/cloud-commerce-spartacus-storefront/issues/3870


feat: reassure danger (bring PR to repo)

Summary
Duplicating #118 due to Danger.JS not being able to post comments (perf report) when running from forked repo because of limitations of access token.
See: https://github.com/PrismJS/prism/issues/2627
Test plan
All checks pass.

Closing, as it was created just to verify issues around GITHUB_TOKEN access for forked repos.


eza: create exa compatiblity symlink

Description of changes
Further to discussion on https://github.com/NixOS/nixpkgs/pull/253683 post merge.
Things done

Built on platform(s)

[X] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[X] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[X] Fits CONTRIBUTING.md.

I'll squash the commits when done.


I would like to know the difference between this project and Nvidia FastTransformer.

https://github.com/NVIDIA/FasterTransformer/tree/main/src/fastertransformer/kernels
Which parts of this project were referenced from FasterTransformer? I would like to understand the differences between these two projects and how they are optimized    :)

TurboMind is indeed developed based on fastertransformer, but if you use beyond compare to see the difference, the two are so different that they are not the same repo

FT not support LLaMa, so you can not directy inference on it
FT has no KV Cache Manager, no reliable quantization, int8_model==2 actually does not work
FT has fmha and many trivial optimizations

Hopes @lzhangzz  give more description.

@happened in addition to @tpoisonooo's response,

FT's context decoder implementation requires k_len == q_len thus context decoder is only used in the first round of a conversation. Our implementation supports context decoding new input tokens for throughout the conversation
With our caching mechanism only new input tokens will be decoded (not the entire history) unless the sequence has been evicted from the cache
Our KV Cache Manager implements LRU policy so that least recently used sequence will be evicted into token indices (the most compact form of KV cache) and recomputed when requested, so you don't have to worry about OOM
We support persistent batch (you may know it as "continuous batching") for both Python API or serving with tritonserver

#95

@happened  Please read this PR and give your comments https://github.com/InternLM/lmdeploy/pull/101


Adding Turkish Movie Sentiment Dataset

Checklist for adding MMTEB dataset

Reason for dataset addition:

It is a collected Turkish movie sentiment dataset and it is the first classification dataset for Turkish. Publication of the dataset.

[x] I have tested that the dataset runs with the mteb package.
[x] I have run the following models on the task (adding the results to the pr). These can be run using the mteb run -m {model_name} -t {task_name} command.

[x] sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
[x] intfloat/multilingual-e5-small

[x] I have checked that the performance is neither trivial (both models gain close to perfect scores) nor random (both models gain close to random scores).
[x] I have considered the size of the dataset and reduced it if it is too big (2048 examples is typically large enough for most tasks)
[x] Run tests locally to make sure nothing is broken using make test.
[x] Run the formatter to format the code using make lint.
[x] I have added points for my submission to the POINTS.md file.

Updated everything according to reviews

So close! Could you please also resolve the merge conflicts by syncing your fork and merging in the updates from main?

Should be ok now

@isaac-chung, when merging datasets into main, please prefix it with "fix:" to ensure that the version is bumped. You can find more on this in the contributing guidelines

Yep will do. Apologies!

No worries, with the number of PR atm. it is unlikely to cause any issues


b2clogin.com needed to be added

Please can you add b2clogin.com to help others avoid the failed training course we had today.
Ref: https://learn.microsoft.com/en-us/azure/active-directory-b2c/b2clogin

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

ID: dd333ae2-34f6-4afd-cdb1-db72303a5736
Version Independent ID: 5fc52fe8-dade-b8b7-7126-c4e7dd902e62
Content: Office 365 IP Address and URL web service - Microsoft 365 Enterprise
Content Source: microsoft-365/enterprise/microsoft-365-ip-web-service.md
Service: microsoft-365-enterprise
GitHub Login: @kelleyvice-msft
Microsoft Alias: kvice

@kelleyvice-msft Please help us in resolving this issue. Thanks

Thanks for reaching out to the Microsoft 365 Enterprise content team. Because all Microsoft 365 endpoints data displayed in learn.microsoft.com articles is autogenerated by the Microsoft 365 endpoints web service, the content team cannot resolve issues directly related to this data.
We recommend that you contact your organization’s TAM (Technical Account Manager) to escalate your inquiry to the engineering team associated with the endpoint in question. If you do not have a TAM assigned to your organization, please contact Microsoft Support.


upstream: add connection pool circuit breaker stats

Description: add connection pool circuit breaker stats
We want to know how often the connection pool circuit breaker trips as a hint that the limit may need to be increased. Add a stat to do so.
Risk Level: Medium
Testing: UT + Integration test
Docs Changes: Documented in the stats overview as well as the circuit breaker docs.
Release Notes: Added a note
Other notes: I didn't add a counter for the total number of connection pools. I can do that too if we're not worried about the memory consumption involved.

/retest


String replace in copied file?

Tried this for the first time. I was expecting it to string replace all the names in the new file, but it seems that's not currently a feature unless something broke for me.
Is is something you'd consider?

generact BigDogs
Set new name SmallDogs
generact auto replaces all versions of BigDog with SmallDog (so bigDog->smallDog, big_dog->small_dog, etc)

Probably related to https://github.com/diegohaz/generact/issues/14#issuecomment-326831291
I chose not to update those names because it could lead to false positives.

No, it didn't rename anything. I manually passed it the path to events.ts, a mobx-state-tree store.
What about adding a CLI flag to replace all variants? If it doesn't replace all variants, it's quicker and easier for me to just do the normal copy/paste dance.


mint: allow for a NotImplemented response to multipartupload in aws-sdk-go

Description
Motivation and Context
How to test this PR?
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[ ] Fixes a regression (If yes, please add commit-id or PR # here)
[ ] Documentation needed
[ ] Unit tests needed

I'm wondering if we should have a white list of functionalities that we expect to return 501 and if the functionality isn't in the list then report a fatal error as usual.

I'm not sure to understand what you mean. At which level the whitelist would be? Do you mean for all tests (something that would run the tests, check the errors, and then decide if it's really fatal from this whitelist? Or do you mean we should have this mechanism in each mint testsuite?

At which level the whitelist would be? Do you mean for all tests (something that would run the tests, check the errors, and then decide if it's really fatal from this whitelist? Or do you mean we should have this mechanism in each mint testsuite?

I don't mostly say where or how because I'm not familiar with this code; I'd say where it's easier to do it and more maintainable.
What I see is that if we don't check what functionality responds 501 then we can have false positives due that 501 is an acceptable response when in reality it isn't acceptable for the functionalities that we want to expose.

This check is only done in testListMultipartUploads only, when creating the multipart upload.


Clarify parameters that are not present in SP2010

The parameters FullTrustBinDeployment and CompatibilityLevel are not present in SharePoint Server 2010, however both docs for these parameters mentioned that they were present in this version of the product.
In summary, for parameters FullTrustBinDeployment and CompatibilityLevel, removed the 'SharePoint Server 2010 from the 'Applicable' product versions.

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

sharepoint/sharepoint-ps/sharepoint-server/Install-SPSolution.md
:white_check_mark:Succeeded
View (sharepoint-ps)

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Use 'click' event for checkbox and radio (fix #4620)

fix #4620

use click event instead of change event.
add test case for #4521

Will this event still trigger if someone isn't clicking it? For instance, through keyboard tabbing & spacebar?

Keyboard's spacebar will change the checkbox's checked status and trigger click event on Mac Chrome. If the browser supports the spacebar, it should also trigger the click event.
https://www.w3.org/TR/WCAG20-TECHS/SCR35

Hmm, the CI failed after merging (but it was passing for the PR itself...) Need to investigate a bit more.

I'll take a look.

Something wrong with the checkbox test case. The checkbox and radio need the same test case, so I made a mistake when doing  it.  I'll check why it works in the PR.

I'll also update the contribution guide later.


Add news for upcoming 0.12

Coverage remained the same at 93.796% when pulling 5c4177b48243ed7dad8cdc3eb3a7dba8ed086136 on Juanlu001:changelog-0-12 into a4b7874c674da5b9a57a037b9af598004b90740c on satellogic:master.


groupyr and numpy

I followed your instruction manual, but it seems the required version of groupyr (0.3.2) conflicts with the version of numpy you demanded, e.g.
pip install numpy==1.23.2
...
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
groupyr 0.3.2 requires numpy==1.21.5, but you have numpy 1.23.2 which is incompatible.

Any thought?

That's normal ! the library should work anyway ;)

Then, why not remove the dependency of using numpy 1.23.2 thought the document and the repo?

That's normal ! the library should work anyway ;)

Unfortunately, some of the features that we are using are not in the numpy version numpy==1.21.5, but in older version.
The groupyr package used to implement Sparse Group Lasso and Sparse Group Logit Lasso fixed its version of numpy to numpy==1.21.5 even if it is working well with older version. So, we just updated the numpy version to numpy==1.23.2 because it was our setup.

Note: There could be an issue with numba if the numpy version is too old, depending on the version of numba.

We have published a light-weight version of Stabl with the release v1.0.0-lw. Please refer to this version if you have issues with Julia and Groupyr installation.
I also close this issue, as it is resolved by the light-weight release ✨


fix: #489 - bug with date not changed after typing

Fixed the bug appearing after typing a date, when all subsequent date selections via the picker was not alter the displayed value.

Coverage decreased (-5.9%) to 94.072% when pulling be0c3442a4d7b31f9936cb1c1401d69da0056073 on yyuurreecc5:master into 4f3037d2404387b011614163c7fa673cda45971d on charliekassel:master.

:+1:


DynamoDB C# interfacing and publish-subscribe.

Hi @HoraceGonzalez ,
Here it comes, tested on Visual Studio, Xamarin Studio, and MonoDevelop on Linux.
Thanks!
Dima

@HoraceGonzalez , you probably want to review it either after https://github.com/RealtyShares/RealtySharesPublic/pull/1 is merged in, or by looking into the main relevant https://github.com/dkorolev/RealtySharesPublic/commit/6aff4872bfc48b5c5d7f635e64dd6b4f21ce4948 commit.


Prisma Client is really slow

I've tried using prisma-client to get all the users from a local postgres database which is running in a docker container, but when I looked at how much time prisma took to get the data, it's around 200ms however the generated sql was perfectly fine.

I searched for any popular node.js client to test my postgres database if the problem was from it, then I chose node-postgres and copied the sql prisma used to get the data and paste it and surprisingly it took 2ms.

I don't know what is slowing prisma client, please anyone who can explain what's slowing it that much or give me solutions if there was a problem cause I'm completely new to prisma.

Does https://github.com/prisma/prisma/issues/6301 help?

For Prisma you are measuring both the time to connect to the database, and run the query. For the Node Pg Client you are doing a connect() outside your measurement. If you move that in, you should get numbers that are closer together.
As soon as you do multiple requests at the same time, Prisma will use an internal connection pool to reuse connections, while your Postgres Client implementation will open a new connection each time (although the library of course also has a mode to pool connections).
Additionally: Does #6301 improve the Prisma numbers a bit?

I tested it again, after inserting a bunch of users twice to let prisma establish the pool connection then I requested all users and measured how much does prisma took to get the data and surprisingly it took 7-9ms and when I enabled napi in my prisma-client now it's taking 4-5ms after two operations and 35ms from the first one which is a lot better.


Update golang.org/x/oauth2

Can we bump up golang.org/x/oauth2 version?
The one here is old and doesn't support "executable.command" in the external account credentials file, as documented in https://google.aip.dev/auth/4117

Confirmed latest (v0.5.0 from 2/8/2023) from https://pkg.go.dev/golang.org/x/oauth2/google supports "executable.command" in the external account credentials file.

Any updates? I see the PR#437 sitting in Draft for a few months.

Whoops - thanks for pinging here. I've promoted it to a formal PR and it's in review!


fix(storage): do not acquire quota for shared buffer in serving mode

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
close https://github.com/risingwavelabs/risingwave/issues/16716
Checklist

[ ] I have written necessary rustdoc comments
[ ] I have added necessary unit tests and integration tests
[ ] I have added test labels as necessary. See details.
[ ] I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features #7934).
[ ] My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
[ ] All checks passed in ./risedev check (or alias, ./risedev c)
[ ] My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)

[ ] My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

[ ] My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

Let's include it in 1.9.1


perf: Improve performance when handling large yaml files

I'll edit this PR with details about the changes after I've added a performance test or two, but before I mark the PR as ready.
Closes #6597

The current performance gains are significant, but we still haven't escaped from the terrible time complexity of CommentedMap.__deepcopy__. Whereas before some large yaml files (e.g. 1000 lines long) would result in Meltano taking several minutes to perform a simple config <plugin name> list command, now it only takes a couple seconds. Unfortunately with a Meltano file that is not much larger (e.g. 1500 lines long) we find ourselves back with an unacceptable performance in the minutes.
Caching meltano.yml and the config files it includes is nice and fairly easy, but we'll have to tackle this at its source to really fix it. That means avoiding or alerting the behaviour of CommentedMap.__deepcopy__. Maybe an easy approach will be to downcast most of our CommentedMap objects to ordereddict, which is one of its base classes. My guess is that its deepcopy performance is significantly faster - no worse than a dict.

Without the changes in this PR, meltano config tap-exchange-rates-api list takes ~55 seconds on my computer using the meltano.yml file provided to me by Dennis Hume. With the changes, it takes ~1.7 seconds.
I think this provides us with sufficient reason to incorporate these changes, even though they don't fully address the problem. As mentioned previously, to fully address the problem (i.e. have reasonable performance even when the YAML files being handled are a couple thousand lines long) we need to avoid CommentedMap.__deepcopy__. I tried patching it to use copy instead of deepcopy, and that made the performance acceptable, but obviously breaks the functionality. A better approach I'm currently testing is to convert the "commented" collections (i.e. CommentedMap, CommentedSeq, and CommentedSet) to stdlib collections (i.e. dict, list, and set respectively).

A better approach I'm currently testing is to convert the "commented" collections (i.e. CommentedMap, CommentedSeq, and CommentedSet) to stdlib collections (i.e. dict, list, and set respectively).

This won't work. It totally solves the performance regression, but we can't retain the comment info at depth.

One approach @edgarrmondragon and I considered was making Project.meltano a cached property, and only writing updates to the files at the end of the execution of the command. Making Project.meltano a cached property helps for the mid-sized YAML file case, but doesn't make dealing with large (e.g. 2k+ lines) YAML files.
The caching I have added in this PR already addresses the mid-sized YAML case, and is almost passing all tests. By contract, having Project.meltano as a cached property is causing a very large number of test failures. It'll probably be easier, at least in the short term, to just use the caching. Long-term we'll want to consider what kind of impact these decisions will have on running the Meltano core logic for the managed service.
I'm beginning to think we can't solve the terrible performance around large YAML files. It's something we'll have to accept if we want to preserve comments using ruamel. Fortunately such incredibly large YAML file are rare - the original issue is concerned with a mid-sized YAML file that caching can make fast enough.


TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/37039

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/49317

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/54699

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/67257

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/82344

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/108735


hyper-v

[在此处输入反馈]

文档详细信息
⚠ 请勿编辑此部分。 docs.microsoft.com ➟ GitHub 问题链接必须具有此部分。

ID: db4304f8-e450-1acd-f5de-4864ff99ab05
Version Independent ID: 5e87a4e1-a7c5-01e1-0d4f-6b14e1d8e4c7
Content: HcsCreateComputeSystem
Content Source: virtualization/api/hcs/Reference/HcsCreateComputeSystem.md
Product: virtualization
Technology: virtualization
GitHub Login: @FayMeng
Microsoft Alias: qiumeng

We hugely appreciate your contribution, feedback, and support to our technical documentation.
We’ve phased out GitHub Issues on this repository as the feedback mechanism for content and have replaced it with a new feedback system. For more information see, Content User Feedback. As part of this rollout, we are migrating your issue where our team will use your comments to improve the documentation experience. Unfortunately, this does mean you won't be able to access this issue after the migration is complete.
All issues will be migrated by Thursday 29th August 2024.
Once again, thank you for your valuable feedback, we hope you’ll continue to contribute using our new feedback system.