Node 20 (Iron) and libvips-dev

I'm curious if this works here, ref: https://github.com/TryGhost/Ghost/issues/20065
cc @tianon @LaurentGoderre

This would need an update on the alpine Dockerfile as well.

I tried updating but the change is not in the latest version. We have to way for 5.82.9

I've been thinking to start building the images using the sources directly, not using ghost-cli, but I'm not sure if it's going to be a better and/or optimized method.
I'm proposing in the upcoming days a multistep build, this is at least what I'm confident about  the overall benefits.
Here is the way I'm building it today, highly based on this original repository.
Dockerfile
# This Dockerfile is used to build a container image for running Ghost, a popular open-source blogging platform, on Kubernetes.
# The image is built with official Node 20 on Debian Bookworm (LTS Iron)  image and uses the Distroless base image for security and minimalism.

# Stage 1: Build Environment
FROM node:iron-bookworm AS build-env

ENV NODE_ENV=production DEBIAN_FRONTEND=noninteractive

USER root
RUN apt update && apt install --no-install-recommends --no-install-suggests -y libvips-dev

# Install the latest version of Ghost CLI globally and clean the npm cache
RUN yarn config set network-timeout 60000 && \
    yarn config set inline-builds true && \
		npm config set fetch-timeout 60000 && \
    npm config set progress && \
    npm config set omit dev

RUN	yarn global add ghost-cli@latest

# Define the GHOST_VERSION build argument and set it as an environment variable
ARG GHOST_VERSION
ENV GHOST_VERSION $GHOST_VERSION

# Set the installation directory, content directory, and original content directory for Ghost
ENV GHOST_INSTALL /var/lib/ghost
ENV GHOST_CONTENT /var/lib/ghost/content
ENV GHOST_CONTENT_ORIGINAL /var/lib/ghost/content.orig

# Create the Ghost installation directory and set the owner to the "node" user
RUN mkdir -pv "$GHOST_INSTALL" && \
    chown node:node "$GHOST_INSTALL"

# Switch to the "node" user and set the working directory to the home directory
USER node
# WORKDIR /home/node
RUN yarn config set network-timeout 180000 && \
  yarn config set inline-builds true && \
  npm config set fetch-timeout 180000 && \
  npm config set progress && \
  npm config set omit dev

# Install Ghost with the specified version, using MySQL as the database, and configure it without prompts, stack traces, setup, and in the specified installation directory
RUN ghost install $GHOST_VERSION --dir $GHOST_INSTALL --db mysql --dbhost mysql --no-prompt --no-stack --no-setup --color --process local

# Switch back to the root user
USER root

# Move the original content directory to a backup location, create a new content directory, set the correct ownership and permissions, and switch back to the "node" user
RUN mv -v $GHOST_CONTENT $GHOST_CONTENT_ORIGINAL && \
    mkdir -pv $GHOST_CONTENT && \
    chown -Rfv node:node $GHOST_CONTENT_ORIGINAL && \
    chown -Rfv node:node $GHOST_CONTENT && \
    chown -fv node:node $GHOST_INSTALL && \
    chmod 1777 $GHOST_CONTENT

# Switch back to the "node" user
USER node

# Stage 2: Final Image
FROM gcr.io/distroless/nodejs20-debian12:latest AS runtime

# Set the installation directory and content directory for Ghost
ENV GHOST_INSTALL /var/lib/ghost
ENV GHOST_CONTENT /var/lib/ghost/content
ENV GHOST_CONTENT_ORIGINAL /var/lib/ghost/content.orig

# Copy the Ghost installation directory from the build environment to the final image
COPY --from=build-env $GHOST_INSTALL $GHOST_INSTALL

# Set the working directory to the Ghost installation directory and create a volume for the content directory
# The volume is used to persist the data across container restarts, upgrades, and migrations.
# It's going to be handled with an init container that will copy the content from your original content directory to the new content directory (If there is any)
# The CMD script will handle default themes included (Casper and Source) and init Ghost.

WORKDIR $GHOST_INSTALL
VOLUME $GHOST_CONTENT

# Copy the entrypoint script to the current Ghost version.
COPY --chown=1000:1000 entrypoint.js current/entrypoint.js

# Expose port 2368 for Ghost
EXPOSE 2368

# Set the command to start Ghost
CMD ["current/entrypoint.js"]


Put everything into case and test if everything works fine

test if something is overheating
we can use Adi chamber for this test.

Can this issue be closed?


Can I do the diff operation on another thread?

I want to record all the operations and pass to another javascript interceptor such as jsCore so that the webview interceptor such as V8 will not be blocked.

Hi @tanpuer!
@developit wrote an example using preact with webworkers a while ago.
The example should give you at least a hint on how this could be implemented.

@Kanaye
Thanks, I will have a try

Was just going to link to that - thanks @Kanaye!
The key points to look at in that repo are how undom is used to create a lightning-fast headless DOM in the worker thread, and how MutationRecords (from a MutationObserver) are used to send patches across the thread boundary.  Cheers!


[SPARK-6621][Core] Fix the bug that calling EventLoop.stop in EventLoop.onReceive/onError/onStart doesn't call onStop

Test build #29442 has started for   PR 5280 at commit 521125e.

Test build #29442 has finished for   PR 5280 at commit 521125e.

This patch passes all tests.

This patch merges cleanly.

This patch adds the following public classes (experimental):

class UDFRegistration(object):

This patch does not change any dependencies.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/29442/
Test PASSed.

@JoshRosen does this look good?

LGTM, so I'm going to merge this into master (1.4.0) and branch-1.3 (1.3.1).  Thanks!


Added example to README

Summary

Type of change

[ ] Bug fix (added a non-breaking change which fixes an issue)
[ ] New feature (added a non-breaking change which adds functionality)
[ ] Updated documentation (updated the readme, templates, or other repo files)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

[ ] Ran tests with composer test
[ ] Added or updated test cases to test new features

Looks great. Merge conflicts need to be resolved by removing the conflict markers and keeping both usernames. I can do it next time I'm at a computer or you can if you'd like.

Looks great. Merge conflicts need to be resolved by removing the conflict markers and keeping both usernames. I can do it next time I'm at a computer or you can if you'd like.

Looks great. Merge conflicts need to be resolved by removing the conflict markers and keeping both usernames. I can do it next time I'm at a computer or you can if you'd like.

Thanks. I have resolved the conflicts.


[Feature] Update ls lint to reject file names with + included

Is your feature request related to a problem? Please describe.
AWS buckets don't like + in file names. It causes errors when requesting assets.
Describe the solution you'd like
We should update the ls lint rules to check for + in file names and throw errors if found.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
What does the proposed API look like?
What kind of methods it will have, how do you think you will use it?
Additional context
Add any other context or screenshots about the feature request here.

PR opened for this to address linters, should we also include other symbols potentially as well?


[Springt: 48] XD-2921 Update docs clarifying some Sqoop job issues

Clarify the use of escape characters for options in the Sqoop job definition

Clarify the use of the Hadoop config files

Making changes and will push new squashed commit

Merged as d9e92c623616a3fcc58edc3ae3e5b4e80173b45b.


"More filters" doesn't work correct with radio buttons

To Reproduce
Steps to reproduce the behavior:

Go to https://allure-framework.github.io/allure3/
Click on 'More filters'
Try to click on any radio button

Expected behavior
I expect while clicking at radio button filter will be enabled but nothing happens
Screenshots

@ylazakovich thank you!


[GSSoC'23] Text Analyzer Project Ready

Title and Issue number

Title - Text Analyzer
Issue Number - 3262
Close #3262

Checklist:

[x] I have mentioned the issue number in my Pull Request.
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have created a helpful and easy to understand README.md

@MohitGupta121 @Saurabh-kumar09 @pranjay-poddar sir, please review this pull request


fix(DIST-382): Add shadow transition to sidetab

[ ] Explain the motivation for making this change.
[ ] Provide a solid test plan for your changes.
[ ]  Link to the issue - if any issue number here

[BOT] Preview available: https://embed.typeform.com/d612bdfaa480f705370289ebf993a01fc900fa41/embed.js

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Bidirectional layer rejects custom activations

Every other layer I tried accepts custom activations
Minimal code
import tensorflow as tf

@tf.function
def my_hard_sigmoid(x):
    return x

@tf.function
def my_hard_tanh(x):
    return x

inputs = tf.keras.Input(
    shape=(
        100,
        32,
    )
)
init_layer = tf.keras.layers.LSTM(
    8,
    activation=my_hard_tanh,
    recurrent_activation=my_hard_sigmoid,
)
x = tf.keras.layers.Bidirectional(init_layer)(inputs)
model = tf.keras.Model(inputs=inputs, outputs=x)
model.summary(expand_nested=True, show_trainable=True)

Output
ValueError: Unknown activation function '{'module': 'tensoions.py", line 646, in deserializerflow.python.eager.polymorphic_function.polymorphic_function', 'class_name': 'Function', 'config': 'my_hard_tanh', 'rflow.python.eager.polymorphic_function.polymorphic_function', 'class_name': 'Functregistered_name': 'Function'}' cannot be deserialized.
Versions
python 3.11.9
tensorflow 2.15.1
keras 2.15.0

Your custom objects always need to be serializable. You can use @keras.saving.register_keras_serializable for this purpose https://keras.io/api/models/model_saving_apis/serialization_utils/#registerkerasserializable-function

@tf.keras.utils.register_keras_serializable("custom_activations")
@tf.function
def my_hard_sigmoid(x):
    return x

@tf.keras.utils.register_keras_serializable("custom_activations")
@tf.function
def my_hard_tanh(x):
    return x

Thanks. Doesn't works when @tf.function is added, asks for a class with a from_config() method. What a pain!
However, I using custom layers with no problems, I opened issue for anyone else with the problem.

Why do you use tf.function though?

Isn't it a good speedup?

Hi @jm-willy, @tf.function decorator being applied to custom activation functions seems to be interfering with the way Keras layers expect activation functions to behave. Your code will work fine without it. Attaching gist for reference.


Pressing the "-" key more times than expect user to causes errors

Uncaught TypeError: undefined is not a function
sl-components/components/sl-menu.js:79 - child.drillDown() call in drillDown()

Resolved by https://github.com/softlayer/sl-ember-components/pull/499


Update the RC Pouches to display held essence when using Bank Fill

Currently, the number only displays if you fill the pouches outside of the bank.

Duplicate of #5667


'SELECT SUM(column)' is off for Decimals

GORM Playground Link
https://github.com/go-gorm/playground/pull/444
Description
Runing a SELECT SUM(column) query over a table returns wrong results.
For a table with a column amount and five rows that each have an amount of 17.99 as a DECIMAL(20,8), SELECT SUM(amount) should equal 89.95. However, for sqlite, it equals 89.94999999999999.
I am not 100% sure if this is a bug in shopspring/decimal or gorm, but as sqlite is affected and postgresql not, I suspect gorm.
For full details, see the GORM Playground reproduction above.

this look like sqllite cann't support decimal by postgresql can.

sqllite  : https://stackoverflow.com/questions/44298684/sqlite-not-storing-decimals-correctly
postgresql : https://www.postgresql.org/docs/9.1/datatype-numeric.html

In the playground reproduction, I showed that the result the SQLite database returns is correct.
SQLite supports decimals with the numeric affinity and the data Type is set correctly.

I am not 100% sure if this is a bug in shopspring/decimal or gorm, but as sqlite is affected and postgresql not, I suspect gorm.

As you are using Row().Scan, it is just using the generic sql.Row to decode the db value to shopspring/decimal, and GORM do nothing for the decoding data part, so I guess this is caused by the sqlite or the sqlite driver doesn't handle the decimals correctly.
Closing it because GORM can do nothing for it.
Sorry for that.


Lower compiler version requirement for xxh3

Looking for a working xxh3 implementation that does not have to build c code, I stumbled upon this repo.
Sadly, the build aborts with
error[E0658]: `if` is not allowed in a `const fn`
  --> .cargo/registry/src/github.com-1ecc6299db9ec823/xxhash-rust-0.8.0-beta.3/src/xxh3_utils.rs:10:5
   |
10 | /     if seed == 0 {
11 | |         return DEFAULT_SECRET;
12 | |     }
   | |_____^
   |
   = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information

error[E0658]: `while` is not allowed in a `const fn`
  --> .cargo/registry/src/github.com-1ecc6299db9ec823/xxhash-rust-0.8.0-beta.3/src/xxh3_utils.rs:30:5
   |
30 | /     while idx < NB_ROUNDS {
31 | |         let lo = read_u64(&DEFAULT_SECRET, idx * 16).wrapping_add(seed).to_le_bytes();
32 | |         let hi = read_u64(&DEFAULT_SECRET, idx * 16 + 8).wrapping_sub(seed).to_le_bytes();
33 | |
...  |
52 | |         idx += 1;
53 | |     }
   | |_____^
   |
   = note: see issue #52000 <https://github.com/rust-lang/rust/issues/52000> for more information

error: aborting due to 2 previous errors

It is my understanding, that the const_ version is the one that would need this feature from nightly, but maybe it can be dropped for the non-const versions of this lib?

It is true that this could be removed as this utility while useful, is not really necessary for non-const version.
I added primarily so that user could generate secret at compile time instead of using _seed algorithm.
But we can remove it from non-const version too

Done https://github.com/DoumanAsh/xxhash-rust/commit/1d4153cb779bee353c5a977ba2b9bf85389e9abc
Please test that crate works on your stable

I published v0.8.0-beta.4
Use it

Thank you! :)


Fixed typo in ModelChoiceFieldTests.

The subindex and attrs arguments should be passed through to the parent, not overridden as None.

LGTM


conversation: Fix call to post function

Current version fails with error: ./conversation.go:137:8: undefined: post
This error is introduced by the latest commit, I assume it's supposed to be postSlackMethod

It is duplicate to https://github.com/nlopes/slack/pull/401


Chrome Headless doesn't launch on Ubuntu Linux Server

Environment:

Platform: Ubuntu Linux Server 14.04.5 LTS, Ubuntu Linux Server 16.04.3 LTS
Puppeteer Version: Tried both 0.10.2 and 0.11.0 (latest)

Unable to launch chromium on Ubuntu Linux Server 14.04.5 LTS (both the mentioned platform versions). I even tried to launch the chromium manually using the following command: node_modules/puppeteer/.local-chromium/linux-499413/chrome-linux/chrome -v --headless --no-sandbox --disable-setuid-sandbox
But it doesn't start or launch. It just throws me back to the prompt.
Times out every time with the following:
25 09 2017 13:56:19.075:INFO [karma]: Karma v1.5.0 server started at http://<IP_ADDRESS>:9876/build/
25 09 2017 13:56:19.076:INFO [launcher]: Launching browser ChromeHeadless with unlimited concurrency
25 09 2017 13:56:19.080:INFO [launcher]: Starting browser Chrome
25 09 2017 13:56:19.263:INFO [HeadlessChrome 0.0.0 (Linux 0.0.0)]: Connected on socket zDM7md2A7Je8kqsPAAAA with id 1679961
25 09 2017 13:58:19.552:WARN [HeadlessChrome 0.0.0 (Linux 0.0.0)]: Disconnected (1 times), because no message in 120000 ms.
HeadlessChrome 0.0.0 (Linux 0.0.0) ERROR
  Disconnected, because no message in 120000 ms.

Note: The same exact configuration works and runs all the tests perfectly on OSX without any problems. But unable to make it work on Ubuntu.
Here are the related packages in my package.json:
"karma": "1.7.1",
"karma-chrome-launcher": "2.2.0",
"karma-htmlfile-reporter": "0.3.5",
"karma-jasmine": "1.1.0",
"karma-junit-reporter": "1.2.0",
"puppeteer": "0.11.0"

Here's my configuration:
const ChromiumRevision = require('puppeteer/package.json').puppeteer.chromium_revision;
const Downloader = require('puppeteer/utils/ChromiumDownloader');
const revisionInfo = Downloader.revisionInfo(Downloader.currentPlatform(), ChromiumRevision);

process.env.CHROME_BIN = revisionInfo.executablePath;
module.exports = function (config) {
    config.set({
        basePath: 'build/',
        frameworks: ['jasmine'],
        plugins: [
            require('karma-jasmine'),
            require('karma-chrome-launcher'),
        ],
        customLaunchers: {
            'ChromeHeadless': {
                base: 'Chrome',
                flags: [
                    '--headless',
                    '--disable-gpu',
                    // Without a remote debugging port, Google Chrome exits immediately.
                    '--remote-debugging-port=9222',
                    '--no-sandbox',
                    '--disable-setuid-sandbox'
                ],
                debug: true
            }
        },
        autoWatch: false,
        browsers: ['ChromeHeadless'],
        singleRun: true,
        browserNoActivityTimeout: 120000,
        urlRoot: '/build/'
    })
}

Expected Result:
The Chrome headless should launch and the tests should run like they do on the Mac OSX.
Note:
I have installed all the debian/linux dependencies which have been mentioned across all the other related issues. Looking for some suggestions and workarounds. Thank you. ✌

Try updating to the latest puppeteer. You should have Chromium r503964 with<EMAIL_ADDRESS>

What version of NSS do you have installed?

@hparadiz You mean libnss3 ?

@hparadiz By the way I am unable to install the 0.12.0-alpha.  On npm install I get the following:
npm ERR! code ETARGET
npm ERR! notarget No matching version found for<EMAIL_ADDRESS>npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget

@applecool Yes, libnss3 needs to be at least version 3.26
npm install or npm update should push up to 0.12.0
I think you need to skip -alpha when using npm

@hparadiz The libnss3 version is 3.28.4. And I did skip the -alpha and tried it. Didn't work. :(

@applecool the 0.12.0-alpha is not published to npm. It's a bleeding edge, you should install from github to get it. I don't think it's necessary for this usecase, the 0.11.0 should be just good enough.
Regarding the linux box, try installing puppeteer without karma and just running some examples from exampels/ folder. This should give you a better understanding of what's going on.
Also, make sure to sheck out the following resources:

Troubleshooting.md
#290 discussion

If this still doesn't work, please post to #290. There are a lot of people who have figured a lot of linux issues.


How to catch the TabBarItem on clicked event?

Hi, alinz.
How to catch the TabBarItem on clicked event? Is there a callback function?

@jallens, you don't need one. you might be surprised but you just have to change your thinking. However you can be notify when the tab is activated. Probably I have to document this one. So here's the short version
instead of having onTabClick or similar functionality, I have use lifecycle events. These events are being called in both tab and content.
so when a tab is selected, the framework check whether your component implements these lifecycle methods. if you do it will call them in order.
for example
class About extend Component {
  constructor(props, context) {
    super(props, context)
  }

  tabWillFocus() {
    //it will be called once tab is plan to focus.
    //this is useful if you need to do something before your tab is show
  }

  tabDidFocus() {
    //it will be called once tab is show on screen.
  }

  tabWillBlur() {
    //it will called once another tab is selected and framework
    //is giving a chance to do some cleanup
  }

  tabDidBlur() {
    //it means that tab is now hide from user because another tab is shown
  }

  render() {
    return (
      <View>
        <Text>Hello</Text>
      </View>
    );
  }
}

and for your Icon that represents that content you can create another component
class AboutICon extend Component {
  constructor(props, context) {
    super(props, context)
  }

  tabDidActive() {
    //it will be called once tab is selected
  }

  tabDidInactive() {
    //it will be called once another tab is selected.
  }

  render() {
    return (
      <View>
        <Text>About me</Text>
      </View>
    );
  }
}

As you can see, the lifecycle in low level gives you more chance to do more work without to maintain the state by yourself.
We have been using this method in our app and so far we are very happy. It give us a clean way of defining what needs to be done on certain situation.

think alinz.


work around PersistentTokenCache reloading issue

Hi @schaabs.  There hasn't been recent engagement on this PR.  Would you please be so kind as to let us know if this is still an active work stream or if the PR should be closed out?

Hi @schaabs.  Since there hasn't been recent engagement, I'm going to close this out.  Please feel free to reopen if you'd like to continue working on these changes.


Uninstalled Files, now I can't use Explorer

Description
I just uninstalled Files into my Windows10 machine, I do rebooted the machine and I can't no longer use the Windows Explorer as it should. Instead I do get an error message: "Application not found".
How I can restore Windows Explorer back?
Steps To Reproduce
No response
Expected behavior
I expect to be able to use Windows Explorer againd after uninstalling Files.
Files Version
2.1.15
Windows Version
Windows10
Relevant Assets/Logs
No log file.

You'll need to run this script (make sure to save it as a ".reg" file):
https://raw.githubusercontent.com/files-community/Files/main/src/Files.Launcher/Assets/FilesOpenDialog/UnsetFilesAsDefault.reg
Please let us know if it solves the issue.

Thank you for the answer. The .reg file fixed the issue.

even after the script, win+e works, but it given an error Application not found

and i cant open any other folder... i ran the script BEFORE uninstalling, but still shows error.

I have the same issue. Just uninstalled it and now win+e gives me the Application not found error.
The link above isn't working either.

@bronze USE THE UPDATED SCRIPT.. thats old... @yaichenbaum replied and sent it
Here:
Windows Registry Editor Version 5.00
; Revert Default (new)
[HKEY_CLASSES_ROOT\Folder\shell\explore]
"LaunchExplorerFlags"=dword:00000018
"MultiSelectModel"="Document"
"ProgrammaticAccessOnly"=""
[HKEY_CLASSES_ROOT\Folder\shell\explore\command]
@=-
"DelegateExecute"="{11dbb47c-a525-400b-9e80-a54615a090c0}"
[HKEY_CLASSES_ROOT\Folder\shell\open]
"MultiSelectModel"="Document"
[HKEY_CLASSES_ROOT\Folder\shell\open\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,
00,5c,00,45,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,2e,00,65,00,78,00,
65,00,00,00
"DelegateExecute"="{11dbb47c-a525-400b-9e80-a54615a090c0}"
; Revert Default (old)
[HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell]
@=-
[-HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\openinfiles]
; Revert Win+E
[-HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID{52205fd8-5dfb-447d-801a-d0b52f2e83e1}]
Copy paste above into a .reg file and execute, restart computer and done


Error when use optimum.pipeline according to the usage doc

System Info
onnx                     1.12.0
onnxruntime-gpu          1.13.1
optimum                  1.5.0.dev0
transformers             4.24.0

Who can help?
Hi Optimum team, I met this error when use pipeline to inference with GPU device based on the official usage documentation (https://github.com/huggingface/optimum/blob/main/docs/source/onnxruntime/usage_guides/pipelines.mdx#optimizing-with-ortoptimizer) . Could you help to check, thanks!
@philschmid @JingyaHuang @echarlaix  FYI, I saw the error stack includes code in optimum/onnxruntime/modeling_ort.py . Think it might related to the recent IO binding enhancement.
Information

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

Tasks

[ ] An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
[ ] My own task or dataset (give details below)

Reproduction
I was following the usage documentation (https://github.com/huggingface/optimum/blob/main/docs/source/onnxruntime/usage_guides/pipelines.mdx#optimizing-with-ortoptimizer) to do some validation. And I met ValueError: output name logits not found error when use pipeline with

task: question-answering
device: GPU
model: deepset/roberta-large-squad2

Steps:

Good with CPU/GPU on model distilbert-base-uncased-finetuned-sst-2-english, task text-classification

from optimum.onnxruntime import ORTModelForSequenceClassification, ORTOptimizer
from optimum.onnxruntime.configuration import OptimizationConfig
from optimum.pipelines import pipeline
from transformers import AutoTokenizer

# Load the tokenizer and export the model to the ONNX format
model_id = "distilbert-base-uncased-finetuned-sst-2-english"
save_dir = "tmp/onnx/"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = ORTModelForSequenceClassification.from_pretrained(model_id, from_transformers=True)

# Load the optimization configuration detailing the optimization we wish to apply
optimization_config = OptimizationConfig(optimization_level=1)
optimizer = ORTOptimizer.from_pretrained(model)
# Apply optimization and save the resulting model
optimizer.optimize(save_dir=save_dir, optimization_config=optimization_config)

# Load the optimized model from a local repository
# CPU: OK
# model = ORTModelForSequenceClassification.from_pretrained(save_dir, file_name="model_optimized.onnx")
# GPU: OK
import torch
model = ORTModelForSequenceClassification.from_pretrained(save_dir, file_name="model_optimized.onnx").to(torch.device('cuda:0'))

# Create the transformers pipeline
onnx_clx = pipeline("text-classification", model=model, tokenizer=tokenizer)
text = "I like the new ORT pipeline"
pred = onnx_clx(text)
print(pred)

# # Save and push the model to the hub
# tokenizer.save_pretrained("new_path_for_directory")
# model.save_pretrained("new_path_for_directory")
# model.push_to_hub("new_path_for_directory", repository_id="my-onnx-repo", use_auth_token=True)

Error when run with GPU on model deepset/roberta-large-squad2, task question-answering

from optimum.onnxruntime import ORTModelForQuestionAnswering, ORTOptimizer
from optimum.onnxruntime.configuration import OptimizationConfig
from optimum.pipelines import pipeline
from transformers import AutoTokenizer

# Load the tokenizer and export the model to the ONNX format
model_id = "deepset/roberta-large-squad2"
save_dir = "tmp/onnx/"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = ORTModelForQuestionAnswering.from_pretrained(model_id, from_transformers=True)

# Load the optimization configuration detailing the optimization we wish to apply
optimization_config = OptimizationConfig(optimization_level=1)
optimizer = ORTOptimizer.from_pretrained(model)
# Apply optimization and save the resulting model
optimizer.optimize(save_dir=save_dir, optimization_config=optimization_config)

# Load the optimized model from a local repository
# CPU: OK
# model = ORTModelForQuestionAnswering.from_pretrained(save_dir, file_name="model_optimized.onnx")
# GPU: ERROR
import torch
model = ORTModelForQuestionAnswering.from_pretrained(save_dir, file_name="model_optimized.onnx").to(torch.device('cuda:0'))

# Create the transformers pipeline
onnx_clx = pipeline("question-answering", model=model, tokenizer=tokenizer)
QA_input = {
    'question': 'Why is model conversion important?',
    'context': 'The option to convert models between FARM and transformers gives freedom to the user and let people easily switch between frameworks.'
}
pred = onnx_clx(QA_input)
print(pred)

# # Save and push the model to the hub
# tokenizer.save_pretrained("new_path_for_directory")
# model.save_pretrained("new_path_for_directory")
# model.push_to_hub("new_path_for_directory", repository_id="my-onnx-repo", use_auth_token=True)

error information:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.8/dist-packages/transformers/pipelines/question_answering.py", line 380, in __call__
    return super().__call__(examples[0], **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/transformers/pipelines/base.py", line 1074, in __call__
    return self.run_single(inputs, preprocess_params, forward_params, postprocess_params)
  File "/usr/local/lib/python3.8/dist-packages/transformers/pipelines/base.py", line 1096, in run_single
    model_outputs = self.forward(model_inputs, **forward_params)
  File "/usr/local/lib/python3.8/dist-packages/transformers/pipelines/base.py", line 990, in forward
    model_outputs = self._forward(model_inputs, **forward_params)
  File "/usr/local/lib/python3.8/dist-packages/transformers/pipelines/question_answering.py", line 500, in _forward
    start, end = self.model(**model_inputs)[:2]
  File "/usr/local/lib/python3.8/dist-packages/optimum/modeling_base.py", line 60, in __call__
    return self.forward(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/optimum/onnxruntime/modeling_ort.py", line 736, in forward
    io_binding, output_shapes, output_buffers = self.prepare_io_binding(
  File "/usr/local/lib/python3.8/dist-packages/optimum/onnxruntime/modeling_ort.py", line 693, in prepare_io_binding
    start_logits_shape, start_logits_buffer = self.prepare_logits_buffer(
  File "/usr/local/lib/python3.8/dist-packages/optimum/onnxruntime/modeling_ort.py", line 646, in prepare_logits_buffer
    ort_type = TypeHelper.get_output_type(self.model, "logits")
  File "/usr/local/lib/python3.8/dist-packages/onnxruntime/transformers/io_binding_helper.py", line 26, in get_output_type
    raise ValueError(f"output name {name} not found")
ValueError: output name logits not found

Expected behavior
We expected that the result of step-2 can show like below without error:
Actual CPU result (Expected GPU result):
{'score': 0.30786821246147156, 'start': 59, 'end': 132, 'answer': 'gives freedom to the user and let people easily switch between frameworks'}

cc @JingyaHuang

Fixed in https://github.com/huggingface/optimum/pull/454
@JingyaHuang We should merge imo

@fxmarty Sure, go ahead

Closing + the GPU nightly test run now :)

Hi @bugzyz,
The fix for QA pipeline has been merged to main. Yeah feel free to test the dev version with the command.


⚠ Bofrost.be has degraded performance

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

HTTP code: 200
Response time: 2103 ms

Resolved: Bofrost.be performance has improved in 54b5dff.


Send documents to Rummager directly

Previously this app would send documents to Panopticon in order to have
them added to the search index. This flow is now being simplified so
that all apps send documents to Rummager directly.
This commit adds:

a presenter to form the payload required by Rummager. The payload now
includes the following extra attributes: publishing_app, rendering_app
and content_id.
an indexer service object to handle the actual sending.
updates across codebase and test suite wherever interaction with
panopticon takes place.

search-admin result before:

search-admin result after:

Two more things:

panopticon does not index pages with format business_support  and completed_transaction (here). Unfortunately there are three business support schemes that are "exceptional" and are indexed (code, https://github.com/alphagov/panopticon/pull/80). But I'm thinking that it would be good to not migrate this code, because exceptions are horrible.

We need a way to remove things from search. I think this is currently done when the editor withdraws an artefact, which is done in panopticon. Maybe we should add it there temporarily (we'd have to re-add parts of https://github.com/alphagov/panopticon/pull/398).

@tijmenb see latest sha and https://github.com/alphagov/panopticon/pull/399

@tijmenb I've merged this one


Provisioning error at 1st time

PnP sample code 'iotc_devkit' got error at 1st time.
Wi-Fi aterm-3b8988-g connected.
Now is (UTC): Mon Sep  2 07:00:48 2019

Error: Time:Mon Sep  2 07:00:55 2019 File:prov_device_ll_client.c Func:prov_transport_process_json_reply Line:654 Provisioning Failure: OperationId: 4.73a3be01e955831e.6d9b7dcf-7d5e-4ba8-9553-49528976d320 - Date: 2019-09-02T07:00:54.3130834Z - Msg: Custom allocation failed with status code: 404
Error: Time:Mon Sep  2 07:00:55 2019 File:prov_transport_mqtt_common.c Func:prov_transport_common_mqtt_dowork Line:1014 Unable to process registration reply.
Error: Time:Mon Sep  2 07:00:55 2019 File:prov_device_ll_client.c Func:on_transport_registration_data Line:766 Failure retrieving data from the provisioning service
Error: Time:Mon Sep  2 07:00:55 2019 File:main.ino Func:provisioningRegisterCallback Line:146 DPS Provisioning callback called with error state 7
Error: Time:Mon Sep  2 07:00:55 2019 File:main.ino Func:registerDevice Line:227 Error registering device for DPS

What's mean 'Custom allocation failed with status code: 404' ?
How to fix that ?

Hi @matsujirushi , can you tell me more about your problem? Something like where did you get your deviceId and scopeId. Thanks.

Device ID and Scope ID is fine.
(Error occured at 1st time only. 2nd time, error not occured.)

@matsujirushi  Hi, I finally repro your issue, under a special condition. The sample code run correctly when I use registered device or create a new device. However, I deleted my application and create a new one, then I can see the error log in serial monitor.  It seems that register is failed in the first time and succeed in second retry.
Error: Time:Mon Sep 30 07:15:11 2019 File:prov_device_ll_client.c Func:prov_transport_process_json_reply Line:654 Provisioning Failure: OperationId: 4.e06ca595c6bde676.efaf2e64-46d7-4df1-83c1-6544be63dbd6 - Date: 2019-09-30T07:15:10.3408181Z - Msg: Custom allocation failed with status code: 404
Error: Time:Mon Sep 30 07:15:11 2019 File:prov_transport_mqtt_common.c Func:prov_transport_common_mqtt_dowork Line:1014 Unable to process registration reply.
Error: Time:Mon Sep 30 07:15:11 2019 File:prov_device_ll_client.c Func:on_transport_registration_data Line:766 Failure retrieving data from the provisioning service
Error: Time:Mon Sep 30 07:15:11 2019 File:main.ino Func:provisioningRegisterCallback Line:146 DPS Provisioning callback called with error state 7
Error: Time:Mon Sep 30 07:15:11 2019 File:main.ino Func:registerDevice Line:227 Error registering device for DPS
Info: Provisioning callback indicates success.  iothubUri=iotc-7269ffd0-6aff-45bd-bf5a-ed9717990ccb.azure-devices.net, deviceId=mynodedevice
Info: DPS successfully registered.  Continuing on to creation of IoTHub device client handle.

I guess that the iot central application needs some time to deploy  when it has been just created. So error occurred at first time then it turned OK.


Configurations with more species than those used in reactions

Configurations that contain more species in a species file than are present in a reaction report a larger state size than the number of species in the reaction. Not sure if this is problematic.
For example, this configuration micm.zip and this program prints 100, but only 53 species are actually used in the reactions
#include <iostream>
#include <micm/configure/solver_config.hpp>
#include <fstream>
#include <sstream>
#include <filesystem>

namespace fs = std::filesystem;
using namespace micm;

int main(const int argc, const char *argv[])
{
    fs::path configDir = fs::path("micm");

    SolverConfig solverConfig;
    ConfigParseStatus status = solverConfig.ReadAndParse(configDir);

    SolverParameters solver_params = solverConfig.GetSolverParams();

    size_t nspecies = solver_params.system_.StateSize();

    std::cout << "Species: " << nspecies << std::endl;
}

also add NumberOfGridCells(), NumberOfSpecies() and NumberOfProcesses() to the State


Could not find action, lane or variable 'sign_apk'

New Issue Checklist

[ ] Updated fastlane to the latest version
[ ] I read the Contribution Guidelines
[ ] I read docs.fastlane.tools
[ ] I searched for existing GitHub issues

Issue Description
Complete output when running fastlane, including the stack trace and command used

You can use: --capture_output as the last commandline argument to get that collected for you

Environment
Please run fastlane env and copy the output below. This will help us help you :+1:
If you used --capture_output option please remove this block - as it is already included there.
Could not find action, lane or variable 'sign_apk'. Check out the documentation for more details: https://docs.fastlane.tools/actions
FASTLANE ends with error
My fast file code is like below:-
 lane :prod_release do |options|
    gradle(
      task: "cdvBuildRelease",
      project_dir: project_path
    )
    sign_apk(
      keystore_path: "profiles/faithplay.keystore",
      alias: "faithplay",
      storepass: "faithplayRd9U74",
      tsa: "http://timestamp.comodoca.com/rfc316"
    )
    zipalign(apk_path: "#{lane_context[SharedValues::SIGNED_APK_PATH]}")
    end

Please help me to resolve above issue. I am creating build using grunt and Fastlane with ionic
Platform versions are:- Installed platforms:
android 6.2.3
ios 4.3.1
ionic 3.12.0
cordova 7.1.0

@ZalakSA sign_apk is not an officially-supported part of fastlane, but you can try to follow the instructions here to get set up with it: https://github.com/appfoundry/fastlane-android-example/
I hope this is helpful! 🚀


Vision Tests - Tests Missing

Issue - Vision Test in V 1.2.1 had all functions from 1.3 listed in the performance test. With V 1.2.2 most of the nodes are missing.
List of all tests - https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/blob/c96cf7f6059b983ad92334f1a66a3927dd5307aa/tests/vision_tests/runVisionTests.py#L92
resolution - need to add all nodes in performance tests.

@kiritigowda Turns out these tests are commented out due to lack of support from runVX for some of the tests. Maybe can combine this issue and issue #578 once @asalmanp figures out what the missing functionalities are.

@paveltc can you add a runvx feature to process "NULL"

any updates on this issue?

Vision functions added into test scripts.


TestCafe hangs for multiple tests on slow sites.

What is your Test Scenario?
fixture`Test`;
test.page('https://www.cnn.com/')('Something 1', async (t) => {});
test.page('https://www.cnn.com/')('Something 2', async (t) => {});
test.page('https://www.cnn.com/')('Something 3', async (t) => {});
test.page('https://www.cnn.com/')('Something 4', async (t) => {});
test.page('https://www.cnn.com/')('Something 5', async (t) => {});

What is the Current behavior?
Testcafe gets through 2 of the tests and then hangs without error until suite times out.
What is the Expected behavior?
All tests should pass without hanging
What is your web application and your TestCafe test code?

Your website URL (or attach your complete example):

Your complete test code (or attach your test files):

 fixture`Test`;
test.page('https://www.cnn.com/')('Something 1', async (t) => {});
test.page('https://www.cnn.com/')('Something 2', async (t) => {});
test.page('https://www.cnn.com/')('Something 3', async (t) => {});
test.page('https://www.cnn.com/')('Something 4', async (t) => {});
test.page('https://www.cnn.com/')('Something 5', async (t) => {});

Your complete test report:

Using locally installed version of TestCafe.
 Running tests in:
 - Chrome 72.0.3626 / Mac OS X 10.13.6

 Test
(node:27638) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
 ✓ Something 1
 ✓ Something 2
ERROR The Chrome 72.0.3626 / Mac OS X 10.13.6 browser disconnected. This problem may appear when a browser hangs or is closed, or due to network issues.

Screenshots:

Steps to Reproduce:

Go to my website ...
Execute this command...
See the error...

Your Environment details:

testcafe version:                   1.1.0
node.js version:                    11.9.0
command-line arguments:  testcafe chrome test.js
browser name and version: Chrome v72.0.3626.119
platform and version:             macOS 10.13.6

Hi @NanjoW

I tried to run your example 10 times and always tests passed. I found that the tested page raises uncaught JavaScript errors sometimes. These errors are related to wrong setup Google Adwords or advertising network problems on the tested site.
I suggest you turn on the --skip-js-errors option to stabilize your tests.
If it does not help, please create another example where we can reproduce the problem and share it with us.


Move pagination + sorting + query filtering of /pools endpoint to SQS

What is the purpose of the change:
This page indroduces changes to /pools page. Until now, FE would fetch all available pools and will do relevant manipulations to display this data correctly to end user. This approach resulted in high load times, slowed down rendering of pools page. Introduces changes moves all relevant manipulations and mutations of /pools page to SQS to keep FE fast and lightweight.
Linear Task

BE-636
Brief Changelog
FE is no longer responsible for:

Pagination
Filtering
Sorting
Searching

Testing and Verifying
This change has been tested locally by rebuilding the website and verified content and links are expected including QA session.
You can access deployed instance here: https://osmosis-frontend-dev-git-be-636-osmo-labs.vercel.app/

Thank you! I will leave this open for now until we merge SQS related changes and deploy to stage, merging now would result in not working pools page.


Add serial protocol

Add serial protocol for Firebase "modem"
Related #35.

/cc @aliafshar

After thinking more about it I think you can disregard most of my comments wrt to optional type prefix.
It would introduce ambiguities in the protocol to make type prefix optional if we unescape leaf values: client won't be able to distinguish an error from a string value that start with !, or a number value from a string with a number.

I also really like the Redis protocol doc you linked http://redis.io/topics/protocol.
I think most of it is directly applicable here and we could easily derive from it with a few caveats:

we don't really have arrays
number can be float
we also have booleans
leaf simple strings and numbers are not string prefixed only bulk json values are.

Added other method calls as well. Let me know what you think.

I think we have reached consensus here. Are there any more outstanding issues or does this protocol look like a solid starting point?

We should also take a look at alternative like https://github.com/jeelabs/esp-link#outbound-http-rest-requests-and-mqtt-client (with https://github.com/jeelabs/el-client client) or https://github.com/tuanpmt/espduino and see how the protocol/usage compare to it.
Their protocol is apparently based on SLIP.

We should take a look at them. In general I would be against using the SLIP protocol though. I think human readable is really the right approach for us, ease of use and debugging should be pretty high on our priority list.

LGTM just some nits.


MM-21558 : Increase modal height of find channel

Summary
Currently the “Find Channels” modal has a static maximum height that can feel small on larger monitors
Changes : Increased the maximum height of the modal by 300 pixels. The modal should still stay centered in the view
Ticket Link
https://github.com/mattermost/mattermost-server/issues/21558
Release Note
None

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

E2E tests not automatically triggered, because PR has no approval yet. Please ask a developer to review and then try again to attach the QA label.

/release-note-none

This PR has been automatically labelled "stale" because it hasn't had recent activity.
A core team member will check in on the status of the PR to help with questions.
Thank you for your contribution!

@sharmadhiraj86 can we get this to finish line?

Heads up that as part of our efforts to move to a monorepo, we're closing out a number of older pull requests like this one to help streamline the effort.
If you'd like to preserve these changes -- even if you're not the original author! -- feel free to resubmit the pull request against the monorepo once it's ready. You can subscribe to mattermost-server-issue-22420 for status updates on this effort.


Changelog entries missing for 5.0.4 and 5.0.5

@micbar just as reminder 😅 the changelog entries for 5.0.4 and 5.0.5 are missing in the changelog file...

Closing via #9759 (add changelog v5.0.4. 5.0.5 and 5.0.6)


Improve onWorkflowFinalizedIfEnabled

Here, onWorkflowFinalizedIfEnabled is better to be called before the workflow id is removed from the decider queue. So if it fails, it will be retried later.
Pull Request type

[x] Bugfix
[ ] Feature
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] Other (please describe):

Changes in this PR
onWorkflowFinalizedIfEnabled will be called before the workflow id is removed from the decider queue to give an at-least-once guarantee.

Pull Request Test Coverage Report for Build 5402

2 of 2 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 70.314%

Totals

Change from base Build 5400:
0.0%

Covered Lines:
13565

Relevant Lines:
19292

💛  - Coveralls


Add micromamba deinit in post.js

Adds the micromamba deinitialization in the post-action.
Closes #79.
Tested here.

Note that NONE of the INPUTS.xyz will generally work as expected in the post action because they might be templated.

@jonashaag

You can try to just JSON-dump the entire INPUTS to the state.

Done.

Unrelated to this PR, I just saw that we have our own implementation of rmRf but we could also use io.rmRF.

Let's add a test (would've caught the bug below!)

Checking the state after the post action is not easy. You need to execute another action that executes your commands in their post action. Luckily, there is an action for that: webiny/action-post-run. Unfortunately, this action does not pipe the errors out and thus won't fail if an error occurs. This is fixed in the fork lisanna-dettwyler/action-post-run.
If webiny/action-post-run updates its action, we can use it. For now, let's stick with lisanna-dettwyler/action-post-run.

Whoops, early merge, let’s hope CI is good


Add Loogle + make the mathlib4_docs sidebar link clearer

I stumbled across Loogle recently. It doesn't appear to be mentioned on the learning resources page yet.
This also changes the link to mathlib4_docs from "API documentation" to "General documentation". I think this is a lot clearer (and is what mathlib4_docs calls itself): when I was first poking around with Lean I thought this was some sort of FFI documentation, and didn't realize it is the primary documentation page for the language.

I think the distinction that "API documentation" is trying to make is that this is "here is a short bit of text for every function" as opposed to "here is a high-level tutorial on how to use mathlib".

Hmm, that makes sense, but I still feel like the current description isn't super clear. (If #513 gets merged it's probably fine though?) I would like to call it "Stdlib documentation" but it documents so much more than just the standard library...


Update installation.html

Fix possible copy-pasta s/ripgrep/difftastic/

Fixed in #665, thanks for the PR!


v2: Computed columns, only show when stable?

Something I noticed, not sure if this is a bug, or something that just needs to be documented.
The following will not add a whatsItMean property to my Project type
create function project_whats_it_mean(project project) returns integer as $$
  select 42
$$ language sql
set search_path from current;

But this will, only difference being the function type of stable added.
create function project_whats_it_mean(project project) returns integer as $$
  select 42
$$ language sql stable
set search_path from current;

This is intended behavior 👍
In order to be considered a query, a function must be marked as stable. Since computed fields are queries, the computed field procedure must also be stable.
I'll leave this open until I document changes.

Fixed in https://github.com/calebmer/postgraphql/commit/e9c12df25663ca8312e8b7bc4b41fc7950f93a24 :+1:


make some of the server options configurable

One of the customers asked if we can make the worker threads configurable as they have servers with many cores and want to have thousands of worker threads instead of hard-coded 200.
I am thinking we should at least make the following configurable.

Buffer size
Io threads
Worker threads
Backlog
Always setdate
Server string

As there are so many existing projects, we need to make sure that these default values are still for backward compatibility.
            server = builder.setBufferSize(1024 * 16).setIoThreads(Runtime.getRuntime().availableProcessors() * 2)
                    // above seems slightly faster in some configurations
                    .setSocketOption(Options.BACKLOG, 10000)
                    .setServerOption(UndertowOptions.ALWAYS_SET_KEEP_ALIVE, false) // don't send a keep-alive header for
                    // HTTP/1.1 requests, as it is not required
                    .setServerOption(UndertowOptions.ALWAYS_SET_DATE, true)
                    .setServerOption(UndertowOptions.RECORD_REQUEST_START_TIME, false)
                    .setHandler(Handlers.header(handler, Headers.SERVER_STRING, "L")).setWorkerThreads(200).build();

@stevehu @ddobrin Hey! I have a question if the user configures the number of workerthreads to 0, or sets the serverstring to be empty. The server reported an error while binding to the port. So should we throw an exception directly when it detects that workerthread is 0 or serverstring is empty? Also, should the user be allowed to set iothread to 0? Although this allows the server to start normally, it should cause a bad debug situation.

@jiachen1120 For the server name, we can set the default to "L" and only if it is specified in the server.yml with a value to replace it. Regarding the IO threads and worker threads, I think we can still set them as available processes * 2 and 200 as default if the passed in value is 0. I am expecting that most users won't know how to set it up.

I think we need to be careful with these settings.
While server.yml is the natural place to set them, I think we need to set a special section "advanced settings, use with care", to draw attention to the special nature of these settings.
If the use sets the value of the worker threads to 0, maybe we can default it to 1 and issue a WARN. It is just a suggestion.
The alternative is to have for any 0 an exception thrown and a shut down

How about we should put these into the server.yml at all. For advanced users, they can add them on their own.

If it would be by me only, I would take one of the 3 approaches, in order:

use the documentation for "advanced settings", set defaults and allow teams to specifically go into the config and add them
set an advancedconfig.yml, documented as "please be careful, use at your own risk".
set the same configs in the server.yml at the bottom with the same extra warnings.

I would also say that adding into the certification process a validation would be very good.
It is a personal opinion

@stevehu @ddobrin Good morning! Thanks for the ideas. I think the first method is better. Perhaps we should modify codegen to let server.yml add some documentation and configuration examples (key： value  specify the valid range, such as iothread should be greater than 0), but these are commented out. For users who don't want to change, everything is the same as before. For users who want to change, they can configure themselves according to the instructions and examples in server.yml. And we verify these self-configured values to make sure they are valid, otherwise we will continue to use the default values. If you think this works. I will write it specifically as RFC. thanks!

@jiachen1120 @ddobrin I think we are on the same page. I was even thinking to not update server.yml but only put these advanced options into the documentation. I guess only a small percentage of users will need to update them from the default values.

@stevehu Make sense! I will finish the code part then do the documentation. Thanks

@stevehu @ddobrin Hey! I just pull the request for both RFC and code. If these are acceptable, I will update the light-doc as well. Look forward to your review!


Document soca

Description
Use RTD and document. We're not doing that ...
Some work was done in this branch: read the doc branch
Use doxygen for code documentations
Note: Mimic what was done for fv3-jedi. The soca Documentation should go here
Todo list for the doc:

[x] Tutorial (G)
[x] UFO (G)
[x] Model (G or T)
[x] Variable changes (T)
[x] Check State/Incr and Getvalue. (T)

Virtual high 5 to those involved.
Closing this issue :tada:


requests_cache.disabled() not working with sessions

The following code fails:
s = requests.Session()
s.auth = ('####', '-')
s.headers.update({'User-Agent': 'XYZ'})

#...

with requests_cache.disabled():
    r = s.get(url, stream=True)

url returns a 302 to a signed URL in Cloud Storage. It fails when the referenced file is large (this was 800 Mb or so)
The disturbing part is that the traceback shows that the cache is not actually being disabled.
I fixed it by changing s.get() to requests.get().
Traceback (most recent call last):
  File "/lib/recording_processor.py", line 464, in get_single_file
    r = self.s.get(url, stream=True)
  File "/venv/local/lib/python2.7/site-packages/requests/sessions.py", line 487, in get
    return self.request('GET', url, **kwargs)
  File "/venv/local/lib/python2.7/site-packages/requests_cache/core.py", line 126, in request
    **kwargs
  File "/venv/local/lib/python2.7/site-packages/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/venv/local/lib/python2.7/site-packages/requests_cache/core.py", line 99, in send
    return send_request_and_cache_response()
  File "/venv/local/lib/python2.7/site-packages/requests_cache/core.py", line 91, in send_request_and_cache_response
    response = super(CachedSession, self).send(request, **kwargs)
  File "/venv/local/lib/python2.7/site-packages/requests/sessions.py", line 606, in send
    history = [resp for resp in gen] if allow_redirects else []
  File "/venv/local/lib/python2.7/site-packages/requests/sessions.py", line 179, in resolve_redirects
    **adapter_kwargs
  File "/venv/local/lib/python2.7/site-packages/requests_cache/core.py", line 99, in send
    return send_request_and_cache_response()
  File "/venv/local/lib/python2.7/site-packages/requests_cache/core.py", line 93, in send_request_and_cache_response
    self.cache.save_response(cache_key, response)
  File "/venv/local/lib/python2.7/site-packages/requests_cache/backends/base.py", line 46, in save_response
    self.responses[key] = self.reduce_response(response), datetime.utcnow()
  File "/venv/local/lib/python2.7/site-packages/requests_cache/backends/storage/dbdict.py", line 160, in __setitem__
    sqlite.Binary(pickle.dumps(item)))
  File "/venv/local/lib/python2.7/site-packages/requests_cache/backends/storage/dbdict.py", line 125, in __setitem__
    self.table_name, (key, item))
InterfaceError: Error binding parameter 1 - probably unsupported type.

request_cache.disabled works by reverting requests.Session monkey-patch. So it works only for new instances (which are created in requests.get, etc).
For you own session, you can use CachedSession.cache_disabled() context manager:
s = requests.Session()
# ...
with s.cache_disabled():
    r = s.get(url, stream=True)

I'll update docs.


Crime distribution per hour or day/night

We would like to plot the crime distribution with respect to time. In particular, we would want to plot:

The total number of crimes at each hour across all days
The total number of crimes in more broader category of hours (day/night)

I believe Cagatay finished doing this, no?

@abdullahnaeemmalik Correct, but i think he hasn’t uploaded the change to GitHub. @ayhncgty Could you make a pull request on the change you showed me last week?


Configurable Working Directory for Exported Credential

TL;DR
I'd like to put the credential automatically generated by this action into a different directory from GITHUB_WORKSPACE.
Detailed design
steps:
    - name: Authenticate to Google Cloud
      uses<EMAIL_ADDRESS>      with:
        project_id: ${{ inputs.google-cloud-project }}
        service_account: ${{ inputs.google-cloud-service-account }}
        workload_identity_provider: ${{ inputs.google-cloud-workload-identity-provider }}
        working_directory: ${{ env.home }} <-- Possible new parameter to change working directory of the action.

Additional information
Although the credentials are short-lived, placing them in GITHUB_WORKSPACE creates some additional opportunities to accidentally expose the credential for a period of time.
I managed to do this accidentally a few days ago.  Here's what happened:

Ran the auth step to generate a token
Ran a step to run tests on Firebase test lab
Ran a step to upload the test results using a bash script with a zip command.  Due to a typo in the zip command, it compressed the entire GITHUB_WORKSPACE directory instead of just the output files I wanted it to collect.

Placing the secrets in a different directory, like HOME would have avoided this issue.  GitHub Actions steps use a default working directory of GITHUB_WORKSPACE, so including the secret in that path makes it more likely that downstream steps will accidentally leak it.
I don't have specific requirements on the exact implementation.  An optional parameter for the working directory would been  reasonable option.  This would keep backwards compatibility with existing users, while granting flexibility for where the secret is written.

As of 0.6.0, the credentials file follows a well-known naming format:
gha-creds-*.json

As noted in the Prerequisites and the Troubleshooting Guide, we recommend adding this pattern to your .gitignore.
We've been down the path of allowing users to specify the output path in setup-gcloud, and it turns out to be a bad idea. There's an even higher chance of the credential being accidentally committed into a binary or container, and it introduces many challenges with self-hosted runners, docker-based actions, and in post-job cleanup.
You can use git to create an archive, which will take into account your .gitignore:
git archive -o file.zip HEAD

I personally have this as a shell function:
gitzip() {
  local NAME="${1:-arhive}"
  git archive -o "${NAME}.zip" HEAD
}

Please let me know if you have additional questions. Thanks!

How does adding the key to the gitignore help?
We're trying to collect specific build outputs, which are also ignored by git.  For example in our repo containing a Gradle project, all build folders are ignored.  Unless I missed something, it seems that trying to leverage the gitignore means we won't collect anything of interest.

Why don't you compile your build artifacts into a subfolder then? That way you don't have to worry about any pollution. The same would be true if you ran any tests that generated files in the working directory.
We've been down the path of a customizable working directory, and it introduces far too many security risks.


Add documentation for RTT in CCaaS

Description
Added README and sample web resource for enabling real time translation in CCaaS.
Related Issue(s)

Include any related issue numbers or links here.

Checklist
Please ensure that you have completed the following tasks before submitting this pull request:

[x] I have updated the documentation or README if necessary.
[x] My code follows the project's coding style guidelines.
[x] My changes are self reviewed

Screenshots (if applicable)
If your changes include UI/UX modifications or additions, please include relevant screenshots here.
Additional Notes
Add any additional context or notes for reviewers here.

@microsoft-github-policy-service agree company="Microsoft"

From: microsoft-github-policy-service[bot] @.>
Sent: Friday, October 4, 2024 7:28 PM
To: microsoft/dynamics-365-contact-center @.>
Cc: Ruoting Jia @.>; Mention @.>
Subject: Re: [microsoft/dynamics-365-contact-center] Add documentation for RTT in CCaaS (PR #53)
@ruotingjiahttps://github.com/ruotingjia please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
@microsoft-github-policy-service agree [company="{your company}"]
Options:

(default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.

@microsoft-github-policy-service agree

(when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.

@microsoft-github-policy-service agree company="Microsoft"
Contributor License Agreement
Contribution License Agreement
This Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
and conveys certain license rights to Microsoft Corporation and its affiliates (“Microsoft”) for Your
contributions to Microsoft open source projects. This Agreement is effective as of the latest signature
date below.

Definitions.
“Code” means the computer software code, whether in human-readable or machine-executable form,
that is delivered by You to Microsoft under this Agreement.
“Project” means any of the projects owned or managed by Microsoft and offered under a license
approved by the Open Source Initiative (www.opensource.orghttp://www.opensource.org/).
“Submit” is the act of uploading, submitting, transmitting, or distributing code or other content to any
Project, including but not limited to communication on electronic mailing lists, source code control
systems, and issue tracking systems that are managed by, or on behalf of, the Project for the purpose of
discussing and improving that Project, but excluding communication that is conspicuously marked or
otherwise designated in writing by You as “Not a Submission.”
“Submission” means the Code and any other copyrightable material Submitted by You, including any
associated comments and documentation.
Your Submission. You must agree to the terms of this Agreement before making a Submission to any
Project. This Agreement covers any and all Submissions that You, now or in the future (except as
described in Section 4 below), Submit to any Project.
Originality of Work. You represent that each of Your Submissions is entirely Your original work.
Should You wish to Submit materials that are not Your original work, You may Submit them separately
to the Project if You (a) retain all copyright and license information that was in the materials as You
received them, (b) in the description accompanying Your Submission, include the phrase “Submission
containing materials of a third party:” followed by the names of the third party and any licenses or other
restrictions of which You are aware, and (c) follow any other instructions in the Project’s written
guidelines concerning Submissions.
Your Employer. References to “employer” in this Agreement include Your employer or anyone else
for whom You are acting in making Your Submission, e.g. as a contractor, vendor, or agent. If Your
Submission is made in the course of Your work for an employer or Your employer has intellectual
property rights in Your Submission by contract or applicable law, You must secure permission from Your
employer to make the Submission before signing this Agreement. In that case, the term “You” in this
Agreement will refer to You and the employer collectively. If You change employers in the future and
desire to Submit additional Submissions for the new employer, then You agree to sign a new Agreement
and secure permission from the new employer before Submitting those Submissions.
Licenses.

Copyright License. You grant Microsoft, and those who receive the Submission directly or
indirectly from Microsoft, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license in the
Submission to reproduce, prepare derivative works of, publicly display, publicly perform, and distribute
the Submission and such derivative works, and to sublicense any or all of the foregoing rights to third
parties.
Patent License. You grant Microsoft, and those who receive the Submission directly or
indirectly from Microsoft, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license under
Your patent claims that are necessarily infringed by the Submission or the combination of the
Submission with the Project to which it was Submitted to make, have made, use, offer to sell, sell and
import or otherwise dispose of the Submission alone or with the Project.
Other Rights Reserved. Each party reserves all rights not expressly granted in this Agreement.
No additional licenses or rights whatsoever (including, without limitation, any implied licenses) are
granted by implication, exhaustion, estoppel or otherwise.

Representations and Warranties. You represent that You are legally entitled to grant the above
licenses. You represent that each of Your Submissions is entirely Your original work (except as You may
have disclosed under Section 3). You represent that You have secured permission from Your employer to
make the Submission in cases where Your Submission is made in the course of Your work for Your
employer or Your employer has intellectual property rights in Your Submission by contract or applicable
law. If You are signing this Agreement on behalf of Your employer, You represent and warrant that You
have the necessary authority to bind the listed employer to the obligations contained in this Agreement.
You are not expected to provide support for Your Submission, unless You choose to do so. UNLESS
REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, AND EXCEPT FOR THE WARRANTIES
EXPRESSLY STATED IN SECTIONS 3, 4, AND 6, THE SUBMISSION PROVIDED UNDER THIS AGREEMENT IS
PROVIDED WITHOUT WARRANTY OF ANY KIND, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY OF
NONINFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
Notice to Microsoft. You agree to notify Microsoft in writing of any facts or circumstances of which
You later become aware that would make Your representations in this Agreement inaccurate in any
respect.
Information about Submissions. You agree that contributions to Projects and information about
contributions may be maintained indefinitely and disclosed publicly, including Your name and other
information that You submit with Your Submission.
Governing Law/Jurisdiction. This Agreement is governed by the laws of the State of Washington, and
the parties consent to exclusive jurisdiction and venue in the federal courts sitting in King County,
Washington, unless no federal subject matter jurisdiction exists, in which case the parties consent to
exclusive jurisdiction and venue in the Superior Court of King County, Washington. The parties waive all
defenses of lack of personal jurisdiction and forum non-conveniens.
Entire Agreement/Assignment. This Agreement is the entire agreement between the parties, and
supersedes any and all prior agreements, understandings or communications, written or oral, between
the parties relating to the subject matter hereof. This Agreement may be assigned by Microsoft.

—
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/dynamics-365-contact-center/pull/53#issuecomment-2394867662, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BLH75LM573ORCDTVXFOC3G3ZZ5FDVAVCNFSM6AAAAABPM4XNTGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJUHA3DONRWGI.
You are receiving this because you were mentioned.Message ID: @.***>


Enabled proper SSL Offloading

A redirect loop occurred when trying to access a secure site in hybris.
This changes allow a proper SSL offloading

Second try to get pull request


Issue with k8s.io/docs/tutorials/configuration/configure-java-microservice/configure-java-microservice-interactive/

Could you add the image building part, because after packaging apps, subsequently, we need to build images with docker build in the specific app's directories?

@halilural i think it depends on what container runtime you are using , if you are using docker than you find the appropriate behaviour of building image and packaging on docker documentation.

/remove-lifecycle rotten


Fix clash of 2f38736 with 39fc0c4

I noticed that https://github.com/openscopeproject/InteractiveHtmlBom/commit/39fc0c466cf1bd98464efae56c9713aaddbeb5a3 assumes that the values are strings. However, https://github.com/openscopeproject/InteractiveHtmlBom/commit/2f38736d8506f45c6a0945eccea1497e02fef1af makes this assumption invalid. As a result, if there are numeric columns, the BOM is not displayed.
As numbers cannot be URLs, I suggest URL matching only on a string.

Thanks for the fix!


Attack Flow: Inject Malicious Code/Commands into Cloud APIs

Inject malicious code or commands into cloud APIs that interface to vehicle systems, to alter vehicle behavior or steal data.


UI/UX Love - Signage

Migrated from GitLab: https://gitlab.com/meltano/meltano/-/issues/723
Originally created by @derek-knox on 2019-06-18 13:57:57

[x] RouterViewLayout h1 signage ("you are here" explicitness) + page metaphor container (likely box)

View 3 previous comments from the original issue on GitLab


Add a feature to round building floats

The new flag will round locations and rotations of buildings to 1/64th of a tile and 1 degree respectively. It decreases blueprint size by 30% or so. Also, the game tends to put "on-grid" buildings an epsilon off-grid, so this helps perfectly align them.
We explicitly give no guarantees for the changed blueprints to work.
Kudos to @Neutron3529 for suggesting and initially implementing this feature.

@Neutron3529 does this cover your use case?

IMHO, 1/64 seems not the good choice, since 64 is not a multiple of 3 and 5. In case you really like 1/64 scale, maybe 1/60 is better.
And rounding seems to be 3 degree seems more reasonable
(original game code)
	public bool CopyFromFactoryObject(int objectId, PlanetFactory factory, bool copyInserters = true, bool copyAllSettings = false)
	{
		...
		if (objectId <= 0 || entityPool[objectId].id != objectId)
		{
			if (num > 0 && prebuildPool[num].id == num)
			{
				this.type = BuildingType.None;
				this.itemId = (int)prebuildPool[num].protoId;
				this.modelIndex = (int)prebuildPool[num].modelIndex;
				this.yaw = (Quaternion.Inverse(Maths.SphericalRotation(prebuildPool[num].pos, 0f)) * prebuildPool[num].rot).eulerAngles.y;
				this.yaw = Mathf.Round(this.yaw / 3f) * 3f;

1 degree might be too aggressive since I've found some building's rounding error (towards 90 degree) larger than 1.
Maybe change the switch to a configuable number is better.
A invalid number(such as 0) means no rounding, and therefore people could adjust their rounding factor to a more reasonable one.

I picked 1/64 because it rounds nicely in terms of float's binary representation. I guess it might be a problem for off-grid belt segments? I'm not sure, 1/64 is still very small. I can bump angle rounding to 3 degrees, sure.
Another idea: as a compromise, make rounding "snap" to whole tiles and 90 degree angles while ignoring everything else. I experimented a bit, 3 degrees and 1/64th of a tile of snapping give me only about 20% compression.

A bit of investigation suggests that sorters are usually off-grid, so with that approach they wouldn't be compressed. Same for belt pieces that go into splitters. Rest of belts aligns nicely though.


Fix branch version.

Issue #, if available:
Description of changes:
PR https://github.com/opensearch-project/alerting/pull/1593 accidentally bumped 2.15 branch to v2.16. Fixing that increment.
CheckList:

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

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

can you check if version variable in spi's build.grade comes from this variable and is not being hardcoded again?

It's not hard coded. The SPI build.gradle uses the opensearc_versionvariable
https://github.com/opensearch-project/alerting/blob/main/spi/build.gradle#L20
Which gets defined in the main build.gradle
https://github.com/opensearch-project/alerting/blob/main/build.gradle#L10


Cargo fmt

As suggested in PR #28, this is changes made by cargo fmt. This PR is included in PR #32, but i also created this one to allow quicker merge of cargo fmt.

Thanks!


missed key sharding in MixtureDataset

The new fix works: https://wandb.ai/stanford-mercury/marin/runs/eo302320keys0529


Issue when invoking asynchronous call stack .NET/C#

I am having an issue executing an asynchronous method from the script, if I have an async call from the script and another asynchronous call from within that method, it doesn't await.    Any help would be appreciated.
Javascript side:
//JS Script to call async function
function callAsync(t) { return await t; }
var result = callAsync(myAsyncFunction(()); //Finishes BEFORE SomeOtherFunction call does below

C# Code (WONT AWAIT -> The .Execute call on the v8engine object finishes)
public async Task<string> myAsyncFunction() {
   var result = await SomeOtherFunction();
   return result; //This point in the code will be hit after the Execute finishes on the v8scriptengine object
}

C# Code (WILL await)
public async Task<string> myAsyncFunction() {
   return "Some Result";
}

In other words, single level asynchronous call works - calling a method which in turn await another method, etc and down the entire call stack just causes the await to continue on the clearscript side without waiting.
I've spent way too many hours trying to get this to work, any help please :)

Hi @upsilondynamics,
JavaScript's await doesn't work with tasks as you're expecting. When given something that isn't a promise, it simply converts it into a resolved promise, in this case one whose value is the task.
Clearly that's not very useful. One way to make it work is to provide a method that wraps a promise around a task. Consider something like this (requires ClearScript 5.5.5):
public static class TaskScripting {
    private delegate void Executor(dynamic resolve, dynamic reject);
    public static object ToPromise<T>(this Task<T> task) {
        var ctor = (ScriptObject)ScriptEngine.Current.Script.Promise;
        return ctor.Invoke(true, new Executor((resolve, reject) => {
            task.ContinueWith(t => {
                if (t.IsCompleted) {
                    resolve(t.Result);
                }
                else {
                    reject(t.Exception);
                }
            });
        }));
    }
}

You could add this class to your engine:
engine.AddHostType(typeof(TaskScripting));

And then use the conversion method in your script code:
// JavaScript
callAsync(myAsyncFunction().ToPromise());

Good luck!

Thanks for the response, unfortunately it still isn't working.  The script ends before the await completes.
The ToPromise extension method does return the promise object, but even when I await the call when passing it into an async function - it still isn't working:
Javascript
function async callAsync(t) { return await t; }
callAsync(myMethod().ToPromise()); //This will just blow over way before the C# async finishes even with the extension
//POINT 1 REACHED
C#
 public async Task<string> myMethod()
{
 return await SomeOtherMethod();
//POINT 2 REACHED AFTER
}

Hi @upsilondynamics,
What you're describing appears to be the correct behavior.
You're invoking callAsync from the (synchronous) root scope, so the invocation ends immediately and returns a promise that represents callAsync's asynchronous operation.
Can you clarify how this differs from what you're expecting?
Thanks!

Example code:
Let me define a promise, with an asynchronous function to call it with a 5000 MS delay, invoke it from t the root.
wait =  (time) => new Promise(resolve => setTimeout(resolve, time));
async function testWait(delay){ await wait(delay);}
Console.WriteLine("Line 1");
testWait(5000);
Console.WriteLine("Line 2");

There is zero delay between line 1 and line 2, I guess this makes sense becayse we are calling an asynchronous method from a synchronous root.  But even if I wrap it like such:
(async () => { await testWait(5000); })();
It still doesn't work, how am I supposed to get the result from the .NET side asynchronous call if it just blasts pasts the ScriptEngine execute call, that by the time the asynchronous call finishes, the script has long already been parsed and executed by Clearscript when I need those resultant values in the script itself?
Meanwhile in C# Land:
_engine.Execute(theScript); //theScript == the JS code shown above *breakpoint here, HIT F5
System.Diagnostics.Debug.WriteLine("Finished"); // WE GO  HERE IMMEDIATELY, NOT AFTER 5 SECONDS
Why is this? If we run the same code in a browser, it will delay 5 seconds. Maybe I'm not understanding, but is there a way to await from the root?

UPDATE
I am going to change my methods to non-asynchronous since this is server side, the results must be ready before the request returns to the browser. That being said I think you guys should investigate implementing a proper await implementation so the main thread waits when an await is hit, and the result is returned before continuing onto the next script statement - that's how await/async should work with newer JS implementations.

Hi @upsilondynamics,
Again, what you're describing is correct behavior.
JavaScript's await operator pauses asynchronous execution only. What it really does under the covers is add a hidden continuation callback to its operand (unless its operand isn't a promise, in which case it converts it into a resolved promise first). That callback resumes the async function at a point just beyond the await and continues execution until the next await or return.
 This is by design. ClearScript isn't responsible for this behavior, nor can it change it.
Yes, you can Wait for a .NET task synchronously, but you can't do the equivalent with a JavaScript promise. That's because a task can be completed on another thread, whereas JavaScript code is single-threaded.
One thing you may not realize is that a JavaScript async function can be resumed long after ScriptEngine.Execute has returned. Here's a command-line sample that demonstrates the sort of "multi-level" asynchronous operation we've been discussing:
using (var engine = new V8ScriptEngine()) {
    engine.AddHostType(typeof(Console));
    engine.AddHostType(typeof(Task));
    engine.AddHostType(typeof(TaskScripting));
    engine.Script.done = new ManualResetEventSlim();
    engine.Execute(@"
        async function waitAsync(msec) {
            await Task.Delay(msec).ToPromise();
        }
        async function waitAndLog(msec, text) {
            await waitAsync(msec);
            Console.WriteLine(text);
        }
        async function runTestAsync() {
            await waitAndLog(1000, 'first');
            await waitAndLog(1000, 'second');
            await waitAndLog(1000, 'third');
            await waitAsync(1000);
            done.Set();
        }
        runTestAsync();
    ");
    engine.Script.done.Wait();
}

Note that, to make this work, we had to add a non-generic ToPromise overload:
public static object ToPromise(this Task task) {
    var ctor = (ScriptObject)ScriptEngine.Current.Script.Promise;
    return ctor.Invoke(true, new Executor((resolve, reject) => {
        task.ContinueWith(t => {
            if (t.IsCompleted) {
                resolve();
            }
            else {
                reject(t.Exception);
            }
        });
    }));
}

Cheers!

This was the magic bullet I was looking for (The ManualResetEventSlim class)
engine.Script.done.Wait();
This will halt execution on the .NET side until the promise is resolved, THANK YOU! Always can count on the geniuses at Microsoft.
Cheers.

Hi @ClearScriptLib
do you have a quick solution for this, when my Task (i.e. Promise) has to return a value? So Task<> instead of only Task?

Note that, to make this work, we had to add a non-generic ToPromise overload:
public static object ToPromise(this Task task) {
    var ctor = (ScriptObject)ScriptEngine.Current.Script.Promise;
    return ctor.Invoke(true, new Executor((resolve, reject) => {
        task.ContinueWith(t => {
            if (t.IsCompleted) {
                resolve();
            }
            else {
                reject(t.Exception);
            }
        });
    }));
}

got this resolved by adding another ToStringPromise Extension that passes the Task result to the resolve delegate.
Overloading the ToPromise Extension did not work, neither did using Task.
This works for me as I will mostly be passing JSON anyway. :)

Note that, to make this work, we had to add a non-generic ToPromise overload:
public static object ToStringPromise(this Task<string> task) {
    var ctor = (ScriptObject)ScriptEngine.Current.Script.Promise;
    return ctor.Invoke(true, new Executor((resolve, reject) => {
        task.ContinueWith(t => {
            if (t.IsCompleted) {
                resolve(t.Result);
            }
            else {
                reject(t.Exception);
            }
        });
    }));
}

Hi @themightylc,
The following should work for all tasks:
public static class TaskScripting {
    private delegate void Executor(dynamic resolve, dynamic reject);
    public static object ToPromise<T>(this Task<T> task) {
        var ctor = (ScriptObject)ScriptEngine.Current.Script.Promise;
        return ctor.Invoke(true, new Executor((resolve, reject) => {
            task.ContinueWith(t => {
                if (t.IsCompleted) {
                    resolve(t.Result);
                }
                else {
                    reject(t.Exception);
                }
            });
        }));
    }
    public static object ToPromise(this Task task) {
        var ctor = (ScriptObject)ScriptEngine.Current.Script.Promise;
        return ctor.Invoke(true, new Executor((resolve, reject) => {
            task.ContinueWith(t => {
                if (t.IsCompleted) {
                    resolve();
                }
                else {
                    reject(t.Exception);
                }
            });
        }));
    }
}

Here's a usage sample:
engine.AddHostType(typeof(TaskScripting));
engine.AddHostType(typeof(Console));

engine.Script.voidTask = Task.Run(() => {});
engine.Script.stringTask = Task.Run(() => "Hello, world!");

engine.Execute(@"
    voidTask.ToPromise().then(() => Console.WriteLine('Void task completed.'));
    stringTask.ToPromise().then(msg => Console.WriteLine(msg));
");

Good luck!


Set process return code

Fixes #28868

The options for setting exit code are discussed in https://docs.microsoft.com/en-us/dotnet/standard/commandline/model-binding#set-exit-codes


config: centralize gRPC and REST method strings in SubscriptionFactory

Previously, constant strings like "envoy.api.v2.EndpointDiscoveryService.FetchEndpoints" were all over eds.cc, rds_impl.cc, etc, being fed into SubscriptionFactory. Now, they are all centralized in SubscriptionFactory, the only place that actually uses them. #4991
Risk Level: low

/assign htuch

I think this a nice cleanup even just by itself, but the real motivation is delta xDS. The places that create subscriptions (eds.cc, cds_api_impl.cc, etc) need some simplification to avoid getting really messy with delta. This is one such simplification. (The other being unification of DeltaSubscriptionImpl and GrpcSubscriptionImpl).

Ready to merge?

Yeah, sure, but needs to resolve conflicts again, sorry.

Ha, it's my own conflict, so nothing to complain about!


[MINOR] Print error msg when delta streamer config error happens

Tips

Thank you very much for contributing to Apache Hudi.
Please review https://hudi.apache.org/contribute/how-to-contribute before opening a pull request.

What is the purpose of the pull request
Print more error infos when new source failed with config error.
For example, when we new JsonKafkaSource.java with error checkpoint config.

UtilHelpers tries JsonKafkaSource(TypedProperties properties, JavaSparkContext sparkContext, SparkSession sparkSession, SchemaProvider schemaProvider, HoodieDeltaStreamerMetrics metrics first, and it throws HoodieException(That HoodieException contains useful error msg).
Then UtilHelpers tries JsonKafkaSource(TypedProperties properties, JavaSparkContext sparkContext, SparkSession sparkSession, SchemaProvider schemaProvider, and it throws HoodieException.
User only knows a not related error msg, and wonder why program complains not such method.

Brief change log

Print error msg if not NoSuchMethodException in UtilHelpers.

Verify this pull request
This pull request is a trivial rework / code cleanup without any test coverage.
Committer checklist

[ ] Has a corresponding JIRA in PR title & commit

[ ] Commit message is descriptive of the change

[ ] CI is green

[ ] Necessary doc changes done or have another open PR

[ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

As suggested in the comment replied above.


Group management status not synchronized to second pi-hole

What happened?
In the list of groups there's one group defined (exclude_from_pihole) on the main pi-hole.
The group is nicely synchronized to the secondary pi-hole (pi-hole2). However when I disable that group on the main pi-hole, it does not get synchronized to the secondary pi-hole. The group stays enabled.
When I disable the group manually on the secondary pi-hole, it's automatically enabled again after synchronization (even though on the main pi-hole it's also disabled).
Version
orbital-sync:1 (18.15.0)
Log output
No response

Looks like thats a bug with Pihole itself as the backup file contains a file called groups.json which what I just tested (disabling kids group) it still said enabled


add whisper-large-v3

@mli The performance of v3 has greatly deteriorated. Is it necessary to add it?


Remove ability to create backups config

This PR:

Removes the "Set up now" button and the corresponding modal.
Updates text.

We may update the text again once we put out more messaging around a deprecation timeline. The text updates in this PR are what will go out with the patch release.
You can see the text changes by taking a look at the components. Text changed the most in the "backups are not configured" case and in the "Terminate Automatic Backups" modal, so I've also added screenshots of those below.
I'm tagging @lognaturel for a review of the text changes and @ktuite for a more general code review.

@ktuite, I think this can be reviewed async.

Behavior/wording looks great to me.

It looks like if they do have backups turned on, there will be no message here about the feature going away, except in the "terminate" button modal. Do we want any sort of warning/alert in the status here about the feature being on a deprecation path?


MAINT: simpson small performance speedups

The small speedup gains are from being a bit smarter as to the order in which some additions/multiplications are done.
x = np.linspace(1, 2001, 20001)
y = np.random.random((1001, 20001))
%timeit simpson(y, axis=-1);

Before:
63.6 ms ± 502 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
After:
57.6 ms ± 464 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
This speedup becomes proportionally more appreciable for smaller array sizes.
%timeit simpson(y, x, axis=-1);

Before:
150 ms ± 1.98 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
After:
113 ms ± 1.07 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)

The speed of simpson is a small pain point for me at the moment. It would be nice to have even faster behaviour. From profiling the bottleneck is the manipulation of the sliced arrays. I'm wondering if it's because of temporary array creation in numpy, or something to do with the broadcasting.
     1                                           def _basic_simpson(y, start, stop, x, dx, axis):
     2         1          1.0      1.0      0.0      nd = len(y.shape)
     3         1          1.0      1.0      0.0      if start is None:
     4                                                   start = 0
     5         1          0.0      0.0      0.0      step = 2
     6         1          2.0      2.0      0.0      slice_all = (slice(None),)*nd
     7         1          3.0      3.0      0.0      slice0 = tupleset(slice_all, axis, slice(start, stop, step))
     8         1          2.0      2.0      0.0      slice1 = tupleset(slice_all, axis, slice(start+1, stop+1, step))
     9         1          1.0      1.0      0.0      slice2 = tupleset(slice_all, axis, slice(start+2, stop+2, step))
    10
    11         1          1.0      1.0      0.0      if x is None:  # Even-spaced Simpson's rule.
    12                                                   result = np.sum((y[slice0]+4*y[slice1]+y[slice2]),
    13                                                                   axis=axis)
    14                                                   result *= dx /3.0
    15                                               else:
    16                                                   # Account for possibly different spacings.
    17                                                   #    Simpson's rule changes a bit.
    18         1         61.0     61.0      0.0          h = np.diff(x, axis=axis)
    19
    20         1          2.0      2.0      0.0          sl0 = tupleset(slice_all, axis, slice(start, stop, step))
    21         1          2.0      2.0      0.0          sl1 = tupleset(slice_all, axis, slice(start+1, stop+1, step))
    22
    23         1          2.0      2.0      0.0          h0 = h[sl0]
    24         1          1.0      1.0      0.0          h1 = h[sl1]
    25         1         22.0     22.0      0.0          hprod = h0 * h1
    26         1         15.0     15.0      0.0          hsum = h0 + h1
    27         1         92.0     92.0      0.1          h0divh1 = h0 / h1
    28         1          4.0      4.0      0.0          ys0 = y[slice0]
    29         3      84041.0  28013.7     64.8          tmp = hsum/6.0 * (y[slice0]*(2-1.0/h0divh1) +
    30         1      19853.0  19853.0     15.3                 y[slice1]*(hsum*hsum/hprod) +
    31         1      19044.0  19044.0     14.7                 y[slice2]*(2-h0divh1))
    32         1       6490.0   6490.0      5.0          result = np.sum(tmp, axis=axis)
    33         1          2.0      2.0      0.0      return result

I merged, thanks @andyfaff and @V0lantis


New Flags structure

This PR improves the structure of the flags in our app

Commands shorthand (-s for -server for example)
Idiomatic flag parsing
Better structure

LGTM


Map/Dict Fields and Numeric Strings (_delta)

In base.py, there's an issue where the _delta call wil fail when given a numeric string as a key to a dict.
The section of code in base.py looks like:
            for p in parts:
                if hasattr(d, '__getattr__'):
                    d = getattr(p, d)
                elif p.isdigit():
                    d = d[int(p)]
                else:
                    d = d.get(p)

Basically the problem is that the parser will try to convert p into an int if it can, as if it's assuming it must be an array.  In my case, some of the keys to a MapField just happened to be only digits, stored as a string, which caused a key error when _delta() got called on save.
To replicate my particular case, set up something like:
class Test(Document):
    test = StringField()
    map = MapField(GenericReferenceField())

    def test(self):
        map['1234'] = Test()
        map['1234'] .test = "blah"

        self.save()

If I sketched that out right, what you should see is that running test() will cause a key error when the save process attempts to process changes to map[1234] instead of map["1234"]

Hi seems to be fixed in dev.
The following testcase now passes:

    def test_dict_field_keys(self):
        """Ensure that a referenced document is also deleted upon deletion.
        """

        class BlogPost(Document):
            content = DictField()

        self.Person.drop_collection()
        BlogPost.drop_collection()

        bp = BlogPost(content={'hello': 'world'})
        bp.save()

        bp.content['123'] = '123'
        bp.save()

        bp = bp.reload()
        self.assertEquals(bp.content['123'], '123')

        class Test(Document):
            test = StringField()
            map_field = MapField(GenericReferenceField())

        test1 = Test(test="1")
        test1.save()

        test2 = Test(test="2")
        test2.save()

        test1.map_field['123'] = test2
        test1.save()

        test1 = test1.reload()


History panel shows last events and allows downloading session data

Table summarising last sessions, allowing for session data to be downloaded in CSV format. Read data from SQLite

Added in develop, supports JSON as default (for now)


New version: BinaryBuilderBase v0.3.1

Registering package: BinaryBuilderBase
Repository: https://github.com/JuliaPackaging/BinaryBuilderBase.jl
Created by: @giordano
Version: v0.3.1
Commit: f44c8a7dbab53a2e003b325df62edb53aead5188
Reviewed by: @giordano
Reference: https://github.com/JuliaPackaging/BinaryBuilderBase.jl/commit/f44c8a7dbab53a2e003b325df62edb53aead5188#commitcomment-40520912

pause


feat(core,product,category): use DaffCollection models

PR Checklist
Please check if your PR fulfills the following requirements:

[x] The commit message follows our guidelines: https://github.com/graycoreio/daffodil/blob/develop/CONTRIBUTING.md#commit
[x] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)

PR Type
What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

Does this PR introduce a breaking change?
[x] Yes
[ ] No

changed snaked_cased collection fields to camelCase
total_products -> count
product_ids -> ids

Other information

Rebase merged as e429279 and 04c9627