translate not working

I'm getting:

proxyConsole.js:56 Warning: Failed prop type: Invalid prop label supplied to FlatButtonLabel, expected a ReactNode.

And my code is as simple as:
import React from 'react';
import PropTypes from 'prop-types';
import {translate} from 'admin-on-rest';
import FileCloudUpload from 'material-ui/svg-icons/file/cloud-upload';
import FileCloudDone from 'material-ui/svg-icons/file/cloud-done';
import FlatButton from 'material-ui/FlatButton';

export class SheetButton extends React.Component {
  render() {
    return (
      <FlatButton primary label={this.renderLabel()} onClick={() => this.props.onPress()} icon={this.renderIcon()} />
    );
  }

  renderIcon() {
    return this.props.record.sheetId ? <FileCloudDone/> : <FileCloudUpload />;
  }

  renderLabel() {
    return translate(this.props.record.sheetId ? 'sheet.open' : 'sheet.generate');
  }
}

SheetButton.propTypes = {
  onPress: PropTypes.func.isRequired
};

I also tried this.context.translate but it doesn't exist.
My translations are very basic:
en.js:
{
  "sheet": {
    "open"    : "open",
    "generate": "generate"
  }
}

index.js
import en from './en';

export default {en};

I've set messages on the <Admin /> component, too. I checked and the content is what is expected.
I'm using this component in a list:
export const ResultList = (props) => (
  <List {...props} filters={<ResultFilter />}>
    <Datagrid>
      <TextField source="id" />
      <TextField source="name" />
      <DateField source="created" showTime />
      <NumberField source="sheetId" />
      <SheetButton />
    </Datagrid>
  </List>
);

translate is an Higher Order Component. It's not meant to be called directly like this. This HOC will add a translate function in your props.
import React from 'react';
import PropTypes from 'prop-types';
import {translate} from 'admin-on-rest';
import FileCloudUpload from 'material-ui/svg-icons/file/cloud-upload';
import FileCloudDone from 'material-ui/svg-icons/file/cloud-done';
import FlatButton from 'material-ui/FlatButton';

class SheetButton extends React.Component {
  render() {
    return (
      <FlatButton primary label={this.renderLabel()} onClick={() => this.props.onPress()} icon={this.renderIcon()} />
    );
  }

  renderIcon() {
    return this.props.record.sheetId ? <FileCloudDone/> : <FileCloudUpload />;
  }

  renderLabel() {
    return this.props.translate(this.props.record.sheetId ? 'sheet.open' : 'sheet.generate');
  }
}

SheetButton.propTypes = {
  onPress: PropTypes.func.isRequired
};

export default translate(SheetButton);

I feel dumb. Thanks.

Don't be :) By the way, please use Stack overflow next time before opening an issue here. We'd like to use GitHub only for bugs and feature requests and SO has a far better SEO which will make it easier for others to find this answer.

@djhi I'm familiar with the dance and I agree 👍 . I opened it here because I thought it was a bug. I might open up another issue (or PR) concerning this, because I like to maintain named exports. I think translate can be a service that works slightly different.

Important thing, you should import your class with (1)
import SheetButton from './SheetButton';

and NOT with (2)
import {SheetButton} from './SheetButton';

(1) statement will import your translate(SheetButton) class, extended with translate props, but the statement (2) will import SheetButton without translate props (you will have something like "Function translate is not defined" as exception).  I spent 3 hours not understanding what I did wrong. I hope this will help someone :) .


How to handle empty postcode?

The same as an invalid postcode?
The same as not having supplied a postcode in the first instance?
Something else?

Done, logic added in #61


[Bug] TypeError: Cannot read properties of undefined (reading 'envPrefix') at createViteServer /@storybook/builder-vite/dist/vite-server.js:29:72

What version of vite are you using?
4.0.0
System info and storybook versions
System:
OS: macOS 13.0
CPU: (8) arm64 Apple M2
Binaries:
Node: 16.19.0 - ~/.nvm/versions/node/v16.19.0/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.19.3 - ~/.nvm/versions/node/v16.19.0/bin/npm
Browsers:
Chrome: 110.0.5481.177
Safari: 16.1
npmPackages:
@storybook/addon-actions: ^6.5.16 => 6.5.16
@storybook/addon-essentials: ^6.5.16 => 6.5.16
@storybook/addon-interactions: ^6.5.16 => 6.5.16
@storybook/addon-links: ^6.5.16 => 6.5.16
@storybook/builder-vite: ^0.4.2 => 0.4.2
@storybook/testing-library: ^0.0.13 => 0.0.13
@storybook/vue3: ^6.5.16 => 6.5.16
Describe the Bug
Tried to run the storybook yarn storybook
Following occured:
yarn run v1.22.19
$ start-storybook -p 6006
info @storybook/vue3 v6.5.16
info
info => Loading presets
ERR! TypeError: Cannot read properties of undefined (reading 'envPrefix')
ERR!     at createViteServer (/private/var/www/michaelangelo/node_modules/@storybook/builder-vite/dist/vite-server.js:29:72)
ERR!     at async Object.start (/private/var/www/michaelangelo/node_modules/@storybook/builder-vite/dist/index.js:64:14)
ERR!     at async Promise.all (index 0)
ERR!     at async storybookDevServer (/private/var/www/michaelangelo/node_modules/@storybook/core-server/dist/cjs/dev-server.js:203:28)
ERR!     at async buildDevStandalone (/private/var/www/michaelangelo/node_modules/@storybook/core-server/dist/cjs/build-dev.js:120:31)
ERR!     at async buildDev (/private/var/www/michaelangelo/node_modules/@storybook/core-server/dist/cjs/build-dev.js:174:5)
ERR!  TypeError: Cannot read properties of undefined (reading 'envPrefix')
ERR!     at createViteServer (/private/var/www/michaelangelo/node_modules/@storybook/builder-vite/dist/vite-server.js:29:72)
ERR!     at async Object.start (/private/var/www/michaelangelo/node_modules/@storybook/builder-vite/dist/index.js:64:14)
ERR!     at async Promise.all (index 0)
ERR!     at async storybookDevServer (/private/var/www/michaelangelo/node_modules/@storybook/core-server/dist/cjs/dev-server.js:203:28)
ERR!     at async buildDevStandalone (/private/var/www/michaelangelo/node_modules/@storybook/core-server/dist/cjs/build-dev.js:120:31)
ERR!     at async buildDev (/private/var/www/michaelangelo/node_modules/@storybook/core-server/dist/cjs/build-dev.js:174:5)

WARN Broken build, fix the error above.
WARN You may need to refresh the browser.

info => Loading presets
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Tried removing node_modules and did npm i also tried with yarn install. All same results, no luck.
Following is my main.js file:
const path = require('path');

module.exports = {
  "stories": [
    "../src/**/*.stories.mdx",
    "../src/**/*.stories.@(js|jsx|ts|tsx)"
  ],
  "addons": [
    "@storybook/addon-links",
    "@storybook/addon-essentials",
    "@storybook/addon-interactions"
  ],
  "framework": "@storybook/vue3",
  "core": {
    "builder": "@storybook/builder-vite"
  },
  "features": {
    "storyStoreV7": true
  },
  async viteFinal(config, { configType }) {
    // `configType` has a value of 'DEVELOPMENT' or 'PRODUCTION'
    // You can change the configuration based on that.
    // 'PRODUCTION' is used when building the static version of storybook.
    config.resolve.alias['~storybook'] = path.resolve(__dirname);
    config.resolve.alias['@'] = path.resolve(__dirname, '..', 'src');

    config.css = {
      preprocessorOptions: {
        scss: { additionalData: `@import src/styles/main.scss;` },
      },
    };

    config.plugins = [
      ...config.plugins,
    ];
  },
}

I noticed if I comment out async viteFinal(), it will work.
Link to Minimal Reproducible Example
No response
Participation

[x] I am willing to submit a pull request for this issue.

Ah, yes that is most likely the cause, thanks for sharing, @Jack-Barry.
@kontibosun Please let us know if that doesn't solve your issue.

Ran into this a bit ago, needed to return config from the viteFinal function

OMG this worked! Thanks man!


{{MyField.htmlValue}} Output HTML as Text

Category

[x] Question
[ ] Bug
[ ] Enhancement

Expected or Desired Behavior
{{MyField.htmlValue}} Output HTML Code as HTML
Observed Behavior
{{MyField.htmlValue}} Output HTML Code as Text

if i use {{MyField.textValue}}

thanks for support and best regards
Ivo

Hi Ivo ;),
Handlebars HTML-escapes values returned by a {{expression}}. If you don't want Handlebars to escape a value, use the "triple-stash", {{{.
Try to use {{{MyField.htmlValue}}}
Viel Glück :)
Bruno


Add linter examples

Add linter examples for:

[ ] go
[ ] python
[ ] javascript (Eslint)
[ ] C#
[ ] C / C++
[ ] Java
[ ] Ruby
[ ] Scala
in a linter folders

@malomarrec just a note: most linters only report errors, they don't actually change or rewrite code. So running linters in a batch change might not make sense for all linters.

I was thinking of this in the line of: le'ts take eslint (--fix) and tflint, and run them. But if we don't find a linter that create fixes for a language we should definitely ignore it.


Testing, please ignore. (lvwqwt)

This is a bug bounty test. Please ignore.. Please DO NOT APPROVE THIS! (lvwqwt)

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


Build complains about missing .sbt/.credentials file

When building Magnum, running many sbt tasks (such as clean, compile, package &Etc) results in numerous warnings of the form:
Credentials file /home/user/.sbt/.credentials does not exist
I've observed that commenting out the build.sbt line
ThisBuild / credentials += Credentials(Path.userHome / ".sbt" / ".credentials")
silences the warnings while not affecting the success of the build.
Would I be correct in thinking that the .credentials file is only needed for publishing? If so, would it be possible to scope this setting to the "publish" task only?  If not, a less palatable work-around might be to push a sample .credentials file (with invalid creds obviously) that the Magnum hacker could copy to $HOME/.sbt/

Thanks for the issue. I've removed the credentials setting, since it can be set with an environment variable instead.


Unknown class VMaskTextField in interface builder file (using Pods installation)

I followed the installation guide, everything is fine, outlets setup, but when viewDidLoad gets called, it breaks with the following message:
"Unknown class VMaskTextField in interface builder file" -> I have defined the class for the textfield using Identity Inspector
I've deleted from the Pods and just paste the VMaskTextField class into my project. All config the same, then it works. So, I think it can be something related to the Pods.
Best Regards,
Sidan

Thanks man! I will verify this.


update gulp-sass, deps and associated code/css

I spent some time looking into this and it looks like gulp-sass and it dependencies (specifically node-sass, which is deprecated) were causing most of the issues I was experiencing with using a newer version of nodejs.
This commit bumps the gulp-sass version, adds dart-sass (sass), and sets this to the default processor for SASS in gulpfile.js.
It also complained about how some of the CSS files were structured, so I updated them too.
So, now I can get a local version of the site up and running without specifying that an older version of nodejs needs to be installed. Hopefully, it will work the same on your Mac 🤞

Sadly this isn't working for me. Still getting stuck on:
conda install -c conda-forge nodejs=14

which is returning:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - nodejs=14

Current channels:

  - https://conda.anaconda.org/conda-forge/osx-arm64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://conda.anaconda.org/bioconda/osx-arm64
  - https://conda.anaconda.org/bioconda/noarch
  - https://repo.anaconda.com/pkgs/main/osx-arm64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/osx-arm64
  - https://repo.anaconda.com/pkgs/r/noarch

Doing a bit of research, it seems to be a platform issue https://github.com/conda/conda/issues/13659. The issue with the advise mentioned using --platform option when creating the environment which doesn't even exist! 🤷♀
Digging some more and following advice from https://stackoverflow.com/questions/65415996/how-to-specify-the-architecture-or-platform-for-a-new-conda-environment-apple
I used:
CONDA_SUBDIR=osx-arm64 conda create -n reprohack python=3.8 -c conda-forge --override-channels

conda config --env --set subdir osx-arm64

To create an osx-arm64 environment.
Got same problem:
PackagesNotFoundError: The following packages are not available from current channels:

  - nodejs=14

Current channels:

  - https://conda.anaconda.org/conda-forge/osx-arm64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://conda.anaconda.org/bioconda/osx-arm64
  - https://conda.anaconda.org/bioconda/noarch
  - https://repo.anaconda.com/pkgs/main/osx-arm64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/osx-arm64
  - https://repo.anaconda.com/pkgs/r/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

In the end, I changed to
conda install conda-forge::nodejs

and managed to get it all working


add the percentage ChiSquareSelector feature

What changes were proposed in this pull request?
add the percentage ChiSquareSelector feature
How was this patch tested?
add scala ut

LGTM in code style wide, except a minor issue.


Deploy btn should be disabled when at least 1 item is not selected and its image tag is not chosen


Error due to having only one iteration done?

Hi all,
I had a few galaxies where only one iteration was done for the first run. So when I ran dynamite again I got this error:

Using DYNAMITE version: 3.0.0
Located at: ['/home/gsantucc/.local/lib/python3.8/site-packages/dynamite-3.0.0-py3.8.egg/dynamite']
Starting galaxy 16791969
<class 'dynamite.physical_system.System'>
<class 'dynamite.config_reader.Settings'>
m-bh         a-bh f-dh      q-stars       p-stars u-stars         ml

125338987.46781121 1e-06 10.0 0.5987431772592958    0.99  0.9999 2.9693735398325796
1 kinematics data sets in system
Traceback (most recent call last):
File "run_dyn.py", line 123, in
run_user_test(gal)
File "run_dyn.py", line 65, in run_user_test
smi = dyn.model_iterator.ModelIterator(config=c)
File "/home/gsantucc/.local/lib/python3.8/site-packages/dynamite-3.0.0-py3.8.egg/dynamite/model_iterator.py", line 92, in init
status = model_inner_iterator.run_iteration()
File "/home/gsantucc/.local/lib/python3.8/site-packages/dynamite-3.0.0-py3.8.egg/dynamite/model_iterator.py", line 496, in run_iteration
self.par_generator.generate(current_models=self.all_models)
File "/home/gsantucc/.local/lib/python3.8/site-packages/dynamite-3.0.0-py3.8.egg/dynamite/parameter_space.py", line 451, in generate
self.check_stopping_critera()
File "/home/gsantucc/.local/lib/python3.8/site-packages/dynamite-3.0.0-py3.8.egg/dynamite/parameter_space.py", line 545, in check_stopping_critera
self.check_specific_stopping_critera()
File "/home/gsantucc/.local/lib/python3.8/site-packages/dynamite-3.0.0-py3.8.egg/dynamite/parameter_space.py", line 595, in check_specific_stopping_critera
previous_chi2 = np.nanmin(models1[self.chi2])
File "<array_function internals>", line 180, in nanmin
File "/home/gsantucc/.local/lib/python3.8/site-packages/numpy-1.23.2-py3.8-linux-x86_64.egg/numpy/lib/nanfunctions.py", line 350, in nanmin
res = np.amin(a, axis=axis, out=out, **kwargs)
File "<array_function internals>", line 180, in amin
File "/home/gsantucc/.local/lib/python3.8/site-packages/numpy-1.23.2-py3.8-linux-x86_64.egg/numpy/core/fromnumeric.py", line 2918, in amin
return _wrapreduction(a, np.minimum, 'min', axis, None, out,
File "/home/gsantucc/.local/lib/python3.8/site-packages/numpy-1.23.2-py3.8-linux-x86_64.egg/numpy/core/fromnumeric.py", line 84, in _wrapreduction
return reduction(axis=axis, out=out, **passkwargs)
File "/home/gsantucc/.local/lib/python3.8/site-packages/numpy-1.23.2-py3.8-linux-x86_64.egg/numpy/core/_methods.py", line 44, in _amin
return umr_minimum(a, axis, None, out, keepdims, initial, where)
ValueError: zero-size array to reduction operation minimum which has no identity

This is because in "check_specific_stopping_critera" (in parameter_space.py), line 588 makes last_iter=0 (since the previous one was 1) and it is not stopped by " if last_iter < 0: return" in line 592/593. Since there is no iter 0, the masked models table is empty and I get the error.
Modifying "if last_iter < 0" to "if last_iter <= 0" (same as line 584) fixed the error for me.

Hi @gsantucci90,
many thanks for bringing this up :-)
Carefully looking at check_specific_stopping_criteria() it should work with "if last_iter < 0" because last_iter=0 should result in a nonzero mask because running DYNAMITE again will read the which_iter=0 entries in the all_models table and will compare the chi2 values from that iteration with the new ones... But it does not work...
My guess is that probably it may be connected to the model iterator that combines iterations 0 and 1 into one run incrementing the iteration counter by 2 in the beginning, but that does not explain why your example works with "if last_iter <= 0" in line 592...
Another guess: more users will have the problem continuing after a one-iteration run. Could you perhaps share a (small orblib for short running time...) example via Slack so we can debug?
Many thanks and cheers,
Thomas
Side note: also, we may have to revisit check_specific_stopping_criteria() in a future development meeting to make sure it works as intended in case there are iterations that result in all chi2=nan...

Closed due to inactivity - please feel free to reopen/create a new issue if the problem comes back to life.


ROX-14945: make random names more random

Description
Judging from the failure described in the ticket, 16 bit $RANDOM can repeat in a single CI run. Try and make this less likely.
Checklist

[ ] Investigated and inspected CI test results
[x] ~Unit test and regression tests added~
[x] ~Evaluated and added CHANGELOG entry if required~
[x] ~Determined and documented upgrade steps~
[x] ~Documented user facing changes (create PR based on openshift/openshift-docs and merge into rhacs-docs)~

Testing Performed
CI should be sufficient. I'll trigger optional jobs since I'm not sure in what cases this is used.

/test help

/test aro-qa-e2e-tests
/test eks-qa-e2e-tests
/test gke-kernel-qa-e2e-tests
/test gke-postgres-scale-tests
/test gke-postgres-ui-e2e-tests
/test gke-postgres-upgrade-tests
/test gke-race-condition-qa-e2e-tests
/test gke-scale-tests
/test gke-ui-e2e-tests
/test gke-upgrade-tests
/test gke-version-compatibility-tests
/test ocp-4-11-operator-e2e-tests
/test ocp-4-11-qa-e2e-tests
/test ocp-4-12-operator-e2e-tests
/test ocp-4-12-qa-e2e-tests
/test ocp-4-12-ui-e2e-tests
/test ocp-4-6-operator-e2e-tests
/test ocp-4-6-qa-e2e-tests
/test ocp-4-8-operator-e2e-tests
/test ocp-4-8-qa-e2e-tests
/test ocp-next-operator-e2e-tests
/test ocp-next-qa-e2e-tests
/test ocp-next-ui-e2e-tests
/test osd-aws-qa-e2e-tests
/test osd-gcp-qa-e2e-tests
/test rosa-qa-e2e-tests


Search by multiple environmental variables

 Issue by stefelisabeth
Thursday Aug 14, 2014 at 13:37 GMT
Originally opened as https://github.com/NESCent/dplace/issues/125

The results only seem to display the most recently selected environmental variable.  However, all cultural variables that have been selected are displayed.  If it is possible to display multiple environmental variables this may be very informative.

on maps and tables


reform_Rv2_train_noR.json, new_R.json

Hi, Thank you for your wonderful work.
I want to run this code, but I don't know where the below files are.
reform_Rv2_train_noR.json, new_R.json
https://github.com/SooLab/DDCOT/blob/5f403372d1a8f0ab4ad785c2674fa64b71a1e2fe/utils_data.py#L245

Hi, Thank you for your wonderful work.
I want to run this code, but I don't know where the below files are. reform_Rv2_train_noR.json, new_R.json
https://github.com/SooLab/DDCOT/blob/5f403372d1a8f0ab4ad785c2674fa64b71a1e2fe/utils_data.py#L245

Sorry for the mistakes in file names. We have updated the utils_data.py and fix these typos.


Private Partition: Merkle Set

Ported from https://github.com/fission-suite/webnative/issues/310

https://whitepaper.fission.codes/file-system/partitions/private-directories/data-layer#secure-content-prefix-tree
Especially with #301 (immutable core), the
Sync is network-bound, and the private partition evenly distributes data by design. While we're waiting for GraphSync to be production ready, the easily solution to improving performance is to flatten the structure. A 1024-weighted HAMT (i.e. 128-byte bitmask headers) hits a sweet spot efficiently getting a node to queryabile sync in few round trips and overhead.

[ ] Lay out as HAMT BLOCKED on exact data structure @matheus23 & @expede
[ ] https://github.com/WebNativeFileSystem/rs-wnfs/issues/25

Linking internal discussion: https://talk.fission.codes/t/hamtlet-to-use-or-not-to-use/2702/24


support for fractional per core batch size

@zhangqiaorjc please review this change to support per core batch size < 1 with the synthetic dataset.

Is this still needed?


⚠ GitLab Server has degraded performance

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

HTTP code: 200
Response time: 13452 ms

Resolved: GitLab Server performance has improved in 5e98a21.


Update IDL instructions to use Account instead of ProgramAccount

Starting to look more into removing deprecated accounts types like ProgramAccount and one of the places it still features prominently in lang is in the IDL functions.

Actually this is a much bigger issue. There is ProgramAccount and other deprecated accounts in lots of the existing tests. I feel like i would really like to come up with a master list of what tests actually need to be run and make sure that we have all of the core functionality covered.


Use more standard way of invoking Struct

Usually command line tools are used like pod install or xcake make and flags are used for options.
We should adjust struct to be struct generate --flags instead of struct --generate

Sounds good, @jcampbell05 I propose supporting both for now, and raising a warning regarding the old invocation style being deprecated. We can then remove this in the next major version.


disabled ripple in buttons are still rendered in the DOM, taking up memory

Bug, feature request, or proposal:
When using [disableRipple] on mat-button, the ripple effect is indeed disabled, but the ripple DOM element is still rendered. Since the CSS of ripple elements is position: absolute, each ripple instance is elevated to its own layer. Each layer consumes +15KB of memory. This is waste of precious browser memory. Sometimes there is an additional layer created to deal with overlapping elements, taking yet more memory. I exemplify below.
What is the expected behavior?
.mat-ripple elements should not be rendered in the DOM when [disableRipple] is set to true
What is the current behavior?
.mat-ripple elements are rendered in the DOM and consume memory
What are the steps to reproduce?
Set a mat-button to disable ripple effect using  [disableRipple]="true". Open Chrome or Safari's devTools and go to Layers panel. Inspect the button and see that its ripple is present, and is elevated to its own layer. See in the bottom panel how much memory that layer consumes.
What is the use-case or motivation for changing an existing behavior?
Improve performance
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Material 6.3.3, Angular 6.0.4
Example
I attached example images showing a list of 5 items, each has a button with ripple disabled. 5 x ~20KB is roughly 100KB of browser memory taken for nothing.
Material ripple layers as is

Material ripple layers, with  position: absolute removed

We had a related discussion about this in one my PRs. See https://github.com/angular/material2/pull/8864. There should be a discussion about this before we start going on specific way.

Events overhead aside, there's also a browser memory overhead, when disabled ripple elements remain in the DOM, as explained above. The short of it is that every ripple elements is painted on it's own DOM layer, bulking up the memory. Therefore ,disabled ripples should at least have their position: absolute changed to position: unset in order to spare the extra layers.

I have the same issue like @bsteffl

Closing this since we don't plan to change the ripple specifically for this. As we continue to align our implementation with MDC, I do expect to see more changes to the ripple rendering, though.


APP-597: Zeppelin data analytics pasted into Data collection bundle. [2.1]

@kaa-leeroy test this please


Unable to open the camera, provide permission to access the camera

Hi.
I can not run the app on my phone.
The message "Unable to open the camera, provide permission to access the camera" appears.
How do I give permission on my cell phone?

@flaviomacias18 Clear cache your qrcodescan site. And give it try

@gokulkrishh The problem is HTTPS. I was running on the HTTP server. Tks.

@flaviomacias18 Site will automatically redirect from http to https. Good to know 👍. Closing the issue now. Thanks


Downloading files

For downloading files from the server triggered by the download attribute of the HTML a tag we need some kind of logic.
Look at the express https://expressjs.com/en/api.html#res.download function, and find out how to set the correct headers.
For external files, we need to download the file first:
const http = require('http'); // or 'https' for https:// URLs
const fs = require('fs');

const file = fs.createWriteStream("file.jpg");
const request = http.get("http://i3.ytimg.com/vi/J---aiyznGQ/mqdefault.jpg", function(response) {
   response.pipe(file);

   // after download completed close filestream
   file.on("finish", () => {
       file.close();
       console.log("Download Completed");
   });
});

Implemented in furu: return $.res.download(url)


Default values missing

It would be helpful to know what for instance the default value for COMPlus_GCHeapHardLimitPercent is

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

ID: e544aba5-cfe6-1790-023e-bec738182ea8
Version Independent ID: 8392a21a-8404-d352-ffb1-d6373bbbdd1b
Content: Garbage collector config settings - .NET Core
Content Source: docs/core/run-time-config/garbage-collector.md
Product: dotnet-core
GitHub Login: @gewarren
Microsoft Alias: gewarren

@Maoni0 Is there a default value for COMPlus_GCHeapHardLimitPercent and COMPlus_GCHeapHardLimit?

ahh yes we should explain this in our doc. I did write the description in the PR. would this be sufficient to adapt into the doc form?

@Maoni0 Thanks, yes, that should be enough info for me to update the article.


Component Sass public mixins

Summary
If each component had a public mixin, then those components could be included in inline theme definitions.
Justification
Most, but not all, components have private mixins used by the feature flag, e.g. button() and button--x().
Here's an example of defining inline themes where you'd want to call component mixins.
@import '../node_modules/carbon-components/scss/global/styles.scss';

.my-inline-theme {
  $interactive-03: pink;
  @include accordion--x;
  @include button--x;
}

But, since the --x mixins are private because they are temporary, this would cause a future breaking change.
This issue originated from the RFC to better support inline (zoned) theming where one theme can live inside another theme. https://github.com/IBM/carbon-components/pull/1872
Desired behavior
It'd be nice to have public entry points like:
@import '../node_modules/carbon-components/scss/global/styles.scss';

.my-inline-theme {
  $interactive-03: pink;
  @include accordion;
  @include button;
}

Instead of authoring a component like:
// private
@mixin accordion {}

// private
@mixin accordion--x {}

@include exports('accordion') {
  @if feature-flag-enabled('components-x') {
    @include accordion--x;
  } @else {
    @include accordion;
  }
}

Move the feature flag inside a public entry mixin.
// private
@mixin accordion--stable {}

// private
@mixin accordion--x {}

// public
@mixin accordion {
  @if feature-flag-enabled('components-x') {
    @include accordion--x;
  } @else {
    @include accordion--stable;
  }
}

@include exports('accordion') {
  @include accordion;
}

If a component doesn't have experimental changes, all good. You'd keep the public mixin and have no private mixins. E.g.:
// public
@mixin accordion {
  // styles here
}

@include exports('accordion') {
  @include accordion;
}

There have also been requests to move all mixins to dedicated mixin files so when you import and use these mixins without the automatic includeing the component. That means each component's "index" SCSS file imports its mixins and provides the @include exports declaration so you could use the mixins without generating CSS from the export.
To do

Every component to have a public entrypoint mixin
All mixins live in separate files from where they are initially included
Also create public mixins for where colors are set (e.g. body background color, default type colors) so you can also safely redefine those in inline themes

Thank you for entering this @mattrosno!

Also create public mixins for where colors are set (e.g. body background color, default type colors) so you can also safely redefine those in inline themes

I think this would worth another RFC.
Also from https://github.com/IBM/carbon-components/pull/1872#issuecomment-470391246 so below won't be lost:

Should the component mixin take a theme token map as an optional argument, defaulting to the one of the applied theme?

@asudoh see PR. The body mixin is only non-component place that we'd want a public mixin for inline theming purposes.

Should the component mixin take a theme token map as an optional argument, defaulting to the one of the applied theme?

@asudoh components use variables that come from many sources: global variables, component variables, @carbon/colors, @carbon/themes, etc. If this question is about creating inline themes - I wouldn't want to limit inline themes to just include @carbon/themes token map changes. I don't see the need to pass a theme token map into component mixins.

@asudoh components use variables that come from many sources: global variables, component variables, @carbon/colors, @carbon/themes, etc.

I think you brought up a great point here; Less reliance on global variables, for example, an argument being a source of truth instead of having an unlimited possible sources, makes the code more maintainable/testable. That's why I brought up this topic. Such pattern can be found e.g. at https://github.com/IBM/carbon-elements/blob/v0.0.1-beta.1/packages/layout/scss/_breakpoint.scss#L181-L185.

This is not stale.  The ability for inline-theming blocks WH from upgrading to Carbon X

Not stale.

Not stale


Remove JedisClusterCrossSlotException

because there are no usage. These kind of errors are prevented by JedisClusterCommand.

@HeartSaVioR @marcosnils

Merged into master.


feat(cache): introduce LruCacheEventListener to subscribe erasure and eviction

What's changed and what's your intention?
Introduce trait LruCacheEventListener to subscribe erasure and eviction.
pub trait LruCacheEventListener: Send + Sync {
    type K: LruKey;
    type T: LruValue;

    /// `on_evict` is called when a cache entry is evicted by a new inserted entry.
    fn on_evict(&self, _key: &Self::K, _value: &Self::T) {}

    /// `on_erase` is called when a cache entry is removed by calling `erase`.
    fn on_erase(&self, _key: &Self::K, _value: &Self::T) {}
}

Checklist

[x] I have written necessary docs and comments
[x] I have added necessary unit tests and integration tests
[x] All checks passed in ./risedev check (or alias, ./risedev c)

Refer to a related PR or issue link (optional)
#198

Found a case not covered, change to draft.

@wenym1 Generally LGTM. In real use case, what will be done in the on_erase and on_evict?

They are mainly designed for tiered cache:

When on_erase is called (maybe by compaction listener after a compaction finished), the underlying tiers of caches will also erase the cache entry.
When on_evict is called, the underlying tiers of caches will try to insert the evicted entry if needed.

@Little-Wallace PTAL


Bug: Files unable to eject external drives

Description
No option to eject the drive anywhere
Steps To Reproduce
Plug in external drive
attempt to eject it via Files
Requirements
Fix it so that you are able to eject external drives with a button
Files Version
<IP_ADDRESS>
Windows Version
Windows 10
User ID
fc529297-c526-4a5a-bd5c-eedd41429622
Log File
debug.log

This is a feature in Files; I think this issue is a duplicate of #10154.

Thanks for the feedback, We're tracking this in #10154. You can check there or click subscribe in the right sidebar for updates.


Time per day chart should work correctly when all entries have duration=0

This is what happens in those situations:

Is this the desired behaviour?
If so, I can make a PR for my fix.

@Esinko no, ”None” should be at the bottom. The top value should probably be 1 hour with 10 minute increments


Fields that expect an array get null (rather than left blank) when given empty content.

An empty 'cell' in the .csv import for a related_film column (fieldtype: entries) will create an array with null.
related_film:
  - null

The expected result should be the field is skipped in the import.
The problem with the null is that it breaks (is that the right term??) the field in the CP.

Should be fixed in 1.2.1!

Only just getting a chance to test this and unfortunately I'm still seeing the issue.
Example .csv content:
blueprint,title,still_image,related_film,digital_formats
stills,_Test import 01,_test-card-01.png,,jpg|tiff

Resulting .md content file:
---
id: 3099d691-6bdc-4cf6-854f-314488fe60dc
blueprint: stills
title: '_Test import 01'
still_image: _test-card-01.png
related_film:
  - ''
digital_formats:
  - jpg
  - tiff
---

FYI
statamic/cms: v3.3.12
rias/statamic-data-import 1.2.1
Could share a private repo if that helps.

The value was "" and not null, so that was causing it, should be fixed in 1.2.2


Unable to sync after upgrade

just upgraded to the latest update and it's throwing a bunch of warnings and never catching up
I am running into this warning and it's just counting down L1 block if i leave it to get to 0 it will take a couple years
t=2024-05-06T23:52:22+0000 lvl=info msg="Walking back L1Block by hash" curr=0x642778123c963e826fc06e90dfad13fed1cc87de633be4a4b7215d6d73822707:19709592 next=

i have same issue

same issue

it can sync after downgrade op-node to v1.7.1.
Optimism changed a lot of things including blobs and fault proof between v1.7.1 and v1.7.5.

t=2024-05-07T22:29:58+0000 lvl=warn msg="Derivation process temporary error" attempts=3911 err="engine stage failed: temp: failed to fetch blobs: failed to get blob sidecars for L1BlockRef 0x56df86f88d654cfca4a7e72151e61789b84906e8b77a9f720b27ccf3fcc3f000:19521297: failed to fetch blob sidecars for slot 8722070 block 0x56df86f88d654cfca4a7e72151e61789b84906e8b77a9f720b27ccf3fcc3f000:19521297: failed request with status 500: {"code":500,"message":"block not found"}"
Now I am getting these errors, good god.

it can sync after downgrade op-node to v1.7.1. there are a lot of changes in optimism like blob, snap sync, fault proof between v1.7.1 and v1.7.5.

tried this and it didn't work unfortunately.

I updated a node and now have this
eth-1  | INFO [05-08|08:52:17.380] Loaded most recent local block           number=14,184,271 hash=b88684..b42135 td=0 age=7m28s
geth-1  | INFO [05-08|08:52:17.380] Loaded most recent local finalized block number=14,183,720 hash=55d9d8..9e48ab td=0 age=25m50s
geth-1  | WARN [05-08|08:52:17.382] Head state missing, repairing            number=14,184,271 hash=b88684..b42135 snaproot=614833..66c538

How long need to wait?

I updated a node and now have this
eth-1  | INFO [05-08|08:52:17.380] Loaded most recent local block           number=14,184,271 hash=b88684..b42135 td=0 age=7m28s
geth-1  | INFO [05-08|08:52:17.380] Loaded most recent local finalized block number=14,183,720 hash=55d9d8..9e48ab td=0 age=25m50s
geth-1  | WARN [05-08|08:52:17.382] Head state missing, repairing            number=14,184,271 hash=b88684..b42135 snaproot=614833..66c538

How long need to wait?

Give it a week at most
If it doesn’t get solved just scrap your data I guess

node-geth-1  | INFO [05-09|01:37:05.900] Aborting state snapshot generation       root=1a9ed5..5e9a6c in=be67e4..e9fca9 at=6ef3ef..a08802 accounts=50,281,878           slots=249,458,569          storage=20.61GiB   dangling=0 elapsed=45m40.536s   eta=15m44.105s node-geth-1  | INFO [05-09|01:37:05.903] Resuming state snapshot generation       root=e1aedd..549099 in=be67e4..e9fca9 at=6ef3ef..a08802 accounts=50,281,878           slots=249,458,569          storage=20.61GiB   dangling=0 elapsed=45m40.539s   eta=15m44.106s node-geth-1  | INFO [05-09|01:37:05.912] Imported new potential chain segment     number=14,214,639 hash=4f03e3..d4a901 blocks=1         txs=48          mgas=5.597   elapsed=65.346ms     mgasps=85.646  snapdiffs=167.92KiB triedirty=310.61MiB node-geth-1  | INFO [05-09|01:37:05.915] Chain head was updated                   number=14,214,639 hash=4f03e3..d4a901 root=a0b0d7..fea78f elapsed=2.936935ms node-node-1  | t=2024-05-09T01:37:05+0000 lvl=info msg="Sync progress" reason="unsafe payload from sequencer" l2_finalized=0x2fbafacdebe4ac05e6e9e496a4ef73994930a44a63c6ad33fadfd9858d731101:14214097 l2_safe=0x3a495006a3f2124aee710c4a395ba64af907933b19a1a31955a031b1524c9b28:14214549 l2_pending_safe=0x3a495006a3f2124aee710c4a395ba64af907933b19a1a31955a031b1524c9b28:14214549 l2_unsafe=0x4f03e3e132983523f855da6a025e5146d0e2df315b7e6aba1bb552e48dd4a901:14214639 l2_backup_unsafe=0x0000000000000000000000000000000000000000000000000000000000000000:0 l2_time=1715218625 l1_derived=0x6a557136e2569f92acdcdb8c946f5de5d5b3a83f002a69c7e5776abf091f425b:19829248 node-node-1  | t=2024-05-09T01:37:05+0000 lvl=debug msg="Derivation process step" onto_origin=0x6a557136e2569f92acdcdb8c946f5de5d5b3a83f002a69c7e5776abf091f425b:19829248 attempts=0 node-node-1  | t=2024-05-09T01:37:05+0000 lvl=debug msg="can't find next L1 block info (yet)" number=19829249 origin=0x6a557136e2569f92acdcdb8c946f5de5d5b3a83f002a69c7e5776abf091f425b:19829248 node-node-1  | t=2024-05-09T01:37:05+0000 lvl=debug msg="Derivation process went idle" progress=0x6a557136e2569f92acdcdb8c946f5de5d5b3a83f002a69c7e5776abf091f425b:19829248 err=EOF node-node-1  | t=2024-05-09T01:37:07+0000 lvl=debug msg="validated blockv3" topic=blocksV3 result=ACCEPT from=16Uiu2HAmSYvBi6hczyhZaM41q2bjqxPUnquCxm1CBX4MKahMezC4 node-node-1  | t=2024-05-09T01:37:07+0000 lvl=info msg="Received signed execution payload from p2p" id=0x5b9fdd3b6cef7bb97e4018710cd6e8fccdf81eb194f2e5ccb3c54403e42c5842:14214640 peer=16Uiu2HAmSYvBi6hczyhZaM41q2bjqxPUnquCxm1CBX4MKahMezC4 node-node-1  | t=2024-05-09T01:37:07+0000 lvl=info msg="Optimistically queueing unsafe L2 execution payload" id=0x5b9fdd3b6cef7bb97e4018710cd6e8fccdf81eb194f2e5ccb3c54403e42c5842:14214640 node-node-1  | t=2024-05-09T01:37:07+0000 lvl=debug msg="Derivation process step" onto_origin=0x6a557136e2569f92acdcdb8c946f5de5d5b3a83f002a69c7e5776abf091f425b:19829248 attempts=0 node-geth-1  | INFO [05-09|01:37:07.710] Aborting state snapshot generation       root=e1aedd..549099 in=be67e4..e9fca9 at=6f49f8..c0adf9 accounts=50,281,878           slots=249,795,466          storage=20.63GiB   dangling=0 elapsed=45m42.345s   eta=15m44.728s node-geth-1  | INFO [05-09|01:37:07.713] Resuming state snapshot generation       root=4aab8d..7e2a17 in=be67e4..e9fca9 at=6f49f8..c0adf9 accounts=50,281,878           slots=249,795,466          storage=20.63GiB   dangling=0 elapsed=45m42.348s   eta=15m44.729s node-geth-1  | INFO [05-09|01:37:07.722] Imported new potential chain segment     number=14,214,640 hash=5b9fdd..2c5842 blocks=1         txs=47          mgas=7.576   elapsed=123.701ms    mgasps=61.245  snapdiffs=159.73KiB triedirty=310.61MiB node-geth-1  | INFO [05-09|01:37:07.727] Chain head was updated                   number=14,214,640 hash=5b9fdd..2c5842 root=5d0d81..8190c6 elapsed=3.52953ms node-node-1  | t=2024-05-09T01:37:07+0000 lvl=info msg="Sync progress" reason="unsafe payload from sequencer" l2_finalized=0x2fbafacdebe4ac05e6e9e496a4ef73994930a44a63c6ad33fadfd9858d731101:14214097 l2_safe=0x3a495006a3f2124aee710c4a395ba64af907933b19a1a31955a031b1524c9b28:14214549 l2_pending_safe=0x3a495006a3f2124aee710c4a395ba64af907933b19a1a31955a031b1524c9b28:14214549 l2_unsafe=0x5b9fdd3b6cef7bb97e4018710cd6e8fccdf81eb194f2e5ccb3c54403e42c5842:14214640 l2_backup_unsafe=0x0000000000000000000000000000000000000000000000000000000000000000:0 l2_time=1715218627 l1_derived=0x6a557136e2569f92acdcdb8c946f5de5d5b3a83f002a69c7e5776abf091f425b:19829248 node-node-1  | t=2024-05-09T01:37:07+0000 lvl=debug msg="Derivation process step" onto_origin=0x6a557136e2569f92acdcdb8c946f5de5d5b3a83f002a69c7e5776abf091f425b:19829248 attempts=0 node-node-1  | t=2024-05-09T01:37:07+0000 lvl=debug msg="can't find next L1 block info (yet)" number=19829249 origin=0x6a557136e2569f92acdcdb8c946f5de5d5b3a83f002a69c7e5776abf091f425b:19829248 node-node-1  | t=2024-05-09T01:37:07+0000 lvl=debug msg="Derivation process went idle" progress=0x6a557136e2569f92acdcdb8c946f5de5d5b3a83f002a69c7e5776abf091f425b:19829248 err=EOF node-node-1  | t=2024-05-09T01:37:07+0000 lvl=debug msg="peering tick" connected=25 advertised_udp=9222 advertised_tcp=9222 advertised_ip=<IP_ADDRESS> node-node-1  | t=2024-05-09T01:37:07+0000 lvl=debug msg="discovered peer" peer=16Uiu2HAm6SPCMiTW6fAw6JaYtj2hhGowE4ShXpMmHAGVFyF9YKEM nodeID=a914b68bb62198c22a205d515484bcce16946710dc5cdb7ba7979ddc00c33880 addr=/ip4/<IP_ADDRESS>/tcp/9222 node-node-1  | t=2024-05-09T01:37:09+0000 lvl=debug msg="validated blockv3" topic=blocksV3 result=ACCEPT from=16Uiu2HAmGNDrgPDErfq4FEgLRjnASJYtpm8FP5AG3PmqLuEPqgxE node-node-1  | t=2024-05-09T01:37:09+0000 lvl=info msg="Received signed execution payload from p2p" id=0xf467918f43f50414718d2cee3c7cb272a53e096a0eea22f551b9552d18cd18ad:14214641 peer=16Uiu2HAmGNDrgPDErfq4FEgLRjnASJYtpm8FP5AG3PmqLuEPqgxE node-node-1  | t=2024-05-09T01:37:09+0000 lvl=info msg="Optimistically queueing unsafe L2 execution payload" id=0xf467918f43f50414718d2cee3c7cb272a53e096a0eea22f551b9552d18cd18ad:14214641 node-node-1  | t=2024-05-09T01:37:09+0000 lvl=debug msg="Derivation process step" onto_origin=0x6a557136e2569f92acdcdb8c946f5de5d5b3a83f002a69c7e5776abf091f425b:19829248 attempts=0 node-geth-1  | INFO [05-09|01:37:09.615] Aborting state snapshot generation       root=4aab8d..7e2a17 in=be67e4..e9fca9 at=6fa33e..be95dd accounts=50,281,878           slots=250,144,651          storage=20.66GiB   dangling=0 elapsed=45m44.251s   eta=15m45.385s node-geth-1  | INFO [05-09|01:37:09.618] Resuming state snapshot generation       root=f42fcf..68b013 in=be67e4..e9fca9 at=6fa33e..be95dd accounts=50,281,878           slots=250,144,651          storage=20.66GiB   dangling=0 elapsed=45m44.254s   eta=15m45.386s node-geth-1  | INFO [05-09|01:37:09.627] Imported new potential chain segment     number=14,214,641 hash=f46791..cd18ad blocks=1         txs=40          mgas=4.848   elapsed=56.611ms     mgasps=85.644  snapdiffs=150.34KiB triedirty=310.47MiB node-geth-1  | INFO [05-09|01:37:09.631] Chain head was updated                   number=14,214,641 hash=f46791..cd18ad root=15258e..dee7fb elapsed=3.323748ms node-node-1  | t=2024-05-09T01:37:09+0000 lvl=info msg="Sync progress" reason="unsafe payload from sequencer" l2_finalized=0x2fbafacdebe4ac05e6e9e496a4ef73994930a44a63c6ad33fadfd9858d731101:14214097 l2_safe=0x3a495006a3f2124aee710c4a395ba64af907933b19a1a31955a031b1524c9b28:14214549 l2_pending_safe=0x3a495006a3f2124aee710c4a395ba64af907933b19a1a31955a031b1524c9b28:14214549 l2_unsafe=0xf467918f43f50414718d2cee3c7cb272a53e096a0eea22f551b9552d18cd18ad:14214641 l2_backup_unsafe=0x0000000000000000000000000000000000000000000000000000000000000000:0 l2_time=1715218629 l1_derived=0x6a557136e2569f92acdcdb8c946f5de5d5b3a83f002a69c7e5776abf091f425b:19829248 node-node-1  | t=2024-05-09T01:37:09+0000 lvl=debug msg="Derivation process step" onto_origin=0x6a557136e2569f92acdcdb8c946f5de5d5b3a83f002a69c7e5776abf091f425b:19829248 attempts=0 node-node-1  | t=2024-05-09T01:37:09+0000 lvl=debug msg="can't find next L1 block info (yet)" number=19829249 origin=0x6a557136e2569f92acdcdb8c946f5de5d5b3a83f002a69c7e5776abf091f425b:19829248 node-node-1  | t=2024-05-09T01:37:09+0000 lvl=debug msg="Derivation process went idle" progress=0x6a557136e2569f92acdcdb8c946f5de5d5b3a83f002a69c7e5776abf091f425b:19829248 err=EOF
with no data and a sync from scratch, here's what I'm getting. Should this actually sync? or do we need to start at a snapshot and wait the 15 hours to head?

i have same issue:
ERROR[05-10|05:32:47.226] Failed to create sealing context         err="missing trie node e4aa34997d564704f80bff7623f3bbccbd8331f4cafba1edbaecbbd5e698f984 (path ) state 0xe4aa34997d564704f80bff7623f3bbccbd8331f4cafba1edbaecbbd5e698f984 is not available, not found"
ERROR[05-10|05:32:47.226] Failed to build payload                  err="missing trie node e4aa34997d564704f80bff7623f3bbccbd8331f4cafba1edbaecbbd5e698f984 (path ) state 0xe4aa34997d564704f80bff7623f3bbccbd8331f4cafba1edbaecbbd5e698f984 is not available, not found"
WARN [05-10|05:32:47.226] Served engine_forkchoiceUpdatedV3        reqid=45726 duration=1.58685ms    err="Invalid payload attributes" errdata="{Error:missing trie node e4aa34997d564704f80bff7623f3bbccbd8331f4cafba1edbaecbbd5e698f984 (path ) state 0xe4aa34997d564704f80bff7623f3bbccbd8331f4cafba1edbaecbbd5e698f984 is not available, not found}"

i have same issue:
ERROR[05-10|05:32:47.226] Failed to create sealing context         err="missing trie node e4aa34997d564704f80bff7623f3bbccbd8331f4cafba1edbaecbbd5e698f984 (path ) state 0xe4aa34997d564704f80bff7623f3bbccbd8331f4cafba1edbaecbbd5e698f984 is not available, not found"
ERROR[05-10|05:32:47.226] Failed to build payload                  err="missing trie node e4aa34997d564704f80bff7623f3bbccbd8331f4cafba1edbaecbbd5e698f984 (path ) state 0xe4aa34997d564704f80bff7623f3bbccbd8331f4cafba1edbaecbbd5e698f984 is not available, not found"
WARN [05-10|05:32:47.226] Served engine_forkchoiceUpdatedV3        reqid=45726 duration=1.58685ms    err="Invalid payload attributes" errdata="{Error:missing trie node e4aa34997d564704f80bff7623f3bbccbd8331f4cafba1edbaecbbd5e698f984 (path ) state 0xe4aa34997d564704f80bff7623f3bbccbd8331f4cafba1edbaecbbd5e698f984 is not available, not found}"

did you find a solution?

Good news

I had the same problem today when upgrading to v0.8.3. I tried going back to the old version v0.8.2 but it still didn't work.

facing same issue, was trying to sync and now its stuck on an endless loop.

t=2024-05-07T22:29:58+0000 lvl=warn msg="Derivation process temporary error" attempts=3911 err="engine stage failed: temp: failed to fetch blobs: failed to get blob sidecars for L1BlockRef 0x56df86f88d654cfca4a7e72151e61789b84906e8b77a9f720b27ccf3fcc3f000:19521297: failed to fetch blob sidecars for slot 8722070 block 0x56df86f88d654cfca4a7e72151e61789b84906e8b77a9f720b27ccf3fcc3f000:19521297: failed request with status 500: {"code":500,"message":"block not found"}"
Now I am getting these errors, good god.

you need to beacon node which have all historical blobs.
https://github.com/ethereum-optimism/optimism/issues/9962

I had the same problem today when upgrading to v0.8.3. I tried going back to the old version v0.8.2 but it still didn't work.

I resolved this issue after using the latest snapshot

Hello, for people experiencing this issue, could you all please:

Confirm you're on 0.8.3 (docker compose stop, git pull to grab latest changes from the repo, and then docker compose up --build)
Make sure that in your .env.mainnet or .env.sepolia (depending on the node your running, if on mainnet or testnet) that you aren't in snap sync mode
That you're able to reach the L1 and Beacon endpoints provided from the Docker container

If after this the sync isn't progressing and time remaining is not decreasing when running
echo Latest synced block behind by: $((($(date +%s)-$( \
  curl -d '{"id":0,"jsonrpc":"2.0","method":"optimism_syncStatus"}' \
  -H "Content-Type: application/json" http://localhost:7545 | \
  jq -r .result.unsafe_l2.timestamp))/60)) minutes

I would recommend restoring from snapshot as @daothanginspius mentioned.
If anyone would like individualize support on this, please feel free to come to Base Discord and open a #developer-support ticket. We are happy to try to help you there. 👍

Since it has been a couple of weeks without further updates, I'm going ahead and closing this issue. If anyone is still encountering a problem, please don't hesitate to stop by the Base Discord and post in the #node-operators channel. We can help you there! :)

I had the same problem today when upgrading to v0.8.3. I tried going back to the old version v0.8.2 but it still didn't work.

I fixed it by using the new snapshot. Thank you!

I solve this issues! The root cause is the problem of data corruption


Fix #28 (I think)

I think this should fix #28, but I'm not sure.

Thank you!

No problem! I also use OpenSheet on my website so I thought of improving it a bit.


Update docstrings

Description:
Preparation for #7357.
Checklist:
If the code communicates with devices, web services, or third-party tools:

[x] Local tests with tox run successfully. Your PR cannot be merged unless tests pass

Hi,
It seems that yandex tts service does not work in home-assistant since version 0.48. I've just tried to start it from scratch on clean latest home-assistant 0.49 system on my Raspberry Pi2. I used the following config
tts:
  - platform: yandextts
    name: yandextts
    api_key: '_MY_API_KEY_HERE_'
    language: 'ru-RU'
    codec: 'mp3'
    voice: 'jane'
    emotion: 'good'
    speed: '1'

with error message in log:
2017-07-17 10:01:04 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
result = coro.throw(exc)
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/setup.py", line 61, in async_setup_component
return (yield from task)
File "/usr/lib/python3.4/asyncio/futures.py", line 388, in iter
yield self  # This tells Task to wait for completion.
File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
value = future.result()
File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
raise self._exception
File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
result = next(coro)
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/setup.py", line 156, in _async_setup_component
conf_util.async_process_component_config(hass, config, domain)
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/config.py", line 598, in async_process_component_config
p_validated = platform.PLATFORM_SCHEMA(p_validated)
File "/srv/homeassistant/lib/python3.4/site-packages/voluptuous/schema_builder.py", line 221, in call
return self._compiled([], data)
File "/srv/homeassistant/lib/python3.4/site-packages/voluptuous/schema_builder.py", line 538, in validate_dict
return base_validate(path, iteritems(data), out)
File "/srv/homeassistant/lib/python3.4/site-packages/voluptuous/schema_builder.py", line 315, in validate_mapping
cval = cvalue(key_path, value)
File "/srv/homeassistant/lib/python3.4/site-packages/voluptuous/schema_builder.py", line 716, in validate_callable
return schema(data)
File "/srv/homeassistant/lib/python3.4/site-packages/voluptuous/validators.py", line 522, in call
if self.min is not None and not v >= self.min:
TypeError: unorderable types: str() >= float()
I'd appreciate any help to make it work. What's the reason of the error I've got?
P.S. The link to documentation ("See on api documentation for details") on component's page is obsolete. I suppose it should be rather this https://tech.yandex.ru/speechkit/cloud/doc/guide/concepts/about-docpage/


Box "Server Displayname" is always "moving"

The Box where the Server Displayname is showing is always "moving" according to the length of it. When i switch the servers with different server name lengths it gives a restless feeling as the complete menu bar is moving. And i need to move the mouse also vertical to hit the menu.

Windows 10
Desktop App 5.1.1
Maybe made the box so that it aligns with the longest server name

@tboulis @JtheBAB This is definitely the intended behaviour, such that we always show as much of the server name as is reasonable, without taking up a bunch of horizontal space with the menu either. This is helpful for users who are using a smaller window or maybe have 2 windows docked next to each other.


ProgressionConfigurator: Improve AddToClasses with better methods.

AddToClasses is a PITA to use - there's no reason for it to require a non-params array of BlueprintProgression.ClassWithLevel or to not have an alternate signature that just takes BlueprintCharacterClassReferences.
Please improve the available input with less boilerplates.
In general any method that takes a single array input should be params-enabled.

Nevermind found SetClasses

Both should currently take params. This could have an override which takes anonymous tuples if that helps:
params (Blueprint<BlueprintCharacterClassReference> class, int level)[]


Write unit tests

Challenges:

Numerous end points require an SSO token for a character, but the character ID and the token should not be committed to the repository.
The requests are all asynchronous with promises, not sure how this will affect unit test library execution.
Ignoring the SSO token issue, some end points require the character to be logged in.

This suggests some form of mock is necessary, to confirm that the generated APIs are invoked with the arguments as expected.

Fixed in superagent branch

Fixed in #31


running-mobius-app documentation incorrect

/blob/master/notes/running-mobius-app.md

It seems we need to use Spark 2.0.2 to run the release version of Mobius, not 1.6.*
The WordCount example Batch, it is pointing to the wrong EXE.

@kmleow thanks for reporting the issues.

Branches 'master' and 'branch-2.0' and the latest release need Spark 2.0.*. However there other branches and related that need earlier versions of Spark.
Can you provide more details?

@skaarthik
The WordCount example Batch, the documentation points to SparkClrPi.exe when it actually should be SparkClrWordCount.exe.

@kmleow thanks. It will be fixed. Feel free to send a PR with the fix.

@skaarthik PR 648 made

Thanks @kmleow . Merged your changes.


Added ember-cli-alex to integrations

Hiya! alex is super cool so I made an Ember addon!

No doubt. Thanks for the heads up!

Sweet, thanks @yohanmishkin!


vjp + property + disable_jit results in wrong dtype

from typing import NamedTuple

import jax
jax.config.update('jax_enable_x64', True)
import jax.numpy as jnp

class XYZ(NamedTuple):
    x: float
    y: float

    @property
    def z(self):
        return self.x + self.y

def fz(a, xyz):
    return a.sum() * xyz.z

def fy(a, xyz):
    return a.sum() * xyz.y

a = jnp.zeros(5, dtype='f4')
xyz = XYZ(0., 1.)

# properties disagree on dtypes

print('fz vjp')
print(jax.vjp(fz, a, xyz)[0].dtype)

with jax.disable_jit():
    print(jax.vjp(fz, a, xyz)[0].dtype)

# no problem with the attributes

print('\nfy vjp')
print(jax.vjp(fy, a, xyz)[0].dtype)

with jax.disable_jit():
    print(jax.vjp(fy, a, xyz)[0].dtype)

# no problem when using grad

print('\nfz grad')
print(jax.grad(fy)(a, xyz).dtype)

with jax.disable_jit():
    print(jax.grad(fy)(a, xyz).dtype)

returns
fz vjp
float32
float64

fy vjp
float32
float32

fz grad
float32
float32

Thanks for the report. I suspect the issue is that the weak type is stripped from the input within the constant handler. This is one of the hairy corner cases of JAX's approach to type promotion; I've been working on making the package more consistent in this respect, but we're not there yet.
Thanks for the nice repo and test case!

This seems to have been fixed somewhere along the way. Here's the output with JAX 0.4.11:
fz vjp
float32
float32

fy vjp
float32
float32

fz grad
float32
float32


Fix for offset calculation and tool names

Fix for offsets adding in the wrong direction and corrections would actually make errors larger.
Added support for unsequential tool numbers, I for example have 0-11 and 49 as a probe.
One problem with this code is that when TAMV is doing a absolute move after it has calibrated the camera, it will move the tool to a incorrect position, possibly off camera. This happens once and I don't know how to mittigate this without consequences to the rest of the code.
Here are offset result for running this code:
Before TAMV
printer['tool 11'].offset : [12.122, 5.306, '3.28']
printer['tool 10'].offset : [11.651, 4.11, '3.36']
printer['tool 9'].offset : [-0.967, -0.285, '-1.42']
printer['tool 0'].offset : [11.677, 5.213, '3.16']
1st TAMV:
printer['tool 11'].offset : [12.164, 5.153, '3.28']
printer['tool 10'].offset : [11.597, 4.014, '3.36']
printer['tool 9'].offset : [-1.022, -0.408, '-1.42']
printer['tool 0'].offset : [11.714, 5.118, '3.16']
2nd TAMV
printer['tool 11'].offset : [12.08, 5.334, '3.28']
printer['tool 10'].offset : [11.665, 4.108, '3.36']
printer['tool 9'].offset : [-0.939, -0.285, '-1.42']
printer['tool 0'].offset : [11.705, 5.185, '3.16']
3d TAMV
printer['tool 11'].offset : [12.191, 5.139, '3.28']
printer['tool 10'].offset : [11.569, 4.015, '3.36']
printer['tool 9'].offset : [-1.048, -0.408, '-1.42']
printer['tool 0'].offset : [11.718, 5.116, '3.16']
4th TAMV
printer['tool 11'].offset : [12.055, 5.348, '3.28']
printer['tool 10'].offset : [11.692, 4.109, '3.36']
printer['tool 9'].offset : [-0.898, -0.3, '-1.42']
printer['tool 0'].offset : [11.705, 5.185, '3.16']
5th TAMV
printer['tool 11'].offset : [12.205, 5.138, '3.28']
printer['tool 10'].offset : [11.543, 4.015, '3.36']
printer['tool 9'].offset : [-1.088, -0.394, '-1.42']
printer['tool 0'].offset : [11.718, 5.115, '3.16']

This is how I tried to fix #58 .
I attach here the values with diagrams in Excel.
TAMV 13mar2023.xlsx

I was getting wrong offsets and this fixed it.

I also got correct results with this fix just today.


.fbx, conversion to format usable by free software?

Initial model seems to be .fbx an Autodesk proprietary format. Quick search seems to find various converters some of which need Autodesk SDK. No idea which ones work...
https://commons.wikimedia.org/wiki/Commons:Requests_for_comment/Hosting_files_for_3D_models lists some free 3D formats, don't know what is the right one. More at https://phabricator.wikimedia.org/T3790

can we get some 3d guys from blender on here, maybe bassam
On Wed, Oct 21, 2015 at 10:55 AM, Mike Linksvayer<EMAIL_ADDRESS>wrote:

Initial model seems to be .fbx https://en.wikipedia.org/wiki/FBX an
Autodesk proprietary format. Quick search seems to find various converters
some of which need Autodesk SDK. No idea which ones work...
https://commons.wikimedia.org/wiki/Commons:Requests_for_comment/Hosting_files_for_3D_models
lists some free 3D formats, don't know what is the right one. More at
https://phabricator.wikimedia.org/T3790
—
Reply to this email directly or view it on GitHub
https://github.com/newpalmyra/modeling/issues/1.

Providing a (possibly compressed) file in the .obj format is always a good idea.
It's an extremely simple text-based format supported by pretty much every 3D software under the sun.
Another very simple, open format is Stanford's .ply.

You can import and export fbx files in blender.
Obj is still a good format but you can't use it with game engines.
http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Import-Export/Autodesk_FBX

Is the autodesk import and export feature complete, or are there problems? What is the best standard in open source for storing 3d files?


Support multiple trun boxes in a single traf box

MPEG-4 part 12 section 8.8.8 states that a traf box may contain multiple trun boxes. This patch allows parsing such files correctly. Previously, the library would only parse the last trun box for each traf box, which caused the tracks to be unplayable.

Closing, since upon further inspection I am no longer sure that my changes are entirely correct.


Complex example: CUDA out of memory

Dear All,
I have set up RoseTTAFold on a desktop computer and am trying the complex example but I met with some issues. I have a 8GB GeForce RTX 2070 SUPER card. I noted someone posting early that a 32 GB card is required. Is that so?  Please help.
The single protein examples (e2e and pyrosetta) both completed successfully.
But when I ran
python network/predict_complex.py -i paired.a3m -o complex -Ls 218 310
I got this error:
Using backend: pytorch
Traceback (most recent call last):
File "../../network/predict_complex.py", line 317, in
pred.predict(args.a3m_fn, args.out_prefix, args.Ls, templ_npz=args.templ_npz)
File "../../network/predict_complex.py", line 221, in predict
logit_s, _, xyz, lddt = self.model(msa, seq, idx_pdb, t1d=t1d, t2d=t2d)
File "/root/anaconda3/envs/RoseTTAFold/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/home/hd2/baker/RoseTTAFold/network/RoseTTAFoldModel.py", line 112, in forward
msa, pair, xyz, lddt = self.feat_extractor(msa, pair, seq1hot, idx)
File "/root/anaconda3/envs/RoseTTAFold/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/home/hd2/baker/RoseTTAFold/network/Attention_module_w_str.py", line 469, in forward
msa, pair = self.iter_block_1[i_m](msa, pair)
File "/root/anaconda3/envs/RoseTTAFold/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/home/hd2/baker/RoseTTAFold/network/Attention_module_w_str.py", line 311, in forward
msa, att = self.msa2msa(msa)
File "/root/anaconda3/envs/RoseTTAFold/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/home/hd2/baker/RoseTTAFold/network/Attention_module_w_str.py", line 174, in forward
x = self.encoder_2(x)
File "/root/anaconda3/envs/RoseTTAFold/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/home/hd2/baker/RoseTTAFold/network/Transformer.py", line 391, in forward
output = layer(output, return_att=return_att)
File "/root/anaconda3/envs/RoseTTAFold/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/home/hd2/baker/RoseTTAFold/network/Transformer.py", line 304, in forward
src2 = self.norm2(src) # pre-normalization
File "/root/anaconda3/envs/RoseTTAFold/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, *kwargs)
File "/home/hd2/baker/RoseTTAFold/network/Transformer.py", line 27, in forward
x = self.a_2(x-mean)
RuntimeError: CUDA out of memory. Tried to allocate 774.00 MiB (GPU 0; 7.77 GiB total capacity; 4.30 GiB already allocated; 630.69 MiB free; 5.98 GiB reserved in total by PyTorch)

I manage to run the filtered.a3m in the given complex example with a 24GB RTX3090.  It used about 22GB to run. Hope this helps.

I manage to run the filtered.a3m in the given complex example with a 24GB RTX3090. It used about 22GB to run. Hope this helps.
@PresleyWong Hi, I am also using a RTX3090 with 24GB of video memory, however I am getting an error when running the pyrosetta script for the single example (in network.stderr) with the following error: RuntimeError: CUDA out of memory. Tried to allocate 7.86 GiB (GPU 0; 23.70 GiB total capacity; 12.40 GiB already allocated; 491.69 MiB free; 21.51 GiB reserved in total by PyTorch) Do you have any suggestions for me, thank you very much!


Metadata scrapers

Implement custom metadata scrapers to read additional metadata for:
Deconvolution required fields such as Instrument model, Channel name, modality,pinhole size, emission wavelength, objective RI, NA, Mag etc
These scrapers will also be used to autodetect file format, channel name etc for file conversion, PSF processing etc

We need to define the list of required additional metadata as per our template:
https://uq-my.sharepoint.com/:x:/g/personal/uqjspri1_uq_edu_au/ESw6Z6NpkCVIq9JOywtdmPQBzDk1OkyoCGde34SbTpHgqw

We need to calculate automatically the back projected pinhole diameter based on the microscope model, objective mag, additional zoom, pinhole size etc
https://uq-my.sharepoint.com/:x:/g/personal/uqjspri1_uq_edu_au/Ee4l2mosTnBIho61w2YvozkBPHbk2ho8CRu5RRHayAUFxg

From Marc Bruce:  I haven't found the bad NA read dataset, but at this point I think it was a missed read (data present but not parsed) rather than a wrong read. I can share some of my metadata-parsing-in-progress; partially manually re-parsing the original metadata reported by Bio-Formats, partially full file parsing for some formats where the metadata is somewhat more accessible.
I'll have to expand the core API for the file format writer library that's within the batch plugin now for fast file writing. It supports ims, IJ-compatible tiff, and OME-tiff (with hand-written TIFF headers and OME XML since the native Java writer by Bio-Formats is still super slow for no reason). Even the older IJ-tiff direct from IJ API should read back correctly.
Basic metadata from the deconvolution is currently inserted in ims and ome-tiff for theoretical PSFs. Attaching generic data to ome-tiff is tricky since their XML is so "flexible" that it doesn't permit unknown fields.
I've also got WIP code ready to go once the next gen OME-Zarr formats are finalized.
Partial correction - batch GUI still uses IJ API to write a bare tiff (so it should have the correct dimension header already).
How are you saving files out via the API currently?
Also, your yearly update PO came in. There shouldn't be any rush from a license point of view since the last update was December if I recall. I'll prepare the necessary files and get back to you in a few days.

JS, NC, ND, ME zoom call on 20-Mar-2024:
Need to workshop further to determine suitable scope for 2H2024, aiming to improve..

auto-populated metadata
metadata presentation


Change /:nodeName/delete/:whatToRemove/:sid to POST

The endpoint at /:nodeName/delete/:whatToRemove/:sid is used via GET and therefore lacks a proper CSRF protection
Relevant issue number(s): HackerOne/#722809
License
I confirm that this contribution is made under an Apache 2.0 license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

Accidentally messed up the PRs


Say "local map =" in the comment under DO NOT USE THIS!

Really minor change.
Adds local map =  to the code comment about what to use instead of LazyVim.safe_keymap_set because when I saw this, it wasn't clear to me what I should use.
I saw local map = vim.keymap.set in someone else's config.

Actually it's not optimal to include local map, because that is only assigning vim.keymap.set to a local variable map. But some people might use vim.keymap.set directly in their configuration (and that is also correct), so it would potentially become confusing that they have to assign it to a local variable.

but the rest of this file has stuff like
map({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
map({ "n", "x" }, "<Down>", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
map({ "n", "x" }, "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })

Only saying "use vim.keymap.set instead" isn't clear on what is the proper path forward. Maybe it's only me though.
how about:

Use vim.keymap.set instead of LazyVim.safe_keymap_set

Would that be better?
Or where it says "DO NOT USE THIS IN YOUR OWN CONFIG!" it could say

DO NOT USE LazyVim.safe_keymap_set IN YOUR OWN CONFIG!
Use vim.keymap.set instead

The correct way to do your keymaps with only reading the Neovim docs is to use vim.keymap.set directly (and LazyVim.safe_keymap_set also uses vim.keymap.set under the hood with some modifications to take into account the LazyKeys that lazy.nvim provides, but that is not necessary for the end user). So in your /lua/config/keymaps.lua you would have
vim.keymap.set({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
vim.keymap.set({ "n", "x" }, "<Down>", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
vim.keymap.set({ "n", "x" }, "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })

Simple as that.
You can also assign vim.keymap.set to a local variable to avoid writing so many words and you do that with something like local map = vim.keymap.set and then use that to define your mappings.  But that is more confusing in my opinion for users who are not familiar with programming. So for such users, it would be preferable to directly use vim.keymap.set in their config until they become more familiar with Lua and know what they're doing.

thanks. i updated the comment. it's even simpler now

thanks!


A* Search

🚀 Feature
Problem Statement: We can consider a 2D Grid having several obstacles and we start from a source cell to reach towards a goal cell.
Have you read the Contributing Guidelines on Pull Requests?
Yes.
Motivation
To approximate the shortest path in real-life situations, like- in maps, games where there can be many hindrances.
Pitch
AI search algorithm using heuristics.
I will solve that in cpp.
Hey, @bhav09 please look into this issue and please assign it to me as a part of GSSoC'21

Sure, the issue seems legit. All the best. Happy Learning.

Hey , I am participant in GSSOC'21. I'll solve that in cpp. Can you please assign this to me?

Hey @rk05-lenavo, the issue has already been assigned. Nevertheless, you can open a new one with the same concept but with implementation in a different programming language. We will assign it to you then.
Happy learning!


Fix Elasticsearch version in ES OTEL writer

Signed-off-by: Pavol Loffay<EMAIL_ADDRESS>Resolves #2407

I have define the --es.version=7, but in es v7.15.2 already not working.
HTTP Error: search services failed: elastic: Error 400 (Bad Request): all shards failed [type=search_phase_execution_exception]

{
  "data": null,
  "total": 0,
  "limit": 0,
  "offset": 0,
  "errors": [
    {
      "code": 500,
      "msg": "search services failed: elastic: Error 400 (Bad Request): all shards failed [type=search_phase_execution_exception]"
    }
  ]
}


Add contact supporting content

Description :sparkles:
Issues :bug:
Testing :alembic:
Screenshots :camera_flash:

Additional notes :spiral_notepad:

Codecov Report

Merging #954 (52676a2) into develop (dd235d1) will decrease coverage by 46.57%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##           develop     #954       +/-   ##
============================================
- Coverage    69.17%   22.60%   -46.58%
============================================
  Files          708      104      -604
  Lines        21081     2526    -18555
  Branches      1792      654     -1138
============================================
- Hits         14583      571    -14012
+ Misses        6204     1885     -4319
+ Partials       294       70      -224

Impacted Files
Coverage Δ

...nefit/applicant/src/components/footer/Footer.sc.ts
0.00% <0.00%> (ø)

...mponents/supportingContent/SupportingContent.sc.ts
0.00% <0.00%> (ø)

...components/supportingContent/SupportingContent.tsx
0.00% <0.00%> (ø)

...benefit/applicant/src/hooks/useApplicationQuery.ts
0.00% <0.00%> (ø)

...nefit/applicant/src/components/header/useHeader.ts
0.00% <0.00%> (ø)

...s/forms/application/step2/ApplicationFormStep2.tsx
0.00% <0.00%> (ø)

backend/kesaseteli/common/tests/conftest.py

frontend/benefit/handler/src/constants.ts

...d/benefit/handler/src/components/layout/Layout.tsx

...ents/applicationReview/benefitView/BenefitView.tsx

... and 602 more

Continue to review full report at Codecov.

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


[BUG] Cannot Use _source With Execute Painless Script API

Describe the bug
According to documentation, with the filter context and supplying an in-memory doc:

The filter context runs the script as if the script were inside a script query. You must provide a test document in the context. The _source, stored fields, and _doc variables will be available to the script.

If I supply a "_source" attribute, OpenSearch complains about unknown field.
{
   "context_setup":
     "_source":
...
}

{"error":{"root_cause":[{"type":"x_content_parse_exception","reason":"[1:239] [execute_script_context] unknown field [_source]"}],"type":"x_content_parse_exception","reason":"[1:250] [painless_execute_request] failed to parse field [context_setup]","caused_by":{"type":"x_content_parse_exception","reason":"[1:239] [execute_script_context] unknown field [_source]"}},"status":400}

If I include it in the document, I get metadata error:
{
   "context_setup":
    "document": {
      "_source":
...
}

{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Field [_source] is a metadata field and cannot be added inside a document. Use the index API request parameters."}],"type":"mapper_parsing_exception","reason":"failed to parse field [_source] of type [_source] in document with id '_id'. Preview of field's value: '{function=ecc, name=sec-t571k1, type=implementation}'","caused_by":{"type":"mapper_parsing_exception","reason":"Field [_source] is a metadata field and cannot be added inside a document. Use the index API request parameters."}},"status":400}

It is not clear how an in-memory document as part of the Request can include a _source per the document. I am testing a script that is accessing _source.
Related component
Other
To Reproduce
Issue a REST call to /_scripts/painless/_execute with a document containing a _source attribute.
{
  "script": {
    "source": "doc['grad'].value == true && doc['gpa'].value >= params.min_honors_gpa",
    "params": {
      "min_honors_gpa": 3.5
    }
  },
  "context": "filter",
  "context_setup": {
    "index": "testindex1",
    "document": {
     "_source": { ... }
      "grad": true,
      "gpa": 3.79
    }
  }
}

Expected behavior
Script can access the  _source attribute per the documentation.

The filter context runs the script as if the script were inside a script query. You must provide a test document in the context. The _source, stored fields, and _doc variables will be available to the script.

Additional Details
No response

Hi @git-blame
Thanks for bringing this up.
Actually the issue is with documentation. The field is source and not _source which you can see in later example requests. [1]
Here is the reproduce:
I have copy as curl the commands as per documentation:
Create index:
curl -XPUT "http://localhost:9200/testindex1" -H 'Content-Type: application/json' -d'
{
  "mappings": {
    "properties": {
      "grad": {
        "type": "boolean"
      },
      "gpa": {
        "type": "float"
      }
    }
  }
}'

Run a script to determine if a student is eligible to graduate with honors:
[now the copy as curl gives a parsing error because of ' not processed correctly. (another mistake in documentation) [2]
curl -XPOST "http://localhost:9200/_scripts/painless/_execute" -H 'Content-Type: application/json' -d'
{
  "script": {
    "source": "doc['grad'].value == true && doc['gpa'].value >= params.min_honors_gpa",
    "params": {
      "min_honors_gpa": 3.5
    }
  },
  "context": "filter",
  "context_setup": {
    "index": "testindex1",
    "document": {
      "grad": true,
      "gpa": 3.79
    }
  }
}'
{"error":{"root_cause":[{"type":"script_exception","reason":"compile error","script_stack":["doc[grad].value == true && do ...","    ^---- HERE"],"script":"doc[grad].value == true && doc[gpa].value >= params.min_honors_gpa","lang":"painless","position":{"offset":4,"start":0,"end":29}}],"type":"script_exception","reason":"compile error","script_stack":["doc[grad].value == true && do ...","    ^---- HERE"],"script":"doc[grad].value == true && doc[gpa].value >= params.min_honors_gpa","lang":"painless","position":{"offset":4,"start":0,"end":29},"caused_by":{"type":"illegal_argument_exception","reason":"cannot resolve symbol [grad]"}},"status":400

Adding up escape character \" instead of '  as below fixes the script:
 curl -X POST "http://localhost:9200/_scripts/painless/_execute" -H 'Content-Type: application/json' -d'
{
  "script": {
    "source": "doc.containsKey(\"grad\") && doc[\"grad\"].value == true && doc.containsKey(\"gpa\") && doc[\"gpa\"].value >= params.min_honors_gpa",
    "params": {
      "min_honors_gpa": 3.5
    }
  },
  "context": "filter",
  "context_setup": {
    "index": "testindex1",
    "document": {
      "grad": true,
      "gpa": 3.79
    }
  }
}'

{"result":true}

Additionally, I think the documentation is required to be fixed to _doc as well.
Basically, everything in the below statement is misleading:

The _source, stored fields, and _doc variables will be available to the script.

Let me try and fix up the documentation here.

Thanks @sandeshkr419 but my original problem is that the "old" documentation states that:

The _source, stored fields, and _doc variables will be available to the script.

But I cannot create, in the context_setup section, a test document where the_source section is populated. Therefore, if my script contains code to access doc.xxx that's ok. If my script contains code to access _source, the back-end will complain that this is an unknown field.
Outside of this REST API, I can write painless scripts that access _source (e.g., updateByQuery). Perhaps this REST API does not allow this. Then I simply need clarification in the documentation that, for example, only scripts that references doc can be executed.


Suppress Javadoc errors

A try to release has failed due to Javadoc errors from the original msgpack-java. This pull request is to suppress those errors.

Thanks!


Add new InternalAffairs/LambdaOrProc cop

Enforces the use of node.lambda_or_proc? instead of node.lambda? || node.proc?.
# bad
node.lambda? || node.proc?
node.proc? || node.lambda?

# good
node.lambda_or_proc?

Before submitting the PR make sure the following are checked:

[x] The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
[x] Wrote good commit messages.
[ ] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[x] Added tests.
[x] Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
[ ] Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

Good one!


make a graphical documentation for wis/pis/pid

you can find the actual documentation diagram in the wiki
-> https://github.com/n0r1sk/smsgateway/wiki/Components


Fix bug in macro average for a number of classification metrics

What does this PR do?
Fixes #1693
Fixes #1692
Fixes #1691
Fixes #1664

Before submitting

[ ] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
[ ] Did you read the contributor guideline, Pull Request section?
[ ] Did you make sure to update the docs?
[ ] Did you write any new necessary tests?

PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?
Make sure you had fun coding 🙃

@SkafteNicki how is it going here? :rabbit:

Hi @SkafteNicki @Borda @JohannesK14 thank you for the fix anr / or review! I wanted to ask the state of this PR, because I also experience the issue :/

@ioangatop I am currently working on it locally. Nearly done, but I have some unit tests that are still failing which I need to debug. Hopefully, get it done before the end of this week and I make sure that it is done before v1.0 release.


Deadlock when running commands that spawn background processes

The issue is described in details here: http://bugs.python.org/issue4216#msg77582
The issue is visible for example with git over ssh, when using ssh's ControlMaster option. Basically, it hangs because sh waits to receive an EOF on git's stream, which never happens because ssh inherited git's streams and survives past git's end.
Here's how to reproduce with sh:
import sh
import sys

# Remove control socket so we're sure to create a new ssh process; if you don't
# do this the script will hang the first time it is run, but not the second
# time
sh.rm('-f', '/tmp/git@github.com:22')
# Clone a repository over SSH, this will hang
sh.rm('-rf', 'sh')
sh.git.clone('git@github.com:amoffat/sh.git', _out=sys.stdout, _err=sys.stderr)

You also need to enable persistent ssh connections in your ~/.ssh/config:
Host *
ControlMaster auto
ControlPath /tmp/%r@%h:%p
ControlPersist 72h

I think there should be an option to completely disable sh reading on streams (_no_out and _no_err don't help, neither does redirecting streams to files).

Thanks for reporting @flupke, I will look into it

I hit this issue as well. A dirty workaround is to call something like subprocess.call(['ssh', host, 'true']) at the beginning of your script, which initiates the ssh connection and doesn't block since it doesn't handle streams at all. Subsequent calls to sh then work as expected. This of course assumes that the connection won't close while your script is running.

So after some investigation, the way I see it is:

any process launched through sh has to wait on its stdout/stderr
any process may launch a subprocess, dup its stdout/stderr, causing the parent process to never finish reading

We could add an option saying "hey, I know this process will launch a subprocess and cause stdout/stderr to never finish, so disable reading on them." but that seems like it requires too much knowledge of what the process does under the hood, and will probably result in a lot of people creating issues, wondering about hanging, and then people try to debug it.
I've opted for a hacky approach (here and here) that requires no knowledge of the process.  What it does is, when the process ends, we say "ok, threads that are spinning and trying to read from stdout and stderr, you have X seconds to finish reading from those streams, then you're done."  Most processes stdout/err will receive their EOFs immediately, so the timer behavior won't apply to them.  The timer behavior will only kick in on processes that have dup'd their fds in another child process, and will therefore never EOF.  In that case, the process will hang for half a second on completion, but then terminate correctly
the fix is on the release-1.2 branch and will go out with it

Cool! I tested the branch against my script above, and it doesn't hang anymore. There are error messages though:
Exception in thread Thread-5:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/Users/flupke/.virtualenvs/sh-bug/lib/python2.7/site-packages/sh.py", line 1684, in output_thread
    readers.remove(stream)
ValueError: list.remove(x): x not in list

Cloning into 'sh'...
Exception in thread Thread-8:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/Users/flupke/.virtualenvs/sh-bug/lib/python2.7/site-packages/sh.py", line 1684, in output_thread
    readers.remove(stream)
ValueError: list.remove(x): x not in list```

@flupke Weird, works fine for me, but I went ahead and reverted the lines that are causing the errors.  Want to give it another try?

Yup, all good! (this was on mac btw)
On Fri, Oct 7, 2016 at 9:07 PM Andrew Moffat<EMAIL_ADDRESS>wrote:

@flupke https://github.com/flupke Weird, works fine for me, but I went
ahead and reverted the lines that are causing the errors. Want to give it
another try?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/amoffat/sh/issues/310#issuecomment-252335784, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AALiIlIyMPxBdZqnFmGdpaCE8kwkyxslks5qxphhgaJpZM4ICFhV
.