Updating naming convention for parameterized RV handshake protocols

Area
https://github.com/black-parrot/black-parrot/blob/master/bp_common/src/v/bsg_fifo_1r1w_rolly.sv#L7
Issue
As we see from the above module link, the handshake protocol for this fifo (and several others located in basejump STL) has a parameter that determines the semantics of the handshake, selecting between rv->& and r->v.
This leaves us with a module with ambiguous semantics to the user depending on certain parameter values, and I believe that this should be emphasized in the naming of the signal.
My proposal is that we name this type of ready signal ready_param_o to emphasize that the convention is dependent on a parameter.
Additional Context
A few other locations this is present (Basejump STL files)
https://github.com/bespoke-silicon-group/basejump_stl/blob/8f36b1985128707c7ff9f5e4349c30c5e804c300/bsg_dataflow/bsg_fifo_1r1w_small.v#L25
https://github.com/bespoke-silicon-group/basejump_stl/blob/8f36b1985128707c7ff9f5e4349c30c5e804c300/bsg_dataflow/bsg_fifo_1r1w_narrowed.v#L17

@taylor-bsg This is a pretty interesting proposal. I think ready_param_o is an elegant solution because it forces the instantiator to consider the compatibility

Completed!


268 implement a create env command for stackforms projects

This PR is still in progress but at this stage i'm open to review.
This PR aims to implement project config manipulation from the CLI using stackforms.
For now, two commands have been implemented:
# Get the values of the current config in org o, project p, env e
$ ./cy project get-env-config --org cycloid-playground test-env-2 tutuo
{
  "pipeline": {
    "config": {
      "message": "from-arg3"
    }
  }
}

# Create an env using stackform values for config
$ echo -e '
{
  "pipeline": {
    "config": {
      "message": "tutu-from-cli-env"
    }
  }
}
' | ./cy \
  project create-stackforms-env \
  # if the env already exists, it will be updated
  --update \
  --org cycloid-sandbox \
  --env tutuo --project test-env-2 \
  # If the filename is "-" get values from stdin
  --var-file '-' \
  --vars '{ "pipeline": { "config": { "message": "from-arg" } } }' \
  -e "pipeline.config.message=from-arg2" \
  -e "pipeline.config.message=from-arg3" \
  -e "pipeline.config.toto=from-arg3,pipeline.config.titi=from-arg4" \
  --use-case default

In the cy project create-stackforms command, the idea is to give a nice way to provision variables from multiple ways with precedence.
Variable precedence is as follows:

Env var CY_STACKFORMS_VARS
Files --var-file in the order of the flags
JSON string vars from --vars flag
Extra vars from CLI in -e key.nested.key=value format

The output of the cy project get-config is JSON by default, and is made to be pipeable in the cy project create-stackforms-env command to easily copy an env.
Right now, there are bug to iron out (and one blocking from backend) but i'd like a review on the code, and on the ergonomy of the new commands. And I also have to include a lot of tests.
Feel free to test it out, I got two projects that can be used for this:

https://console.cycloid.io/organizations/cycloid-sandbox/projects/test-multiple-use-case/environments
https://console.cycloid.io/organizations/cycloid-sandbox/projects/test-env-2

@Thomas-lhuillier I'd like your input on the design point of view of this CLI
@gaelL @folago @xescugc @kerak19 I'm open for review and critics on the code
@gaelL @talset @marcoldp See if this fits our use cases

I've tried building with make build but end up with an error:
GO111MODULE=on CGO_ENABLED=0 GOARCH=amd64 go build -o cy -ldflags "-X github.com/cycloidio/cycloid-cli/internal/version.Version=v5.0.34 -X github.com/cycloidio/cycloid-cli/internal/version.Revision=42929f3 -X github.com/cycloidio/cycloid-cli/internal/version.Branch=268-implement-a-create-env-command-for-stackforms-projects -X<EMAIL_ADDRESS>-X github.com/cycloidio/cycloid-cli/internal/version.BuildDate=2024-06-06T15:52:35+02:00" github.com/cycloidio/cycloid-cli
# github.com/cycloidio/cycloid-cli/cmd/cycloid/projects
cmd/cycloid/projects/cmd.go:26:3: undefined: NewGetEnvCommand
make: *** [build] Error 1

Weird @Thomas-lhuillier I'll look it up.
Anyway we saw in CI that there is a go version issue in the current develop dependencies, this PR aims to fix it


Using the Python API - Processing one article / url at a time - example code contains 3 errors

import newspaper
the following 3 lines are required otherwise the example code fails with an error
article = Article('https://edition.cnn.com/2023/10/29/sport/nfl-week-8-how-to-watch-spt-intl/index.html')
article.download()
article.parse()
print(article.authors)
['Hannah Brewitt', 'Minute Read', 'Published', 'Am Edt', 'Sun October']
print(article.publish_date)
2023-10-29 09:00:15.717000+00:00
print(article.text)
New England Patriots head coach Bill Belichick, right, embraces Buffalo Bills head coach Sean McDermott ...
print(article.top_image)
https://media.cnn.com/api/v1/images/stellar/prod/231015223702-06-nfl-season-gallery-1015.jpg?c=16x9&q=w_800,c_fill
print(article.movies)
[]
article.nlp()
print(article.keywords)
['broncos', 'game', 'et', 'wide', 'chiefs', 'mahomes', 'patrick', 'denver', 'nfl', 'stadium', 'week', 'quarterback', 'win', 'history', 'images']
print(article.summary)
Kevin Sabitus/Getty Images Denver Broncos running back Javonte Williams evades Green Bay Packers safety Darnell Savage, bottom.
Kathryn Riley/Getty Images Kansas City Chiefs quarterback Patrick Mahomes calls a play during the Chiefs' 19-8 Thursday Night Football win over the Denver Broncos on October 12.
Paul Sancya/AP New York Jets running back Breece Hall carries the ball during a game against the Denver Broncos.
The Broncos have not beaten the Chiefs since 2015, and have never beaten Chiefs quarterback Patrick Mahomes.
Australia: NFL+, ESPN, 7Plus Brazil: NFL+, ESPN Canada: NFL+, CTV, TSN, RDS Germany: NFL+, ProSieben MAXX, DAZN Mexico: NFL+, TUDN, ESPN, Fox Sports, Sky Sports UK: NFL+, Sky Sports, ITV, Channel 5 US: NFL+, CBS, NBC, FOX, ESPN, Amazon Prime

by errors you mean the output does not match to what's written as example? or is there any exception triggered?
Also, the code example was updated to match the preferred way to  instantiate one article at a time


Vulnerability roundup 111: moodle-3.11.4: 4 advisories [9.8]

search, files

[ ] CVE-2022-0332 CVSSv3=9.8 (nixos-21.11, nixos-unstable)
[ ] CVE-2022-0335 CVSSv3=8.8 (nixos-21.11, nixos-unstable)
[ ] CVE-2022-0334 CVSSv3=4.3 (nixos-21.11, nixos-unstable)
[ ] CVE-2022-0333 CVSSv3=3.8 (nixos-21.11, nixos-unstable)

CVE details
CVE-2022-0332
A flaw was found in Moodle in versions 3.11 to 3.11.4. An SQL injection risk was identified in the h5p activity web service responsible for fetching user attempt data.
CVE-2022-0335
A flaw was found in Moodle in versions 3.11 to 3.11.4, 3.10 to 3.10.8, 3.9 to 3.9.11 and earlier unsupported versions. The "delete badge alignment" functionality did not include the necessary token check to prevent a CSRF risk.
CVE-2022-0334
A flaw was found in Moodle in versions 3.11 to 3.11.4, 3.10 to 3.10.8, 3.9 to 3.9.11 and earlier unsupported versions. Insufficient capability checks could lead to users accessing their grade report for courses where they did not have the required gradereport/user:view capability.
CVE-2022-0333
A flaw was found in Moodle in versions 3.11 to 3.11.4, 3.10 to 3.10.8, 3.9 to 3.9.11 and earlier unsupported versions. The calendar:manageentries capability allowed managers to access or modify any calendar event, but should have been restricted from accessing user level events.

Scanned versions: nixos-21.11: 2128d0aa28e; nixos-unstable: 5aaed40d22f.
Cc @freezeboy

All of these were fixed in moodle 3.11.5. Package is at 3.11.6 currently.


Remove generation of USE_ORCA define

Remove generation of USE_ORCA define
USE_ORCA define is no longer used. This patch removes generation of this define.
File 'configure.in' is modified manually. Other files are re-generated by
'autoconf' and 'autoheader' tools.

Option --enable-orca still exists, but perhaps does nothing. Is it going to be here as a compatibility placeholder? May be it worst mentioning it?

Option --enable-orca still exists, but perhaps does nothing. Is it going to be here as a compatibility placeholder? May be it worst mentioning it?

It is still needed to enable or disable orca


move consul namer out of experimental

No known bugs. Used in production successfully at several companies.

Fixed by https://github.com/BuoyantIO/linkerd/pull/824


Creating Deals - Readme

I see that you can create a deal (def create!(portal_id, company_ids, vids, params={})), but what's the recommended call? I'd be happy to update the readme and submit a PR. :)

You can create a deal by calling Hubspot::Deal.create!() like this:
Hubspot::Deal.create!(nil, [company.vid], [contact.vid], pipeline: 'default', dealstage: 'initial_contact')

This will create a deal linked to a Hubspot company and contact. The first option is the portal ID, which is not required. Any properties supported by deals can be specified as options.
If you would like to submit a PR for a documentation update that would be great. Otherwise, I can add it.

I updated the documentation with an example for creating deals in 5e35bb20473708049a3bf9a2f346a68d01afb06b


analysis-2019C3.0.1 metapackage

A mirror update of https://github.com/nsls-ii-forge/analysis-feedstock/pull/6. See the test results for Python 3.6/3.7 and Linux/OSX/Windows in that PR (kind of naive integration testing).

Please note, the PR should be merged only after #776 is reviewed/merged, and the corresponding packages have been built.

Also, it needs https://github.com/NSLS-II/lightsource2-recipes/pull/780.

#776 and #780 are merged. Waiting for packages to build.

Thanks, @danielballan! The suitcases and event-model have been built and uploaded. Please go ahead with merging this PR.


Lazy plugin isn't sourced on command argument completion

Problems summary
When command listed in on_cmd plugin option isn't matched to any substring of the plugin's name, argument completion doesn't work. Instead, the command line is printed infinitely, until Ctrl-C is hit.
Expected
Command argument completion works for every command listed in on_cmd plugin option.
Environment Information

OS: Linux
Vim version:

NVIM v0.1.3-317-gbd81239
Build type: Release

Provide a minimal .vimrc with less than 50 lines (Required!)
" Directory where this minimal vimrc file is located.
let s:rcdir = expand('<sfile>:p:h')
" Base path of dein.vim.
let s:dein_base_path = s:rcdir.'/dein'
" Path to cloned repository of dein.vim.
let s:dein_clone_path = s:rcdir.'/dein/dein.vim'

if has('vim_starting')
  if &compatible | set nocompatible | endif
  let &runtimepath .= ','.s:dein_clone_path
endif

call dein#begin(s:dein_base_path)
call dein#add('thinca/vim-prettyprint', {
     \ 'on_cmd': ['PP', 'PrettyPrint']
     \})
call dein#end()

filetype plugin indent on
syntax on

The reproduce ways from Vim starting (Required!)

Press :PP
Hit the <Space> key
Hit the <Tab> key

Screen shot (if possible)
Here :PP's argument completion is invoked with following infinite command printing (because plugin isn't sourced). Then :PrettyPrint's argument is completed just fine (because plugin is sourced). Then :PP's argument is completed also just fine (because plugin was already sourced on :PrettyPrint argument completion).

Upload the log messages by :redir and :message

Fixed.


Does  a TLS handshake happen if the GCM iv overflow?

FIPS IG A.5
States thart after 2^64 records for a TLS connection when using a GCM cipher suite renegotiation shall happen automatically.
The implementation of the nonce_explicit management logic inside the module shall ensure that when the nonce_explicit part of the IV exhausts the maximum number of possible values for a given session key (e.g., a 64-bit counter starting from 0 and increasing, when it reaches the maximum value of 2^64 -1), either party (the client or the server) that encounters this condition triggers a handshake to establish a new encryption key – see Sections <IP_ADDRESS> and <IP_ADDRESS> in RFC 5246. A statement to that effect shall be included in the Security Policy and Validation Test Report.
The tls_gcm_cipher code just returns an error.

This justifies a note in #14865 (& a reference back here)
The error would need to be dealt with by the TLS stack, which isn't inside the boundary.
The AES GCM code can't force a renegotiation directly.

There are multiple error paths here - so there is no distinction between an fatal error.. Unless the TLS caller is looking at the record_count overflowing??

I doubt it is.

@paulidale - I think the work 'keys' in the comment in openssl is also not quite right..
i.e.
/*
* Check for too many keys as per FIPS 140-2 IG A.5 “Key/IV Pair Uniqueness
* Requirements from SP 800-38D”.  The requirements is for one party to the
* communication to fail after 2^64 - 1 keys.  We do this on the encrypting
* side only.
*/

There is nothing in the TLS code to trigger an automatic renegotiation. Of course that concept doesn't even exist in TLSv1.3, unless you interpret "triggers a handshake" to mean "send a keyupdate message" for TLSv1.3 connections.

@slontis that does look suspect.  blocks seems more accurate.

I've noted this in the list of security policy things.
Given that the encryption will fail from the wrap onward, it could be argued that TLS will need a new handshake to continue and this check is the trigger.

You might find https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-aead-limits to be useful.

Per the doc Rich linked (as applied at https://datatracker.ietf.org/doc/html/rfc8446#section-5.5), TLS 1.3 requires KeyUpdate well before the GCM 64-bit counter rolls over.  AFAIR we don't track that internally, though, and require the application to notice if they're protecting millions of records on a single connection.

OTC: This will be dealt with via security policy.

Is closing this premature, or have you already told those writing the security policy to address this?

It is tracked by an item in #14865


[Tracker]: General Global UX Improvements

Description
General items we want to improve so we can holistically improve the experience of the Dashboard.
Target Branch
f/global-ux-improvements
Requirements
Improve generically -- no backing requirements
Itemized UX Issues

Data Connections rework -- Ticket TBD
https://github.com/opendatahub-io/odh-dashboard/issues/1856

Itemized Dev Issues

https://github.com/opendatahub-io/odh-dashboard/issues/427
https://github.com/opendatahub-io/odh-dashboard/issues/839
https://github.com/opendatahub-io/odh-dashboard/issues/1824
https://github.com/opendatahub-io/odh-dashboard/issues/2195

Related artifacts
No response

Will be driven by PM when necessary.


React - Button actions

For the screenshot below. My functionality is to update like, dislike and show query used to generate the chat.

I written the code below but for the like, dislike, and show query buttons click is not working, getting function is not defined.
Could you please help on how to fix this issue.
<DeepChat                             className                             ref={chatRef}                             style={{                               borderRadius: "10px",                               zIndex: 1,                               height: "calc(100vh - 170px)",                               width: "36rem",                             }}                             avatars={{                               default: { styles: { position: "left" } },                               ai: { src: "/profile/images/openAIGreyLogo.svg" },                               user: { src: "/profile/images/23735.png" },                             }}                             messageStyles={{                               default: {                                 shared: {                                   innerContainer: { width: "95%" },                                   bubble: {                                     maxWidth: "100%",                                     backgroundColor: "unset",                                     marginTop: "10px",                                     marginBottom: "10px",                                     fontSize: "1rem",                                   },                                 },                                 user: {                                   bubble: {                                     marginLeft: "0px",                                     color: "black",                                   },                                 },                                 ai: {                                   outerContainer: {                                     backgroundColor: "rgba(247,247,248)",                                     borderTop: "1px solid rgba(0,0,0,.1)",                                     borderBottom: "1px solid rgba(0,0,0,.1)",                                   },                                 },                               },                             }}                             textInput={{ placeholder: { text: "Welcome to DocuFlow..!" } }}                             audio={true}                             images={true}                             gifs={true}                             camera={true}                             microphone={true}                             mixedFiles={true}                             request={{                               url: process.env.REACT_APP_API_URL + 'chat/execute',                               handler: async (body, signals) => {                                 try {                                   const response = {                                     data: {                                       "query": "MEJrVmh3bWZrOG1qQ2c4ZC92RERlY1FFWFFSNk9iWEMyR01FcTY5NVMrSDRhK3MrUmpVUWdrN0EyNHhlSExXZm1VOGl0RzU3WUxuSGY0WndBRU03dVNxMzROYmc3OTZzM0ZYOG52dUpPRmJCRUVhWjUyZ2xwaDdKMERjYXNnWDNRNUNzcSs4SG9KN05EZzlIV1Zqd3c4ZXQvT1BUNS9uSUN1bGpxZVh5RlQ4eXZQMkRGSW1Ucnl5N2hadXo3K3Q4aHRtRUp0eE1hWEk3MEYzeU16cWJIdjY4VE1EaGlBbjZjY0FGS3ZZeFFOUnpnMys1aFZlaG1Cd2NHN2VKb1lzRUVGTXNqeVVKRlE4NU1ZbmdQVzB2c09LZmI5THBPQi9xS0pWT3ppbXh1cjBCcUNLSjB2Y0xpZkVxTnFoeG9BOS9NVm94OHdqYWJpc3l2L094YS9qYzhVV1FFc2JuU1VoK0xabU1aVzFHWGlMTzZBK3dQUUZUSVN6WGpzS3U2QVR2VjEyUFM1c2JtSE51aGpuL09VM2ZnTXE2VzFxYjUzNUJtOHRQVlo0WHNmb1YwS3JJdGxlc2pCZmVFYktET0lxL1dXQmJCdEloT2FSVzM5eVRMdU9wMlN0N3BhR1lYYVpPYmtQU2dDUjg2eVQ3d3ZEMTlzRmdHY3JZVGhoRjAwQXhFWlZvcFViSUs1VlVFZ0JkOWxBczVMcm9yNTZKKzV5dld2T1hsdHUycWp4Um5uL2ppOE5MRVh6ckRkV2pHSnVJQXBJRWsvMEpYaVRjUUpUdVN1c0xGcWJVeDlMK2NPMytzclZHMDhGWVRzL05JUVZCdEdKWmREdFpCa1Y2VmFyUmE0LzBHbGlNR0RUL0ZNbThQb2dSeGF6TWhmR0hnZG9wK3FDYS9jbFJheHdHcWhRS0Y4by80aFJ1VEhockJ4R29VaS9DbmEwREkzUk9NMjRhaC9HZ3NVQ2xxall1ek8vSHJPN0FROGJuT0JoS25MMk95UG9ta3lpYXAvTitFUExySEdsK3N6bmJmQjc5UVhsVEZlekFqQVcrYjQ4d1p1aE1FMGY2d0NUSEtNMlUzY015ejMvTkxTMzZhN0Jpa0VQUkVuVVpnWkhlVnB1WS8zK0VNY2o5VnVlY05EaC9oaDhSQUtsQ0NVK1pjMTdwUDU2M0lEQW03UXZ5WmNDQ0ROS3RKbFdETXViaUVmVU9yTStMenEvdUlqN0RxWmhBdW9wVGlkdzhsU3ZSeGN5ZVlmK1hoc0JReGhsWVorbi85MHg0QWpXdy84ZWpld0l4Yk81emprdmFxWHRXc1h4Y252c1FxeUhaVFRZdVZCbUFqdC90V0FoQmdjVGNXR3M0YnM4elZqK3piaGRTOTErb2ZyRlJyVjRzZWhVWk1DdjNlTm9La0lNTnFGNkVMRks2Q252QzF1NGhIaXB6RFlYOWZJVEdlWHp5Z1QrdnVsaUtSMSsvNkFmMXJYWU1aS1JQRmw4bVVaV2ZIV3FEL3hZT0J0NDRXdGxJNEhPeEQ1UXVKdUI5cC9kNHdWU2lTcG9SV3RUeFFqYWdOSmczWm5NU0Nhd0k2QlRCQUhvSVpJaytOcU5nVy9xNmNvV054dElHWC9ocDh6Z0VDQVE3TEcxb2Jqa0Mxb2wrdy9hN3RwS1p0WE1HMGM5dWtKeTJXZFBGVFFiYmtLTUhmOG1IWDg0WGExaWxzbWdiMjVNVE1BOUFTbkw3R2w2aE5CY3hnemRQYmxzc1VmemtUd0c4RHpwQ1B2Vm5uYk5hOHdyUjdxR3p5TlJ6ck5rRXEzMEVFNnNKdUwxN0VlYzZMV1ZhYzFQYVM4Snd5RVFvMHNUVmV5T2hiOFF6c3AvRzlxa3FzeU9BQkFuVGJjRGdvak1kSlNUbFp6dThZWEZpZnRqZUN5SnhPNkk4dXg4UWJpLzZ1akRDRmtHR1Ezb1BxcU8wbExuK2dnR0xOZ0RtUEhHZkR6LzZSa1ZjOTZRRU9YNzlod2pCbklqbUthMHp4MWk4bXkvNnUvVVR0UjNwVnZPY00wQ3BJbzErMUNoOUhEMC9ZUG5kYjFWNE1FVGNFSjBpN3dCWlY0M3RucCtQNjk3MnI4WFBLM2grMCtsLysrRTJQNVpmdENQTDYvOC9oU09uOFVwUVErelphZlZOTEhVK2xmdGhPK1lNeTB4WFB1dG5YU0ZxYUlyZ3hVWnVXMGZRdVRtcUZPSnlZWStncFFxWDMwUXZ4cFkvZHJIdVRnPT0=",                                       "data": [                                         [                                           "vendorName",                                           "count"                                         ],                                         [                                           null,                                           50                                         ],                                         [                                           "PRECOAT METALS",                                           32                                         ],                                         [                                           "DEMO - Sliced Invoices",                                           31                                         ],                                         [                                           "Staples",                                           17                                         ],                                         [                                           "SW SIZEMORE WELDING -INC-",                                           13                                         ]                                       ]                                     }                                   }                                   const chartResult = getChartType(body.messages[0].text.toLowerCase());                                   const chartType = chartResult.chartType;                                   onSetCurrentQuery(body, response.data)                                   if (chartType === "text") {                                     signals.onResponse({                                       text: JSON.stringify(response.data.data),                                     });                                   } else {                                     const responseHtml =

Show query

<google-chart
style="min-width: 520px; max-width: 100%; width: 100%; height: 350px;"
data='${JSON.stringify(response.data.data)}'
type=${chartType}
options=${options}

;                                     signals.onResponse({ html: responseHtml });                                   }                                 } catch (error) {                                   console.error(error);                                 }                               },                             }}                             initialMessages={messages}                             onNewMessage={({ message, isInitial }) => {                               if (!isInitial) {                                 messages.push(message);                               }                             }}                           />

Hi @rvangari96. I have reduced your code to the following and it appears to work fine for me. Does it work for you?
 <DeepChat
  request={{
    handler: async (body, signals) => {
      const responseHtml = `

             {console.log('upvote')})()" class="chat-feedback feedback-icon-positive" src="thumbsUp.svg" />
             {console.log('downvote')})()" class="chat-feedback feedback-icon-negative" src="thumbsDown.svg" />
            <button>Show query</button>

`;
      signals.onResponse({html: responseHtml});
    },
  }}
/>

Hi Ovidijus.
Thank you for the quick response.
It's working when the console.log is added but when you call the actual
declared function it is not working. Like below.
const upVote = () => {
console.log("upvote")
}
const downVote = () => {
console.log("upvote")
}
<DeepChat
request={{
handler: async (body, signals) => {
const responseHtml =

              {upVote('upvote')})()" class="chat-feedback feedback-icon-positive" src="thumbsUp.svg" />              {downVote('downvote')})()" class="chat-feedback feedback-icon-negative" src="thumbsDown.svg" />             <button>Show query</button>

;
signals.onResponse({html: responseHtml});
},
}}
/>
If you want I can share the complete code for understanding.
On Mon, Jan 22, 2024 at 5:48 PM Ovidijus Parsiunas @.***>
wrote:

Hi @rvangari96 https://github.com/rvangari96. I have reduced your code
to the following and it appears to work fine for me. Does it work for you?
<DeepChat
request={{
handler: async (body, signals) => {
const responseHtml =

              {console.log('upvote')})()" class="chat-feedback feedback-icon-positive" src="thumbsUp.svg" />              {console.log('downvote')})()" class="chat-feedback feedback-icon-negative" src="thumbsDown.svg" />             <button>Show query</button>

;
signals.onResponse({html: responseHtml});
},
}}
/>
—
Reply to this email directly, view it on GitHub
https://github.com/OvidijusParsiunas/deep-chat/issues/102#issuecomment-1903886960,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A4T2FDEI5YVVHE5PJ4J7LG3YPZKIJAVCNFSM6AAAAABCFCJMJ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBTHA4DMOJWGA
.
You are receiving this because you were mentioned.Message ID:
@.***>

--
Best Regards
Rakesh Vangari
+91<PHONE_NUMBER>

Ok, I see what you mean now.
To add specific events/styling to particular elements in the html response, you will need to use the htmlClassUtilities property.
So in your example, if we wanted to use the upVote function, we would use the following code:
const upVote = () => {
  console.log('upvote');
};

return (
  <DeepChat
    htmlClassUtilities={{
      'feedback-icon-positive': {
        events: {
          click: upVote,
        },
      },
    }}
    request={{
      handler: async (body, signals) => {
        const responseHtml = `

`;
        signals.onResponse({html: responseHtml});
      },
    }}
  />
);

We basically reference the function inside the events for a particular element class. You can do the same for other elements. Let me know if this helps! Thanks.

Wow, this worked.
I have a few questions.
Can I disable the like button whenever it is clicked?
Additionally, how can I display text when clicking on the 'show query'
button in the same message?
If I add a button to regenerate the response, and when I click on it, can I
replace the existing message with a new response?
Thank you.
On Mon, Jan 22, 2024 at 6:13 PM Ovidijus Parsiunas @.***>
wrote:

Ok, I see what you mean now.
To add specific events/styling to particular elements in the html
response, you will need to use the htmlClassUtilities
https://deepchat.dev/docs/messages/HTML#htmlClassUtilities property.
So in your example, if we wanted to use the upVote function, we would
use the following code:
const upVote = () => {
console.log('upvote');
};
return (
<DeepChat
htmlClassUtilities={{
'feedback-icon-positive': {
events: {
click: upVote,
},
},
}}
request={{
handler: async (body, signals) => {
const responseHtml =

;
signals.onResponse({html: responseHtml});
},
}}
/>
);
We basically reference the function inside the events for a particular
element class. You can do the same for other elements. Let me know if this
helps! Thanks.
—
Reply to this email directly, view it on GitHub
https://github.com/OvidijusParsiunas/deep-chat/issues/102#issuecomment-1903927317,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A4T2FDCS7R47DZFK6EGWPVLYPZNGVAVCNFSM6AAAAABCFCJMJ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBTHEZDOMZRG4
.
You are receiving this because you were mentioned.Message ID:
@.***>

--
Best Regards
Rakesh Vangari
+91<PHONE_NUMBER>

Everything that you have mentioned is possible, but possible through standard HTML/JavaScript practices rather than anything specific that Deep Chat offers.
When an event function is called, in this case a click event - it passes an event argument with it. This argument can be used to manipulate the target element and the elements around it.
E.g. the upVote function can be changed to the following, where the clicked element is extracted via the target property and we then proceed to change its styling - such as changing the background color to yellow (this is a TypeScript example and you can remove the types if you are using Vanilla JavaScript):
const upVote = (event: MouseEvent) => {
  const element = event.target as HTMLElement;
  if (element?.style) {
    element.style.backgroundColor = 'yellow';
  }
};

You can use this technique for changing the elements to exactly how you need them.
Another quick tip; you can traverse elements via the use of children and parentElement properties. Changing text can be done via the textContent. Image/SVG colors can be changed via the css filter property (you can also use this tool to get the color you prefer).
This is a little outside of the scope of Deep Chat, therefore I would encourage you to check other resources on how elements can be manipulated, but I am more than happy to answer Deep Chat related questions.
Thanks!

Since the original problem has been resolved, I will be closing this issue now. However, if you have any other questions you are more than welcome to create a new issue.
Thankyou!

Thank you
Best Regards
Rakesh Vangari
+91<PHONE_NUMBER>
On Thu, 25 Jan 2024 at 7:30 PM, Ovidijus Parsiunas @.***>
wrote:

Since the original problem has been resolved, I will be closing this issue
now. However, if you have any other questions you are more than welcome to
create a new issue.
Thankyou!
—
Reply to this email directly, view it on GitHub
https://github.com/OvidijusParsiunas/deep-chat/issues/102#issuecomment-1910275055,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A4T2FDHUETOQ6APYWZEUWIDYQJQPJAVCNFSM6AAAAABCFCJMJ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJQGI3TKMBVGU
.
You are receiving this because you were mentioned.Message ID:
@.***>


Updating hard coded field names

GitHub Issue: Part of https://github.com/Islandora-CLAW/islandora/pull/86
What does this Pull Request do?
Updates some checks for field names to include the new media fields from core.
How should this be tested?
Test as part of https://github.com/Islandora-CLAW/islandora/pull/86
Interested parties
@Islandora-CLAW/committers @seth-shaw-univ

I just ran into this with a test migrate. Should we allow a configurable list of fields to look for?

@whikloj, that would make updating this with future media types easier. We should probably push the content model overhaul PRs (including this one) to get it up and working and then create a separate ticket to consider the question afterward.

After poking around with flysystem stuff I think it's best we pass the source field for a media into crayfish as part of the message.  That's a much nicer way of doing it, and we can pretty easily check if the field is there or empty or w/e.

@whikloj yup, just about to push it up

haha, wow, and we've got some weird namespace issues going on, too.  let me touch those up.  hopefully this doesn't spiral.

...and i need to rebase :1st_place_medal:

Ok.... so we're green on Travis... BUT:

@seth-shaw-unlv @whikloj Now Travis is legit green.  Thanks everyone for watching the latest edition of @dannylamb's PR circus


Fix is valid checks and add codecov support

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@6873dd2). Click here to learn what that means.
Patch has no changes to coverable lines.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
Additional details and impacted files
@@           Coverage Diff            @@
##             main        #2   +/-   ##
========================================
  Coverage        ?   100.00%
========================================
  Files           ?         2
  Lines           ?        53
  Branches        ?         0
========================================
  Hits            ?        53
  Misses          ?         0
  Partials        ?         0

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Refactor stream package to enable common method helpers for other streaming api classes.

This puts in place the methods needed by this port forwarding implementation: #210
Also, simplify the patten used to monkey patch the ApiClient.request method.

/assign @yliaog

Codecov Report

Merging #211 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #211   +/-   ##
=======================================
  Coverage   92.37%   92.37%
=======================================
  Files          13       13
  Lines        1613     1613
=======================================
  Hits         1490     1490
  Misses        123      123

Continue to review full report at Codecov.

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

thanks for the pr
/lgtm
/approve


Cannot decode block on testnet

Unable to retrieve the specified block details. Unable to decode storage system.events:: createType(Vec<EventRecord>):: decodeU8a: failed at 0x0000000ae1f50500000000000000…: {"phase":"Phase","event":"Event","topics":"Vec<Hash>"}:: decodeU8a: failed at 0xf50500000000000000… on event: {"index":"EventId","data":"Null"}:: findMetaEvent: Unable to find Event with index [245, 5]/[245,5]

Really old block on testnet, need to correct types at that time for it. Does not really matter for now


Setup reporting of build statuses to IRC

It's a follow-up to the comment from @olofk
https://github.com/librecores/librecores-ci/issues/13#issuecomment-246035460

Priority is low


renderers: account for space in plots name

Fixes:
https://github.com/iterative/dvc/pull/7477#issuecomment-1133036934
cc @dberenbaum

Codecov Report

Merging #63 (2f50c94) into main (ce75208) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #63   +/-   ##
=======================================
  Coverage   97.16%   97.16%
=======================================
  Files          16       16
  Lines         493      493
  Branches       78       70    -8
=======================================
  Hits          479      479
  Misses          8        8
  Partials        6        6

Impacted Files
Coverage Δ

src/dvc_render/base.py
100.00% <ø> (ø)

Continue to review full report at Codecov.

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

@daavoo sorry, my bad, should be fixed


Bump omnibus software version

/cc @adamleff @chef/engineering-services @scotthain

:+1:

Not a "maintainer," but :+1: since my omnibus changes are causing to software definition issues you're likely hitting :)


Save state of deployment in the CLI

Migrated from https://github.com/mesg-foundation/js-sdk/issues/190
Originally created by @antho1404 on Tue, 17 Mar 2020 10:19:12 GMT

With https://github.com/mesg-foundation/js-sdk/pull/188 we now automatically deploy services and processes.
It could be nice to have a file that aggregates all the services/runners/processes added on the local network in order to easily debug if needed and create a kind of snapshot of the local chain

seems outdated


Populate history response to fix NPE on client side

https://github.com/uber/cadence/issues/3115

Coverage decreased (-0.03%) to 68.196% when pulling 6cab733190290cd70133569737185343c75941e4 on mkolodezny:fix_client_npe into 83809d81d577f5e5a85523474ac82bede1baa23e on uber:master.


MM-20324 - Plugin upload should not be enabled before saving the Require Plugin Signature setting

Summary
Using props over state for UploadButton to make sure settings are set on the server and not just locally.
Ticket Link
Fixes https://mattermost.atlassian.net/browse/MM-20324

@prapti heads up that this is ready for QA

Creating a new SpinWick test server using Mattermost Cloud.

Mattermost test server created! :tada:
Access here: https://mattermost-webapp-pr-4268.test.mattermost.cloud

Account Type
Username
Password

Admin
sysadmin
Sys@dmin123

User
user-1
User-1@123

Test server destroyed


chore: import repository https://github.com/vmgnud/hello-jx3-python-http-2.git

this commit will trigger a pipeline to generate the CI/CD configuration which will create a second commit on this Pull Request before it auto merges

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign
You can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

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

/approve

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: vmgnud
To complete the pull request process, please assign
You can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

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

/assign


Add logging statements

For #8

Codecov Report

Merging #9 into master will decrease coverage by -1.95%.
The diff coverage is 33.33%.

@@            Coverage Diff             @@
##           master       #9      +/-   ##
==========================================
- Coverage    70.9%   68.96%   -1.95%
==========================================
  Files           4        4
  Lines         220      232      +12
==========================================
+ Hits          156      160       +4
- Misses         64       72       +8

Impacted Files
Coverage Δ

Sources/Configuration/ConfigurationManager.swift
46.01% <33.33%> (-1.51%)
:x:

Continue to review full report at Codecov.

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


Error with building pos screen 720x1280 and Captcha

I got this issue when change 1280x720 to 720x1280 screen to solve captcha. In 1280x720 bot cant solve with 2captcha, just press verify then not solving it

it stuck in here and said game not open


Notifications close button: aria-label should be on button, not on svg child

Notifications have a close button that has an svg child for the little x icon.
Currently, the svg child has the aria-label="close", but the aria-label needs to be on the interactive element - i.e. the button - in order to work in all screen readers.

Thanks for the report @carmacleod! Added a PR to move it over.
Just curious, why does DAP report this as a form control when in this context? I believe the original implementation placed the aria-label on svg so that it would be read as the content when button was focused on by a screenreader.

@joshblack

Just curious, why does DAP report this as a form control when in this context?

Agreed that it's a bit odd. I suspect the DAP may just be using a standard rule here that checks all form controls following the Name And Description Computation algorithm.

I believe the original implementation placed the aria-label on svg so that it would be read as the content when button was focused on by a screenreader.

Yes, and I think that would usually work, because the way I read the current name computation algorithm, the aria-label on the svg would "bubble up" to the button. However I believe this wasn't always the case, and the DAP is being conservative in requiring the aria-label to be on the interactive element so that it will work in all screen readers.


Backporting change to kirkstone

Backporting Change to enhance command line argument handling to kirkstone branch

Please also propose a similar one for scarthgap, will merge both together to avoid not having both in sync.


Problem with 'Access-Control-Allow-Origin'

Hi, i try to use your library and get 'Access-Control-Allow-Origin' error.
Assume, we have a plain version of backend, that just allow us to handle a POST request:
package com.daniel

import scala.concurrent.duration._
import akka.actor._
import akka.http.scaladsl.Http
import akka.http.scaladsl.model.HttpResponse
import akka.http.scaladsl.server.Directives._
import akka.http.scaladsl.server._
import akka.stream.ActorMaterializer
import akka.util.Timeout
import ch.megard.akka.http.cors.CorsDirectives._
import ch.megard.akka.http.cors.CorsSettings

object Main extends App with UserResources{
  implicit val system = ActorSystem("test-service")
  implicit val materializer = ActorMaterializer()

  implicit val executionContext = system.dispatcher
  implicit val timeout = Timeout(10 seconds)

  val api = routes

  Http().bindAndHandle(handler = api, interface = "<IP_ADDRESS>", port = 5000) map { binding =>
    println(s"REST interface bound to ${binding.localAddress}")
  }
}

trait UserResources {
  val settings = CorsSettings.defaultSettings.copy(allowCredentials = false)

  val routes: Route = cors(settings) {
    path("cors-issue") {
      post {
          complete(HttpResponse(200))
      }
    }
  }
}

Our build.sbt:
enablePlugins(JavaServerAppPackaging)

name := "cors-issue"
version := "0.1"
organization := "com.daniel"
scalaVersion := "2.11.8"
scalacOptions := Seq("-unchecked", "-deprecation", "-encoding", "utf8")

libraryDependencies ++= {
  val AkkaVersion       = "2.4.6"
  val AkkaHttpVersion   = "2.4.3"
  Seq(
    "com.typesafe.akka" %% "akka-slf4j"      % AkkaVersion,
    "com.typesafe.akka" %% "akka-http-core" % AkkaVersion,
    "com.typesafe.akka" %% "akka-http-experimental" % AkkaHttpVersion,
    "ch.megard" %% "akka-http-cors" % "0.1.2"
  )
}

Revolver.settings

And if we use cURL command:
$ curl -v -H "Content-Type: application/json" \
> -X POST "http://localhost:5000/cors-issue" \
> -d '{"id": "test"}'

We will get a response:
*   Trying ::1...
* Connected to localhost (::1) port 5000 (#0)
> POST /cors-issue HTTP/1.1
> Host: localhost:5000
> User-Agent: curl/7.45.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 14
>
* upload completely sent off: 14 out of 14 bytes
< HTTP/1.1 200 OK
< Server: akka-http/2.4.6
< Date: Sat, 11 Jun 2016 10:55:05 GMT
< Content-Length: 0
<
* Connection #0 to host localhost left intact

And that's OK. But if we try POST request using AJAX (with jQuery):
jQuery.ajax({
            type: "POST",
            url: "http://localhost:5000/cors-issue/",
            contentType: "application/json",
            crossDomain: true,
            data: {"name": name},
            dataType: "json",
            success: function(status) {
                console.log("OK: " + status)
            },
            error: function(xhr,status,error) {
                console.log("NOT OK: " + xhr + " " + status + " " + error)
            }
});

We will get an error:
> POST http://localhost:5000/cors-issue/
> XMLHttpRequest cannot load http://localhost:5000/cors-issue/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access. The response had HTTP status code 404.
> NOT OK: [object Object] error

Where I made a mistake?

Hi Daniel,
Short answer
The correct url to use in your AJAX call is http://localhost:5000/cors-issue (no trailing slash). That's where the discrepancy with your CURL command comes from. With the trailing slash, both clients (jquery and curl) will return a 404, this has nothing to do with CORS.
Quick fix: remove the trailing slash or change your http route definition (particularly look at the pathEndOrSingleSlash directive).
Longer answer
The above fix will only address this specific problem, but in the general case any rejected request (by the akka-http directives) will not be properly marked with the CORS headers. The reason is that the CORS library is based on directives that add headers to the HttpResponse. When a request is rejected, it will go through the cors directives untouched.
What you want is to handle rejection before applying the cors directive. That way the CORS headers can be added to all responses, including the rejected ones.
A possible pattern is as follow:
val routes: Route = handleRejections(CorsDirectives.corsRejectionHandler) {
    cors(settings) {
      handleRejections(RejectionHandler.default) {
        path("cors-issue") {
          post {
            complete(HttpResponse(200))
          }
        }
      }
    }
  }

Test it with:
curl -i -XPOST -H "Origin:http://localhost:5000"  "http://localhost:5000/cors-issue"

You see in the response the correct Access-Control-Allow-Origin header.
Now try an invalid path (your original issue):
curl -i -XPOST -H "Origin:http://localhost:5000"  "http://localhost:5000/xxx"

You still get the Access-Control-Allow-Origin header with a 404 response.

I know this pattern has to be highlighted in the documentation. I will try to improve it soon.

Thank you Lomig for such detailed response! Indeed, the problem was in the trailing slash.
But now i have new problem, that probably not related with CORS. And if you know how fix that, i would be very grateful!
On the server side we create users and keep them in Vector:
import scala.concurrent.duration._
import akka.actor._
import akka.http.scaladsl.Http
import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport
import akka.http.scaladsl.model.{HttpResponse}
import akka.http.scaladsl.server.{Directives, RejectionHandler, Route}
import akka.stream.ActorMaterializer
import akka.util.Timeout
import ch.megard.akka.http.cors.CorsDirectives._
import ch.megard.akka.http.cors.{CorsDirectives, CorsSettings}
import scala.concurrent.{ExecutionContext, Future}
import spray.json.DefaultJsonProtocol

trait JsonSupport extends SprayJsonSupport with DefaultJsonProtocol {
  implicit val userFormat = jsonFormat3(User)
}

case class User(id: String, name: String, password: String)

class UserService(implicit val executionContext: ExecutionContext) {
  var users = Vector.empty[User]

  def createUser(user: User): Future[Option[String]] = Future {
    users.find(_.id == user.id) match {
      case Some(u) => None
      case None =>
        users = users :+ user
        Some(user.id)
    }
  }
}

trait UserResources extends Directives with JsonSupport {

  implicit def executionContext: ExecutionContext

  lazy val userService: UserService = new UserService
  val settings = CorsSettings.defaultSettings.copy(allowCredentials = false)

  val routes: Route = handleRejections(CorsDirectives.corsRejectionHandler) {
    cors(settings) {
      handleRejections(RejectionHandler.default) {
        (path("cors-issue") & post & entity(as[User])) { user =>
          userService.createUser(user)
          complete(HttpResponse(201))
        }
      }
    }
  }
}

object Main extends App with UserResources{
  implicit val system = ActorSystem("test-service")
  implicit val materializer = ActorMaterializer()

  implicit val executionContext = system.dispatcher
  implicit val timeout = Timeout(10 seconds)

  val api = routes

  Http().bindAndHandle(handler = api, interface = "<IP_ADDRESS>", port = 5000) map { binding =>
    println(s"REST interface bound to ${binding.localAddress}")
  }
}

Add to the build.sbt: "com.typesafe.akka" %% "akka-http-spray-json-experimental" % AkkaVersion.
And if we now test it with cURL:
$ curl -v -H "Content-Type: application/json" \
> -X POST "http://localhost:5000/cors-issue" \
> -d '{"id": "123", "name": "123", "password": "123"}'

We will get the response:
*   Trying ::1...
* Connected to localhost (::1) port 5000 (#0)
> POST /cors-issue HTTP/1.1
> Host: localhost:5000
> User-Agent: curl/7.45.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 47
>
* upload completely sent off: 47 out of 47 bytes
< HTTP/1.1 201 Created
< Server: akka-http/2.4.6
< Date: Sun, 12 Jun 2016 16:40:15 GMT
< Content-Length: 0
<
* Connection #0 to host localhost left intact

That's OK. But if we try to send POST requests using Ajax:
jQuery.ajax({
    type: "POST",
    url: "http://localhost:5000/cors-issue",
    contentType: "application/json",
    crossDomain: true,
    data: {"id": id, "name": name, "password": password},
    dataType: "json",
    success: function(status) {
    	console.log("OK: " + status)
    },
    error: function(xhr,status,error) {
    	console.log("NOT OK: " + xhr + " " + status + " " + error)
    }
});

We will get an error:
> POST http://localhost:5000/cors-issue 400 (Bad Request)

Hi @lomigmegard
Thanks for akka-http-cors
Why there is no documentation for this issue?
This issue wasted my time :disappointed:

@khajavi you can have a look at the full example. Note that in respect to rejections and exceptions, the cors directive behaves exactly how you would expect.

I have this problem even now on akka-http 10.2.1, if I test this route with `~!> real server :
  val route: Route =
    handleRejections(CorsDirectives.corsRejectionHandler) {
      cors() {
        Route.seal {
          pathPrefix(Prefix) {
             withRequestTimeout(20.millis) {
                complete(Future.never)
             }
          }
        }
      }
    }

Like this :
    "add headers to a timed out response" in {
      Get("/api/valid").withHeaders(Origin("http://www.globalwebindex.com")) ~!> route ~> check {
        status shouldBe StatusCodes.ServiceUnavailable
        headers should contain(`Access-Control-Allow-Origin`(HttpOrigin("http://www.example.com")))
      }
    }

it fails on missing cors header ...

@l15k4 Please refer to the Scala example. The route errors (exceptions and rejections) must be handled before the cors directive (inside it).
handleErrors { // this one is only for the errors that could be produced by the Cors directive
  cors() {
    handleErrors { // this one is mandatory to handle all errors before the Cors directive applies
       ...
    }
  }
}

@lomigmegard the test above ^^ does not pass even if I do it exactly as it is in the example. Would you pls check the test? When I debug it, I can see that the cors() directive sets the Origin header but something later must unset it and IDK what it is.

Are you sure you are sending an allowed Origin in the request? If not, the directive will reject it. You can debug your routes by logging the request, the CORS settings and the response.
If you think there is a bug, please open a new ticket with a reproducible example (settings included).

Yeah, there is 4 more tests which pass except for the one that tests that response headers are set for request that times out, ie :  withRequestTimeout(20.millis)


Cleanup

Issue #, if available:

Deleted CHANGELOG.md since we haven't been using it.
Updated SECURITY.md to match the cedar repo.
Updated CONTRIBUTING.md to match the cedar repo, minus the the notes on the CHANGELOG.
Updated to the latest version of cedar.

Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Build failure should be resolved by #163. I'll merge that PR first.


Update meta

Description
Small changes to meta information with title and description
Is this PR related with an open issue?
Related to Issue #
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[ ] Follows the code style of this project.
[ ] Tests Cover Changes
[ ] Documentation

Funny gif

closed in favour of #27


Facility and Infrastructure

The classes 'Infrastructure' and 'Facility' are not sufficiently clear to identify whether a given class belongs to one over the other. The wikipedia article that infrastructure links to includes many different senses of the word 'infrastructure', some of which overlap with facility.
Recommend 'Facility' be restricted to those buildings and campuses containing 0 or more building, where each facility is designed to fulfill a specific function (as it largely is now), while infrastructure is more narrowly defined as physical networks facilitating transportation, communication, or power functions within large organizations or geopolitical entities. This would make dams and aqueducts facilities, but leaves roads, power lines, and fiber optic cable networks under infrastructure. Right now, classes like 'power transmission line' seem like clear cases of infrastructure, but are under facility.

An infrastructure role has been introduced in version 1.3 and Infrastructure has been made a defined class.


fix: refine cherrypicker deployment github-token-path

/hold

Codecov Report

Merging #193 (009e224) into master (784590e) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #193   +/-   ##
=======================================
  Coverage   86.10%   86.10%
=======================================
  Files          11       11
  Lines         986      986
=======================================
  Hits          849      849
  Misses         77       77
  Partials       60       60

Flag
Coverage Δ

unittests
86.10% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Continue to review full report at Codecov.

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


Add option for x day "periods" within min/max days

If we want a user to be able to select a 7 day period we can use min and maxDays of 7 to do this but this limits to only 7 days as a maximum. So let's say we want to allow the user to select more than a single 7 day period. So a user could pick either 1st to 7th or 1st to 14th. Right now we could only set min and max days to 14 which in effect allows them to select 10 days whereas we want to only allow them 7 or 14.
Unless I'm missing a setting in the documentation I don't think this is possible right now?

You can try do it with v2 and lockDaysFilter.

new Litepicker({
	element: document.getElementById('datepicker'),
        singleMode: false,
	lockDaysFilter: (d1, d2, pickedDates) => {
		if (pickedDates.length === 1) {
                   const d7 = pickedDates[0].clone().add(6, 'day');
                   const d14 = pickedDates[0].clone().add(13, 'day');

                   return d1.toDateString() !== d7.toDateString()
          	             && d1.toDateString() !== d14.toDateString();
               }

              return false;
       }
})

https://jsfiddle.net/9ux5r3h2/
v2 currently in beta.

You can try do it with v2 and lockDaysFilter.

new Litepicker({
	element: document.getElementById('datepicker'),
        singleMode: false,
	lockDaysFilter: (d1, d2, pickedDates) => {
		if (pickedDates.length === 1) {
                   const d7 = pickedDates[0].clone().add(6, 'day');
                   const d14 = pickedDates[0].clone().add(13, 'day');

                   return d1.toDateString() !== d7.toDateString()
          	             && d1.toDateString() !== d14.toDateString();
               }

              return false;
       }
})

https://jsfiddle.net/9ux5r3h2/
v2 currently in beta.

Thank you, do you have any pointers on how we could use this to work for any 7 day period, so we don't have to add each 7,14,21,28 condition? @wakirin

Thank you, do you have any pointers on how we could use this to work for any 7 day period, so we don't have to add each 7,14,21,28 condition? @wakirin

https://jsfiddle.net/qx43jmnh/
I also used selectForward, if you want to allow selection backwards you need to adapt the current example.

https://jsfiddle.net/qx43jmnh/
I also used selectForward, if you want to allow selection backwards you need to adapt the current example.


buckle: add darwin dependencies

Description of changes
ZHF: #309482
Fixes buckle build for darwin systems by providing two missing dependencies.
Also runs nixfmt-rfc-style and updates lib usage in meta.
Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[x] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 311352 run on aarch64-darwin 1

1 package built:

buckle


use JSON patch for CEP Status on k8s >= 1.13

This change is

Coverage decreased (-0.04%) to 43.107% when pulling c81fd4fdff65b67ce366daef61b12bfbcc42de6b on pr/add-patch-to-cep-status into 6a3b75e06c8e7e46b734b0bb3cb770e7c6e768b3 on master.

test-me-please

test-me-please

test-me-please

test-me-please

test-me-please

test-me-please


React 0.14.0

There is error when import
ERROR in ./~/react-modal/lib/components/Modal.js
Module not found: Error: Cannot resolve module 'react/lib/ExecutionEnvironment' in /home/yesa/Projects/sporta/node_modules/react-modal/lib/components
@ ./~/react-modal/lib/components/Modal.js 2:27-68

What's the ETA for this fix to be released ?

Working on getting #78, and #79 merged, which will resolve this issue.

@mzabriskie Supposedly renderSubtreeIntoContainer should be used too, for context purposes. I am using this: https://github.com/miracle2k/react-modal/commit/acac059198afef3d8627d15dfe641d46e77c8442


Can't filter for values equal to 0 on data viewer

Bug: Notebook Editor, Interactive Window, Editor cells

Steps to cause the bug to occur

Load a data set with pandas that you know that some values are equal to 0.
E.g. https://github.com/luabud/native-jupyter/blob/master/data/pima-data.csv
I loaded the data through:

df = pd.read_csv("data/pima-data.csv")

Open the data viewer and filter the columns by adding "0".

Actual behavior
You'll see no return to any of the columns, even though they do contain the value 0

Your Jupyter and/or Python environment
Please provide as much info as you readily know

Jupyter server running:                       Local
Extension version:                               2020.2.64397
VS Code version:                                1.43
Setting python.jediEnabled:               false
Python and/or Anaconda version:     Python 3.7.6
OS:                                                     Windows 10
Virtual environment:                          venv

Developer Tools Console Output

Nothing relevant is displayed for this case
Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer

Likely a truthy problem.

Validated.


osbuild2: support firewall stage default zone setting

osbuild2: support setting the default zone in firewall stage
image-info: read the firewall default zone

Blocked on:

[x] https://github.com/osbuild/osbuild/pull/980

This pull request includes:

[ ] adequate testing for the new functionality or fixed issue
[ ] adequate documentation informing people about the change such as

[ ] submit a PR for the guides repository if this PR changed any behavior described there: https://www.osbuild.org/guides/

Citation from https://github.com/osbuild/osbuild-composer/pull/2380#issuecomment-1058156727:
The tests that are failing are expected to fail (koji CS9, installer on CS9/RHEL9: https://bugzilla.redhat.com/show_bug.cgi?id=2059565)

included in #2155


[Feature] [Satellite] Support to configure re-label

Search before asking

[X] I had searched in the issues and found no similar feature requirement.

Description
In k8s, Satellite fetches the metrics and then puts some label like 'instance'. But as you know, 'instance' is preserved for SW OAP. So I think we cloud support to configure re-label by users.
Use case
No response
Related issues
No response
Are you willing to submit a PR?

[ ] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

This makes sense, are you or someone going to contribute this?

I and @gxthrj will do this next month(maybe). If anyone is interesting, can assign him.

No update in 26 days, if there is no one working on this, we could close this for now.


Infinite watch loop on Windows

Checklist

[x] Updated CHANGELOG.md describing pertinent changes.
[ ] Updated README.md with pertinent info (may not always apply).

Fixes #133.

The thing which is a bit frustrating about this situation is that there is only one location where a value is sent over this channel, and that is just before we issue the cargo build. Also, as you can see from your diagnostics report in #133, that path is actually canonical ... except that it doesn't have the ? prefix ... is this a requirement for canonical paths on Windows?
Either way, we recently fixed a bug which was causing Trunk to crash due to the fact that the target will not always be present. So there were times when we were canonicalizing the path, and it was causing an error. Fix one bug, cause another.
So, here is what I will do. I'm going to merge your code. Once it is in, I'm going to update the ONE location in the code where a path is sent over that channel to update the ignore list, and I only going to do so AFTER the cargo build has completed successfully. That should give us our needed behavior, and we will be able to properly canonicalize the path as cargo will have created it.


fixed skip empty file logic

changed content_length != 0 to content_length > 508
content_length == 508 is an empty file, so only process content_length > 508 i.e. skip  empty files

@ryancrawcour : Thanks for your contribution to the Azure documentation! The author, @djrosanova, has been notified to review your proposed change.

#sign-off


Added unit test for the makeURLSegments function of dynamichelper

Which issue this PR addresses:
To improve unit test coverage for dynamichelper. This ADO task can be separated to multiple PRs for each function in the dynamichelper as suggested. This PR is for the function makeURLSegments
What this PR does / why we need it:
The dynamichelper is used in multiple important parts of our codebase and need better unit test coverage
Is there any documentation that needs to be updated for this PR?
No, this PR is mainly to meet the requirement in the ADO task 13525478 - Improve unit test coverage for dynamichelper

lgtm


Documentation - src/types/placeholder.js

Description
This PR address inline documentation for Issue #134  on PlaceholderId and Placeholder.
NOTE: Outstanding questions include:

What Placeholder.getOrderFromTags method does
How to make PlaceholderId and Placeholder classes sound more simplified and non-abstract
Double check if the types for the static unbufferize methods are labeled correctly

Affected Dependencies
N/A
How has this been tested?
N/A
Checklist

[ ] I have followed the Contribution Guidelines and Code of Conduct
[ ] I have commented my code following the OpenMined Styleguide
[ ] I have labeled this PR with the relevant Type labels
[ ] My changes are covered by tests

Good to me @nahuakang. Merge when you approve @vvmnnnkv.

I got a better understanding about Placeholder now so I'll work on the documentation again this evening :smiley:


ES6 transpiled await breaks code if inside for/in loop

TypeScript Version:  3.6.3 and next
Search Terms: async await es6 transpile for in loop
Code
async function exampleA(data: { [index: string]: any }) {
  for (const key in data) {
    console.log('stuff1-a');
    await new Promise(data[key]);
    console.log('stuff2-a');
  }
}

async function set(value: any) {
  await new Promise(value);
}

function exampleB(data: { [index: string]: any }) {
  for (const key in data) {
    console.log('stuff1-b');
    set(data[key]);
    console.log('stuff2-b');
  }
}

const data = {
  'hola': 'hey',
  'ciao': 'hello'
};

exampleA(data);

exampleB(data);

Expected behavior:
exampleA should behave like exampleB: wait for the promise to finish and then proceed into logging the following messages.
Actual behavior:
When transpiled, exampleA awaiter function wraps the whole for/in loop instead of the single await line.
In my code this somehow results in exampleA to immediately interrupt execution of the whole function at the very first time the line is processed, without firing off any kind of error even when wrapped into a try/catch.
In exampleB the awaiter wraps only the single line of set function and everything works as expected.
Strange fact: exampleA works fine when it's used into a Jest environment and processed by ts-jest, but breaks when compiled directly via tsc and run on a Node v12.11.1 process (with experimental modules enabled, but I don't think this matter).
I don't know how to explain this difference because I don't know how to check the code transpiled by ts-jest.
If the code is the same, the bug is probably related to my setup, yet I don't understand how and will happily accept some guidance in how to debug it further.
Playground Link: playground
Related Issues:
https://github.com/microsoft/TypeScript/issues/31621 seems somehow related, but doesn't look like the very same one

After reading around for a bit, I think I got that exampleB is wrong too, because it's solving the problem by ignoring the Promise return, so it doesn't actually wait anything.
I trying also switching the for-in loop with normal for or for-of with no luck.

This is not a bug in TypeScript.
exampleA doesn't work because you are giving strings directly to the Promise constructor, which actually expects a function like new Promise(resolve => resolve(data[key])). You could also use Promise.resolve(data[key]) (docs).
Calling new Promise('hey') throws a TypeError, which is why you never see
console.log('stuff2-a'); logging. If you are not seeing this error, it's probably more related to your environment (e.g. Jest) than TypeScript.
As you suspected, exampleB doesn't get stuck like exampleA because async & await should actually be in the exampleB function for the waiting to happen, not in the set function (I mean it can be there too but it doesn't help the calling function).
Btw, since modern JS environments like Chrome, Firefox and Node v. 7+ already support async/await, you can just remove the type annotations from the example and run it in those to see how they handle the code to quickly check that it's not a TypeScript bug.

Sorry, new Promise(data[key]); is actually pseudo code, I tried to reduce the noise in my code.
In my real code I'm using Firebase JS/TS SDK and that promise is a set

Stripped away TS, still getting silent failing.
Thank you for the advice, gonna search the bug elsewhere


Resolve syncing conflicts from from-prod-live to live

Pull request opened by Docs to resolve syncing conflicts from from-prod-live to live.

Docs Build status updates of commit e894ed8:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error] Cannot sync git repo to specified state. Please make sure the pull request is mergeable. Details: Git merge results in conflict, repository remote url: https://github.com/OPS-E2E-Prod/PowerShell-Docs, working directory: W:\01xd-s, target branch: HEAD, target branch commit: 51dc748736186bd119475ee3c7669c6a7c22ce2a, source commit: e894ed833cef57967cdaf002f8c883f66864e836.

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Profiler in WebView tag's DevTools has draw issues

To repro:

Create a WebView tag
Call openDevTools on it
Go to the Profiler tab, take a perf trace with JS Profile / Memory / Paint enabled
Toggle Frames View (http://cl.ly/image/2i072v1Q1i01/Slack_Corp__-_Slack_2015-09-24_12-28-14.png) then toggle it back

It seems as if this is isolated to guest views, the BrowserWindow's DevTools works properly

Did you happen to do a right click in the flamechart view before toggling ? currently context menu is broken in webview devtools https://github.com/atom/electron/issues/1456 . I couldnt reproduce the issue without performing the context menu action in the flamechart view.

@deepak1556 That's entirely possible that this is the bug I'm hitting


ISPN-7072 Make Hibernate optional dependency

https://issues.jboss.org/browse/ISPN-7072

why? The Jpa CacheStore requires it.  It would be better to make the JPA CacheStore optional, at least the error messages are understandable?

Yes I also think making JPA Cache Store optional would be a better option.

N.B. I had to fix integration tests which had started failing with a very unfriendly error message as Hibernate was missing, while the JPA Cachestore was being started. (By "undriendly" I mean it was hard to guess what the problem was, I had to debug it to figure out which nested exception was being swallowed)


File extensions

All the lua files should probably be changed to have .lua extensions.
Note that this will require updating the installer, as well as the apiloader
(and maybe something more)
This is since it's kinda silly that the program is currently noted as a python
project.

Yay! A use for the script I made! (Even though it causes the current problem.)

Would the .lua extension look a little weird on the computercraft computers? Should the installer install them with no extension or with the .lua extension?

I haven't tested my code yet. @HugoNikanor Did you? Before you merge into master and all ...

I'm in the process of testing it right now.
There where some small problems (lua being one-indexed created a problem with the substrings)
Once this is done I'm going to write better instructions for where to merge new commits.

Issue should now be resoldev


Is there a way in pyspider to discard similar url such as "http://www.test.com/123.html" and "http://www.test.com/456.html"

Is there a way in pyspider to discard similar url such as "http://www.test.com/123.html" and "http://www.test.com/456.html"?
because i want to crawl a website, but the website has lots of similar url which costs me a lot of resource.

I can't find any similarity between "http://www.test.com/123.html" and "http://www.test.com/456.html" = =!
However, if you can write a rule to tell pyspider which urls are similar, you can overwrite the def get_taskid(self, task) ref method to generate a unique taskid for the group.

OK, thanks any way


Adding a reason to the canExecute observable

I am trying to create a custom ReactiveCommand that will allows me to specify a reason (string) along with the canExecute.
I have created a simple object that contains a bool and a string property and I have replaced the IObservable by an IObservable of my new type and I am calling the base class (i.e. ReactiveCommand) with a select on the boll property of my object. This seems to be working properly.
My question is how to expose the string property (the reason) to have the UI to be triggered (using the notifications) as the ReactiveCommand doesn't inherit from ReactiveObject.

Implementing a simple version of the INotifyPropertyChanged works but seems a bit stupid as you already have an object that does it (and with a lot more functionalities).
Exposing an object inheriting from the ReactiveObject works also but again I don't think this can be the best idea.

What would you recommend?

Maybe something like this would work for you. It's not really a custom ReactiveCommand, but it does give you an opportunity to give a reason to the true/false ness of the CanExecute.
public class MySimpleObject
{
    public bool SomeBool{get;set;}
    public bool SomeString{get;set;}
}

ctor()
{
    CanExectute = (...); //set your bool and reason here
    this.WhenAnyValue(x=>CanExectute.SomeString)
          .ToProperty(this, x=>x.StringToExpose, out _StringToExpose);
    var cmd = ReactiveCommand.Create(this.WhenAnyValue(x=>x.canExecute.Select(x=>theBoolPart);
}

private MySimpleObject_CanExectute ;
private MySimpleObject CanExectute
{
    get { return _CanExectute; }
    set { this.RaiseAndSetIfChanged(ref _CanExectute, value); }
}

private ObservableAsPropertyHelper<string> _StringToExpose;
public bool StringToExpose
{
        get { return _StringToExpose.Value; }
}

Thank you for your answer @pdoh00 but except if I missed something on your explanation, I prefer to keep something that inherits from ReactiveCommand and just implement the INotifyPropertyChanged. I was mainly looking for a way to have something nice enough to suggest it as a PR looks like I still need some practice before I am able to do so.

Something like:
public class ViewModel : ReactiveObject
{
    public string RequiredField { /* get/set with RaiseAndSetIfChanged */ }

    // an OAPH
    public string Message => this.message.Value;

    public ViewModel()
    {
        var message = this
            .WhenAnyValue(x => x.RequiredField)
            .Select(value => string.IsNullOrEmpty(value) ? "Need that!" : null);

        this.message = message.ToProperty(...);

        this.command = ReactiveCommand.Create(
            () => { /* do whatever */ },
            message.Select(x => x == null));
    }
}


OneLine doesn't work with root arrays in 2019.2

Doesn't work at all

Ok, there is a bug in Unity 2019.2.


drone-helm3 upgrade failed

enviroment:
My drone version: 2.0.7
drone-helm3 version: probably latest
k8s version(managed by rancher): 1.18.3
What i tried to do
helm upgrade --install
What happened
get an error : "Error: UPGRADE FAILED: query: failed to query with labels: the server has asked for the client to provide credentials (get secrets)"
detail:

Generated config: {Command: DroneEvent:push UpdateDependencies:false DependenciesAction: AddRepos:[] RepoCertificate: RepoCACertificate: Debug:true Values: StringValues: ValuesFiles:[] Namespace:drone KubeToken:(redacted) SkipTLSVerify:false Certificate:********
--
2 | APIServer:******** ServiceAccount:******** ChartVersion: DryRun:false Wait:false ReuseValues:false KeepHistory:false Timeout: Chart:./helm Release:master Force:false AtomicUpgrade:false CleanupOnFail:false LintStrictly:false Stdout:0xc0000aa008 Stderr:0xc0000aa010}
3 | calling *run.InitKube.Prepare (step 0)
4 | loading kubeconfig template from /root/.kube/config.tpl
5 | creating kubeconfig file at /root/.kube/config
6 | calling *run.Upgrade.Prepare (step 1)
7 | Generated command: '/usr/bin/helm --debug --namespace drone upgrade --install master ./helm'
8 | calling *run.InitKube.Execute (step 0)
9 | writing kubeconfig file to /root/.kube/config
10 | calling *run.Upgrade.Execute (step 1)
11 | upgrade.go:82: [debug] preparing upgrade for master
12 | Error: UPGRADE FAILED: query: failed to query with labels: the server has asked for the client to provide credentials (get secrets)
13 | helm.go:75: [debug] the server has asked for the client to provide credentials (get secrets)
14 | query: failed to query with labels
15 | helm.sh/helm/v3/pkg/storage/driver.(*Secrets).Query
16 | /home/circleci/helm.sh/helm/pkg/storage/driver/secrets.go:121
17 | helm.sh/helm/v3/pkg/storage.(*Storage).DeployedAll
18 | /home/circleci/helm.sh/helm/pkg/storage/storage.go:134
19 | helm.sh/helm/v3/pkg/storage.(*Storage).Deployed
20 | /home/circleci/helm.sh/helm/pkg/storage/storage.go:113
21 | helm.sh/helm/v3/pkg/action.(*Upgrade).prepareUpgrade
22 | /home/circleci/helm.sh/helm/pkg/action/upgrade.go:125
23 | helm.sh/helm/v3/pkg/action.(*Upgrade).Run
24 | /home/circleci/helm.sh/helm/pkg/action/upgrade.go:83
25 | main.newUpgradeCmd.func1
26 | /home/circleci/helm.sh/helm/cmd/helm/upgrade.go:136
27 | github.com/spf13/cobra.(*Command).execute
28 | /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:826
29 | github.com/spf13/cobra.(*Command).ExecuteC
30 | /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914
31 | github.com/spf13/cobra.(*Command).Execute
32 | /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
33 | main.main
34 | /home/circleci/helm.sh/helm/cmd/helm/helm.go:74
35 | runtime.main
36 | /usr/local/go/src/runtime/proc.go:203
37 | runtime.goexit
38 | /usr/local/go/src/runtime/asm_amd64.s:1357
39 | UPGRADE FAILED
40 | main.newUpgradeCmd.func1
41 | /home/circleci/helm.sh/helm/cmd/helm/upgrade.go:138
42 | github.com/spf13/cobra.(*Command).execute
43 | /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:826
44 | github.com/spf13/cobra.(*Command).ExecuteC
45 | /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914
46 | github.com/spf13/cobra.(*Command).Execute
47 | /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
48 | main.main
49 | /home/circleci/helm.sh/helm/cmd/helm/helm.go:74
50 | runtime.main
51 | /usr/local/go/src/runtime/proc.go:203
52 | runtime.goexit
53 | /usr/local/go/src/runtime/asm_amd64.s:1357
54 | while executing *run.Upgrade step: exit status 1

I suspect i get the wrong kube_token and kube_service_acccount. The service_account which i use is 'drone-drone-pipeline'，and the kube_token is 'drone-drone-pipeline-token-kfjn7'.  This serviceaccount(drone-drone-pipeline) was created when drone was installed, I think it is used to provide the plugin for drone deployment.
drone-drone-pipeline-token-kfjn7 info:
Namespace:    drone
Labels:       <none>
Annotations:  kubernetes.io/service-account.name: drone-drone-pipeline
              kubernetes.io/service-account.uid: e81b97d9-a3c3-4cfa-96c5-a393f5969ff8

Type:  kubernetes.io/service-account-token

Data
====
ca.crt:     1017 bytes
namespace:  5 bytes
token:   {token data}

the clusterrolebinding 'drone-drone-pipeline':
Name:         drone-drone-pipeline
Labels:       app=drone
              chart=drone-2.0.7
              heritage=Tiller
              io.cattle.field/appId=drone
              release=drone
Annotations:  <none>
Role:
  Kind:  ClusterRole
  Name:  drone-drone-pipeline
Subjects:
  Kind            Name                  Namespace
  ----            ----                  ---------
  ServiceAccount  drone-drone-pipeline  drone

the clusterrole 'drone-drone-pipeline':
Name:         drone-drone-pipeline
Labels:       app=drone
              chart=drone-2.0.7
              heritage=Tiller
              io.cattle.field/appId=drone
              release=drone
Annotations:  <none>
PolicyRule:
  Resources               Non-Resource URLs  Resource Names  Verbs
  ---------               -----------------  --------------  -----
  configmaps              []                 []              [create delete get list watch]
  namespaces              []                 []              [create delete get list watch]
  pods                    []                 []              [create delete get list watch]
  secrets                 []                 []              [create delete get list watch]
  services                []                 []              [create delete get list watch]
  deployments.extensions  []                 []              [get list watch patch update]
  pods/log                []                 []              [get]

my drone config:
  - name: deploy
    image: pelotech/drone-helm3
#    volumes:
#      - name: kube
#        path: /root/.kube
    settings:
#      mode: upgrade
      namespace: drone
      chart: ./helm
      release: ${DRONE_BRANCH}
      debug: true
      kube_api_server:
        from_secret: kube_api_server
      kube_token:
        from_secret: kube_token
      kube_service_account:
        from_secret: kube_service_account
      kube_certificate:
        from_secret: kube_certificate
#      skip_tls_verify: false

Can I use this token for deploying? Or can you give suggestions for obtaining kube_token for deploying?
Thanks for help.

sorry , my bad! i get the wrong api-server address.


workflows: UUID upgrade problem

The change to using UUID type and the following upgrade script introduced in https://github.com/inveniosoftware/invenio/commit/e8f6551d9787ceec99248b2b0ad04b8f22a0d8b4 causes a problem with truncated values for the existing values - essentially corrupting the data (observed locally):
>>> Applying workflows_2015_06_05_resize_uuid_columns (Resize uuid columns on workflows tables.)
>>> workflows_2015_06_05_resize_uuid_columns: WARNING: Data truncated for column 'uuid' at row 1
>>> workflows_2015_06_05_resize_uuid_columns: WARNING: Data truncated for column 'uuid' at row 2
...

Before the uuid column was db.String(36) and a value included hyphens 00011d78-fd76-11e4-b9a6-ecf4bb24. With the UUID type on MySQL, the hyphens are not considered and the length of the CHAR type is set to 32. During the upgrade the data is still stored with hyphens causing the truncation.
I noticed this in the output of the upgrade, the corrupt IDs then cause a range of troubles post-upgrade.
I suggest we either (a) change the MySQL type to CHAR(36), or (b) remove hyphens from the data during upgrade.
EDIT: Considering changing a primary key is never a good idea, I suggest (a).
@hachreak @jirikuncar

I changed because sometimes it's used string and sometimes it's used UUID object to represent a uuid.
It's ok for mysql, because we represent a uuid as a CHAR.
But, with PostgreSQL is a problem to mix UUID and strings.

Yeah, except now on MySQL the length of the uuid column CHAR is 32 instead of 36 which truncates existing data.
What do you think about changing the GUID type to have an hyphenate option similar to https://github.com/dcramer/django-uuidfield/blob/master/uuidfield/fields.py#L54-L59
Then for workflows models, we enable this hyphenate option but it is False by default.
# invenio/ext/sqlalcemy/types/guid.py
    def load_dialect_impl(self, dialect):
        """Load dialect dependent implementation of UUID."""
        if dialect.name == 'postgresql':
            return dialect.type_descriptor(UUID())
        elif self.hyphenate:
            # UUID is stored with hyphens.
            return dialect.type_descriptor(CHAR(36))
        else:
            # UUID is stored as hex.
            return dialect.type_descriptor(CHAR(32))

IMHO we should fix the upgrade recipe to process the string UUID to hex version.

@jirikuncar We could, but it may be potentially risky data migration (for MySQL only) since changing the primary key is non-trivial. Either by removing and re-adding all rows in the bwlWORKFLOW table and then update any related tables (bwlOBJECT, bwlWORKFLOWLOGGING). Or do a series of steps to remove primary key index, update values, and re-add primary key index, in addition to updating related tables. Probably latter is easier.
In the end  it will involve a possibly risky data migration when upgrading production sites such as INSPIRE Labs and Zenodo which relies heavily on this data through submissions. I am not saying it's wrong to do it, but we should think a bit about it.
CC @lnielsen

Currently, the GUID (UUID) field is used by 2 modules:

documents
workflows

Or, another solution can be (maybe more easy):

revert uuid and id_worflow fields as string(XX)
take care to translate python UUID object to strings (e.g. in this testsuite)

This is a error if I run tests using uuid as string with postgresql:
--------------------------------------------------------------------------------
ERROR in wrappers [/home/vagrant/.virtualenvs/invenio2/src/invenio/invenio/ext/logging/wrappers.py:310]:

--------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vagrant/.virtualenvs/invenio2/src/invenio/invenio/ext/legacy/__init__.py", line 110, in __call__
    response = self.app.full_dispatch_request()
  File "/home/vagrant/.virtualenvs/invenio2/local/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/vagrant/.virtualenvs/invenio2/local/lib/python2.7/site-packages/flask_restful/__init__.py", line 270, in error_router
    return original_handler(e)
  File "/home/vagrant/.virtualenvs/invenio2/src/invenio/invenio/base/wrappers.py", line 133, in handle_user_exception
    return super(Flask, self).handle_user_exception(e)
  File "/home/vagrant/.virtualenvs/invenio2/local/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/vagrant/.virtualenvs/invenio2/local/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/vagrant/.virtualenvs/invenio2/local/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/vagrant/.virtualenvs/invenio2/local/lib/python2.7/site-packages/flask_login.py", line 758, in decorated_view
    return func(*args, **kwargs)
  File "/home/vagrant/.virtualenvs/invenio2/src/invenio/invenio/modules/deposit/views/deposit.py", line 75, in inner
    return f(*args, **kwargs)
  File "/home/vagrant/.virtualenvs/invenio2/local/lib/python2.7/site-packages/flask_principal.py", line 199, in _decorated
    rv = f(*args, **kw)
  File "/home/vagrant/.virtualenvs/invenio2/src/invenio/invenio/modules/deposit/views/deposit.py", line 313, in run
    return deposition.run_workflow()
  File "/home/vagrant/.virtualenvs/invenio2/src/invenio/invenio/modules/deposit/models.py", line 1170, in run_workflow
    self.engine = self.type.run_workflow(self)
  File "/home/vagrant/.virtualenvs/invenio2/src/invenio/invenio/modules/deposit/models.py", line 485, in run_workflow
    module_name="webdeposit"
  File "/home/vagrant/.virtualenvs/invenio2/src/invenio/invenio/modules/workflows/models.py", line 632, in start_workflow
    return start_func(workflow_name, data=[self], **kwargs)
  File "/home/vagrant/.virtualenvs/invenio2/src/invenio/invenio/modules/workflows/api.py", line 99, in start
    return run_worker(workflow_name, data, **kwargs)
  File "/home/vagrant/.virtualenvs/invenio2/src/invenio/invenio/modules/workflows/worker_engine.py", line 42, in run_worker
    engine = BibWorkflowEngine(wname, **kwargs)
  File "/home/vagrant/.virtualenvs/invenio2/src/invenio/invenio/modules/workflows/engine.py", line 133, in __init__
    if text_type(self.db_obj.uuid) not in self.log.name:
  File "/home/vagrant/.virtualenvs/invenio2/local/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 237, in __get__
    return self.impl.get(instance_state(instance), dict_)
  File "/home/vagrant/.virtualenvs/invenio2/local/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 573, in get
    value = state._load_expired(state, passive)
  File "/home/vagrant/.virtualenvs/invenio2/local/lib/python2.7/site-packages/sqlalchemy/orm/state.py", line 480, in _load_expired
    self.manager.deferred_scalar_loader(self, toload)
  File "/home/vagrant/.virtualenvs/invenio2/local/lib/python2.7/site-packages/sqlalchemy/orm/loading.py", line 655, in load_scalar_attributes
    only_load_props=attribute_names)
  File "/home/vagrant/.virtualenvs/invenio2/local/lib/python2.7/site-packages/sqlalchemy/orm/loading.py", line 217, in load_on_ident
    return q.one()
  File "/home/vagrant/.virtualenvs/invenio2/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2472, in one
    ret = list(self)
  File "/home/vagrant/.virtualenvs/invenio2/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2515, in __iter__
    return self._execute_and_instances(context)
  File "/home/vagrant/.virtualenvs/invenio2/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2530, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/home/vagrant/.virtualenvs/invenio2/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/home/vagrant/.virtualenvs/invenio2/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/vagrant/.virtualenvs/invenio2/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/home/vagrant/.virtualenvs/invenio2/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/home/vagrant/.virtualenvs/invenio2/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/home/vagrant/.virtualenvs/invenio2/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb)
  File "/home/vagrant/.virtualenvs/invenio2/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/home/vagrant/.virtualenvs/invenio2/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
ProgrammingError: (psycopg2.ProgrammingError) operator does not exist: character varying = uuid
LINE 3: WHERE "bwlWORKFLOW".uuid = '797b4114-15b9-11e5-8d9d-080027be...
                                 ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
 [SQL: 'SELECT "bwlWORKFLOW".uuid AS "bwlWORKFLOW_uuid", "bwlWORKFLOW".name AS "bwlWORKFLOW_name", "bwlWORKFLOW".created AS "bwlWORKFLOW_created", "bwlWORKFLOW".modified AS "bwlWORKFLOW_modified", "bwlWORKFLOW".id_user AS "bwlWORKFLOW_id_user", "bwlWORKFLOW"._extra_data AS "bwlWORKFLOW__extra_data", "bwlWORKFLOW".status AS "bwlWORKFLOW_status", "bwlWORKFLOW".current_object AS "bwlWORKFLOW_current_object", "bwlWORKFLOW".counter_initial AS "bwlWORKFLOW_counter_initial", "bwlWORKFLOW".counter_halted AS "bwlWORKFLOW_counter_halted", "bwlWORKFLOW".counter_error AS "bwlWORKFLOW_counter_error", "bwlWORKFLOW".counter_finished AS "bwlWORKFLOW_counter_finished", "bwlWORKFLOW".module_name AS "bwlWORKFLOW_module_name" \nFROM "bwlWORKFLOW" \nWHERE "bwlWORKFLOW".uuid = %(param_1)s'] [parameters: {'param_1': UUID('797b4114-15b9-11e5-8d9d-080027bebe68')}]

revert uuid and id_worflow fields as string(XX)

I would go for this fast solution and prepare better upgrade recipe together with @lnielsen and @jalavik.

I agree with @jalavik that the risk of data loss is too big without extensive testing on real data, so I prefer reverting to string(36) and let workflows module stay with that.

@jirikuncar @jalavik there is some reason why it's a String(255) instead of String(36) here ?

@hachreak No, I don't think so. Indeed this should be String(36).


Updated ADOPTERS.md

Added amasol AG to adopters list.

Codecov Report

Merging #1819 into master will increase coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1819      +/-   ##
==========================================
+ Coverage   32.08%   32.10%   +0.01%
==========================================
  Files          99       99
  Lines        7585     7585
==========================================
+ Hits         2434     2435       +1
+ Misses       4849     4848       -1
  Partials      302      302

Impacted Files
Coverage Δ

distributor/cmd/main.go
58.88% <0.00%> (+1.11%)
:arrow_up:

Continue to review full report at Codecov.

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


FTP Upload task v2 fails with 550 The system cannot find the path specified.

Required Information
Question, Bug, or Feature?
Type: Bug
Enter Task Name: FtpUploadV2
Environment

Server - Azure Pipelines

Agent - Hosted VS2017

Issue Description
When using the FTP Upload task v2, the task connects and uploads 1 file, but throws a 550 error and fails before the entire upload completes. This occurs on both FTP and FTPS.
Error logs

2020-01-24T15:49:23.3436977Z connected: 220 Microsoft FTP Service
2020-01-24T15:49:23.3751430Z removing remote directory contents: site/wwwroot
2020-01-24T15:49:23.3835804Z ##[warning]FTPError: 550 The system cannot find the path specified.
2020-01-24T15:49:24.3820092Z connecting to: waws-prod-blu-027.ftp.azurewebsites.windows.net:21
2020-01-24T15:49:24.4556085Z connected: 220 Microsoft FTP Service
2020-01-24T15:49:24.5248063Z files uploaded: 0, directories processed: 1, total: 1, remaining: 41, remote directory successfully created/verified: site/wwwroot
2020-01-24T15:49:24.5322203Z ##[warning]FTPError: 550 The system cannot find the path specified.
2020-01-24T15:49:25.5452688Z connecting to: waws-prod-blu-027.ftp.azurewebsites.windows.net:21
2020-01-24T15:49:25.5705959Z connected: 220 Microsoft FTP Service
2020-01-24T15:49:25.5772668Z File: site/wwwroot/filename.txt Type: upload Transferred: 0
2020-01-24T15:49:25.5784120Z File: site/wwwroot/filename.txt Type: upload Transferred: 26751
2020-01-24T15:49:25.5828922Z files uploaded: 1, directories processed: 1, total: 2, remaining: 40, successfully uploaded: D:\a\r1\a\filename.txt to: site/wwwroot/filename.txt
2020-01-24T15:49:25.6053917Z files uploaded: 1, directories processed: 2, total: 3, remaining: 39, remote directory successfully created/verified: site/wwwroot/assets
2020-01-24T15:49:25.6416557Z files uploaded: 1, directories processed: 3, total: 4, remaining: 38, remote directory successfully created/verified: site/wwwroot/assets/images
2020-01-24T15:49:25.6484090Z ##[warning]FTPError: 550 The system cannot find the path specified.
2020-01-24T15:49:26.6547171Z connecting to: waws-prod-blu-027.ftp.azurewebsites.windows.net:21
2020-01-24T15:49:26.6773996Z connected: 220 Microsoft FTP Service
2020-01-24T15:49:26.6840416Z ##[warning]FTPError: 550 The system cannot find the path specified.
2020-01-24T15:49:27.6936983Z connecting to: waws-prod-blu-027.ftp.azurewebsites.windows.net:21
2020-01-24T15:49:27.7161000Z connected: 220 Microsoft FTP Service
2020-01-24T15:49:27.7235810Z ##[warning]FTPError: 550 The system cannot find the path specified.
2020-01-24T15:49:28.7348560Z connecting to: waws-prod-blu-027.ftp.azurewebsites.windows.net:21
2020-01-24T15:49:28.7551626Z connected: 220 Microsoft FTP Service
2020-01-24T15:49:28.7556094Z ##[error]FTPError: 550 The system cannot find the path specified.
2020-01-24T15:49:28.7556819Z
2020-01-24T15:49:28.7557191Z host: waws-prod-blu-027.ftp.azurewebsites.windows.net
2020-01-24T15:49:28.7557339Z path: site/wwwroot
2020-01-24T15:49:28.7557486Z files uploaded: 1
2020-01-24T15:49:28.7557615Z directories processed: 3
2020-01-24T15:49:28.7557772Z unprocessed files & directories: 38
2020-01-24T15:49:28.7558310Z ##[error]Ftp Upload failed
2020-01-24T15:49:28.7582497Z disconnecting from: waws-prod-blu-027.ftp.azurewebsites.windows.net

This might be a long shot but I recently had the same issue (550s and 553s) which led to half my website being deployed as well as some weird nesting of my remote directory folder within itself. I fixed it by changing my remote directory to have a slash at the beginning. I didn't need it previously - something has changed since September 18th last year - the date of my last successful release.

@Turnerj - Can you please share the format of the address that worked for you? I seem to be having these issues persistently and I am unable to make any progress.

Not sure if this helps @vivekbm1 - this screenshot is the revision history for my release pipeline. Left before, right after - the after is what I had where it started working. (Note: I also went up in FTP task version from v1 to v2)

I can't show you what it looks like via the UI as I've since stopped deploying via FTP.

I have been going through the same problem. Some files and folders in the build were not going to my FTP server.
I added a bar before the destination folder and everything was resolved.


CEP (rcRules): Use Unbounded buffer

Created by: andriytk
When new message is added into a full Bounded buffer, the oldest
message of that buffer is discarded (see fifoBuffer.go.Insert).
Use Unbounded buffer, because we prefer running out of memory to
losing messages.
(cherry picked from commit be1ba4e8872ca5ed07e81299587654247d7d1e52)
Conflicts:
mero-halon/src/lib/HA/RecoveryCoordinator/CEP.hs

Closing as an obsolete