I want the AaC definition structure to have a node-based structure

As an AaC developer and validator developer, I want the AaC definition structure to use a node structure instead of dictionaries, so that I can add metadata and object references to the structural nodes/values in an AaC definition.
The goal of this story is to create a parallel definition structure to the straight yaml-parsed dicts and lists. This alternate structure is intended to pro-actively calculate and collate information for the definition's structure into easily traversable nodes in a tree structure with bi-directional edges (e.g. you can traverse to both parent and children nodes). Attaching metadata about these components will help to avoid a lot of overhead associated with the current approach of computing this kind of metadata on demand -- which quickly tanks performance with more and more definitions in the context.
Example
An example decomposition of a simple model into structural nodes would look something akin to the following.
Example model:
model:
  name: Clock
  description: A simple clock that keeps track of the current time
  behavior:
    - name: getTime
      type: timer
      description: Get the current time
      output:
        - name: currentTime
          type: Timestamp

Example node structure:
root key node (top-level, root node):
token: 'model'
schema_definition: 'model' <-- This is a link to the schema named `model` in the core spec
node_type: 'ROOT_KEY'
children: [node('name'), node('description'), node('behavior')]
parent: None

schema node ('name'):
token: 'name'
schema_definition: 'Field'
node_type: 'PRIMITIVE_STRUCTURE' <-- Even though primitives are enums, primitives have different behaviors
children: [node('Clock')]
parent: node('model')

primitive node ('Clock'):
token: 'Clock'
schema_definition: 'Primitives'  <-- this is the definition that defines the enum values
primitive_type: string <-- This is a field unique to primitive value nodes
node_type: 'PRIMITIVE_VALUE'
children: []
parent: node('name')

schema node ('description'):
token: 'description'
schema_definition: 'Field'
node_type: 'PRIMITIVE_STRUCTURE'
children: [node('A simple clock that keeps track of the current time')]
parent: node('model')

primitive node ('A simple clock that keeps track of the current time'):
token: 'A simple clock that keeps track of the current time'
schema_definition: 'Primitives'
primitive_type: string
node_type: 'PRIMITIVE_VALUE'
children: []
parent: node('description')

schema node ('behavior'):
token: 'behavior'
node_type: 'SCHEMA_STRUCTURE'
children: [node('Clock')]
parent: node('model')

schema node ('behaviorEntry1'):
token: None <-- Could alternatively be '-' since it's a list item
node_type: 'LIST_STRUCTURE'
children: [node('Clock')]
parent: node('behavior')

schema node ('behaviorEntry1Name'):
token: 'name'
schema_definition: 'Field'
node_type: 'PRIMITIVE_STRUCTURE'
children: [node('getTime')]
parent: node('behaviorEntry1')

primitive node ('getTime'):
... Same as the other name nodes

schema node ('behaviorEntry1Type'):
token: 'type'
schema_definition: 'Field'
node_type: 'ENUM_STRUCTURE'
children: [node('behaviorEntry1TypeTimer')]
parent: node('behaviorEntry1')

schema node ('behaviorEntry1TypeTimer'):
token: 'timer'
schema_definition: 'BehaviorType'  <-- Provides easy lookup to verify that the value 'timer' is in these enum values
node_type: 'ENUM_VALUE'
children: []
parent: node('behaviorEntry1Type')

... Leaving out output for some brevity, but it should follow the same pattern as behavior.
AC:

[x] There is a new class StructuralNode in the definition package

[x] Each token in the definition's structure is represented as an AaC node
[x] Each node has an Enum attribute describing what type the node is

[x] Nodes that are sub-structure (i.e. Field, Behavior) are typed as SCHEMA_STRUCTURE nodes
[x] Root-key nodes (i.e. schema, model) are typed as ROOT_KEY
[x] Enum value nodes (non-primitive enums) are typed as ENUM_VALUE
[x] Primitive-type value nodes (i.e. string, int, date) are typed as PRIMITIVE_VALUE
[x] Nodes representing lists (i.e. Fields) are typed as LIST_STRUCTURE

[x] Each node has a reference to its defining definition

[x] ROOT_KEY nodes reference their defining structure (i.e. schema, model, extension, etc)
[x] SCHEMA_STRUCTURE nodes reference their defining schema definition
[x] ENUM_VALUE nodes reference their defining enum definition
[x] PRIMITIVE_VALUE nodes reference the primitive definition
[x] LIST_STRUCTURE nodes do not reference a schema definition

[x] Each node has a reference to its corresponding token/lexeme

[x] The parser package is updated to include an additional step to build the AaC definition structures using the new nodes
[x] Definitions have a new attribute meta_structure that contains the new node-based structure
[x] The Definition attribute structure is labeled as deprecated and marked for eventual removal

Couple deviations:

The LIST_STRUCTURE enum was changed to LIST_ENTRY to better reflect the node's type.
The parser was not updated to build the meta structure as the parser doesn't know about the language context, which is necessary to populate said meta structure.


Resource Elasticity [1/3]

This PR is the first of three planned PRs for implementing resource elasticity within Crail. More specifically, the goal is to allow to automatically and dynamically adapt the number of running datanodes based on different possible parameters (e.g. resource consumption, available storage capacities, ...). This requires support for starting and terminating running datanodes automatically. This functionality will be implemented mostly within the Crail namenode. Therefore, the Crail namenode will not only maintain information on the current state of the datanodes and the deployment but will also start or terminate datanodes as required. For deciding how to adjust the number of datanodes  based on the current state observed in the Crail namenode so-called policies are used.
The following changes will be included within the seperate PRs:

This first PR implements a new RPC (for both darpc and narpc) that allows to specify a datanode (using IP-address and port number) that should be shutdown. Additionally, a status field is added to DataNodeStatistics. This will be used in the getDataNode RPC to allow the namenode to inform a datanode that it can safely shutdown.

The seconds PR will implement the actual mechanism for shutting down a datanode.

The third PR implements a simple policy for implementing elasticity based on the system's storage consumption.

looks good


Unify channel ID params

Replace channel fields with channelId when channel id is expected.

targetChannel from ChannelDeleteInput changed to channelId
channel from DraftOrderCreateInput changed to channelId
channel from DraftOrderInput changed to channelId
channel from pluginUpdate changed to channelId

Impact

[ ] New migrations
[x] New/Updated API fields or mutations
[ ] Deprecated API fields or mutations
[ ] Removed API types, fields, or mutations
[ ] Documentation needs to be updated

Pull Request Checklist

[ ] Privileged queries and mutations are guarded by proper permission checks
[ ] Database queries are optimized and the number of queries is constant
[ ] Database migration files are up to date
[x] The changes are tested
[x] GraphQL schema and type definitions are up to date
[x] Changes are mentioned in the changelog

Task linked: SALEOR-3437 Unify channel ID params

Blocked - waiting for frontend.


Added Movie Search App

Fix : #205

Update your project folder name to the project number which is not available on the repo yet.

Hey @swapnilsparsh I tried doing the same but i wasn't able to do because some path error with is (error: invalid path '63 - Quotes Generator) which was there before also while resolving the conflicts but anyhow i did it but now i'm helpless with this error , i tried doing everything(reset rebase stash) but non of them worked
so if possible could you please merge it as it is , i will do this renaming in some other issue/PR

It is not possible to merge it as you have not named the folder which is a required step and if I will merge your PR then it will be unfair for others.

Update your project folder name to the project number which is not available on the repo yet.

Hey @swapnilsparsh I tried doing the same but i wasn't able to do because some path error with is (error: invalid path '63 - Quotes Generator) which was there before also while resolving the conflicts but anyhow i did it but now i'm helpless with this error , i tried doing everything(reset rebase stash) but non of them worked
so if possible could you please merge it as it is , i will do this renaming in some other issue/PR

It is not possible to merge it as you have not named the folder which is a required step and if I will merge your PR then it will be unfair for others.

Update your project folder name to the project number which is not available on the repo yet.

Hey @swapnilsparsh I tried doing the same but i wasn't able to do because some path error with is (error: invalid path '63 - Quotes Generator) which was there before also while resolving the conflicts but anyhow i did it but now i'm helpless with this error , i tried doing everything(reset rebase stash) but non of them worked
so if possible could you please merge it as it is , i will do this renaming in some other issue/PR

It is not possible to merge it as you have not named the folder which is a required step and if I will merge your PR then it will be unfair for others.

So if you can help me with the solution of this error ,as i tried every thing to do


Performances

Hi,
Like MDN says:
https://developer.mozilla.org/en-US/docs/Web/Events/resize#Examples
https://developer.mozilla.org/en-US/docs/Web/Events/scroll#Example

scroll and resize events can fire at a high rate, the event handler shouldn't execute computationally expensive operations such as DOM modifications. Instead, it is recommended to throttle the event using requestAnimationFrame, setTimeout or customEvent*

So handlers like checkScroll and Stickyfill.refreshAll should not be executed directly.
Another level of performance could be to use something like https://github.com/wilsonpage/fastdom everytime you manipulate style and avoid unnecessary browser reflow.

Inspiration can be taken from stickybits.js#L292

Raised a PR with replacing scroll event listener with requestAnimationFrame, could you take a look at this guys? cc. @wilddeer


Issue in 0.111.1 LockDevice is deprecated

2020-06-13 21:37:28 WARNING (MainThread) [homeassistant.components.lock] LockDevice is deprecated, modify KevoDevice to extend LockEntity
My be present in older versions but only got around to installing this....
If I get a chance I'll try to work out what changes are needed but python is not my strength.

Seeing the same thing in 0.114.1
LockDevice is deprecated, modify KevoDevice to extend LockEntity

these commits in this pull request "should" fix this issue but I personally haven't tested this yet
https://github.com/gaggle331/home-assistant-kevo/pull/8

I merged that pull request, hopefully the issue is fixed. I don't lose my Kevo locks anymore so I can't test, but I'll try to keep up with merge requests as best I can.

Thanks this works.


Scrapbook: Running command gives an error if a previous command is erroneous

Example:
db.find({"age" 33}) // No semicolon, no colon separating the key & value in filter
db.findOne({"age": 27}); // Cursor here. This line will be run

Running findOne will throw an error since we parsing encounters an error in line 1 with text <missing ':'>

Agree this is annoying.
Also is this one a duplicate? https://github.com/Microsoft/vscode-cosmosdb/issues/499

Oops, yes. I'll close that one, since this is more descriptive.

This has to do with throwing an error on seeing an Error Node.


Bugfix/n UI 3143 dialog is not dismissed upon navigation change with browser buttons

very nice job overall!


Build phase hangs at preBuild step

Before opening, please confirm:

[X] I have checked to see if my question is addressed in the FAQ.
[X] I have searched for duplicate or closed issues.
[X] I have read the guide for submitting bug reports.
[X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

App Id
dbqqcba2g1b6k/staging/22
Region
us-east-2
Amplify Console feature
Custom builds
Describe the bug
My frontend build phase repeats the preBuild step twice, hanging for a few minutes after the first time, then hanging  indefinitely after the second until hitting 30m timeout. Using CLI "latest" version (5.3.0). Triggering deploy manually or via PR trigger creates the same behavior. Tried several times over the past couple hours.
Expected behavior
Should complete build step
Reproduction steps

Trigger deploy via PR merge or manually.

Build Settings
version: 1
frontend:
  phases:
    preBuild:
      commands:
        - nvm install 14.17.0
        - yarn install
    build:
      commands:
        - yarn generate
  artifacts:
    # IMPORTANT - Please verify your build output directory
    baseDirectory: dist
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*

Additional information
                                 # Starting phase: preBuild
                                 # Executing command: nvm install 14.17.0
2021-08-18T22:44:56.045Z [INFO]: Downloading and installing node v14.17.0...
2021-08-18T22:44:56.155Z [WARNING]: Downloading https://nodejs.org/dist/v14.17.0/node-v14.17.0-linux-x64.tar.gz...
2021-08-18T22:44:56.270Z [WARNING]:
2021-08-18T22:44:56.271Z [WARNING]: 0.6%
2021-08-18T22:44:56.371Z [WARNING]: ##############
2021-08-18T22:44:56.371Z [WARNING]: #####                                                       27.1%
2021-08-18T22:44:56.485Z [WARNING]: #################
2021-08-18T22:44:56.485Z [WARNING]: #############################                            64.6%
2021-08-18T22:44:56.584Z [WARNING]:
2021-08-18T22:44:56.585Z [WARNING]: #######################################################################  100.0%
######################################################################## 100.0%
2021-08-18T22:44:56.611Z [WARNING]: Computing checksum with sha256sum
2021-08-18T22:44:56.723Z [WARNING]: Checksums matched!
2021-08-18T22:44:57.850Z [INFO]: Now using node v14.17.0 (npm v6.14.13)
2021-08-18T22:44:57.878Z [INFO]: # Executing command: yarn install
2021-08-18T22:44:58.446Z [INFO]: yarn install v1.22.0
2021-08-18T22:44:58.540Z [INFO]: [1/5] Validating package.json...
2021-08-18T22:44:58.542Z [INFO]: [2/5] Resolving packages...
2021-08-18T22:44:59.113Z [INFO]: success Already up-to-date.
2021-08-18T22:43:15.873Z [INFO]: Git SSH Key acquired
2021-08-18T22:43:15.947Z [INFO]: # Cloning repository: git@github.com:financialJoe/web.git
2021-08-18T22:43:15.979Z [INFO]: Agent pid 134
2021-08-18T22:43:16.005Z [INFO]: Identity added: /root/.ssh/git_rsa (/root/.ssh/git_rsa)
2021-08-18T22:43:16.232Z [INFO]: Cloning into 'web'...
2021-08-18T22:43:16.536Z [INFO]: Warning: Permanently added the RSA host key for IP address '<IP_ADDRESS>' to the list of known hosts.
2021-08-18T22:43:20.250Z [INFO]: # Switching to commit: fc67672d09b21f5f82b971b03added4341bc7d01
2021-08-18T22:43:20.374Z [INFO]: Agent pid 147
2021-08-18T22:43:20.375Z [INFO]: Identity added: /root/.ssh/git_rsa (/root/.ssh/git_rsa)
                                 Note: switching to 'fc67672d09b21f5f82b971b03added4341bc7d01'.
                                 You are in 'detached HEAD' state. You can look around, make experimental
                                 changes and commit them, and you can discard any commits you make in this
                                 state without impacting any branches by switching back to a branch.
                                 If you want to create a new branch to retain commits you create, you may
                                 do so (now or later) by using -c with the switch command. Example:
                                 git switch -c <new-branch-name>
                                 Or undo this operation with:
                                 git switch -
                                 Turn off this advice by setting config variable advice.detachedHead to false
                                 HEAD is now at fc67672 Merge pull request #165 from financialJoe/cleanup
2021-08-18T22:43:20.381Z [INFO]: Successfully cleaned up Git credentials
2021-08-18T22:43:20.381Z [INFO]: # Checking for Git submodules at: /codebuild/output/src127723909/src/web/.gitmodules
2021-08-18T22:43:20.401Z [INFO]: # Retrieving environment cache...
2021-08-18T22:43:20.445Z [INFO]: # Retrieved environment cache
2021-08-18T22:43:20.445Z [INFO]: ---- Setting Up SSM Secrets ----
2021-08-18T22:43:20.445Z [INFO]: SSM params {"Path":"/amplify/dbqqcba2g1b6k/staging/","WithDecryption":true}
2021-08-18T22:43:20.497Z [INFO]: # Ensuring NPM package '@aws-amplify/cli' is version: 'latest'
2021-08-18T22:43:25.556Z [INFO]: # Patching NPM package '@aws-amplify/cli' from 4.29.4 to 5.3.0...
2021-08-18T22:44:24.631Z [INFO]: # Done patching NPM package '@aws-amplify/cli'
2021-08-18T22:44:24.714Z [INFO]: # Retrieving cache...
2021-08-18T22:44:28.978Z [INFO]: # Extracting cache...
2021-08-18T22:44:34.243Z [INFO]: # Extraction completed
                                 # Starting phase: preBuild
                                 # Executing command: nvm install 14.17.0
2021-08-18T22:44:56.045Z [INFO]: Downloading and installing node v14.17.0...
2021-08-18T22:44:56.155Z [WARNING]: Downloading https://nodejs.org/dist/v14.17.0/node-v14.17.0-linux-x64.tar.gz...
2021-08-18T22:44:56.270Z [WARNING]:
2021-08-18T22:44:56.271Z [WARNING]: 0.6%
2021-08-18T22:44:56.371Z [WARNING]: ##############
2021-08-18T22:44:56.371Z [WARNING]: #####                                                       27.1%
2021-08-18T22:44:56.485Z [WARNING]: #################
2021-08-18T22:44:56.485Z [WARNING]: #############################                            64.6%
2021-08-18T22:44:56.584Z [WARNING]:
2021-08-18T22:44:56.585Z [WARNING]: #######################################################################  100.0%
######################################################################## 100.0%
2021-08-18T22:44:56.611Z [WARNING]: Computing checksum with sha256sum
2021-08-18T22:44:56.723Z [WARNING]: Checksums matched!
2021-08-18T22:44:57.850Z [INFO]: Now using node v14.17.0 (npm v6.14.13)
2021-08-18T22:44:57.878Z [INFO]: # Executing command: yarn install
2021-08-18T22:44:58.446Z [INFO]: yarn install v1.22.0
2021-08-18T22:44:58.540Z [INFO]: [1/5] Validating package.json...
2021-08-18T22:44:58.542Z [INFO]: [2/5] Resolving packages...
2021-08-18T22:44:59.113Z [INFO]: success Already up-to-date.

I was able to track down the problem in my nuxt static build. However, the logs in console above never showed several lines that it should have in order to understand the source of the problem right off the bat.
In my specific instance, these lines should have shown in the logs before the "hang":
2021-08-20T00:08:31.775Z [INFO]: Done in 0.64s.
2021-08-20T00:08:31.785Z [INFO]: # Completed phase: preBuild
# Starting phase: build
2021-08-20T00:08:31.785Z [INFO]: # Executing command: yarn generate
2021-08-20T00:08:31.913Z [INFO]: yarn run v1.22.0
2021-08-20T00:08:31.948Z [INFO]: $ yarn memory && yarn tw-compile && nuxt generate
2021-08-20T00:08:32.116Z [INFO]: $ NODE_OPTIONS=--max-old-space-size=2048
2021-08-20T00:08:32.289Z [INFO]: $ rm -rf twSafelist.txt && node buildTWSafeList.js
// Problem exists sometime after the last line, above

Is there anything that can be done about this?

This is the error on our side:
2021-08-20T00:09:21.929Z [WARNING]: [error]  /register
                                    TypeError: Cannot read property 'resolve' of undefined
                                    at a.render (node_modules/vue-router/dist/vue-router.common.js:1099:0)
                                    at server.js:25330:20
                                    at ke (node_modules/@vue/composition-api/dist/vue-composition-api.common.prod.js:15:0)
                                    at a.r.render (node_modules/@vue/composition-api/dist/vue-composition-api.common.prod.js:15:0)
                                    at a.module.exports.t._render (node_modules/vue/dist/vue.runtime.common.prod.js:6:0)
                                    at resolve (/codebuild/output/src570548618/src/web/node_modules/vue-server-renderer/build.dev.js:8415:27)
                                    at waitForServerPrefetch (/codebuild/output/src570548618/src/web/node_modules/vue-server-renderer/build.dev.js:8287:3)
                                    at renderComponentInner (/codebuild/output/src570548618/src/web/node_modules/vue-server-renderer/build.dev.js:8426:3)
                                    at renderComponent (/codebuild/output/src570548618/src/web/node_modules/vue-server-renderer/build.dev.js:8383:5)
                                    at RenderContext.renderNode (/codebuild/output/src570548618/src/web/node_modules/vue-server-renderer/build.dev.js:8294:5)
                                    at RenderContext.next (/codebuild/output/src570548618/src/web/node_modules/vue-server-renderer/build.dev.js:2598:23)
                                    at RenderContext.cachedWrite [as write] (/codebuild/output/src570548618/src/web/node_modules/vue-server-renderer/build.dev.js:2451:9)
                                    at RenderContext.renderNode (/codebuild/output/src570548618/src/web/node_modules/vue-server-renderer/build.dev.js:8305:13)
                                    at RenderContext.next (/codebuild/output/src570548618/src/web/node_modules/vue-server-renderer/build.dev.js:2598:23)
                                    at cachedWrite (/codebuild/output/src570548618/src/web/node_modules/vue-server-renderer/build.dev.js:2451:9)
                                    at renderElement (/codebuild/output/src570548618/src/web/node_modules/vue-server-renderer/build.dev.js:8544:5)
2021-08-20T00:09:29.583Z [WARNING]: ╭──────────────────────────────────────────────────────────────────────────────╮│                                                                              ││   ⚠ Nuxt Warning                                                             ││                                                                              ││   The command 'nuxt generate' finished but did not exit after 5s             ││   This is most likely not caused by a bug in Nuxt                            ││   Make sure to cleanup all timers and listeners you or your                  ││   plugins/modules start.                                                     ││   Nuxt will now force exit                                                   ││                                                                              ││   DeprecationWarning: Starting with Nuxt version 3 this will be a fatal      ││   error                                                                      ││                                                                              │╰──────────────────────────────────────────────────────────────────────────────╯

It should be possible to surface this, I've added a task to research and fix why it is being suppressed.


Nba League Pass error: unable to extract video id

Checklist

[x] I'm reporting a broken site support
[x] I've verified that I'm running youtube-dl version 2020.01.15
[x] I've checked that all provided URLs are alive and playable in a browser
[x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[x] I've searched the bugtracker for similar issues including closed ones

Verbose log
outube-dl --username ######## --password ######## https://watch.nba.com/game/20200116/PHXNYK --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--username', u'PRIVATE', u'--password', u'PRIVATE', u'https://watch.nba.com/game/20200116/PHXNYK', u'--verbose']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.01.15
[debug] Python version 2.7.17 (CPython) - Linux-5.3.11-200.fc30.x86_64-x86_64-with-fedora-30-Thirty
[debug] exe versions: none
[debug] Proxy map: {}
[NBA] PHXNYK: Downloading webpage
ERROR: Unable to extract video id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 796, in extract_info
ie_result = ie.extract(url)
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 530, in extract
ie_result = self._real_extract(url)
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/nba.py", line 137, in _real_extract
path = remove_start(self._search_regex(r'data-videoid="([^"]+)"', webpage, 'video id'), '/')
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 1005, in _search_regex
raise RegexNotFoundError('Unable to extract %s' % _name)
RegexNotFoundError: Unable to extract video id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Description
Hi,
I try for the first time to download video from nba league pass. My Account is correct and the video are available if I check manually. I'm not sure if this is the good URL I used, I don't know how to check.
I guess you can find free video you want to check yourself.

Why this issue have been closed ?

Why this issue have been closed ?

it has been requested before.

it has been requested before.


Live editing improvements

There are a few improvements that I'd like to make to the editing experience that aren't included in CodeMirror. This issue can serve as a living document as we figure out what those improvements are.

[ ] Adding a checklist, and being able to check items off in that list.

We have the option to move to ProseMirror and es6: http://prosemirror.net/

There are some keyboard shortcuts that we can use, from the Sublime plugin for Codemirror. We should take what we want from here.
It looks like Ghost uses Codemirror too (which is encouraging). And they have customized it for text editing. We might be able to steal something from there.
Here's a screenshot from that (using the select + command + B to bold text works). But they are using the split screen editor. I don't really know why. Is there a good reason for that that I'm missing? And more keyboard shortcuts from Ghost.
More resources:

Codemirror's default keyboard shortcuts.
Gmail keyboard shortcuts
Ghost's keyboard shortcut guide

And I found the JS for those keyboard shortcuts (defined here), built on top of Codemirror! They are called here. This should help us along a bit.
Just gotta figure out how to work that into our setup.

@davedawson I've seen a few apps using split screen editor. Atom uses that, and is open source and built on electron – will have to check out codebase. I think it's pretty slick to do it all inline (like when you bold something and it becomes bold automatically) rather than having another screen, but I'm open to the split screen.


Move Player Position

Moving player position with rotary encoder on stream deck + not working. Module v1.0.4, controller v0.1.9.

Probably too much to ask of the device. Keep in mind that in order to control Spotify at all in this way, we have to execute an AppleScript. So if you try to use a rotary encoder to quickly skip through a track, for example, every single turn of the encoder fires off a new AppleScript.


Implement I Shall Win No Glory

Kind of iffy on this one. I'm a bit surprised it doesn't allow you to retrigger the ability if you can pay the cost multiple times (e.g. 3 Rangers + 3 Builders) since no cancel is involved, but I tested it and it works correctly.
Between this and the previously implemented Pack Survives, it feels like we should have an 'or' or 'choose' cost. e.g.
this.reaction({
    // ...
    cost: ability.costs.choose({
        'Kneel Builders': ability.costs.kneelMultiple(3, card => card.hasTrait('Builder') && card.getType() === 'character'),
        'Kneel Rangers': ability.costs.kneelMultiple(3, card => card.hasTrait('Ranger') && card.getType() === 'character'),
        'Kneel Stewards': ability.costs.kneelMultiple(3, card => card.hasTrait('Steward') && card.getType() === 'character')
    }),
    // ...
});

If the player can pay multiple costs, they're prompted with an additional prompt asking which cost they want to pay (unfortunately an additional click, but the buttons will have shorter / more focused text). If they can pay only a single cost, it automatically chooses it without a prompt.
Thoughts?

I know you're asking cryogen, but I think that sounds good. Now that we can choose the order of triggers, each trigger only comprising 1 button is the most 'clean'. (I have a similar issue with the choices on Great Kraken for example, but that's another discussion.)

#1034 will allow us to do the cost as I suggested above.


refactor: Makefile

vendor *.proto files instead of using third_party
use golangci-lint from .cache
version binaries installed into .cache
allows simple change of the tool version
for example to use another version of golangci-lint
GOLANGCI_LINT_VERSION=v1.27.0 make test-sublinter-gofmt

/cc @anilCSE

ACK

fixes #802


Use kbd HTML tags

Using <kbd> tags to identify keys is an accessibility issue; it enables screen readers to recognize references to keyboard keys.

Thank you for addressing this accessibility concern, @tdykstra - much appreciated.

#sign-off


vendor: use version tags if possible

Updates a few deps that have version tags to the closest tag containing the commit.

lgtm after tests pass. thx


Fix for issue #108 that restores xterm plugin functionality on OS X.

Use '\033' instead of '\e' as escape character in set_xterm_title.

Fixes #108

Closes #108

Thanks!


"Download PDF" link does not work

"Download PDF" link does not work, on the page:
https://docs.microsoft.com/en-us/aspnet/core/tutorials/razor-pages/new-field?view=aspnetcore-5.0&tabs=visual-studio

@Rick-Anderson @scottaddie  this is likely a PDF build failure for the repo above.  Check it out in ops to see why PDF builds are failing.

@JasonWHowell  see build report
Select PDF build type

1 error(s) (1 System), 0 warning(s). An exception occurred during the build process. Please check the raw log and retry building your content again. If the issue persists, please open a ticket in https://SiteHelp and include the URL of publishing report as well as below information: Error occurred when accessing GitHub. Details: (Unauthorized) Bad credentials.

@JasonWHowell  that might be a transient error as it occured on 03/10/2021 11:54:08 with successful builds after that. I'm guessing the pdf is built off live, so I'll merge to live now and see what happens.

I'm guessing the pdf is built off live,
Nope, looks like it's main.

You can issue a manual PDF build if needed. Ping me on email if you need more details.

You can issue a manual PDF build if needed. Ping me on email if you need more details.

no need, thanks...  I just tried to create a PDF while reading that page, that failed failed and I reported it, for somebody should probably have to fix this, for users that will come after me :-)

@gjuwindev Thanks for pointing out the issue!

#please-close


Python test failure - installation success unclear from examples

I've installed the C package, from which all tests apart from one (TEST 20/55 nmt:he_qdisc [SKIPPED]) passed. However, after the python setup, 22/48 unit tests fail.
It's difficult to tell from the readthedocs examples what the outputs plots are meant to look like (it would be good to plot them after the code snippets). When comparing with full sky anafast outputs, I get a completely different answer with NaMaster.
The install/testing output:
installation_output.txt
My installlation script:
export CFLAGS='-I/usr/local/Cellar/gsl/2.5/include/ -I/usr/local/Cellar/fftw/3.3.8/include/ -I/usr/local/Cellar/cfitsio/3.450/include/ -I/usr/local/Cellar/healpix/3.40/include/ -I/Users/ucapnje/Documents/software/libsharp/auto/include/'
export LDFLAGS='-L/usr/local/Cellar/cfitsio/3.450/lib/ -L/usr/local/Cellar/gsl/2.5/lib/ -L/Users/ucapnje/Documents/software/libsharp/auto/lib/ -L/usr/local/Cellar/healpix/3.40/lib/ -L/usr/local/Cellar/fftw/3.3.8/lib/ -L/Users/ucapnje/Documents/software/NaMaster-master/install_dir/lib/'
./configure --prefix=/Users/ucapnje/Documents/software/NaMaster-master/install_dir
make
make install
make check
export LDFLAGS='-L/usr/local/Cellar/cfitsio/3.450/lib/ -L/usr/local/Cellar/gsl/2.5/lib/ -L/Users/ucapnje/Documents/software/libsharp/auto/lib/ -L/usr/local/Cellar/healpix/3.40/lib/ -L/usr/local/Cellar/fftw/3.3.8/lib/ -L/Users/ucapnje/Documents/software/NaMaster-master/install_dir/lib/'
python setup.py install
python -m unittest discover -v

This doesn't help yet, but this will be on conda soon!
https://github.com/conda-forge/staged-recipes/pull/7194

@NiallJeffrey sorry for the delay. Have you managed to sort this out yet?
It is very strange that the C tests pass but not the python ones, since most of the latter are almost copies of the former. If the problem is still there, I'd suggest to first try installing it again with the latest version on master.
If the problem persists, let me know and we can run a couple of quick tests to see if things are actually working.
Note that if you're computing power spectra on a cut sky, you would not expect namaster and anafast to return the same answer (you probably know this, but just in case).

@NiallJeffrey can you confirm if this solved your issue?

I am afraid not. I admit not spending a great deal of time trying to solve it, but using the conda version I get "ImportError: No module named '_nmtlib'" and "Reason: image not found".
conda install -c conda-forge namaster
Collecting package metadata: done
Solving environment: done
## Package Plan ##
  environment location: /Users/ucapnje/anaconda3
  added / updated specs:
    - namaster
The following NEW packages will be INSTALLED:
  namaster           conda-forge/osx-64::namaster-0.9-py36h94a39f0_1001
Proceed ([y]/n)? y
Preparing transaction: done Verifying transaction: done Executing transaction: done
(base) eduroam-int-dhcp-97-155-200:namaster_test ucapnje$ python
Python 3.6.8 |Anaconda, Inc.| (default, Dec 29 2018, 19:04:46)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymaster
Traceback (most recent call last):
  File "/Users/ucapnje/anaconda3/lib/python3.6/site-packages/pymaster/nmtlib.py", line 18, in swig_import_helper
    fp, pathname, description = imp.find_module('_nmtlib', [dirname(__file__)])
  File "/Users/ucapnje/anaconda3/lib/python3.6/imp.py", line 297, in find_module
    raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_nmtlib'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/ucapnje/anaconda3/lib/python3.6/site-packages/pymaster/__init__.py", line 40, in <module>
    from pymaster import nmtlib as lib
  File "/Users/ucapnje/anaconda3/lib/python3.6/site-packages/pymaster/nmtlib.py", line 28, in <module>
    _nmtlib = swig_import_helper()
  File "/Users/ucapnje/anaconda3/lib/python3.6/site-packages/pymaster/nmtlib.py", line 20, in swig_import_helper
   import _nmtlib
ImportError: dlopen(/Users/ucapnje/anaconda3/lib/python3.6/site-packages/_nmtlib.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libssl.1.0.0.dylib
  Referenced from: /Users/ucapnje/anaconda3/lib/libssh2.1.dylib
  Reason: image not found

I think you need to make sure conda-forge is first in your channels as opposed to the anaconda defaults. The error here is not the namaster package. The relevant bit is here
`ImportError: dlopen(/Users/ucapnje/anaconda3/lib/python3.6/site-packages/_nmtlib.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libssl.1.0.0.dylib`
` Referenced from: /Users/ucapnje/anaconda3/lib/libssh2.1.dylib`
` Reason: image not found

which is related to something in your conda env.

Ah great. I reordered my channels and updated and now this all works fine. I ran a quick test with cut sky and namaster returns the correct power spectrum.

Great! Thanks a lot for reporting this.

Hi, so it appears that I'm running into the same issue:
>>> import pymaster
Traceback (most recent call last):
  File "/Users/humnaawan/anaconda3/lib/python3.6/site-packages/pymaster/nmtlib.py", line 18, in swig_import_helper
    fp, pathname, description = imp.find_module('_nmtlib', [dirname(__file__)])
  File "/Users/humnaawan/anaconda3/lib/python3.6/imp.py", line 297, in find_module
    raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_nmtlib'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/humnaawan/anaconda3/lib/python3.6/site-packages/pymaster/__init__.py", line 49, in <module>
    from pymaster import nmtlib as lib
  File "/Users/humnaawan/anaconda3/lib/python3.6/site-packages/pymaster/nmtlib.py", line 28, in <module>
    _nmtlib = swig_import_helper()
  File "/Users/humnaawan/anaconda3/lib/python3.6/site-packages/pymaster/nmtlib.py", line 20, in swig_import_helper
    import _nmtlib
ImportError: dlopen(/Users/humnaawan/anaconda3/lib/python3.6/site-packages/_nmtlib.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libcfitsio.5.dylib
  Referenced from: /Users/humnaawan/anaconda3/lib/libnmt.0.dylib
  Reason: image not found

I tried the solution noted above re conda channels, so that this is what my ~/.condarc looks like
channels:
  - conda-forge
  - defaults

but I am still getting the same error. I have reinstalled the package (using conda install -c conda-forge namaster) but I am still having the same issue.
As a reference, here's the install summary:
(base) humnaawan:~: conda install -c conda-forge namaster
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /Users/humnaawan/anaconda3

  added / updated specs:
    - namaster

The following NEW packages will be INSTALLED:

  cfitsio            conda-forge/osx-64::cfitsio-3.470-h389770f_1
  chealpix           conda-forge/osx-64::chealpix-3.30.0-h01d97ff_1001
  fftw               conda-forge/osx-64::fftw-3.3.8-nompi_h5c49c53_1106
  gsl                conda-forge/osx-64::gsl-2.5-ha2d443c_0
  krb5               conda-forge/osx-64::krb5-1.16.3-hcfa6398_1001
  libcurl            conda-forge/osx-64::libcurl-7.64.1-h16faf7d_0
  libedit            conda-forge/osx-64::libedit-3.1.20170329-hcfe32e1_1001
  libsharp           conda-forge/osx-64::libsharp-1.0.0-h1de35cc_1000
  libssh2            conda-forge/osx-64::libssh2-1.8.2-hcdc9a53_2
  namaster           conda-forge/osx-64::namaster-1.0-py36h1c7146f_1

Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

I'd really appreciate some help.

Well cfitsio bumped the version of their library from 5 to 8. What I don't get is why conda is insisting on linking to the actual file and not the symlink that should prevent this error.
@damonge do you understand how namaster is linking here?

in the mean time you can install one version back of cfitsio and that will fix it

This PR should fix the issue. The new package will be live in a few hours.
https://github.com/conda-forge/namaster-feedstock/pull/6

Okay, I downgraded cfitsio  to 3.410 and things work. Thanks so much!

great! once you update your env again after the rebuild is done (~2 hours or so), you should get a new build of namaster and cfitsio that work together just fine.

Sorry I was offline @beckermr , and thanks a lot for fixing this one. Can I check that this is now fixed?

Hi @damonge @beckermr - it looks like I'm getting a related error on this. Having just updated to macOS Catalina I've had to reinstall anaconda and some other packages. I'm reinstalling namaster and install seems to work:
(base) Steves-MBP:~ stevecunnington$ conda install -c conda-forge namaster
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /Users/stevecunnington/opt/anaconda3

  added / updated specs:
    - namaster

The following NEW packages will be INSTALLED:

  cfitsio            conda-forge/osx-64::cfitsio-3.470-h389770f_2
  chealpix           conda-forge/osx-64::chealpix-3.30.0-ha7c7693_1002
  fftw               conda-forge/osx-64::fftw-3.3.8-nompi_h5c49c53_1106
  libsharp           conda-forge/osx-64::libsharp-1.0.0-h1de35cc_1000
  namaster           conda-forge/osx-64::namaster-1.0-py37he2b8767_0

Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

But importing pymaster gives a similar error as above
(base) Steves-MBP:~ stevecunnington$ python
Python 3.7.4 (default, Aug 13 2019, 15:17:50)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymaster
Traceback (most recent call last):
  File "/Users/stevecunnington/opt/anaconda3/lib/python3.7/site-packages/pymaster/nmtlib.py", line 18, in swig_import_helper
    fp, pathname, description = imp.find_module('_nmtlib', [dirname(__file__)])
  File "/Users/stevecunnington/opt/anaconda3/lib/python3.7/imp.py", line 296, in find_module
    raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_nmtlib'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/stevecunnington/opt/anaconda3/lib/python3.7/site-packages/pymaster/__init__.py", line 49, in <module>
    from pymaster import nmtlib as lib
  File "/Users/stevecunnington/opt/anaconda3/lib/python3.7/site-packages/pymaster/nmtlib.py", line 28, in <module>
    _nmtlib = swig_import_helper()
  File "/Users/stevecunnington/opt/anaconda3/lib/python3.7/site-packages/pymaster/nmtlib.py", line 20, in swig_import_helper
    import _nmtlib
ImportError: dlopen(/Users/stevecunnington/opt/anaconda3/lib/python3.7/site-packages/_nmtlib.cpython-37m-darwin.so, 2): Library not loaded: @rpath/libcfitsio.5.dylib
  Referenced from: /Users/stevecunnington/opt/anaconda3/lib/libnmt.0.dylib
  Reason: image not found

The channels in my .condarc seem to be as suggested above
channels:
  - conda-forge
  - defaults

Has the issue with cfitsio been solved yet or do I need to downgrade this to make things work?
Any help would be great.

Unclear. Plus the os upgrade is in the mix. Did you reinstall the Xcode command line tools?

I've just opened Xcode and updated that and this didn't solve the problem

What's the easiest way to do this? And what version should I downgrade to?

Try something like conda install cfitsio==3.430.

Yep, that worked :) thanks @beckermr !

Of course! So looking at your install above, you have one of the oldest versions of namaster on conda, conda-forge/osx-64::namaster-1.0-py37he2b8767_0
The latest build should have build number (the single int at the end) of 4. See this page here: https://anaconda.org/conda-forge/namaster/files
I don't get how the solver decided on that.

You might also try forcing the entire env to upgrade if you want.

Did you change the labels in your channels or something globally in conda?

No, I've made no changes to my channels. Because of the macOS upgrade, my anaconda should just be the latest default installed one using the graphical install - with no changes made.

hmmmm ok - well let's keep moving then. I might try and get the old packages marked as broken


Add support for Damerau Levenshtein distance

The Damerau Levenshtein distance is a a commonly used metric to compare strings. Support for this could be added based on https://citeseerx.ist.psu.edu/viewdoc/download?doi=<IP_ADDRESS>.1245&rep=rep1&type=pdf.

This appears to be OSA and not Damerau-Levenshtein.

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7724867/ sounds cool but requires a small alphabet. The last_row_id array could be a fast hashmap, which is worth testing. Either this or Hirschberg should be implemented for long sequences to reduce memory usage.

I took a first stab at implementing the Damerau Levenshtein distance without any weights (all operations have weight 1). Here are the current benchmark results:

In addition this implementation only requires linear memory, so it works with far longer strings, where the other implementations run out of memory.


C++ bindings. Args are passed as expected

Related to #10
Old xclbins caused XRT not to pass arguments correctly to CCLO kernel.
These commits add a handmade xml to create a workaround
Tested with self-send/recv in XACC

Closing as this functionality is superseeded in the dev branch


Expletive found (Geopolitical)

Issue Type: Bug
Extensions Marketplace > Search "emulator"
Android Emulator Launcher 0.9.0 > Launch Android Emulators directly from VS Code > 343max
Under "Features"

Cmd-Shit>P

Not sure if  -shit- is an intential typo.   While amusing, it doesn't confirm whether I should press "-shift-".
PS - why isn't this part of an automated "poli-check" scan.  It should have caught this.  Update queries to include -shit, shit- and other special font characters.
VS Code version: Code - Insiders 1.31.0-insider (bae6c84d46cd85c911db7e166a74e698a54c8644, 2019-01-04T06:17:23.540Z)
OS version: Windows_NT ia32 10.0.17134

System Info

Item
Value

CPUs
Intel(R) Core(TM)2 Quad CPU    Q9400  @ 2.66GHz (4 x 2666)

GPU Status
2d_canvas: enabledchecker_imaging: disabled_offflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: disabled_softwarerasterization: unavailable_offsurface_synchronization: enabled_onvideo_decode: enabledwebgl: enabledwebgl2: enabled

Memory (System)
3.25GB (0.69GB free)

Process Argv

Screen Reader
no

VM
0%

Extensions: none

The readme content comes from that extension. Please file the issue against them

Hi Matt,  I will file the specific bug against the extension - but that doesn't really answer the question as to why 'poli-check' didn't find it.   Seems like there is a larger bug where the system could be manipulated by adding special characters in front of flagged content.  This could be exploited.
Is there somewhere I can but a bug against the internal poli-check language tool?

This content is downloaded from the marketplace and controlled by the extension . We don't run policheck on it because it is not part of VS Code, it's more like a webpage that we display in the editor

ah - that make sense. Thanks for responding :-)


Improve handling of updating widgets for IS2Media's elpased time

The updating of widgets for the elapsed time still isn't right. The hook utilised doesn't seem to fire as expected, and instead is only called when an app starts playing media for the first time.
It may be better to simply move to a small timer in IS2Media internally that will trigger needed callbacks every half-second or so when media is playing.

I wonder if the MPU you're hooking is updating time information. If not would a simple call to _startUpdatingTimeInformation work to fix this?

That's a good shout, potentially! Though, since I'm piggybacking off an existing instance of it I'd assume that would be called for me.
Sent from my iPhone

On 22 Sep 2016, at 19:40, QwopJoans<EMAIL_ADDRESS>wrote:
I wonder if the MPU you're hooking is updating time information. If not would a simple call to _startUpdatingTimeInformation work to fix this?
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub, or mute the thread.

In theory this is now resolved with the last commit. Needs testing to double check.


fix & feat: plotting scripts, configurator

Plotting script

fix --debug mode for plotting script
add additional cross-section rescaler rescale_yields for sample set
add mergemap for comparison script
scale x-axis automatically (skip 0 entries)

Configurator

add default run_options config
create reproducible config file (.py) under output directory
move systematic as common methods

Other update

merge some developments from BTV
add test workflow for plotting tool
polish README.md

Hi @andreypz , I am happy with all my updates now. please have a look if any changes required

I found a strange bug, related to names of the merged samples and scaling.
It can be reproduced using this modified yml config, where I changed one sample name to runC_1.
In this config I tell it to scale only runC_1 sample, but runC is also scaled.

I found a strange bug, related to names of the merged samples and scaling. It can be reproduced using this modified yml config, where I changed one sample name to runC_1. In this config I tell it to scale only runC_1 sample, but runC is also scaled.

Fix in new commits


POWERAPPS_VIRAL LicenseText_Microsoft Power Apps Plan 2 Trial Note listed

Please add the SKU Id POWERAPPS_VIRAL for the Microsoft Power Apps Plan 2 Trial license.

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

ID: 7c245452-161d-89a1-c026-99a0721cf071
Version Independent ID: 16dec59a-eb83-1837-4efd-4645e7aeaed2
Content: Product names and service plan identifiers for licensing - Azure AD
Content Source: articles/active-directory/enterprise-users/licensing-service-plan-reference.md
Service: active-directory
Sub-service: users-groups-roles
GitHub Login: @kkern
Microsoft Alias: kakern

@gregdegruy   Thanks for the feedback. We will engage the content development team for further investigation, they will verify and perform necessary changes in the document as needed.
@kkern13  Can you have a look at this ?

#assign:@Nicholak-MS

Hi @gregdegruy I updated POWERAPPS_VIRAL with the latest service plan SKU information from our source. It will publish later today. Please let me know if you are still seeing any anomalies.
#please-close


How to test the API using curl

Hi Folks,
In the API doc, there is a piece of code like this:
POST /ermrest/catalog/42/schema/schema_name/table HTTP/1.1
Host: www.example.com
Content-Type: application/json

{
  "schema_name": schema name,
  "table_name": table name,
  "comment": table comment,
  "annotations": {
    annotation key: annotation document, ...
  },
  "column_definitions": [ column representation, ... ],
  "keys": [ key representation, ... ],
  "foreign_keys": [ foreign key representation, ... ],
  "kind": "table"
}

My questions, if using curl to make the call, what is the correct format? I tried:
curl -k -b cookie -X POST --header "Content-Type: application/json" --data '{ "schema_name": "ray","table_name": "table2","comment": "comment2", "column_definitions": [colum1, colum2], "kind": "table"}' "https://derivar.rcs.ucalgary.ca/ermrest/catalog/21/schema/ray/table"

I ran into issues with the errror message:
Request malformed. Detail: Could not deserialize JSON input.. I did once and it passed but I forgot how I did.
Thanks,
Ray

By the way, in the doc, it looks you can copy and paste the test code, what is the tool you use?

Note, we would recommend using the deriva-py Python client library to
manage catalog schemas etc. rather than curl. But, I think you could
replace --data with --json in your example so that curl will send it as
JSON rather than trying to do http form data encoding.
See
https://github.com/informatics-isi-edu/deriva-py/blob/master/docs/project-tutorial.md
for a tutorial overview of setting up a project-specific catalog using
deriva-py.
Also,
https://github.com/informatics-isi-edu/deriva-py/tree/master/docs#ermrest-model-management
has a bit more terse summary of some model management tasks.
On 5/1/24 13:47, Ray Jiang wrote:

Hi Folks,
In the API doc, there is a piece of code like this:
|POST /ermrest/catalog/42/schema/schema_name/table HTTP/1.1 Host:
www.example.com
https://urldefense.us/v2/url?u=http-3A__www.example.com&d=DwQCaQ&c=qzHnJIRvjI6L-clJH8JwLQvf_Iq43fzikf6aoxZgMb8&r=DFuFBb1XyAwNFfI7eRp2ww&m=5TEqccI_-BpgoULmSiuODuehfEn2TD7sB9UYRyMfT7gV4ZvNsPqotYs8Mt93gBnN&s=LAHiUxzb223JSg8_vDMj45geZRviQ9qhFoawURKSUxw&e= Content-Type: application/json { "schema_name": schema name, "table_name": table name, "comment": table comment, "annotations": { annotation key: annotation document, ... }, "column_definitions": [ column representation, ... ], "keys": [ key representation, ... ], "foreign_keys": [ foreign key representation, ... ], "kind": "table" } |
My questions, if using |curl| to make the call, what is the correct
format? I tried:
|curl -k -b cookie -X POST --header "Content-Type: application/json"
--data '{ "schema_name": "ray","table_name": "table2","comment":
"comment2", "column_definitions": [colum1, colum2], "kind": "table"}'
"https://derivar.rcs.ucalgary.ca/ermrest/catalog/21/schema/ray/table
https://urldefense.us/v2/url?u=https-3A__derivar.rcs.ucalgary.ca_ermrest_catalog_21_schema_ray_table&d=DwQCaQ&c=qzHnJIRvjI6L-clJH8JwLQvf_Iq43fzikf6aoxZgMb8&r=DFuFBb1XyAwNFfI7eRp2ww&m=5TEqccI_-BpgoULmSiuODuehfEn2TD7sB9UYRyMfT7gV4ZvNsPqotYs8Mt93gBnN&s=GkTTBEMINsU-v16DRz8AyZy4DUh2z1eDaGhsuvhgpVs&e=" |
I ran into issues with the errror message:
|Request malformed. Detail: Could not deserialize JSON input.|. I did
once and it passed but I forgot how I did.
Thanks,
Ray
—
Reply to this email directly, view it on GitHub
https://urldefense.us/v2/url?u=https-3A__github.com_informatics-2Disi-2Dedu_ermrest_issues_254&d=DwMCaQ&c=qzHnJIRvjI6L-clJH8JwLQvf_Iq43fzikf6aoxZgMb8&r=DFuFBb1XyAwNFfI7eRp2ww&m=5TEqccI_-BpgoULmSiuODuehfEn2TD7sB9UYRyMfT7gV4ZvNsPqotYs8Mt93gBnN&s=xwwFCzmSlzVLuP7xNJC53BHDKE1nvrv7cBjcX8SqaH0&e=, or unsubscribe https://urldefense.us/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAIGPTFXYC2L3O4RXRJYDWTZAFIEPAVCNFSM6AAAAABHCRIYTOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI3TIMJXGQZDKNQ&d=DwMCaQ&c=qzHnJIRvjI6L-clJH8JwLQvf_Iq43fzikf6aoxZgMb8&r=DFuFBb1XyAwNFfI7eRp2ww&m=5TEqccI_-BpgoULmSiuODuehfEn2TD7sB9UYRyMfT7gV4ZvNsPqotYs8Mt93gBnN&s=YnLU1y5Lp9LXdTGFArNYPHWo8mrQQij0V_dApI7G5QM&e=.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Thank you very much for your reply, Karlcz! @karlcz we are going to try out your recommended way for doing it.


Getting error while calling the face_recognition.face_encodings(img, face_locations) in Ubuntu & RasbianOS

face_recognition version: 1.3.0
Python version: 3.7 & 3.8
Operating System: Ubuntu 18.04, Raspbian, Ubuntu 20.04

Description
Raising the TypeError Exception while face detected and having the data in face_locations variable in below code line.
face_recognition.face_encodings(img, face_locations)
The code line mentioned above raising the exception TypeError: compute_face_descriptor(): incompatible function arguments.
As I can see from the documentation, the passed function parameters are correct and works pretty well in Windows. I observed whenever the face is getting detected and passing the face_locations as a parameter it is raising the error, Type of face_locations is a list of tuples with detected face coordinates.
TypeError: compute_face_descriptor(): incompatible function arguments. The following argument types are supported:
    1. (self: _dlib_pybind11.face_recognition_model_v1, img: numpy.ndarray[(rows,cols,3),numpy.uint8], face: _dlib_pybind11.full_object_detection, num_jitters: int = 0, padding: float = 0.25) -> _dlib_pybind11.vector
    2. (self: _dlib_pybind11.face_recognition_model_v1, img: numpy.ndarray[(rows,cols,3),numpy.uint8], num_jitters: int = 0) -> _dlib_pybind11.vector
    3. (self: _dlib_pybind11.face_recognition_model_v1, img: numpy.ndarray[(rows,cols,3),numpy.uint8], faces: _dlib_pybind11.full_object_detections, num_jitters: int = 0, padding: float = 0.25) -> _dlib_pybind11.vectors
    4. (self: _dlib_pybind11.face_recognition_model_v1, batch_img: List[numpy.ndarray[(rows,cols,3),numpy.uint8]], batch_faces: List[_dlib_pybind11.full_object_detections], num_jitters: int = 0, padding: float = 0.25) -> _dlib_pybind11.vectorss
    5. (self: _dlib_pybind11.face_recognition_model_v1, batch_img: List[numpy.ndarray[(rows,cols,3),numpy.uint8]], num_jitters: int = 0) -> _dlib_pybind11.vectors

Invoked with: <_dlib_pybind11.face_recognition_model_v1 object at 0x000001DAB486B7B0>, array([[[208, 223, 240],
        [204, 213, 234],
        [191, 208, 229],
        ...,
        [ 87,  76,  74],
        [ 94,  78,  77],
        [ 82,  72,  70]],

       [[214, 223, 245],
        [208, 221, 240],
        [197, 217, 235],
        ...,
        [100,  63,  68],
        [104,  74,  71],
        [ 87,  78,  75]],

       [[220, 231, 249],
        [218, 228, 245],
        [208, 224, 239],
        ...,
        [ 96,  86,  84],
        [102,  83,  82],
        [ 86,  83,  80]],

       ...,

       [[ 36,  36,  35],
        [ 41,  37,  36],
        [ 40,  35,  33],
        ...,
        [107,  65,  41],
        [109,  67,  44],
        [109,  68,  50]],

       [[ 41,  39,  38],
        [ 42,  36,  35],
        [ 44,  39,  38],
        ...,
        [107,  64,  45],
        [106,  62,  42],
        [108,  64,  42]],

       [[ 46,  42,  41],
        [ 45,  39,  38],
        [ 43,  38,  36],
        ...,
        [104,  67,  51],
        [100,  64,  46],
        [108,  64,  40]]], dtype=uint8), <_dlib_pybind11.full_object_detection object at 0x000001DAB4EF0370>, 1

What I Did
Tested above implementation with Python3.7 & Python3.8 with dlib==19.24.1, face_recognition==1.3.0, face_recognition_models==0.3.0. The same configuration works well in Windows but not in Linux.

I am also having this issue. I initially tried this on Windows 11 then reinstalled my system to Ubuntu 22.04.2 LTS thinking that the platform might be the cause since it is not official supported and still no luck with the same issue encountered. I am also using face_recognition v1.3.0, face_recognition_models v0.3.0 and dlib v19.24.1.

I am having the same issue here on Mac.

There is already a solution submitted in stackoverflow.
The sample codes usually uses rgb_small_frame = small_frame[:, :, ::-1]. That needs to be changed with rgb_small_frame = np.ascontiguousarray(small_frame[:, :, ::-1]).

Figured out the solution, posted the answer on the Stackoverflow.
Closing the issue.


Update javascript libraries

@kabukky Please take a look and check to make sure everything works. Just a few library updates.

@tomkwok Thanks!
Could you tell me what this line in the admin.htmlis for?
<script type="text/javascript">$(function(){$.support.transition = false;});</script>

I changed all CDN urls to HTTPS for the integrity checks to work when accessing the admin interface via HTTP.
See https://github.com/kabukky/journey/commit/7d1e37766b839b5fdabddf03d428990eb1060a38


Font 'Verdana' not flowing correctly, When generate PDF

I am using xhtml2pdf updated version 0.2.13 version. At the time of PDF generation the font 'Verdana' not showing correctly. The font look and feel has changed.

Below is my Python File:
with open(output_filename, 'wb') as output_file:
result = pisa.CreatePDF(
src=html_content,
dest=output_file,
)
if result.err:
print(f"PDF creation error: {result.err}")
else:
print("PDF created successfully")
Below is my html_content File:

    This is Verdana Font.
    Quarter basis  distribution.

I have attached file for Actual Verdana font look and feel and xhtml2pdf generated file.
1st is the ACtual Verdana Font and 2nd is the xhtml2pdf generated font.

OS version:
Python version: 3.11.4
XHTML2PDF version: 0.2.13

Does this use the same reportlab version for both cases?

yes

Hi,
Any update on this?

@Denny814, am I right in guessing the first example was not generated by xhtml2pdf or reportlab, but by a browser?
The second example looks very much like it rendered using the default sans-serif font. That also makes sense, since Verdana is not a standard PDF font you will have to provide it to xhtml2pdf in form of a ttf file:
in the <head> section of your html file, add @font-face { font-family: "Verdana"; src: url('Verdana.ttf'); }
assuming the ttf file is in the current directory (you could also use an http(s) URL instead to download it from somewhere).
One non-technical reminder: it seems Verdana is not a "free" font, i.e. it is probably illegal to use it without a license unless you run the process on Windows. You might want to check if there's a free look-alike alternative.


[DO NOT MERGE] - Change how all apps deploy

This cannot be merged until all the apps have been migrated to work this way.

This is so everyone is able to see how all the Capistrano config works
for each app.
This is using the new public
repo.
The Capistrano recipes will all be the above public repo.
The secrets will remain in alphagov-deployment.
Also we are now using the master branch of govuk-app-deployment

@alexmuller @brenetic @emmabeynon @klssmith

Can be merged after https://github.com/alphagov/govuk-app-deployment/pull/6


Add ability to cache docker images

What is cached in the state directory right now?
In particular, reusing the state directory for tele build allows us to forgo pulling and importing both gravity and gravity apps (i.e. stolon, pithos, cluster-ssl, bandwagon) when the desired tags match those in the cache.
What isn't cached?
All docker images are not cached in the state directory. And they are cached by the docker daemon. But in the CI pipeline, often the docker daemon cache is empty.
Why
We would like to be able to manage cache for docker images.
Description
This PR adds a new --image-cache-dir flag. This path will correspond to the file store for the docker registry. When tele build creates a new tarball, each docker image will be put into this registry. And this folder is copied to vendor/registry when building target app.
This registry will contain all tagged images from the previous build. But this is not a big overhead, because docker images mostly only have a change at the last level.
These are not breaking changes. If you do not use this flag, then everything works as before.
Type of change
New feature (non-breaking change which adds functionality)
Linked tickets and other PRs

Closes #, refs #

Requires #

Ports #

TODOs

[x] Self-review the change
[x] Write tests
[x] Perform manual testing
[ ] Write documentation
[ ] Address review feedback

Implementation

Performance/Scaling

Testing done

Additional information

One more thing -- after I try running a build with this flag I'm not seeing any content in the image-cache-dir afterwards.
$ /home/walt/git/gravity/e/build/9.0.0-beta.1.16/tele build /home/walt/git/gravity/assets/robotest/current/app.yaml --state-dir=/home/walt/git/gravity/e/build/9.0.0-beta.1.16/packages --version=9.0.0-beta.1.16 -f --output=/home/walt/git/gravity/e/build/9.0.0-beta.1.16/robotest/tmp/robotest-9.0.0-beta.1.16.tar --image-cache-dir /home/walt/git/gravity/e/build/9.0.0-beta.1.16/robotest/tmp/docker-cache
Tue Jun 15 21:15:44 UTC Building cluster image robotest 9.0.0-beta.1.16 from manifest
Tue Jun 15 21:15:44 UTC Selecting base image version
        Will use base image version 9.0.0-beta.1.16
Tue Jun 15 21:15:44 UTC Local package cache is up-to-date
Tue Jun 15 21:15:44 UTC Discovering and embedding Docker images
        Vendored image docker:git
        Still discovering and embedding Docker images (10 seconds elapsed)
        Vendored image quay.io/gravitational/debian-tall:buster
        Vendored image k8s.gcr.io/echoserver:1.10
Tue Jun 15 21:15:57 UTC Creating application
Tue Jun 15 21:16:01 UTC Packaging cluster image
Tue Jun 15 21:16:08 UTC Saving cluster image to /home/walt/git/gravity/e/build/9.0.0-beta.1.16/robotest/tmp/robotest-9.0.0-beta.1.16.tar
Tue Jun 15 21:16:14 UTC Build finished in 30 seconds
walt@work:~/git/gravity$ ls /home/walt/git/gravity/e/build/9.0.0-beta.1.16/robotest/tmp/docker-cache
ls: cannot access '/home/walt/git/gravity/e/build/9.0.0-beta.1.16/robotest/tmp/docker-cache': No such file or directory

Please fill out the testing done section with info about how you tested this on the CLI -- these examples can probably help drive the documentation needed too.

One more thing -- after I try running a build with this flag I'm not seeing any content in the image-cache-dir afterwards.
$ /home/walt/git/gravity/e/build/9.0.0-beta.1.16/tele version
Edition:        enterprise
Version:        9.0.0-beta.1.16
Git Commit:     88743d6165066301fbf60bc3dbd81fcd27e5078e
Helm Version:   v3.4
$ /home/walt/git/gravity/e/build/9.0.0-beta.1.16/tele build /home/walt/git/gravity/assets/robotest/current/app.yaml --state-dir=/home/walt/git/gravity/e/build/9.0.0-beta.1.16/packages --version=9.0.0-beta.1.16 -f --output=/home/walt/git/gravity/e/build/9.0.0-beta.1.16/robotest/tmp/robotest-9.0.0-beta.1.16.tar --image-cache-dir /home/walt/git/gravity/e/build/9.0.0-beta.1.16/robotest/tmp/docker-cache
Tue Jun 15 21:15:44 UTC Building cluster image robotest 9.0.0-beta.1.16 from manifest
Tue Jun 15 21:15:44 UTC Selecting base image version
        Will use base image version 9.0.0-beta.1.16
Tue Jun 15 21:15:44 UTC Local package cache is up-to-date
Tue Jun 15 21:15:44 UTC Discovering and embedding Docker images
        Vendored image docker:git
        Still discovering and embedding Docker images (10 seconds elapsed)
        Vendored image quay.io/gravitational/debian-tall:buster
        Vendored image k8s.gcr.io/echoserver:1.10
Tue Jun 15 21:15:57 UTC Creating application
Tue Jun 15 21:16:01 UTC Packaging cluster image
Tue Jun 15 21:16:08 UTC Saving cluster image to /home/walt/git/gravity/e/build/9.0.0-beta.1.16/robotest/tmp/robotest-9.0.0-beta.1.16.tar
Tue Jun 15 21:16:14 UTC Build finished in 30 seconds
$ ls /home/walt/git/gravity/e/build/9.0.0-beta.1.16/robotest/tmp/docker-cache
ls: cannot access '/home/walt/git/gravity/e/build/9.0.0-beta.1.16/robotest/tmp/docker-cache': No such file or directory

Please fill out the testing done section with info about how you tested this on the CLI -- these examples can probably help drive the documentation needed too.

Looks nice -- thanks for working on this.
What sort of timing/data transfer benefits do you see when using the same cache a 2nd plus time for your workflow?
Is this intended only for local development, or was this developed for use in a build/release pipeline?

@wadells
This feature is not for developers. This is only useful for pipeline processes where the local docker image cache is cleaned between different builds. This will save a lot of time in the builds where hundreds of images.

One more thing -- after I try running a build with this flag I'm not seeing any content in the image-cache-dir afterwards.
$ /home/walt/git/gravity/e/build/9.0.0-beta.1.16/tele version
Edition:        enterprise
Version:        9.0.0-beta.1.16
Git Commit:     88743d6165066301fbf60bc3dbd81fcd27e5078e
Helm Version:   v3.4
$ /home/walt/git/gravity/e/build/9.0.0-beta.1.16/tele build /home/walt/git/gravity/assets/robotest/current/app.yaml --state-dir=/home/walt/git/gravity/e/build/9.0.0-beta.1.16/packages --version=9.0.0-beta.1.16 -f --output=/home/walt/git/gravity/e/build/9.0.0-beta.1.16/robotest/tmp/robotest-9.0.0-beta.1.16.tar --image-cache-dir /home/walt/git/gravity/e/build/9.0.0-beta.1.16/robotest/tmp/docker-cache
Tue Jun 15 21:15:44 UTC Building cluster image robotest 9.0.0-beta.1.16 from manifest
Tue Jun 15 21:15:44 UTC Selecting base image version
        Will use base image version 9.0.0-beta.1.16
Tue Jun 15 21:15:44 UTC Local package cache is up-to-date
Tue Jun 15 21:15:44 UTC Discovering and embedding Docker images
        Vendored image docker:git
        Still discovering and embedding Docker images (10 seconds elapsed)
        Vendored image quay.io/gravitational/debian-tall:buster
        Vendored image k8s.gcr.io/echoserver:1.10
Tue Jun 15 21:15:57 UTC Creating application
Tue Jun 15 21:16:01 UTC Packaging cluster image
Tue Jun 15 21:16:08 UTC Saving cluster image to /home/walt/git/gravity/e/build/9.0.0-beta.1.16/robotest/tmp/robotest-9.0.0-beta.1.16.tar
Tue Jun 15 21:16:14 UTC Build finished in 30 seconds
$ ls /home/walt/git/gravity/e/build/9.0.0-beta.1.16/robotest/tmp/docker-cache
ls: cannot access '/home/walt/git/gravity/e/build/9.0.0-beta.1.16/robotest/tmp/docker-cache': No such file or directory

Please fill out the testing done section with info about how you tested this on the CLI -- these examples can probably help drive the documentation needed too.

This is a bug - tele build needs to propagate the --image-cache-dir option for e binary as well.

One more thing -- after I try running a build with this flag I'm not seeing any content in the image-cache-dir afterwards.
$ /home/walt/git/gravity/e/build/9.0.0-beta.1.16/tele version
Edition:        enterprise
Version:        9.0.0-beta.1.16
Git Commit:     88743d6165066301fbf60bc3dbd81fcd27e5078e
Helm Version:   v3.4
$ /home/walt/git/gravity/e/build/9.0.0-beta.1.16/tele build /home/walt/git/gravity/assets/robotest/current/app.yaml --state-dir=/home/walt/git/gravity/e/build/9.0.0-beta.1.16/packages --version=9.0.0-beta.1.16 -f --output=/home/walt/git/gravity/e/build/9.0.0-beta.1.16/robotest/tmp/robotest-9.0.0-beta.1.16.tar --image-cache-dir /home/walt/git/gravity/e/build/9.0.0-beta.1.16/robotest/tmp/docker-cache
Tue Jun 15 21:15:44 UTC Building cluster image robotest 9.0.0-beta.1.16 from manifest
Tue Jun 15 21:15:44 UTC Selecting base image version
        Will use base image version 9.0.0-beta.1.16
Tue Jun 15 21:15:44 UTC Local package cache is up-to-date
Tue Jun 15 21:15:44 UTC Discovering and embedding Docker images
        Vendored image docker:git
        Still discovering and embedding Docker images (10 seconds elapsed)
        Vendored image quay.io/gravitational/debian-tall:buster
        Vendored image k8s.gcr.io/echoserver:1.10
Tue Jun 15 21:15:57 UTC Creating application
Tue Jun 15 21:16:01 UTC Packaging cluster image
Tue Jun 15 21:16:08 UTC Saving cluster image to /home/walt/git/gravity/e/build/9.0.0-beta.1.16/robotest/tmp/robotest-9.0.0-beta.1.16.tar
Tue Jun 15 21:16:14 UTC Build finished in 30 seconds
$ ls /home/walt/git/gravity/e/build/9.0.0-beta.1.16/robotest/tmp/docker-cache
ls: cannot access '/home/walt/git/gravity/e/build/9.0.0-beta.1.16/robotest/tmp/docker-cache': No such file or directory

Please fill out the testing done section with info about how you tested this on the CLI -- these examples can probably help drive the documentation needed too.

@wadells
Thank you for noticing this error. There was no propagation of the --image-cache-dir flag for an enterprise binary.  I have already fixed this.
Here are my test scripts:
for open-source version
$ make production telekube
....
....
$ rm -rf tmp/image-cache tmp/target
$ mkdir -p tmp/image-cache tmp/target

$ ./build/9.0.0-beta.1.17/tele \
build examples/wordpress/resources/app.yaml -f \
--state-dir=build/9.0.0-beta.1.17/packages \
--output=tmp/target/cluster.tar \
--image-cache-dir=tmp/image-cache
Wed Jun 16 15:48:06 UTC Building cluster image wordpress 0.0.1 from manifest
Wed Jun 16 15:48:06 UTC Selecting base image version
        Will use base image version 9.0.0-beta.1.17
Wed Jun 16 15:48:06 UTC Local package cache is up-to-date
Wed Jun 16 15:48:06 UTC Discovering and embedding Docker images
        Vendored image quay.io/gravitational/debian-tall:buster
        Still discovering and embedding Docker images (10 seconds elapsed)
        Vendored image mysql:5.7
        Still discovering and embedding Docker images (20 seconds elapsed)
        Vendored image wordpress:5.4-apache
Wed Jun 16 15:48:33 UTC Creating application
        Still creating application (10 seconds elapsed)
Wed Jun 16 15:48:46 UTC Packaging cluster image
Wed Jun 16 15:48:55 UTC Saving cluster image to tmp/target/cluster.tar
Wed Jun 16 15:48:59 UTC Build finished in 53 seconds

$ ls tmp/image-cache/docker/registry/v2/repositories
gravitational  mysql  wordpress

for enterprise version
$ make -C e production telekube
....
$ rm -rf tmp/image-cache tmp/target
$ mkdir -p tmp/image-cache tmp/target

$ ./e/build/9.0.0-beta.1.17/tele \
build examples/wordpress/resources/app.yaml -f \
--state-dir=e/build/9.0.0-beta.1.17/packages \
--output=tmp/target/cluster.tar \
--image-cache-dir=tmp/image-cache
Wed Jun 16 15:50:24 UTC Building cluster image wordpress 0.0.1 from manifest
Wed Jun 16 15:50:24 UTC Selecting base image version
        Will use base image version 9.0.0-beta.1.17
Wed Jun 16 15:50:24 UTC Local package cache is up-to-date
Wed Jun 16 15:50:24 UTC Discovering and embedding Docker images
        Vendored image quay.io/gravitational/debian-tall:buster
        Still discovering and embedding Docker images (10 seconds elapsed)
        Vendored image mysql:5.7
        Still discovering and embedding Docker images (20 seconds elapsed)
        Vendored image wordpress:5.4-apache
Wed Jun 16 15:50:52 UTC Creating application
        Still creating application (10 seconds elapsed)
Wed Jun 16 15:51:04 UTC Packaging cluster image
Wed Jun 16 15:51:13 UTC Saving cluster image to tmp/target/cluster.tar
Wed Jun 16 15:51:16 UTC Build finished in 52 seconds

$ ls tmp/image-cache/docker/registry/v2/repositories
gravitational  mysql  wordpress


merge code

Coverage decreased (-1.7%) to 76.656% when pulling 0dea189c1fdccd4dd728b6d5f4c1f6292ae951c7 on wujimin:master into ce3779865ca544d1c4672dc80c5d28cf02ddb170 on ServiceComb:master.

please verify if java docs are valid with mvn release:prepare -Prelease

Coverage decreased (-1.7%) to 76.581% when pulling d56d2ed4b68c024c28d07b84abbb21a48599e2c9 on wujimin:master into ce3779865ca544d1c4672dc80c5d28cf02ddb170 on ServiceComb:master.


[manager/dispatcher] Fix deadlock in dispatcher

There was a rare case where the dispatcher could end up deadlocked when
calling stop, which would cause the whole leadership change procedure to
go sideways, the dispatcher to pile up with goroutines, and the node to
crash.
In a nutshell, calls to the Session RPC end up in a (*Cond).Wait(),
waiting for a Broadcast that, once Stop is called, may never come. To
avoid that case, Stop, after being called and canceling the Dispatcher
context, does one final Broadcast to wake the sleeping waiters.
However, because the rpcRW lock, which stops Stop from proceeding until
all RPCs have returned, was previously obtained BEFORE the call to
Broadcast, Stop would never reach this final Broadcast call, waiting on
the Session RPCs to release the rpcRW lock, which they could not do
until Broadcast was called. Hence, deadlock.
To fix this, we simple have to move this final Broadcast to above the
attempt to acquire the rpcRW lock, allowing everything to proceed
correctly.
Signed-off-by: Drew Erny<EMAIL_ADDRESS>

LGTM!

How is this tested?

For regressions only using unit/e2e tests, and that’s what we’ll recommend too. It’s a race condition so can’t be predictably reproduced @antonybichon17


Build Container fails with "Error: Initialization of container bc3227297916 failed Stacktrace: at Wait-BcContainerReady"

During the merge of a pull request (using GitHub's automated actions), the Build portion of the workflow fails with an error about creating the container. Full log of the workflow step follows:
Run<EMAIL_ADDRESS>Run try *** D:\a_actions\microsoft\AL-Go-Actions\v2.0\RunPipeline/RunPipeline.ps1 -actor $ENV:_actor -token $ENV:_token -parentTelemetryScopeJson $ENV:_parentTelemetryScopeJson -project $ENV:_project -settingsJson $ENV:_settingsJson -secretsJson $ENV:secretsJson *** catch *** Write-Host "::Error::Unexpected error when running action ($($.Exception.Message.Replace("r",'').Replace("n",' ')))"; exit 1 ***
Downloading BcContainerHelper latest version
BcContainerHelper version 4.0.5
BcContainerHelper emits usage statistics telemetry to Microsoft
use settings and secrets
Analyzing repository
Checking appDependencyProbingPaths
Warning: No performance test apps found in bcptTestFolders in .AL-Go\settings.json
Warning: No test apps found in testFolders in .AL-Go\settings.json
Locating previous release
Invoke Run-AlPipeline
Parameters
Pulling Generic Image
Creating Container
Removing Container
Run-AlPipeline Telemetry Correlation Id: bdfd842f-7a03-4b59-a840-a363c49f17f5
Error: RunPipeline action failed. Error: Initialization of container bc3227297916 failed Stacktrace: at Wait-BcContainerReady, C:\Users\runneradmin\AppData\Local\Temp\603aa1f3-95bb-4d16-abbd-977dd75ce91d\BcContainerHelper\ContainerHandling\Wait-NavContainerReady.ps1: line 42 at New-BcContainer, C:\Users\runneradmin\AppData\Local\Temp\603aa1f3-95bb-4d16-abbd-977dd75ce91d\BcContainerHelper\ContainerHandling\New-NavContainer.ps1: line 1926 at , C:\Users\runneradmin\AppData\Local\Temp\603aa1f3-95bb-4d16-abbd-977dd75ce91d\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 631 at , C:\Users\runneradmin\AppData\Local\Temp\603aa1f3-95bb-4d16-abbd-977dd75ce91d\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 821 at , C:\Users\runneradmin\AppData\Local\Temp\603aa1f3-95bb-4d16-abbd-977dd75ce91d\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 764 at , C:\Users\runneradmin\AppData\Local\Temp\603aa1f3-95bb-4d16-abbd-977dd75ce91d\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 747 at Run-AlPipeline, C:\Users\runneradmin\AppData\Local\Temp\603aa1f3-95bb-4d16-abbd-977dd75ce91d\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 712 at , D:\a_actions\microsoft\AL-Go-Actions\v2.0\RunPipeline\RunPipeline.ps1: line 279 at , D:\a_temp\0d9167d9-ae1b-440c-ad30-e727c3f66768.ps1: line 1 at , : line 1
AL-Go action ran: RunPipeline Telemetry Correlation Id: dbfb7c04-60ab-433f-ab7a-ac6d10fe7941
Removing BcContainerHelper
Error: Process completed with exit code 1.

Did you retry the operation - did that still fail?
What I really need to see is these branched folded out:
Parameters
Creating Container
So that I can see what's going on.

In the output, you will see a small arrow in front of these lines:
Parameters
Pulling Generic Image
Creating Container
Removing Container
click those to reveal the content - or download full logs in the top right hand corner.
 Let me know if you cannot get in.

Got in.
Your license file has expired:

any chance you can email the expired license to freddyk at microsoft dot com - then I will make sure that an error like this is displayed as license file expired and not some cryptic error message.
sorry.


⚠ Bofrost.lu has degraded performance

In c592fee, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1319 ms

Resolved: Bofrost.lu performance has improved in 45f34c1 after 26 minutes.


Connection problem

Hello friend, I would first like to congratulate you on all content shared and always updated with us.
I carried out tests using the Async_ConfigOnSwitch with version 1.4.2 modifying only the type of connection in the code and realized the following problems:
1- Using STA-mode DHCP the station ip is always <IP_ADDRESS>
2 Using STA-mode StaticIP the first connection works fine as DHCP,  it also works fine after setting a static IP using the config in AP, but when rebooting it goes back to DHCP.  The station ip is changed to default Station IP just by opening and closing the AP.
A tip: I noticed that the original loop is stopped when the wifi is disconnected, to solve this I used multitasking where I put a task for connections and another task for reading sensors.

First, thanks for your interests in the library.
I certainly need more information, not just looking at my crystal ball, and waste my time to guess what's happening from the scarce info you provided.
Have a look at How to create a Minimal, Reproducible Example, improve then post more terminal debug info to prove your point.
Then I'll definitely spend some more time to verify. I'm closing this now and re-open whenever the bug is proven.
I think from now on, I won't respond to any issue not following the minimum requirements as specified in How to submit a bug report

First, thanks for your interests in the library.
I certainly need more information, not just looking at my crystal ball, and waste my time to guess what's happening from the scarce info you provided.
Have a look at How to create a Minimal, Reproducible Example, improve then post more terminal debug info to prove your point.
Then I'll definitely spend some more time to verify. I'm closing this now and re-open whenever the bug is proven.
I think from now on, I won't respond to any issue not following the minimum requirements as specified in How to submit a bug report


Pagination on refresh loses styles

Describe the bug
The pagination component  when refreshing the browser makes component  colors like  default browser ,and display warning in console
Steps to reproduce
Easy just copy pagination and put wherever and refresh the page and u will see the component style loses colors and styles.
https://codesandbox.io/s/practical-dewdney-rrpkf?file=/pages/index.js
Expected behaviour
Not loses the styles when refreshing the browser
Screenshots

If applicable, add screenshots to help explain your problem.
Environment / Context

Desktop
Windows
Edge  version 98.0.1108.43

Additional info
I be tested in my machine and sandbox and just works after I click the button of page

Hey @Siumauricio I noticed you are using Next.js so in order to guarantee the same classNames both on the server and on the client you have to flush the NextUI styles on the _document.jsx/tsx as the documentation indicates -> https://nextui.org/docs/guide/nextui-plus-nextjs
i.e
import Document, { Html, Head, Main, NextScript } from 'next/document';
import { CssBaseline } from '@nextui-org/react';

class MyDocument extends Document {
  static async getInitialProps(ctx) {
    const initialProps = await Document.getInitialProps(ctx);
    return {
      ...initialProps,
      styles: <>{initialProps.styles}</>
    };
  }

  render() {
    return (
      <Html lang="en">
        <Head>{CssBaseline.flush()}</Head>
        <body>
          <Main />
          <NextScript />
        </body>
      </Html>
    );
  }
}

Here's your example fixed https://codesandbox.io/s/crazy-sea-1doyp?file=/pages/index.js
Hope it helps you 🙌🏻

I tried and yeah seems to work, but for many reasons that I don't know, buttons inside a modal lose the styles, like the colors, etc.
Using this way makes the buttons inside a modal loses the styles
 <Head>
       {CssBaseline.flush()}
</Head>

But I found a way to solve it which is just using  like that
<Head />
{CssBaseline.flush()}


Proxy asset requests to a fake version of S3 via Nginx

Currently the two feature flag percentages are set to 100% in all environments. This means that in those environments Asset Manager proxies all asset requests to S3 via Nginx.
The tests in this repo do not take into account the environment variables or the Nginx configuration defined in govuk-puppet. This meant that the feature flag percentages were not set and so Asset Manager has been using send_file to instruct Nginx to serve assets directly from the filesystem. Furthermore, since the Nginx config was not sending the relevant headers (and in any case was not setup to handle a send_file response) the tests were relying on the Rails app serving the asset directly from disk due to the absence of the X-Accel-Redirect request header.
We want to make the proxying to S3 behaviour the default for Asset Manager and plan to remove the ability to serve from the filesystem.
This commit sets the two feature flag percentages to 100% and adds just enough Nginx configuration to have Asset Manager instruct Nginx to proxy asset requests to a fake version of S3 provided by the Asset Manager Rails app.
While this makes the tests more realistic and means we can safely remove the old functionality from Asset Manager, I'm somewhat uncomfortable with the fact that the Nginx config I've come up with differs somewhat from that in all other environments.
Notably in those other environments, the assets-origin vhost proxies asset requests to the asset-manager vhost (via the static vhost) and it's the asset-manager vhost which contains the "internal" location used to proxy to S3; whereas in this repo the assets-origin vhost proxies directly to the Asset Manager Rails app and therefore itself contains the "internal" location. Similarly in the other environments there is no need for the fake-s3 location in the assets-origin vhost at all, because we can just rely on the default behaviour of the asset-manager vhost.
I did attempt to make the Nginx config more realistic, but ran into trouble because all the Nginx vhosts run in a single container which doesn't seem to be able to resolve hosts like asset-manager.dev.gov.uk.
All in all the fact that this repo doesn't make use of the environment variables and Nginx config from govuk-puppet is a bit of a concern, particularly for Asset Manager related behaviour which relies quite heavily on the Nginx config. However, I think this commit is still a step forward.

Hmm. I'm investigating the build failure. I ran make build start test-manuals-publisher successfully on my local machine...

I've rebased against master and force-pushed to see if that makes any difference...

Hey @floehopper, thanks for putting this together. It seems to make sense to me, but I feel like I'm missing some context
Could I just ask a few questions to help understand more about asset manager changes.

Will apps still upload files directly to asset-manager? will that then pass the files on to s3?
WIll assets still be served via https://assets.publishing.service.gov.uk/media/{id}/{filename}, if so does that redirect to s3? Or just in general what's the apps/configuration involved in a user accessing an asset?
How does asset-manager work in a dev environment? or is an s3 bucket required for local dev?

I'll add some comments to the code too.

All in all the fact that this repo doesn't make use of the environment variables and Nginx config from govuk-puppet is a bit of a concern, particularly for Asset Manager related behaviour which relies quite heavily on the Nginx config. However, I think this commit is still a step forward.

Sure that's a valid concern, for the most part though apps shouldn't be coupled to puppet but can understand in this case it's more problematic. Can appreciate that in this case it just adds on another layer of complexity.

@kevindew:
No worries.

Will apps still upload files directly to asset-manager? will that then pass the files on to s3?

Yes. There is no change in the use of the internal API used by publishing apps. It has been uploading files to S3 (and proxying requests to S3) for some time now (as well as to NFS), but we're now at the point where we want to get rid of the files from NFS.

Will assets still be served via https://assets.publishing.service.gov.uk/media/{id}/{filename}, if so does that redirect to s3? Or just in general what's the apps/configuration involved in a user accessing an asset?

Yes. There is no change in the public-facing URLs for assets. The Asset Manager proxies these requests to S3 via Nginx. It's possible there will be some rationalisation of the public-facing asset URLs at some point, but it's not an immediate priority. Similarly at some point we might serve assets directly from S3, but again that's not an immediate priority. The focus at the moment is to remove the dependency on NFS and to move all asset management functionality into Asset Manager (i.e. change Whitehall to use Asset Manager instead of its own custom functionality).

How does asset-manager work in a dev environment? or is an s3 bucket required for local dev?

It uses the fake S3 functionality on the development VM, i.e. it relies on the Nginx config from govuk-puppet. No S3 bucket is required, although it is possible to use one. The fake S3 functionality is provided by the Asset Manager Rails app when the Rails environment is set to "development" and the S3 bucket name is not specified. In this scenario, instead of being uploaded to S3, assets are saved to a separate directory, and then they are made available via an extra Rails route.

Sure that's a valid concern, for the most part though apps shouldn't be coupled to puppet but can understand in this case it's more problematic. Can appreciate that in this case it just adds on another layer of complexity.

Although I can see it's desirable that apps aren't coupled to govuk-puppet, I'm not sure that's realistic in this case. Also I would've thought it made sense for these tests to be as realistic as possible to give as much confidence as possible that everything is working OK.
I hope that all makes sense. We plan to add some documentation to Asset Manager in the near future to explain the fake S3 functionality.
I'll reply to your inline comments separately.

@kevindew:
I think I've worked out why I was getting confused by unexpected build failures...

I didn't realise that by default the CI builds use the deployed-to-production branch of all the apps. This PR requires some Asset Manager changes which have not yet been deployed to production which I think explains why the build is failing for this PR. I found it a bit surprising that the CI builds don't use the deployed-to-integration branch - what's the rationale behind this?

I didn't realise that by default running make locally pulls the latest version of the master branch for all apps unless there are local changes. I think this meant that the build switched from my PR branch to master without me realising and again resulting in a local build failure. I wonder whether it might be good to leave non-master branches checked out, i.e. consider them as if they were local changes...?

@floehopper Thanks for the detailed info, I think it's all starting to snap into place for me.

I didn't realise that by default the CI builds use the deployed-to-production branch of all the apps. This PR requires some Asset Manager changes which have not yet been deployed to production which I think explains why the build is failing for this PR. I found it a bit surprising that the CI builds don't use the deployed-to-integration branch - what's the rationale behind this?

Sure, the rationale is to ensure that changes to one app is going to integrate with other apps running in production. Comparing all the various apps running as per integration is something of a moving target as you need to know a deploy order - which gets especially confusing if you're not even aware that an app is different in integration to production.
The way around this with this is to specify different branches when running this tests which allows you to test integrating apps at different points. I've just fired this off building against the master branch of asset-manager.

I didn't realise that by default running make locally pulls the latest version of the master branch for all apps unless there are local changes. I think this meant that the build switched from my PR branch to master without me realising and again resulting in a local build failure. I wonder whether it might be good to leave non-master branches checked out, i.e. consider them as if they were local changes...?

Yeah sure, I appreciate this is a bit confusing. It could probably get more love than it has done. At the mo it relies on an ENV var but falls back to master. In the next few weeks we're doing some work to see if we can enable using an image by default which means a little bit of a re-think of how we build locally, so hopefully this can be less of an issue as cloning will be be less of a required step.

So I've been trying to understand it all and can see it seems to work :tada: so this is more for my own understanding.

If I understand this right (and I'm not sure I do)

- nginx gets a request to: `http://assets-origin.dev.gov.uk/media/5a2fbbb1e180300009420043/file.png`
- It proxies that to asset-manager with a proxy host header of asset-manager.dev.gov.uk
- Asset manager then responds with a head response with a `X-ACCEL-REDIRECT` of something like "/cloud-storage-proxy/http://<IP_ADDRESS>/fake-s3/assets/2f/bb/5a2fbbb1e180300009420043/file.png
- Nginx somehow catches that response - I'm a bit confused on how that works
- Then nginx proxies that request to http://<IP_ADDRESS>/fake-s3/assets/2f/bb/5a2fbbb1e180300009420043/file.png
- At this point I'm not sure how the vhost for asset-origin.dev.gov.uk catches the request to <IP_ADDRESS> - But somehow that works and then the request goes back into asset-manager via proxy host header which then has a rack mount for all files in `/app/fake-s3` ?

Does that sound right?

Thanks for explaining about the branches/builds.
Your understanding is pretty much correct. I've added some comments inline below:

nginx gets a request to: http://assets-origin.dev.gov.uk/media/5a2fbbb1e180300009420043/file.png

Yes.

It proxies that to asset-manager with a proxy host header of asset-manager.dev.gov.uk

Yes, but it's worth noting that the "it" in this case is the assets-origin.dev.gov.uk virtual host within Nginx and that this proxying is direct to the Asset Manager Rails app rather than to the asset-manager.dev.gov.uk virtual host.

Asset manager then responds with a head response with a X-ACCEL-REDIRECT of something like /cloud-storage-proxy/http://<IP_ADDRESS>/fake-s3/assets/2f/bb/5a2fbbb1e180300009420043/file.png

Yes, although it's worth noting that this is only a HEAD response, because the body is empty and Rails 5 forces us to use the head method in this case, i.e. Rails might be responding to either a HEAD or a GET request.

Nginx somehow catches that response - I'm a bit confused on how that works

As I understand it, the response is "received" by the virtual host which sent it, assets-origin.dev.gov.uk in this case. At this point an internal redirect is triggered by the presence of the X-Accel-Redirect header. The best explanation I can find of this behaviour is in the documentation for proxy_ignore_headers:

“X-Accel-Redirect” performs an internal redirect to the specified URI;

At this point the URL path in X-Accel-Redirect is something like /cloud-storage-proxy/http://<IP_ADDRESS>/fake-s3/assets/2f/bb/5a2fbbb1e180300009420043/file.png which is matched against the various location blocks in the receiving virtual host, assets-origin.dev.gov.uk.

Then nginx proxies that request to http://<IP_ADDRESS>/fake-s3/assets/2f/bb/5a2fbbb1e180300009420043/file.png

Yes. The cloud-storage-proxy location block extracts the http://<IP_ADDRESS>/fake-s3/assets/2f/bb/5a2fbbb1e180300009420043/file.png bit of the URL into the $download_url variable and then proxies the request to this URL.

At this point I'm not sure how the vhost for asset-origin.dev.gov.uk catches the request to <IP_ADDRESS> - But somehow that works and then the request goes back into asset-manager via proxy host header which then has a rack mount for all files in /app/fake-s3 ?

I'm not 100% sure how this works either, but I think (waves hands) Nginx somehow retains the Host header from the original request (i.e. asset-origin.dev.gov.uk) and then tries to match the path with the location blocks in the corresponding virtual host.
You are correct about the Rack mount - I mislead you earlier by saying it was a Rails route - sorry!
I did manage to get Nginx debug logging working when I was trying to make these changes by forking the nginx-proxy image and pushing it up to a docker repository, so you could use that if you wanted to see this all happening in more detail.

@kevindew:
I just found an Nginx debug log from one of my earlier builds and talking it through with @chrisroos, we think the cloud-storage-proxy location block sets the Host header to assets-origin.dev.gov.uk, because of the default behaviour described in the proxy_set_header documentation:

Allows redefining or appending fields to the request header passed to the proxied server. The value can contain text, variables, and their combinations. These directives are inherited from the previous level if and only if there are no proxy_set_header directives defined on the current level. By default, only two fields are redefined:
proxy_set_header Host       $proxy_host;
proxy_set_header Connection close;

Since there are no proxy_set_header directives in the cloud-storage-proxy location block, the current virtual host will be used as the value for the Host request header sent to <IP_ADDRESS> (which is the Nginx container). Nginx sees this request header and so knows to use the assets-origin.dev.gov.uk virtual host.
I hope that makes sense.

Force-pushing to trigger a new CI build now that the relevant Asset Manager changes have been deployed to production.

@kevindew I've just pushed up a commit which adds some documentation/references to the Nginx documentation. Would you be able to review/approve this PR? Or would you like someone else to do it?

Thanks - I'm happy to review. Concern I have is that we have other things in /tmp that may get left around. I'll just check that out more when I have a few mins.

Concern I have is that we have other things in /tmp that may get left around.

Ah, yes. I'll look at that now.

One possibility is to use: find tmp -type f -exec rm {} \; which will delete all files recursively, but leave all directories intact.

@floehopper that seems like a good approach to me

Yeah we do another thing with tmp for error logs here: https://github.com/alphagov/publishing-e2e-tests/blob/master/diet-error-handler/app.rb#L9-L10 which is used in a test in the Jenkinsfile: https://github.com/alphagov/publishing-e2e-tests/blob/master/Jenkinsfile#L262-L268 so if we just keep that sorted then I'm happy for this be merged.
Also got sidetracked on the other things but thanks so much for that detailed description. Wow nginx does so much witchcraft! I think I just about get it all now.

@kevindew OK. I'll test that locally and push up a new commit. Thanks.

I've addressed the /app/tmp issue in a new commit: 642b297717a6e17c75c08ffe4108833a55e9e4ee which I've tested locally. It deletes all files (except .keep files) in /app/tmp, but leaves all the directories intact. Thus it will delete files like errors.log and the actual asset files (just not the directory tree they are stored in).

That sounds great thanks @floehopper


Check for empty request data prior to loading JSON, fix for #1933

Due to the error reported in #1933 concerning some widely used clients I fixed this for GET requests.
But actually nowhere in RFC2616 does it say POST and / or PUT must have a body content. However there are currently test cases testing this behavior and I did not want to introduce a breaking change in a pull request without prior discussion. Can someone who is familiar with the discussion fill me in why it is required that a POST request with an empty body fails?

@tdpsk If request have no body content, the client shouldn't set Content-Type: application/json in request headers because empty string is not valid JSON. Thus, server should use request.form in that case, and use request.json only if client set  Content-Type: application/json.