Build Version detection not working when Zephyr Kernel is a Git Submodule

Describe the bug
In 91709778a4878c80e96e1435a047964725ee3517 build-time version header generation was added. This uses
if(DEFINED BUILD_VERSION)
  set(build_version_argument "-DBUILD_VERSION=${BUILD_VERSION}")
elseif(EXISTS ${ZEPHYR_BASE}/.git/index)
  set(git_dependency ${ZEPHYR_BASE}/.git/index)
else()
  message(WARNING "ZEPHYR_BASE=${ZEPHYR_BASE} doesn't appear to be a git "
    "repository, please specify '-DBUILD_VERSION=<version>'")
endif()

When the repository is a git sub-module¹, the .git type is not a directory, but a regular file, that may look like this:
gitdir: ../../../.git/modules/firmware/zephyr/kernel

…which points to the module's actual git-database inside the super-project.
With that, the else() branch of the if statement is triggered, triggering the warning that's attached to it.
¹ https://git-scm.com/docs/git-submodule
To Reproduce
Steps to reproduce the behavior:

Make a git-repository, with a blinky application inside.
Add the zephyr-kernel repository as a sub-module.
Build the project.
Observe the described warning.

Expected behavior
The warning is not triggered.
Pick up the index file from the super-project's git-database connected to the kernel's sub-module and file it into git_dependency (I assume that's doing the trick; I didn't check what gen_version_h.cmake does; but the way it is used right now suggests it).
Impact
It looks like the zephyr/include/generated/version.h file still is generated correctly. At least initially, because the add_custom_command() call that generates  the file is issued regardless of the tested conditions. The fact that git_dependency is not set correctly, will likely make this inconsistent. If it wouldn't, the added git_dependency in the current code would not serve any purpose.
Logs and console output
Don't have it available right now; this happened on a work-machine. Filing the issue from home.
Environment

Linux; but Windows should be affected too.
gnuarm on debian 10; but this is not toolchain dependent.
Zephyr v3.0.0; but the code in current main (08d98c247aa267e8d1f2bef64bf47d8befd22b3e at the time of writing) uses the same code.

Additional context
There is not much additional context, as the issue should affect everybody who uses the zephyr kernel from a git sub-module instead of a standalone clone.

Is there any reason why you are not using the west module? (see https://github.com/zephyrproject-rtos/example-application/blob/dfc6b88d25e2d738fe20f86e5e8ac40e0831cda9/west.yml#L13)
Adding the Zephyr repository as a Git submodule is not a normal workflow when it comes to Zephyr, and may even be said to be unsupported because there really is no reason to do so under normal circumstances.
cc @tejlmand

We are using git sub-modules to precisely define the versions of all included software in a larger system and use cmake directly instead of west. This works nicely with the non-zephyr parts of the software system we are building. I fail to see how this is abnormal, unless west was upgraded to a hard dependency at some point in time, that I must have missed.
If this use-case were to be declared unsupported, that would be rather sad to hear. FWIW, in the past such issues were addressed (i.e. #7207).

I fail to see how this is abnormal, unless west was upgraded to a hard dependency at some point in time

Maybe @mbolivar-nordic can provide some insight.

We are using git sub-modules to precisely define the versions of all included software in a larger system and use cmake directly instead of west.

I assume you are referring to this:
https://github.com/ft/chip-remote/tree/master/firmware
If you have a look at the "example-application", it effectively achieves what you described above without using Git submodules.
If you do not like calling west build for whatever reason, you can still directly call CMake even when your repository is using the west modules (the only time you need to use west is when updating the west modules using west update).

I fail to see how this is abnormal, unless west was upgraded to a hard dependency at some point in time
Maybe @mbolivar-nordic can provide some insight.

The documentation still has its without-west¹ page, FWIW.
¹ https://docs.zephyrproject.org/latest/guides/west/without-west.html

We are using git sub-modules to precisely define the versions of all included software in a larger system and use cmake directly instead of west.

I assume you are referring to this: https://github.com/ft/chip-remote/tree/master/firmware

Well, this is an open-source project of mine, that uses the same idea to build its firmware code, as do the larger systems that are developed at work. It's quite a limited example, because there is nothing else except the firmware here.

If you have a look at the "example-application", it effectively achieves what you described above without using Git submodules.
If you do not like calling west build for whatever reason, you can still directly call CMake even when your repository is using the west modules (the only time you need to use west is when updating the west modules using west update).

There are two things that I would like to do: a) Use git to specify all software versions, not a separate format that is only used by zephyr; and b) Build all combinations of applications/boards/toolchains/build-configurations as declared in a top-level CMakeLists.txt as a subset of software to be produced by a cmake build. The latter is totally unrelated the issue, though, and could certainly by solved by means other than cmake.
As for the former, I understand that zephyr decided against direct use of git submodules for code organisation, and instead invest time into the development of west and I can understand the rationale. But that does not invalidate the use of them in situations in which they work perfectly well — and those are certainly numerous.

I have a possible fix for this in https://github.com/ft/zephyr/commit/39d7c252bc940830140f017bf22b984836daf463.
Also, this thread made me read up on some of the newer things that west can do (it's been a while since I last looked). There's some interesting features in there. There's also some support for initialising submodules, so I guess it's not the worst idea in the world to keep supporting this. :)
WDYT?

At the time of writing, we have not officially declared the west utility to be a requirement for using Zephyr; but, we are almost headed there (at least, for the module/component management).
Usages like this will likely become unsupported or unsustainable in the future and I would highly recommend that you use the west since installing it is as simple as running one or two commands and there is really nothing to lose by doing so.
Nevertheless, there is nothing wrong with submitting a fix for issues like this in the meantime.

No, we have committed to keep west an optional tool.

While that may be the case on paper, we keep adding new features and schemes that make it harder to use Zephyr without west.
Unless you are into making your life harder for no good reason, I would strongly recommend using west.

we keep adding new features and schemes that make it harder to use Zephyr without west.

not sure which features you are referring too and what exactly you mean by harder ?
But if we take an example like sysbuild, #40555, then of course using west build makes it easier to invoke sysbuild, but you can still invoke CMake directly for the same feature. That you can regard as harder.
But if a user / company opt-out of west, then they probably will create their own wrapper if they will benefit for sysbuild.
Features like west flash might not be important for users with boards that has multiple SoC or DSPs, where only a single SoC is running Zephyr. All the other SoCs / DSPs  probably need custom flashing tools / scripts anyway.
In such cases, there can be good reasons for not using west.
But if Zephyr is the center of your product, then sure, west is the way to go.

No, we have committed to keep west an optional tool.

While that may be the case on paper, we keep adding new features and schemes that make it harder to use Zephyr without west.
Unless you are into making your life harder for no good reason, I would strongly recommend using west.

Strongly agree.
I think Zephyr lacks a proper guide on making Zephyr applications. We have a lot of details, but not a guide that says, "this is the recommended way to go for most use cases". Luckily, we now have example-application, which I think it helps a bit on this front. If every Zephyr user goes its own way, changes upstream will likely have an impact when upgrading Zephyr, leading to bad experience/Zephyr reputation. Another story is how Zephyr designs stuff internally, e.g., I agree it is good to decouple west/CMake.

this is the recommended way to go for most use cases

I agree that west is the recommended way, but there is a long way from having this as a recommended way, and then to state:

Adding the Zephyr repository as a Git submodule is not a normal workflow when it comes to Zephyr, and may even be said to be unsupported

Usages like this will likely become unsupported or unsustainable in the future

Highlighted words by me.
This is what I'm addressing, cause stating that such workflows is unsupported or will be unsupported is simply not true.
There are big users of Zephyr who are using other tools, mainly because Zephyr is just a subset (and thus not the center) of larger projects. Such projects can be using git submodules, google repo or any other tool.
So we should not start to give the impression that the use of Zephyr is locked to west.

Sure, unsupported might not have been the best choice of words, but it already is and will likely become unsustainable.

I want to pile on here for the record while I'm going over older issues and PRs today.
West is, was, and shall remain optional. However, not using west may be inconvenient. This was always the plan.


Make quorum info more expressive

What changes are proposed in this pull request?
Add output to the quorum info command. Goes from this
Journal domain	: MASTER
Quorum size	: 3
STATE		SERVER ADDRESS
AVAILABLE	arthurs-mbp.hsd1.ca.comcast.net:50577
AVAILABLE	arthurs-mbp.hsd1.ca.comcast.net:50580
AVAILABLE	arthurs-mbp.hsd1.ca.comcast.net:50583

to this:
Journal domain	: MASTER
Quorum size	: 3
Quorum leader	: arthurs-mbp.hsd1.ca.comcast.net:53837

STATE       | PRIORITY | SERVER ADDRESS
AVAILABLE   | 0        | arthurs-mbp.hsd1.ca.comcast.net:53834
AVAILABLE   | 0        | arthurs-mbp.hsd1.ca.comcast.net:53837
AVAILABLE   | 0        | arthurs-mbp.hsd1.ca.comcast.net:53840

Why are the changes needed?
This will allow the user to decipher who the leader of the quorum is easily

Codecov Report

Merging #13948 (5a98c9f) into master (a0c3c6a) will decrease coverage by 26.15%.
The diff coverage is 28.98%.

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

alluxio-bot, merge this please


WebSocket frame decoding: replace byte array[4] frame mask with int.

Followup to https://github.com/netty/netty/pull/12969.
Motivation:
Make implementation consistent with recent changes on WebSocket08FrameEncoder https://github.com/netty/netty/pull/12969.
Modifications:
WebSocket08FrameDecoder: replace frame mask byte array[4] with int.
Result:
Simpler implementation consistent with WebSocket08FrameEncoder.

Looks like there are some consistent autobahn (HTTP/2 fuzzing) test failures. Perhaps this introduced a subtle behaviour change?

@mostroverkhov let me know once this is ready for a final review...

@mostroverkhov thanks a lot!


Support for scheduling containers with multi AZ High Availability

I have 6 instances running on AWS with 2 instances on each availability zone, so I have 6 hosts in my rancher Dashboard, with labels:
az:us-west-2a(key:value) - 2 instances
az:us-west-ab(key:value) - 2 instances
az:us-west-2c(key:value) - 2 instances
My use case is, I am running a service with 3 containers and I want to schedule it in such a way that at least one container should run on each availability zone i.e.
one container should run on one of the instance having label az:us-west-2a(key:value)
one container should run on one of the instance having label az:us-west-2b(key:value)
one container should run on one of the instance having label az:us-west-2c(key:value)

This seems to be a request for Rancher, not RancherOS. Would you mind filing an issue in rancher/rancher instead?

Yes, will do that.

Here is the issue link on rancher in case anybody wants the same: https://github.com/rancher/rancher/issues/4705


Parametric UMAP Model Broken on Latest Tensorflow Platform?

Hello, let me begin by saying I really appreciate UMAP, and have used the non-parametric version in the past. I recently learned about the Parametric UMAP, and wanted to give it a shot for a project. I was able to define my encoder/decoder and train a model quickly at first on an EC2 instance without a GPU. However, when trying to save the model for later use, the I wasunable to do so.
pumap_model.save('../models/pumap_v1')

triggered the following.
WARNING:tensorflow:Compiled the loaded model, but the compiled metrics have yet to be built. `model.compile_metrics` will be empty until you train or evaluate the model.
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[44], line 1
----> 1 pumap_model.save('../models/pumap')

File ~/miniconda3/envs/art/lib/python3.10/site-packages/umap/parametric_umap.py:494, in ParametricUMAP.save(self, save_location, verbose)
    492 if self.encoder is not None:
    493     encoder_output = os.path.join(save_location, "encoder")
--> 494     self.encoder.save(encoder_output)
    495     if verbose:
    496         print("Keras encoder model saved to {}".format(encoder_output))

File ~/miniconda3/envs/art/lib/python3.10/site-packages/keras/utils/traceback_utils.py:70, in filter_traceback.<locals>.error_handler(*args, **kwargs)
     67     filtered_tb = _process_traceback_frames(e.__traceback__)
     68     # To get the full stack trace, call:
     69     # `tf.debugging.disable_traceback_filtering()`
---> 70     raise e.with_traceback(filtered_tb) from None
     71 finally:
     72     del filtered_tb

File ~/miniconda3/envs/art/lib/python3.10/site-packages/tensorflow/python/trackable/data_structures.py:823, in _DictWrapper.__getattribute__(self, name)
    821   return object.__getattribute__(self, name)
    822 else:
--> 823   return super().__getattribute__(name)

TypeError: this __dict__ descriptor does not support '_DictWrapper' objects

This is without using a custom encoder or decoder. I believe the same issue appears when trying to save a Parametric UMAP model trained on MNIST dataset on latest versions of the libraries. For reference
$ python
Python 3.10.9 | packaged by conda-forge | (main, Feb  2 2023, 20:20:04) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import umap
>>> umap.__version__
'0.5.3'
>>>
>>> import tensorflow as tf
>>> tf.__version__
'2.12.0-rc0'
>>>
>>> import tensorflow_probability as tfp
>>> tfp.__version__
'0.19.0'

Later, when moving to a GPU instance, with the same version of the packages, the model.fit(..) step breaks down. Here's some output.
ParametricUMAP(autoencoder_loss=True, decoder=<keras.engine.sequential.Sequential object at 0x7fc1f7f89ab0>, dims=(16233,), encoder=<keras.engine.sequential.Sequential object at 0x7fc1f7ce6590>, optimizer=<keras.optimizers.adam.Adam object at 0x7fc1ea30b3a0>, parametric_reconstruction=True, run_eagerly=True)
Sun Mar  5 06:00:46 2023 Construct fuzzy simplicial set
Sun Mar  5 06:00:47 2023 Finding Nearest Neighbors
Sun Mar  5 06:00:49 2023 Finished Nearest Neighbor Search
Sun Mar  5 06:00:50 2023 Construct embedding
Epoch 1/10
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[56], line 1
----> 1 pumap_model.fit(data[:10, :]);

File ~/proj/notebook/pumap.py:203, in ParametricUMAP.fit(self, X, y, precomputed_distances)
    201     return super().fit(precomputed_distances, y)
    202 else:
--> 203     return super().fit(X, y)

File ~/miniconda3/envs/art/lib/python3.10/site-packages/umap_learn-0.5.3-py3.10.egg/umap/umap_.py:2736, in UMAP.fit(self, X, y)
   2734 if self.transform_mode == "embedding":
   2735     epochs = self.n_epochs_list if self.n_epochs_list is not None else self.n_epochs
-> 2736     self.embedding_, aux_data = self._fit_embed_data(
   2737         self._raw_data[index],
   2738         epochs,
   2739         init,
   2740         random_state,  # JH why raw data?
   2741     )
   2743     if self.n_epochs_list is not None:
   2744         if "embedding_list" not in aux_data:

File ~/proj/notebook/pumap.py:463, in ParametricUMAP._fit_embed_data(self, X, n_epochs, init, random_state)
    460     validation_data = None
    462 # create embedding
--> 463 history = self.parametric_model.fit(
    464     edge_dataset,
    465     epochs=self.loss_report_frequency * self.n_training_epochs,
    466     steps_per_epoch=steps_per_epoch,
    467     max_queue_size=100,
    468     validation_data=validation_data,
    469     **self.keras_fit_kwargs
    470 )
    471 # save loss history dictionary
    472 self._history = history.history

File ~/miniconda3/envs/art/lib/python3.10/site-packages/keras/utils/traceback_utils.py:70, in filter_traceback.<locals>.error_handler(*args, **kwargs)
     67     filtered_tb = _process_traceback_frames(e.__traceback__)
     68     # To get the full stack trace, call:
     69     # `tf.debugging.disable_traceback_filtering()`
---> 70     raise e.with_traceback(filtered_tb) from None
     71 finally:
     72     del filtered_tb

File ~/miniconda3/envs/art/lib/python3.10/site-packages/keras/engine/training.py:1697, in Model.fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_batch_size, validation_freq, max_queue_size, workers, use_multiprocessing)
   1695 logs = tf_utils.sync_to_numpy_or_python_type(logs)
   1696 if logs is None:
-> 1697     raise ValueError(
   1698         "Unexpected result of `train_function` "
   1699         "(Empty logs). Please use "
   1700         "`Model.compile(..., run_eagerly=True)`, or "
   1701         "`tf.config.run_functions_eagerly(True)` for more "
   1702         "information of where went wrong, or file a "
   1703         "issue/bug to `tf.keras`."
   1704     )
   1705 # Override with model metrics instead of last step logs
   1706 logs = self._validate_and_get_metrics_result(logs)

ValueError: Unexpected result of `train_function` (Empty logs). Please use `Model.compile(..., run_eagerly=True)`, or `tf.config.run_functions_eagerly(True)` for more information of where went wrong, or file a issue/bug to `tf.keras`.

Thanks in advanced for your help.

I haven't tried installing the pre-release of tensorflow that you are using, but everything works fine in the current version.
If this is an unstable pre-release they might fix things on their end.

As of now with the latest Tensorflow 2.16.1 I get the above crash as soon as I import umap :-/


store/postgres: fix syntax error with Postgres 9.6

Postgres 9.6 requires '()' after the name of a function when dropping it.

This should be ok as we have not applied this migration in production, nor tagged it for a new release. And it's only a problem with Postgres 9.6, not with 10+


UploadableListener. Wrong fileName with appendNumber.

When I'm using the appendNumber=true, then the number is added to the filePath, but not the fileName. As I understand, there might be some people who don't want the number to be added to the fileName (as the number is only to distinguish the files on the server, and the end-user shouldn't be aware of it). I on the other hand would want the number to be available in my entity without having to store the filePath in the database.
The idea is that the filePath seems to be an absolute path and I don't want this stored. What if the absolute path of my application changes, then I would need to update every entry in my database. I want to store only the fileName (or a relativePath, but there doesn't seem to be such a thing here). The fileName should represent the file name that is located on disk.
Although, there can be two annotations, one that specifies the file name on disk and the other that specifies the original file name.

Ok. It's doable by implementing a callback that will do the str_replace on the path and save the result to another field in the entity. Still, seems it would be a nice feature to have already made and available via an annotation.

@jee7 can you explain how you did this? For strangest of reasons I am using fileName to create a link to the file, and it used to work with appendNumber, but now I cannot get to latest files as it always resolves to the original file uploaded.

My problem was that I did not want a full path storage/files/submission/file.zip to be stored in the DB. Because it depends on the environment (storage/files) and the entity (submission). So I implemented a afterUpload callback, which removed the first part, leaving only the unique file name. Something like this:
    public function afterUpload($info) {
        $this->changedFileName = str_replace($this->getPath() .'/', '', $info['filePath']);
        $this->fileType = $info['fileMimeType'];
        $this->fileSize = $info['fileSize'];
    }

   public function getPath() {

        return $this->getBasePath() . $this->getRelativePath();
    }

    public static function getBasePath() {

        return storage_path(self::getRelativeBasePath());
    }

    public static function getRelativeBasePath() {

        return 'files/submissions/';
    }

In you Uploadable annotation you add callback="afterUpload".

I did the same thing but with different function name - changed that so it's easier to talk:
    public function afterUpload(array $fileInformation) {
        //$this->fileName = $fileInformation['fileName'];
        dump($fileInformation);
        dump(array_pop(explode('/',$fileInformation['filePath'])));
        $this->setFileName(array_pop(explode('/',$fileInformation['filePath'])));
    }

Dumps return what I want - the fileName with appended number but my problme now is how do I save such entity (from itself?) ? The new fileName information is not persisted of course since it happens AFTER uploading a file.

Oh, I forgot to mention. In the annotation there is also pathMethod="getPath".
But, yes, it is called after upload, but it should be before persist. Are you sure it is not?

@jee7 yes I'm sure. When the code above is invoked the file name does not change. I don't use file entity outside of Document entity I'm using so all data and a file is written into it but that should not be the problem here.
How can I get the fileInfo object from the entity? I might be able to use the "PreUpdate" callback if it's available at that time.

Interesting. It changes for me. I added some callbacks and:
string 'Pre Persist: ' (length=13)
string 'After Upload: ddr2-11.jpg' (length=25)
string 'Post Persist: ddr2-11.jpg' (length=25)

The number 11 there is the appended number.
Although I am creating a new entity each time (because I need the previous files to also be available). I did not test with updating the entity, but it should work in the same order.
Also, I'm using:
"name": "laravel-doctrine/extensions",
"version": "1.0.2",

"name": "laravel-doctrine/orm",
"version": "1.0.10",

"name": "doctrine/orm",
"version": "v2.5.1",

So I might be a little outdated. Maybe this logic has changed...

I'm not using Laravel types but Symfony ones, so there may be something different between them, also I found that in production it seems to work.. most of the times as expected but not on dev. Either it was updated and stopped working or there are other aspects that I don't know of.

This is still an issue. The fix is simple. I will try to setup a PR

IIUC this should have been fixed in https://github.com/doctrine-extensions/DoctrineExtensions/pull/2460


Added my GitHub profile README repo and the corresponding article

What type of PR is this? (check all applicable)

[x] 🚀 Added Name
[ ] ✨ Feature
[ ] 🐛 Grammatical Error
[ ] 📝 Documentation Update
[x] 🚩 Other

Description
Added my GitHub profile README repo and the corresponding article
Add Link of GitHub Profile
https://github.com/mokkapps/mokkapps

Looks Great 👍🏽, I'm merging now,
P.S - Don't forget to leave a ⭐ if you found this helpful.
Thanks


bug: NextAuth session is undefined when passed as a prop from getServerSideProps

Provide environment information
System:

OS: Linux 5.10 Ubuntu 20.04.5 LTS (Focal Fossa)
CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
Memory: 6.50 GB / 7.74 GB
Container: Yes
Shell: 5.0.17 - /bin/bash

Binaries:

Node: 18.0.0 - ~/.nvm/versions/node/v18.0.0/bin/node
npm: 8.6.0 - ~/.nvm/versions/node/v18.0.0/bin/npm

Note: I'm using Windows Subsystem for Linux
Describe the bug
const NewRecipe: NextPage<
  InferGetServerSidePropsType<typeof getServerSideProps>
> = ({ session }) => {
  const router = useRouter();

  console.log(session); // this logs undefined to the console

  return (

      <Button handleClick={() => router.back()} variant='secondary'>
        back
      </Button>

  );
};

export const getServerSideProps: GetServerSideProps<{
  session: Session;
}> = async ctx => {
  const session = await getServerAuthSession(ctx);

  if (!session) {
    return {
      redirect: {
        destination: '/',
        permanent: false,
      },
    };
  }

  console.log(session); // this logs session data to the console

  return {
    props: {
      session,
    },
  };
};

console.log result from getServerSideProps

console.log result from NewRecipe page

To reproduce
import {
  type InferGetServerSidePropsType,
  type GetServerSideProps,
  type NextPage,
} from 'next';
import { type Session } from 'next-auth';

const Page: NextPage<InferGetServerSidePropsType<typeof getServerSideProps>> = ({ session }) => {
  console.log(session);
  return
content
;
}

export const getServerSideProps: GetServerSideProps<{ session: Session | null }> = async ctx => {
  const session = await getServerAuthSession(ctx);

  console.log(session);

  return {
    props: {
      session
    }
  }
}

Additional information
I am using the stack for the first time and I have no idea if my approach is right. But the issue gets fixed when I do this in _app.tsx
const MyApp: AppType<{ session: Session | null}> =({
  Component,
  pageProps
}) => {
  const { session } = pageProps;

  return (
    <SessionProvider session={session}>
      <Component {...pageProps} />
    </SessionProvider>
  )
}

instead of this
const MyApp: AppType<{ session: Session | null}> =({
  Component,
  pageProps: {session, ...pageProps}
}) => {
  return (
    <SessionProvider session={session}>
      <Component {...pageProps} />
    </SessionProvider>
  )
}

Reproduced here: https://github.com/juliusmarminge/session-gssp

Thanks, should I close the issue or it gets automatically closed when linked PR is closed? I'm contributing for the first time :D

Thanks, should I close the issue or it gets automatically closed when linked PR is closed? I'm contributing for the first time :D

It will be closed once the PR is merged.
Thanks for your contribution 🙏🏼

Okay, thanks for the help!

I just realised I should do this like this instead of passing a session as a prop. I got confused by NextAuth docs example https://next-auth.js.org/configuration/nextjs#in-getserversideprops, I thought I can pull the session prop like usual. Sorry for the inconvenience.
export const Page: NextPage = () => {
  const { data: session } = useSession();
}

export const getServerSideProps: GetServerSideProps<{
  session: Session | null;
}> = async ctx => {
  return {
    props: {
      session: await getServerAuthSession(ctx),
    },
  };
};

I just realised I should do this like this instead of passing a session as a prop. I got confused by NextAuth docs example https://next-auth.js.org/configuration/nextjs#in-getserversideprops, I thought I can pull the session prop like usual. Sorry for the inconvenience.
export const Page: NextPage = () => {
  const { data: session } = useSession();
}

export const getServerSideProps: GetServerSideProps<{
  session: Session | null;
}> = async ctx => {
  return {
    props: {
      session: await getServerAuthSession(ctx),
    },
  };
};

Yea Balazs recommended this approach in my upstream issue.
I think it might be a bit cursed to pull out the prop since now the session prop doesn't behave as any other prop you pass down from gSSP - although the hook pattern is generally better and will make sure the session stays up to date too - whilst being prefetched on the server.
I've changed the PR to be a doc change which will show this pattern

Yeah definitely the hook approach makes more sense. That should be highlighted in T3 docs and NextAuth docs as well cause it's confusing - usually with gSSP you pass the props object and destructure it in page props.


ok-locally app fails with ModuleNotFound when deployed/installed from pypi

I logged this request in Stack Overflow, but calling it to your attention as well.
Quite possibly a new-user issue, but... code that runs fine locally is failing when I deploy then install from Pypi.  I have recreated a very small project here, including code and reconstruction instructions.

Thanks for filing an issue! This is definitely a configuration issue and not an issue with PyPI. I've responded to your Stack Overflow question.

Totally impressed you got back this fast.  Amazing.
Anxious to check out your suggestion...
Dunno if you are a database guy, but I have been working to Daniel Gaspar
(Flask App Builder), on this project
https://github.com/valhuber/fab-quickstart to create a multi-page web for
your database.  The wiki has a good Quick Start for FAB.  We're about ready
to release this once we resolve the ModuleNotFound, so, thanks again for
your help.
Regards,
Val
On Tue, Aug 11, 2020 at 12:27 PM Dustin Ingram<EMAIL_ADDRESS>wrote:

Closed #8411 https://github.com/pypa/warehouse/issues/8411.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/pypa/warehouse/issues/8411#event-3644692527, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ABKSG33KETCGA7AUDDK2F5DSAGLRRANCNFSM4P3MSQDA
.

--
Thanks,
Val
510-703-5909  valhuber on skype

Hi, Dustin
I am not able to further edit my question or reply on stackoverflow
https://stackoverflow.com/questions/63363476/pypi-installed-app-fails-with-modulenotfound#comment112049839_63365075,
so trying this email.  It would be good to know if you even receive it...
Here are some important updates:

I restructured the inheritance project
https://github.com/valhuber/inheritance per your suggestion, but it
still fais in the same way
To make it easier for you, I have adapted the sampleproject
https://github.com/pypa/sampleproject to a new version
https://github.com/valhuber/sampleproject.git that seeks to add the
run.py below to the sample folder

run.py
https://github.com/valhuber/sampleproject/blob/master/src/sample/run.py:
import simple # this fails, only* in the Pypi version (runs locally)*
def main():
print("add_one(2) = " + str(simple.add_one(2)))
if name == 'main':
main()
The readme https://github.com/valhuber/sampleproject.git explains the (I
think minor) changes I made to sampleproject.
This is all to try and release my fab_quickstart project
https://github.com/valhuber/fab-quickstart.  It's about 500 lines of
code, and I have to say at least half the time has been fighting with
import, their interaction with PyPi.  I am new to Python (this is my first
project).  I quite like it, but this portion is deeply discouraging.  I am
grateful if you can help.
Thanks,
Val
On Tue, Aug 11, 2020 at 12:27 PM Dustin Ingram<EMAIL_ADDRESS>wrote:

Thanks for filing an issue! This is definitely a configuration issue and
not an issue with PyPI. I've responded to your Stack Overflow question.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/pypa/warehouse/issues/8411#issuecomment-672217245,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABKSG33KETCGA7AUDDK2F5DSAGLRRANCNFSM4P3MSQDA
.

--
Thanks,
Val
510-703-5909  valhuber on skype


Responsive navbar

BEFORE
On large screen

Medium screen

small screen

AFTER
On Large screen

On medium screen

On small screen

have a look at issue #60 too


fix MenuBuilder

As described here, now you are able to use Class[@]method style callback

Thank you for the PR! Released in version 5.3.0! :)


Version constraint "*" no longer matches prerelease versions, as of semver v4.3.6

When there is no package.json file present (for example, in the parent directory of the top-level node_modules directory), this code reads dependencies from the node_modules directory and attempts to use the catch-all version constraint, *.
Unfortunately, * no longer matches prerelease versions, after this commit in v4.3.6 of the semver package, which is what npm uses.
This effectively means that prerelease packages installed in top-level node_modules directories will be considered invalid by commands like npm ls.
I think the simplest way to fix this would be to make this condition fail when reqver === "*" (or, better, some sentinel value that cannot be confused for a version string), so that top-level prerelease packages are not marked invalid.
I'll submit a PR with that fix shortly.

This is not so straightforward.
Since prerelease versions can be frequently broken or incomplete (and that is their intent), even if someone depends on *, you could make the argument that this range should not include those versions.  It's not clear that<EMAIL_ADDRESS>actually even has the core functionality of the foo package!
From that point of view, prerelease packages actually don't satisfy the range (or at least, aren't guaranteed to) and so marking them as invalid is the correct thing to do.
Can you share more about your use case that led you to encounter these errors?  I'd like to understand it better.

I don't disagree with your reasoning, from the perspective of the semver package. The read-installed package seems to be trying come up with a catch-all version constraint when there is no package.json file available, and now there isn't any truly catch-all version constraint. That's probably a good thing, but it's still a problem for read-installed.
Here's my use-case:
mkdir -p temp/node_modules
cd temp
npm install<EMAIL_ADDRESS>npm ls

Note that double-ended-queue is marked invalid because it has a prerelease version, even though that's the version I asked for.

To avoid confusion, I've updated my PR to stop using * for unknown package versions: https://github.com/benjamn/read-installed/commit/f8abd793325fad95de891b7f40d8811fc877d0ef

It's worth noting, that because npm@3 doesn't use read-installed and handles its own logic, it doesn't encounter this bug and so an npm ls in this scenario with it does not report the package as invalid. npm@3 is... imminent... maybe tomorrow?
But we will be maintaining npm@2 for a while concurrently so I'm not opposed to taking this fix on those grounds.

Oh awesome, I love it when problems disappear because progress is happening elsewhere.


TAS-23: Implement Tile Module

TAS-23:
Implement Tile module according to UML diagram. I suggest the following order of implementation:

[ ] Implement Abstract class "ADrawable"
[ ] Implement Abstract class "ATile"
[ ] Implement class "LandTile"
[ ] Implement class "SeaTile"

DoD:

[ ] It is possible to construct objects of type ATile
[ ] All abstract methods defined in ATile are overridden in LandTile and SeaTile
[ ] All methods in the hierarchy are tested.

Deleted implementation of ADrawable and put it into a separate task together with the Position class

No abstract methods in ATile that are needed to be overridden, that point in the DoD is removed

Closing this issue as its developement branch is merged and the problem no longer exists.


CVE-2023-29337 in azure-functions-host

Using image python:4-python3.10-appservice, started seeing CVE-2023-29337, marked high, being identified in reference to nuget.protocol and nuget.common in the file /azure-functions-host/Microsoft.Azure.WebJobs.Script.WebHost.deps.json
Not sure if this belongs on the azure functions docker side, azure functions host side, or both.
Vulnerability is new, but assuming other commercial entities will start reporting the same when their deployments become blocked.

We are also running into this being flagged by our security scanner.

We are also seeing this; I haven't dug too deep but it looks like Debian's package repository doesn't have an updated version of NuGet yet so it may be blocked by that.


Add notice about nedb-promises

This, to be exact https://www.npmjs.com/package/nedb-promises

done in #11

where exactly its done there?

In this commit: https://github.com/seald/nedb/pull/11/commits/df358b91a64509f4ac5f331b80a51db3d3e57a85#

Aha, I see, many thanks. Will close issue as soon as it will be merged.

BTW, the PR in question will kinda make nedb-promises redundant.

Indeed, as you can see in the branch https://github.com/seald/nedb/tree/remove-async and in the beta version of @seald-io/nedb (v3), we removed the async dependency which is very outdated replaced it by using Promises, once we were there, we decided to expose a Promise-based interface. The callback-based interface of this new version is actually the Promise-based interface callbackified.
I would recommend you test the v3 before we release it to make sure nedb-promises works properly with it. @RollingHog

If you make your own Promise interface I'm not even sure nedb-promises is needed anymore.

I agree with you that nedb-promises will probably not be needed anymore with that new interface of<EMAIL_ADDRESS>However some of the users of nedb-promises may not want to change their code, but may want to upgrade to the latest version of @seald-io/nedb.
This new version we are releasing does expose a Promise-based interface, but it is not a drop-in replacement for nedb-promises. I didn't want to have hybrid function that test the type of the last argument to determine whether to work with a callback or return a Promise...
Therefore the Promise interface of @seald-io/nedb v3 is another set of functions: for every function that works with a callback, there is an equivalent function suffixed with Async.

released in v3.0.0


Refactor URL verification logic to struct

Pulls logic for SAML URL verification into separate struct in
src/crypto.rs, and adds the ability to verify request and response URLs.
This work was originally part of a larger SLO effort, but I pulled it
out to be reviewed separately.

Hey @jmpesp, not sure if either of you were planning on making any more contributions or not, but just in case, I wanted to let you know that I've updated the build instructions in the README to lay the groundwork for reproducible builds.
Right now I'm just using it for reproducible dev environments and CI builds, which I hope will make contributing less of a pain in the butt 😜


Discover nodes with NUMA architecture

Software such as MongoDB or MySQL have known problems with NUMA architectures. See https://docs.mongodb.com/manual/administration/production-notes/#mongodb-and-numa-hardware and https://blog.jcole.us/2010/09/28/mysql-swap-insanity-and-the-numa-architecture/ for example.
It'd be useful to be able to select nodes without such architecture for such deployments.

@thedrow Thanks for opening this issue. As always, PRs are welcome for this change :).
FYI: there is active discussion in the Kubernetes community on NUMA awareness (see https://github.com/kubernetes/kubernetes/issues/49964).
CC @ConnorDoyle

As there is no (AFAIK) simple readable flag "NUMA enabled", I think we could count online nodes under /sys/devices/system/node/ and create a label nfd-memory-multinode=true (or: nfd-memory-numamultinode any better?) if there is more than one node online.
/sys/devices/system/node/ seems to be source of information for 'numactl'. By reading /sys/devices directly, we can avoid dependency on numactl utility.
Would such a label serve the need here?
"memory" would become a new source.

Yes it would.


Githubwebhook

Required items, please complete
Change(s):

See guidance below

Reason for Change(s):

See guidance below

Version Updated:

Required only for Detections/Analytic Rule templates
See guidance below

Testing Completed:

See guidance below

Checked that the validations are passing and have addressed any issues that are present:

See guidance below

Guidance <- remove section before submitting

Before submitting this PR please ensure that you have read the following sections and filled out the changes, reason for change and testing complete sections:
Thank you for your contribution to the Microsoft Sentinel Github repo.

Details of the code changes in your submitted PR.  Providing descriptions for pull requests ensures there is context to changes being made and greatly enhances the code review process.  Providing associated Issues that this resolves also easily connects the reason.

Change(s):

Updated syntax for XYZ.yaml

Reason for Change(s):

New schema used for XYZ.yaml
Resolves ISSUE #1234

Version updated:

Yes
Detections/Analytic Rule templates are required to have the version updated

The code should have been tested in a Microsoft Sentinel environment that does not have any custom parsers, functions or tables, so that you validate no incorrect syntax and execution functions properly.  If your submission requires a custom parser or function, it must be submitted with the PR.

Testing Completed:

Yes/No/Need Help

Note: If updating a detection, you must update the version field.

Before the submission has been made, please look at running the KQL and Yaml Validation Checks locally.
https://github.com/Azure/Azure-Sentinel#run-kql-validation-locally

Checked that the validations are passing and have addressed any issues that are present:

Yes/No/Need Help

Note: Let us know if you have tried fixing the validation error and need help.

References:

Guidance for Detection checks
General contribution guidance
PR validation troubleshooting

Hi @gokulkate96,
Please check above comment and act accordingly. Thanks

Hi @gokulkate96,
Please act on above comments and also it has validation failures. Thanks

Hi @gokulkate96,
Please respond. Thanks

Hi @gokulkate96,
We are waiting for your reply. Thanks

Hi @gokulkate96,
Please check open comments from @vakohl and act on them. Thanks

Hi @gokulkate96,
Please check open comments and also failure validations. Thanks

Hi @gokulkate96,
Please respond on above. Thanks

Hi @gokulkate96,
We wanted to check on the status of PR #10416. PR is pending for more than 30 days. Please let us know if you need any assistance to review this PR. Per our standard operating procedures if no response is received in the next 7 business days, we will close this PR. Thank you for your cooperation

Since we have not received a response in the last 7 days, we are closing your PR #10416 per our standard operating procedures. If you still need support for this issue, you can re-open the PR at any time.
If you do re-open, we simply request that you ensure the PR has response to the last request. Thank you for your cooperation.

Hi @gokulkate96,
Please reply to open comments; PR is having problems with validation. please check. Thanks

Hi @gokulkate96,
Please act on open comments and also check for failed validations. Thanks

Hi @gokulkate96,
Please respond on above asks. Thanks

Hi @gokulkate96,
Please resolve branch conflicts. Thanks

We wanted to check on the status of PR #10416. PR is pending for more than 60 days. Please let us know if you need any assistance to review this PR. Per our standard operating procedures if no response is received in the next 7 business days, we will close this PR. Thank you for your cooperation

Since we have not received a response in the last 7 days, we are closing your PR #10416 per our standard operating procedures. If you still need support for this issue, you can re-open the PR at any time.
If you do re-open, we simply request that you ensure the PR has response to the last request. Thank you for your cooperation


Unable to resolve  .text() on a original response after .json() is called on a clone

Hi.  Thanks for this great library.  I really appreciate the recent addition of the .clone method, but believe I have found an issue with it.
Below is a test case for caching the original response, returning a cloned version, operating on that clone, and then reverting back to the original response.  While a similar test exists, this one works with Chrome's fetch, but times out when using node-fetch.
I realize that you are looking for contributors to this project and are busy with your startup, so if you have any clues on where to start, I'd be more than happy to lend a hand.
Thanks in advance!
	it('should allow cloning a json response and log it as text response', function(done) {
		url = base + '/json';
		var originalResponse;

		fetch(url).then(function(res) {
			// Save a copy of our untouched response to return later
			originalResponse = res;

			return res.clone();
		})
		.then(function(clonedResponse) {
			// Perform an operation that reads our cloned response's body
			var json = clonedResponse.json()

			expect(clonedResponse.bodyUsed).to.equal(true);

			return json;
		})
		.then(function(json) {
			// Use this body data
			expect(json).to.deep.equal({name: 'value'});

			return json;
		})
		.then(function(json) {
			// reset our promise chain's value to the original response, so that appears
			// as if we were never here

			return originalResponse;
		})
		.then(function(res) {
			expect(res.bodyUsed).to.equal(false);

			// Attempt to read the body a second time
			return res.text();  // BUG: THIS WILL NEVER RESOLVE
		})
		.then(function(text) {
			expect(text).to.equal('{"name":"value"}');

			done();
		});
	});

(cc: @kirill-konshin @bitinn)

I tried taking a look at this, and from what I could tell the self.body.on('data', ...) and self.body.on('end', ...) events don't seem to be getting fired when we try to call this .text() on the original response, which means that the returned promise from _decode never calls resolve.
Why this is happening?  I haven't got that far yet.

@m14t because of the way stream works, you shouldn't use the cloned response first, use your original response first and then the cloned one.
Let me attempt to illustrate this, imagine A/B/C/D are streams:
// when you pipe something, imagine its `data` event will be triggered sometime in future.
A.pipe(B)

// in your case, you did these:
A.pipe(B) // clone
B.pipe(C) // clonedRes.json
A.pipe(D) // res.text

// but you did so in a way where B.pipe(C) is already done when you finally starts A.pipe(D)
// since `end` event has already fired for A, this stream has drained, thus A.pipe(D) is not working

There are ways we can made this easier by not allowing you to drain the original body, but instead always drain a new piped body, but I haven't sit down to work this out yet (also need to figure out issues with leaks of course)

Thanks @bitinn for the explanation. I've been able to use this to work around my issue.
Given that this works in the browser, should we leave this open as at least a known issue for others to find?

As far as I know browser doesn't support stream yet, which is probably why they work as expected, would be interesting to see if they actually workaround this gotcha when stream spec is more or less done. But I will leave this open as it's a valid gotcha.

this is now fixed and released as v1.5.3


Show dynamic dates #33

Some screenshots please.

@thebishaldeb data format is like "27-november-2000"

As you have told, If the number of days will be less than 8 it will show no. of days else it will show the date of submission

Merged it, but change the  moth to only three letters like Jan, Feb, etc in the next PR.


Fix bounding box issue

Fixes #1070, by reverting this commit.
@viddo PTAL! Thanks!
NOTE to @viddo : this might have some effects on the deep-insights.js test suite since I remember you mentioning something related (there's some history about it on slack)

@alonsogarciapablo I think you wanted to merge into v4 branch, right?

Totally! Re-opening!


Remote node do not support max privacy and offline addresses

Show comment "To support Max privacy and offline transactions please connect to integrated node or to own node configured with your owner key." when user connects to remote node. And disable Show offline public address in Utilities block https://zpl.io/bojAj8v

When remote node connected show status "online: connect to integrated or owned node to enable max privacy and public offline transactions" and button https://zpl.io/VOZyZ0Q

Receive screen - Disable Max Privacy in switcher and Offline address block https://zpl.io/2yNoNGG

@anatolse please, implement point 1 for now only

p.3 was fixed in a compromise way with current design
p.2 won't fix now

When a user creates a wallet with a connection to a random node, a new design must be applied.

@Denis-Asipenko , please, re-check on newer version

checked


Extracted union types not recognized in switch statement

See reproducable bug in this Try Flow.
It appears that Flow cannot properly distinguish unioned types where at least one of the unioned types are defined using the $Call utility.  The error at line 36 in the Try Flow example should not be happening, but it is.  If I manually define the types, then flow works as expected (line 59 does not have an error).

It may be that the problem isn't with the union of types involving $Call operator but  that type is string and what you want is type to be enum.
Not sure if this an right way, (there might a simpler way to achieve this) to do it but following gives the behavior you are looking for.  Here is the link.
function createVoidPayloadAction<T>(type:T):() => {type: T} {
  return () => ({ type })
}

function createAction<T, I, O> (
  type:T,
  payloadCreator: (input: I) => O
):(payload:I) => {type: T, payload:O } {
  return (payload: I)  => ({ payload: payloadCreator(payload), type })
}
const a = createVoidPayloadAction<'a'>('a')
const b = createAction<'b', string , string>('b', (payload: string) => payload)


Fix names for SNARE

Chris emailed with Blue Lake and came to this conclusion:

FYI,
Blue has clarified how Snare RNAseq & ATACseq should be classified. In short:

They both are single nucleus assays, but for ATAC the assay is referred to as scATAC-seq (10X scATAC-seq also involves nuclei)

SNARE-seq2 has 2 components :
SNARE-RNAseq should be under snRNA-seq
&
SNARE-ATACseq should be under scATAC-seq

These are the terms in assay-types.yaml which include SNARE:
SNAREseq:
    description: SNARE-seq
salmon_rnaseq_snareseq:
    description: scRNA-seq (SNARE-seq) [Salmon]
sc_atac_seq_snare:
    description: scATAC-seq (SNARE-seq) [SnapATAC]
sc_rna_seq_snare_lab:
    description: scRNA-seq (SNARE-seq) [Lab Processed]
sc_atac_seq_snare_lab:
    description: scATAC-seq (SNARE-seq) [Lab Processed]

@cebriggs7135 : Can you make a PR, from the devel branch, with the changes? Or can you state precisely what these lines should be changed to, and I'll make the PR?

Here's a link https://drive.google.com/file/d/1cQYx0_nM4aYeFjnpCaQVPlxL2e0nJwHZ/view?usp=sharing
to a pdf of that email exchange with Blue about :

SNARE RNAseq ("snRNAseq" because it involves only RNA extracted from the nuclei)

versus

SNARE ATACseq ("scATACseq" because it's a DNA seq assay)


Determine EXTEND_SERVICE before invoker createTraceContext

Please answer these questions before submitting pull request

Why submit this pull request?
[ ] Bug fix
[ ] New feature provided
[x] Improve performance

reducing null judgment

Coverage increased (+0.001%) to 16.866% when pulling 9ac624082f5fbd3dc7f502e66c1ee52908fbee37 on Arugal:master into e0827e30eaf56d672786a86b2413ccf572bfb249 on apache:master.

Coverage increased (+0.001%) to 16.866% when pulling 9ac624082f5fbd3dc7f502e66c1ee52908fbee37 on Arugal:master into e0827e30eaf56d672786a86b2413ccf572bfb249 on apache:master.


Error passing a Buffer into Jimp.read

Seeing an issue when trying to load an image from an S3 bucket. I can directly write the buffer to the response and it works, but when trying to pass the buffer to Jimp, I get the error TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string or Buffer. Received type object. Neither of the approaches below work.
s3.getObject({...bucketParams, ...{Key: `images/${req.params.image_id}`}},(error, data) => {
    if(!error) {
      originalImage = new Buffer.from(data.Body);
      Jimp.read(originalImage).then(image => {
        image.cover(200, 200);
        res.write(image);
        res.send();
      }).catch(err => {
        console.error(err);
      })
    } else {
      console.error(error);
    }
  })
app.get('/thumbnail/:image_id', (req, res) =>{
  s3.getObject({...bucketParams, ...{Key: `images/${req.params.image_id}`}},(error, data) => {
    if(!error) {
      originalImage = data.Body;
      Jimp.read(originalImage).then(image => {
        image.cover(200, 200);
        res.write(image);
        res.send();
      }).catch(err => {
        console.error(err);
      })
    } else {
      console.error(error);
    }
  })
});

console logging data.Body gives me: <Buffer ff d8 ff e0 00 10 4a 46 49 46 00 01 01 01 00 48 00 48 00 00 ff db 00 43 00 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 ... 46326 more bytes>
Expected Behavior
I pass an image buffer in and I get a resized image out from Jimp
Current Behavior
Jimp fails to detect that I've passed it a buffer and crashes
Failure Information (for bugs)
TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string or Buffer. Received type object.
Steps to Reproduce

Use the aws-sdk to pull an image object from a bucket
Pass the data.Body of the returned object to Jimp

System Details

Jimp Version:  "0.9.3"
Operating System: OS X 10.14.4
Node version: v11.9.0

The issue was that I was trying to pass the Jimp image directly to resp.write without first converting it back to a buffer. This works as expected now.


Installation error

Version :
OS: kali 2021.1
Docker version [docker -v] :Docker version 20.10.5
Docker compose version [docker-compose -v] : docker-compose version 1.25.5
pip : 21.0.1
Rustc  1.50.0

Should build fine now. There were multiple changes in dependencies that needed to be addressed.


Installation of a global tool required as well

dotnet sql-cache  requires installing dotnet-sql-cache, of which it notifies, but the command line it recommends is incorrect - dotnet tool install --global dotnet-sql-cache doesn't work and suggests a number of reasons for that. I was able to install it by specifying the version explicitly, but it would be better to mention the requirement to install the tool right here, as well as the link to its NuGet page, which contains a correct command line.

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

ID: 0d01025d-86b2-bb2d-86c1-ef0695bc98e3
Version Independent ID: 5b9a6572-3671-0d54-b2ef-83d04f8b3e96
Content: Distributed caching in ASP.NET Core
Content Source: aspnetcore/performance/caching/distributed.md
Product: aspnet-core
Technology: aspnetcore-performance
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

Moved to Distributed caching master page #17553

Thank you for contacting us. Due to a lack of activity on this discussion issue we're closing it in an effort to keep our backlog manageable. If you believe there is a concern which hasn't been addressed, please file a new issue.


Zero downtime upgrade to cflinuxfs3

Hi,
We have thousands of applications that are still using cflinuxfs2 and the only solution I could find is to go for blue-green deployment which is difficult in our case considering the apps and teams involved it will be difficult to get the source code. Is there any better approach available for this to happen?

Which version of the Cloud Foundry API are you using? There's an experimental --v3 flag you could try out for a zero down time stack re-association. It will recreate a droplet on fs3 and when it's done doing so it will cut over the routes. Well thats what CAPI is doing. Stack auditor just hits the right endpoints :). Make sure you are using the latest stack auditor before trying that command.
You could also look at our source code and check out which CAPI endpoints we are hitting in order to create the droplet for fs3.
cf change-stack <app> cflinuxfs3 --v3

Thanks for the inputs @kardolus .We are using version (2.125.0) and are on PAS 2.4.11 as per the below article there is some unexpected behaviour while using --v3 flag.
https://community.pivotal.io/s/article/how-to-migrate-from-one-cloud-foundry-stack-to-another-stack

Presently we are planning to prepare a script with these steps :

Download the droplet for the existing app and push it to a temp app.
Get the list of service bindings and bind it to the temp app
Grab Autoscaler settings from the Original APP and Get the current Min and Max Autoscaler settings of the APP
check to make sure the temp app is started successfully
Enable and Set autoscaler settings for the app.
Unmap Route from the Original app and Map route to the temp app
7.Unmap default route from the Temp app
Update cflinux of Original app to cflinux3
Unmap Route from the temp app and Map route to the Original app

Even these steps will cause an impact but its not as long as the change-stack does. Please let me know your thoughts or if there is any better work approach.


Flutter cannot see my Android Emulator in version 1.22

Steps to Reproduce

When I upgraded to version 1.22, Flutter became unable to see the Android emulator that I use for development. In version 1.20.4, Flutter can see the emulator fine. I have put my system info in the logs section.

Download Flutter 1.22 (I used git clone https://github.com/flutter/flutter.git -b stable --depth 1)
Start an Android Emulator in Android Studio
Run flutter devices. Nothing should show up.

Logs

flutter devices -vv on 1.22:
[  +96 ms] executing: [/home/james/Android/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +28 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] d408d302e22179d598f467e11da5dd968dbdc9ec
[        ] executing: [/home/james/Android/flutter/] git tag --points-at HEAD
[   +4 ms] Exit code 0 from: git tag --points-at HEAD
[        ] 1.22.0
           1.22.0-12.3.pre
[   +6 ms] executing: [/home/james/Android/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[   +4 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/stable
[        ] executing: [/home/james/Android/flutter/] git ls-remote --get-url origin
[   +4 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +31 ms] executing: [/home/james/Android/flutter/] git rev-parse --abbrev-ref HEAD
[  +15 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[  +31 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[   +7 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[        ] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[  +18 ms] "flutter devices" took 35ms.
[   +4 ms] Unable to locate a development device; please run 'flutter doctor' for information about installing additional components.
[   +3 ms]
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
           #1      DevicesCommand.runCommand (package:flutter_tools/src/commands/devices.dart:59:7)
           #2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:972:18)
           <asynchronous suspension>
           #3      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:831:33)
           <asynchronous suspension>
           #4      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart)
           #5      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:29)
           #6      _rootRun (dart:async/zone.dart:1190:13)
           #7      _CustomZone.run (dart:async/zone.dart:1093:19)
           #8      _runZoned (dart:async/zone.dart:1630:10)
           #9      runZoned (dart:async/zone.dart:1550:10)
           #10     AppContext.run (package:flutter_tools/src/base/context.dart:149:18)
           #11     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:820:20)
           #12     CommandRunner.runCommand (package:args/command_runner.dart:197:27)
           #13     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:335:21)
           #14     _rootRunUnary (dart:async/zone.dart:1198:47)
           #15     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
           #16     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
           #17     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
           #18     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
           #19     Future._completeWithValue (dart:async/future_impl.dart:529:5)
           #20     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
           #21     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
           #22     FlutterVersion.checkFlutterVersionFreshness (package:flutter_tools/src/version.dart)
           #23     _rootRunUnary (dart:async/zone.dart:1198:47)
           #24     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
           #25     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
           #26     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
           #27     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
           #28     Future._completeWithValue (dart:async/future_impl.dart:529:5)
           #29     Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:567:7)
           #30     _rootRun (dart:async/zone.dart:1190:13)
           #31     _CustomZone.run (dart:async/zone.dart:1093:19)
           #32     _CustomZone.runGuarded (dart:async/zone.dart:997:7)
           #33     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
           #34     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
           #35     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
           #36     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
           #37     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)

[   +2 ms] Running shutdown hooks
[        ] Shutdown hooks complete
[   +2 ms] exiting with code 1

flutter devices -v on 1.20.4 (doing -vv didn't output any verbose output):
[ +108 ms] executing: [/home/james/Android/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +26 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] fba99f6cf9a14512e461e3122c8ddfaa25394e89
[        ] executing: [/home/james/Android/flutter/] git tag --contains HEAD
[   +4 ms] Exit code 0 from: git tag --contains HEAD
[        ] 1.20.4
[   +7 ms] executing: [/home/james/Android/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[   +4 ms] Exit code 128 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] fatal: HEAD does not point to a branch
[  +16 ms] executing: [/home/james/Android/flutter/] git rev-parse --abbrev-ref HEAD
[   +3 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] HEAD
[  +23 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[   +4 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[        ] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[   +9 ms] executing: /home/james/Android/Sdk/platform-tools/adb devices -l
[  +27 ms] List of devices attached
           emulator-5554          device product:sdk_gphone_x86_64_arm64 model:sdk_gphone_x86_64_arm64 device:generic_x86_64_arm64 transport_id:1
[   +5 ms] 2 connected devices:

[   +4 ms] /home/james/Android/Sdk/platform-tools/adb -s emulator-5554 shell getprop
[  +24 ms] ro.hardware = ranchu
[   +4 ms] sdk gphone x86 64 arm64 (mobile) • emulator-5554 • android-x64    • Android 11 (API 30) (emulator)
[        ] Web Server (web)                 • web-server    • web-javascript • Flutter Tools
[   +1 ms] executing: /home/james/Android/Sdk/platform-tools/adb devices -l
[   +4 ms] List of devices attached
           emulator-5554          device product:sdk_gphone_x86_64_arm64 model:sdk_gphone_x86_64_arm64 device:generic_x86_64_arm64 transport_id:1
[   +8 ms] "flutter devices" took 104ms.
[   +3 ms] ensureAnalyticsSent: 0ms
[   +1 ms] Running shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 0

flutter doctor -v on 1.22:
[✓] Flutter (Channel stable, 1.22.0, on Linux, locale en_GB.UTF-8)
    • Flutter version 1.22.0 at /home/james/Android/flutter
    • Framework revision d408d302e2 (7 days ago), 2020-09-29 11:49:17 -0700
    • Engine revision 5babba6c4d
    • Dart version 2.10.0

[!] Android Studio (version 4.0)
    • Android Studio at /opt/android-studio
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version openjdk version "1.8.0_242-release"

[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.

flutter doctor -v on 1.20.4:
[✓] Flutter (Channel unknown, 1.20.4, on Linux, locale en_GB.UTF-8)
    • Flutter version 1.20.4 at /home/james/Android/flutter
    • Framework revision fba99f6cf9 (3 weeks ago), 2020-09-14 15:32:52 -0700
    • Engine revision d1bc06f032
    • Dart version 2.9.2

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /home/james/Android/Sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /opt/android-studio/jre/bin/java
    • Java version openjdk version "1.8.0_242-release"
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[✗] Chrome - develop for the web (Cannot find Chrome executable at chromium)
    ! chromium is not executable.

[!] Android Studio (version 4.0)
    • Android Studio at /opt/android-studio
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version openjdk version "1.8.0_242-release"

[✓] Connected device (2 available)
    • sdk gphone x86 64 arm64 (mobile) • emulator-5554 • android-x64    • Android 11 (API 30) (emulator)
    • Web Server (web)                 • web-server    • web-javascript • Flutter Tools

! Doctor found issues in 3 categories.

 Check --recommends
           ID-1: /dev/sda vendor: Seagate model: ST2000DM001-1ER164 size: 1.82 TiB block size: physical: 4096 B logical: 512 B
           speed: 6.0 Gb/s rotation: 7200 rpm serial: <filter> rev: CC26 scheme: MBR
           ID-2: /dev/sdb vendor: Crucial model: CT500MX500SSD1 size: 465.76 GiB block size: physical: 4096 B logical: 512 B
           speed: 6.0 Gb/s serial: <filter> rev: 023 scheme: GPT
           ID-3: /dev/sdc vendor: Samsung model: MZHPV128HDGM-00000 size: 119.24 GiB block size: physical: 512 B
           logical: 512 B speed: 6.0 Gb/s serial: <filter> rev: 500Q scheme: GPT
Partition: ID-1: / raw size: 465.51 GiB size: 465.51 GiB (100.00%) used: 218.84 GiB (47.0%) fs: btrfs dev: /dev/sdb2
           ID-2: /boot raw size: 260.0 MiB size: 256.0 MiB (98.46%) used: 86.7 MiB (33.9%) fs: vfat dev: /dev/sdb1
           ID-3: /home raw size: 465.51 GiB size: 465.51 GiB (100.00%) used: 218.84 GiB (47.0%) fs: btrfs dev: /dev/sdb2
           ID-4: /var raw size: 465.51 GiB size: 465.51 GiB (100.00%) used: 218.84 GiB (47.0%) fs: btrfs dev: /dev/sdb2
Swap:      Kernel: swappiness: 60 (default) cache pressure: 100 (default)
           ID-1: swap-1 type: file size: 8.00 GiB used: 9.1 MiB (0.1%) priority: -2 file: /swapfile/swapfile
Sensors:   System Temperatures: cpu: 29.8 C mobo: 27.8 C gpu: amdgpu temp: 52.0 C mem: 58.0 C
           Fan Speeds (RPM): N/A gpu: amdgpu fan: 1164
Info:      Processes: 253 Uptime: 1h 28m Memory: 15.58 GiB used: 5.14 GiB (33.0%) Init: systemd v: 246 Compilers: gcc: 10.2.0
           Packages: pacman: 1077 lib: 362 Shell: Zsh v: 5.8 running in: konsole inxi: 3.1.06

@UnicornsOnLSD  what is the output of flutter config ?

(The reason I ask is that it looks like you disabled android support with flutter config --no-android or similar)

@UnicornsOnLSD what is the output of flutter config ?

Here's the output:
Configure Flutter settings.

To remove a setting, configure it to an empty string.

The Flutter tool anonymously reports feature usage statistics and basic crash reports to help improve Flutter tools over time. See Google's privacy policy: https://www.google.com/intl/en/policies/privacy/

Global options:
-h, --help                  Print this usage information.
-v, --verbose               Noisy logging, including all shell commands executed.
                            If used with --help, shows hidden options.
-d, --device-id             Target device id or name (prefixes allowed).
    --version               Reports the version of this tool.
    --suppress-analytics    Suppress analytics reporting when this command runs.
    --packages              Path to your ".packages" file.
                            (required, since the current directory does not contain a ".packages" file)

Usage: flutter config [arguments]
-h, --help                                      Print this usage information.
    --[no-]analytics                            Enable or disable reporting anonymously tool usage statistics and crash reports.
    --clear-ios-signing-cert                    Clear the saved development certificate choice used to sign apps for iOS device deployment.
    --android-sdk                               The Android SDK directory.
    --android-studio-dir                        The Android Studio install directory.
    --build-dir=<out/>                          The relative path to override a projects build directory
    --[no-]enable-web                           Enable or disable Flutter for web. This setting will take effect on the master, dev, and beta channels.
    --[no-]enable-linux-desktop                 Enable or disable Flutter for desktop on Linux. This setting will take effect on the master and dev channels.
    --[no-]enable-macos-desktop                 Enable or disable Flutter for desktop on macOS. This setting will take effect on the master and dev channels.
    --[no-]enable-windows-desktop               Enable or disable Flutter for desktop on Windows. This setting will take effect on the master channel.
    --[no-]single-widget-reload-optimization    Enable or disable Hot reload optimization for changes to class body of a single widget. This setting will take effect on the master, dev, beta, and stable channels.
    --[no-]enable-android                       Enable or disable Flutter for Android. This setting will take effect on the master, dev, beta, and stable channels.
    --[no-]enable-ios                           Enable or disable Flutter for iOS. This setting will take effect on the master, dev, beta, and stable channels.
    --[no-]enable-fuchsia                       Enable or disable Flutter for Fuchsia. This setting will take effect on the master channel.
    --clear-features                            Remove all configured features and restore them to the default values.

Run "flutter help" to see global options.

Settings:
  enable-android: false
  enable-ios: false
  android-sdk: /home/james/Android/Sdk

Analytics reporting is currently disabled.

Looks like it is disabled. Running flutter config --enable-android fixed the issue, thanks!


Provisioners' class name is confusing in some cases (and the same goes for test classes as well)

Some provisioners have confusing names, e.g. WildflyImageOpenShiftProvisioner - which isn't clear at all about how the image is generated.
The same goes for some of the test classes, e.g.: MysqlImageTestCase..
We should perform a minor refactoring round to give better names to such components.

Environment: tools + testsuite
Steps to reproduce: N/A

please provide more information about what qualities or factors should be used in creating  better descriptive names.

please provide more information about what qualities or factors should be used in creating better descriptive names.

Thanks for looking into this issue, @rsearls.
IMO our main factor would be to let the user get the gist of the way an image is created, and how the provisioning process happens.
Intersmash provisions images to OpenShift, so naming a provisioner after a generic image, as in the example which is mentioned in this issue description, doesn't make sense. Maybe the main question that we should keep in mind when renaming would be: what is the technology this provisioner will use to provision the service? Helm Charts? Then use the HelmChartProvisioner, similarly it would work for the operator.
According to these rules, the example in the issue description would maybe need to be renamed to something like WildFlyS2iBasedImageOpenShiftProvisioner- just my personal taste.
The same would apply to the related test classes.
WDYT?


add --retain-tmp-values option

It would be nice to have helmfile leave the temporary values files for debugging helmfile/helm/charts sometimes.  Even with helmfile --debug you don't know which computed values were put into which file, and the files are almost always cleaned up before you can inspect the temp values for a syntax error.
Maybe i'm doing it wrong, but I currently have a syntax error somewhere amongst 3 nested helmfiles, 20 charts and their respective values.  I can't figure out what the computed values being given to helm are, and trying to parse the --debug log isn't helpful.

@ruckc Hey! Does helmfile apply --retain-values-files help?

The same request here.
Invoking as follows:
$ helmfile --debug --state-values-file values.yaml apply  --retain-values-files

and /tmp/values* files get deleted every time.


'answers' is not one of ['fine-tune'] - 'purpose'

Describe the bug
I am using :
				$c_file = curl_file_create($file);
				$result =$open_ai->uploadFile([
					"purpose" => "answers",
					"file"    => $c_file,
				]);

Results :
'answers' is not one of ['fine-tune'] - 'purpose'
To Reproduce

$c_file = curl_file_create($file);
$result =$open_ai->uploadFile([
"purpose" => "answers",
"file"    => $c_file,
]);
Results :
'answers' is not one of ['fine-tune'] - 'purpose'

Code snippets
No response
OS
win
PHP version
PHP 8
Library version
openai v3.0.1

Could you improve the response that you received?


Fixup main build error

Description
This PR...

Types of changes

[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] New feature (non-breaking change which adds functionality)
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] Enhancement (improves an existing feature and functionality)
[ ] Cleanup (Code refactoring and cleanup, that may add test cases)
[ ] build/CI
[ ] test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale

[ ] Major
[ ] Minor

Bug Severity

[ ] BLOCKER
[ ] Critical
[ ] Major
[ ] Minor
[ ] Trivial

Screenshots (if appropriate):
How Has This Been Tested?

How did you try to break this feature and the system with this change?

@blueorangutan package

@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

Packaging result [SF]: ✖ el7 ✖ el8 ✖ el9 ✖ debian ✖ suse15. SL-JID 10204

@blueorangutan package

@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan package

@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

Packaging result [SF]: ✖ el7 ✖ el8 ✖ el9 ✖ debian ✖ suse15. SL-JID 10207

@blueorangutan package

@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

Packaging result [SF]: ✔ el7 ✔ el8 ✔ el9 ✔ debian ✔ suse15. SL-JID 10208


Allow Collaborators with read-only-access to be set as Pull Request and Issue assignees

Feature Description
I think it would be great if Gitea had the ability to assign Collaborators with read-only repository access.
The usecase would be to use a fork-driven contributor model, so that not every team member has to get write access to an repository with complicated branch protection rules for every single branch.
Screenshots
No response

I think it would be great if Gitea had the ability to assign Collaborators with read-only repository access.

Do you mean:

I think it would be great if Gitea had the ability to assign Collaborators with read-only repository access.

Do you mean:


[Feature Request]: ChatBot update for more attractive ui and Auto Reply✨

Is there an existing issue for this?

[X] I have searched the existing issues

Feature Description
chatbot are more much attractive like website the ui of chat bot iss old .
i can improve the style and enhance performance using AI trained model.
Use Case
easy to communicate with support and easy to use the chat bot
Benefits

automatic reply for more user intraction

Bot feature

Add ScreenShots

Priority
High
Record

[X] I have read the Contributing Guidelines
[X] I'm a GSSOC-EXT contributor
[X] I'm a HACKTOBERFEST contributor
[X] I have starred the repository

@8uraj, please go ahead.


Add a command to run the update list

Add a command to run the auto update list as I have another plugin allowing me to run commands and restart the server for a constent update schedule.

Alright doesn't seem too hard I can add

Should be added with the latest release. Please go test it out since I haven't tested yet.

It works as expected for me

Alright perfect


Create CODE_OF_CONDUCT.md

As a large, active, highly-visible open-source project, we need to take a leadership role in promoting community standards of good conduct.
Closes #51.

But, like, we have never need one of these before, so why should we have one now?

What is libtrue core going to do about it?!

As truth-in-chief I approve of this message.

wouldn't it suffice to just say "Don't be a git" ?


Bug - seems like a legit bug to me

I am on  "version": "1.12.0"
I got this error:
 TypeError: Cannot read property 'prototype' of undefined
    at _loop (/Users/alexamil/WebstormProjects/oresoftware/sumanjs/suman-d/node_modules/vorpal/dist/ui.js:123:42)
    at new UI (/Users/alexamil/WebstormProjects/oresoftware/sumanjs/suman-d/node_modules/vorpal/dist/ui.js:150:7)
    at Object.<anonymous> (/Users/alexamil/WebstormProjects/oresoftware/sumanjs/suman-d/node_modules/vorpal/dist/ui.js:595:10)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)

I was using this code from the example in the readme:
  const vorpal = require('vorpal')();

  vorpal
    .command('foo', 'Outputs "bar".')
    .action(function (args: Array<string>, cb: Function) {
      this.log('bar');
      cb();
    });

  vorpal
    .delimiter('suman>')
    .show();

I have migrated most of my JS library projects to TS and I would recommend that a lot, it can catch these kinds of bugs. If you need help migrating this library to TS, I would definitely volunteer.

I am really looking forward to using this library, so hopefully we can square this bug away.

@ORESoftware What version are you using?
What happens if you set a const first.
const Vorpal = require('vorpal');
const vorpal = new Vorpal();

@milesj
I tried that first actually, got the same problem
I am on "version": "1.12.0", Node.js version 6.10.0

It might have been that I used
import * as Vorpal from 'vorpal';
I forgot I had that at the top of my file
then later I called
const Vorpal = require('vorpal');
but something is wrong if you get that TypeError.
Suddenly it's working but honestly not sure why. Please keep this issue open, I might have more info for you.

Ok I figured it out! I was monkey-patching some prototypes.
Something about the following code causes the problem. If you have any insights please let me know.
'use strict';

const then = Promise.prototype.then;
Promise.prototype.then = function (fn1, fn2) {

  if (process.domain) {
    fn1 = fn1 && process.domain.bind(fn1);
    fn2 = fn2 && process.domain.bind(fn2);
  }

  return then.call(this, fn1, fn2);
};

const katch = Promise.prototype.catch;
Promise.prototype.catch = function (fn1) {
  if (process.domain) {
    fn1 = fn1 && process.domain.bind(fn1);
  }
  return katch.call(this, fn1);
};

// add a MF utility method to Number.prototype and String.prototype
String.prototype.times = Number.prototype.times = function (callback) {
  if (typeof callback !== 'function') {
    throw new TypeError('Callback is not a function');
  } else if (isNaN(parseInt(Number(this.valueOf())))) {
    throw new TypeError('Object/value is not a valid number');
  }
  for (let i = 0; i < Number(this.valueOf()); i++) {
    callback(i);
  }
};

const exit = process.exit;
let callable = true;

process.exit = function (code, fn) {

  if(!callable){
    if(fn === true){
      exit.call(process, code);
    }
    else{
      console.error(' => Suman implementation warning => process.exit() already called.');
    }
    return;
  }
  else{
    callable = false;
  }

  if (fn) {
    if (typeof fn !== 'function') {
      throw new Error(' => Suman internal implementation error => Please report ASAP, thanks.');
    }
    setTimeout(function () {
      console.error(' => Function timeout.');
      exit.call(process, (code || 1));
    }, 15000);

    let final = function (err, c) {
      if (err) {
        exit.call(process, (c || code || 1));
      }
      else {
        exit.call(process, (c || code || 0));
      }
    }

    let isFinalCallable = true;

    fn(function(){
      if(!isFinalCallable){
        console.error(' => Suman implementation warning => process.exit() already called.');
        return;
      }
      isFinalCallable = false;
      final.apply(null, arguments);
    });
  }
  else {
    exit.call(process, code);
  }
};

Function.prototype.adhere = function () {

  let self = this;
  let args1 = Array.from(arguments);

  return function () {

    let args2 = Array.from(arguments);
    return self.apply(this, args1.concat(args2));
  }

};

Array.prototype.mapToObject = function (fn) {

  let obj = {};

  for (let i = 0; i < this.length; i++) {

    let ret;

    if (fn) {
      ret = fn.call(this, this[i], i);
    }
    else {
      ret = this[i];
    }

    let keys = Object.keys(ret);
    assert(keys.length, ' => Object needs keys.');

    for (let j = 0; j < keys.length; j++) {
      const k = keys[j];
      obj[k] = ret[k];
    }

  }

  return obj;

};

I am going to try to figure out which one of the patches causes the problem. Will report back. They say don't monkey patch prototypes lol...

Ok found it..can you guess which one caused the problem?
It was the Array.prototype.mapToObject patch.
Do you have any idea why? Perhaps you guys made the same patch?
If that's the case...maybe neither of us should do that lol.

This is generally why modifying the prototype is frowned upon. It causes far too many issues across all libraries. That being said, I'm still not sure why modifying the Array caused the problem.

Yeah me neither, pretty weird. I'd like to blame vorpal...I haven't looked at your source where the error is but I will tomorrow.

I definitely don't extend natives in Vorpal.


PDF Download is not working

When you click it, it only downloads a placeholder error file.

Did not need to use the FS Plugin from Gatsby V2.0 since adding static files is now baseline with V4. Fixed.


[Event Request] report 5405 "Calc. Consumption" - OnBeforeAssignItemTracking

In https://github.com/microsoft/ALAppExtensions/issues/21898 I requested the OnBeforeAssignItemTracking event. Allas the 'var' was forgotten when implementing the code in the base app. Please rectify it in the next minor 22.01 release...
Old Code:
[IntegrationEvent(false, false)]
local procedure OnBeforeAssignItemTracking(ProdOrderComponent: Record "Prod. Order Component"; ItemJournalLine: Record "Item Journal Line"; var IsHandled: Boolean)
begin
end;
New Code:
[IntegrationEvent(false, false)]
local procedure OnBeforeAssignItemTracking(var ProdOrderComponent: Record "Prod. Order Component"; var ItemJournalLine: Record "Item Journal Line"; var IsHandled: Boolean)
begin
end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 10818.


Using a ScrollView - Example doesn't work?

Description
Provided example code compiles but doesn't seem to work - throws errors. Only when changed to a function, I'm able to make it work.
What is the problem?
When executing the sample code, I get an error:

ReferenceError: Can't find variable: App
48 | export default App = () => (

How can we address it?
I've changed from:
export default App = () => (

To (with necessary adjustments):
export default function App() {
    return (

and it worked.
Why is it important?
Well, I had to spent a bit to understand what was the issue, given everything beforehand has been working out of the box. If this is not an issue per se, maybe it should be hinted somewhere.
Who needs this?
New learners, like me :)
When should this happen (use version numbers if needed)?
Latest version available

Hi @armandojsgomes, the sample code is correct, there is a problem with your IDE/editor or project configuration.  You can read more about arrow functions in the comment here.
If you would like to avoid that replace inline export in your code with:
const App = () => { ... };
export default App;

Oh, thanks for the info and sorry about that! :)

You can also change the code to:
export default (App = () => { ... });

It looks like ESLint false positive report, at least in the Snack;


Fix bug that allows unix arguments to work + small amount of cleanup

There was a small bug in the HTML as well as the argument initialization that prevented arguments from working.  That is now fixed and has been tested using Linux.  My test was was default shell with the following options being passed in: -c top, which resulted in what was expected.
I also added a few files to .gitignore as they looked to be missing, as well as a new run script that launches extraterm without development console showing.

thanks


custom typedoc theme

In _typedoc, we had a custom theme that worked with an older version of typedoc, but is not compatible with v0.22 anymore.
The point of the theme was a better display format for union types.
The mechanism for custom themes is now completely different:
https://github.com/TypeStrong/typedoc/blob/master/internal-docs/custom-themes.md
Our custom modifications of the default theme were like this:
diff -r default/partials/type.hbs ../../custom-theme/partials/type.hbs
65c65
<         {{> type needsParens=true}}
---
>         {{> type}}
169a170
>
172,174c173
<             {{#unless @first}}
<                 ;
<             {{/unless}}
---
>
224a224,225
>                 ;
>
226c227,228
<          }
---
>         }
>
301,303c303
<     {{#if needsParens}}
<         (
<     {{/if}}
---
>
306c306
<              |
---
>              |
310,312c310
<     {{#if needsParens}}
<         )
<     {{/if}}
---
>

Not worth it in terms of time and money.


No support for ES6 in webpack config

It is common to write webpack config on ES6 (webpack makes it possible if config name simply has *.babel.js in the tail).
jest-webpack-alias doesn't support ES6 syntax within given webpack config.
Here is my configuration:
// package.json
...
jest-webpack-alias": {
  "configFile": "webpack.config.babel.js"
}
...

// webpack.config.babel.js
import webpack from 'webpack';
...

What's the error that you're seeing?

@mwolson open your browser console, and type:
import webpack from 'webpack';

That's exactly what I'm seeing.

On the second though... drop this PR. There is no need to add new dependency to the module,
same effect can be achieved by adding require('babel-register') to the __tests__/preprocessor.js:
Setup
File __tests__/preprocessor.js:
require('babel-register');
var babelJest = require('babel-jest');
var webpackAlias = require('jest-webpack-alias');

module.exports = {
  process: function(src, filename) {
    if (filename.indexOf('node_modules') === -1) {
      src = babelJest.process(src, filename);
      src = webpackAlias.process(src, filename);
    }
    return src;
  }
};

So, imho it would be better to patch the README.md instead.
Want PR for that?

This is fixed by adding the following line to your preprocessor.js file, which is now documented in README.md for easier discovery:
require('babel-register');


Edit mode fields

If I want to edit a pre-existing text now I have to fully retype the text.
I suggest to create a similar property to default, but that actually sets the content of the field so the user can modify it.

maybe we can have a flag to show the default as the input value?

I think that this issue now is strictly related to #17 .
Without the ability to move inside the field this issue becomes less important.


How to speed up

dear meiqua
My Computer is windows10 x64, Visual Studio 2017
I tested the basic example rotation finder.
It took about 5 minutes in train mode and about 3 minutes in test mode.
In the description, it is said to be less than 100ms.
I am curious about the difference.
Below is test logs Information..
////////////////////////////////////////
test img size: 2355200
construct response map
elasped time:13.9197s
templ matche
lasped time:58.167s
elasped time:72.092s
matches.size(): 9
match.template_id: 340
match.similarity: 99.4141
////////////////////////////////////////
Thank you all the time.

Hi, have you opened SIMD & O2 optimization option in VS?

I enabled the o2 option.(Maximum Optimization)
but, when enabled the SIMD(SSE or SSE2) option, the below Compiler was occured error .
Error	C3001	'declare': expected an OpenMP directive name
Error	C3036	'omp_insert': invalid operator token in OpenMP 'reduction' clause
Error	C3016	'template_id': index variable in OpenMP 'for' statement must have signed integral type
===> Error Lines
#pragma omp declare reduction
#pragma omp parallel for reduction(omp_insert:matches)
Thank you! meiqua~~

I found my answer in past questions.
Thank you very much.

Nice, glad it helps.