Why default version to "master" inside manifest parser

in manifest_parser.yaml we default to version = "master"; however, this has no meaning in the specification.  Are we assuming only GitHub and overloading a concept of version with "branch"? We need to examine why this was done and see if we need to introduce a new concept of "branch"; however, by default we should automatically use code from master branch (or equivalent concept) in other repo. systems.  Perhaps we should see how we do this generically for Subversion, etc.
for reference, it is set as follows:
func (dm *YAMLParser) ComposeDependencies(mani *ManifestYAML, projectPath string) (map[string]utils.DependencyRecord, error) {

	var errorParser error
	depMap := make(map[string]utils.DependencyRecord)
	for key, dependency := range mani.Package.Dependencies {
		version := dependency.Version
		if version == "" {
			version = "master"
		}

The version parameter was intended for "release" (name) for GitHub; we may need to introduce a field called branch (optional) and use that for default "master" when GitHub is the repo.


Replace debuger-libs binaries by source code

It's few reasons to replace debugger-libs binaries by source code:

debugger-libs classes like SoftDebuggerSession always fail silently, i.e. it just won't work without any exception and logs, so it really hard to understand what is wrong without debugging source code of debuger-libs.
debugger-libs isn't well documented, it doesn't have some kind of tutorials, so I believe that reading source code is the best way to understand how it works.
Owner of Mono.Debugger.Soft, Mono.Debugging and Mono.Debugging.Soft packages is Jetbrains: the release process isn't documented at all (at least I hasn't found any info about it).

@VysotskiVadim why do you think that the owner of Mono.Debugger.Soft, Mono.Debugging and Mono.Debugging.Soft packages is Jetbrains?

Please, see pull request https://github.com/Microsoft/vscode-mono-debug/pull/37

I had raised this issue in the past. The maintainers of the actual source code should have been consulted by Jetbrains before their code was packaged and published under an owner that is not them. Also, there is no indication of whether Jetbrains applied any patches on the vanilla source code.

debugger-libs was replaced with sources from a git submodule with https://github.com/microsoft/vscode-mono-debug/pull/64.


A/B tests in donate-button

We can keep an enum of experiments and possible values in a subpackage of donate-button
When a request comes in, the Cloudflare Worker sets a cookie containing a single value, a sessionId
The cloudflare worker also stores values for all of the available experiments into Cloudflare KV, keyed by sessionId.
Then the donate-button bundle will do an AJAX call to a Cloudflare-worker hosted endpoint, somethign like partners.every.org/experiments
That will return the stored object for that sessionId to the frontend, which will be saved in a React Provider in the donate-button code
Until that call is done, the donate button will use each experiment's DEFAULT value
We will add some behavior-tracking API endpoint (https://github.com/everydotorg/donate-button/issues/205) to record A/B test results.

for now assigning to me but I hope to add someone else from Every.org to spread internal knowledge of the repo

gonna abandon this for now - privacy concerns over tracking cookies on other peoples' websites is tricky.


FileNotFoundError from load_state caused the input_dir is joined twice

System Info
- `Accelerate` version: 0.22.0
- Platform: Linux-4.15.0-194-generic-x86_64-with-glibc2.27
- Python version: 3.9.15
- Numpy version: 1.24.4
- PyTorch version (GPU?): 2.0.1+cu117 (False)
- PyTorch XPU available: False
- PyTorch NPU available: False
- System RAM: 251.84 GB
- `Accelerate` default config:
        - compute_environment: LOCAL_MACHINE
        - distributed_type: MULTI_GPU
        - mixed_precision: no
        - use_cpu: False
        - debug: False
        - num_processes: 2
        - machine_rank: 0
        - num_machines: 1
        - gpu_ids: all
        - rdzv_backend: static
        - same_network: True
        - main_training_function: main
        - downcast_bf16: no
        - tpu_use_cluster: False
        - tpu_use_sudo: False
        - tpu_env: []

Information

[ ] The official example scripts
[X] My own modified scripts

Tasks

[ ] One of the scripts in the examples/ folder of Accelerate or an officially supported no_trainer script in the examples folder of the transformers repo (such as run_no_trainer_glue.py)
[X] My own task or dataset (give details below)

Reproduction
In https://github.com/huggingface/accelerate/blob/main/src/accelerate/accelerator.py#L2879, input_dir  is added twice to folders, resulting in a  FileNotFoundError. Replacing the last line with input_dir =folders[-1] solved the issue for me.
        elif self.project_configuration.automatic_checkpoint_naming:
            # Pick up from automatic checkpoint naming
            input_dir = os.path.join(self.project_dir, "checkpoints")
            folders = [os.path.join(input_dir, folder) for folder in os.listdir(input_dir)]

            def _inner(folder):
                return list(map(int, re.findall(r"[\/]?([0-9]+)(?=[^\/]*$)", folder)))[0]

            folders.sort(key=_inner)
            input_dir = os.path.join(input_dir, folders[-1])

Expected behavior
Quick fix.

Thanks for the quick reply! Unfortunately, accelerate==0.23.0 did not solve the issue, which seems to have the same behavior:  https://github.com/huggingface/accelerate/blob/a87c95da9e3b416fb10a0e7dac7d397c015c3ed5/src/accelerate/accelerator.py#L2879

@muellerzr note that the issue is different from https://github.com/huggingface/accelerate/issues/1982 as it is related to the ˋinput_dir` and not the process.

@muellerzr I cannot share my full code, but here is the logic:
# Accelerator object
project_config = ProjectConfiguration(project_dir=cfg.trainer.dir, automatic_checkpoint_naming=True, total_limit=5)
accelerator = Accelerator(project_config=project_config)

# Get the model, optimzier, scheduler, dataloaders, and loss
model = get_model(**cfg.model, **cfg.tokenizer)
optimizer = get_optimizer(model, **cfg.optimizer)
scheduler = get_scheduler(optimizer, **cfg.scheduler)
train_dataloader = get_dataloader(**cfg.tokenizer, **cfg.dataset.train, **cfg.trainer.train)
eval_dataloader = get_dataloader(**cfg.tokenizer, **cfg.dataset.validation, **cfg.trainer.validation)
loss_fn = get_loss(**cfg.tokenizer, **cfg.trainer.train)

# Prepare the model, optimzier, scheduler, and dataloaders for distributed training
train_dataloader, eval_dataloader, model, optimizer, scheduler = accelerator.prepare(
    train_dataloader,
    eval_dataloader,
    model,
    optimizer,
    scheduler,
)

if cfg.trainer.resume and os.path.exists(cfg.trainer.dir):
    accelerator.load_state()
    skipped_train_dataloader = accelerator.skip_first_batches(train_dataloader, metrics.num_steps_in_epoch)

for x, y, pad_mask in train_dataloader if skipped_train_dataloader is None else skipped_train_dataloader:
    outputs = model(x, pad_mask)
    train_loss = loss_fn(outputs.view(-1, cfg.tokenizer.vocab_size), y.view(-1))
    accelerator.backward(train_loss)
    optimizer.step()
    scheduler.step()
    optimizer.zero_grad()
    accelerator.save_state()

The first time I run the code, the folder cfg.trainer.dir will be created. Let's say there are 10 checkpoints (checkpoint_0 to checkpoint_9). The second time I run the code with cfg.trainer.resume=True, the model will call accelerator.load_state():
    def load_state(self, input_dir: str = None, **load_model_func_kwargs):
        if input_dir is not None:
            # Check if folder exists
            input_dir = os.path.expanduser(input_dir)
            if not os.path.isdir(input_dir):
                raise ValueError(f"Tried to find {input_dir} but folder does not exist")
        elif self.project_configuration.automatic_checkpoint_naming:
            # Pick up from automatic checkpoint naming
            input_dir = os.path.join(self.project_dir, "checkpoints")
            folders = [os.path.join(input_dir, folder) for folder in os.listdir(input_dir)]

            def _inner(folder):
                return list(map(int, re.findall(r"[\/]?([0-9]+)(?=[^\/]*$)", folder)))[0]

            folders.sort(key=_inner)
            # ADD PRINT HERE
            print(f"input_dir: {input_dir}")
            print(f"folders[-1]: {folders[-1]}")
            print(f"os.path.join(input_dir, folders[-1]) : {os.path.join(input_dir, folders[-1])}")
            input_dir = os.path.join(input_dir, folders[-1])
        else:
            raise ValueError("No input_dir provided and automatic checkpoint naming is disabled.")
        logger.info(f"Loading states from {input_dir}")

The three prints that I have added give (real output from my script):
input_dir: outputs/toy/checkpoints
folders[-1]: outputs/toy/checkpoints/checkpoint_9
os.path.join(input_dir, folders[-1]) : outputs/toy/checkpoints/outputs/toy/checkpoints/checkpoint_9
[...]
FileNotFoundError: [Errno 2] No such file or directory: 'outputs/toy/checkpoints/outputs/toy/checkpoints/checkpoint_9/pytorch_model.bin'

Yes, I think this is indeed a bug. At first, I was astonished why this was not discovered earlier. I think the reason is that it only occurs with relative paths, not absolute, because of this behavior of os.path.join:
>>> import os
>>> os.path.join("/tmp/foo", "/tmp/foo/bar.txt")
'/tmp/foo/bar.txt'

So with absolute paths, this double-joining of input_dir is not actually an issue. I'll create a PR to fix the issue.


Can't connect to MongoDB from localhost after renewing SSL cert

Hi,
when I run my server on localhost and run a request to the db on Digital Ocean I get this error in the Terminal:
error: Uncaught internal server error. { [MongoError: certificate has expired] name: 'MongoError', message: 'certificate has expired' } Error: certificate has expired     at Error (native)     at TLSSocket.<anonymous> (_tls_wrap.js:1017:38)     at emitNone (events.js:67:13)     at TLSSocket.emit (events.js:166:7)     at TLSSocket._init.ssl.onclienthello.ssl.oncertcb.TLSSocket._finishInit (_tls_wrap.js:582:8)     at TLSWrap.ssl.onclienthello.ssl.oncertcb.ssl.onnewsession.ssl.onhandshakedone (_tls_wrap.js:424:38)
The code is the same as on my server (no problems there) and also used to work from localhost without a problem.
The only thing that changed since it last worked is that I renewed my let's encrypt certificate.
I found this issue here: https://github.com/ParsePlatform/parse-server/issues/1026
But since everything worked well before renewing the SSL cert I was wondering if there is anything else I could do about it then pointing to the cert in index.js?
Thanks for your help!
Environment Setup

Server

parse-server version: 2.2.10
Operating System:     OSX
Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): localhost

Database

MongoDB version: v3.0.12
Localhost or remote server?: Digital Ocean

OK. Solved it. SSL Cert was not properly setup.

I faced the same problem. The problem is that when i renew letsencrypt certificate it generated fullchain2.pem,privkey2.pem files. But I copy generated the mongodb.pem file with this command (with old certificates):
sudo cat /etc/letsencrypt/archive/example.com/{fullchain1.pem,privkey1.pem} | sudo tee /etc/ssl/mongo.pem
Don't forget to use new certificate files.


print_line causing lockups in Godot 4

Godot version:

Godot 3.2.4 dev
Godot 4.0 master latest version df4fe11
OS/device including version:
Linux Mint 20
Intel Core i5-7500T
Intel HD graphics 630
QT Creator 4.13.3

Issue description:

Issuing a large amount of print_lines from c++ causes freezes and lockups when running in a debugger from QT creator, but only when going through the transition from the project manager to the editor (not when running the editor directly with -e argument).

Possibly a QT creator bug
Possibly related to #43705?

Steps to reproduce:
I tried spamming print from gd script but it doesn't appear to cause it, I've only got it to work from c++.
e.g. In vulkan_context.cpp, add this spamming to the start of swap_buffers:
Error VulkanContext::swap_buffers() {
	for (int n=0; n<128; n++)
		print_line("swapbuffers?");

	if (!queues_initialized) {
		return OK;
	}

Now I start debugging the project manager from QT creator, choose a project, and it starts doing a swap_buffers every frame, and pretty soon freezes once you start opening menus (opening lots of menus (OS windows)) seems to be associated, I'll put more info as I find it.
Debugger only?

It does not seem to occur when running from the terminal, but only from the QT creator debugger. I've tested QT creator by spamming prints in a simple c++ program just in case it was a QT creator bug, and it seems to run fine. But that still doesn't mean it is impossible that it is QT creator bug.

Also relevant, I set it this project to log_to_file in the project settings. I'll try turning that off and report back.
EDIT - Still occurs when log_to_file is off, so it doesn't appear to be that.

Does not seem to occur when running in the same way from gdb in the terminal. So this again is pointing to QT creator or some timing / locking interaction with QT creator. I'll see if I can replicate it in 3.2, in case it is a regression in QT creator latest version.

Problem due to print_line after cleanup?
Even more curious - something which puzzled me when investigating this (over 3 days), it doesn't occur when you use the -e argument to debug the project directly when running the debugger. It only seems to occur after transitioning from the project manager to the Editor.
This makes me wonder whether the problem is occurring due to print_line being issued (from c++) after something in the logging has been deleted or cleaned up, causing a corruption which exhibits when it then runs the editor. Or before? This theory would also tie in with gdscript prints not causing it.
It is a pretty crazy set of symptoms I'll admit. I first thought it was a bug in the GLES renderer I was writing, but it turns out to be nothing to do with it!
Latest

It occurs in 3.2 as well!! It had never happened before, presumably because it only occurred with a small margin of conditions, or maybe a new QT creator bug triggered by recently upgrading OS and QT.
It does not occur in qt creator when I choose the 'run in terminal' option.

So my current theory is this is either a QT creator bug (or even possibly OS?), or if a Godot bug, a race condition which only triggers in specific circumstance. If it really is this rare then perhaps we can ignore it. But it wouldn't hurt to look through print_line and see if there is anything suspicious.

@akien-mga managed to reproduce and get a call stack with gdb:
0x00007ffff7815f4f in write () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff7815f4f in write () from /lib64/libc.so.6
#1  0x00007ffff77aa455 in _IO_file_write@@GLIBC_2.2.5 () from /lib64/libc.so.6
#2  0x00007ffff77a9876 in new_do_write () from /lib64/libc.so.6
#3  0x00007ffff77ab4b9 in __GI__IO_do_write () from /lib64/libc.so.6
#4  0x00007ffff77a96a8 in __GI__IO_file_sync () from /lib64/libc.so.6
#5  0x00007ffff779eed2 in fflush () from /lib64/libc.so.6
#6  0x0000000004f6b204 in StdLogger::logv (this=0x919b460, p_format=0x7b83d8c "%s\n", p_list=0x7fffffffc940, p_err=false) at core/io/logger.cpp:232
#7  0x0000000004f6b30f in CompositeLogger::logv (this=0x919b4a0, p_format=0x7b83d8c "%s\n", p_list=0x7fffffffc988, p_err=false) at core/io/logger.cpp:249
#8  0x0000000004e94319 in OS::print (this=0x7fffffffd060, p_format=0x7b83d8c "%s\n") at core/os/os.cpp:116
#9  0x000000000529cc55 in print_line (p_string=...) at core/string/print_string.cpp:77
#10 0x00000000030f3bd1 in VulkanContext::swap_buffers (this=0x93b4630) at drivers/vulkan/vulkan_context.cpp:1247
#11 0x00000000030b5f61 in RenderingDeviceVulkan::swap_buffers (this=0x9706cd0) at drivers/vulkan/rendering_device_vulkan.cpp:7030
#12 0x0000000004bb495c in RasterizerRD::end_frame (this=0x9ae2a90, p_swap_buffers=true) at servers/rendering/rasterizer_rd/rasterizer_rd.cpp:95
#13 0x0000000004adf30d in RenderingServerRaster::draw (this=0x994b600, p_swap_buffers=true, frame_step=0.050000004470348358) at servers/rendering/rendering_server_raster.cpp:119
#14 0x0000000004b16f74 in RenderingServerWrapMT::draw (this=0x9efc970, p_swap_buffers=true, frame_step=0.050000004470348358) at servers/rendering/rendering_server_wrap_mt.cpp:91
#15 0x0000000001f92464 in Main::iteration () at main/main.cpp:2509
#16 0x0000000001f5a0e2 in OS_LinuxBSD::run (this=0x7fffffffd060) at platform/linuxbsd/os_linuxbsd.cpp:261
#17 0x0000000001f57b07 in main (argc=4, argv=0x7fffffffd568) at platform/linuxbsd/godot_linuxbsd.cpp:58


Clone Request

Mind if i clone this project to make a spanish translation for my DnD group? I'm pretty new to gifthub and wanted to ask for permision first.

I have just added a MIT license, which means you are free to do whatever you want with this project. If you find a way to add localisation support to this project, I'd be happy to merge a PR. Otherwise, send me a link to your fork and I'll mention it in the readme of this project.

Great! I'll start working on it


Unable to enable the Linux Development Environment

Describe the bug or issue
When enabling, returns "Error downloading the virtualmachine, Please try again."
My setup

Raspberry Pi 4B with 8GB RAM
image r96, r96-r1
USB thumb drive, 64G

To Reproduce
Steps to reproduce the behavior:

Go to 'setting'
Click on 'Developer', click on "Turn on"
Using the default setting
Click "Install"

Expected behaviour
Linux development environment is installed/enabled.
Additional context
I used r92 image and everything went fine on the same hardware.

Did yout expand the partition? See below the issue storage amount incorrect.

Yes, I have 46+G available on state partition.

Same issue, I have expanded the partition (if there's not enough free space, it displays an error before attemtping to download)

Just try the r102-r2 image, it is working fine with sdcard.

I'll have a look when possible


Remove AWS dependency

See discussion in https://github.com/bigdatagenomics/adam/pull/690.
We depend on the AWS SDK for the Serializable AWS credentials. I believe that this is dead code.

re: https://github.com/bigdatagenomics/adam/pull/690#issuecomment-107751949
Taking a quick look at this, it looks generally useful and as such might still make sense in a utils module.  Was the old S3 Parquet loader you refer to replaced by something else?

What is useful about this? The AWS SDK? Any downstream project can just depend on AWS independently.

I'm seeing classes CredentialsProperties, S3ByteAccess, S3FileLocator, SerializableAWSCredentials.  Even if no longer used in ADAM they seem generally useful.

Ah, gotcha. I'm not much of a fan of letting dead code that adds a dependency stay in the repository. If we need the code at a later date, we can always revert the commit that removed it.

ok, then there's just the binary compatibility argument, which I'm not sure applies to these 0.x-versioned projects yet :)

Yeah, we're not concerned about that until 1.x.

Closed by https://github.com/bigdatagenomics/utils/commit/2b4c15401afae8b82771a218b96f3b6b81cf6061.


Test Infra code for contributing

Is your feature request related to a problem? Please describe.
There is no test code before checking goployer works in local system. Also if someone ones to deploy with goployer in the AWS environment, ALB, TGs are needed before testing.
Describe the solution you'd like
Terraform code is needed
Additional context
Before considering local test, we should have pre-test environment for contributing.
@jupitersong

@jupitersong, @asbubam
How about adopting CDK for test infra code?
https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html
With AWS CDK, we can initiate installation of infrastructure for test in user's account. Of course we could provide terraform. Any opinion is welcome.

Decide to go with Terraform


Fix typo (?)

It seems to me there was two little typo... I fixed it.

Nice, but I think "is" should have been "in" :)


Map Go '1.6.x' to '1.6.4'

Resolves https://github.com/travis-ci/travis-ci/issues/7096

Tested here: https://staging.travis-ci.org/BanzaiMan/travis_staging_test/builds/530758


@eessex => [Venice] Fade out controls on mobile

@owendodd there's a tradeoff in order to make this work: the video is no longer draggable on mobile and only relies on the gyroscope sensor. Reason is, there needs to be a cover on the player that listens for a touch that activates the controls again, which covers up the drag functionality. It hasn't really bothered me but just fyi.

This looks good from here, feel free to merge unless you want to wait on comments from @owendodd

Good from me!
[A.]  Owen Dodd
   Designer

   Artsy <http://artsy.net/>

<EMAIL_ADDRESS>+1<PHONE_NUMBER>
On May 15, 2017 at 8:28:30 PM, Eve Essex<EMAIL_ADDRESS>wrote:
This looks good from here, feel free to merge unless you want to wait on
comments from @owendodd https://github.com/owendodd
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/artsy/force/pull/1428#issuecomment-301562496, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ADDGeAcK4wXbaOEl9SGJScSZXkqPR0Tnks5r6JlOgaJpZM4Nbc2B
.


Getting the request url

I need request url for check license. I can get url with $queryArgs[ 'site_url' ] = home_url(); but, user can change it by editing plugin file. Is possible to get request url to better?

As an alternative to query arguments, you can extract the site URL from the User-Agent HTTP header. WordPress automatically sets the user agent to something like this: WordPress/4.8; http://siteurl.com. The update server parses the header and stores the URL in the wpSiteUrl field of the current Wpup_Request instance. This means that if you're overriding one of the server methods that get a $request argument, you can get the URL from $request->wpSiteUrl.
However, it's possible to change the WordPress User-Agent with plugins, so it's not 100% reliable either. Some security-oriented plugins automatically remove the header or replace it with something generic.
As far as I know, there's no foolproof way to get the site URL. You could try using the IP address for verification, but even that can change occasionally.


python311Packages.survey: 5.3.1 -> 5.4.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python311Packages.survey is: Simple library for creating beautiful interactive prompts
meta.homepage for python311Packages.survey is: https://github.com/Exahilosys/survey
meta.changelog for python311Packages.survey is: https://github.com/Exahilosys/survey/releases/tag/v5.4.0
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 5.4.0 with grep in /nix/store/z0ljrwasgavf0qxb96nqnkjxj3alp9rj-python3.11-survey-5.4.0
found 5.4.0 in filename of file in /nix/store/z0ljrwasgavf0qxb96nqnkjxj3alp9rj-python3.11-survey-5.4.0

Rebuild report (if merged into master) (click to expand)

7 total rebuild path(s)

7 package rebuild(s)

First fifty rebuilds by attrpath

maestral
maestral-gui
python311Packages.maestral
python311Packages.survey
python312Packages.maestral
python312Packages.survey

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/z0ljrwasgavf0qxb96nqnkjxj3alp9rj-python3.11-survey-5.4.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python311Packages.survey https://github.com/r-ryantm/nixpkgs/archive/8d8e0f01fec30720f07f2ef0235026981d98b94f.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/8d8e0f01fec30720f07f2ef0235026981d98b94f#python311Packages.survey

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/z0ljrwasgavf0qxb96nqnkjxj3alp9rj-python3.11-survey-5.4.0
ls -la /nix/store/z0ljrwasgavf0qxb96nqnkjxj3alp9rj-python3.11-survey-5.4.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review --extra-nixpkgs-config '{ allowInsecurePredicate = x: true; }' run on x86_64-linux 1

10 packages built:

maestral (python311Packages.maestral)
maestral-gui
maestral-gui.dist
maestral.dist (python311Packages.maestral.dist)
python311Packages.survey
python311Packages.survey.dist
python312Packages.maestral
python312Packages.maestral.dist
python312Packages.survey
python312Packages.survey.dist

Maintainer pings
cc @SFrijters for testing.

PR already exists https://github.com/NixOS/nixpkgs/pull/321223


add nbgitpuller to single user server

nbgitpuller needs to be installed in user's Jupyter Server environment

@rpwagner you can use the image hash for now, we can then tag once the image is finalized


⚠ SceneTime has degraded performance

In 706b615, SceneTime ($ST) experienced degraded performance:

HTTP code: 200
Response time: 1687 ms

Resolved: SceneTime performance has improved in eb68f80.


Fix orientation of flashlight sprites

About the PR

Flashlight sprites are authored with the light pointed left. The flashlight entities are authored with the PointLightComponent facing down. One of these needs to change.
The PointLight needs to face down in order to illuminate the correct direction when parented to an entity which is holding the flashlight. So, it'll have to be the sprite which changes.
Why / Balance

Immersion.
Technical details

Media

Before:

After:

[ ] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

Changelog

It looks a little weird to have the flashlight rotated downwards if you put it on a table or have it in your hands. Instead of rotating the sprite, can't you simpy rotate the pointlight?

It looks a little weird to have the flashlight rotated downwards if you put it on a table or have it in your hands. Instead of rotating the sprite, can't you simply rotate the pointlight?

No, if you rotate the point light, the light will be in the wrong direction when held in a hand, so the sprite has to be updated to be consistent with the way the enties are facing.

Thank you for the contribution.
While this is technically more correct, it's the general consensus of the art directors as a whole that this isn't really a necessary fix. Aligning the light with the sprite looks more accurate but sacrifices the appearance of the flashlights in general, as the 90 degree rotated versions look a fair bit worse. This is especially true for the blue flashlight, as the rotation leads to the shading on the sprite being noticeably off.
Taking this into account as well as the infrequent context in which you would see the flashlights like this, it's the general consensus to close this PR. Thank you for your work. Feel free to continue to contribute in the future. Thank you.


(apache-httpd) Update to use vs17 for binaries, vc15 are no longer provided.

Description

Update the regex to use vs17 rather than vc15, vc15 is no longer provided.
Motivation and Context

There is a security issue in both apache-httpd 2.4.53 and the first provided version of apache-httpd 2.4.54. There is a newer openssl out recently that mitigates known security issues. No package was automatically added due to lack of a matching regex.
How Has this Been Tested?

Screenshot (if appropriate, usually isn't needed):
Types of changes

[X] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Migrated package (a package has been migrated from another repository)

Checklist:

[X] My code follows the code style of this repository.
[ ] My change requires a change to documentation (this usually means the notes in the description of a package).
[ ] I have updated the documentation accordingly (this usually means the notes in the description of a package).
[X] I have updated the package description and it is less than 4000 characters.
[X] All files are up to date with the latest Contributing Guidelines
[ ] The added/modified package passed install/uninstall in the chocolatey test environment.
[X] The changes only affect a single package (not including meta package).

:white_check_mark: Package verification completed without issues. PR is now pending human review

:white_check_mark: Package verification completed without issues. PR is now pending human review


Moonbeam Staking Enhancement

[x] Min Bond

[x] 排序： min bond，APY

[x] APY 计算

[ ] dark mode

dark mode 为啥会有人喜欢

we have to re-check the APY calculation


Duplicate Country Name

"Jordan" country is duplicated in the query results

Hi @Danushka96 can you point out which endpoint returns this duplicates?

Hi @MartinsOnuoha it's https://countriesnow.space/api/v0.1/countries.
Also, I noticed that 'Myanmar' country is duplicated as well.


What is the best approach for adding a checklist block to Draft?

I want to extend Draft to accept a checklist/todo block. The block will have a checkbox at the left edge and can be toggled on/off to represent a complete/pending state respectively. The checkbox cannot be moved around the editor (you can’t copy/paste it into the middle of a text block).
I feel like there are a few approaches I can take, so I was wondering if I could get an opinion.

Create a custom block type by extending DraftEditorBlock. I would need to override render() and tuck the checkbox into the component before the children are rendered.

One issue with this approach is that Draft does not publicly expose this component. Not a dealbreaker, but I’m assuming there was some thought behind excluding DraftEditorBlock.

Wrap the internal block text in an Entity that injects the checkbox.

I tried out this approach using the link example. One side-effect is that you can’t delete all text within the block and have the Entity remain. These concerns were raised in #129, e.g. using a zero-width character.

A better alternative?

Thanks again for continuously improving Draft.

Can you create a custom block component that includes your checkbox and composes a DraftEditorBlock? (We should never ever extend React components.)
You can pass along props that track the state of the checkbox.
class MyCheckboxEditor extends React.Component {
  constructor(props) {
    this._blockRenderer = (block) => {
      if (block.getType() === 'checkable') {
        return {
          component: CheckableBlock,
          props: {
            checkedState: this.state.checkedState[block.getKey()],
            onCheckedChange: (...) => /* update value in `checkedState` */
          },
        };
      }
    }
  }

  // etc.
}

Thanks for the quick reply. Let me take a shot at your suggestion and I will get back to you.

@hellendag Can you create a custom block component that includes your checkbox and composes a DraftEditorBlock?

I noticed that DraftEditorBlock requires props to be passed in. As a result, I ended up with:
  this._blockRenderer = (block) => {
    const type = block.getType()
    if (type !== 'taskPending' && type !== 'taskComplete') {
      return // render the default DraftEditorBlock
    }

    return {
      component: CheckableBlock,
      props: {
        checked: type === 'taskComplete',
        ...getDraftEditorBlockProps(this.state.editorState, block),
      },
    }
  }

where getDraftEditorBlockProps() derives the required props.
My component looks like
export default class CheckableBlock extends React.Component {
  static propTypes = {
    blockProps: PropTypes.object.isRequired,
  }

  render() {
    const {checked} = this.props.blockProps
    return (

        <input type="checkbox" checked={checked} />
        <DraftEditorBlock {...this.props.blockProps}/>

    )
  }
}

This renders as expected and the text contents of the block are editable! Nice. However, using the keyboard to move the insertion cursor over to the input results in an error:
Uncaught Invariant Violation: Unknown node in selection range.

This makes sense. I don’t expect Draft to understand how to handle insertion outside of the DraftEditorBlock. Is there a way to tell Draft “just ignore the <input>” (while still allowing it to be toggle with a mouse/keyboard)?
(I don’t have my heart set on `, but I assume I will need a proper React element of some kind to handle events, e.g. toggle the state on/off.)
Generated content (:before, :after) and list-image-style probably won’t offer me the control to toggling the state on/off with a mouse pointer/keyboard.
Any suggestions would be much appreciated.

where getDraftEditorBlockProps() derives the required props.

The same props should be passed to your block component as to DraftEditorBlock: CustomComponent and DraftEditorBlock.
So I believe you should have access to all the necessary props, and can propagate them through to your DraftEditorBlock using {...this.props}.

Uncaught Invariant Violation: Unknown node in selection range. ... Is there a way to tell Draft “just ignore the ” (while still allowing it to be toggle with a mouse/keyboard)?

Ah, I should have realized that might cause trouble. Does it work if you make the <input> contentEditable={false}?

So I believe you should have access to all the necessary props, and can propagate them through to your DraftEditorBlock using {...this.props}.

Sweet!

Does it work if you make the <input> contentEditable={false}?

Unfortunately not. It exhibits the same error when I change the <input> to a

Did you should set data-offset-key={this.props.offsetKey} on your root div? This is how our selection logic figures out where it is within the editor. (Not that you would have known to do that, since I probably didn't document it well. :))

Thanks for the help. data-offset-key worked!
Alright…making some progress. No more Uncaught Invariant Violations.
Is it possible to special case the selection to “skip” the inline <input> altogether? It would be ideal if the insertion cursor left the current custom block text and landed at the end of the previous block when pressing ←.

Awesome!

Is it possible to special case the selection to “skip” the inline  altogether?

Not exactly. It's one of the drawbacks of depending on the browser for selection behavior -- it sometimes puts the cursor in awkward places, especially around contentEditable={false} elements.
What does your current SelectionState look like when the cursor is before/after the <input>?

It is consistent when moving the cursor before/after the <input>:
anchorKey: "erh0g"
anchorOffset: 0
focusKey: "erh0g"
focusOffset: 0
hasFocus: false
isBackward: false

(I pulled these values from the React Dev Tools.)

If I apply certain styles to the <input>, (e.g. position: absolute, float: left) selection behavior changes a little. Going “forward” → moves the selection from the end of the current block to the beginning of the next block. Going “backward” ← from the first character of the current block moves the cursor around the input before placing it at the end previous block.
I haven’t dug through the code enough, but it seems Draft knows how to solve the “forward” case (because it can put the cursor at offset: 0 of the next block). It’s the “backward” case where Draft “loses track” of the selection.

Would a ← handler do the job? For instance, you could use a key binding function that maps the key to a command, then in handleKeyCommand, logic for that command that:

Checks for the current SelectionState, and whether it is collapsed
If so, checks whether it is within a "checkable"-type block, and at offset 0
If so:
If there is a previous block, use EditorState.forceSelection to throw the cursor up to the end of it
If not, kill everything and don't allow an onChange

We could also expose leftArrow and rightArrow as first-class keydown handler citizens, too.
You could probably still end up in a weird cursor state at times, but that could help.

We could also expose leftArrow and rightArrow as first-class keydown handler citizens, too.

I think custom key bindings and handleKeyCommand will get me to a workable solution. But exposing onLeftArrow could be a nice API enhancement for the future. :space_invader:

Would a ← handler do the job?

Yes, I think so. However, I’m confused about the interplay between the method assigned to the keyBindingFn prop and handleKeyCommand.
If I pass a ← command to handleKeyCommand and the left keypress is not inside a checkable block, then I will have lost the chance to call getDefaultKeyBinding appropriately (handleKeyCommand doesn’t have access to event, right?)
Currently I have:
  // some pseudocode for brevity
  myKeyBinder = (event) => {
    // if key isnt ArrowLeft' return getDefaultKeyBinding(event)
    // if selection is collapsed return getDefaultKeyBinding(event)
    // if focus offset isnt 0 return getDefaultKeyBinding(event)
    // if block type isnt checkable return getDefaultKeyBinding(event)
    // if prev block doesn’t exist return getDefaultKeyBinding(event)

    const prevBlock = contentState.getBlockBefore(startKey)
    const prevLength = prevBlock.getLength()
    const nextSelection = new SelectionState({
      anchorKey: prevKey,
      anchorOffset: prevLength,
      focusKey: prevKey,
      focusOffset: prevLength,
      isBackward: false,
      hasFocus: false,
    })
    // move to end of previous block
    const selectionState = EditorState.forceSelection(editorState, nextSelection)
    const nextState = EditorState.push(selectionState, contentState, 'move-selection-to-end-of-block')
    this.handleChange(nextState)

    return event.key
  }

FWIW, this solves my needs, but I imaging I may be missing something.

http://facebook.github.io/draft-js/docs/advanced-topics-key-bindings.html#customization
Your key binding function should fall through to return getDefaultKeyBinding(event);. :)

Your key binding function should fall through to return getDefaultKeyBinding(event);. :)

It does. :wink: That is all the pseudocode at the top. I return getDefaultKeyBinding(event) for each non-relevant condition before I generate a new EditorState. My code seems similar to the example you referenced:
function myKeyBindingFn(e: SyntheticKeyboardEvent): string {
  if (e.keyCode === 83 /* `S` key */ && hasCommandModifier(e)) {
    return 'myeditor-save';
  }
  return getDefaultKeyBinding(e);
}

However, if I don’t respect the default key binding for ← I would have to manually move the selection one character left each time inside handleKeyCommand, right?

Oh ha, I just totally ignored that since it was commented out! My fault. :)
I think I see what the issue is here. There are actually two things you need to implement.

Your key binding function, which should return a string like 'move-selection-up' in your left-arrow case.
A handleKeyCommand function, which receives the command string and consumes it accordingly.

Both should be provided as props to Editor.
class MyEditor extends React.Component {
  constructor(props) {
    ...
    this.handleKeyCommand = (command) => {
      if (command === 'move-selection-left') {
        // do stuff to this.state.editorState, call this.setState(), return true
      }
      return false;
    }
  }

  render() {
    return (
      <Editor
        handleKeyCommand={this.handleKeyCommand}
        keyBindingFn={myKeyBindingFn}
        ...
      />
    );
  }
}

function myKeyBinding(event) {
  if (/* left key and other stuff */) {
    return 'move-selection-left';
  }
  return getDefaultKeyBinding(event);
}

So you're defining a command, then separately consuming and handling that command. Does that make sense?

Yes. I think my hangup is that I have to duplicate much of the EditorState/ContentState/SelectionState introspection in both methods. However, my issue has been solved and that is the important part.
I just wanted to throw out a huge THANK YOU for taking the time to respond thoroughly (and thoughtfully) to all of my questions and comments. Your help was immensely valuable. :gem:

I think my hangup is that I have to duplicate much of the EditorState/ContentState/SelectionState introspection in both methods.

Ah, true. That's kind of annoying. Are there any top-level API methods that you think might help streamline this? I'm going to go ahead and close this issue for queue maintenance, but we can continue discussing on the thread.

I just wanted to throw out a huge THANK YOU for taking the time to respond thoroughly (and thoughtfully) to all of my questions and comments.  :)

Are there any top-level API methods that you think might help streamline this?

Hmm. Good question. Off the top of my head:

EditorState

::getBlockAtSelectionStart()
::getBlockAtSelectionEnd()
::getBlockBeforeSelectionStart()
::getBlockAfterSelectionEnd()

That would save me a small amount of code here and there, but it might not be worth the API bloat.
I’ll keep my eyes open for common patterns as I continue to build with Draft.

These would generally be wrappers like this, right?:
static function getBlockBeforeSelectionStart(editorState) {
  const selection = editorState.getSelection();
  const content = editorState.getCurrentContent();
  return content.getBlockMap().getBlockForKey(selection.getStartKey());
}

Plucking information off an EditorState can be a little boilerplate-y and tedious, I know. :)
It might be useful to have a bag of shortcut utilities like these, perhaps not on EditorState itself, but either available within the Draft repo or in a utility repo.

Yes, these would probably be better suited as a set of utility functions, similar to RichUtils. Thanks for following up.

Hi guys, sorry if I shouldn't be asking this here, but I have been trying to do something very similar for the last few hours and I'm stumped by the following error:
warning.js:44 Warning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components). Check the render method of ChecklistEditorBlock.
I'm on the latest version of draft (0.4.0) which I can see is considerably different to the code referenced here.
This error is only occurring when my custom block component tries to use the DraftEditorBlock, otherwise it renders as expected (except my cursor handling is messed up).
This is the code for my ChecklistEditorBlock with everything except the DraftEditorBlock removed:
class ChecklistEditorBlock extends React.Component {
    render() {
        return <DraftEditorBlock {...this.props} />;
    }
}

And this is the code for my block rendered function:
blockRendererFn(contentBlock) {
    const type = contentBlock.getType();
    switch (type) {
        case STYLE_COMMANDS.CHECKLIST:
            return {
                component: ChecklistEditorBlock,
            };
        default:
            return;
    }
}

I've tried to step into the code to make sense of the warning, but I'm only 2 months into react so I'm struggling.  Would either of you have any ideas, or is this potentially a regression?
Thanks

Is your DraftEditorBlock defined?
(Try to print it)
On Tue, 12 Apr 2016, 09:20 Glenn Allen<EMAIL_ADDRESS>wrote:

Hi guys, sorry if I shouldn't be asking this here, but I have been trying
to do something very similar for the last few hours and I'm stumped by the
following error:
warning.js:44 Warning: React.createElement: type should not be null,
undefined, boolean, or number. It should be a string (for DOM elements) or
a ReactClass (for composite components). Check the render method of
ChecklistEditorBlock.
I'm on the latest version of draft (0.4.0) which I can see is considerably
different to the code referenced here.
This error is only occurring when my custom block component tries to use
the DraftEditorBlock, otherwise it renders as expected (except my cursor
handling is messed up).
This is the code for my ChecklistEditorBlock with everything except the
DraftEditorBlock removed:
class ChecklistEditorBlock extends React.Component {
render() {
return <DraftEditorBlock {...this.props} />;
}
}
And this is the code for my block rendered function:
blockRendererFn(contentBlock) {
const type = contentBlock.getType();
switch (type) {
case STYLE_COMMANDS.CHECKLIST:
return {
component: ChecklistEditorBlock,
};
default:
return;
}
}
I've tried to step into the code to make sense of the warning, but I'm
only 2 months into react so I'm struggling. Would either of you have any
ideas, or is this potentially a regression?
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/facebook/draft-js/issues/132#issuecomment-208751351

@glenn-allen Can you provide a Gist with more code or a (non-working) example using jsFiddle or equivalent?

Thank you both for your quick reply!
So @cgestes, you were correct - DraftEditorBlock was undefined, pretty embarrassed I didn't think to do that myself.
Upon further inspection of the draftjs source I realised theDraftEditorBlock is exposed instead as just EditorBlock.
Correcting that solved my problems, thanks so much again!

Hi.
I have tried the implementation of the checkable list to these messages to the reference. Thank you!
However, we are worried about where to be converted to html. What would be better to make modifications to convertFromHTML? Thank you

Hi,
is it possible to change the content of the DraftEditorBlock according to some external events (e.g. the status of the checkbox)?
export default class CheckableBlock extends React.Component {
  constructor(props) {
    super(props);
    ...
    this._onChange() {
      // update the content of DraftEditorBlock
    }
  }

  render() {
    const {checked} = this.props.blockProps
    return (

        <input type="checkbox"
            checked={checked}
            onChange={this.onChange} />
        <DraftEditorBlock {...this.props} />

    )
  }
}

Thanks

Hey guys.
How to send type from action to blockRendererFn?
blockRendererFn(contentBlock) {
    const type = contentBlock.getType();
    switch (type) {
        case "checklist":
            return {
                component: ChecklistEditorBlock,
            };
        default:
            return;
    }
}```

@glenn-allen could you please share you action for adding checkbox

@hellendag could  you please help ? : )

Hi @gscottolson, Could you please provide a run able source of your check able custom block component?

Hi Lury, sorry I'm on vacation at the moment so I'm unable to look into
this right now. I'll be back in just over a week, so if it's still
unanswered I'll have a look when I'm back.
On 7 Jun 2016 20:26, "Iuriy Budnikov"<EMAIL_ADDRESS>wrote:

@glenn-allen https://github.com/glenn-allen could you please share you
action for adding checkbox
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/facebook/draft-js/issues/132#issuecomment-224279241,
or mute the thread
https://github.com/notifications/unsubscribe/ANzfSq7n4R4WFlprzV1gLzUvm2QwOCQjks5qJXFqgaJpZM4Hmvi1
.

@glenn-allen @gscottolson Getting ready to head down this path myself, Anyone willing to open source it as a plugin for us to build on? We could even use the architecture to release it https://github.com/draft-js-plugins/draft-js-plugins
Would just be cool to have this up in the community.
Thanks!

Hi @myyellowshoe & @luriy-Budnikov (sorry for forgetting!),
My current implementation is fairly intertwined with the app I'm building and it's using a workaround for block metadata which as far as I'm aware is now possible via the draft API in Draft 0.8.  I'll be trying to remove that soon, but not sure when I'll get the chance.
In the meantime, to get you started this is my general approach:

Add a "blockRenderMap" and "blockRenderFn" to your editor:

<Editor  ...
                        blockRenderMap={this.blockRenderMap}
                        blockRendererFn={this.blockRendererFn}
                        ... />

The block render map tells draft how to automatically wrap the block (Draft divs and classes):
const checklistRenderProp = {
    element: 'li',
    wrapper: {
        type: 'ul',
        props: {
            className: 'checklist-ul',
        },
    },
};
this.blockRenderMap = DefaultDraftBlockRenderMap.set('checklist', checklistRenderProp);

The block render fn tells Draft how to actually render the block and what properties to pass it:
blockRendererFn(contentBlock) {
        const type = contentBlock.getType();
        switch (type) {
            case 'checklist':
                return {
                    component: ChecklistEditorBlock,
                    props: {
                        updateMetadataFn // NOTE: This is my workaround to updating metadata for a block (I don't think this is necessary in Draft 0.8),
                        checked: true // NOTE: This should be calculated from the block metadata,
                        // ... Any other props you want to add
                 };
            default:
                return;
        }
    }

As you can see we specify the component that we want to be rendered when a block with this type is encountered and provide it with props to render itself.
A simple version of that component is as follows:
import React from 'react';
import { EditorBlock } from 'draft-js';
import classNames from 'classnames';   // Makes adding classes simpler

export default class ChecklistEditorBlock extends React.Component {
    constructor(props) {
        super(props);
        this.toggleChecked = this.toggleChecked.bind(this);
    }

    toggleChecked(event) {
        const { blockProps, block } = this.props;
        const { updateMetadataFn, returnFocusToEditor, checked } = blockProps;

        const newChecked = !checked;
        updateMetadataFn(block.getKey(), newChecked);

        // I also stop propagation, return focus to the editor and set some state here, but that's probably specific to my app
    }

    render() {
        const { offsetKey, blockProps } = this.props;
        const { checked } = blockProps;

        const blockClassNames = classNames('ChecklistEditorBlock', { checked });

        return (

                <Checkbox checked={checked} onClick={this.toggleChecked} />

<EditorBlock {...this.props} />

        );
    }
}

NOTE:  "Checkbox" is simply a React component that uses CSS and an SVG to visually toggle between a checked and unchecked state (i.e. when the class "checked" is added or removed.
Also - "EditorBlock" is the Draft JS component which has all the smarts to handle the text entry.
Further to the above you'll need a way of triggering a block to become a checklist.  This can simply be in an event handler or similar:
const newEditorState = RichUtils.toggleBlockType('checklist')

And to help with the arrow movement near the checkbox you'd also want to add a key binding function to your Draft :
checklistKeyBindingFn(editorState, event) {
         // left key
         if (event.keyCode === 37) {
            const selection = editorState.getSelection();
            const startKey = selection.getStartKey();
            const blockType = editorState.getCurrentContent().getBlockForKey(startKey).getType();
            if (blockType === 'checklist' && selection.getStartOffset() === 0
                && (selection.isCollapsed() || selection.getIsBackward())) {
                return 'move-selection-to-end-of-prev-block';
            }
        }
        return null;
}

keyBindingFn(event) {
        const { editorState } = this.state;

        return this.checklistKeyBindingFn(editorState, event)
            || getDefaultKeyBinding(event);
    }

And you'll need to handle that new command "move-selection-to-end-of-prev-block":
const handleMoveSelectionToEndOfPreviousBlockCommand = (editorState) => {
    const selection = editorState.getSelection();
    const startKey = selection.getStartKey();
    const contentState = editorState.getCurrentContent();
    const prevBlock = contentState.getBlockBefore(startKey);

    // If there's no previous block, then do nothing
    if (!prevBlock) return null;

    const prevKey = prevBlock.getKey();
    const prevLength = prevBlock.getLength();

    // Move the focus offset to the end of the previous line
    let selectionChanges = {
        focusKey: prevKey,
        focusOffset: prevLength,
    };
    // If the selection is collapsed, keep it collapsed by also moving the anchor
    if (selection.isCollapsed()) {
        selectionChanges = {
            ...selectionChanges,
            anchorKey: prevKey,
            anchorOffset: prevLength,
        };
    }

    const nextSelection = selection.merge(selectionChanges);

    // Update the selection state.
    const updatedEditorState = EditorState.forceSelection(editorState, nextSelection);
    return EditorState.push(updatedEditorState, contentState, 'move-selection-to-end-of-prev-block');
};

handleKeyCommand(command) {
        const { editorState } = this.state;
        ...

        let newState;
        if (command === 'move-selection-to-end-of-prev-block') {
            newState = this.handleMoveSelectionToEndOfPreviousBlockCommand(editorState);
        }

        if (newState) {
            this.onChange(newState);
            return true;
        }
        return false;
    }

So your final Editor will look something like:
<Editor ...
                        blockRenderMap={this.blockRenderMap}
                        blockRendererFn={this.blockRendererFn}
                        editorState={editorState}
                        onChange={this.onChange}
                        handleKeyCommand={this.handleKeyCommand}
                        keyBindingFn={this.keyBindingFn} />

I've heavily modified my code so there might be a couple of gaps sorry and this might not be the recommended way, but it's worked for me.  Hope it helps, sorry it's so long!

Super cool @glenn-allen. Thanks for posting that! Would like to plugintize it so this should be more than enough to get started down that path.
Thanks a bunch!

FWIW @myyellowshoe,
I've just updated to use the Draft 0.8 block data and this is my update metadata function:
updateBlockMetadata(blockKey, metadata) {
        let contentState = this.state.editorState.getCurrentContent();
        let updatedBlock = contentState
            .getBlockForKey(blockKey)
            .mergeIn(['data'], metadata);

        let blockMap = contentState.getBlockMap();
        blockMap = blockMap.merge({ [blockKey]: updatedBlock });
        contentState = contentState.merge({ blockMap });

        const newEditorState = EditorState.push(this.state.editorState, contentState, 'metadata-update');
        this.onChange(newEditorState);
    }

And my block render function now returns:
{
    component: ChecklistEditorBlock,
    props: {
        ...props,
        updateMetadataFn,
        checked: !!contentBlock.getData().get('checked'),
    },
};

Perfect. Thanks!

Thanks a lot for this thread and throughout answers!
i'm implementing something similar and would like to ask how would one receive text updates in components props?
I'd like to invoke some API calls when text changes from within the component that's rendered..
But it seems that props are not changing when one types text into the EditorBlock
<EditorBlock {...this.props} />
Inspecting source code there are also no update callback props for EditorBlock
Most unclear is when blockRendererFn is actually invoked (tried passing text as this: text: contentBlock.getText()  to blockProps.
Any idea would be appreciated! Thanks

@glenn-allen - Can you show me how you are importing "DraftEditorBlock"
So far this doesn't work. I think I am declaring this wrong.
import DraftEditorBlock from 'draft-js';


Upgrade to Terraform 0.12

addressed in https://github.com/cloudposse/terraform-terraform-label/pull/15
release https://github.com/cloudposse/terraform-terraform-label/releases/tag/0.3.0


Replace iview with BajtonUI

Is your feature request related to a problem? Please describe.
The Chinese library iview is not easily extendable, responsive nor does it look the way we desire it to.
Currently, dark mode requires overwriting less variables in two separate files, and loading / unloading them dynamically.
Describe the solution you'd like
All iview components used by Bajton should be rewritten in a new component library BajtonUI.
Describe alternatives you've considered
Extending iview using tape and wire.
Additional context
Not required.

About 2/3 of the components are already ported to BajtonUI.
The current progress can be tracked on the bajton-ui branch.

Most of the components have been reimplemented in the BajtonUI.
The most important remaining iview components used by Bajton are:

Modal
Alert
Upload

Although these can be rewritten, it isn't feasible at this time due to the lack of developers working on this project,
it just makes more sense to implement other things instead.


Detection in background?

I am using the library and am trying to detect activity in the background. It works great for a while but after around 30 minutes idle in the background - updates stop occurring....Is this expected behavior?
Should updates continue until stop tracking is called (even when in background)?
I have followed instructions around configuration for background updates (plist, property on shared instance, etc...).
Running on iPhone 5s with 9.3.

Hey @eggman87, did you ever sort this out. Seeing the same thing.

Was not able to get it to work. I ended up using location manager directly to fit my needs. I was trying to use this library to only track location when the user is in a car moving....

It's because location updates are paused by the OS. I opened a PR which lets you listen for that event.
https://github.com/SocialObjects-Software/SOMotionDetector/pull/26


Update stuff

This gem seems abandoned.
Bring in support for grape-entity >= 0.5.0 that is already in the project's repository master branch, and take care of some stuff that ruby and rails deprecated.
prime @jturkel
cc @salsify/nazare-wave

I agree that the state of the upstream grape-entity-matchers is worrying since they haven't released an updated version of the gem in 3.5 years but they did merge our PR for grape-entity >= 0.5.0 support in 2019 which is a positive sign. Ideally we could get off our fork rather than add more to it. Can you open a PR against the upstream repo with the deprecation fixes and request a new release of the gem?
Also for historical context, we typically let master track upstream master  for forked repos and create a salsify-master branch as necessary to accumulate changes. This approach makes it easier to keep track of what we've changed with the goal of getting off forks.

Oh, I didn't notice that Tim is old colleague of ours 😅 thanks for the tip on the branches, I wasn't aware. I'm going to try to get this merged upstream.

@jturkel I already opened the PR upstream, but in the meanwhile, shall I try to get these changes merged here?

I'm good getting these changes merged into salsify-master while we wait for the upstream changes 👍. Can we split this into two PRs: one that merges master into salsify-master (I've already updated master to track the latest version of upstream/master) and one that makes the actual changes to support Ruby 2.7? That will make it easier to understand the version history and review the appropriate changes.

Waiting for #6 to be merged.
BTW, it's forthcoming rails 6.1 that will break. As of today, without these changes, we only get deprecation warnings.

@jturkel your move 😉 .


License

@akemnade can you please provide LICENSE file?
I want to package this program, but my distro refuses MIT packages without LICENSE file

done


Not able to use CustomInstall

Hi,
I'm trying to create a UninstallAction but, after packing the appx i can't install it.
It gives me this error:

App installation failed with error message: error 0x80080204: While preparing to process the request, the system failed to register the windows.customInstall extension due to the following error: The Appx package's manifest is invalid.

AppxManifest:
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:desktop6="http://schemas.microsoft.com/appx/manifest/desktop/windows10/6"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap desktop6 rescap" >

  <Identity Name="40210ChrisAndriessen.FalconX" Publisher="CN=8AB18DA5-65D5-493C-BD78-9F4467A7CDE8" Version="<IP_ADDRESS>"  />
  <Properties>
    <DisplayName>TaskbarX</DisplayName>
    <PublisherDisplayName>Chris Andriessen</PublisherDisplayName>
    <Description>Reserved</Description>
    <Logo>Assets\StoreLogo.png</Logo>
  </Properties>
  <Resources>
    <Resource Language="en-us" />
  </Resources>
  <Dependencies>
    <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
  </Dependencies>
  <Capabilities>
  <rescap:Capability Name="runFullTrust" />
   <rescap:Capability Name="customInstallActions"/>
  </Capabilities>

 <Applications>
    <Application Id="TaskbarX" Executable="Release\TaskbarX.exe" EntryPoint="Windows.FullTrustApplication">
      <uap:VisualElements BackgroundColor="transparent" DisplayName="TaskbarX" Square150x150Logo="Assets\StoreLogo-150.png" Square44x44Logo="Assets\StoreLogo-44.png" Description="TaskbarX">
        <uap:DefaultTile Wide310x150Logo="Assets\StoreLogo.png" Square310x310Logo="Assets\StoreLogo.png" Square71x71Logo="Assets\StoreLogo-71.png" />
      </uap:VisualElements>
    </Application>

	<Application Id="TaskbarXGUI" Executable="Release\TaskbarX Configurator.exe" EntryPoint="Windows.FullTrustApplication">
      <uap:VisualElements BackgroundColor="transparent" DisplayName="TaskbarX Configurator" Square150x150Logo="Assets\StoreLogo2-150.png" Square44x44Logo="Assets\StoreLogo2-44.png" Description="TaskbarXGui">
        <uap:DefaultTile Wide310x150Logo="Assets\StoreLogo2.png" Square310x310Logo="Assets\StoreLogo2.png" Square71x71Logo="Assets\StoreLogo2-71.png" />
      </uap:VisualElements>
    </Application>

  </Applications>

     <Extensions>
    <desktop6:Extension Category="windows.customInstall">
      <desktop6:CustomInstall Folder="UninstallAPPX">
        <desktop6:UninstallActions>
          <desktop6:UninstallAction File="CleanTaskbarX.exe" Name="Clean TaskbarX" Arguments="none" />
        </desktop6:UninstallActions>
      </desktop6:CustomInstall>
    </desktop6:Extension>
  </Extensions>

</Package>

On the end the CleanTaskbarX.exe should kill the TaskbarX process and remove it's taskschedule.
Before uninstalling.

I have the same problem with an app here - is there any news or something available?

I'm sorry your encountering problems trying to use this element. Here are a couple of things you can check:

The desktop6:CustomInstall element is supported on Windows 10, version 1903 and later. Make sure you're trying to use this on a supported OS version.
This element requires the 'customInstallActions' restricted capability. It doesn't look like the manifest example at the start of this issue thread includes a declaration for this capability, so make sure your manifest has this. See the example in the article for more details.

If neither of these suggestions help, I recommend that you post your question to the MSIX Tech Community: Lots of MSIX packaging experts can help you with questions there.
If you receive assistance via any of these support resources, and you believe that information would help us improve the docs, then please come back and let us know.

Sorry to reopen this topic. @mcleanbyron Can you confirm that the CustomInstall-Extension is usable by anybody or that the note in the doc is still valid:
This element is currently intended to be used only by certain types of desktop PC games that are published by Microsoft and our partners.
I've placed a specific question in the MSIX-Deployment techcommunity board here - in case you want to answer there:
https://techcommunity.microsoft.com/t5/msix-deployment/app-manifest-using-custominstall/m-p/1502626/highlight/false#M534
Your comment above sounds like "it should work" and "is allowed" but the reality shows it isn't.
Thank you!

Sorry, I missed that statement in the article and that is the most important piece of information. Yes, per that statement (and the fact that this requires the 'customInstallActions' restricted capability), most developers cannot use this extension. This is currently only supported for certain Microsoft partners who are building desktop PC games. In other words, if you can use this extension, you would already know it. Apologies for any confusion from my earlier reply.

That's ok @mcleanbyron - at least I know now that it will not work and therefore can concentrate on a different solution to this.
Thank you!

You have to also add the repair and uninstall actions for the manifest to be valid. Like this:

It's a while ago that I was in that topic. But as far as I remember Microsoft simply does not allow it to be used by 3rd party developers. So even if the Manifest is technically valid, the Store would not approve it.
If you know more then me let me now - I would be very happy to bring that app with that feature to the store!

It's a while ago that I was in that topic. But as far as I remember Microsoft simply does not allow it to be used by 3rd party developers. So even if the Manifest is technically valid, the Store would not approve it.
If you know more then me let me now - I would be very happy to bring that app with that feature to the store!

Yeah, exactly, if you not in the shortlist of partners you simply can't use it

I came across this issue. I noticed there is a little note here stating that it's possible to use CustomInstall if Microsoft.classicAppInstaller_8wekyb3d8bbwe is declared. So I added that, but I got a different error
App installation failed with error message: error 0x80070002: While preparing to process the request, the system failed to register the windows.capability extension due to the following error: The system cannot find the file specified.

This is the relevant part of my package.manifest
    <Extensions>
        <desktop6:Extension Category="windows.customInstall">
            <desktop6:CustomInstall Folder="MyInstallers" desktop8:RunAsUser="true">
                <desktop6:InstallActions>
                    <desktop6:InstallAction File="ConsoleCpp.exe" Name="Test"/>
                </desktop6:InstallActions>
                <desktop6:RepairActions>
                    <desktop6:RepairAction File="ConsoleCpp.exe" Name="Test"/>
                </desktop6:RepairActions>
                <desktop6:UninstallActions>
                    <desktop6:UninstallAction File="ConsoleCpp.exe" Name="Test"/>
                </desktop6:UninstallActions>
            </desktop6:CustomInstall>
        </desktop6:Extension>
    </Extensions>
  <Capabilities>
    <rescap:Capability Name="runFullTrust" />
      <rescap:Capability Name="customInstallActions"/>
      <uap4:CustomCapability Name="Microsoft.classicAppInstaller_8wekyb3d8bbwe"/>
  </Capabilities>

My app is only intended for internal use, and will not publish to store. Is there any hope for that?


Simplify Operator Creation

Creating an operator requires a decent amount of boilerplate even for a bare-bones solution, this should be simplified for the standard use-cases. https://github.com/grafana/grafana-app-sdk/pull/90 is the rough outline of this idea.

This was resolved by https://github.com/grafana/grafana-app-sdk/pull/160


Write some guidelines about meilisearch integrations into external repositories

I just learned that we had a connection with Airbyte. And in fact, I just heard about it because it is broken.
So, I suggest keeping a paper trail of Meilisearch presence into other tools that may be relevant or not in our internal processes, ex: In the past, we had to deal with some breaking changes on the Laravel Scout side. We did that because Laravel Scout is an important integration for us, but we do not directly maintain it.
So the idea is to keep a list in the integration-guides where we can track all those open-source packages. Plus by doing it we may warn them about new features it could be implemented for example.
The current list of external integrations are:

Airbyte
Medusa.js
Laravel Scout

My question for the @meilisearch/integration-team is, is it worth having such tracking? Or we could just have a section in the awesome-meilisearch and that would be ok?

My only concern is to invest time in inactive integrations or abandoned ones. Otherwise, I'm ok with that. It is still our brand in the game. But of course, some situations are not worth it, spend time on it, and that's also good!
Because if we take the Airbyte one, for example. By keeping a working version of our plugin inside Airbyte, we can guarantee users can adopt Meilisearch even easier from whatever data source they may have.
What bugs me is that I, the integrations manager, didn't know its existence!

@brunoocasali this is admittedly not the best process, but what I have done is use the used by page (https://github.com/meilisearch/meilisearch-python/network/dependents for example) to find people using my packages and then I will occasionally check  their issues for anything I can help with.
I suspect that with the GitHub API there would be a way for you to gather the used by information so you have some visibility into it in an aggregated way. It's not 100% of the users but maybe a start.

That's an excellent idea indeed! Even if they show at least the more relevant packages would be helpful!

Unfortunately, we don't have time to create a new process like this one, even if it is helpful.
If someone from the community spots any issue in an integration like this, please reach us in the discord so we can help!


Rationalise the sizes and alignments of TrueOS and Lumina icons that can appear in a panel of Lumina

Background
An attempt to make a Lumina test environment resemble the layout that I prefer (in KDE) began with moving the one panel to the left of the screen.
Essentially: I like an ever-present at-a-glance overview of the titles of all windows. (A pager of the type outlined at https://github.com/trueos/lumina/issues/318#issuecomment-266006381 may be comparable but that might be on demand, not present when required.)
Issues arising
Much of what's below should be self-explanatory. I expect this Lumina panel-oriented issue to be an umbrella for other, more specific issues concerning the items that are represented by these icons.

Plus a screen recording, which was too large to upload:

https://drive.google.com/open?id=0B1G6-Ym42bEiakg2YVJPMi1zc0k

… I expect this Lumina panel-oriented issue to be an umbrella for other, more specific issues …

From https://discourse.trueos.org/t/disabling-pulseaudio/207/13?u=grahamperrin:

… with KDE, I thought that 'Mixer' was simply a word that appeared, alongside other things, when the audio icon is clicked. Tonight I discovered that the word responds to a click only if some types of pointer movement are avoided prior to the click. The same is true for the slider; if I'm not careful about how I move the pointer before the click on the slider, then the slider will not slide. …

From post 4 under Changing Keyboard Layout in X:

… with KDE a gb icon is present in System Tray but it's almost impossible to use, as if I must click, double-click or right-click away from (not on) the icon for its menu to appear; and even when I click away, more than ninety percent of attempts fail; and when eventually I do get a menu, the Configure option fails to present anything.
I suspect that the failures to recognise clicks (or double-clicks, or right-clicks) in the expected position are a conflict with something in TrueOS, maybe indirectly related to this issue (325).

And:

Side note: TrueOS mount tray
At the time of writing:

the submenu option to Change Settings fails to present anything
the submenu option to Close Tray fails to close mount tray.

Done.
Please retest with the latest Lumina version from source and make a new ticket if the issue still persists.


Revert "Add proof-of-concept integration with Touca"

Reverts andrewljohnson/deckzap#35

reverting this because it was failing tests "AttributeError: module 'touca' has no attribute 'add_result'"

@ghorbanzade see: https://github.com/andrewljohnson/deckzap/runs/4229707787?check_suite_focus=true

Yes, apologies, you are using GitHub secrets in CI now so I wasn't able to run this on my own. Touca v0.2.6 introduced a breaking change by renaming touca.add_result to touca.check. It looks like you reverted the PR? Should I submit another one?

Fix available in #49.


Change display page to show new detailed proprietors.

Add code to server.py to create and store more meaningful proprietor data

@russwillis Am I right in thinking this is just the getting data through, and once the redesign is merged we can do the HTML/CSS on that name display?


Enhance diff.py with type hints, improved docstrings, and code readability

Enhancements to diff.py
This pull request aims to improve the diff.py file by enhancing its readability, maintainability, and adherence to Python best practices. The changes focus on code structure, documentation, and type safety without altering the core functionality.
Key Changes

Added Type Hints: Improves code readability and helps catch potential type-related errors early. This also aids IDE autocompletion and type checking tools.

Enhanced Docstrings: Added comprehensive docstrings to functions, explaining their purpose, parameters, and return values. This improves code understanding and maintainability.

Simplified same_slicer Function: Refactored for clearer logic and better performance.

Use of f-strings: Replaced string concatenation with f-strings for more readable string formatting.

List Comprehensions: Replaced some loops with list comprehensions for conciseness and improved readability.

Improved Variable Names: Renamed some variables (e.g., 'g' to more descriptive names) for better code clarity.

Code Structure: Reorganized some parts of the code for better logical flow and readability.

Benefits

Improved Readability: The enhanced structure and documentation make the code easier to understand and maintain.
Better Type Safety: Type hints help catch potential errors earlier in the development process and improve IDE support.
Enhanced Documentation: Comprehensive docstrings make it easier for developers to understand and use the functions correctly.
Modernized Code: Usage of f-strings and list comprehensions aligns the code with modern Python practices.

Testing
The core functionality of the script remains unchanged. However, thorough testing is recommended to ensure that all features continue to work as expected, particularly:

Diff generation in various scenarios (additions, deletions, replacements)
Patch format generation
Handling of different input types and edge cases

Next Steps
If this pull request is accepted, we may want to consider:

Adding unit tests to cover various scenarios and ensure reliability.
Exploring opportunities for performance optimization, especially for large diffs.
Considering the use of dataclasses or named tuples for some of the complex return types.

Thank you for considering these improvements. I'm open to any feedback or suggestions for further enhancements.

Amazing, thank you so much!

If this pull request is accepted, we may want to consider:

Adding unit tests to cover various scenarios and ensure reliability.

Should be covered already, but if theres more i'm happy to accept :)

Exploring opportunities for performance optimization, especially for large diffs.

Not super important I think for most use cases, but can be worth thinking about.

Considering the use of dataclasses or named tuples for some of the complex return types.

Yes :)
I would like to merge this one in pretty soon, thanks again for the help, if you see other parts that could get cleaned up, I'm all for that too


Update bu.txt

This edit is ought to mention that there is a Computer Science school, and other TWO engineering schools under "Benha University".

University website: Benha University
Computers and AI school that offers Computer Science, AI, IS and other related tech majors: BFCAI
Benha Engineering School: BENG
Shoubra Engineering School: FENG


Introduce Pacer (née Rater) interface.

Again not expecting this to be merged, but this is the direction I'd take things in.

Magic! I got the Mean and Amp parameters the other way around initially, so perhaps we can improve the docs. Otherwise, how cool is this? :dancer:

And if I wanted to take up @LasTshaMAN on their offer of writing tests for me (yay!), what's the best way of doing that? Should I ask them for a PR to my branch, and then merge that in? Should they send a separate PR with tests once mine has been merged?

I guess any approach will be fine by me.
I also have a question for @tsenart :)
Can I use 3rd party libraries for testing (e.g. https://github.com/stretchr/testify) to ease some pain of writing tests ? Go standard testing library is not bad, but, oh dear God, no one should write assert statements through ifs ... May be there are some nice property-based testing libraries that may be used for writing such tests in cleaner manner (than what I wrote above) ...

What's the best way of polishing this up for a merge? Do you want to preserve the history of #380, #388 and this? Would you prefer me to create a new PR branched from master with a (new) linear history of logical commits? I'm happy to do either.

If you don't mind going through it, a linear history of logical commits is nice to have. But not an absolute requirement. I'm happy with a single commit too.

And if I wanted to take up @LasTshaMAN on their offer of writing tests for me (yay!), what's the best way of doing that? Should I ask them for a PR to my branch, and then merge that in? Should they send a separate PR with tests once mine has been merged?

I think the best way would be to merge @fluffle's PR first, and then work on a follow up PR authored by @LasTshaMAN that'd implement the thorough tests and address any bugs found. This is OK, since users should be relying on semantic versions anyways, not on master.

Can I use 3rd party libraries for testing (e.g. https://github.com/stretchr/testify) to ease some pain of writing tests ? Go standard testing library is not bad, but, oh dear God, no one should write assert statements through ifs ... Maybe there are some nice property-based testing libraries as well - that will help writing such tests in a cleaner manner (than what I wrote above) ...

Please, no 3rd party libraries unless they're reeeeeally necessary. Did you know about https://golang.org/pkg/testing/quick/? See how I use it in oklog/ulid: https://sourcegraph.com/search?q=repo:github.com/oklog/ulid+quick.Check

Did you know about https://golang.org/pkg/testing/quick/? See how I use it in oklog/ulid: https://sourcegraph.com/search?q=repo:github.com/oklog/ulid+quick.Check

Yeah, I saw it used a couple of times :)

Please, no 3rd party libraries unless they're reeeeeally necessary.

Ok, it's not a deal breaker.
Just curious, how do u define "reeeeeally necessary" ? I mean, with a nice package management system in place (vgo as is now, and possibly converting to go modules) why does it matter how many 3rd party dependencies the project has ?
I know of some problems that may result from pulling in every possible library (instead of using only core lang libraries), e.g.

3rd party library can disappear from the Internet (this can be solved via creating vendor directory to store all the dependencies locally to the target project)
if the target project relies on some functionality broken in 3rd party library then it would be harder to fix it (as we have to update 3rd party project and pull in the fix into ours)
...

but I think none of these are real impediments to the development process, compared to lost advantage of reusing 3rd party code (for nice assertions, say).

Superseded by #400.


2 tests failing with the new sympy (1.6)

The release of the new sympy broke 2 ctests. We need to investigate this otherwise CIs are gonna fail.
Thanks @iomaganaris to help me detect the problem.

The downgrade is included in this PR


How to sort files by date created instead of alphabetical order ?

Hello , how can I make it print sort by date created instead of alphabetical order please?
Thank you in advance .

Hi @Pancho111 - the date at which the file was created?

Hi Thank you for responding my question , Yes  , I need the files to play in the order they were created not in alphabetical order .
Thank you very much

Sorry I haven't gotten back to you, @Pancho111... been busy. Do you still need this functionality?

Hi , yes I do please .. I closed it ,but I will reopen it if I can ..
thank you very much

This was actually quite difficult, but I did manage to hack in some additional sorting options. When you run the workflow, it'll ask how you'd like to sort now including options for creation date and modified date, both ascending and descending.
Let me know if this works for you! =)

Oh my God  , what a great job !
 Glad it works!


Default Sidebar setting

Starting with the code from gethalfmoon.com, I've put my page together. However, I find that every time I refresh the page, the sidebar returns to the "open" position. I may be missing it, but I've gone through the documentation on the site, as well as the code of my own page, and I am not able to find anything. How do I change the (apparently default) setting for the sidebar, so that it opens in the "closed" position?

 Based on the docs here, add the data-sidebar-hidden="hidden" property inside the div wrapper.
So, it should be like this
<div class="page-wrapper with-navbar with-sidebar with-transitions" data-sidebar-hidden="hidden">

Thank you. Somehow I must have looked right overtop of that. Thank you for your help.


st2 Pack Dependencies Not Resolved via st2-pack-install tool

SUMMARY
The dependency resolution system between stackstorm packs (not python dependencies) which was recently implemented in st2 v3.2 (#4769 ) does not function when trying to build via st2-pack-install (https://github.com/StackStorm/st2/pull/4256) utility mentioned in https://docs.stackstorm.com/install/k8s_ha.html#custom-st2-packs.
STACKSTORM VERSION
3.2dev
Steps to reproduce the problem
/opt/stackstorm/st2/bin/st2-pack-install -vv  https://github.com/stackstorm/stackstorm-ms

Expected Results
Expect to see the dependencies of stackstorm-ms being installed (excel, and powerpoint for example).
Actual Results
Only the stackstorm-ms pack is installed.
2020-02-13 17:44:53,902 INFO [-] Installing pack "https://github.com/StackStorm/stackstorm-ms"
2020-02-13 17:44:53,903 DEBUG [-] Popen(['git', 'clone', '-v', 'https://github.com/StackStorm/stackstorm-ms', '/root/6622c8eb7209250c62980483f40577e2'], cwd=/opt/stackstorm, universal_newlines=True, shell=None)
2020-02-13 17:44:55,509 DEBUG [-] Cmd(['git', 'clone', '-v', 'https://github.com/StackStorm/stackstorm-ms', '/root/6622c8eb7209250c62980483f40577e2'])'s unused stdout:
2020-02-13 17:44:55,518 DEBUG [-] Popen(['git', 'cat-file', '--batch-check'], cwd=/root/6622c8eb7209250c62980483f40577e2, universal_newlines=False, shell=None)
2020-02-13 17:44:56,256 DEBUG [-] Popen(['git', 'branch', '-a', '--contains', '25089933a452dedeb5aa145d6716c0187917b854'], cwd=/root/6622c8eb7209250c62980483f40577e2, universal_newlines=False, shell=None)
2020-02-13 17:44:56,906 DEBUG [-] Popen(['git', 'checkout', '25089933a452dedeb5aa145d6716c0187917b854'], cwd=/root/6622c8eb7209250c62980483f40577e2, universal_newlines=False, shell=None)
2020-02-13 17:44:57,545 DEBUG [-] Popen(['git', 'branch', '-f', 'master', '25089933a452dedeb5aa145d6716c0187917b854'], cwd=/root/6622c8eb7209250c62980483f40577e2, universal_newlines=False, shell=None)
2020-02-13 17:44:58,292 DEBUG [-] Popen(['git', 'checkout', 'master'], cwd=/root/6622c8eb7209250c62980483f40577e2, universal_newlines=False, shell=None)
2020-02-13 17:44:58,940 DEBUG [-] Moving pack from /root/6622c8eb7209250c62980483f40577e2 to /opt/stackstorm/packs.
2020-02-13 17:44:58,942 DEBUG [-] Changing owner group of "/opt/stackstorm/packs/microsoft_test" directory to st2packs
2020-02-13 17:44:58,942 DEBUG [-] Entering st2common.util.green.run_command.
2020-02-13 17:44:58,942 DEBUG [-] env argument not provided. using process env (os.environ).
2020-02-13 17:44:58,942 DEBUG [-] Creating subprocess.
2020-02-13 17:44:58,948 DEBUG [-] Spawning timeout handler thread.
2020-02-13 17:44:58,949 DEBUG [-] Attaching to process.
2020-02-13 17:44:58,949 DEBUG [-] Using delayed stdout and stderr read mode, calling process.communicate()
2020-02-13 17:44:58,949 DEBUG [-] Starting process wait inside timeout handler.
2020-02-13 17:44:58,963 DEBUG [-] No timeout.
2020-02-13 17:44:58,963 DEBUG [-] Returning.
2020-02-13 17:44:58,966 INFO [-] Successfully installed pack "microsoft_test"
2020-02-13 17:44:58,966 INFO [-] Setting up virtualenv for pack "microsoft_test"
2020-02-13 17:44:58,968 DEBUG [-] Setting up virtualenv for pack "microsoft_test" (/opt/stackstorm/packs/microsoft_test)
2020-02-13 17:44:58,968 INFO [-] Virtualenv path "/opt/stackstorm/virtualenvs/microsoft_test" doesn't exist
2020-02-13 17:44:58,969 DEBUG [-] Creating virtualenv for pack "microsoft_test" in "/opt/stackstorm/virtualenvs/microsoft_test"
2020-02-13 17:44:58,969 DEBUG [-] Creating virtualenv in "/opt/stackstorm/virtualenvs/microsoft_test" using Python binary "/opt/stackstorm/st2/bin/python"
2020-02-13 17:44:58,969 DEBUG [-] Running command "/opt/stackstorm/st2/bin/virtualenv -p /opt/stackstorm/st2/bin/python --always-copy --no-download /opt/stackstorm/virtualenvs/microsoft_test" to create virtualenv.
2020-02-13 17:45:01,563 DEBUG [-] Installing base requirements
2020-02-13 17:45:01,563 DEBUG [-] Installing requirement six>=1.9.0,<2.0 with command /opt/stackstorm/virtualenvs/microsoft_test/bin/pip install six>=1.9.0,<2.0.
2020-02-13 17:45:02,018 DEBUG [-] No pack specific requirements found
2020-02-13 17:45:02,018 DEBUG [-] Changing owner group of "/opt/stackstorm/virtualenvs/microsoft_test" directory to st2packs
2020-02-13 17:45:02,018 DEBUG [-] Entering st2common.util.green.run_command.
2020-02-13 17:45:02,019 DEBUG [-] env argument not provided. using process env (os.environ).
2020-02-13 17:45:02,019 DEBUG [-] Creating subprocess.
2020-02-13 17:45:02,022 DEBUG [-] Spawning timeout handler thread.
2020-02-13 17:45:02,022 DEBUG [-] Attaching to process.
2020-02-13 17:45:02,022 DEBUG [-] Using delayed stdout and stderr read mode, calling process.communicate()
2020-02-13 17:45:02,022 DEBUG [-] Starting process wait inside timeout handler.
2020-02-13 17:45:02,044 DEBUG [-] No timeout.
2020-02-13 17:45:02,044 DEBUG [-] Returning.
2020-02-13 17:45:02,044 DEBUG [-] Virtualenv for pack "microsoft_test" successfully created in "/opt/stackstorm/virtualenvs/microsoft_test"
2020-02-13 17:45:02,044 INFO [-] Successfully set up virtualenv for pack "microsoft_test"

Thanks!

Thanks for the bug report. I've adjusted issue description a bit.

After looking a bit closer, it turns out it's not possible to support pack dependencies via st2-pack-install tool at the moment.
st2-pack-install helper utility was designed to deploy the st2 packs, their virtualenvs without fully running st2 system and backends like DB/MQ.
While original st2 pack install in new version relies on several Orquesta workflows under the hood to gather the list, download dependencies, meaning it requires full st2 engine up & running.
To support pack dependencies via helper st2-pack-install utility https://github.com/StackStorm/st2/pull/4769 original implementation of pack dependencies needs a rewrite.


Allowing download artifacts from other workflows

As the title.
We should probably give many options for filtering the artifacts.
I'm using the default actions/download-artifact action unless one of the arguments is used.

Interesting read:
https://www.legitsecurity.com/blog/github-actions-that-open-the-door-to-cicd-pipeline-attacks

https://github.com/dawidd6/action-download-artifact

Replace #120

I needed something very similar few days ago. Thanks @germa89 for implementing it.

It is my pleasure @MaxJPRey !! :)


Is v2.0.0 a breaking change?

Hi,
I noticed v2.0.0 was released, but can't seem to find a changelog, or any info on the Releases page. Since it is a major version bump, are there any breaking changes to be aware of?
Thanks 👍

Hey @xtagon this is due to Issue #88 . Since you can no longer use "Version" as a header value, I considered this a breaking change and bumped the major version.

Makes sense! Thanks for the quick response and for following SemVer 👍


Cannot Create/Delete a table with Azurite and WindowsAzure.Storage SDK

Which service(blob, file, queue, table) does this issue concern?
table
Which version of the Azurite was used?
3.30.0
Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
npm
What's the Node.js version?
v20.10.0
What problem was encountered?
I am in XStore, and I am trying to migrate some of our tests from Storage Emulator to Azurite. The failures are blocking our team from adopting Azurite. Feel free to reach out internally for additional info.
With Azurite, many of our C# tests involving tables are failing with the following exception:
Microsoft.WindowsAzure.Storage.StorageException: The property 'value' does not exist on type 'devstoreaccount1.Tables'
Steps to reproduce the issue?
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using Microsoft.WindowsAzure.Storage;

    [TestClass]
    public class Foo
    {
        [TestMethod]
        public void CreateAndDeleteTablesIsSuccessful()
        {
            var client = CloudStorageAccount.DevelopmentStorageAccount
                .CreateCloudTableClient();
            var table = client.GetTableReference("foo");

            var created = table.CreateIfNotExists();
            var deleted = table.DeleteIfExists();
            Assert.IsTrue(deleted);
        }
    }

The call to DeleteIfExists causes the Storage SDK to throw an exception if using Azurite. The test passes if using Storage Emulator or tweaked to use a real storage account
  Message:
Test method Foo.CreateAndDeleteTablesIsSuccessful threw exception:
Microsoft.WindowsAzure.Storage.StorageException: The property 'value' does not exist on type 'devstoreaccount1.Tables'. Make sure to only use property names that are defined by the type. ---> Microsoft.Data.OData.ODataException: The property 'value' does not exist on type 'devstoreaccount1.Tables'. Make sure to only use property names that are defined by the type.

  Stack Trace:
ODataJsonLightEntryAndFeedDeserializer.ReadUndeclaredProperty(IODataJsonLightReaderEntryState entryState, String propertyName, Boolean propertyWithValue)
ODataJsonLightEntryAndFeedDeserializer.ReadEntryPropertyWithValue(IODataJsonLightReaderEntryState entryState, String propertyName)
<>c__DisplayClass2.<ReadEntryContent>b__0(PropertyParsingResult propertyParsingResult, String propertyName)
ODataJsonLightDeserializer.ProcessProperty(DuplicatePropertyNamesChecker duplicatePropertyNamesChecker, Func`2 readPropertyAnnotationValue, Action`2 handleProperty)
ODataJsonLightEntryAndFeedDeserializer.ReadEntryContent(IODataJsonLightReaderEntryState entryState)
ODataJsonLightReader.ReadEntryStart(DuplicatePropertyNamesChecker duplicatePropertyNamesChecker, SelectedPropertiesNode selectedProperties)
ODataJsonLightReader.ReadAtStartImplementationSynchronously(DuplicatePropertyNamesChecker duplicatePropertyNamesChecker)
ODataReaderCore.ReadImplementation()
ODataReaderCore.InterceptException[T](Func`1 action)
TableOperationHttpResponseParsers.ReadOdataEntity(TableResult result, TableOperation operation, IODataResponseMessage respMsg, OperationContext ctx, ODataMessageReaderSettings readerSettings, String accountName, TableRequestOptions options) line 417
TableOperationHttpResponseParsers.TableOperationPostProcess(TableResult result, TableOperation operation, RESTCommand`1 cmd, HttpWebResponse resp, OperationContext ctx, TableRequestOptions options, String accountName) line 127
<>c__DisplayClass18.<RetrieveImpl>b__17(RESTCommand`1 cmd, HttpWebResponse resp, OperationContext ctx) line 230
Executor.ProcessEndOfRequest[T](ExecutionState`1 executionState) line 898
Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext) line 750
 --- End of inner exception stack trace ---
Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext) line 604
CloudTable.Exists(Boolean primaryOnly, TableRequestOptions requestOptions, OperationContext operationContext) line 1602
CloudTable.DeleteIfExists(TableRequestOptions requestOptions, OperationContext operationContext) line 1364
Foo.CreateAndDeleteTablesIsSuccessful() line 414

Azurite debug log is attached, azurite.log
Have you found a mitigation/solution?
No

Our code was using an older version of WindowsAzure.Storage. I am trying with 9.3.3 to see if it resolves our issue

@mikamins
WindowsAzure.Storage is deprecated SDK, please use the new table SDK https://www.nuget.org/packages/Azure.Data.Tables.
Besides that, would you please share the Azurite debug log when the failure happen. We need that to continue investigation.

Fortunately, upgrading to WindowsAzure.Storage to 9.3.3 solves the issue


v0.15.0

I will have to merge manually because github won't solve this for me. Please review anyway.


doesn't support defaults

flux permits defaulting:
apiVersion: v1
kind: Namespace
metadata:
  labels:
    owners: ${devteam:=testteam}

Setting devteam:
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
spec:
  ...
  postBuild:
    substitute:
      devteam: "greenteam"

the flux result is owners: greenteam. With the value missing (no substitutions) it receives owners: testteam
Trying this pattern results in:
Error: variable substitution failed for Namespace /${namespace}: variable "devteam" is not set

Hi, this is (partly) intended behaviour as of right now.
flux-envsubst is intended to work with the result of kustomize build. flux-envsubst does not look at the Kustomization at all. However, I agree that this would be a helpful feature.
Therefore ${devteam:=testteam} is evaluated as if the Kustomization did not exist.
The fact that defaulting does not work is actually a different bug, that I will look at.
To work around your issue (for now), create a .env file containing
devteam=foo

or run flux-envsubst as kustomize build . | devteam=foo flux-envsubst.


fix(config): add additional association groups for Elexa/Dome Home Automation Products

Adding additional association groups as per device documentation

Sorry, English is not my primary language so it’s a bit harder to be so concise.

Ok, I can do that for you.

No, I can handle, just might take a little extra love. I made changes to 3, I will stop and await a review.

Removed all descriptions