cannot have more than 1 script sorting

In elasticsearch, you can have as many script sorting as you want.
For example, there is a test index with two keyword fields "region" and "country", to sort by region and country alphabetically, by using script sorting you can do
{
  "sort": [
    {
      "_script": {
        "type": "string",
        "script": {
          "inline": "doc['region'].value"
        },
        "order": "desc"
      }
    },
    {
      "_script": {
        "type": "string",
        "script": {
          "inline": "doc['country'].value"
        },
        "order": "desc"
      }
    }
  ]
}

(In real world, you can simply do { "sort": ["region", "country"] },  this example is just to explain the issue)
However, when I use the order method of chewy I can't add more than 1 script sorting
TestsIndex.order([
    {
      "_script": {
        "type": "string",
        "script": {
          "inline": "doc['region'].value"
        },
        "order": "desc"
      }
    },
    {
      "_script": {
        "type": "string",
        "script": {
          "inline": "doc['country'].value"
        },
        "order": "desc"
      }
    }
  ])

it returns
<TestsIndex::Query {:index=>["tests"], :type=>["user"], :body=>{:sort=>[{"_script"=>{:type=>"string", :script=>{:inline=>"doc['country'].value"}, :order=>"desc"}}]}}>

The region script sorting part is gone.

Expected behavior
Expect query to be like
<TestsIndex::Query {:index=>["tests"], :type=>["user"], :body=>{:sort=>[{"_script"=>{:type=>"string", :script=>{:inline=>"doc['region'].value"}, :order=>"desc"}}, {"_script"=>{:type=>"string", :script=>{:inline=>"doc['country'].value"}, :order=>"desc"}}]}}>

Actual behavior
Actual query is
<TestsIndex::Query {:index=>["tests"], :type=>["user"], :body=>{:sort=>[{"_script"=>{:type=>"string", :script=>{:inline=>"doc['country'].value"}, :order=>"desc"}}]}}>

Steps to reproduce the problem
Define index
class TestsIndex < Chewy::Index
  define_type User do
    field :region, type: :keyword
    field :country, type: :keyword
  end
end

Then in console do
TestsIndex.order([
    {
      "_script": {
        "type": "string",
        "script": {
          "inline": "doc['region'].value"
        },
        "order": "desc"
      }
    },
    {
      "_script": {
        "type": "string",
        "script": {
          "inline": "doc['country'].value"
        },
        "order": "desc"
      }
    }
  ])

Version Information
Chewy 5.0.0 and 6.0.0 and 7.0.0
Elasticsearch 6.4
ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-darwin19]
Rails 5.1.7

By looking into the source code, I found that the value of Chewy::Search::Parameters::Order is a hash and the issue is because the key of script sorting must always be "_script".
=> #<Chewy::Search::Parameters:0x00007fa76fb3c950
 @storages=
  {:order=>#<Chewy::Search::Parameters::Order:0x00007fa76fb3c6a8 @value={"_script"=>{:type=>"string", :script=>{:inline=>"doc['country'].value"}, :order=>"desc"}}>,
   :types=>#<Chewy::Search::Parameters::Types:0x00007fa76fb4f438 @value=[]>,
   :none=>#<Chewy::Search::Parameters::None:0x00007fa76fb4ea60 @value=false>,
   :filter=>#<Chewy::Search::Parameters::Filter:0x00007fa76fb4ea38 @value=#<Chewy::Search::Parameters::QueryStorage::Bool:0x00007fa76fb4e7e0 @minimum_should_match=nil, @must=[], @must_not=[], @should=[]>>,
   :query=>#<Chewy::Search::Parameters::Query:0x00007fa76fb4e3d0 @value=#<Chewy::Search::Parameters::QueryStorage::Bool:0x00007fa76fb4e1c8 @minimum_should_match=nil, @must=[], @must_not=[], @should=[]>>}>

Hey @jiajiawang 👋 !
Thanks for the report. Are you interested in submitting a PR with a fix?

Hey @jiajiawang 👋 !
Thanks for the report. Are you interested in submitting a PR with a fix?

Hey @rabotyaga, Yes, I'm interested in it.
Not sure how hard it would be, but I'm happy to give a try.
In term of the fix, I assume we'll have to change to use array as the storage of Order param.
Would love to hear your thoughts and ideas on it first.

Hey @jiajiawang 👋 !

Hey @rabotyaga, Yes, I'm interested in it.

Great! And thanks!

Not sure how hard it would be, but I'm happy to give a try.
In term of the fix, I assume we'll have to change to use array as the storage of Order param.
Would love to hear your thoughts and ideas on it first.

Yep, I believe we should change the Chewy::Search::Parameters::Order implementation to use Array under the hood.


A Question about the Eexperiment

In section 7.4, why will the baselines like Ray serve will have such a long latency?
Is this mainly because they need to spend a lot of time downloading models remotely? Is this their natural design?
Thanks for your answer.

Thank you for your question!
In our baseline implementation, designed for optimal performance, we calculate the time required to download model checkpoints assuming a dedicated 10Gbps network connection. Consequently, for the OPT-6.7B model, the download time across all experiments mentioned in section 7.4 is approximately 10 seconds.
The primary cause of high latency in baseline systems is attributed to queuing issues that arise when these systems are unable to process incoming requests efficiently.


Flood Fill Algorithm(Graphs)

🚀 Feature
Flood Fill Algorithm is a simple variant of BFS/DFS which is generally used in case of implicit graphs.
Have you read the Contributing Guidelines on Pull Requests?
Yes
Motivation
It is used in some problems of 2-d matrices.
Assignees

C++: @devanshiv123
Python: @sanskarvijpuria
Java: @yashaswibiyahut
C: @YashThakare

Please assign it to me in C++ @Kajol-Kumari @SKAUL05 @siddharth25pandey @iamrajiv

Please assign me this in python.

Please assign it to me in Java @Kajol-Kumari @SKAUL05 @siddharth25pandey @iamrajiv

I would like to work on this issue in C

We are logging the scores for the Contributor's Hack 2020. If you have one or more than one PR merged during the program, make sure to fill this form


Cannot find plugin.xml for plugin 'package'

I follow the instruction in this blog http://blog.nparashuram.com/2015/10/using-cordova-plugins-in-react-native.html and this is the result.
$ node node_modules/react-native-cordova-plugin/cli/cli.js add cordova-plugin-dialog

Adding plugins cordova-plugin-dialog
Initialized Android resources

Users/me/project/node_modules/q/q.js:155
                throw e;
                ^
CordovaError: Cannot find plugin.xml for plugin 'package'. Please try adding it again.
    at new PluginInfo (Users/me/project/node_modules/cordova-lib/node_modules/cordova-common/src/PluginInfo/PluginInfo.js:338:15)
    at PluginInfoProvider.get (Users/me/project/node_modules/cordova-lib/node_modules/cordova-common/src/PluginInfo/PluginInfoProvider.js:35:32)
    at Users/me/project/node_modules/cordova-lib/src/plugman/fetch.js:150:51
    at _fulfilled (Users/me/project/node_modules/cordova-lib/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (Users/me/project/node_modules/cordova-lib/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (Users/me/project/node_modules/cordova-lib/node_modules/q/q.js:749:13)
    at Users/me/project/node_modules/cordova-lib/node_modules/q/q.js:557:44
    at flush (Users/me/project/node_modules/cordova-lib/node_modules/q/q.js:108:17)
    at doNTCallback0 (node.js:417:9)
    at process._tickCallback (node.js:346:13)

Any suggestions!

What command are you trying to run, and what is the plugin you are trying to add ?

this is the command
 node node_modules/react-native-cordova-plugin/cli/cli.js add cordova-plugin-dialog

and I'm trying to add dialog plugin.

Did you mean to install cordova-plugin-dialogs ? Note the plural. The cordova-plugin-dialog seems to be an empty npm package pointing to a repo, with just a README and a package.json.

@OmniaGM Was this resolved ?

@kenchengch @niftylettuce I just published 1.0.0 version of this plugin on npm. I also now have an example app that shows how to use the plugins.
Closing the issue - if you still find this to be an issue, please re-open it.


RequiredIf Client Validation on Form Load

I have 2 fields that on form load automatically trigger the RequiredIf routine I have set up on page load even when I send in a null model.  The problem is that AddressOutsideUS is False by default.  All I really want is if the checkbox is checked, to not require the City and Zip (both which are showing invalid on page load)
Is there a way to keep it from validating until they either go in the field and tab out or type something in?  I tried changing the dependencyTriggers to a few different things, but none seemed to work.  I changed the dependencyTriggers to undefined and it got rid of the error, but also got rid of them when I want them there.
I also tried to manually remove the 'has-error' from my divs just on page load, but that was unsuccessful as well.
public bool AddressOutsideUS { get; set; }

[RequiredIf("AddressOutsideUS == false")]
public string MailingCity { get; set; }

Just to clarify, the validations are working.  When I check the box, the fields are no longer required and the errors go away.  When I uncheck it, they become required and have red around them.  What I would like is to only turn red when you actually type or lose focus inside the box.
Edit: I am also looking to see if there's an easy way to figure out what is triggering the change as well.

Hi,
try to use empty string to initialize triggers, i.e. ea.settings.dependencyTriggers = '';. There is a bug related to undefined reported and solved (but not yet released) here: https://github.com/JaroslawWaliszko/ExpressiveAnnotations/issues/64. Also you can provide desired events names on which you'd like validate dependent fields (custom events are also possible, e.g. see afterpaste event shown in web sample project: https://github.com/JaroslawWaliszko/ExpressiveAnnotations/tree/master/src/ExpressiveAnnotations.MvcWebSample).
Regards

I will try this. I think the specific issue is with another addon that displays the error messages on the validation summary. The addon also formats the errors to work with bootstrap. When the fields are shown, it is running all of the validations against it which include required.
I don't think the issue I'm facing is related to RequiredIf. I'll keep playing with it and see what I can come up with.
Thanks for your response.

That worked for me when I set dependencyTriggers = ''.  I thought when I did that it was going to remove the ability to auto-mark my fields as invalid while typing, pasting, etc, but it seems OK.
Thanks

Good it works for you. Regards.


Proxy doesn't forward OPTIONS requests

I'm trying to get capybara-webkit working with puffing-billy and it works for the most part.
We're using the webkit_billy driver which is the webkit driver with a proxy. We see requests getting proxied into puffing billy for CONNECT, GET, POST, PUT & DELETE, however we never see OPTIONS requests. So far it's been a bit of a challenge to debug the issue, do you have any tips/ideas for how we can get insight into the network requests generated by the webkit_server binary?

@rupurt is there any way you could put together a test case to demonstrate this?

@jferris I'll see if I can put something together for next week.

Closing due to lack of response


fix: create a cluster with multiple master nodes

Signed-off-by: qinyer<EMAIL_ADDRESS>
What type of PR is this?

/kind bug
What this PR does / why we need it:
Which issue(s) this PR fixes:

Fixes #
Special notes for reviewers:

Does this PR introduced a user-facing change?

Additional documentation, usage docs, etc.:

Codecov Report

Merging #499 (1d77e28) into master (64a5e9f) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #499      +/-   ##
==========================================
- Coverage   13.12%   13.11%   -0.01%
==========================================
  Files         121      121
  Lines       18918    18928      +10
==========================================
  Hits         2483     2483
- Misses      16155    16165      +10
  Partials      280      280

Impacted Files
Coverage Δ

pkg/scheme/core/v1/k8s/kubeadm.go
2.62% <0.00%> (-0.05%)
:arrow_down:

/lgtm
/approve


The language expression property array index '0' is out of bounds

Bicep version
0.3.255
Describe the bug
Condition not being evaluated before expanding the resource name with format. It should ideally skip this deployment if I don't supply any values, but it errors with the name because of the null parameter (which will be dynamic when part of the larger deployment file; depending upon deployment environment it may or may not deploy it).
To Reproduce
param publicIpAddress array = []
var shortLocation           = 'asdf'
var shortEnv                = 'qwer'

resource asdf 'Microsoft.Network/publicIPAddresses@2020-11-01' = [for (item, index) in publicIpAddress: if (!(empty(publicIpAddress))) {
  name    : toLower('${shortLocation}-${shortEnv}-${item.name}-pip')
  location: resourceGroup().location
  sku     : {
    name  : 'Basic'
  }
}]

az deployment group create -g asdf --template-file main.bicep
Error
{
    "error": {
        "code": "InvalidTemplate",
        "message": "Deployment template validation failed: 'The template resource '[toLower(format('{0}-{1}-{2}-pip', variables('shortLocation'), variables('shortEnv'), parameters('publicIpAddress')[copyIndex()].name))]' at line '23' and column '5' is not valid: The language expression property array index '0' is out of bounds.. Please see https://aka.ms/arm-template-expressions for usage details.'.",
        "additionalInfo": [
            {
                "type": "TemplateViolation",
                "info": {
                    "lineNumber": 23,
                    "linePosition": 5,
                    "path": "properties.template.resources[0]"
                }
            }
        ]
    }
}

Additional context
Add any other context about the problem here.

I've had to put a condition on the name so it works, but I would still like to know if this is a bug?
resource asdf 'Microsoft.Network/publicIPAddresses@2020-11-01' = [for (item, index) in publicIpAddress: if (!(empty(publicIpAddress))) {
  name    : any(!(empty(publicIpAddress))) ? toLower('${shortLocation}-${shortEnv}-${item.name}-pip') : 'null'
  location: resourceGroup().location
  sku     : {
    name  : 'Basic'
  }
}]

This is a dup of #1754 and we are working on it now. You shouldn't have to add a condition to either the resource body or the name property to get around this. The resource should not be evaluated at all because the array is empty.


Remove hasher pool from ctrie

The reduced memory allocations from using a hasher pool turns out to be
less efficient than just allocating a hasher per operation. On my
machine, this yields about a 14% speedup on Insert, 29% speedup on
Lookup, and 33% speedup on Remove. Also benchmarked sustained inserts.
Addresses #125.
@dustinhiatt-wf @alexandercampbell-wf @rosshendrickson-wf @stevenosborne-wf @tylerrinnan-wf @brianshannan-wf
CC @newhook

+1 Thanks for that!

+1

+1

rosie


Edit a Comment

As a user (all user types)
I want the ability to edit comments I have posted
so that I can correct or update my own posted comments

Assumptions & Scope
What are the assumptions for this story?

All users will have the ability to edit their own comments
Users cannot edit another user's comments
Users cannot edit system generated comments

What is IN scope?

Editing a comment (parent)
Editing a reply to a comment (child)

What is NOT in scope?

Posting a comment, Replying to a comment (covered in separate user stories)
Tagging another user in a comment (covered in separate user story)

Acceptance Criteria
Scenario 1: Ellipsis active for User's own comments

GIVEN I am a user on the Comments tab of a request
WHEN I have posted a comment
THEN the ellipsis on the top right of the comment will be coloured blue and will be active

Scenario 2: Ellipsis options

GIVEN I am a user on the Comments tab of a request
WHEN I click on the ellipsis for my comment
THEN a selection window will appear
AND the options will be 'Edit' and 'Delete'

Scenario 3: Select Edit

GIVEN I have clicked on the ellipsis for my comment
WHEN I click 'Edit'
THEN the selection window will close
AND my comment will turn to an editable text field populated with the existing comment
AND a paper airplane icon and X will be at the end of the field

Scenario 4: Save edited comment

GIVEN I have edited the comment text
WHEN I click the paper airplane icon at the end of the text field
THEN the edited comment will be saved
AND the comment will remain in its original chronological placement
AND the word 'Edited' will appear to the right of the comment time stamp

Scenario 5: Cancel editing comment

GIVEN I have edited the comment text
WHEN I click on the X at the end of the text field
THEN the edited comment will not be saved
AND the original comment text will be restored
AND the comment will remain in its original chronological placement

Dependencies? What is the impact of this dependency? (If so, link dependency in the ticket, make it visible in a team´s backlog)

Requires posting a comment and posting a reply

Validation Rules? (If yes, list here)
Design
@xxx - please link the Design here
Definition of Ready

[ ] Is there a well articulated User Story?
[ ] Is there Acceptance Criteria that covers all scenarios (happy/sad paths)?
[ ] If there is a user interface, is there a design?
[ ] Does the user story need user research/validation?
[ ] Does this User Story needs stakeholder approval?
[ ] Design / Solution accepted by Product Owner
[ ] Is this user story small enough to be completed in a Sprint? Should it be split?
[ ] Are the dependencies known/ understood? (technical, business, regulatory/policy)
[ ] Has the story been estimated?

Definition of Done

[ ] Passes developer unit tests
[ ] Passes peer code review
[ ] If there's a user interface, passes UX assurance
[ ] Passes QA of Acceptance Criteria with verification in Dev and Test
[ ] Confirm Test cases built and succeeding
[ ] No regression test failures
[ ] Test coverage acceptable by Product Owner
[ ] Ticket ready to be merged to master or story branch
[ ] Developer to list Config changes/ Update documents and designs
[ ] Can be demoed in Sprint Review
[ ] Tagged as part of a Release
[ ] Feature flagged if required
[ ] Change Management activities done?

@JHarrietha-AOT, just confirming that to post the comment the icon the user clicks is a paper airplane, correct? cc @m-prodan

@lmullane In the existing designs it is an airplane. This is again something that should change based on the library chosen by the devs

I think it's good to be flexible if we are going with a library just to keep it simple. I'm good with the AC for this story

Thanks, I've updated the AC accordingly.

Functions as expected except Scenario 4 - Currently when a comment is edited, there is no "edited" text that appears indicating that it has been edited. "

@abin-aot @lmullane - The last AC in Scenario 4 is not met. Please determine if it's needed/DOD can be revised or not

@lmullane @mpilchar  - As I mentioned on the first day DEMO - Definition of "Viewed" cannot be easily meet, unless the user interacts with the comment. This was indicated earlier. If we are referring to  MS Teams - that is a Desktop application and only active chat room/chats/IM apps  will only make sense with this feature. Open to discussions

@abin-aot Sorry I missed that. I have revised A/C and moved to closed. cc: @lmullane


scroll columns broken

Scroll-columns demo doesn't have x-scroll working. Also .display container doesn't have x-scroll enabled.

Have you pulled my latest fixes?
.display container shouldn't have scroll enabled - see the scroll-container and scroller pair underneath it

confirmed it works on my latest commit

Which browser are you using?

scroll-container for me has dimensions 400x0
chrome

(on mac)

I get this:

I see this in chrome:

see if you can identify where it's going wrong - almost certainly the sizing code you wrote in ember-grid - the css I've moved to auto sizes everything except body height. I'm using table rendering to get the body filling the space between header and footer

In firefox:

in windows firefox I get a completely empty DOM

does the column scroller appear in the DOM but not on screen?

confirm column scroller is in DOM but has 0 height
In safari looks like chrome

problem might be this: on mac scroll-bar is rendered only "if needed"
y-scrolling is working for me

interesting - you should get a height of the scrollbar - trace into getScrollbarHeight in eg-render/column-scroller/control

firefox issues aren't confined to scroll demo -- all tables look like that. Does firefox work for you?

scrollbar is definitely needed. firefox completely broken for me - html body tag is empty

"scroll-bar is rendered only "if needed" - that's what scroll: auto means. it's deliberate.

what I mean is that on mac scrollbar rendered on top of other content -- and only appears when content is dragged.
Traced in -- your test gives scrollbar height 0

maybe getScrollbarHeight isn't successfully rendering a scrollbar on Mac. Try tracing it and viewing the DOM as it runs

yes ... I think we also need to simulate a drag (if possible?) on a mac

ok ... well since I have a mac in front of me I'll see what I can do

the other issue though is that scrollbar should have 0 height on mac

should only appear if content dragged - so we need to trigger the scroller area accordingly

Try this technique
http://stackoverflow.com/questions/7855590/how-can-i-prevent-scroll-bars-from-being-hidden-for-os-x-trackpad-users-in-webki

ok ... (being called to dinner -- back in 30 min --- will work on this.) Can you check out what is happening in firefox?

not a clue - I don't get anything - just an empty body tag. Looks like ember isn't starting up properly

I'm off to bed - I'll have to leave the Mac rendering issues with you. Probably phones will have same problems

The more serious bug is that the first column doesn't render correctly in overview demo. Only the first 16 rows render.

That's the only bug I can see on Windows apart from the slow re-render.

hmm... I'd like put in an option on scroll --- something like:
scroll-mode=native/always-visible/drag-only

where always-visible is "windows way", and drag-only is "mac way"
Sleep well! -- will post later on

(first column render -- will look at once I complete lazy render merge as is probably related.)

Now will use native scrolling iff detected height of scrollbar is 0. Re-open if you want some other solution....


Filter Database Objects not allowing multiple or negative conditions

I am trying to setup database filtering for one of my MariaDB connections in DBeaver 5.2.3 but it is failing due to syntax errors.
Multiple "Include" filters:
SQL Error [1064] [42000]: (conn:1105793) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '( LIKE 'database1' OR  LIKE 'database2')' at line 1
Query is: show databases( LIKE ? OR  LIKE ?), parameters ['database1','database2']

The query should be:
show databases WHERE (`Database` LIKE 'database1' OR `Database` LIKE 'database2');

Similarly, "Exclude" conditions also have a syntax error.
SQL Error [1064] [42000]: (conn:1105793) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'databasesNOT ( LIKE 'database_prefix%')' at line 1
Query is: show databasesNOT ( LIKE ?), parameters ['database_prefix%']

The query should instead be:
show databases WHERE (`Database` NOT LIKE 'database_prefix%');

Please let me know if I should provide any more information.

Duplicate of #4554

I jest tested f8258307a5916ef3574fe4c6d01752d73224e761 and can confirm it is working.  Thanks!


Don't call the client_cert_cb immediately in TLSv1.3

In TLSv1.2 and below a CertificateRequest is sent after the Certificate from the server. This means that by the time the client_cert_cb is called on receipt of the CertificateRequest a call to SSL_get_peer_certificate() will return the server certificate as expected. In TLSv1.3 a CertificateRequest is sent before a Certificate message so calling SSL_get_peer_certificate() returns NULL.
To workaround this we delay calling the client_cert_cb until after we have processed the CertificateVerify message, when we are doing TLSv1.3.
Fixes #7384

Ping?

Fixup commits pushed addressing style nits.

Ping?


Add sub task system for tasks

Can you elaborate?

Task can have multiple sub task, so a parent_id in task column (nullable).
when retrieving tasks, each task should also be retrieved with child tasks
On Thu, Oct 18, 2018, 1:50 AM Mehedi Hassan<EMAIL_ADDRESS>wrote:

Can you elaborate?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/iluminar/goodwork/issues/195#issuecomment-430764538,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AI_xm5S3oRYlGOnDV1D7irc8wAgV9cL7ks5ul4oPgaJpZM4XV7pY
.


Allow Streams to be instantiated using GD resources

Q
A

Documentation
no

Bugfix
no

BC Break
no

New Feature
yes

RFC
no

QA
no

Description

I've been working on a patch to laminas-barcode, which requires a Stream to be able to be created from a GD resource. However, the patch fails, as Diactoros only allows resource types to be of type stream. So, this patch expands the list of types allowed to instantiate a Stream to include GD types. I'm submitting this after discussing the idea with @weierophinney some time ago. I hope that I understood what he meant.

Ping me for a review when it's ready, @settermjd !
Also, don't forget to use the -s switch to sign-off your commits! There's instructions in the contributors guide on how to use rebase to add them.

Ping me for a review when it's ready, @settermjd !
Also, don't forget to use the -s switch to sign-off your commits! There's instructions in the contributors guide on how to use rebase to add them.

Ready for review. It's not a big patch, and I hope that I understood what you were saying in our previous discussion a little while ago.

The failing integration test seems to come from php-http/psr7-integration-tests... it's doing external calls without retrying on failure, which makes the suite a bit flaky.

Big thanks to everyone for all your support on this PR.


Error:  + aSource + '" is not in the SourceMap.

I'm using gulp-sass and just a "few" other packages. I get this error when trying to use gulp-sourcemaps. I run gulp and my styles task errors out. I tried disabling autoprefixer and that doesn't work. As for the note about prefixer.scss not being in the sourcemap that's odd, because the file is present, I'm just not clear on exactly what's going on and hoping someone can shed some light here for me. As far as I know everything that should be there is there...
Thanks. =)
Error after running gulp:
/Users/Alex/Documents/Websites/somelikeitneat.dev/wp-content/themes/somelikeitneat/node_modules/gulp-minify-css/node_modules/vinyl-sourcemaps-apply/node_modules/source-map/lib/source-map/source-map-consumer.js:415
      throw new Error('"' + aSource + '" is not in the SourceMap.');
            ^
Error: "/bower_components/bourbon/app/assets/stylesheets/addons/_prefixer.scss" is not in the SourceMap.
  at SourceMapConsumer_sourceContentFor [as sourceContentFor] (/Users/Alex/Documents/Websites/somelikeitneat.dev/wp-content/themes/somelikeitneat/node_modules/gulp-minify-css/node_modules/vinyl-sourcemaps-apply/node_modules/source-map/lib/source-map/source-map-consumer.js:415:13)
  at SourceMapGenerator.<anonymous> (/Users/Alex/Documents/Websites/somelikeitneat.dev/wp-content/themes/somelikeitneat/node_modules/gulp-minify-css/node_modules/vinyl-sourcemaps-apply/node_modules/source-map/lib/source-map/source-map-generator.js:233:42)

Packages:
    "browser-sync": "^2.4.0",
    "gulp": "^3.8.11",
    "gulp-autoprefixer": "^2.1.0",
    "gulp-cache": "^0.2.8",
    "gulp-coffee": "^2.3.1",
    "gulp-combine-media-queries": "^0.1.0",
    "gulp-concat": "^2.5.2",
    "gulp-consolidate": "^0.1.2",
    "gulp-filter": "^2.0.2",
    "gulp-ignore": "^1.2.1",
    "gulp-imagemin": "^0.6.2",
    "gulp-jshint": "^1.9.4",
    "gulp-livereload": "^2.1.1",
    "gulp-load-plugins": "^0.6.0",
    "gulp-minify-css": "^0.3.13",
    "gulp-newer": "^0.3.0",
    "gulp-notify": "^2.2.0",
    "gulp-phpcs": "^0.4.0",
    "gulp-plumber": "^0.6.6",
    "gulp-rename": "^1.2.0",
    "gulp-rimraf": "^0.1.0",
    "gulp-ruby-sass": "^1.0.1",
    "gulp-run-sequence": "^0.3.2",
    "gulp-sass": "^1.3.3",
    "gulp-sourcemaps": "^1.5.1",
    "gulp-swig": "^0.7.4",
    "gulp-uglify": "^0.3.2",
    "gulp-util": "^3.0.4",
    "gulp-wp-rev": "0.0.1",
    "gulp-zip": "^2.0.3",
    "swig": "^1.4.2"

Task:
gulp.task('styles', function () {
	return gulp.src([source+'sass/**/*.scss'])
		.pipe(plumber())
		.pipe(sourcemaps.init())
			.pipe(sass({
				// outputStyle: 'compressed',
				outputStyle: 'nested',
				precision: 10
			}))
		.pipe(sourcemaps.write({includeContent: false}))
		.pipe(sourcemaps.init({loadMaps: true}))
		.pipe(autoprefixer('last 2 version', 'safari 5', 'ie 8', 'ie 9', 'opera 12.1', 'ios 6', 'android 4'))
		.pipe(sourcemaps.write('/sourcemaps'))
		.pipe(plumber.stop())
		.pipe(gulp.dest(source+'css'))
		.pipe(filter('**/*.css')) // Filtering stream to only css files
		.pipe(cmq()) // Combines Media Queries
		.pipe(reload({stream:true})) // Inject Styles when style file is created
		.pipe(rename({ suffix: '-min' }))
		.pipe(minifycss({keepBreaks:true}))
		.pipe(minifycss({ keepSpecialComments: 0 }))
		.pipe(gulp.dest(source+'css'))
		.pipe(reload({stream:true})) // Inject Styles when min style file is created
		.pipe(notify({ message: 'Styles task complete', onLast: true }))
});

According to the path
[...]/node_modules/gulp-minify-css/node_modules/vinyl-sourcemaps-apply/node_modules/source-map/lib/source-map/source-map-consumer.js
the error happens in gulp-minify-css.

Thanks for the reply. I saw that, too. I went ahead and updated the package I had and still not working. But it is an issue with gulp-minifycss; I replaced it with gulp-uglifycss and it's working just fine now. I can open an issue with the gulpminify css folk.


Write a AWS Cognito Guide

/kind feature
Describe the solution you'd like
There is not a clear write up on how to configure AWS Cognito for Kfserving. The current
kubeflow e2e does not cover kfserving configuration.
There is a good writeup for GCloud IAP.
That guide could be used as a model for the AWS Cognito. This would go a long way to avoid having people struggle with the setup for kfserving on AWS.
Recent issues on this:
https://github.com/kubeflow/kfserving/issues/1154
https://github.com/kubeflow/website/issues/2378

@seizadi do you have some initial pointers here on how to go about it? If I can manage to get it working for us I would be happy to contribute to a documentation afterwards

If I understood it correctly, all that is needed is to roll out an InferenceService with istio sidecar injection to allow for authorization (https://github.com/kubeflow/kfserving/blob/master/docs/samples/gcp-iap/sklearn-iap-with-authz.yaml) and then start up an additional VirtualService (https://github.com/kubeflow/kfserving/blob/master/docs/samples/gcp-iap/virtual-service.yaml).
We then post requests to the new VirtualService with these cookies:
cookies = {'AWSELBAuthSessionCookie-0': 'xxxxxx'
           'AWSELBAuthSessionCookie-1': 'xxxxxx'
          }

Seems fairly straightforward. Am I missing anything (aside from the fact that this need KF 1.1+)?

You actually need to disable the istio-sidecar, AuthZ does not work, depending on your requirements, you might not be able to use this in production.
Here is some detail notes I wrote to myself when I was debugging this problem:
https://github.com/seizadi/kubeflow-aws-cognito#debug-model

/cc @PatrickXYS

@seizadi Thanks I'll help on this, will collaborate with @yuzisun to make sure we provide well-written documentation for KFServing on AWS Cognito

/assign

@seizadi I've gone through your notes and am trying to replicate your solution.
I am rolling out the following:
apiVersion: "serving.kubeflow.org/v1alpha2"
kind: "InferenceService"
metadata:
  name: "sklearn-iris"
  namespace: karl-schriek
  annotations:
    sidecar.istio.io/inject: "false"
spec:
  default:
    predictor:
      sklearn:
        storageUri: "gs://kfserving-samples/models/sklearn/iris"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: kfserving-iap
  namespace: karl-schriek
spec:
  gateways:
  - kubeflow/kubeflow-gateway
  hosts:
  - '*'
  http:
  - match:
    - uri:
        prefix: /kfserving/karl-schriek/sklearn-iris
    route:
    - destination:
        host: cluster-local-gateway.istio-system.svc.cluster.local
      headers:
        request:
          set:
            Host: sklearn-iris-predictor-default.karl-schriek.svc.cluster.local
      weight: 100
    rewrite:
        uri: /v1/models/sklearn-iris
    timeout: 300s

And am then sending a REST request with:
import json
import requests
import auth

namespace = "karl-schriek"
domain = "dev-kubeflow-120.learn-mlops.com"

# programmatically fetches cookies
cookies = auth.get_auth_cookie(
    host=f"https://www.{domain}",
    from_cache=False,
    return_as_dict=True,
    username="*******"
    password="*******"
)

def infer(inference_url, images_array,  cookies):
    data = json.dumps({"instances": images_array})
    headers = {
        "Content-Type": "application/json",
    }
    response = requests.post(
        inference_url,
        data=data,
        headers=headers,
        cookies=cookies
    )
    response.raise_for_status()
    predictions = response.json()["predictions"]

    results_array = predictions

    return results_array

url = f'https://www.{domain}/kfserving/{namespace}/sklearn-iris:predict'

payload = {
    "instances": [
        [6.8,  2.8,  4.8,  1.4],
        [6.0,  3.4,  4.5,  1.6]
    ]
}

infer(url, payload, cookies)

When I do this I get a 403 error.
Exception has occurred: HTTPError
403 Client Error: Forbidden for url: https://www.dev-kubeflow-120.learn-mlops.com/kfserving/karl-schriek/sklearn-iris:predict

The cookies are correct. Is there something I am missing or that I've configured incorrecty?

I assume you tested the URL I had posted in the README to validate that your URL & cookies are set correctly?
url = 'https://kubeflow.platform.example.com/pipeline/apis/v1beta1/pipelines?page_token=&page_size=10&sort_by=created_at desc&filter='
cookies = {'AWSELBAuthSessionCookie-0': 'xxxxxx'
'AWSELBAuthSessionCookie-1': 'xxxxxx'
}
r = requests.get(url=url, cookies=cookies)
result = r.json()
Assuming your requests are making their way through the ALB you can trace where along the packet path you are getting it rejected. You can reference this guide for the packet path:
https://github.com/kubeflow/kfserving/blob/master/docs/KFSERVING_DEBUG_GUIDE.md#debug-kfserving-request-flow, assuming your rewrite rule is setup properly they should be arriving at the Kfserving Pod in the karl-schriek namespace.
Generally you can use the logs but I did use tcpdump when I was debugging, I don't think you will need it.

Yes I tested against that URL, the cookies are working. I'll follow your suggestion on tracing the packet path tomorrow. Thanks for the suggestion.

Did you roll out KFServing with KF or did you make a standalone rollout?

I wonder if the debug guide https://github.com/kubeflow/kfserving/blob/master/docs/KFSERVING_DEBUG_GUIDE.md#debug-kfserving-request-flow refers to an older version of KF/KFServing
I am on KF 1.2, KFServing 0.4.1
It suggests that running kubectl get gateway knative-ingress-gateway -n knative-serving -oyaml should yield a gateway that looks like this:
kind: Gateway
metadata:
  labels:
    networking.knative.dev/ingress-provider: istio
    serving.knative.dev/release: v0.12.1
  name: knative-ingress-gateway
  namespace: knative-serving
spec:
  selector:
    istio: ingressgateway
  servers:
  - hosts:
    - '*'
    port:
      name: http
      number: 80
      protocol: HTTP
  - hosts:
    - '*'
    port:
      name: https
      number: 443
      protocol: HTTPS
    tls:
      mode: SIMPLE
      privateKey: /etc/istio/ingressgateway-certs/tls.key
      serverCertificate: /etc/istio/ingressgateway-certs/tls.crt

For me this gateway doesn't exist at all (neither when installing KFServing bundled with KF, nor with a standalone KFServing 0.4.1).
The only gateway I have is kubeflow/kubeflow-gateway, which I notice does not allow HTTPS traffic. It only has:
  servers:
  - hosts:
    - '*'
    port:
      name: http
      number: 80
      protocol: HTTP

Could this be why I am getting 403 Client Error: Forbidden? @yuzisun , @PatrickXYS do you have any ideas? I am not entirely certain how to proceed with debugging this

I removed my deploy directory from 1.0.2 and created a new one with 1.1.x
Everything on there Istio and Kfserving were created by Kubeflow deploy. I have found in the past difficult to make Kubeflow work with other pieces that are pre-installed on the cluster, so I have been having kubeflow manage the whole deployment.
About your question about the flow diagram, the Istio Ingress Gateway is part of kubeflow namespace and attached to the AWS ALB. You should also have Istio Local Gateway running in knative-serving:
❯ k get Gateway --all-namespaces
NAMESPACE         NAME                    AGE
knative-serving   cluster-local-gateway   30d
kubeflow          kubeflow-gateway        30d

Yep, those are the gateways I have running. I actually don't really think that the Gateway is the problem, but I need to understand where the rollouts differ. It could be a more fundamental change in KF 1.2 or it could be a configuration problem on my end. Will keep you posted, it would be great if we could create an end-to-end guide here that will be guaranteed to work.

The issue is with Istio 1.3.1, as it is currently not possible to perform Cookie-based auth. This also means that for AWS deployments, KFServing is currently restricted to version 0.3.0.
Once this issue has been resolved I will see about contributing to a how-to guide again!
https://github.com/kubeflow/manifests/issues/1695


okular: Update to version 22.12.3 and fix autoupdate

Closes #XXXX

Relates to #XXXX

[X] I have read the Contributing Guide.

/verify


Add option to skip cleanup in two qubit decomposition

_cleanup_operations seems to take up 30-40% of the time in the conversion to Xmon gates.  However, this does optimizations that are all done by later phases of the Xmon optimizer set.
This changes the default to skip this step and adds an option to allow you to optimize the operation list if you want to anyway.  This should only affect two qubit decomposition and not the full circuit optimization, but this should be verified.

I think the default should be reversed. We actually added this change recently, because it's very surprising when this optimization spits out a glut of single qubit gates. Then you would modify optimized_for_xmon to specify no cleanup.

Default state flipped.  Please take another look.


toolchain: update xtools config

Add placeholders for all possible xtools toolchains.
Fixes #6911
Signed-off-by: Anas Nashif<EMAIL_ADDRESS>

Codecov Report

Merging #7271 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #7271      +/-   ##
==========================================
+ Coverage   55.03%   55.03%   +<.01%
==========================================
  Files         477      477
  Lines       51757    51757
  Branches     9948     9948
==========================================
+ Hits        28485    28486       +1
+ Misses      19309    19308       -1
  Partials     3963     3963

Impacted Files
Coverage Δ

lib/posix/pthread.c
69.84% <0%> (+0.5%)
: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 33d87ef...dd45403. Read the comment docs.


Remove beta/EAP comments

I'm missing the information about API deprecation - see text in ticket ONE-24070.


Fix errors when building with the latest Xcode

Hello,
As I tried to build this project with the default settings on my Mac with the latest version of Xcode (13.3.1), I got errors about unused variables and copy assignment operator needing to be explicit. Here are a excerpt:
../../../source/slang/slang-check-shader.cpp:1183:16: error: variable 'result' set but not used [-Werror,-Wunused-but-set-variable]
        Result result = SLANG_OK;
               ^
In file included from ../../../source/slang/slang-compiler.cpp:13:
In file included from ../../../source/slang/slang-compiler.h:11:
../../../source/slang/../compiler-core/slang-include-system.h:14:5: error: definition of implicit copy assignment operator for 'SearchDirectory' is deprecated because it has a user-declared copy constructor [-Werror,-Wdeprecated-copy]
    SearchDirectory(SearchDirectory const& other) = default;
    ^
../../../source/slang/../core/slang-list.h:242:42: note: in implicit copy assignment operator for 'Slang::SearchDirectory' first required here
                            newBuffer[i] = m_buffer[i];
                                         ^
../../../source/slang/../core/slang-list.h:276:46: note: in instantiation of member function 'Slang::List<Slang::SearchDirectory>::insertRange' requested here
        void addRange(const List<T>& list) { insertRange(m_count, list.m_buffer, list.m_count); }
                                             ^
../../../source/slang/../core/slang-list.h:70:13: note: in instantiation of member function 'Slang::List<Slang::SearchDirectory>::addRange' requested here
            addRange(list);
            ^
../../../source/slang/../core/slang-list.h:48:19: note: in instantiation of member function 'Slang::List<Slang::SearchDirectory>::operator=' requested here
            this->operator=(list);
                  ^
../../../source/slang/../compiler-core/slang-include-system.h:23:8: note: in instantiation of member function 'Slang::List<Slang::SearchDirectory>::List' requested here
struct SearchDirectoryList
       ^

This PR fixes all those errors, though I am not sure about what to do about unused variables. I just went the simplest route, and removed them, but they were probably left for a reason (especially the slang-parser.cpp one).
Another solution would be to use [[maybe_unused]]. It's C++17 but in theory old older compilers that should be simply ignored. Though with your high level of warnings and warnings treated as errors it might cause an error, so a conditional #define might be needed.

This looks good. I think getting rid of the unused local variable assignments is fine. Or alternatively we can use SLANG_UNUSED(x) macro that is originally intended for function parameters.

I rebased and used SLANG_UNUSED on source/slang/slang-parser.cpp to better match comments.


Filtered Config Sets

When I set up a Config Set, I would like to have an attribute that I can match to a client, allowing me to set up specific config sets for particular clients/client types.

I think this would be best done with tags.
Allow a given configuration set a required tag, then allow clients to be set up will the available tags


Automated cherry pick of #1808: scheduler: esxi and zstack hypervisor do cpu and memory filter

Cherry pick of #1808 on release/2.11.0.
#1808: scheduler: esxi and zstack hypervisor do cpu and memory filter

Codecov Report

:exclamation: No coverage uploaded for pull request base (release/2.11.0@e1ccc42). Click here to learn what that means.
The diff coverage is 0%.

@@               Coverage Diff                @@
##             release/2.11.0   #1809   +/-   ##
================================================
  Coverage                  ?   7.59%
================================================
  Files                     ?     412
  Lines                     ?   63447
  Branches                  ?       0
================================================
  Hits                      ?    4820
  Misses                    ?   58216
  Partials                  ?     411

Flag
Coverage Δ

#aFlag
7.59% <0%> (?)

Impacted Files
Coverage Δ

pkg/compute/guestdrivers/esxi.go
5.1% <0%> (ø)

pkg/compute/guestdrivers/zstack.go
7.24% <0%> (ø)

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 e1ccc42...82122a7. Read the comment docs.

/lgtm
/approve


[ttx_diff.py] remove fontmake's --no-production-names flag

After PR #489 got merged, fontc should use the same glyph postscript names as fontmake does, so we no longer need to pass the --no-production-names flag to compare the two sets of fonts

Nice! LGTM (not logged in on phone so I can't give a proper approval)
On Mon, Oct 23, 2023, 7:26 AM Cosimo Lupo @.***> wrote:

After PR #489 https://github.com/googlefonts/fontc/pull/489 got merged,
fontc should use the same glyph postscript names as fontmake does, so we no
longer need to pass the --no-production-names flag to compare the two sets
of fonts
You can view, comment on, or merge this pull request online at:
https://github.com/googlefonts/fontc/pull/498
Commit Summary

3521706
https://github.com/googlefonts/fontc/pull/498/commits/3521706a3ab92b7eba0483e5c1fb44e78790963e
[ttx_diff.py] remove fontmake's --no-production-names flag

File Changes
(1 file https://github.com/googlefonts/fontc/pull/498/files)

M resources/scripts/ttx_diff.py
https://github.com/googlefonts/fontc/pull/498/files#diff-96bbcf64313e4f7e4bbe456e7e2d4fb5fb6c270025709a3bf2140befb84a28ad
(2)

Patch Links:

https://github.com/googlefonts/fontc/pull/498.patch
https://github.com/googlefonts/fontc/pull/498.diff

—
Reply to this email directly, view it on GitHub
https://github.com/googlefonts/fontc/pull/498, or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABRKXADU4WF7KHEPKZNZH5LYAZ5BJAVCNFSM6AAAAAA6MFNYGKVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE2TOMZQGQZDGMI
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

after this, the only remaining flag to help with ttx-diffing is --drop-implied-oncurves (and this is going to stay, as it's unlikely fontmake will change its default setting for backward compat reasons)


git tag without -m would open up the editor in git versions of 2.10.x

Not a blocker but simply appending -m makes the process a lil more cleaner :)

Codecov Report

Merging #352 into master will decrease coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #352      +/-   ##
==========================================
- Coverage    61.6%   61.57%   -0.03%
==========================================
  Files         162      162
  Lines        8805     8805
==========================================
- Hits         5424     5422       -2
- Misses       2945     2947       +2
  Partials      436      436

Impacted Files
Coverage Δ

lib/auto_resolver.go
88.05% <0%> (-1.5%)
:arrow_down:

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 9992a60...19b8abc. Read the comment docs.


doc: Fix documentation of EVP_EncryptUpdate().

The documentation was off by one for the length this function could return.
The wrap functions could exceed the limit by one.

[x] documentation is added or updated

Do you think it's useful to have the documentation say it's different for wrap ciphers?

Do you think it's useful to have the documentation say it's different for wrap ciphers?

Yeah, unless we can come up with some plausible case for other ciphers where it would happen as well?
Because otherwise we are basically making most existing uses of EVP_EncryptUpdate non-conforming to the documentation. Which is kind-of API break. Inevitable for wrap ciphers, yes, but not for the others.

I guess the other exception is the stream ciphers.
Maybe it's also useful to document if you pass it a multiple of
the block size, you get exactly that amount back.

I guess the other exception is the stream ciphers. Maybe it's also useful to document if you pass it a multiple of the block size, you get exactly that amount back.

Is this true for the wrap ciphers??  The memmove(out + 8, in, inlen) in CRYPTO_128_wrap() seems to indicate otherwise.

I think Kurt meant regular block cipher modes.
So I believe we should document all the possible cases if we really want to make the documentation truly helpful and the API contract reasonable. It would be pretty bad if we required for all EVP_EncryptUpdate() calls to reserve inlen rounded up to blocksize + blocksize. Even if the underlying cipher mode is stream one and the extra blocksize is needed only for the wrap modes.

I've added statements for most ciphers, wrapping and stream ciphers.
Ideally, we should document the behaviour for each cipher mode individually.

Merged to 1.1.1 and master.  Thanks for the feedback and suggestions.


Invalid password/token for user

hello,I am a Java development engineer in China. Our project integrates this Jenkins API  and apply for a long time. We are using version 0.3.6.
Here is the error log when  call jenkins  API  and it  frequently appear :
org.apache.http.client.HttpResponseException: Invalid password/token for user: evvuseusre
    at com.offbytwo.jenkins.client.validator.HttpResponseValidator.validateResponse(HttpResponseValidator.java:11)
    at com.offbytwo.jenkins.client.JenkinsHttpClient.get(JenkinsHttpClient.java:149)
    at com.offbytwo.jenkins.model.Job.details(Job.java:45)

Coutld you help me find the cause of the problem？My password is right.
From the point of phenomenon, concurrent calling Jenkins api may be the reason, but I'm not sure.
Some suggestions?

error log sometime like this:
org.apache.http.client.HttpResponseException: Forbidden
    at com.offbytwo.jenkins.client.validator.HttpResponseValidator.validateResponse(HttpResponseValidator.java:11)
    at com.offbytwo.jenkins.client.JenkinsHttpClient.get(JenkinsHttpClient.java:149)
    at com.offbytwo.jenkins.JenkinsServer.getJob(JenkinsServer.java:275)
    at com.offbytwo.jenkins.JenkinsServer.getJob(JenkinsServer.java:260)

First it would be helpful having some code examples which cause those things...Furthermore please take a look update to 0.3.7...

ok,This is my test code（url password username jobname are replaced ）：
@Test
public void testCurrent() {
	try {
		final JenkinsServer jenkins = new JenkinsServer(new URI("url"), "user", "paswrd");

		final CountDownLatch latch = new CountDownLatch(2);

		Thread th1 = new Thread(new Runnable() {
			@Override
			public void run() {
				try {

					Job job1 = getJob(jenkins, "joburl1");

					System.out.println("job2 build success");
				} catch (IOException e) {
					e.printStackTrace();
				}
				latch.countDown();
			}
		});

		Thread th2= new Thread(new Runnable() {
			@Override
			public void run() {
				try {

					Job job2 = getJob(jenkins, "joburl2");

					System.out.println("job2 build success");
				} catch (IOException e) {
					e.printStackTrace();
				}

				latch.countDown();

			}
		});

		th1.start();
		th2.start();

		System.out.println("main start success");

		latch.await();

		System.out.println("main end");

	} catch (Exception e) {
		e.printStackTrace();
	}

}

private Job getJob(JenkinsServer jenkins, String str) throws IOException {
	return jenkins.getJob(str);
}

two thread call getJob() at the same time, error log will appear like
org.apache.http.client.HttpResponseException: Malformed HTTP basic Authorization header
at com.offbytwo.jenkins.client.validator.HttpResponseValidator.validateResponse(HttpResponseValidator.java:11)
at com.offbytwo.jenkins.client.JenkinsHttpClient.get(JenkinsHttpClient.java:149)
at com.offbytwo.jenkins.JenkinsServer.getJob(JenkinsServer.java:275)
at com.offbytwo.jenkins.JenkinsServer.getJob(JenkinsServer.java:260)

and I try to synchronize api call,like this and it works.
private synchronized Job getJob(JenkinsServer jenkins, String str) throws IOException {
return jenkins.getJob(str);
}
error log disappear.
so jenkins api dosen't support concurrent calling, how fix it ？if we call jenkins api in different jvm or process, concurrent calling is inevitable.

not only jenkins.getJob(String str) dosen't support councurrent calling, but also job.build(params) 、 job.details() ..  behave like the same —— error log appear.

So to understand that correctly the errors you have described at the beginning of the ticket are related to concurrent calling? So this would mean in the first step no problem exist...cause I didn't expect that java-client-api is thread safe...
I would have been surprised if it had been...I didn't expected it...
So on the other hand is that we could take a deeper look into the root causes of the problems that might go into the correct direction that it will become thread safe...

@khmarbaise has this problem been solved？  i had same problem，What should I do?

@wukq  the network call between jenkin-api and jenkenServer should be serialized， specifically you need lock or  synchronized your method； solution can be deduced when you try above-mentioned code。  futhermore, if your jenkin-api running in a  distributed environment，  distributed lock (such as zookeeper)  need to be considered
these are my solutions and you can have a try


Convert to atom-transpile plugin

Reap the benefits of atom-transpile:

Standardised ways of transpiling in Atom
Contextually relevant menu items
Less cluttered menus
Easy plugin maintenance

For [atom-transpile] plugins to work properly

Some info on renaming a package (to atom-transpile-cson) without breaking anything can be found here and here.


EmrEtlRunner: add DynamoDB auto-scale mechanism

Idea is to upscale event manifest table some time (10 minutes minimum) before starting shred job and downscale immediately afterwards.
Technically, DynamoDB since recently has their own auto-scaling, but it's very unresponsive and intended for different kind of loads - while we have just two modes (full load and zero load) people usually have much more smooth load profile. It means that:

Quite often we have table upscaled to maximum for 90% of day, while proper value should be 10-15%. This adds huge costs.
We need to maintain "safe" lower bound 100% of time, while can have 0 throughput when pipeline is not running.
DynamoDB can fail to upscale quick enough when load started
Maximum value is pre-defined and need to be bumped manually for catch-up jobs, while could be derived from EMR cluster configuration.

My proposal is to add following to EmrEtlRunner:

Add aws.dynamodb.autoscale boolean setting to config.yml
Calculate throughput based on EMR cluster size (very roughly, each "small" instance adds 800 units)
Wait until Enrich job started
Send UpdateTable with calculated throughput

Problems:

It should not be used for pipelines with more than 4 runs per day - DynamoDB table cannot scale more
Table can remain with high throughput in some failure-scenarios (still works better than native autoscaling)
Mixes-in some DevOps magic into conifg. Still EMR settings is same DevOps' responsibility.

This can implemented as:

EMR Custom Jar, blocking on UpdateTable. Adds some idle to EMR cluster, ~5-8 minutes, but very safe in terms on unexpected peaks.
API call from EmrEtlRunner. Here we cannot predict good timings for update. It will always have a lot of idle, or risk of another throughput exception.

I like option 1 as migratability to Dataflow Runner is a must...

Some real-world examples to calculate throughput.

m3.xlarge master and 2x m3.xlarge - up to 1.100 writes
m4.xlarge master and 6x c4.8xlarge - up to 20.000 writes

I like the idea but I don't this is urgent.

Awesome. Closing.


Denote availability of ASR for managed disk

"Protect machines using managed disks between Azure regions using Azure Site Recovery"
https://azure.microsoft.com/en-us/blog/asr-managed-disks-between-azure-regions/

Hi @cynthn, Would you review the proposed changes? Thanks.

#sign-off


Add Surefire and Failsafe Plugins to Pom

Fixes #16  (it's a good idea to open an issue first for context and/or discussion)
This change explicitly adds required testing plugins and ensures that they are also available in an offline testing mode, by specifying the explicit runtime dependency that the failsafe plugin has on the surefire plugin.

Thanks for this. Let's upstream this into the shared-config project so we don't need to duplicate this across all our split repos.

This should be resolved by #22 (we upstreamed the config and should fix all similar clients)


get Currency Symbol

Is it possible to get the currency symbol alone for a money object?
Actually I'm using this:
function getCurrencySymbol($locale, $currency)
    {
        // Create a NumberFormatter
        $formatter = new \NumberFormatter($locale, \NumberFormatter::CURRENCY);

        // Prevent any extra spaces, etc. in formatted currency
        $formatter->setPattern('¤');

        // Prevent significant digits (e.g. cents) in formatted currency
        $formatter->setAttribute(\NumberFormatter::MAX_SIGNIFICANT_DIGITS, 0);

        // Get the formatted price for '0'
        $formattedPrice = $formatter->formatCurrency(0, $currency);

        // Strip out the zero digit to get the currency symbol
        $zero = $formatter->getSymbol(\NumberFormatter::ZERO_DIGIT_SYMBOL);
        $currencySymbol = str_replace($zero, '', $formattedPrice);

        return $currencySymbol;
    }

I am sorry, but this has been discussed numerous times and the answer is no. This is a value object and as such, represents a value. If you need such data create some kind of provider which can tell this to you based on the currency object.

Ok, understood. Anyway, despite the "value object" approach, the "Currency" class could have a "getSymbol" as it have a "getCode". I read the approach you are giving to the library, the final class implementation, etc..
Probably I will implement a more versatile formatter to reach my goals.

Anyway, despite the "value object" approach, the "Currency" class could have a "getSymbol" as it have a "getCode".

It has getCode because code is it's value, but currency is not.

Probably I will implement a more versatile formatter to reach my goals.

If you come up with something that you think would be valuable for the community, share with us and we will see if we can include it in this library.

Actually my solutions are mostly specific formatters and parsers.
What I don't like is the need of those dependencies over my code. I mean, I wrote lot of lines creating different formatters-parsers instances all over the code for just this library.
I tried with composite, creating some kind of adapter for money, but there is a lot of duplicated code, and workarounds for __call, that seems like patches to me. :( (since the final don't allow to extend.
I also tried creating an utility class with static methods, wich perform all the parsers-formatters instantiation etc..
I like the http://carbon.nesbot.com/docs/ approach. Where the "entity" performs all the translations, formats, etc by itself.
well, I guess I'll make up with it after a while :)

I like the http://carbon.nesbot.com/docs/ approach. Where the "entity" performs all the translations, formats, etc by itself.

Except this is not an "entity", but a value object. :smile: Also, it is possibly a huge break of SRP.
Anyway, usually the functional approach is correct, even if it means you need to write formatters/parsers. That might be dependency on this library, but it won't work without them in case of VOs. This is probably a downside, but enforces better design which is a win IMO.

 I don't like it but, it's functional for the moment.
class MoneyUtilities
{
    public static function extractPercentage(Money $money, $percentage)
    {
        $result = clone $money;
        $percentage = $result->divide(100 + $percentage)->multiply($percentage);
        $subtotal = $money->subtract($percentage);

        return [
            'percentage' => $percentage,
            'subtotal'   => $subtotal,
        ];
    }

    public static function getSymbol(Money $money)
    {
        return (new SymbolMoneyFormatter())->format($money);
    }

    public static function getConvertedAmount(Money $money, $intl = true)
    {
        return (new AmountMoneyFormatter())->format($money, $intl);
    }

    public static function toString(Money $money)
    {
        return (new IsoMoneyFormatter())->format($money);
    }

    public static function parseString($money, $forceCurrency = null)
    {
        return (new StringMoneyParser())->parse($money, $forceCurrency);
    }
}

@Surt this is THE solution, the static proxy is just sauce.

You guys need to get a grip -- this is PHP not Java.
I have to import 5 different classes just to do something basic with your library.
Whatever you call this style, it goes against PHP community standards.

@sagikazarmark What about adding symbolFor method (like subunitFor) in Currencies interface?

It would be nice to have a "reliable" way to converts a money amount into an array (or object, ?) to retrieve splitted data (positive or negative, the unsigned part, the decimal part, the symbol, the thousand separator, the decimal separator and the mask).
This is usefull if you needs to display the amount in a "fancy" way. (thought it may be out of the scope of this library ?)

@sagikazarmark Symbol is needed to pass it to NumberFormatter because:

Not all common symbols are supported by intl extension.
You cannot set fraction digits until the formatter does not know currency symbol.


swap config to Injector to make sure all hooks etc are run properly

Hi @xini
Thanks for the PR.  Could I just check what issue this is solving compared to using the existing methods to set the backend provided in the Requirements class itself?   Have you seen some specific problems with the current implementation?
Cheers,
Tim

Hi Tim,
I found in the past that when not using Injector to replace classes, some things just don't get loaded in properly.
In this particular case, I have another module, https://github.com/xini/silverstripe-prefix-requirements, that replaces the ResourceURLGenerator and uses Requirements::backend()->getAssetHandler(); to access the generated assets. With your config, the asset handler is always null, when using Injector it's there as expected. I haven't investigated why exactly your version fails.
Cheers,
Flo

I'm inclined to agree with both using the Injector and moving the config to yaml.
Moving to yaml makes it a lot easier for people to override your configuration (e.g. if they subclass this backend to add their own enhancements on top), and using the injector ensures that the backend is only ever set the one time - as well as being the generally accepted way of replacing some class with an enhanced subclass.

OK... I've been doing a bit of digging around this issue.   The requirements system is supposed to be 'pluggable' so that you can swap the backend without having to resort to the overhead / trouble of using injector.
That said, using the "proper" method does seem to cause weird things to happen.. I've found other instances of methods not quite doing what is expected.   So with that in mind, I think the best course for now will be to merge the PR, and tag a new release on a major version number.    I'll do that in the next few days and update here.

@DorsetDigital any updates on this? Cheers

All done and tagged at v1.1.0
Apologies for the delay!

Great, thanks so much!


Configurable polling intervals

Maybe I'm missing it in the docs, but it would be nice to have a way to configure (in the config.json file) the interval at which the polling happens on a per-tile basis.
I've managed to slow the rate for HTTP-STATUS tiles by setting MO_UPSTREAMCACHEEXPIRATION to something higher.
But, for PORT tiles, I can't seem to find a way to slow the polling interval.

Hello,
When i try this, everything looks good. I see "Last-Modified" Header correctly.
curl localhost:8080/api/v1/port\?hostname\=localhost\&port\=7777 -i
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json; charset=UTF-8
Vary: Origin
Date: Mon, 09 Mar 2020 17:06:47 GMT
Content-Length: 60

{"type":"PORT","status":"SUCCESS","label":"localhost:7777"}

curl localhost:8080/api/v1/port\?hostname\=localhost\&port\=7777 -i
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json; charset=UTF-8
**Last-Modified: Mon, 09 Mar 2020 18:06:47 CET**
Vary: Origin
Date: Mon, 09 Mar 2020 17:06:50 GMT
Content-Length: 60

{"type":"PORT","status":"SUCCESS","label":"localhost:7777"}

Between my 2 curl commands, i shutdown my other server running on 7777
Can you try something like this ?

I'm not really following what you're saying.
The goal here is that I can configure how often monitoror sends requests to the external resource defined in the tile (regardless of the tile type). What's the significance of the Last-Modified header in that context?

Sorry if I made an incomprehensible shortcut 😓
To avoid bursting services, monitor has a cache that responds instead of making the request.
This is useful if you have several ui displayed for the same server.
We your request hit the cache, monitoror add Last-Modified and return the cache instead of querying the service.
Actually, PORT tile work like every other tiles. For a given config it stores the answer of the 1st call for X seconds (defined by MO_UPSTREAMCACHEEXPIRATION)
When i try multiple call of "port" api, after the first request, i hit the cache and if i stop the target service, cache continue to respond
Can you give me some details for your issue? How do you see the service burst? Can i see you config.json?


Sets the svc resolution as it is needed in later processing

For stateful services, we rely on the svc.Resolution to add
entries to the route domain in the form of *.svc when needed.
Fixes pull request #16845
Please provide a description for what this PR is for.
And to help us figure out who should review this PR, please
put an X in all the areas that this PR affects.
[ ] Configuration Infrastructure
[ ] Docs
[ ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure

@rshriram: once the present PR merges, I will cherry-pick it on top of release-1.3 in a new PR and assign it to you.

In response to this:

/cherrypick release-1.3

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

/cherrypick release-1.3

@mbanikazemi: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

e2e-simpleTests-distroless-master
91342579a664748a27786c64dd6930b4a84d0fd2
link
/test e2e-simpleTests-distroless-master

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@mbanikazemi: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

e2e-simpleTests-distroless-master
91342579a664748a27786c64dd6930b4a84d0fd2
link
/test e2e-simpleTests-distroless-master

istio-lint-master
91342579a664748a27786c64dd6930b4a84d0fd2
link
/test istio-lint-master

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@mbanikazemi: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

istio-lint-master
91342579a664748a27786c64dd6930b4a84d0fd2
link
/test istio-lint-master

istio-unit-tests-master
396ac30ba5508614d38a0fccd8a840642696fa35
link
/test istio-unit-tests-master

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@mbanikazemi: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

istio-unit-tests-master
396ac30ba5508614d38a0fccd8a840642696fa35
link
/test istio-unit-tests-master

istio-racetest-master
396ac30ba5508614d38a0fccd8a840642696fa35
link
/test istio-racetest-master

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@mbanikazemi: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

istio-unit-tests-master
396ac30ba5508614d38a0fccd8a840642696fa35
link
/test istio-unit-tests-master

istio-racetest-master
396ac30ba5508614d38a0fccd8a840642696fa35
link
/test istio-racetest-master

istio-codecov-master
396ac30ba5508614d38a0fccd8a840642696fa35
link
/test istio-codecov-master

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@mbanikazemi: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

istio-unit-tests-master
396ac30ba5508614d38a0fccd8a840642696fa35
link
/test istio-unit-tests-master

istio-racetest-master
396ac30ba5508614d38a0fccd8a840642696fa35
link
/test istio-racetest-master

istio-codecov-master
396ac30ba5508614d38a0fccd8a840642696fa35
link
/test istio-codecov-master

integ-mixer-k8s-presubmit-tests-master
396ac30ba5508614d38a0fccd8a840642696fa35
link
/test integ-mixer-k8s-presubmit-tests-master

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@mbanikazemi: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

istio-unit-tests-master
396ac30ba5508614d38a0fccd8a840642696fa35
link
/test istio-unit-tests-master

istio-racetest-master
396ac30ba5508614d38a0fccd8a840642696fa35
link
/test istio-racetest-master

istio-codecov-master
396ac30ba5508614d38a0fccd8a840642696fa35
link
/test istio-codecov-master

integ-mixer-k8s-presubmit-tests-master
396ac30ba5508614d38a0fccd8a840642696fa35
link
/test integ-mixer-k8s-presubmit-tests-master

istio-lint-master
5cb7ff2fcd03b1fb278915e596dd92aa72dbcea2
link
/test istio-lint-master

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@rshriram: new pull request created: #16907

In response to this:

/cherrypick release-1.3

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.


Switch Apache CI to Java 17

Currently, Apache CI is using Java 11. Switch it to use Java 17.

This will be fixed as part of the move to Ubuntu CI image https://github.com/apache/incubator-kie-kogito-pipelines/pull/1125

Done.


[C++][Parquet] Implement specification-compliant floating point comparison

Currently, the floating point comparison order defined by parquet-format is ambigous and different implementations use different orderings. Once the specification is made unambigous (PARQUET-1222), implementations should be updated to conform to it.
Reporter: Zoltan Ivanfi / @zivanfi
Related issues:

Specify a well-defined sorting order for float and double types (is blocked by)

Note: This issue was originally created as PARQUET-1224. Please see the migration documentation for further details.

Gang Wu / @wgtmac:
This is fixed in [PARQUET-1766: [C++] Handle parquet::Statistics NaNs and -0.0f as per upstream parquet-mr by fsaintjacques · Pull Request #6167 · apache/arrow (github.com)|https://github.com/apache/arrow/pull/6167]


Bug: args.schema.getRootType is not a function after running The Graph Client DevTools

I'm trying to use the simplest setup of Graph Client to just query my local Graph Node. When I runpnpm graphclient serve-dev and run any query in the exposed GraphiQL interface, I receive the following error:
{
  "errors": [
    {
      "message": "args.schema.getRootType is not a function"
    }
  ]
}

Steps to reproduce
You need to have docker installed and running

Clone this repo and checkout this commit: https://github.com/schmidsi/hackathon-starterkit/commit/36017cb4e95c117caedc61966c53425aa0c8364c
Run the quick start instructions: pnpm install, pnpm dev, pnpm quickstart
Go into frontend folder: cd frontend
Build the Graph Client: pnpm graphclient build
Serve the debug server: pnpm graphclient serve-dev
Go to http://localhost:4000/graphql?query=query+MyQuery+{
++approvals+{
++++id
++}
} and run the query

Not sure if related but if I try to query through Graph Client I see the following warning in the browser:
../node_modules/.pnpm/@graphql-mesh+utils<EMAIL_ADDRESS>Critical dependency: the request of a dependency is an expression hot-dev-client.js:85:24
../node_modules/.pnpm/@graphql-tools+url-loader<EMAIL_ADDRESS>Critical dependency: the request of a dependency is an expression

Ok, I stripped down the repo to frontend only and pointed to an online subgraph. Here is the CodeSandbox link: https://codesandbox.io/p/github/schmidsi/graph-client-bug-/draft/recursing-scooby?file=%2FREADME.md&workspace=%257B%2522activeFileId%2522%253A%2522cl9ihdaxt0002lqhd8svv4adc%2522%252C%2522openFiles%2522%253A%255B%2522%252FREADME.md%2522%255D%252C%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522gitSidebarPanel%2522%253A%2522COMMIT%2522%252C%2522sidekickItems%2522%253A%255B%257B%2522type%2522%253A%2522TERMINAL%2522%252C%2522shellId%2522%253A%2522cl9ihe1wd000tlqhdhdb5chmu%2522%252C%2522key%2522%253A%2522cl9ihe1t100dc3b5xcem5tt82%2522%252C%2522isMinimized%2522%253Afalse%257D%252C%257B%2522type%2522%253A%2522SETUP_SHELL_LOG%2522%252C%2522shellId%2522%253A%2522cl9ihdb39000ilqhd6pbfbagx%2522%252C%2522isMinimized%2522%253Atrue%252C%2522key%2522%253A%2522cl9ihdb39000ilqhd6pbfbagx%2522%257D%252C%257B%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522dev%2522%252C%2522key%2522%253A%2522cl9ihdlqe006q3b5xx5eobqo8%2522%252C%2522isMinimized%2522%253Afalse%257D%255D%257D

Or here as the standalone repo: https://github.com/schmidsi/graph-client-bug-
You can go in there, install dependencies and then run the dev server:
pnpm install
pnpm graphclient build
pnpm graphclient serve-dev

And run an arbitrary query in the dev GraphiQL like:
query MyQuery {
  traits {
    name
    numberOfNfts
  }
}

To reproduce. Happend to me on CodeSandbox and isolated env on my machine.

Interesting, updating to "graphql": "^16.6.0", did the trick. Thanks for the help!


Custom dockerfiles

This PR adds support for custom dockerfiles: If a Dockerfile is present at the root of the project, then it will be used -- otherwise we keep the existing setup based on ocaml/opam.
This would allow to run benchmarks on ocaml multicore https://github.com/ocurrent/current-bench/issues/105 and to install a different set of dependencies https://github.com/ocurrent/current-bench/issues/11

Thanks for the PR @art-w! Can we also add to the documentation that the users can have custom Dockerfiles now (Along with an example of what the dockerfile should look like). Thank you!


Unable to pickle: "TypeError: can't pickle _thread.lock objects"

When I run this basic example from the tutorials:
import gpflow
import numpy as np
from matplotlib import pyplot as plt
plt.style.use('ggplot')
import pickle as pickle

N = 12
X = np.random.rand(N,1)
Y = np.sin(12*X) + 0.66*np.cos(25*X) + np.random.randn(N,1)*0.1 + 3
plt.plot(X, Y, 'kx', mew=2)

k = gpflow.kernels.Matern52(1, lengthscales=0.3)
m = gpflow.models.GPR(X, Y, kern=k)
m.likelihood.variance = 0.01
m.as_pandas_table()

m.compile()
opt = gpflow.train.ScipyOptimizer()
opt.minimize(m)

filename = ('models/gp_tf.pkl')
with open(filename, 'w') as f:
    pickle.dump(m, f)

I get the following error:
  File "/Users/pwd/example.py", line 33, in <module>
    pickle.dump(m, f)

TypeError: can't pickle _thread.lock objects

@awav is working on a new model storing system, I believe. This should be fixed soon. My preferred way to store a model is to do model.read_values() and then store this dict in a pickle. This can be restored in a model using model.assign().


Will you release that also with German language ?

Will you release that also with German language ?

Can you add X language?
Each new language requires us to generate a copy of all of the current files, which is prohibitively expensive (we still dont 1 copy of everything in English). We'd also need new voice models for each language. Elevenlabs TTS currently only supports English but is planning other language support in the future.
Based on that, the answer is probably not anytime soon. I'm planning on reaching out to Elevenlabs to see if we can get some special pricing so there is some potential in the future.


botocore.exceptions.CredentialRetrievalError raised when opening many files in parallel from S3

Problem description
Be sure your description clearly answers the following questions:

What are you trying to achieve?
I'm trying to read several files in parallel using multiprocessing from S3. I'm using a single c5.24xlarge or m5a.24xlarge EC2 instance which is running a single container. Note that each process is reading a different file.

What is the expected result?
The opens should be successful. smart_open should be smarter at supporting parallelism.

What are you seeing instead?
The following exception is raised:

botocore.exceptions.CredentialRetrievalError: Error when retrieving credentials from container-role: Error retrieving metadata: Received non 200 response (429) from ECS metadata: You have reached maximum request limit.

Note that setting the environment variable ECS_TASK_METADATA_RPS_LIMIT="8000,9000" didn't help at all.
What helped is a retry after catching the exception and sleeping time.sleep(random.random()), but there has got to be a cleaner way.
Steps/code to reproduce the problem
This line of code when run at about the same time from 168 simultaneous processes in a docker container raises the aforementioned exception:

with smart_open.open(input_s3_object_uri, "rb") as input_file:

Versions
Please provide the output of:
import platform, sys, smart_open
print(platform.platform())
print("Python", sys.version)
print("smart_open", smart_open.__version__)

>>> import platform, sys, smart_open
>>> print(platform.platform())
Linux-4.19.76-linuxkit-x86_64-with-glibc2.10
>>> print("Python", sys.version)
Python 3.8.3 (default, May 19 2020, 18:47:26)
[GCC 7.3.0]
>>> print("smart_open", smart_open.__version__)
smart_open 2.0.0

Checklist
Before you create the issue, please make sure you have:

[x] Described the problem clearly
[x] Provided a minimal reproducible example, including any required data
[x] Provided the version numbers of the relevant software

Thank you for reporting this.
Can you show the full stack trace?

@mpenkov Here is my log which also prints the traceback. My code is in /appdir/ and it otherwise works fine.
0:06:33 ERROR c26m01 1:__main__:91:main: Error when retrieving credentials from container-role: Error retrieving metadata: Received non 200 response (429) from ECS metadata: You have reached maximum request limit.
concurrent.futures.process._RemoteTraceback:
""""""""
concurrent.futures.process._RemoteTraceback:
""""""""
Traceback (most recent call last):
"  File ""/opt/conda/envs/condaenv/lib/python3.8/site-packages/botocore/credentials.py"", line 1855, in fetch_creds"
    response = self._fetcher.retrieve_full_uri(
"  File ""/opt/conda/envs/condaenv/lib/python3.8/site-packages/botocore/utils.py"", line 1608, in retrieve_full_uri"
"    return self._retrieve_credentials(full_url, headers)"
"  File ""/opt/conda/envs/condaenv/lib/python3.8/site-packages/botocore/utils.py"", line 1644, in _retrieve_credentials"
    return self._get_response(
"  File ""/opt/conda/envs/condaenv/lib/python3.8/site-packages/botocore/utils.py"", line 1661, in _get_response"
    raise MetadataRetrievalError(
botocore.exceptions.MetadataRetrievalError: Error retrieving metadata: Received non 200 response (429) from ECS metadata: You have reached maximum request limit.
"During handling of the above exception, another exception occurred:"
Traceback (most recent call last):
"  File ""/opt/conda/envs/condaenv/lib/python3.8/concurrent/futures/process.py"", line 239, in _process_worker"
"    r = call_item.fn(*call_item.args, **call_item.kwargs)"
"  File ""/opt/conda/envs/condaenv/lib/python3.8/concurrent/futures/process.py"", line 198, in _process_chunk"
    return [fn(*args) for args in chunk]
"  File ""/opt/conda/envs/condaenv/lib/python3.8/concurrent/futures/process.py"", line 198, in <listcomp>"
    return [fn(*args) for args in chunk]
"  File ""/appdir/ingest/task/derive_parquet.py"", line 239, in read_df"
    raise exception
"  File ""/appdir/ingest/task/derive_parquet.py"", line 235, in read_df"
"    with smart_open.open(input_file_uri, ""rb"") as input_file:"
"  File ""/opt/conda/envs/condaenv/lib/python3.8/site-packages/smart_open/smart_open_lib.py"", line 224, in open"
"    binary = _open_binary_stream(uri, binary_mode, transport_params)"
"  File ""/opt/conda/envs/condaenv/lib/python3.8/site-packages/smart_open/smart_open_lib.py"", line 399, in _open_binary_stream"
"    fobj = submodule.open_uri(uri, mode, transport_params)"
"  File ""/opt/conda/envs/condaenv/lib/python3.8/site-packages/smart_open/s3.py"", line 165, in open_uri"
"    return open(parsed_uri['bucket_id'], parsed_uri['key_id'], mode, **kwargs)"
"  File ""/opt/conda/envs/condaenv/lib/python3.8/site-packages/smart_open/s3.py"", line 229, in open"
    fileobj = Reader(
"  File ""/opt/conda/envs/condaenv/lib/python3.8/site-packages/smart_open/s3.py"", line 371, in __init__"
"    s3 = session.resource('s3', **resource_kwargs)"
"  File ""/opt/conda/envs/condaenv/lib/python3.8/site-packages/boto3/session.py"", line 384, in resource"
    client = self.client(
"  File ""/opt/conda/envs/condaenv/lib/python3.8/site-packages/boto3/session.py"", line 258, in client"
    return self._session.create_client(
"  File ""/opt/conda/envs/condaenv/lib/python3.8/site-packages/botocore/session.py"", line 823, in create_client"
    credentials = self.get_credentials()
"  File ""/opt/conda/envs/condaenv/lib/python3.8/site-packages/botocore/session.py"", line 427, in get_credentials"
    self._credentials = self._components.get_component(
"  File ""/opt/conda/envs/condaenv/lib/python3.8/site-packages/botocore/credentials.py"", line 1962, in load_credentials"
    creds = provider.load()
"  File ""/opt/conda/envs/condaenv/lib/python3.8/site-packages/botocore/credentials.py"", line 1825, in load"
    return self._retrieve_or_fail()
"  File ""/opt/conda/envs/condaenv/lib/python3.8/site-packages/botocore/credentials.py"", line 1834, in _retrieve_or_fail"
    creds = fetcher()
"  File ""/opt/conda/envs/condaenv/lib/python3.8/site-packages/botocore/credentials.py"", line 1860, in fetch_creds"
"    raise CredentialRetrievalError(provider=self.METHOD,"
botocore.exceptions.CredentialRetrievalError: Error when retrieving credentials from container-role: Error retrieving metadata: Received non 200 response (429) from ECS metadata: You have reached maximum request limit.
""""""""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
"  File ""/opt/conda/envs/condaenv/lib/python3.8/concurrent/futures/process.py"", line 239, in _process_worker"
"    r = call_item.fn(*call_item.args, **call_item.kwargs)"
"  File ""/opt/conda/envs/condaenv/lib/python3.8/concurrent/futures/process.py"", line 198, in _process_chunk"
    return [fn(*args) for args in chunk]
"  File ""/opt/conda/envs/condaenv/lib/python3.8/concurrent/futures/process.py"", line 198, in <listcomp>"
    return [fn(*args) for args in chunk]
"  File ""/appdir/ingest/task/derive_parquet.py"", line 283, in write_df"
"    df = pd.concat(pool.map(self.read_df, self.site_ids, itertools.repeat(table_name)))"
"  File ""/opt/conda/envs/condaenv/lib/python3.8/site-packages/pandas/core/reshape/concat.py"", line 271, in concat"
    op = _Concatenator(
"  File ""/opt/conda/envs/condaenv/lib/python3.8/site-packages/pandas/core/reshape/concat.py"", line 326, in __init__"
    objs = list(objs)
"  File ""/opt/conda/envs/condaenv/lib/python3.8/concurrent/futures/process.py"", line 484, in _chain_from_iterable_of_lists"
    for element in iterable:
"  File ""/opt/conda/envs/condaenv/lib/python3.8/concurrent/futures/_base.py"", line 611, in result_iterator"
    yield fs.pop().result()
"  File ""/opt/conda/envs/condaenv/lib/python3.8/concurrent/futures/_base.py"", line 432, in result"
    return self.__get_result()
"  File ""/opt/conda/envs/condaenv/lib/python3.8/concurrent/futures/_base.py"", line 388, in __get_result"
    raise self._exception
botocore.exceptions.CredentialRetrievalError: Error when retrieving credentials from container-role: Error retrieving metadata: Received non 200 response (429) from ECS metadata: You have reached maximum request limit.
""""""""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
"  File ""/appdir/ingest/__main__.py"", line 86, in main"
    fire.Fire(Command)
"  File ""/opt/conda/envs/condaenv/lib/python3.8/site-packages/fire/core.py"", line 138, in Fire"
"    component_trace = _Fire(component, args, parsed_flag_args, context, name)"
"  File ""/opt/conda/envs/condaenv/lib/python3.8/site-packages/fire/core.py"", line 463, in _Fire"
"    component, remaining_args = _CallAndUpdateTrace("
"  File ""/opt/conda/envs/condaenv/lib/python3.8/site-packages/fire/core.py"", line 672, in _CallAndUpdateTrace"
"    component = fn(*varargs, **kwargs)"
"  File ""/appdir/ingest/__main__.py"", line 59, in derive_parquet"
"    self._run_command(caller_name(), parquet_compression=parquet_compression)"
"  File ""/appdir/ingest/__main__.py"", line 52, in _run_command"
    command_module.Task(**kwargs).run()
"  File ""/appdir/ingest/task/derive_parquet.py"", line 210, in run"
"    for table_successful in pool.map(self.write_df, self.table_names):"
"  File ""/opt/conda/envs/condaenv/lib/python3.8/concurrent/futures/process.py"", line 484, in _chain_from_iterable_of_lists"
    for element in iterable:
"  File ""/opt/conda/envs/condaenv/lib/python3.8/concurrent/futures/_base.py"", line 611, in result_iterator"
    yield fs.pop().result()
"  File ""/opt/conda/envs/condaenv/lib/python3.8/concurrent/futures/_base.py"", line 432, in result"
    return self.__get_result()
"  File ""/opt/conda/envs/condaenv/lib/python3.8/concurrent/futures/_base.py"", line 388, in __get_result"
    raise self._exception
botocore.exceptions.CredentialRetrievalError: Error when retrieving credentials from container-role: Error retrieving metadata: Received non 200 response (429) from ECS metadata: You have reached maximum request limit.
0:06:33 INFO c00m01 1:__main__:96:main: Exiting unsuccessfully with code 1 after 0:06:30.

It looks like you're exceeding an AWS-side concurrency limit while opening a file.
I'm not sure if there's anything smart_open should do about that. You've mentioned a try-except with random sleeping, but that's one approach, and there are others. For example, there's exponential backoff. I think it'd be difficult for smart_open to pick an approach that works for everyone, so it's better for us to leave it to the user to handle in the way that's best for their use case.

I'm not sure if there's anything smart_open should do about that.

Is it not supposed to be smart? Or is it just semismart?

For example, there's exponential backoff.

A pure exponential backoff doesn't help with a uniform load distribution. time.sleep(random.random() * exp_backoff_multiplier) does, although this doesn't define an appropriate choice of the backoff parameters.

I think it'd be difficult for smart_open to pick an approach that works for everyone

The above suggested strategy should work for 90%. On AWS the number of cores are limited to 128. It is doubtful that anyone would run more than 512 worker processes on such a node. Most users that use a naive retry would be better off with the above strategy.

Is it not supposed to be smart? Or is it just semismart?

Having "smart" in the name doesn't mean "it does everything for you". For example, equipping yourself with a smartphone, smartwatch, etc. doesn't instantly make you a genius (quite often the opposite). You still need to apply some of your own effort.

time.sleep(random.random() * exp_backoff_multiplier) does, although this doesn't define an appropriate choice of the backoff parameters.

Yeah, the devil is always in the details. What parameters to pass? How to pass them? How to enable/disable this functionality?
I think the best way forward in your use case is to handle the above questions in your application logic.


flag: define flag in multiple package does not working

What version of Go are you using (go version)?

$ go version
go version go1.12.5 linux/amd64

Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/wen/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/wen/gocode"
GOPROXY=""
GORACE=""
GOROOT="/home/wen/soft/go"
GOTMPDIR=""
GOTOOLDIR="/home/wen/soft/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build060836953=/tmp/go-build -gno-record-gcc-switches"

What did you do?

$ tree .
.
├── A
│   └── a.go
├── B
│   └── b.go
├── main.go
└── pkgflag

2 directories, 4 files

$ cat A/a.go
package A

import (
	"flag"
	"fmt"
)

var A = flag.String("a", "", "")
var A2 string

func init() {
	flag.StringVar(&A2, "a2", "", "")
	flag.Parse()
	fmt.Printf("pkg a, A=%v, A2=%v\n", *A, A2)
}

$ cat B/b.go
package B

import (
	"flag"
	"fmt"
)

var B = flag.String("b", "", "")
var B2 string

func init() {
	flag.StringVar(&B2, "b2", "", "")
	flag.Parse()
	fmt.Printf("pkg b, B=%v, B2=%v\n", *B, B2)
}

$ cat main.go
package main

import (
	"flag"
	"fmt"
	"wen/pkgflag/A"
	"wen/pkgflag/B"
)

func main() {
	flag.Parse()

	fmt.Printf("pkg main, A=%v,A2=%v, B=%v,B2=%v\n", *A.A, A.A2, *B.B, B.B2)
}

What did you expect to see?
./pkgflag -b=hello is working,  package B and package main can get the value hello of B.B
What did you see instead?
$ ./pkgflag -b=hello
flag provided but not defined: -b
Usage of ./pkgflag:
  -a string

  -a2 string

$ ./pkgflag -h
Usage of ./pkgflag:
  -a string

  -a2 string

I think you should not call flag.Parse() in the init() functions, but in the main() function of your application.

You can call flag.Parse in init if you like, although it's not a good idea for a number of reasons. But the important point is that your program should call it only once. And the best place is at the start of your main function.

I remove the flag.Parse from package init, only main package do flag.Parse, it's just working.
$ ./pkgflag -b=aaa
pkg a, A=, A2=
pkg b, B=aaa, B2=
pkg main, A=,A2=, B=aaa,B2=

my bad, I've read some article that it can parse multiple times.
what I want is flag setting stick with package, so no need init variable(setting default secret etc) from main package.
It's working as expected ( without flag.parse in the imported package )
Thanks @beoran  @robpike


feat: swc_ecma_parser 0.137.11

Closes #151

Blocked on https://github.com/swc-project/swc/pull/7816 or something like that in order to get Wasm compiling for dprint and the other crates without relying on the JS feature in getrandom() (required for dprint)


Fix sequence of test output

Challenge http://www.freecodecamp.com/challenges/waypoint-create-a-bulleted-unordered-list has an issue. Please describe how to reproduce it, and include links to screen shots if possible.
Normally you would make the ul before making the li's

@terakilobyte Ideally these tests should be in the intended order. For example, for the challenge in question, the "create a UL element" and "Create 3 li elements" have gotten swapped.

Yes we can easily change it so they are output in the order of the tests in the json file rather than separate them into failing/passing

Awesome. I think this is a priority, as many campers seem to read our (newly human-readable) failing test messages and solve the challenges that way rather than reading our text (myself included!) So presenting these in proper order will prevent error messages from floating to the top that pertaining to, say, an HTML element the camper has yet to create.

Fixed on most recent push.


Fix loss of precision in OpenCvSharp.Size2d constructor

The OpenCvSharp.Size2d constructor that takes two double arguments casts the arguments to int before setting its fields. This pull request aims to fix this.

👍  Thank you!!


Updating CNTKLearner to work with latest gpu branch updated with latest master

Updating CNTKLearner to work with latest gpu branch updated with latest master.
Removed setting owner, fixed ByteArrayParam transfer from java to python, fixed path to model.
Verified full end-to-end scenario.

@imatiach-msft,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

updated to remove duplicate

Validated the cifar10 notebook run in a freshly deployed environment with success.

Also validated that in the client mode, the set owner operation is not needed.


[FEAT] Extend AdyenCheckout locale typings

When configuring AdyenCheckout options, the locale key is typed from the locales Adyen supports translations for. Since we should be able to add any locale we want, which might required to integrate our own translations, it should be possible to use our own locales beside the supported ones. As an example, using a locale such as uk-UA is not possible at this moment.
https://github.com/Adyen/adyen-web/tree/master/packages/lib/src/language/locales

Hi @nklaasse, thanks for the report.
Good catch, I'll work on a fix.

The fix was merged and will be included in our next release.
Let us know if there's anything else. Cheers!


GSM modem example on stm32f103 bluepill

I am trying to use gsm_modem example with stm32 blue pill and SIM7000 modem. I have used following command to build using west.
west build -b stm32_min_dev_blue samples/net/gsm_modem -p auto -- -DCONFIG_MODEM_GSM_APN=\"mobitel3g\" -DCONFIG_MODEM_GSM_UART_NAME=\"UART_3\"
I got the following error
[174/179] Linking C executable zephyr\zephyr_prebuilt.elf
FAILED: zephyr/zephyr_prebuilt.elf
cmd.exe /C "cd .
Memory region         Used Size  Region Size  %age Used
           FLASH:       84668 B        64 KB    129.19%
            SRAM:       37920 B        20 KB    185.16%
        IDT_LIST:         168 B         2 KB      8.20c:/gnu_ar~1/92020-~1/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld.exe: zephyr\zephyr_prebuilt.elf section `text' will not fit in region `FLASH'

Is it possible to reduce the RAM and FLASH usage? If yes what is the command that I can use.

Sorry for very late reply, I just noticed this question.
As you noticed, the blue pill is quite limited use, there just isn't much available memory to do any network related activities. I am afraid you need to think some other device for modem development.
I would recommend black pill https://docs.zephyrproject.org/latest/boards/arm/blackpill_f411ce/doc/index.html it works well and has much more memory (both RAM and flash).


Add RemarkCommand logic in relevant classes

Tutorial 2 - Adding a New Command (Kavan)

Closed pull request as per submission instructions


Allow websocket provider.

This is self explanatory. Will have to modify this bit and think of how to best make it work: https://github.com/shanefontaine/uniswap-python/blob/266dea86ba42ba4db8d4aa0c3b242156db1c5b17/uniswap/uniswap.py#L223-L229
Maybe provider should just take Web3 Provider class instance (WebsocketProvider or HttpProvider) so that it will reduce code complexity? Or write some quick function to initiate it depending on the URI.

Just pass your own Web3 instance.


A good first issue...

Hey ,
I'm eager to contribute in this project Can you please assign it to me.
Thank you


Incorrect understanding of the text

When I input the text prompt 'cat with classes.',I wanna get the cat which wear glasses,but the model frames the cat and the glasses as two object.
How to deal with it?...

When I input the text prompt 'cat with classes.',I wanna get the cat which wear glasses,but the model frames the cat and the glasses as two object. How to deal with it?...

You can try this demo here and set the specific --token_span for cat with glasses to see if it can bring you a better result.

I tried to do like this, but nothing was detected...

0.9 0.1 都试过了，结果都是检测不到任何目标。我在想换用理解力更强的text backbone是否能解决。

When I input the text prompt 'cat with classes.',I wanna get the cat which wear glasses,but the model frames the cat and the glasses as two object. How to deal with it?...

You can try this demo here and set the specific --token_span for cat with glasses to see if it can bring you a better result.

The model use the hidden state feature of each text tokens. It is different with CLIP which uses hidden state feature of EOS token.