Add printf to __THCudaCheck fail clause, in case stack unwind itself …

…crashes
Address https://github.com/torch/cutorch/issues/329

Hmmm, although note that this will print a ton of FAILs during unwind.  Maybe I should add a static var, and only print hte first failure perhaps?

Modified to only print the first failure, and then assume we're already unwinding, since THError will already have been called at least once.

are you sure this actually helps in improving errors? (I dont think so). See my comment on CUDA_LAUNCH_BLOCKING on the other thread.

It was a prerequisite for diagnosing https://github.com/torch/cutorch/pull/332 (which took me almost my entire day by the way... of which 3-4 hours was working my way backwards far enough to make the change in this PR; I spent several hours instrumenting Storage, trying to work out why my storage was broken; checking pairs of allocaitons and free.  All a complete waste of time of course, since the root cause was prior to the 8,000 frees...)

that sounds horrible, i feel sorry for you :)
If you can give me a stack trace output of with this, and without this -- that'll help me understand how this printf is helpful.

Original stack trace was simply something like:
segmentation error

That was it :-P  That was the entire output.
If you opened gdb on this line, with a breakpoint, it just unhelpfully showed a call from lua into storage_free.
After instrumenting Storage a bit, I got the following output:
https://gist.github.com/hughperkins/ce225700d0df80b908a7
After instrumenting CudaCheck, I got:
https://gist.github.com/hughperkins/2332cc8f8227454b3960
... which makes the location of hte problem significantly more obvious.  It's nothing to do with Storage_free in fact ....

(note: the seg faults occurs right at the end of the logfile, in both cases.  the seg fault terminates the program, and closes the logfile; therefore it's reasonable to suppose that the lsat copule of lines of the log are the cause of the segfault.  Which is kind of true. But misleading)

ok thanks for the tracing. I expected the line below, i.e.
_THError(file, line, "cuda runtime error (%d) : %s", err,
cudaGetErrorString(err));
should do the same thing as your printf, but clearly it does not print file/line number on segfault, weird.

Yeah, it only prints stuff after unwind.  And if unwind crashes... :-(

(Although plausibly one could modify _THError to do a printf before commencing unwind I suppose?)

ok this seems reasonable to merge. but I'd want the cudaGetErrorString to also be present in the printf, can you modify that.

ok this seems reasonable to merge. but I'd want the cudaGetErrorString to also be present in the printf, can you modify that.

Ok, sounds good.  I'll update that.
By the way for _THError.... curiously it seems that it should do a printf in fact.  Here is _THError, in torch7's general.c:
void _THError(const char *file, const int line, const char *fmt, ...)
{
  char msg[2048];
  va_list args;

  /* vasprintf not standard */
  /* vsnprintf: how to handle if does not exists? */
  va_start(args, fmt);
  int n = vsnprintf(msg, 2048, fmt, args);
  va_end(args);

  if(n < 2048) {
    snprintf(msg + n, 2048 - n, " at %s:%d", file, line);
  }

  (*torchErrorHandlerFunction)(msg, torchErrorHandlerData);
}

What is torchErrorHandlerFunction?  It's:
static __thread void (*torchErrorHandlerFunction)(const char *msg, void *data) = defaultTorchErrorHandlerFunction;

And defaultTorchErrorHandlerFunction is:
static void defaultTorchErrorHandlerFunction(const char *msg, void *data)
{
  printf("$ Error: %s\n", msg);
  exit(-1);
}

Seems like it should printf in fact???

Is it possible that cudaGetErrorString fails???

that's a scary thought, but maybe :)

It's annoyingly hard to test unfortunately.   I tried creating a test case like:
require 'cutorch'

a = torch.CudaTensor(128, 128):fill(-1)
b = torch.CudaTensor(128, 128):fill(-1)
c = torch.CudaTensor(128, 128)
local d = {}
for i=1,10000 do
  d[i] = c:narrow(2,1,50)
end
c:scatter(1, b, c)
c:max()

... but doesnt reproduce the seg fault.  The only way I have to reproduce the issue is to run my training program, which is quite slow.
Anywya, I guess I should dig a bit, figure out why THError isnt doing printf and/or if cudaGetErrorString is failing.

Well, one observation is that one of the first htings that happens when I run the program is that THSetErrorHandler is called, so the error handler may not be the one we think it is?

Ah-hah!  In torch7, utils.c:
static void luaTorchErrorHandlerFunction(const char *msg, void *data)
{
  lua_State *L = data;
  luaL_error(L, msg);
}

static int torch_updateerrorhandlers(lua_State *L)
{
  THSetErrorHandler(luaTorchErrorHandlerFunction, L);
  THSetArgErrorHandler(luaTorchArgErrorHandlerFunction, L);
  return 0;
}

And luaTorchErrorHandlerFunction is a printf-free zone.

Sooo... we could modify luaTorchErrorHandlerFunction in utils.c to have a printf first, but I suspect that things in a non-cuda world are maybe more well-behaved?  So maybe we just fix it in THCudaCheck for now, since maybe the issue doesnt occur in torch7 world?

Ok:

added cudaGetErrorString
also made it print to stderr

Example output:
THCudaCheck FAIL file=/home/ubuntu/git/cutorch/lib/THC/THCTensorMath.cu line=303 error=77 : an illegal memory access was encountered
luajit: cuda runtime error (77) : an illegal memory access was encountered at /home/ubuntu/git/cutorch/lib/THC/generic/THCStorage.c:147

Thank you so much!


Cannot read property 'map' of undefined?

hey man, thanks for writing this adapter!
i'm kind of new to aor and feathers, so it's entirely possible i'm just being a dunce,
but i have this setup and i'm getting the above error in the browser when trying to do a simple list.
here are some relevant snippets:

feathers-client.js

import feathers from 'feathers-client'

const host = 'http://localhost:3000'

export default feathers()
  .configure(feathers.hooks())
  .configure(feathers.rest(host).fetch(window.fetch.bind(window)))

app.js

import React from 'react'
import ErrorIcon from 'material-ui/svg-icons/alert/error'
import {Admin, Resource} from 'admin-on-rest'
import {restClient} from 'aor-feathers-client'
import feathersClient from './feathers-client'
import {AlertList} from './alerts'
import Dashboard from './dashboard'

const options = {id: '_id'}

const App = () =>
  <Admin dashboard={Dashboard} restClient={restClient(feathersClient, options)}>
    <Resource name="alerts" list={AlertList} icon={ErrorIcon} />
  </Admin>

export default App

alerts.js

import React from 'react'
import {List, Datagrid, TextField} from 'admin-on-rest'

// eslint-disable-next-line import/prefer-default-export
export const AlertList = props =>
  <List title="All alerts" {...props}>
    <Datagrid>
      <TextField source="id" />
      <TextField source="username" />
      <TextField source="folder" />
      <TextField source="file" />
      <TextField source="message" />
      <TextField source="createdAt" />
    </Datagrid>
  </List>

sample call to http://localhost:3000/alerts from browser

some chrome debug output (i manually placed a console.log statement in aor saga code)

i'm not using any authentication yet, which is diff from examples given, wonder if that might be an issue, or not relevent

any troubleshooting suggestions appreciated!
best,
tony.

doh! after some shut-eye noticed this on the server side:
  app:index "SequelizeBaseError: Unknown column 'Alert._id' in 'order clause'\n    at Query.formatError (/Users/tony/git/udx-api/node_modules/sequelize/lib/dialects/mysql/query.js:222:16)\n    at Query.connection.query [as onResult] (/Users/tony/git/udx-api/node_modules/sequelize/lib/dialects/mysql/query.js:55:23)\n    at Query.Command.execute (/Users/tony/git/udx-api/node_modules/mysql2/lib/commands/command.js:31:12)\n    at Connection.handlePacket (/Users/tony/git/udx-api/node_modules/mysql2/lib/connection.js:417:28)\n    at PacketParser.onPacket (/Users/tony/git/udx-api/node_modules/mysql2/lib/connection.js:93:16)\n    at PacketParser.executeStart (/Users/tony/git/udx-api/node_modules/mysql2/lib/packet_parser.js:73:14)\n    at Socket.<anonymous> (/Users/tony/git/udx-api/node_modules/mysql2/lib/connection.js:101:29)\n    at emitOne (events.js:115:13)\n    at Socket.emit (events.js:210:7)\n    at addChunk (_stream_readable.js:252:12)\n    at readableAddChunk (_stream_readable.js:239:11)\n    at Socket.Readable.push (_stream_readable.js:197:10)\n    at TCP.onread (net.js:589:20)" +1ms

used this for app.js:
import React from 'react'
import ErrorIcon from 'material-ui/svg-icons/alert/error'
import {Admin, Resource} from 'admin-on-rest'
import {restClient} from 'aor-feathers-client'
import feathersClient from './feathers-client'
import {AlertList} from './alerts'
import Dashboard from './dashboard'

// const options = {id: '_id'}

const App = () =>
  <Admin dashboard={Dashboard} restClient={restClient(feathersClient)}>
    <Resource name="alerts" list={AlertList} icon={ErrorIcon} />
  </Admin>

export default App

and voila:

so all good 👍 thanks again for the adapter 🙏


Resolve the difference between our 'ModuleFlags' and fpPS4's 'rtld_flags'

It seems like there are some differences between these two types, which I'm pretty sure correspond to each other.

rtld_flags are not bit-accurately copied so don't pay attention to the order of the fields in the record

Oh 👀

mainprog	0x01
textrel		0x02
		0x04
tls_done	0x08
init_scanned	0x10
on_fini_list	0x20
dag_inited	0x40
		0x80
is_system	0x100
in_new		0x200
libc_fios	0x400
jmpslots_done	0x800
not_get_proc	0x1000


build: fix the pom and add sources and javadocs

Description
Add missing tags to the pom.xml and fix javadoc issues. The build now provides a jar file containing the sources and javadocs.
Checklist

[x] My code follows the style guidelines of the project
[x] I have performed a self-review of my own code
[x] I have made corresponding changes to the documentation

:tada: This PR is included in version 1.9.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Can I use withSchema and batchInsert?

Currently an exception will be thrown if i do something like:
knex.withSchema('rpt').batchInsert('UserAccounts'...)
is there a way to use this? Alternatively is is safe to just do a string concat and do:
knex.batchInsert('rpt.UserAccounts'...)
?

No, batchInsert is an utility function, which actually not part on query builder chain (this should be mentioned in docs better, or whole batch insert should be moved to separate npm package).
It might break in future, but if it works right now I suppose it works. Thats undefined behaviour currently.
Safest would be to make those batch inserts with normal insert and to use lodash _.chunk to make batches.


A new freely usable implementation of use-disposable

After using the Disposable mode, I was unable to completely resolve the issues with React 18 because it requires creating the disposable instance during the React rendering phase, where lifecycle management isn't as robust as within the useEffect hook.
However, I've now developed a truly versatile useDisposable hook that can be seamlessly integrated into any scenario. Check out this demonstration:
import {
  DependencyList,
  EffectCallback,
  useEffect,
  useMemo,
  useRef
} from 'react'

type IDisposable = () => void

import { useIsStrictMode } from './useIsStrictMode'

const queue: (fn: () => void) => void =
  typeof queueMicrotask === 'function'
    ? queueMicrotask
    : (cb: () => void) => void Promise.resolve().then(cb)

const useStrictEffect = (effect: EffectCallback) => {
  const canDisposeRef = useRef(false)

  useEffect(() => {
    const dispose = effect()
    canDisposeRef.current = false

    if (dispose) {
      return () => {
        canDisposeRef.current = true
        queue(() => {
          if (!canDisposeRef.current) return
          dispose()
        })
      }
    }
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }, [])
}

// eslint-disable-next-line react-hooks/exhaustive-deps
const useFreeEffect = (effect: EffectCallback) => useEffect(effect, [])

/**
 * Get or create an instance which is automatically disposed by this hook.
 *
 * @param create an instance factory which return instance and dispose pairs
 * @param deps when to create a new instance
 * @returns a managed instance
 */
export default function useDisposable<T>(
  create: () => readonly [T, IDisposable],
  deps: DependencyList = []
): T {
  const ref = useRef<IDisposable>()

  const isStrictMode = useIsStrictMode()
  const instance = useMemo(() => {
    if (ref.current) {
      // firstly dispose the last instance before create
      ref.current()
    }
    const [d, dispose] = create()
    if (typeof window === 'undefined') {
      // dispose should be invoked upon the server side
      queue(() => dispose())
    } else {
      ref.current = dispose
    }
    return d
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }, deps)

  const useEffect = isStrictMode ? useStrictEffect : useFreeEffect
  useEffect(() => {
    const dispose = ref.current
    if (!dispose) return

    return () => {
      dispose()
      ref.current = undefined
    }
  })

  return instance
}

export { useDisposable }

Now when I use like this:
'use client'

import { useDisposable } from 'use-disposable'

let a = 0
let b = 0

export function ClientComponent() {
  useDisposable(() => [console.log('create a:', ++a), () => console.log('revoke a:', a)] as const)
  useDisposable(() => [console.log('create b:', ++b), () => console.log('revoke b:', b)] as const)
  return null
}

in dev strict mode of react 18,
browser console prints:
create a: 1
revoke a: 1
create a: 2
create b: 1
revoke b: 1
create b: 2

server console prints:
create a: 1
create b: 1
revoke a: 1
revoke b: 1

and if I unmount the component,
the browser console prints:
revoke a: 2
revoke b: 2

So I think we should replace this method instead.

Thanks for the issue @tangye1234. Do I understand correctly that the difference in approach is that there the microtask would only be run after the double renders have been committed?
I like that the implementation no longer has a dependency on global WeakSet which means that multiple calls of useDisposable could be called. We've worked with microtasks before in Fluent for debouncing https://github.com/microsoft/fluentui/blob/master/packages/react-components/priority-overflow/src/debounce.ts.
One of the pitfalls of microtasks is that they operate outside of the effect cycle - which means that in userland there's no way to know when dispose has happened. It can also play badly with unit testing frameworks since disposal can occur after the the test has unmounted.
Would you like to make a PR contribution to this repo and we could try to release a pre-release version to test it out for a while?


⚠ Fortnite has degraded performance

In 6e8d308, Fortnite (https://fortnite.com) experienced degraded performance:

HTTP code: 200
Response time: 1592 ms

Resolved: Fortnite performance has improved in 205a8df.


Command not found dbm-generate-gorm-changelog

Per the documentation here: http://grails-plugins.github.io/grails-database-migration/3.0.x/index.html#gettingStarted
I followed the instructions to execute this command:
grails dbm-generate-gorm-changelog changelog.groovy
It immediately fails.
| Error Command not found dbm-generate-gorm-changelog
Did you mean: dbm-create-changelog or dbm-changelog-to-groovy or generate-all?
Using:
Grails 3.1.12
compile "org.grails.plugins:database-migration:3.0.0"
compile 'org.liquibase:liquibase-core:3.5.3'

Do you have it listed as a classpath dependency in the buildscript section?

Hi James.  Yes.
dependencies {
    classpath "org.grails:grails-gradle-plugin:$grailsVersion"
    classpath "com.bertramlabs.plugins:asset-pipeline-gradle:2.8.2"
    classpath "org.grails.plugins:hibernate5:5.0.11"
    classpath 'org.grails.plugins:database-migration:3.0.0'
}

Please provide an example project that demonstrates the problem

Appreciate the attempt to help but I can't switch gears.  I've got work on my plate.

OK. If you are ever inclined to create an example project, feel free to create a new issue.


AutoComplete can't customize suggestions .active state

Here is my code to override the AutoComplete component :
.autocomplete {
    & > [data-react-toolbox="input"] > label {
        color: $color-text-secondary;
    }

    & > [data-react-toolbox="input"] + ul {
        background-color: $color-black;
        color: $color-white;
        li:hover, li:active {
            background-color: #7f7f7f; //!NOT WORKING for active !
        }
    }
}

I have only tried with the AutoComplete component, but I guess it is the same for every component with a list. Since I want to make a dark themed application, It is very painful to overwrite every component with selectors like the ones above (since i can't overwrite the CSS modules classes because of their hash).
Moreover, I couldn't find a way to overwrite the .active class which is set when you select a different suggestion with the keyboard (and the default color is too close to $color-white, making the component unreadable).
My suggestion is, instead of using classes with CSS modules (which can't be overriden), would it be possible to define every rules with data-react-toolbox-role, so we can override every nodes inside a component ?
So my code would look this way :
.autocomplete {
    & > [data-react-toolbox="input"] > [data-react-toolbox="label"] {
        color: $color-text-secondary;
    }

     [data-react-toolbox="suggestions"] {
        background-color: $color-black;
        color: $color-white;
        & > [data-react-toolbox-suggestions="li"]:hover,
        & > [data-react-toolbox-suggestions-li-hover="true"],
        & > [data-react-toolbox-suggestion-li-active="true"] {
            background-color: #7f7f7f;
        }
    }
}

Another solution would be to make every _config.scss files overridables.
The config file for the AutoComplete component is like this :
$autocomplete-color-primary-contrast: $color-primary-contrast;
$autocomplete-color-primary: $color-primary;
$autocomplete-overflow-max-height: 45vh;
$autocomplete-suggestion-active-background: $palette-grey-200;
$autocomplete-suggestion-padding: $unit;
$autocomplete-suggestions-background: $color-white;
$autocomplete-value-border-radius: .2 * $unit;
$autocomplete-value-margin: $unit * .25 $unit * .5 $unit * .25 0;
$autocomplete-value-padding: $unit * .5 $unit * .75;

But i couldn't find a way to overwrite $autocomplete-suggestion-active-background in my code.
Using toolbox-loader I was able to override the _colors.scss and _globals.scss, but that's all. Is there any way to override the variables defined inside the _config.scss files for every component ?

Could anyone answer me, before i move on to https://github.com/jscissr/react-polymer https://elements.polymer-project.org/browse?package=paper-elements ?

Hi @rgranger sorry for the late response.
The proper way to handle theming is overriding sass variables as it's explained in the documentation. You can use the react toolbox example repository to guide yourself in the configuration. About the data-react-toolbox attributes, you are right. The best would be to add attributes for every node that is likely to be customized. We just accepted a PR about it so it will come next weekend with a new release

Hi @javivelasco. You mentioned above that

The best would be to add [data-*] attributes for every node that is likely to be customized. We just accepted a PR about it so it will come next weekend with a new release

Can you elaborate on this?  Which PR was this?  Are the changes in the dev branch right now?  I was looking over the first few components (dev branch and others) and mostly I just see data-react-toolbox attributes on wrapper div elements (not sub-elements of the component).

Now you should with the new approach!


Mention installing prerequisites for using Tauri

https://next--tauri.netlify.app/next/guides/getting-started/prerequisites/
I couldn't figure out how to get the app to build until I found this page, so I think it might be a good idea to add that to the README in case anyone else has the same issue in the future.
Thank you for the great template!

The "Prerequisites" totally slipped my mind! Thank you for taking the time to share your suggestion - it will be helpful to others in the future.


Issue #10: Get music working

Hey @iwalton3
I've added support for music.
I haven't gone through and done all the queue-rewriting that would need to be done to get gapless playback and queue editing working - they can be added at a future date if needed
Cheers

Sorry that this hasn't been merged yet. I still need to review and test it.

Just looked at this in my test environment and can confirm it works. Thanks for the good PR, sorry it took so long to look at.


What's a good way to get rid of Socket.io without crippling hot reload?

I don't need socket.io on production (and not going to send messages between client and server). So what's a good way to clean that up without messing up dev process?

You should be able to just comment out references to socketio, i dont believe hot reload uses it

Oh okay, I was trying to read up and I guess got confused by this: https://github.com/erikras/react-redux-universal-hot-example/issues/347#issuecomment-148077794
So far, I've commented out:
In api/api.js: //io.listen(runnable);
In src/client.js: //global.socket = initSocket();
And it seems to have stopped /ws updates. Hopefully this hasn't messed up anything else. Thank you @kjanoudi, closing for now.

@ivanakimov i commented out the following:
client.js:

// import io from 'socket.io-client'

// function initSocket() {
//     const socket = io('', {path: '/ws'})
//     socket.on('news', (data) => {
//         console.log(data)
//         socket.emit('my other event', { my: 'data from client' })
//     })
//     socket.on('msg', (data) => {
//         console.log(data)
//     })

//     return socket
// }

// global.socket = initSocket()

server.js:

// app.use('/ws', (req, res) => {
//   proxy.web(req, res, {target: targetUrl + '/ws'})
// })

// server.on('upgrade', (req, socket, head) => {
//   proxy.ws(req, socket, head)
// })

and my app works with hotreload still

Perfect, thanks for the snippet @kjanoudi! :)


Issue with positions for Jordan in generated.json

I'm unable to generate an IBAN for Jordan and this seems to be related to the fact that the positions for account_code and branch_code are the same in generated.json.

Fixed by #83


Java 6.3: Switch Expressions

Description
Description
Description Add audio, Documentation, and Video regarding the Switch Expression.

Location of File to be added
The files should be added inside the Switch Expression  folder which is inside the Control Statements  folder present in the   Java  main folder.  The documentation file can be in the .md/.py/.ipynb format. Audio should be in .mp3 format and to be submitted through a Google drive link. Video can be in any format and should be submitted through a Google Drive link.
Note:

You are required to comment with \assign CONTENT_TYPE , so that other content types can be created at the same time.
Failing to comment in the above manner will lead to the removal of assignment from the issue even if the bot assigns.
You are required to do a PR within 7 days otherwise you will be unassigned and others will be assigned.
Issues will be assigned on a first come first serve basis.

Domain
Java_Domain
Type of Contribution
Audio, Video, Documentation
Code of Conduct

[X] I follow Contributing Guidelines & Code of conduct of this project.

/assign

Will do the document part

@garvitraj please assign me the document part of this issue

/assign document

/assign audio

\assign audio

@eshan1925 You have been assigned documentation

I have added the switch case expressions. You can merge the PR if there is no issue @AkMo3 and @garvitraj .

@AkMo3 Please review now opened new PR #2055 . Please merge if no issues.

@Palak-Srivastava go with the audio

@garvitraj She had already been assigned to #1903 so she cannot be appointed.

@garvitraj i want to work on documention. can you assign me?

/assign audio

@kashyap1905 ko with audio


Return presigned URL from S3

Sometimes it is important to have de presigned URL from Amazon S3.
It is much faster read direct from there.

Thanks ❤

@FabioMR hi. Can you briefly explain what this pull request does and why it's useful? I'm just curious and I can't tell by the comment you left.

I believe you can get the idea from here: https://blog.fyle.in/sharing-files-using-s3-pre-signed-urls-e05d4603e067

@abitdodgy The article above explain better. Thanks @sobrinho!

@FabioMR would be nice to receive another pull request including some documentation about how to use that feature with refile.
Can you do that?


[FORMATTING] AS is trimmed in CAST function

Describe the bug
AS is trimmed in CAST function when the "Use AS in alias" option is "Never"
SELECT
  CAST(0 AS bit),
  'foo' AS bar

Expected Output
SELECT
  CAST(0 AS bit),
  'foo' bar

Actual Output
SELECT
  CAST(0 bit),
  'foo' bar

Usage

How are you calling / using the script? (Please provide a code snippet, if applicable)
https://inferrinizzard.github.io/prettier-sql/

What SQL language(s) does this apply to?
Any

see also #76


Official Website RWD

It is not well supported mobile currently.

This lab is aimed at platform of pc currently


Json processdata fix for objects with zero-indexed keys

Q
A

Is bugfix?
✔

New feature?
❌

Breaks BC?
❌

Tests pass?
✔

Fixed issues
-

Fixed bug when an object with zero-indexed keys (ie indexed array cast to stdClass) is encoded to JSON as array instead of dictionary.
$json = Json::encode((object)[0 => 'value']);

Expected output: '{"0": "value"}'
Actual output: '["value"]'
This fix allows ensuring dictionary in JSON output for strict API consumers (ie TypeScript) and resolves inconsistent return types.
Not to break BC - added option for Json and JsonResponseFormatter which is false by default

Looks basically like the right thing to do, but ... it's hard to tell, if this change might have crazy side-effect in existing applications.

It's true. One argument for it is that json_encode() behaves just like that but I'm not sure if we should change it.

If you're not sure also - I think we shouldn't :)
CC @samdark @cebe

I do not think it is breaking change though, because in Javascript both variants are accessible in the same way:
const obj1 = {"0": "test"};
const arr1 = ["test"];
obj1[0] === arr1[0] equals true
Why it matters is when you define a TypeScript interface for API responses, you want this to be consistent:
interface Test {
    obj1: {
        [id: number]: string,
    }
}
´´´

And yes, this is how json_encode behaves.

I think that in other more strict languages this bug may actually cause errors and developers might just use json_encode instead of Json::encode() to bypass it.
If you fear this might really might be a breaking change (for some other languages besides JS), then we could add a new option flag for it or add it in a minor version instead of patch version?

Option-flag would be totally fine.

I think this is BC, developers might have used it intentionally. Json is not only used by JS.
But as it is more sane, I would prefer this to be default - just like json_encode.
It would require an upgrade notice. A possible workaround is:
$json = Json::encode((array)$object);
But as far as I know yii2 does not introduce BC, so it needs to be a flag I guess.

Please add a changelog line and a mention in UPGRADE since there are some changes in the behavior.

Running workflows must be approved, can anyone do that?

why not use JSON_FORCE_OBJECT in \yii\web\JsonResponseFormatter::$encodeOptions ?
$data = [0 => 1, 1 => 2];
echo json_encode($data); // [1,2]
echo json_encode($data, JSON_FORCE_OBJECT); // {"0":1,"1":2}

$data = (object)[0 => 1, 1 => 2];
echo json_encode($data); // {"0":1,"1":2}
echo json_encode($data, JSON_FORCE_OBJECT); // {"0":1,"1":2}

JSON_FORCE_OBJECT forces all nested arrays to be cast to object, this is not default json_encode behavior.
(object)[[1,2],[3,4]] for example should keep nested arrays

php assoc array converts to json object, objects like as ArrayIterator([1, 2]) converts to json array in any case...

Looks good except minor issues to be fixed.

you fix no effect in case:
if ($data instanceof \JsonSerializable) {
     return static::processData($data->jsonSerialize(), $expressions, $expPrefix);
}

namespace app;
use yii\helpers\Json;
class ArrayObject extends \ArrayObject implements \JsonSerializable
{
    public function jsonSerialize()
    {
        return $this->getArrayCopy();
    }
}

Json::$keepObjectType = true;
$json = Json::encode(new ArrayObject([1, 2])); // still return `[1, 2]`, not `{"0":1,"1":2}`

you fix no effect in case:
if ($data instanceof \JsonSerializable) {
     return static::processData($data->jsonSerialize(), $expressions, $expPrefix);
}

namespace app;
use yii\helpers\Json;
class ArrayObject extends \ArrayObject implements \JsonSerializable
{
    public function jsonSerialize()
    {
        return $this->getArrayCopy();
    }
}

Json::$keepObjectType = true;
$json = Json::encode(new ArrayObject([1, 2])); // still return `[1, 2]`, not `{"0":1,"1":2}`

Yes, this is still not converted to object, but it it the same for json_encode(). This is because jsonSerialize() method returns array, not object.
In our applications we cast the result to object before sending to encoder. Usually an object does not serialize to array, but if it does then it should be encoded as array also. In your case if you need ArrayObject to be serialized as an object then jsonSerialize() must return an object for that class (which is valid by JsonSerializable interface).
public function jsonSerialize()
{
         return (object)$this->getArrayCopy();
}

To keep data type... don't change data type (:
protected static function processData($data, &$expressions, $expPrefix)
{
    if (is_object($data) && $data instanceof Arrayable) {
        $data = new \ArrayObject($data->toArray());
    }
    if (is_object($data) && $data instanceof JsExpression) {
        $token = '!{[' . $expPrefix . '=' . count($expressions) . ']}!';
        $expressions['"' . $token . '"'] = $data->expression;
        $data = $token;
    } elseif (is_array($data) || (is_object($data) && $data instanceof \ArrayAccess)) {
        foreach ($data as $key => $value) {
            if (is_array($value) || is_object($value)) {
                $data[$key] = static::processData($value, $expressions, $expPrefix);
            }
        }
    }

    return $data;
}

@zebraf1

In your case if you need ArrayObject to be serialized as an object then jsonSerialize() must return an object for that class (which is valid by JsonSerializable interface).

we talk not about me - users don't know it, your solution must cover all variants or you mark it in docs: "no effects on Arrayable, JsonSerializable and JsExpression objects"

Updated version, merged master and resolved conflicts. Is it ok now?


"python.envFile" in workspace settings is not used.

Environment data

VS Code version: 1.20.2
Extension version (available under the Extensions sidebar): 2019.1.0
OS and version: linux (Ubuntu 18.04)

Expected behaviour
Setting "python.envFile" should be respected.
Actual behaviour
It is not.
(the default env file and the setting in launch.json both work fine)
Steps to reproduce:
project:
my-project/
    .env2 -- "SPAM=1"
    test.py -- "import os; print(os.environ['SPAM'])"

Run the debugger.  It should pick up the environment variable.
(Also see #2312.)

Our test plan says this should work.

Closing in favor of $4537


Error when sorting paginated table

I have a larger table with pagination. Sitting on page 1 I can sort whatever I like. When I navigate to the next page and want to sort differently, I end up with an empty table and this error:
Error: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.
at updateRenderedRows (table.js:1556)
at generateTemplate (table.js:1957)
at table.js:577
Sample solution attached. To reproduce, open solution and sort by Quantity. The navigate to page 2 and sort by Quantity the other direction.
key_components.zip

This is already fixed right?

the commit that fixed this issue : https://github.com/Servoy/servoy-extra-components/commit/5cbbd66abe00ba735489ebb5cd583a57f2443778


Phone-number: Add missing tests and adjust example to suit changes

Fixes #124

I note that the x-common test spec expects null to be returned for invalid cases. Currently the example returns, and the tests expect, "000000000". Is this acceptable or should it be changed?

This looks fine to me. :+1:
The x-common tests are up for interpretation per each language. Returning all 0's is probably fine, though it may be a little weird. I'd be supportive of a change to using null though.


Typo of environment variable within README.md

There seems to be a typo within README.md:
// Using environment variables IMAGEKIT_PRIVATE_KEY, IMAGEKIT_PUBLIC_KEY and IMAGEKIT_URL_ENDPOINT
ik, err := ImageKit.New()

All worked after changing env variable from IMAGEKIT_URL_ENDPOINT to IMAGEKIT_ENDPOINT_URL after reading carefully the error message "IMAGEKIT_ENDPOINT_URL envvar not set".
Also, I think it would be great addition to include initialization code snippet to Developer options within Imagekit.io.  - Seems to be missing from there :)

Thank you. Readme updated. Soon we will update code snippets in dashboard


feat(date-picker): append calendar to selector or DOM element

Allow the Date Picker calendar to be appended to either a passed DOM
element or a string selector
Closes IBM/carbon-components-react#1220
Changelog
New
Changed

appendTo prop now accepts a string DOM selector as well as a DOM element which to append the flatpickr calendar

Removed

@asudoh great point!
Removed the extra code as suggested.
Should be all good to go now! Thank you 👍


Can ungoogled-chromium protect me from malicious files?

I wanted to ask, can ungoogled-chromium protect from malicious files? Because soon I'm go to city, and the laptop is temporary gives to my little brother. If my little brother download something bad for notebook, can ungoogled-chromium cancel download malware?

No.


Usage

Can it be applied to links with a particular class without using rel with dynamically sourced content in the tooltip? I am thinking something like clicking a link with a class 'define' which then opens the footnote with dynamically sourced content based on the text found in the define link:
JS:
$('.define').bigfoot({
content: $("h3:contains('"+$(this).text()+"')" ).next('p').text();
});

HTML:
Information

Information

Footnote copy

I understand the desire for this, but I feel like it's too far out from the core purpose of this tool. This particular tool is really for dropping onto a typical blog post and having it just make things better, not a generalizable utility for tooltips.

Thanks Chris,
No worries. I managed to get it working how I wanted using your API. I noticed one mistake in your api for buttonMarkup (although the functional JS is correct):

 <svg class="bigfoot-footnote__button__circle" viewbox="0 0 6 6" preserveAspectRatio="xMinYMin"><circle r="3" cx="3" cy="3" fill="white"></circle></svg>
 <svg class="bigfoot-footnote__button__circle" viewbox="0 0 6 6" preserveAspectRatio="xMinYMin"><circle r="3" cx="3" cy="3" fill="white"></circle></svg>
 <svg class="bigfoot-footnote__button__circle" viewbox="0 0 6 6" preserveAspectRatio="xMinYMin"><circle r="3" cx="3" cy="3" fill="white"></circle></svg>

should be:

 <svg class="bigfoot-footnote__button__circle" viewbox="0 0 6 6" preserveAspectRatio="xMinYMin"><circle r="3" cx="3" cy="3" fill="white"></circle></svg>
 <svg class="bigfoot-footnote__button__circle" viewbox="0 0 6 6" preserveAspectRatio="xMinYMin"><circle r="3" cx="3" cy="3" fill="white"></circle></svg>
 <svg class="bigfoot-footnote__button__circle" viewbox="0 0 6 6" preserveAspectRatio="xMinYMin"><circle r="3" cx="3" cy="3" fill="white"></circle></svg>

Best regards,
Keiron
Keiron Roberts
e<EMAIL_ADDRESS><EMAIL_ADDRESS>m: +44 (0)7740 190 913
t: +44 (0)845 003 7246
skype: keironroberts
jerram.com http://www.jerram.com/
http://www.linkedin.com/company/jerram  http://www.linkedin.com/company/jerram http://twitter.com/JerramCulture/
http://twitter.com/JerramCulture/
/culture  http://www.jerram.co.uk/culture/category/company| /keiron http://www.jerram.co.uk/culture/keiron
Jerram Marketing Ltd. | Atlantic House | Imperial Way | Reading | RG2 0TD
Disclaimer
The information in this e-mail and any attached files is confidential. If you are not the named recipient, or have otherwise received this communication in error, please delete it from your inbox, notify the sender immediately, and do not disclose its contents to any other person, use it for any purpose, or store or copy the information in any medium. The views of the author may not necessarily reflect those of the company.
Please note that neither Jerram Marketing Limited nor the sender accepts any responsibility for viruses and it is your responsibility to scan this message and any attachments.
Jerram Marketing Limited | Registered in England & Wales No. 5932754 | Registered office: 5 South Parade, Summertown, Oxford. OX2 7JL

On 31 Mar 2016, at 12:56, Chris Sauvé<EMAIL_ADDRESS>wrote:
Closed #52 https://github.com/lemonmade/bigfoot/issues/52.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub https://github.com/lemonmade/bigfoot/issues/52#event-609679413


New foreign key: reference column automatic create

Now we must create reference column in column list and then create foreign key.
It is much more convenient to create ref column automatically.
We can add extra button or fake name in drop-down column selector.
We also need to specify ref column nullability.
Note: we also may want to add new column as primary/unique key. I believe we have another ticket about it. https://github.com/dbeaver/pro/issues/2192


Enhancement: playing a specific section in the editor ingame

would be useful for something like modfiles

seconding this, in fact an editor as similar as Stepmania/Etterna built into the game would be the most optimal idea.

you mean playtesting from a specific section?


Validate balance values as a part of block message validation

Resolves this TODO:
# TODO(dmu) CRITICAL: Validate balance values

Implemented here: https://github.com/thenewboston-developers/thenewboston-node/pull/58


Backwards incompatible changes in Blake3 0.3.5

Blake3 0.3.5 updated Digest from 0.8.1 to 0.9.0.  That brought in several backwards-incompatible changes, as Digest's CHANGELOG shows.  Changes like this should only be made with a minor version bump (or major version if you're past 1.0.0).
https://github.com/RustCrypto/traits/blob/master/digest/CHANGELOG.md

There was some discussion here: https://github.com/BLAKE3-team/BLAKE3/pull/90
I have mixed feelings about this. Of course you're correct, that anything that's likely to break calling code should strictly speaking be indicated as a breaking change in the version number. On the other hand, I've been on the fence about including digest trait implementations in this crate, for exactly that reason. This crate is generally pretty stable (the pre-1.0 version number notwithstanding), so doing an incompatible version bump because of a version bump in what is effectively an optional dependency feels like the tail wagging the dog to me. A "better" solution would be to have a third crate, which implements digest traits on thin wrappers around blake3 types. However, that would be more crate names to keep in our heads, and lots of folks would get confused by compiler errors about how blake3::Hasher doesn't implement digest::Digest. ("You can't use blake3::Hasher here, you need to use blake3_digest::Hasher." Literally unplayable.)
In the end, I've kind of settled on this "dirty" approach, where in practice (one time so far) I've treated the digest dependency as exempt from the stability guarantee of this crate. I assuage my own guilt over this by focusing on how in the distant future, when both crates are 1.0, thing will be stabler. If it looks like this is going to keep happening with any regularity, I should explicitly document it, but it's not clear to me that it will.


Batch Operation to create Customer

Hi All,How i can run batch operation? I would like to create multiple customer. I'm using .net SDK. Please see my example for single customer.
CustomerCreate create = new CustomerCreate()
        {
            CustomerName = "Test User",
            CustomFields= new Dictionary<string, dynamic>() { { "AccountRef", "Peter" } },
        };
        Task<OnlineResponse> createTask = client.Execute(create);
        createTask.Wait();

How I achieved to send multiple customer request means batch operation for customer?
@intacctcoleenho @jimmymcpeter Could you give me a sample code please.
Thanks, Liton

Check out the block of code in the unit test here -- https://github.com/Intacct/intacct-sdk-net/blob/master/Intacct.SDK.Tests/OnlineClientTest.cs#L229-L242

Thank you @jimmymcpeter


[BUG] Scoreboard

Affected platform
Launcher
Describe the bug
I don't really understand the score board ranking system on the power up sheet and I also don't think it is working right.
Expected behavior
I have won more than once and I don't think its adding up my score correctly.
Additional information
I don't know if I am doing something wrong but i just want to make sure.

Yes, this system is currently not working. We have an open issue for this here: #43. There is no ETA for now.

As for the manual on how this mechanism works, I'll probably prepare some description once the ranking will work.


Add a instruction manual

Hi Massa crew I identifed their is a issue -:Think after realising this app into playstore or appstore people who uses this app through play store or appstore  doesn't know how to work with this app since their isn't an instruction manual  . So I suggest you  that add a instruction manual then this issue will not appear in the future.

@ns200310 There is not instruction manual yet because it is still work in progress.


Improving Website loading and working

Currently

The images on the website are taking time to load as they are in png format.
I will convert it into webp format

Advantages of webp over png
Smaller File Size :

WebP images typically have a smaller file size compared to PNG images while maintaining similar image quality. This results in faster webpage loading times, reduced bandwidth usage, and improved overall user experience.

Wide Browser Support:

WebP is supported by major web browsers, including Google Chrome, Opera, and Microsoft Edge. Additionally, popular image editing software like Adobe Photoshop and GIMP provide WebP support, making it easy to work with these files.

Faster Image Loading:

With smaller file sizes, WebP images can be downloaded faster by website visitors. This leads to quicker rendering of images on the page, resulting in a better user experience.

Bandwidth Savings:

The reduced file size of WebP images means less data needs to be transferred between the server and the user's device. This can be particularly advantageous for websites with a large number of images or for users on limited bandwidth connections.

Sure @parasss19


Ping labs directors on Saturday and Sunday about curriculum and attendance

This can be closed when each of the labs directors who haven't filled out their club data on the day their club meets is sent a text message.
We have data from:

USC Hybrid High School

Any clubs we don't get a response from after texting, feel free to call.

@MaxWofford this issue's description doesn't seem to account for pinging club leaders who haven't filled out what they are planning to do in next week's club meeting by Saturday?

Resolved with @jonleung in person.


Cannot include more than one component in the same view

Trying to include 2 components on the same view.

Hey @andruu @Abdallah-Tah
You mean 2 Mingles, right? meaning 2 Livewire classes?
I'll check tomorrow morning and let you know.
Thanks for the feedback 👍

Tomorrow I'll double check all scenarios. Just wanted to be sure your scenario.
2 instances of the same base component (e.g.: 2 instances of resources/js/Foo.js)
or
1 instance of "Foo" and 1 instance of "Bar"??

Including 2 mingle components on the same page

I'm having a look today

What causes the error as reported above is the use of two Livewire components with MingleJS, as shown in the image below:

Well, I did some tests and realized that it's not possible to have two independent livewires mingleJs regardless of the chosen stack. Whether it's React + React or React + Vue or Vue + Vue, any combination will cause an error.
As already reported above, in the devtools it is possible to see that the error is in the boot of the second windows.Mingle.Elements, only the first one is properly stored and it is possible to occur the boot.

Thank you for the analysis.
I'm able to change that, don't worry.
In the proof of concept, I put 3 mingles on the same page, 2 Vue e 1 React, for example.
https://github.com/ijpatricio/minglejs-demo/blob/main/resources/views/vue-composables.blade.php

This is perfectly viable, I'll change it.

Great. I eagerly await the correction

Hey everyone.
This is fixed in v0.0.14 which is available now.
I'll release today the demo, if I have time, if not, tomorrow.

Hey all,
I still didn't announced, but it's released 🎉
https://minglejs-demo.unitedbycode.com
Thanks for the support!!


Fix bug in pad operator from dimension reduction

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (fff12a2) 91.38% compared to head (d7c8f19) 91.38%.
 Consider uploading reports for the commit 426eb8c to get more accurate results

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2408      +/-   ##
===========================================
- Coverage    91.38%   91.38%   -0.01%
===========================================
  Files          456      454       -2
  Lines        17241    17189      -52
===========================================
- Hits         15756    15708      -48
+ Misses        1485     1481       -4

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Figure out how we should grab gtest

This could just be that we include all the source, or it could be something else.

Per our discussion about this, I pulled in gtest as a subtree. Like the old solution, this means that people who grab our repo don't have to install gtest separately. Also, this now works if people are offline.


languageChanged is fired refreshing the page

Describe the bug
Using this hook:
export default function useCleanStorageAfterChangeLang() {
  useEffect(() => {
    function cleanStorage() {
      sessionStorage.clear()
    }

   i18n.on('languageChanged', cleanStorage)

    return () => i18n.off('languageChanged', cleanStorage)
  }, [])
}

I expect that the event fires the cleanStorage callback only when the language change. However, looks that every time that the hook is mounted (when I refresh the page), the callback is called although the language is the same.
Occurs in next-i18next version
I guess is happening from time ago. However, I'm currently using 0.51.0.
Steps to reproduce
Use the above hook in some page.
Expected behaviour
Only fire the languageChanged event when the language is different. I guess that should fire after refreshing the page only in the case that the user manually rename the lang from the url.

How is this a problem? Why does your SPA make assertions about state across hard reloads?
I believe that next-i18next and react-i18next itself will do intentional lang changes on mount to prevent some weird problems that arise if you don't.
Happy to see a PR for this, but it'd be much safer on your side to use a different approach.

How is this a problem? Why does your SPA make assertions about state across hard reloads?

In my case, I have this problem because there are parts of my platform that are not part of Next.js yet. Of course, navigating between Next.js pages is not a real problem. The problem comes navigating to an old part, and then returning to the new part.

I believe that next-i18next and react-i18next itself will do intentional lang changes on mount to prevent some weird problems that arise if you don't.

I don't know... However, the docs say that this event is fired after changing the language, and it's not the current behavior. For this reason, I reported. Of course, If it makes no sense, just close it :)

Happy to see a PR for this, but it'd be much safer on your side to use a different approach.

I can try to do a PR. But before it, maybe its better if we first clear up what this event should do exactly.

I misspoke. We're doing a lang change here in getInitialProps, but only during SSR.
Can you please trace the stack of the languageChanged event which you believe is erroneous, and let me know where it is coming from?

I fixed in my side doing a different approach, without the languageChanged event.
I close this issue because I don't want to do a breaking change if the languageChanged  is designed in a different way that I was supposing.

Okay, fair enough. I do indeed believe that the lang change is coming from react-i18next itself, as this is part of the withSSR HOC.

@isaachinman Sorry I didn't see your last message. I guess that the i18n event is fired after the initialization also. Feel free to reopen it if you think that is not the correct behavior of https://www.i18next.com/overview/api#onlanguagechanged

@aralroca This repo doesn't deal with the core behaviour of any of the i18next projects. You'd need to open an issue in the react-i18next repo based on this line.
That said, I'm not sure if it's actually a bug. My initial feeling is that it's not reasonable to rely on languageChanged being dependable across hard refreshes.


PT006 fix adds unneeded parenthesis

PT006 seems to add additional parenthesis in case the string is already wrapped in a parenthesis to split it into multiple lines.

@pytest.mark.parametrize(
    (
        "create_backup_error, create_backup_calls, "
        "update_addon_error, update_addon_calls, "
        "error_message"
    ),
	[...]
)

Results in:
@pytest.mark.parametrize(
    (
        (
            "create_backup_error",
            "create_backup_calls",
            "update_addon_error",
            "update_addon_calls",
            "error_message",
        )
    ),
    [...]
)

Expected:
@pytest.mark.parametrize(
    (
        "create_backup_error",
        "create_backup_calls",
        "update_addon_error",
        "update_addon_calls",
        "error_message",
    ),
    [...]
)

Thanks :)

Ohh interesting, because the expression is itself parenthesized already. Hmm...

So, I was looking at the recent commit (https://github.com/charliermarsh/ruff/commit/abaf0a198d9d2cebefd5c029bb271be1a3498f20) and thought of a similar approach in solving this problem.
The indexer will collect all the ranges for a pair of parenthesis (( to )). Then, while trying to generate a fix for the above case, we'll check how many ranges does the string expression range belongs to. If the value is 2, we won't add the parenthesis otherwise we will.
I'm not sure if you've any other solution in mind so just thought to share this.

Actually, I've a better solution in mind, will try to fix it by tonight.

Thanks, @dhruvmanila 👍
../Frenck

Another all-star contribution from @dhruvmanila :)

Another all-star contribution from @dhruvmanila :)

Thanks for your kind words! Always happy to help wherever I can 😄


Receipt Cards are not rendered with design margins for mobiles.

Closing as stale, please open a new issue if reproduced on WebChat v4


How to use ASP.NET Core 5 APIs in a class library?

The article  goes into a lot of detail but the focus seems to be on target framework netcoreapp3.0 - there's no mention of target framework net5.0 so here is what I tried on my own:
I created a C# class library using the standard template and targeting net5.0. I then unloaded the project and edited the project file to read as follows:
<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>net5.0</TargetFramework>
    <OutputType>Library</OutputType>
  </PropertyGroup>
</Project>

...when I reloaded the project Visual Studio was happy to load my class library project and it looked like this (just like an ASP.NET Web API project would look):

I was then able to test that ASP.NET APIs can be used by moving the following Startup.cs file into the class library:

using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

namespace AspNetClassLibTest
{
  public class StartupLib
  {
    public void ConfigureServices(IServiceCollection services) { }

    public void Configure(IApplicationBuilder app, IWebHostEnvironment env) {
      if(env.IsDevelopment()) {
        app.UseDeveloperExceptionPage();
      }

      app.UseRouting();

      app.UseEndpoints(endpoints => {
        endpoints.MapGet("/", async context => {
          await context.Response.WriteAsync("Hello World from lib!");
        });
      });
    }
  }
}

I referenced the class library in my ASP.NET Web API project and it looked as follows:

The Program.cs file references the StartupLib class defined in the class library:
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;

namespace AspNetClassLibTest
{
  public class Program
  {
    public static void Main(string[] args) {
      CreateHostBuilder(args).Build().Run();
    }

    public static IHostBuilder CreateHostBuilder(string[] args) =>
        Host.CreateDefaultBuilder(args)
            .ConfigureWebHostDefaults(webBuilder => {
              webBuilder.UseStartup<StartupLib>(); // <----- reference class from class library.
            });
  }
}

Running the Web API project produces the expected output:

This seems to be working (my house hasn't blown up) as I expect, but I am wondering if there's something I am missing that could come back to cause me grief down the line?
My use case is as follows: I have 9 different Web API projects and all of them have almost identical code in the Startup.cs file so I wanted to move that ASP.NET-related code to a class library and reuse it in all projects.
If the process I followed above is the correct way to do this for ASP.NET Core 5 projects, then it would be helpful to update the docs (I am happy to do a PR based on the above steps if they can be confirmed to be correct) :+1:

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

ID: 98629146-7d64-9f48-6e45-51bafe8c7116
Version Independent ID: cdb2b89f-bf1c-f313-0062-7f6b7ef8b611
Content: Use ASP.NET Core APIs in a class library
Content Source: aspnetcore/fundamentals/target-aspnetcore.md
Product: aspnet-core
Technology: aspnetcore-fundamentals
GitHub Login: @Rick-Anderson
Microsoft Alias: scaddie

I usually just delete the file, though I imagine its harmless to leave it there just to prevent Visual Studio from trying to recreate it each time 👍

I just read Andrew Lock's blog where he writes about how you can stop the launchsettings file being created  How to stop Visual Studio from creating launchsettings.json
Just add
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>

to the csproj file.

@martinstenhoff thanks a lot for sharing that tip, it works like a charm!
I have updated the instructions on how to edit the project file, so it now includes <NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>

Alternative solution (that seems to work at least):
<Project Sdk="Microsoft.NET.Sdk">

  <ItemGroup>
    <ProjectCapability Include="AspNetCore" />
    <FrameworkReference Include="Microsoft.AspNetCore.App" />
  </ItemGroup>

</Project>

This does not turn your project into a "web project". Not going to pretend to know why this works. But it seems to do so without problems. Both from command line, and in VS:

@Alxandr: Not going to pretend to know why this works.

It appears project capabilities are documented here  and the known capabilities are here yet somehow AspNetCore is not on that list. Despite being open source (see VSProjectSystem and dotnet/project-system) the project system seems to possess mysterious powers (like <NoDefaultLaunchSettingsFile> mentioned by @martinstenhoff above) that only a few people seem to understand!

@Alxandr Are you sure <ProjectCapability Include="AspNetCore" /> is needed? I seem to run just fine without it, I only added <FrameworkReference Include="Microsoft.AspNetCore.App" />. My usages are mainly ActionResult, ModelStateDictionary and similar types.

It did not work without it for me. It didn't find the framework.

This is the minimal project structure I'm currently testing out, seems to work well here with SDK 5.0.302.
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net5.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <FrameworkReference Include="Microsoft.AspNetCore.App" />
  </ItemGroup>
</Project>

I'm using Visual Studio. It didn't work for me. Might be other reasons though.

@Alxandr I face with the same issue, make sure that you register app.UseRouting(); before you Middleware

This has nothing to do with middleware. There's not even an application involved. We're just talking about referencing DLLs.

So in the end this ends up being the same for .NET 5 as it was for .NET Core 3.x right?

Yes


curly braces

Describe your problem
Impossible to install on php 8+
install.php doesn't display - white page
Steps to reproduce the problem
install Bludit with php 8+
Steps to fix the problem
Curly braces in bl-kernel/helpers/text.class.php on line 119
change $text .= $characteres{rand(0,41)};
to $text .= $characteres[rand(0,41)];
Bludit version
3.8.1, 3.15.1
PHP version
8.2.8
PHP logs

@Philip-Wittamore the code is written as you mentioned, https://github.com/bludit/bludit/blob/v3.0/bl-kernel/helpers/text.class.php#L119


Semtantic HTML

Semantic HTML
User Story
As a full stack web developer student,
I want to improve the preexisting code given to me and make it more semantic,
So it is easier to read as a coder and is more accessible to users with disabilities.
Acceptable Criteria
WHEN I look at the source code
THEN I can see the elements of the site properly tagged with semantic HTML tags that retain the original functionality

Html semantics added. The original design of the web page remained intact.


Rename astro_pi to sense_hat

Need to change the import line;
from astro_pi import AstroPi

to
from sense_hat import AstroPi

in order for the code to be compatible with the current Sense HAT library.

Done


Pubs 1197

Implements a new page to create and edit series title. Since the service calls to fetch, save, update, and delete the series title are REST service calls, the SeriesTitleModel needs very little customization.

Looks ok to me.


[MB-13532] Prime can update shipment with scheduled and actual delivery dates

Jira ticket for this change
Summary
This PR adds two new optional fields to shipments:

Scheduled delivery date
Actual delivery date

and allows them to be viewed and set with the Prime API.
Once they have been set, they can be overwritten, but they cannot be set to null.
Other than that, there's no validation or logic around what dates you can set or when they can be set.
I did not add the new fields to the payloads for any of the other APIs.
Setup to Run Your Code
run migrations
make db_dev_migrate

start server and client in separate terminals
make server_run

make client_run

Additional steps
https://user-images.githubusercontent.com/2627844/187993686-02538cb7-f43c-4609-85b0-5e00df69da6d.mov

Open office app
Login as a prime simulator user
Click on any move in the queue
Update its Scheduled delivery and Actual delivery dates
Save the shipment
Verify that you can see the updated values in the fields

Here are some things to watch out for that tripped me up and made me think I had found bugs while testing:

it's really easy to get the pickup and delivery date fields confused.
If a move has multiple shipments, the order that the shipments are displayed in can change. It helps to make a note of the shipment ID to make sure you're looking at the right one.

Verification Steps for Author
These are to be checked by the author.

[x] Have the Jira acceptance criteria been met for this change?

Verification Steps for Reviewers
These are to be checked by a reviewer.
Frontend

[ ] User facing changes have been reviewed by design.
[ ] There are no aXe warnings for UI.
[ ] This works in Supported Browsers and their phone views (Chrome, Firefox, IE, Edge).
[ ] There are no new console errors in the browser devtools
[ ] There are no new console errors in the test output

Backend

[ ] Code follows the guidelines for Logging
[ ] The requirements listed in Querying the Database Safely have been satisfied.

Database
Any new migrations/schema changes:

[ ] Follows our guidelines for Zero-Downtime Deploys
[ ] Have been communicated to #g-database

Warnings

:warning:
This PR does not include changes to unit tests, even though it affects app code.

Messages

:book:
:link: MB-13532

  Generated by :no_entry_sign: dangerJS against f33c1473df4e92d34c9af5bb566acbb375141e46

Taking a look a this today to review @mboren. But anyone else can also review it if they want to 😄


Wbc 623  Update Bitdash player to Version 7 (typescript 2.3, webpack 2.6, structure..)

Coverage remained the same at 100.0% when pulling 2128df63d5efab8fc27ab140b1c1684cde3fd14e on WBC-623 into d3aa406e3b55ec7ed878e4c137341b16af860b2d on master.

Coverage remained the same at 100.0% when pulling 2128df63d5efab8fc27ab140b1c1684cde3fd14e on WBC-623 into d3aa406e3b55ec7ed878e4c137341b16af860b2d on master.

Coverage remained the same at 100.0% when pulling 9416406f8a3577515683eb531bbc677059d6df31 on WBC-623 into d3aa406e3b55ec7ed878e4c137341b16af860b2d on master.


No hints when DB name is wrong due to prepended space

Hi team,
Please feel free to change this issue to enhancement, I did not find a way to do this by myself.
Steps:

Go on http://cloud-db.liferay.int/createdb
Select any DB Engine
In the Database Name field put a space, then start to type the DB name

Actual behavior: A red cross indicating an error will appear on the right side of the field. This is good, but there will not be any visual indication saying why the field validation failed, not in the interface, not even when hovering the mouse on the cross.

Expected behavior: There should be a visual indication/tooltip saying that db names cannot contain spaces or the field should trim those, I leave this decision to you guys. Specific business use-case is that a user may enter the value on that field just by copying the text with space from somewhere else
Thanks !

Thanks for the thorough report Alfonso! You're right, we should have something there. For now, I'll label this as an enhancement and ask @balcsida for his input on this, as he's a bit more knowledgeable on this than I am.

Thank you for the feedback, @alfonsocrisci!
I will implement a basic error hinting-something-awesome for fixing this.


Set defaults correctly when a model is provided

Passing another model to Backbone.Model causes incorrect
assignment of attributes if defaults are supplied.  By
checking for instances of Backbone.Model beforehand we
can avoid the issue like we do in set.

I dunno ... do you really think it's best to support the API of passing one model reference directly into another, instead of the explicit model.attributes? I think it's somewhat unexpected. Perhaps we should remove this behavior from set.

I haven't thought of it.  I just assumed this was already supported because of the implementation of clone.  I suppose it's a nice convenience but I don't see any other advantages.

Yes, you're correct that it's probably the reason. Shall we just change the implementation of clone to pass attributes instead?

Sounds good to me.  Patch incoming.


Update mysql2 and other dependencies

mysql2 has a critical vulnerability, so mysql-types-generater is now being flagged as having one too in our builds. This updates mysql2 to version 3, and I'm also updating other dependencies with this.
Despite being a major release there weren't really any user-facing changes that should affect this package.
note: i had to do this with npm i --lockfileversion 2 for compatibility with Node 14 and 16. We're already requiring Node 18 for the CLI tool, so if we're ready to drop 14 and 16 I can switch to the v3 format too.

The typescript update is causing a lot of new errors !

Fixed those errors. There's a lot of casting now which is not super pretty. So if you hate it I can also try to rewrite this.

Thanks for updating the deps. As for removing support for Node 16, I think that's fine. There are a couple projects where I am forced to use Node 16 but I can keep using version 1.xx for those. I can publish the current version (including this PR) as 1.0.9 and then after another PR to update the lockfile we can publish 2.0.0 for node 18+? Does that make sense?

Hey yes that makes perfect sense! Probably good to drop any unsupported Node versions, given that people who are stuck on old versions should just use old versions of packages ;)

I have merge power still so I hope its fine if I press the button! Also happy to do the publish but i don't think I have NPM release power


update(ci): process all charts for changes in values.yaml

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

If this PR will release a new chart version please make sure to also uncomment the following line:

/kind chart-release

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area falco-chart

/area falco-exporter-chart

/area falcosidekick-chart

/area event-generator-chart

/area k8s-metacollector

What this PR does / why we need it:
Updates the CI to process all charts when checking for outdated docs.
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:
Checklist

[ ] Chart Version bumped
[ ] Variables are documented in the README.md
[ ] CHANGELOG.md updated

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: alacuku
Once this PR has been reviewed and has the lgtm label, please assign issif for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

LGTM label has been added.  Git tree hash: 529322215eba7086d3eeab94c2b4a8f9a121b5aa


fix: root/core post workspaces

What:

Additional issues:

:tada: This PR is included in version 10.0.4 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Extract interface from 'types.Controller'.

This PR extracts an interface from types.Controller in order to make it test-friendly for consumers of the SDK.

This had conflicts, so I've merged and conflicts fixed, thank you @bmcstdio

@alexellis thank you, but I don't think the conflicts were properly fixed:
https://github.com/openfaas-incubator/connector-sdk/blame/master/types/controller.go#L139
I am afraid 0.5.0 is unusable as it is.

Feel free to send a follow-up pull request.

@alexellis done. It was not the only issue, it seems.


Fix container.log: No such file or directory in scenarios test

Fix container.log: No such file or directory in scenarios test

[ ] Add a unit test to verify that the fix works.

[x] Explain briefly why the bug exists and how to fix it.

[ ] If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.

[x] Update the CHANGES log.

Hi @liqiangz
As far as I know, ./logs is created by run.sh script in https://github.com/apache/skywalking/blob/c2399c091bab5601e7afbe15689581d2d77f243a/test/plugin/run.sh#L196
Could you give more information about how to reproduce this issue?

I notice the test case, you showed, works well on our plugin-test scenario.

@dmsolr  https://github.com/apache/skywalking/pull/6863/checks?check_run_id=2455313835

@dmsolr Thanks for your reply.
https://github.com/apache/skywalking/pull/6863/checks?check_run_id=2455313835

I checked it. It is successful. It should be accidental, so I think we don't fix this.
How do you think, @wu-sheng ?

@liqiangz If this usually works, I agree there is nothing to fix.

@dmsolr @wu-sheng
Thanks for your reply. I haven’t checked the others carefully, but this error is a must in the okhttp test.
Yean, this does not affect the results of ci. But it will cause the running log to be unable to be seen when running. It will bring some trouble to code debugging.

@dmsolr Please recheck the running logs. Whether do we face this?

In fact, It is harmless and acceptable. But I prefer to fix on run.sh if so.

In fact, It is harmless and acceptable. But I prefer to fix on run.sh if so.

@dmsolr Fixing in run.sh is a better way, I will update it later.
At least fixing it can reduce the confusion of developers running tests locally.

Closing as no root cause.


The blockchain is not progressing when trying to setup with QBFT consensus protocol

Hello everyone,
We are trying to set up a Kubernetes cluster on AWS and want to run a private GoQuorum network with the QBFT consensus protocol on it for some local testing. We created a Kubernetes cluster as mentioned in the documentation. After that, we tried to install the Helm charts with the provided values without modification. The nodes are connecting to each other and can be observed on Grafana as well. The problem is that the blockchain would not start and no new blocks are being created.

The logs from validator1 shows the following:
INFO [07-06|14:31:23.542] Running with private transaction manager disabled - quorum private transactions will not be supported
INFO [07-06|14:31:23.544] Maximum peer count                       ETH=50 LES=0 total=50
INFO [07-06|14:31:23.544] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
WARN [07-06|14:31:23.554] Found deprecated node list file /data/quorum/geth/static-nodes.json, please use the TOML config file instead.
ERROR[07-06|14:31:23.557] Node URL enode://4417debded745dad5a9acfb7c27a8724ace9f864fcdc3e8273f712bde7e29bcbc9e33a43bceb4250e30e5a053fc915256f73dece03232bdfa1c41c3f0e0dce44@goquorum-node-validator-4-0.goquorum-node-validator-4.quorum.svc.cluster.local:30303?discport=0: lookup goquorum-node-validator-4-0.goquorum-node-validator-4.quorum.svc.cluster.local: no such host

INFO [07-06|14:31:23.558] Enabling recording of key preimages since archive mode is used
INFO [07-06|14:31:23.558] Set global gas cap                       cap=25,000,000
INFO [07-06|14:31:23.558] Allocated cache and file handles         database=/data/quorum/geth/chaindata cache=16.00MiB handles=16
INFO [07-06|14:31:23.585] Persisted trie from memory database      nodes=5 size=779.00B time="24.255µs" gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
Fatal: Failed to write genesis block: database contains incompatible genesis (have 81439a26b4b1a99c46d31ede624057bd027e1327b29a0d111490143c05fed0a9, new 0f9b00eb64698fccb4de4aa92cb44ed016cbe3e68a0ac9664d9654c41802e7a0)
Fatal: Failed to write genesis block: database contains incompatible genesis (have 81439a26b4b1a99c46d31ede624057bd027e1327b29a0d111490143c05fed0a9, new 0f9b00eb64698fccb4de4aa92cb44ed016cbe3e68a0ac9664d9654c41802e7a0)
INFO [07-06|14:31:23.634] Starting pprof server                    addr=http://<IP_ADDRESS>:9545/debug/pprof
INFO [07-06|14:31:23.634] Enabling metrics collection
INFO [07-06|14:31:23.634] Running with private transaction manager disabled - quorum private transactions will not be supported
INFO [07-06|14:31:23.636] Maximum peer count                       ETH=50 LES=0 total=50
INFO [07-06|14:31:23.636] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
WARN [07-06|14:31:23.636] Option nousb is deprecated and USB is deactivated by default. Use --usb to enable
DEBUG[07-06|14:31:23.636] FS scan times                            list="30.613µs" set="2.279µs" diff="1.539µs"
TRACE[07-06|14:31:23.636] Started watching keystore folder         path=/data/quorum/keystore
TRACE[07-06|14:31:23.636] Handled keystore changes                 time="84.94µs"
WARN [07-06|14:31:23.636] Found deprecated node list file /data/quorum/geth/static-nodes.json, please use the TOML config file instead.
ERROR[07-06|14:31:23.638] Node URL enode://4417debded745dad5a9acfb7c27a8724ace9f864fcdc3e8273f712bde7e29bcbc9e33a43bceb4250e30e5a053fc915256f73dece03232bdfa1c41c3f0e0dce44@goquorum-node-validator-4-0.goquorum-node-validator-4.quorum.svc.cluster.local:30303?discport=0: lookup goquorum-node-validator-4-0.goquorum-node-validator-4.quorum.svc.cluster.local: no such host

DEBUG[07-06|14:31:23.639] Sanitizing Go's GC trigger               percent=100
WARN [07-06|14:31:23.639] WARNING: The flag --istanbul.blockperiod is deprecated and will be removed in the future, please use ibft.blockperiodseconds on genesis file
INFO [07-06|14:31:23.639] Enabling recording of key preimages since archive mode is used
INFO [07-06|14:31:23.639] Set global gas cap                       cap=25,000,000
INFO [07-06|14:31:23.639] Running with private transaction manager disabled - quorum private transactions will not be supported
WARN [07-06|14:31:23.639] Sanitizing invalid miner gas price       provided=0 updated=0
INFO [07-06|14:31:23.639] Allocated trie memory caches             clean=154.00MiB dirty=256.00MiB
INFO [07-06|14:31:23.639] Allocated cache and file handles         database=/data/quorum/geth/chaindata cache=768.00MiB handles=524,288
DEBUG[07-06|14:31:23.666] Chain freezer table opened               database=/data/quorum/geth/chaindata/ancient table=diffs items=0 size=0.00B
DEBUG[07-06|14:31:23.667] Chain freezer table opened               database=/data/quorum/geth/chaindata/ancient table=headers items=0 size=0.00B
DEBUG[07-06|14:31:23.668] Chain freezer table opened               database=/data/quorum/geth/chaindata/ancient table=hashes  items=0 size=0.00B
DEBUG[07-06|14:31:23.670] Chain freezer table opened               database=/data/quorum/geth/chaindata/ancient table=bodies  items=0 size=0.00B
DEBUG[07-06|14:31:23.670] Chain freezer table opened               database=/data/quorum/geth/chaindata/ancient table=receipts items=0 size=0.00B
INFO [07-06|14:31:23.670] Opened ancient database                  database=/data/quorum/geth/chaindata/ancient readonly=false
DEBUG[07-06|14:31:23.671] Current full block not old enough        number=0 hash=81439a..fed0a9 delay=3,162,240
DEBUG[07-06|14:31:23.671] Account Extra Data root                  hash=000000..000000
INFO [07-06|14:31:23.671] Initialised chain configuration          config="{ChainID: 1337 Homestead: 0 DAO: <nil> DAOSupport: false EIP150: 0 EIP155: 0 EIP158: 0 Byzantium: 0 IsQuorum: true Constantinople: 0 TransactionSizeLimit: 64 MaxCodeSize: 0 Petersburg: 0 Istanbul: 0, Muir Glacier: 0, Berlin: 0  Catalyst: <nil> YOLO v3: <nil> PrivacyEnhancements: <nil> PrivacyPrecompile: <nil> EnableGasPriceBlock: <nil> Engine: unknown}"
INFO [07-06|14:31:23.677] Initialising Ethereum protocol           network=10 dbversion=8
INFO [07-06|14:31:23.677] Initialising Quorum consensus protocol   name=istanbul versions="[100 99 64]" network=10 dbversion=8
INFO [07-06|14:31:23.680] Using SegregatedCacheProvider.
 Smart-contract-based permission service will be disabled error="stat /data/quorum/permission-config.json: no such file or directory"
INFO [07-06|14:31:23.682] No plugins to initialise
INFO [07-06|14:31:23.682] Starting peer-to-peer node               instance=Geth/v1.10.3-stable-fa2f8544(quorum-v22.7.1)/linux-amd64/go1.16.15
DEBUG[07-06|14:31:23.711] TCP listener up                          addr=[::]:30303
TRACE[07-06|14:31:23.711] Adding static node                       id=e8c83a843e5db149 ip=<IP_ADDRESS> added=true
TRACE[07-06|14:31:23.711] Starting p2p dial                        id=e8c83a843e5db149 ip=<IP_ADDRESS> flag=staticdial
TRACE[07-06|14:31:23.711] Adding static node                       id=370d042631b3ec7a ip=<IP_ADDRESS> added=true
INFO [07-06|14:31:23.711] Mapped network port                      proto=tcp extport=30303 intport=30303 interface=ExtIP(<IP_ADDRESS>)
TRACE[07-06|14:31:23.711] Starting p2p dial                        id=370d042631b3ec7a ip=<IP_ADDRESS> flag=staticdial
TRACE[07-06|14:31:23.711] Adding static node                       id=ffec05cb11e6b4f0 ip=<IP_ADDRESS> added=true
INFO [07-06|14:31:23.712] New local node record                    seq=13 id=ffec05cb11e6b4f0 ip=<IP_ADDRESS> udp=0 tcp=30303
INFO [07-06|14:31:23.712] Started P2P networking                   self="enode://fea0f78db1757be4ad46fb351f3eff4395dba4b1edbfc4869c3ad4fc85b0881d6b4fdd86c58da2aa8276a66b7ef1e25cfea5be51b6e1019852a6464cb84ee18b@<IP_ADDRESS>:30303?discport=0"
INFO [07-06|14:31:23.712] Security Plugin is not enabled
ERROR[07-06|14:31:23.712] Unavailable modules in HTTP API list     unavailable="[db shh quorum]" available="[admin debug web3 eth txpool personal istanbul miner net]"
ERROR[07-06|14:31:23.713] Unavailable modules in HTTP API list     unavailable="[db shh quorum]" available="[admin debug web3 eth txpool personal istanbul miner net]"
DEBUG[07-06|14:31:23.713] Allowed origin(s) for WS RPC interface [*]
INFO [07-06|14:31:23.713] Security: TLS not enabled                endpoint=<IP_ADDRESS>:8545 reason="no TLSConfigurationSource found"
INFO [07-06|14:31:23.713] HTTP server started                      endpoint=[::]:8545    prefix= cors=* vhosts=* isTls=false
INFO [07-06|14:31:23.713] Security: TLS not enabled                endpoint=<IP_ADDRESS>:8546 reason="no TLSConfigurationSource found"
INFO [07-06|14:31:23.713] WebSocket enabled                        url=ws://[::]:8546
WARN [07-06|14:31:23.713] -------------------------------------------------------------------
WARN [07-06|14:31:23.713] Referring to accounts by order in the keystore folder is dangerous!
WARN [07-06|14:31:23.713] This functionality is deprecated and will be removed in the future!
WARN [07-06|14:31:23.713] Please use explicit addresses! (can search via `geth account list`)
WARN [07-06|14:31:23.713] -------------------------------------------------------------------
TRACE[07-06|14:31:23.714] Quorum permissioning                     id=370d042631b3ec7a addr=<IP_ADDRESS>:30303             conn=staticdial EnableNodePermission=false DataDir=/data/quorum Current Node ID=ffec05cb11e6b4f012942f78c4a08485cd3e745b69a6ae125c0ecb5c09133f24 Node Name=Geth/v1.10.3-stable-fa2f8544(quorum-v22.7.1)/linux-amd64/go1.16.15 Dialed Dest="enode://a7bf5822b70fe4aedbf7b4f4cdf7369e7fe00bc88ede7babca109dc58840779965732abd7c5a8175469f445b884f6618e805159c5d168c242a879422763a5384@<IP_ADDRESS>:30303?discport=0" Connection ID=370d042631b3ec7a Connection String=370d042631b3ec7a6fecde9e0455d6dc51c8de9652e36d04086a954ec82d8998
TRACE[07-06|14:31:23.714] Node Permissioning is Disabled.          id=370d042631b3ec7a addr=<IP_ADDRESS>:30303             conn=staticdial
DEBUG[07-06|14:31:23.714] Adding p2p peer                          peercount=1 id=370d042631b3ec7a conn=staticdial addr=<IP_ADDRESS>:30303             name=Geth/v1.10.3-stable-...
TRACE[07-06|14:31:23.714] Starting protocol eth/66                 id=370d042631b3ec7a conn=staticdial
TRACE[07-06|14:31:23.714] Starting protocol istanbul/100           id=370d042631b3ec7a conn=staticdial
TRACE[07-06|14:31:23.714] Starting protocol snap/1                 id=370d042631b3ec7a conn=staticdial
TRACE[07-06|14:31:23.719] Quorum permissioning                     id=e8c83a843e5db149 addr=<IP_ADDRESS>:30303             conn=staticdial EnableNodePermission=false DataDir=/data/quorum Current Node ID=ffec05cb11e6b4f012942f78c4a08485cd3e745b69a6ae125c0ecb5c09133f24 Node Name=Geth/v1.10.3-stable-fa2f8544(quorum-v22.7.1)/linux-amd64/go1.16.15 Dialed Dest="enode://0207a309658c6e8f371c047db55159f5ea5c9e00a7c97ebc58406968464f2bf5a5f421395184e8e172978d123366bf0b5c1b9f22f0bd5d6a903b5f315df57d68@<IP_ADDRESS>:30303?discport=0" Connection ID=e8c83a843e5db149 Connection String=e8c83a843e5db149e14fb651ab4ba6d84dadcdb601f085d0396cced0d4c41a87
TRACE[07-06|14:31:23.719] Node Permissioning is Disabled.          id=e8c83a843e5db149 addr=<IP_ADDRESS>:30303             conn=staticdial
DEBUG[07-06|14:31:23.719] Adding p2p peer                          peercount=2 id=e8c83a843e5db149 conn=staticdial addr=<IP_ADDRESS>:30303             name=Geth/v1.10.3-stable-...
TRACE[07-06|14:31:23.719] Starting protocol eth/66                 id=e8c83a843e5db149 conn=staticdial
TRACE[07-06|14:31:23.719] Starting protocol istanbul/100           id=e8c83a843e5db149 conn=staticdial
TRACE[07-06|14:31:23.719] Starting protocol snap/1                 id=e8c83a843e5db149 conn=staticdial
DEBUG[07-06|14:31:23.720] Ethereum peer connected                  id=e8c83a843e5db149 conn=staticdial name=Geth/v1.10.3-stable-...
TRACE[07-06|14:31:23.721] Registering sync peer                    peer=e8c83a84
WARN [07-06|14:31:23.721] full p2p peer                            id=e8c83a843e5db149e14fb651ab4ba6d84dadcdb601f085d0396cced0d4c41a87 ethPeer="Peer e8c83a843e5db149 <IP_ADDRESS>:30303"
DEBUG[07-06|14:31:23.721] consensus subprotocol retrieved eth peer from peerset id=e8c83a843e5db149 conn=staticdial ethPeer.id=e8c83a843e5db149e14fb651ab4ba6d84dadcdb601f085d0396cced0d4c41a87 ProtoName=istanbul
DEBUG[07-06|14:31:23.721] Ethereum peer connected                  id=370d042631b3ec7a conn=staticdial name=Geth/v1.10.3-stable-...
TRACE[07-06|14:31:23.721] Registering sync peer                    peer=370d0426
DEBUG[07-06|14:31:23.721] Relaxed downloader QoS values            rtt=20s confidence=0.500 ttl=1m0s
WARN [07-06|14:31:23.721] full p2p peer                            id=370d042631b3ec7a6fecde9e0455d6dc51c8de9652e36d04086a954ec82d8998 ethPeer="Peer 370d042631b3ec7a <IP_ADDRESS>:30303"
DEBUG[07-06|14:31:23.721] consensus subprotocol retrieved eth peer from peerset id=370d042631b3ec7a conn=staticdial ethPeer.id=370d042631b3ec7a6fecde9e0455d6dc51c8de9652e36d04086a954ec82d8998 ProtoName=istanbul
INFO [07-06|14:31:24.493] Unlocked account                         address=0x900E0F6844D539E34d17941aD2e01Cc22bdE50e6
INFO [07-06|14:31:24.493] Transaction pool price threshold not updated as gasPrice is not enabled
INFO [07-06|14:31:24.493] Transaction pool price threshold not updated as gasPrice is not enabled
INFO [07-06|14:31:24.493] BFT: activate QBFT
TRACE[07-06|14:31:24.493] BFT: set ProposerPolicy sorter to ValidatorSortByByteFunc
INFO [07-06|14:31:24.493] QBFT: start                              address=0xc4A08485cd3E745B69A6Ae125c0ECb5c09133F24
INFO [07-06|14:31:24.493] QBFT: initialize new round               address=0xc4A08485cd3E745B69A6Ae125c0ECb5c09133F24 old.round=-1 old.seq=0 target.round=0 lastProposal.number=0 lastProposal.hash=81439a..fed0a9
DEBUG[07-06|14:31:24.493] QBFT: start at the initial round         address=0xc4A08485cd3E745B69A6Ae125c0ECb5c09133F24 old.round=-1 old.seq=0 target.round=0 lastProposal.number=0 lastProposal.hash=81439a..fed0a9
TRACE[07-06|14:31:24.493] BFT: loaded voting snapshot from cache   snap.number=0 snap.hash=0x81439a26b4b1a99c46d31ede624057bd027e1327b29a0d111490143c05fed0a9 snap.epoch=30000 snap.validators="[0x2231f2e15F262417b1AE28D90c045505525aeF2a 0x6158756df505EA7e1E7516B2A0CaAC9B3cebF194 0xd7f55692dEA53abc4884817ABDe09D12e375DDF7 0xE3d57B3fA9E8B857404c3284486B39948dfa5139]" snap.votes=[]
DEBUG[07-06|14:31:24.493] QBFT: lookup for pending block proposal requests address=0xc4A08485cd3E745B69A6Ae125c0ECb5c09133F24 current.round=0 current.sequence=1 state="Accept request"
INFO [07-06|14:31:24.493] QBFT: start new round                    address=0xc4A08485cd3E745B69A6Ae125c0ECb5c09133F24 old.round=-1 old.seq=0 next.round=0 next.seq=1 next.proposer=0x2231f2e15F262417b1AE28D90c045505525aeF2a next.valSet="[0x2231f2e15F262417b1AE28D90c045505525aeF2a 0x6158756df505EA7e1E7516B2A0CaAC9B3cebF194 0xE3d57B3fA9E8B857404c3284486B39948dfa5139 0xd7f55692dEA53abc4884817ABDe09D12e375DDF7]" next.size=4 next.IsProposer=false
TRACE[07-06|14:31:24.494] BFT: loaded voting snapshot from cache   snap.number=0 snap.hash=0x81439a26b4b1a99c46d31ede624057bd027e1327b29a0d111490143c05fed0a9 snap.epoch=30000 snap.validators="[0x2231f2e15F262417b1AE28D90c045505525aeF2a 0x6158756df505EA7e1E7516B2A0CaAC9B3cebF194 0xd7f55692dEA53abc4884817ABDe09D12e375DDF7 0xE3d57B3fA9E8B857404c3284486B39948dfa5139]" snap.votes=[]
DEBUG[07-06|14:31:24.494] Account Extra Data root                  hash=000000..000000
DEBUG[07-06|14:31:24.494] Account Extra Data root                  hash=000000..000000
TRACE[07-06|14:31:24.494] header data not found in ancient or level db hash=000000..000000
INFO [07-06|14:31:24.494] Commit new mining work                   number=1 sealhash=9f50bd..cd4cca uncles=0 txs=0 gas=0 fees=0 elapsed="224.394µs"
TRACE[07-06|14:31:24.494] BFT: loaded voting snapshot from cache   snap.number=0 snap.hash=0x81439a26b4b1a99c46d31ede624057bd027e1327b29a0d111490143c05fed0a9 snap.epoch=30000 snap.validators="[0x2231f2e15F262417b1AE28D90c045505525aeF2a 0x6158756df505EA7e1E7516B2A0CaAC9B3cebF194 0xd7f55692dEA53abc4884817ABDe09D12e375DDF7 0xE3d57B3fA9E8B857404c3284486B39948dfa5139]" snap.votes=[]
WARN [07-06|14:31:24.494] Block sealing failed                     err=unauthorized
DEBUG[07-06|14:31:43.682] Recalculated downloader QoS values       rtt=20s confidence=0.750 ttl=1m0s
TRACE[07-06|14:31:56.356] Accepted connection                      addr=<IP_ADDRESS>:60386
TRACE[07-06|14:31:56.357] Quorum permissioning                     id=50f6f1539111fe82 addr=<IP_ADDRESS>:60386            conn=inbound    EnableNodePermission=false DataDir=/data/quorum Current Node ID=ffec05cb11e6b4f012942f78c4a08485cd3e745b69a6ae125c0ecb5c09133f24 Node Name=Geth/v1.10.3-stable-fa2f8544(quorum-v22.7.1)/linux-amd64/go1.16.15 Dialed Dest=nil Connection ID=50f6f1539111fe82 Connection String=50f6f1539111fe82f06ef4f2a92a840b057bf34c8c9b4263d48c0d878c0896f0
TRACE[07-06|14:31:56.357] Node Permissioning is Disabled.          id=50f6f1539111fe82 addr=<IP_ADDRESS>:60386            conn=inbound
DEBUG[07-06|14:31:56.363] Adding p2p peer                          peercount=3 id=50f6f1539111fe82 conn=inbound    addr=<IP_ADDRESS>:60386            name=Geth/v1.10.3-stable-...
INFO [07-06|14:31:56.363] Looking for peers                        peercount=3 tried=2 static=3
TRACE[07-06|14:31:56.363] Starting protocol eth/66                 id=50f6f1539111fe82 conn=inbound
TRACE[07-06|14:31:56.363] Starting protocol istanbul/100           id=50f6f1539111fe82 conn=inbound
TRACE[07-06|14:31:56.363] Starting protocol snap/1                 id=50f6f1539111fe82 conn=inbound
DEBUG[07-06|14:31:56.366] Ethereum peer connected                  id=50f6f1539111fe82 conn=inbound    name=Geth/v1.10.3-stable-...
TRACE[07-06|14:31:56.366] Registering sync peer                    peer=50f6f153
DEBUG[07-06|14:31:56.366] Relaxed downloader QoS values            rtt=20s confidence=0.500 ttl=1m0s
WARN [07-06|14:31:56.366] full p2p peer                            id=50f6f1539111fe82f06ef4f2a92a840b057bf34c8c9b4263d48c0d878c0896f0 ethPeer="Peer 50f6f1539111fe82 <IP_ADDRESS>:60386"
DEBUG[07-06|14:31:56.366] consensus subprotocol retrieved eth peer from peerset id=50f6f1539111fe82 conn=inbound    ethPeer.id=50f6f1539111fe82f06ef4f2a92a840b057bf34c8c9b4263d48c0d878c0896f0 ProtoName=istanbul
DEBUG[07-06|14:32:03.682] Recalculated downloader QoS values       rtt=20s confidence=0.750 ttl=1m0s
DEBUG[07-06|14:32:23.671] Current full block not old enough        number=0 hash=81439a..fed0a9 delay=3,162,240
DEBUG[07-06|14:32:23.683] Recalculated downloader QoS values       rtt=20s confidence=0.875 ttl=1m0s
DEBUG[07-06|14:32:43.684] Recalculated downloader QoS values       rtt=20s confidence=0.938 ttl=1m0s
DEBUG[07-06|14:33:03.685] Recalculated downloader QoS values       rtt=20s confidence=0.969 ttl=1m0s
DEBUG[07-06|14:33:23.672] Current full block not old enough        number=0 hash=81439a..fed0a9 delay=3,162,240
DEBUG[07-06|14:33:23.685] Recalculated downloader QoS values       rtt=20s confidence=0.984 ttl=1m0s
DEBUG[07-06|14:33:43.686] Recalculated downloader QoS values       rtt=20s confidence=0.992 ttl=1m0s
DEBUG[07-06|14:34:03.687] Recalculated downloader QoS values       rtt=20s confidence=0.996 ttl=1m0s

After this, the node keeps on repeating:
DEBUG[07-06|14:33:23.672] Current full block not old enough        number=0 hash=81439a..fed0a9 delay=3,162,240
DEBUG[07-06|14:33:23.685] Recalculated downloader QoS values       rtt=20s confidence=0.984 ttl=1m0s
DEBUG[07-06|14:33:43.686] Recalculated downloader QoS values       rtt=20s confidence=0.992 ttl=1m0s
DEBUG[07-06|14:34:03.687] Recalculated downloader QoS values       rtt=20s confidence=0.996 ttl=1m0s

The genesis config from validator1 node is as follows:
{
  "nonce": "0x0",
  "timestamp": "0x58ee40ba",
  "extraData": "0xf87aa00000000000000000000000000000000000000000000000000000000000000000f85494d94f52575057d0695c0639bea441f95d9496e51c94288e5e9e2b3479940d1697e3ae6f68e3d009103d94a640afee125ca83910ff2b9992f7ebcde2840bc794abc17fb17e9af964900a406d383ef22bc5ba6513c080c0",
  "gasLimit": "0x47b760",
  "gasUsed": "0x0",
  "number": "0x0",
  "difficulty": "0x1",
  "coinbase": "0x0000000000000000000000000000000000000000",
  "mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",
  "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "config": {
    "chainId": 1337,
    "homesteadBlock": 0,
    "eip150Block": 0,
    "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "eip155Block": 0,
    "eip158Block": 0,
    "byzantiumBlock": 0,
    "constantinopleBlock": 0,
    "petersburgBlock": 0,
    "istanbulBlock": 0,
    "muirglacierblock": 0,
    "berlinBlock": 0,
    "londonBlock": 0,
    "isQuorum": true,
    "maxCodeSizeConfig": [
      {
        "block": 0,
        "size": 64
      }
    ],
    "txnSizeLimit": 64,
    "qbft": {
      "policy": 0,
      "epoch": 30000,
      "ceil2Nby3Block": 0,
      "testQBFTBlock": 0,
      "blockperiodseconds": 10,
      "emptyblockperiodseconds": 60,
      "requesttimeoutseconds": 20
    }
  },
  "alloc": {
    "0x1872c518405f6b2cf77722c45fa8abdbcffe493a": {
      "balance": "1000000000000000000000000000"
    },
    "0x3bbfb1c24b32fd23d6aea20a9819f9d5031f4d78": {
      "balance": "1000000000000000000000000000"
    },
    "0x75bb662ce8748162bfa79345c74d25d6dd2757ac": {
      "balance": "1000000000000000000000000000"
    },
    "0x7872674fe39002b03dcff6c051bf26c8167eef9b": {
      "balance": "1000000000000000000000000000"
    }
  }
}

We are unable to pinpoint what the problem could be.
Note: Nothing from the values was changed except the provider, cloudNativeServices and, the region values for the cluster configuration. The tag for the Quorum Genesis Tool was also changed from qgt-0.2.11 to qgt-0.2.12 since it was not working with the former.
Steps to Reproduce

Clone from the master branch
Create a Kubernetes cluster (we are using AWS for that)
Install Helm charts as follows:

helm install genesis helm/charts/goquorum-genesis --namespace quorum --create-namespace --values helm/values/genesis-goquorum.yml
helm install validator-1 helm/charts/goquorum-node --namespace quorum --values helm/values/validator.yml
helm install validator-2 helm/charts/goquorum-node --namespace quorum --values helm/values/validator.yml
helm install validator-3 helm/charts/goquorum-node --namespace quorum --values helm/values/validator.yml
helm install validator-4 helm/charts/goquorum-node --namespace quorum --values helm/values/validator.yml

One thing I noticed is that the extraData field in the genesis.json file from one of the nodes does not contain the address from the address file.
kubectl exec -n quorum goquorum-node-validator-1-0 -- cat ./etc/genesis/genesis.json

Output:
{
  "nonce": "0x0",
  "timestamp": "0x58ee40ba",
  "extraData": "0xf87aa00000000000000000000000000000000000000000000000000000000000000000f85494a9e4004494058bd02aa41c9123ac8807f5a6171d94324a7c79f2caf5e5b691daf3510edee436eaafae94114daa0681f33a9d830f97a7436ecf5b156a0ac694570795ef5b7466ca4ae244a8c39ecd006479ef18c080c0",
  "gasLimit": "0x47b760",
  "gasUsed": "0x0",
  "number": "0x0",
  "difficulty": "0x1",
  "coinbase": "0x0000000000000000000000000000000000000000",
  "mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",
  "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "config": {
    "chainId": 1337,
    "homesteadBlock": 0,
    "eip150Block": 0,
    "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "eip155Block": 0,
    "eip158Block": 0,
    "byzantiumBlock": 0,
    "constantinopleBlock": 0,
    "petersburgBlock": 0,
    "istanbulBlock": 0,
    "muirglacierblock": 0,
    "berlinBlock": 0,
    "londonBlock": 0,
    "isQuorum": true,
    "maxCodeSizeConfig": [
      {
        "block": 0,
        "size": 64
      }
    ],
    "txnSizeLimit": 64,
    "qbft": {
      "policy": 0,
      "epoch": 30000,
      "ceil2Nby3Block": 0,
      "testQBFTBlock": 0,
      "blockperiodseconds": 10,
      "emptyblockperiodseconds": 60,
      "requesttimeoutseconds": 20
    }
  },
  "alloc": {
    "0x46623a023d1bc2f5bcb3ecc71fbf97c0dc3e31a9": {
      "balance": "1000000000000000000000000000"
    },
    "0xaa1d31aebc1a634c09a2928b407e9d910d9923f1": {
      "balance": "1000000000000000000000000000"
    },
    "0x0d28b72cab775f9ae685fdba8d01753ab0a5a540": {
      "balance": "1000000000000000000000000000"
    },
    "0x95e689439d2af7348329b38d79b8c5ed6885e88c": {
      "balance": "1000000000000000000000000000"
    }
  }
}

To check the address in the address file:
kubectl get cm goquorum-node-validator-1-address -o yaml -n quorum

Output:
apiVersion: v1
data:
  address: |
    c4a08485cd3e745b69a6ae125c0ecb5c09133f24
kind: ConfigMap
metadata:
  creationTimestamp: "2023-07-05T21:49:28Z"
  name: goquorum-node-validator-1-address
  namespace: quorum
  resourceVersion: "679891"
  uid: 32a49619-ef54-48c0-8311-f8e58c6a0821

As can be seen the address: c4a08485cd3e745b69a6ae125c0ecb5c09133f24 is not included in the extraData field. Is this normal? If not then what is the resolution?
Note: I had to restart the pods since I was doing some more testing so the genesis.json file is different from the original post.

Update: There were several issues we found with our team. Turns out some of the resources are not being properly deleted after uninstalling and reinstalling the Helm charts. We uninstalled and reinstalled the Helm charts a couple of times.
Not a perfect solution but, we tried to run a network after deleting the resources: ConfigMaps, PersistentVolumeClaims, Jobs etc. Then reinstalled the helm charts and it worked!
If anybody faces the same issue, the best option is to reset the entire namespace and see if it works. Closing the issues with the potential solution.


Changes to throw unhandled exceptions to the caller

Made Changes to throw unhandled exceptions to the caller when intended.

    private static CanvasDocument Wrapper(Func<CanvasDocument> worker, ErrorContainer errors)

With the caller's TryOperation wrapping, do we need this at all?

Refers to: src/PAModel/CanvasDocument.cs:169 in 9a68d7f. [](commit_id = 9a68d7f6edfd0bd369c990dd177bdbc8a7ab068a, deletion_comment = False)

    private static CanvasDocument Wrapper(Func<CanvasDocument> worker, ErrorContainer errors)

discussed offline. Still useful to catch DocumentException here

In reply to: 853378314

Refers to: src/PAModel/CanvasDocument.cs:169 in 9a68d7f. [](commit_id = 9a68d7f6edfd0bd369c990dd177bdbc8a7ab068a, deletion_comment = False)


Usage of IdentityServerTools to create a token from within identity server

I have a scenario where I need to initiate a call to a secured API during a password reset process, and I'm having a bit of trouble with the how's and where's of obtaining a token to make the proper call. What is the intended usage for how IdentityServerTools will create the appropriate token from within an identity server extensibility point to make a call to a secured API?

This seems to be a general question about IdentityServer

If this is the case it would be incredibly handy to have a sample to point to / add to the documentation. Unfortunately the Stack Overflow links are mostly unhelpful as the content shows mostly unanswered questions and will always change.


Update the API endpoints

Fixes #7.

@frissdiegurke And don't forget to publish the new version on npm. :grin:

Already did ;-) v0.1.2

Thanks for fixing :+1:

No worries! After few months I restarted my Node.js process which powers my website.
I saw that warning in the output and there were no emojis in the browser, so I had to do it quickly. :grin: