fix: keep trailing spaces in heading

Details
Keep tailing spaces when parsing heading
Fixed Issues
$ https://github.com/Expensify/App/issues/27445
PROPOSAL: https://github.com/Expensify/App/issues/27445#issuecomment-1719639362
Tests

Open ND and log in with any account
Open any chat and send a message with header text(# in front) in the first line and some space before text in the next line
Copy that text or switch the message to edit mode
Verify that the spaces before the second line isn't removed

[x] Verify that no errors appear in the JS console

Offline tests

Open ND and log in with any account
Open any chat and send a message with header text(# in front) in the first line and some space before text in the next line
Copy that text or switch the message to edit mode
Verify that the spaces before the second line isn't removed

QA Steps

Open ND and log in with any account
Open any chat and send a message with header text(# in front) in the first line and some space before text in the next line
Copy that text or switch the message to edit mode
Verify that the spaces before the second line isn't removed

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android / native
[x] Android / Chrome
[x] iOS / native
[x] iOS / Safari
[x] MacOS / Chrome / Safari
[x] MacOS / Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] If we are not using the full Onyx data that we loaded, I've added the proper selector in order to ensure the component only re-renders when the data it is using changes
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web
https://github.com/Expensify/App/assets/126839717/b4778158-a9b7-461b-8dad-3bc6a3fe12bc

Mobile Web - Chrome
https://github.com/Expensify/App/assets/126839717/0b89326b-3193-48d5-9f2c-97ef38f47d53

Mobile Web - Safari
https://github.com/Expensify/App/assets/126839717/84ca566e-0390-4a53-8af2-46ef1f0a1e1a

Desktop
https://github.com/Expensify/App/assets/126839717/1cb0fef0-5163-42af-acaf-f09fa1b02fe0

iOS
https://github.com/Expensify/App/assets/126839717/1aa862d3-817f-4f8e-95d6-6b1a809ac610

Android
https://github.com/Expensify/App/assets/126839717/e99a55f5-bd1a-4936-aa5e-0d134ee0296c

@parasharrajat
Will you take a look at the PR?

@parasharrajat
merged. Please take a look

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

Seems kind of like an unlikely candidate for a performance regression 🤔

Not sure how this PR can have negative impact on performance.

🚀 Deployed to staging by https://github.com/marcaaron in version: 1.3.79-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.79-5 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
failure ❌

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.79-5 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
cancelled 🔪

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.79-5 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅


Update guzzle to version 7

Hey
Can not update my dependencies anymore because of the gruzzle version in this package. This would allow version 7 as well.
Cheers

I've added a test to ensure that the library remains compatible with guzzle 6, otherwise LGTM :+1:


Tutorial Playground

I'm trying to get SwiftCheck working with DateTime (https://github.com/zbeckman/DateTimeKit). I get that I need to create an extension DateTime : Arbitrary but I'm a bit lost as to how to do this right. If I want SwiftCheck to support DateTime just as thoroughly as an atomic type, how would I go about that?

NSDate cannot be used directly (dumbass Self requirement restrictions on protocol instances).  You have to wrap it.

There, I included it in the tutorial.  It's a pretty great way to introduce modifiers.

Excellent. That's another major real world problem we run into all the time.

I like where this is going, but I'm struggling to use it in my own code. You have a lot of nice examples like emailGen, but don't show how you would use that with forAll (or more generally, how to use it with property). With experimentation, I think I've discovered that these can't be passed to forAll and have to instead be generated inside the closure. It's not clear whether this is correct or not.

I can see 2 ways of going about your specific example:

Pass the generator to forAll

let arrayGen = UInt8.arbitrary.proliferateSized(5)

property("...") <- forAll(arrayGen) { x in
    /// ...
}

Use implication to discard bad arrays:

property("") <- forAll { (x : [UInt8]) in
    return (x.count == 8) ==> {
        /// ...
    }
}

The former is more conducive to explanation than the latter.

Does the filtering (implication) process at up my 100 tests? I mean, if I pick 100 arrays and only 2 of them are the right length, do I run just those 2, or do I keep implicating until get I get 100 things to try?
I didn't realize the forAll(generator)... form. That probably answers my next question about how to create non-empty strings.

Hmm, I feel so close, but I'm breaking the compiler (I expect this is getting off-topic for this PR, but it's a handy place to explore the question, and the kind of question that popped up as soon as I started trying to use this).
    let passwordGenerator = String.arbitrary.suchThat { $0 != "" }
    let saltGenerator = UInt8.arbitrary.proliferate()
    let gen = Gen.zip(passwordGenerator, saltGenerator)

This fails to compile with:
Cannot invoke 'zip' with an argument list of type '(Gen<String>, Gen<[UInt8]>)'
    Expected an argument list of type '(Gen<A>, Gen<B>)'

That is clearly the wrong error message, but suggests I'm doing something wrong.

Oh, yeah.  You notice how I use explicit specifications with Gen everywhere?  It's more than just preference, it's often required.  Besides, it serves as an excellent marker of intent that can be checked by the compiler -bonus.

OK, I believe this is the structure I'm going to stick with.  Modifications and suggestions should be narrower from here on out.

Really, really want to know how to use a callback. Trying something like this:
it("generates a large list of unique numbers") {
	let numericGen: Gen<Int> = Int.arbitrary
	var listOfNumbers: [Int] = []

	property("numbers are unique") <- forAll(numericGen) { (i: Int) in
		return (listOfNumbers.contains(i)) ==> {
			return (listOfNumbers.count < { listOfNumbers.append(i); return listOfNumbers.count }())
		}
	}.withCallback(expect(listOfNumbers.count == 100))
}

Also, suggest you add something that explains the intricacies of shrinking, and perhaps give this example:
// Shrinking can introduce whitespace. Make sure those cases are excluded from the test case results.

return (e =~ "[\\s\\n]") ==> {
	return f.isValid
}

Shrinking introduces whitespace because you have failed a test case in your example.  You shouldn't be trying to avoid lesser cases that could be important while debugging your code by turning off the shrinker, you should be examining the spec to see why you failed on the first datum, or writing a Modifier type that shrinks the way you want it to. I make no guarantees about how and when the testing block will be invoked, only that at least 100 cases + shrinking will occur.  Perhaps that means that you need to convert your test to a more law-like form rather than a unit-test like form.

As for the callbacks thing, I appreciate what QuickCheck (and consequently SwiftCheck) did by making withCallback verbose and a little tough to use.  There's rarely a case where you need to attach an effect to a test case that you can't already do with .verbose, and when you do you only really care about failures, so we provide withFail and withEachFail for that.  I've already shown the former in the tutorial, I don't wish to encourage it any further.

// I make no guarantees of uniqueness.
it("generates a large list of unique numbers") {
    let numericGen: Gen<Int> = Int.arbitrary
    var listOfNumbers: [Int] = [] // Uh-oh, mutable state.

    // This is not a law, this is something that's taking advantage of implementation details
    // in the shrinking loop.
    property("numbers are unique") <- forAll(numericGen /* This is the same as just a plain forAll */) { (i: Int) in
        return (listOfNumbers.contains(i)) ==> {
            return (listOfNumbers.count < { listOfNumbers.append(i); return listOfNumbers.count }())
        }
    // You have no guarantees about how many times the testing block is run.
    }.withCallback(expect(listOfNumbers.count == 100))
}

To convert something like this into a law you need a specification and a function that obeys some part of that spec.  Here, the only reasonable assumption to make is that the testing block will be invoked some non-zero amount of times.  The only "law" you can extract here is this:
it("generates numbers") {
var s : Set = Set() // Still makes me uneasy
property("it generates numbers") <- forAll({ (x : Int) {
s.insert(x)
return true // What else can you do?
})
}
Which is nigh useless.

Hm. I see your points.
However – let's say you wanted to write a test that ensures a given list of data is populated with at least 100 (or more?) "valid" sets of data. We could say a valid piece of data is a "positive Int" or a "well formed email" or a "password/salt pair." Doesn't really matter – one thing I run into in the real world is a two phase test plan:

Test that your preconditions are valid, e.g., that you have actually create 100 viable and usable properties within the definition of your spec.
Run those viable properties through your program to see if it fails.

The above example was a bit contrived but that's what it was getting at... Validate the properties, and THEN verify the program.

Then you would make part 1 a Generator and part 2 the actual property.

One thing to understand about how tools like SwiftCheck get applied... and I'm saying this from about 30 years in SQA, from the Defense Department to little startups... it gets applied in a very "practical" way. Teams that are working to deliver working software end up applying it to solve their immediate need. That includes things like:

Generate a set of test data for a given program component.
Validate that the test data is, actually, valid test data. Often the generation of the data set is just as complicated as testing the code or even writing the code.
FIGURING OUT how to test a program... because they are not mathematicians or professional quality assurance people. Or perhaps they are profession QA people... but that tends to mean they are NOT programmers.
Applying reproductions to ensure regressions in a UI or UI component or program component do not occur.
Actually GENERATING real data for the program – either in a quality assurance setting (e.g. load a QA server with a lot of test data that looks "real") or even in production (use it to populate required values in a running system – more rare, but it happens).

I realize some of these fall outside the scope of what SwiftCheck/QuickCheck was really designed to do, but when you give a programmer a tool and a problem... ;-)

I know it's a very strange thing to be told to throw out that kind of experience for this newfangled abstract nonsense, but there are very serious implications to this whole thing.  When you get down to properties, I mean really get down to properties, you only have 2 steps:

What are my assumptions?
When do they hold?

Step 1 lets you break down your problem into properties, your assumptions become inputs to functions.
Step 2 lets you actually write some "laws".  SwiftCheck may not be able to tell you with 100% certainty that they hold, but like a Scientific Law we take repeated observation of success to mean success.

(And yes, making a custom shrinker makes sense – however, I can pretty much guarantee that 80% of the people that use this library will be utterly confused when they write an email generator that explicitly does NOT include spaces... and then they see failure cases that do – that is the only reason I'm suggesting you go down this path – to avoid further confusion).

Utterly, no.  I catch your meaning tho.  I've carved out room for another example under the modifier types one.  I will solve your problem there.

There, that should suffice.

Looking back at our conversation, I have a question: How would you write a generator that would create a list of 100 things that you know meet a certain program specification? (Perhaps email addresses that you know pass the email =~ validEmailPattern or whatever)? I'm curious to see your implementation of a generator that verifies such a rule and produces a list. I think this would be another good real world case. The key here is making it clear to the read:

How to generate a list of things.
How to size the list to whatever desired size.
How to verify that each thing meets a program specification.
(I think you've touched on all of these but I don't think you have put it all together in one place – which makes me wonder if I'm doing it the right way).

It's more efficient to be correct by construction than to be correct by filtering out the totality of strings SwiftCheck can generate.  I wouldn't make a generator of strings with a suchThat clause using ~= as a filter because Gen will spin as long as it needs trying to find a a passing example.  Convert the body of the relation ~= into the blocks necessary to build the generator,
let g = Gen.sized >>- { n in
    return myGen.proliferateSized(n)
} >>- Gen.fromElementsOf

How would I go about having one test run a larger set of property tests (say 1000 rather than 100)?

That is accomplished in QuickCheck by modifying the stdArgs options in.  I haven't explored a satisfactory way of doing the same in Swift.  If you'd like to try, all the machinery is there.

What about adding a few props to Testable (maxRun, maxFail, things like that)?

(I can give it a try but I'm no expert on this syntax).

No, don't do that.  There's an internal struct called Argument that is passed to quickCheckWithResult.  You need to make that public and probably find a way to pass it through the property function.

With that, I'm done.  I will absolutely accept modifications to this in the form of pull requests, but any future questions about any part of the framework need to be separate issues from here on out.
Thank you all for your help with this :two_hearts:
:boat:

Awesome! This is a big gain the project. Question: Can you generate an HTML page from the tutorial, stick it into the project, and link to it from the readme.md so it's on the wiki? That would be great if it could be done.
By the way... my comment on adding props to Testable where motivated by ScalaCheck, where I can do this (and which I really like):
property("Unicode email addresses validate correctly") <- forAll(Generators.emailAddress) { (e : String) in
		f.text = e
		return f.isValid
}.minSize(200).maxDiscard(50)

Anyhow, food for future thought...

Why HTML?  The playground comes bundled with the project now, so you have access to it even if you build with carthage.  The tutorial is designed to be interactive.
As for the other stuff, like I said, it's all there, it just needs a public interface.

So that it's on the wiki. Our team doesn't get the Carthage checkout since frameworks are handled by me and then committed in git. Nothing like good docs on the web.

Do you know of any tools to extract that kind of information from a playground?

No afraid not... will keep my eyes open for something though.


Opens Zeronet in default browser

Not supposed to open in browser, but since the app doesn't yet detect new (copied) zites in the data folder then this is one way to add new zites (by using the address bar of whichever browser you normally use)
On occasion it won't open in the browser, but this is because an existing 'electron' app has failed to close, hinting at a quick solution. (opening a remote app first to load into)
Otherwise, removing the default browser option from core/src/main.py (line 60~) should work.

Starting it with zeronet.exe --open_browser "" should work.

Yep, that worked. Cheers.


(GKE): Update documentation about calling inference service endpoing behind IAP. Fix https://github.com/kubeflow/gcp-blueprints/issues/324

What this PR does / why we need it:
Validated that GCP IAP instruction here is working with Kubeflow 1.4 release.
Related GitHub issues:
https://github.com/kubeflow/kfserving/issues/1660
https://github.com/kubeflow/kfserving/issues/913
https://github.com/kubeflow/kfserving/issues/1660
https://github.com/kubeflow/kfserving/issues/1199
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes https://github.com/kubeflow/gcp-blueprints/issues/324
Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

No change
Release note:

NONE

/lgtm
/approve

/lgtm
thanks @zijianjoy !

/ok-to-test


Use govuk_node_list to get a list of servers

This avoids us having to specify all of our machines. It does increase the dependency on PuppetDB though (especially in the case of Vagrant) but I think the trade-off is worth it.
Opening for comment: I'd like some opinions on whether this is a good idea or not.

Tests have failed because the catalog compilation can't execute the function, which is probably something we can work around if people think this is worth pursuing.

Me and @deanwilson talked about this and we're not sure what would happen if puppetdb went away? Would anything bad happen?

Yeah, that's a good question. govuk_node_list will return a non-zero exit code which is correct and I think that will prevent anything nasty from happening. But it's worth testing, will have a look.

We will mob test this

We should discuss this in person. Closing for now.


Cryptic errors on startup

The following error masks the real cause in many cases:
'Csw' object has no attribute 'repository'
So far the following problems have been masked:

The 'database' parameter not being passed on startup
Elasticsearch not being up and available (overridden init file fails without showing the right traceback).

The proposed fix is to submit a patch to upstream pycsw letting the right exception be raised instead of trapped in an XML-like document.

Documented in the README with troubleshoot information and filed a bug report upstream: https://github.com/geopython/pycsw/issues/487
No need to track this one here anymore.


Formatting fhkb.md

Formatting fhkb.md bit by bit
draft for now until i finish formatting everything

This is great @shawntanzk thank you!!!

@matentzn will take awhile, ill be doing this bit by bit.
Btws if you will work on this too, best to coordinate so we don't clash our edits yeah - but happy to also just do it myself, it doesn't seem too much to do anyway

I wont interfere without coordinating with you first!


Use of apt-get update should be paired with rm -rf /var/lib/apt/list

As title explains, just making it a little better! Thanks Lockheed!

good job in that replacing RUN apt-get update && rm -rf /var/lib/apt/lists/* \ in one-line makes more sense

Thanks @howtotalktogirlsatparties...


bump minor version for release

gax: 1.2.0
gax-grpc: 0.18.0

Codecov Report

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

@@            Coverage Diff            @@
##             master     #316   +/-   ##
=========================================
  Coverage     69.81%   69.81%
  Complexity      355      355
=========================================
  Files            73       73
  Lines          1925     1925
  Branches        157      157
=========================================
  Hits           1344     1344
  Misses          513      513
  Partials         68       68

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 7b58e15...02c9a9c. Read the comment docs.

LGTM


Repos fail to fetch if same repo name is used in multiple release configs each with different helm major version

As discussed on Slack (https://sweetops.slack.com/archives/CE5NGCB9Q/p1619566457313300), when running helmfile lint/apply against helmfile.yaml with multiple release configs defined that use the same repo names, helmfile will fail with   Error: repo <repo> not found

@esvirskiy Thanks for helping me isolating this down to a real bug and writing this up! #1816 fixed the issue for me. The next release is going to be huge :)

BTW It happened only when you  used the same repo concurrently with both helm 2 and 3 so I updated the issue title accordingly.

great! thank you very much!


Unable to save

I'm on Windows 8.1 using Sublime Text build 3047 and Scout loaded with compass. The problem I'm encountering is that after about 1/2 hour to 45 min, I continually run into an error when trying to save the .scss file.  See this image for the error details:

I believe that this is an issue with Scout because when I run compass on my ruby 2.0.0p247 (2013-06-27) [x64-mingw32], I can go along forever with no errors when trying to save the .scss file.
Admittedly a newbie to Github, I hope this is the correct place to list this.
Any help is much appreciated.

+1

Closing this ticket. Download the latest version of Scout-App. If the problem still exists, create a new issue.

Scout-App.io


java.lang.IllegalStateException: This YouTubePlayerView has already been initialized.

I am using the YouTubePlayerView in my recyclerview, so when the video id is repeated, i am getting this error. Please help me.
Thanks in advance.

Clearly you are trying to initialise the same YouTubePlayerView multiple times. This is wrong. You should have a YouTubePlayerView for every item in your recyclerview.

In my case, I have to use the same view to load different videos. Whatever user select URL from the recycler view, it should be loaded in the same video view. Can you please suggest how I can achieve it?

how can we make youtube player for every recyclerView items?
It is dynamic.
Can we override the initialization or load video on the same initialization?
???????????????

Just put one in every viewholder

just put [ youTubePlayerView.initialize(...) ] inside try{}catch(){}.
the app crashes because it tries to initialize the YouTubePlayerView when it is already initialized, that because recycle view items lose focus after scrolling away.

use method: getYouTubePlayerWhenReady
I have solved :)

Hi, @sarsdin
Would you share the source code snippet for getYouTubePlayerWhenReady here?

You can find it in the doc.

@JalalMadhaji No funciona para mi. necesito en la misma actividad cambiar de id del video, para cambiarlo según el id del video tomado de una base de datos. cómo puedo volver a inicializar el YouTubePlayerView, ayuda, estoy en Kotlin

I am using the YouTubePlayerView in my recyclerview, so when the video id is repeated, i am getting this error. Please help me.
Thanks in advance.

Hi
is there any update on this issue? i've been facing this issue with recycler view when notifyDataSetChange call happens then it is causing this issue. I am using separate player object for each item and also tried to catch this exception in try..catch block but nothing works for me
it would be very helpful if you have already found the solution for this.

If that exception is thrown, it means you are trying to initialize a player that is already initialized. This is not supported by the library.

i have de same problem, but i dont use a RecyclerView, its a single activity with a single YouTubePlayerView.
class MyYouTubePlayerListener(
    private val ready: (youTubePlayer: YouTubePlayer) -> Unit
) : AbstractYouTubePlayerListener() {
    override fun onReady(youTubePlayer: YouTubePlayer) {
        ready(youTubePlayer)
    }
}

fun YouTubePlayerView.loadVideo(
    url: String,
    containerView: ViewGroup? = null,
    hideControls: Boolean = false,
    loading: (Boolean) -> Unit
) {
    try {
        val enableControls = if (hideControls) 0 else 1
        val iFramePlayerOptions = IFramePlayerOptions.Builder()
            .controls(enableControls)
            .fullscreen(enableControls)
            .autoplay(1)
            .build()

        enableAutomaticInitialization = false

        addFullscreenListener(object : FullscreenListener {
            override fun onEnterFullscreen(fullscreenView: View, exitFullscreen: () -> Unit) {
                setVisible(false)
                containerView?.addView(fullscreenView)
                context.setFullscreenAndRotate(
                    enable = true,
                    rotate = true
                )
            }

            override fun onExitFullscreen() {
                setVisible(true)
                containerView?.removeViewAt(1)
                context.setFullscreenAndRotate(
                    enable = false
                )
            }
        })

        initialize(
            MyYouTubePlayerListener {
                loading(false)
                it.cueVideo(url.getYoutubeVideoId(), 0f)
            },
            iFramePlayerOptions
        )
    } catch (ex: Exception) {
        loading(false)
        Log.d("ERROR_EXCEPTION", ex.message.orEmpty())
    }
}


Fail to compile in path with whitespace

The bug happens in any OS. I'm using crystal version 1.12.1, installed on a Mac via homebrewer.
My project is in a folder whose path is like this:
~/Library/Mobile Documents/com~apple~CloudDocs/Projects/mgq-private-eye/crystaleye
(it contains a whitespace).
By issuing:
crystal build --no-debug --release -o bin/crystal-eye src/cli.cr

it fails with:
find: /Users/alan/Library/Mobile: No such file or directory
find: Documents/com~apple~CloudDocs/Projects/mgq-private-eye/crystaleye/src: No such file or directory

I tried crystal build --no-debug --release -o bin/crystal-eye "$PWD/src/cli.cr" and gave the same error.
If I move my project to folder without whitespace in its path it works fine.

The error message looks like it's coming from the find command. I'm not aware we're using this anywhere in the compiler. So the error must be coming from somewhere else.
Maybe some macro code calling find. But I figure that should leave more debug output indicating it's from a macro call...
Could you run crystal build with --status to see where we're at in the process? And dtrace or whatever tool on macOS to log system calls? Maybe that could help identify where this issue is coming from.

Sorry, dtrace will require to compile from source crystal, which is a bit beyond me.
I can't find --status option in crystal, this is not working for example:
crystal build --status --no-debug --release -o bin/crystal-eye src/cli.cr

Ooops, I mean --stats. Sorry.
I don't know macOS, but there must surely be a means to trace syscalls without recompiling the executable. Maybe someone else has a suggestion?


Add appcues

Please review our Contribution Guidelines to ensure your changes abides by it.
Review your changes and complete the checklist below.

[x] Company name
[x] Company description
[x] Company location
[x] GitHub link
[x] How Elixir is used
[x] Sorted alphabetically

Awesome!  @kimquy, thank you 😀


[FEATURE] GithubSearchTool include Anthropic

Feature Area
Core functionality
Is your feature request related to a an existing bug? Please link it here.
NA
Describe the solution you'd like
Currently only 'openai', 'gpt4all', 'huggingface', 'vertexai', 'azure_openai', 'google', 'mistralai', 'clarifai', 'nvidia', 'ollama', 'cohere', 'aws_bedrock' are supported by GithubSearchTool and I would like to add Anthropic for this
Describe alternatives you've considered
No response
Additional context
No response
Willingness to Contribute
No, I'm just suggesting the idea

Anthropic does not support embeddings unfortunately, so you will have to use one of the above

too bad.. ill just create my own tools then thank you..


verilog: use derived module info to elaborate cell connections

Attempt to lookup a derived module if it potentially contains a port connection with elaboration ambiguities
Mark the cell if module has not yet been derived
This can be extended to implement automatic hierarchical port connections in a future change

For reviewers, I would appreciate special attention to ways this might break existing flows. For example, the change I made in techmap.cc was necessary to handle cases where hierarchy is run again (i.e., in a synth pass) after using techmap. There may be a better way of handling this.
Fixes #2570
Fixes #2622
Fixes #2654

bump on this review

The top-level README has a list of all attributes. (See section "Verilog Attributes and non-standard features".) Can you add the reprocess_after attribute there so the semantic of the new attribute is documented?

@mwkmwkmwk @clairexen I rebased this to resolve a trivial conflict. Can I get some eyes on this? Thanks!

To aid in diffing, the above force-push is simply a rebase of this PR onto master in advance of some actual changes.

Per https://github.com/YosysHQ/yosys/pull/2752#issuecomment-940850345, I've force-pushed over this branch to bring in the new process_and_replace_module refactoring that @rswarbrick has in #2752 in a separate and appropriately attributed commit.
@clairexen, for your re-review, it should only be necessary to take a look at the diff of this force-push.
@rswarbrick, when you rebase your PR, you will still technically have merge conflicts, but they are simply from us both adding adjacent code, and so will be trivial to resolve.


enh(Meru AB): catch navigate back in assistant builder

Description
fixes https://github.com/dust-tt/dust/issues/3781
turned out to be a lot more annoying than I thought
Risk

Deploy Plan

Is it normal that I get a different warning (feels system) when closing the tab?

I think this one is your browser that decides to add it for some reason (maybe it detects that I add some kind of protection, but that I have no way to prevent your tab being closed ?).
I didn't add it in any case


better documentation

provide a wiki page with instructions and pictures on how to use.
instructions on how to also pull and run manually as well.

@lastlink Do you happen to know how to use this extension?
I installed the publish version but I don't know what to do next to make it render the kanban UI on my Github repo. Thanks in advance.


revert: "Merge branches 'feat/piping-MAPDL-output-to-a-given-file', 'main' and 'main' of https://github.com/ansys/pymapdl"

Description
As the title, this reverts commit a97fb6cf9cbc906f0499170c111214e721eba267, reversing
changes made to 6853571bbd0f7e175dcfb56575cd472abdc818fd.
For some reason, the ruleset for the repo allowed me to push to main, which is sooooo bad.
Issue linked
NA
Checklist

[x] I have visited and read Develop PyMAPDL.
[x] I have tested my changes locally
[x] I have added necessary documentation or updated existing documentation.
[x] I have followed the PyMAPDL coding style guidelines.
[x] I have added appropriate unit tests that also ensure the minimal coverage criteria.
[x] I have reviewed my changes before submitting this pull request.
[x] I have linked the issue or issues that are solved to the PR if any.
[x] I have assigned this PR to myself.
[x] I have marked this PR as draft if it is not ready to be reviewed yet.
[x] I have made sure that the title of my PR follows Commit naming conventions (e.g. feat: adding new MAPDL command)

@pyansys-ci-bot LGTM.


missing color in v0.9.3

Downloaded from pip.

Do any one know what is going on?

Please try the latest develop version:
pip install --upgrade "https://github.com/jkbrzt/httpie/archive/master.zip"

我也遇到了这个问题，更新dev版可解决。

Please try to update to 0.9.4 and re-open if the issue persists.


Resolve: mediapool loader and inventory clearing plugins

Changelog Description
Adding plugin for loading into mediapool with option to also add into timeline. Inventory plugin for clearing timeline item container included unused media's from mediapool. Clips in mediapool are colormanaged via remapping.
This is a replacement PR for #140
Additional info
Following changes are adaptation from Colorbleed's code BigRoy/OpenPype@37da9c6#diff-3ec58869aa5ff3f62216d417256778fd5b44ea0132b953e67d7880f5e7b53df5. Thanks @BigRoy The fix dealing with Adjustment Clips on timeline which was originally here were moved into #92.
Next steps

[x]  Adding settings for metadata loading

Testing notes:
Load media (loader)

Open Resolve menu and chose Loader
select any product type version and RMB click
Chose Load media plugin and load anything
see that the media is added to mediapool and also into timeline
load again but this case use loader option box and disable add to Timeline
This time it will load only into mediapool

Remove Unused Media (inventory)

make sure you are having loaded some clip into timeline
duplicate the mediapool clip so there is something to be erased
open Inventory manager
select any item in manager and RMB click
in submenu go to actions and select Remove Unused Media
it should remove all duplicates and only one clip should remain

This PR is basically #140 with #634 on top but then targeting develop branch.
Over #140 this PR includes:

Updated to latest develop
Fixed some refactoring to  ayon_resolve
Fixed remove unused media inventory action + improved label

I couldn't push into the upstream branch - so am just doing it this way. I tested:

[x] Tested loading and managing Load Media loader with both H264 and EXR.
[x] Tested loading and managing Load Clip loader with both H264 and EXR
[x] Tested Workfiles tool
[x] For publishing I only tested just publishing workfile (no other instances) since I'm not sure how that legacy creator works.

Testing notes:

Run resolve
Load and publish should all work.


Update section on client authentication

What type of PR is this?

enhancement/feature

What this PR does / why we need it:
The current specification for client authentication does not limit the lifetimes of the signed JWT. This presents a security risk, and further complicates implementations as there is an additional requirement that the authorisation server should reject duplicate JWTs.
This PR proposes that:

the signed JWT must include the iat claim
token lifetimes must be limited to 300 seconds
tokens with longer lifetimes must be rejected by the authorisation server

Which issue(s) this PR fixes:

Fixes #208
Special notes for reviewers:
None
Changelog input
 release-note
 - Add restriction on maximum JWT lifetime for client authentication

Additional documentation
See proposed changes for documentation links

I think we can have the best of both worlds (ensure interoperability + minimize deviation from standards + avoid breaking existing API consumers when possible) if we:

Keep iat as an optional field for API consumers

In addition to the mandated claims, the signed JWT SHOULD also include the iat (issued at) claim

Maintain the restriction on expiration time as mandatory (MUST) , using the authorization server's current time as a default when iat is not present.

The difference between the exp (expires at) and iat (or the authorization server's current time, if absent) claims MUST be no more than 300 seconds [...]

JWTs should be used shortly after they are generated; 300 seconds is a generous interval, so I don't think defaulting to the current time is an issue.
@eric-murray What do you think?
Some telcos don't have a dedicated Authorization Server exclusively for issuing tokens for CAMARA APIs. This is one of the reasons why making standard JWTs not valid is problematic.

Agree, thanks Eric.

@AxelNennker

What is the benefit of having iat
Why not just use exp and define that exp-now<300 seconds?

CIBA Core made the mistake of making iat optional rather than mandatory for private_key_jwt, and we need to live with that because of the "existing implementations" argument. If iat was mandatory, key lifetime would be straightforward for both API consumer and the authorisation server to calculate for any JWT.
JWTs without an iat claim could have been created at any time. This increases the risk that the API consumer "stockpiled" them some time ago, and they have since leaked. By specifying that the API consumer should limit the token lifetime to 300 seconds when they create them, we can reduce (but not eliminate) this risk.
I see that OIDC CIBA avoided this mistake for signed authentication requests, so well done there.

Also why mention all the different endpoints?

From ICM Meeting Minutes:

Outcome:
Eric will draft more detailed text to specify exact requirements and error responses for various token lifetime scenarios. The group will review this in the next meeting to finalize.

So the request was to specify error responses for the different endpoints as the relevant standards do not include "token lifetime too long" as an explicit error example. But I agree it may now be better to document this in #220.

Why not just state that the lifetime of the jwt used in client_credentials flow must be shorter than 300 seconds.

If the standard is using the term "lifetime", we need to define what is meant by "lifetime", and I am defining it as the difference between the exp and iat claims of the token. Doesn't get much simpler than that. The complexity arises solely from the iat claim not being mandatory in the JWT itself, but the concept remains valid even for API consumers who do not explicitly include the iat claim in their token.
"client_credentials flow" is not the correct term here

Removed wording on error responses, as that is now covered by #220

Now the API consumer has many JWTs with iat which still can be stolen and misused.
I feel I am missing something. Sorry, if I am thick. Which threat scenario is iat protecting against?

Well, it clearly doesn't eliminate the risk of tokens being stolen and misused, but may reduce the number that are available to be stolen.
Let's say an API consumer does not want to create signed JWTs "on the fly", but rather generate them overnight using a batch process, and then use them throughout the next day by pulling one off the stack when required. Even with the new 300 second maximum token lifetime rule, they could still create multiple batches overnight, with exp times incremented by 300 seconds for each batch. They would just need to remember to discard any unused tokens as each batch expired.
But if they included the iat in the tokens, then they could only create a batch for the next 300 seconds. Any created with a later exp time would be invalid and known to be invalid when they were created (as exp - iat would be > 300). So the maximum "stockpile" size would be 300 seconds worth of tokens, and the consequences of their theft would only last for the next 300 seconds.
And maybe the need to generate a new batch every 300 seconds just might persuade the API consumer to generate them on demand, as they should.
It's a small point, but a point nonetheless.

@camaraproject/identity-and-consent-management_maintainers
I'd like to try and progress this PR. Outstanding issue is how the API provider should treat the iat claim if included in the JWT.
The two options are:

Option 1: Ignore it, and base the remaining token lifetime on the arrival time at the authorisation server; or
Option 2: If present, use it to compute the true token lifetime (i.e. exp - iat), otherwise use the arrival time at the authorisation server

The pros and cons for each solution are:

Option 2 is slightly more complex, as establishing the reference time for the token lifetime requires a bit of logic (if iat is present, use that, otherwise use current time in unix time format)
Option 1 allows the true token lifetime and hence validity to be established from the token itself, and will become the "de facto" solution as increasing numbers of API consumers include the iat claim in their JWT. If iat was mandatory, there would be no objection to computing token lifetime this way.

It's a relatively small point compared to all the other issues being discussed in ICM, so I propose a simple "vote" to resolve it. I favour Option 2. Axel favours Option 1. Others should express their view in a comment.

Agree with Option 2 as per https://github.com/camaraproject/IdentityAndConsentManagement/pull/216#issuecomment-2421862122

As there are no further responses, can we close this PR considering option 2? Do you agree with this? If so, can we merge the PR as it stands?
CC @eric-murray @AxelNennker

@AxelNennker Please review this PR to unblock and potentially merge it. The latest feedback from WG is available at https://lf-camaraproject.atlassian.net/wiki/spaces/CAM/pages/56754234/2024-12-18+ICM+Minutes


LEGO: Pull request from lego/hb_04604851-bac4-4681-9f74-73de611d6e48_20220712153817085 to main

LEGO: Pull request from lego/hb_04604851-bac4-4681-9f74-73de611d6e48_20220712153817085 to main with localized lcls

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.002%) to 44.312%

Totals

Change from base Build<PHONE_NUMBER>:
0.002%

Covered Lines:
31528

Relevant Lines:
65987

💛  - Coveralls


Security Flaw in updateKeys() Function Allows Signature Reuse for Key Re-registration

Description:
There is a critical security issue in the updateKeys() function of the Gateway contract that allows for the reuse of a signature to re-register a revoked key.
Steps to Reproduce:
1.	Register the key “xyz” with signature1.
2.	Revoke the key “xyz” with signature2.
3.	Reuse signature1 to re-register the key “xyz”.

Issue:
The current implementation does not prevent the reuse of the original registration signature (signature1) after the key has been revoked. This allows any user to re-register the key “xyz” with signature1, bypassing the intended revocation.
Proposed Solution:
To fix this issue, the function should keep track of used signatures or include a mechanism that invalidates the old signature once the key is revoked.
Impact:
This flaw could potentially allow unauthorized users to re-register revoked keys, compromising the security and integrity of the key management system.

Thanks @foreseon, I fixed this issue in https://github.com/Analog-Labs/analog-gmp/pull/16


[pmo] Simplify code by inverting an if check.

Just a simple refactor. This shortens the dynamic path when we have trivially typed memory and thus can avoid needing to deal with destroy_addr.

@swift-ci smoke test and merge


Does the platform layer support cross-kubernetes cluster injection?

Does the platform layer support cross-kubernetes cluster injection?

There is currently no platform layer provided, but in the "chaosmeta-platform" which is ready to open source, there is a plan for this capability

There is currently no open source platform layer chaosmeta-platform, and the ability to manage cross-clusters will be taken into account when it is open sourced.


Prompt for next action in abb_rcf_runner

From #15

Ask on every loop?

needs input prompt with timeout..

(Nicely) Interrupt loop?

Catch keyboard error and then nicely stop loop and prompt.

Doesn't work for windows, closes program completely.
Tested some Windows specific solutions, (msvcrt, getch), not super. Doesn't work consistently.

GUI framework instead? (Has loop things)

Part of this is now implemented through writing progress to JSON on every loop and when ran next prompts to skip placed bullets.
https://github.com/tetov/compas_rcf/commit/ca7ff65a9f382df4172c828e73a1a0fb4c97e62b


add timestamp converter class

Adding support for google protobuf timestamp class we're using - needed for big query import to work

 make data available in big query in close to real time

@asusac so this is just a one off and doesn't need to build in CI, I guess the travis setup was copied from the original repo?

@asusac Could you briefly describe the problem? What is the input, what should be the output?

@kolo It's basically this:
The timestamp was not encoded the same way in the parquet files - it contained a subfield with seconds, while we needed no subfields and in miliseconds.  As bigquery uses the ts field for partitioning, we couldn't just use the new version directly


Investigate the JSON schema for Metrics reporting

Review/Investigate metrics details provided in JSON schema:
http://metrics20.org/spec/
http://techblog.netflix.com/2014/12/introducing-atlas-netflixs-primary.html?m=1

Created this issue from alpha release project instead


x/sys: ClockSetttime function missing

Go version
go version go1.23.2 linux/amd64
Output of go env in your module/workspace:
GO111MODULE=''
GOARCH='amd64'
GOBIN='/home/user/bin'
GOCACHE='/home/user/.cache/go-build'
GOENV='/home/user/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/user/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/user/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/home/user/fbsource/third-party/go/1.23.2/linux_amd64'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/user/fbsource/third-party/go/1.23.2/linux_amd64/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.23.2'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/user/.config/go/telemetry'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build2144852328=/tmp/go-build -gno-record-gcc-switches'

What did you do?
https://go.dev/play/p/o-6Fj2boHM-
package main

import (
	"fmt"
	"log"
	"time"

	"golang.org/x/sys/unix"
)

func main() {
	t := time.Unix(1728509438, 0)
	ts, err := unix.TimeToTimespec(t)
	if err != nil {
		log.Fatal(err)
	}
	if err := unix.ClockSettime(unix.CLOCK_REALTIME, &ts); err != nil {
		log.Fatal(err)
	}
	fmt.Println("ok")
}

What did you see happen?
./prog.go:19:17: undefined: unix.ClockSettime

What did you expect to see?
An ok, or at least an error like EPERM.

Related Issues and Documentation

x/sys/unix: missing Linux clock_adjtime  #57618 (closed)
x/sys/unix: SYS_CLOCK_GETTIME undefined on darwin/amd64 with Go 1.11 #31203 (closed)
x/sys/unix: Gettimeofday broken on Darwin: doesn't set the time. #38925 (closed)
x/sys/unix: does not define Time_t for FreeBSD #48148 (closed)
x/sys: Missing TIME_OOP and friends #37234 (closed)
x/sys/unix: Stat_t.Atim is named Atimespec on darwin #31735 (closed)
time.Unix(int64, int) is no longer present  #44191 (closed)
x/sys/unix: missing constants used with struct Timex on Linux #58012 (closed)
time: time.Before return an unexpected result #42056 (closed)
gccgo: undefined identifier 'syscall.SO_RCVTIMEO' on linux/386 #42872 (closed)

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)


The Ortec" scrapper does not work (

ENVIRONMENT:
URL: https://admin.peviitor.ro/jobs/Ortec/
Browser: Chrome
Device: PC
OS: Windows 10
STEPS TO REPRODUCE:
enter URL in the Chrome browser
go to "https://admin.peviitor.ro/jobs/Ortec/"
Here you see that the scraper/diagram are not showing anything
EXPECTED RESULTS:
Scraper must run and stay up to date and the diagram show the data
ACTUAL RESSULTS: The scraper/diagram is not working
See below screenshot:

Compania nu mai are joburi disponibile pe romania


E2 Effects very inconsistent in triggering

E2 effects have a weird habit of not triggering depending of what kind of if statement it's in or what kind of event triggers it.
Garry's Mod (x64) 2023-07-26 14-40-44.webm

After an hour of testing it seems like the "allowOverride" boolean on util.Effect() controls whether it is able to play this specific effect (and probably all other non lua defined effects).


Build in functionality and styling for other plugins

Check other plugins to see what can be built-in same as “Conversation on Micro.blog”, with styling that will take effect if installed.

The following Micro.blog plugins now have layout and styling support if they are installed:

Conversation on Micro.blog by @svendahlstrand
Surprise Me! by @svendahlstrand
Post Stats by @am1t

This will be available with the next update.


How do you train on the WenetSpeech Dataset without speaker infomation?

In the implementation of https://github.com/lifeiteng/vall-e, they use the prev. and post. utterance of the same speaker as prompt cuts.
I'm wondering how is this step done in WenetSpeech?

Speaker information is never used in training VALL-E. The prompt is chosen to be a random cut of a few seconds for a certain audio clip.
That is how the original paper claimed indeed. However, I noticed that you use the implementation of lifeiteng's repo, which use the same speaker audio as prompt. So you just omit this setting and keep it consistent with the original paper?


Future Flows: Apply changes on completion

ensure any changes in a change unit are applied to the current state upon Completion of the change unit

#3936

with a confirmation dialog


Including plotting features

Do we want to include some basic plotting features for demographic models, such as what I've mocked up in the demography package? Since I used demography in the short commentary about msprime model errors, we've had some questions about whether users could plot any msprime demographic model. It would be nice to be able to plot any demographic model described using demes, in which case I think I could pretty easily adapt the matplotlib code I've already written and wrap it in here.
What do you all think?

I'd prefer to not have matplotlib as an install dependency if at all possible.  Installing it on conda means installing Qt, which is so big that fwdpy11 doc builds time out on RTD.
However, I think we can have it as a run time dependency just fine.  @jeromekelleher / @grahamgower may better understand the differences between the two than I do--Python isn't always clear/clean on this.

I think it'd be great to have some plotting here, but I agree with @molpopgen that we want to keep the install dependencies to a minimum. Matplotlib certainly blows that away. In any event, it might pay to hold off until we settle on an API, at least with regard to how we deal with times. I also plan to do a proof-of-concept GUI demography builder once the API settles, and it would be natural to export plots from this too.
One wrinkle though, is that by permitting multiple ancestors, our graphs will be non-planar. E.g. 3 distinct extant demes each inheriting from the same 3 distinct ancestors is a K3,3 graph.

It would be good to keep matplotlib out of the dependencies. I'd like msprime to depend on this package, so it really shouldn't depend on anything much ideally.
I agree that viz is important, but perhaps that's the job of another library, which can be as heavy-weight as we like?

Ok, that all makes perfect sense. I'll close this for now, and we can focus on that in the future if we want to include it here. Not a high priority at the moment in any case.


Modifying JsonObject using ACursor/HCursor performance hit due to megamorphic calls

When modifying/traversing json, we incur into megamorphic calls whenever we call contains or add in JsonObjects.
Our usecase is very performance sensitive, so I would like to have the option to optimize such method calls and avoid performance penalty, by calling the method in the concrete subclass (LinkedHashMapJsonObject or MapAndVectorJsonObject). But the concrete classes definition is private. Would it be acceptable to modify it to private[circe].
On another note, a similar performance penalty happens when calling ACursor methods, which also incurs in megamorphic calls quite often. However, the definitions of the concrete subclasses as package private, so I can write a few "optimized" methods to workaround it.

Apologies, further investigation cleared JsonObject from blame, the source of the megamorphic calls was not JsonObject but the underlying Map (Map1/2/3/4 and HashMap), we managed to ensure using HashMap at JsonObject creation time and the megamorphic calls were gone. While I think it would still be beneficial to allow some peeking into the underlying implementation used in some circumstances. I will close this issue as it's clearly incorrect. Again, apologies!


kou's jump model

Addtion of Kou's jump model (see  A Jump-Diffusion Model for Option Pricing https://www.columbia.edu/~sk75/MagSci02.pdf)

In docstring examples large number of jumps for given parameters (2% up and 5% down) results in different jump based on python (and torch) version as random number generated with same seed differ. This occurs when number of jumps in a single day is quite large (accumulating up and down jumps with various sizes). Reducing jumps number makes it feasible for all versions to provide similar paths within tolerance.

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
Attention: Patch coverage is 95.04950% with 5 lines in your changes missing coverage. Please review.

Project coverage is 97.15%. Comparing base (7c13ace) to head (e3f5c01).
Report is 3 commits behind head on main.

Files
Patch %
Lines

pfhedge/stochastic/kou_jump.py
93.33%
3 Missing :warning:

pfhedge/instruments/primary/kou_jump.py
96.29%
2 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #633      +/-   ##
==========================================
- Coverage   97.24%   97.15%   -0.09%
==========================================
  Files          60       62       +2
  Lines        2500     2601     +101
==========================================
+ Hits         2431     2527      +96
- Misses         69       74       +5

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

Changes

common test for merton and kou's model
the standard deviation for the jump test has to be increased as cpu test has no issues but gpu test has convergence issues (previous 0.4 was almost on the boundary of tolerance, ie. out of 100 tests with different random seeds a few would be fail for sure, with 0.5 std this number decreases: see also https://github.com/pfnet-research/pfhedge/pull/625).


yarn berry (3.1.0 cjs) cannot find '@stitches/react'

Bug report
Describe the bug
yarn berry (3.1.0 cjs) cannot find '@stitches/react'
unhandledRejection: Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@stitches/react' imported from /Users/dylan/dev/money-webview-next/.next/server/pages/_document.js
Did you mean to import @stitches-react-virtual-4f473b52ff/0/cache/<EMAIL_ADDRESS>

This is yarn berry issue and have been fixed (https://github.com/yarnpkg/berry/pull/3667).


Expose more of dot-dom for NPM, handle window conditionally

This is meant to expose more of dot-dom to NPM by binding dotdom to window. In addition to handling window if it already exists higher up in scope.

Hey @SilentCicero. I don't really get what you are trying to do here. I do get the idea of defining window only if it's not already there,  but why do you need the reference to the wrapping function?

@wavesoft referencing the wrapping function allows others to build with the module. It exposes your API more, perhaps they want to inject their own globals, transforms or modifiers, or trees. It's best to expose all of this IMO.

Well, I am going towards a single global (and that being the global variable) since converting the function arguments to var declarations actually saves a few bytes.

So I cannot see the benefit from exposing the wrapping function. Can you provide an example?

Given what I have seen in the new release, we can close now.


Suggestion: Add ability to hide/show the Tour

Hello 👋
I would love to have the ability to hide the tour temporarily and then show it again.
I want the user to be able to perform some actions in between the steps.
I can mimic this behavior by saving the last non-undefined current, calling stop(), and then calling goTo(lastCurrent). However, it's far from ideal, as it has the setSpot(ZERO_SPOT) on the stop() method it performs some animations (at least in slide).
The context could provide a simple hide() and show() that is managed by the library itself, making it easier to use and with better (or no) transitions. Also, calling next()/previous() could still work anyway :)

Hey @ravanscafi, thanks for showing interest in the library, as for your suggestion, I'll give it a try but will be using pause() instead of hide() for it to fit better with the existing methods.


DOCS-550-Update-default-deny

Fix wording around default deny policy for OSS.
Product Version(s):
All OSS active versions
Issue:
https://tigera.atlassian.net/browse/DOCS-550 and discussion: https://tigera.slack.com/archives/CGMG75AUV/p1656880509050909
Link to docs preview:

SME review:

[ ] An SME has approved this change.

DOCS review:

[ ] A member of the docs team has approved this change.

Additional information:

Merge checklist:

[ ] Deploy preview inspected wherever changes were made
[ ] Build completed successfully
[ ] Test have passed

@fasaxc Ideally, we should have an OSS version of this doc (https://docs.tigera.io/calico-enterprise/3.18/network-policy/default-deny), but it would take more work.  I've rewritten the doc based on this CE doc (https://docs.tigera.io/calico-enterprise/latest/network-policy/default-deny). The CE doc refers to using staged policy so I just reworded to "test environment."

@fasaxc PTAL. Looks like Barbara pushed a revision to your latest comment. If this is good now, I'll merge and make the same changes to other OSS versions.

Closing and replacing with #1371


Diff updated indexes using old view model

Changes so that the HUBViewModelDiff calculates updated indices using the previous data model rather than the new one.
@spotify/objc-dev (@cerihughes, @JohnSundell @rastersize)

@JohnSundell This should be used in preference to what I was working on (but we've pulled in the tests I wrote that reproduced the problem). Mine was a quick patch on top and needed an extra iteration, but this fixes the problem in the same number of iterations.

Looks great 🎉

@cerihughes Ah got it, awesome! 👍

@Goos @cerihughes Really awesome work guys! ⭐ ⭐ ⭐ ⭐ ⭐

@goos, @cerihughes Updated the tests and fixed the style issues 😄

Current coverage is 92.81% (diff: 100%)

No coverage report found for master at eea4a08.

Powered by Codecov. Last update eea4a08...bbc5507


insert two rdd in cluster.train

Environment:

Python version 3.6
Spark version 2.4.3
TensorFlow version 1.14.0
TensorFlowOnSpark version 1.4.3
Cluster version Standalone

Describe the bug:
in this example: https://github.com/yahoo/TensorFlowOnSpark/blob/master/examples/mnist/keras/mnist_mlp_estimator.py
In spark mode, in cluster.train(dataRDD, args.epochs), it's possible send two dataRDD?
for example i create another rdd:
images_test = sc.textFile('/home/luca/TensorFlowOnSpark/examples/mnist/csv/test/images').map(lambda ln: [float(x) for x in ln.split(',')])
labels_test = sc.textFile('/home/luca/TensorFlowOnSpark/examples/mnist/csv/test/labels').map(lambda ln: [float(x) for x in ln.split(',')])
dataRDD_test = images_test.zip(labels_test)
how to insert, in cluster.train, dataRDD and dataRDD_test? it's possible?
and after, how to distinguish the two rdd in main_fun?

That's a good question... I've added an answer in the FAQ.  Hope that helps.

Thanks for the reply, I think I upload the data through tf.data.dataset during the evaluation phase.
i have read the FAQ but i don't understand this part: "If you have two distinct RDDs (e.g. train vs. test), you can either run a separate evaluation job that just loads the latest checkpoint on a periodic basis and evaluates on the test RDD". you could write an example code?
it is more efficient to upload data with tf.data.dataset or is more efficient the question that i don't understand?

Here is an example of a separate evaluation job.

Ok thank you very much


Inherit parent color

It would be useful if the icons could inherit the parent color or allow classes to modify the color of the icons.

I believe you can use <unicon name="car-wash" fill="currentColor"/>
There's another issue where we discuss default values and I suggest that currentColor could be default: https://github.com/antonreshetov/vue-unicons/issues/35#issuecomment-637472318

@andruu just add your class to <Unicon class="some-class" name="share" /> and describe its css styles.


Doc 3481 gitops reorg

Harness Developer Pull Request
Thanks for helping us make the Developer Hub better. The PR will be looked at
by the maintainers.
What Type of PR is This?

[x ] Issue
[ ] Feature
[ ] Maintenance/Chore

If tied to an Issue, list the Issue(s) here:

https://harness.atlassian.net/browse/DOC-3481

House Keeping
Some items to keep track of. Screen shots of changes are optional but would help the maintainers review quicker.

[ ] Tested Locally
[ ] Optional Screen Shoot.

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app


Cycles in Topology

In streamparse 3.2 it doesn't look like there is first class support for cycles as there was with the clojure dsl.
If you are to attempt to define a cycle in the naive way, you will reference a variable before it is defined because declaration of inputs happens at class instantiation time. this works for all graphs that can be topologically sorted:
	word_spout = WordSpout.spec()
	count_bolt = WordCountBolt.spec(inputs={word_spout: Grouping.fields('word')}, par=1)

	a_bolt = A.spec(name="A", inputs=[count_bolt["count->A"], b_bolt["B->A"]]) # here this fails because b_bolt is not defined
	b_bolt = B.spec(name="B", inputs=[c_bolt["C->B"]])
	c_bolt = C.spec(name="C", inputs=[a_bolt["A->C"]])

The current solution therefore is to init each bolt and then extend inputs:
def extend_inputs(bolt, inputs):
	additions = bolt._sanitize_inputs(inputs)
	bolt.inputs = {**additions, **bolt.inputs} # only python >3.5
	bolt.common = ComponentCommon(inputs=bolt.inputs, streams=bolt.outputs, parallelism_hint=bolt.par, json_conf=bolt.config)

class WordCount(Topology):
	word_spout = WordSpout.spec()
	count_bolt = WordCountBolt.spec(inputs={word_spout: Grouping.fields('word')}, par=1)
	a_bolt = A.spec(name="A", inputs=[count_bolt["count->A"]])
	b_bolt = B.spec(name="B")
	c_bolt = C.spec(name="C")

	extend_inputs(a_bolt, [b_bolt["B->A"]])
# and so on...

Is there a better way to do this currently?

It's currently undocumented, but the workaround for this is to do:

from streamparse.thrift import storm_thrift
from storm_thrift import GlobalStreamId  # You have to do this in two lines because
                                         # storm_thrift is generated by thriftpy on import

class WordCount(Topology):
	word_spout = WordSpout.spec()
	count_bolt = WordCountBolt.spec(inputs={word_spout: Grouping.fields('word')}, par=1)
        b_stream = GlobalStreamId(componentId='b_bolt', streamId='B->A')
	a_bolt = A.spec(name="A", inputs=[count_bolt["count->A"], b_stream])
	b_bolt = B.spec(name="B", inputs=[c_bolt["C->B"]])
	c_bolt = C.spec(name="C", inputs=[a_bolt["A->C"]])

This works because ComponentSpec.__getitem__ (which is used whenever you do b_bolt['B->A'] in the topology DSL) just returns a GlobalStreamId with the component ID and stream ID set for you automatically.
Side note: For a real topology, don't really need to use names like B->A for your streams, especially if they all only go to one component. Every component has a default stream called 'default', and unless your component has multiple output streams that produce different content, it's really unnecessary.


Library import<PHONE_NUMBER>

PR closed because we have a new update for rightlib d91dac51cf9ec6c397d6d0213f0d9ab7dd29c889

The PR was closed because we have a new update for rightlib fake


multiple API keys and quota per key?

Is your feature request related to a problem? Please describe.
How do I have multiple API keys and apply different quota and throttle limit per key?

I am afraid this will not be supported.
To have multiple API Keys is easy, but you will need to customize the code.  Check the auth.py file for more details.  To apply different quota per key is not supported by Bedrock.  You can do some basic monitoring and alarm of usage via CloudWatch.
The recommendation is not to use this solution for complex cases.

ok, make sense


feat: exclude boto3 from python lambda packages

#64  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @pevisscher and the rest of your teammates on  Graphite


dashboard: port app to go111/go112 runtime

Google has deprecated the go 1.9 runtime and is requiring apps to move to the 1.11/1.12 runtimes.
The 1.12 runtime deprecates the appengine library that the dashboard currently uses, so 1.11 might be a good interim step.
(I'm assuming that syzkaller.appspot.com has been whitelisted for continued use of 1.9; my ppc64 experiments dashboard has not been so lucky.)

FWIW syzkaller.appspot.com does not have any special whitelisting. Maybe it works because it was deployed long time ago, or we did not update lately.

Or potentially Google internal users generically can continue to use it? I was assuming you have been deploying since the 1 October cutoff date because there's been commits touching dashboard/app since then. I get an error on deploy, telling me to ask support to get whitelisted, and then support says no :)


W/agora.io(24391): [STRATEGY RUNNER] strategy chain not found! timer_type type:1

After an audio call, I am getting this response in console. This runs for an infinite amount of time, until I reinstall the app (debug). and no further incoming calls are possible. The device just vibrates for a moment and this response keeps getting printed on the console.
D/CCodecBufferChannel(24391): [c2.android.aac.decoder#966] DEBUG: elapsed: mInputMetEos 6, hasPendingOutputsInClient 0, n=1 [in=0 pipeline=0 out=2]
D/PipelineWatcher(24391): [0xb400007d2b532680] elapsed: mFramesInPipeline 2, n 6
D/CCodecBufferChannel(24391): [c2.android.aac.decoder#197] DEBUG: elapsed: mInputMetEos 6, hasPendingOutputsInClient 0, n=1 [in=0 pipeline=0 out=2]
D/PipelineWatcher(24391): [0xb400007c3d7ed680] elapsed: mFramesInPipeline 2, n 6
D/JSON    (24391): []
D/JSON    (24391): []
D/JSON    (24391): []
D/JSON    (24391): []
D/JSON    (24391): []
D/JSON    (24391): []
D/JSON    (24391): []
D/JSON    (24391): []
D/JSON    (24391): []
D/JSON    (24391): []
D/JSON    (24391): []
D/JSON    (24391): []
D/JSON    (24391): []
D/JSON    (24391): []
D/JSON    (24391): []
D/JSON    (24391): []
D/JSON    (24391): []
D/JSON    (24391): []
D/JSON    (24391): []
W/agora.io(24391): [STRATEGY RUNNER] strategy chain not found! timer_type type:1
D/JSON    (24391): []
D/JSON    (24391): []
D/JSON    (24391): []

same issue ,but in my case when i end a video call this issue is coming
any solution

after I call _engine.release(), it seems to have disappeared.

Call RtcEngine.release is necessary to avoid unknown issues. If calling RtcEngine.release does not work for you, I think it's better to raise a new ticket to the agora support.

In RtcEngineEventHandler
you can put this code
onError: (ErrorCodeType err, String msg) {
debugPrint(
'Error rtc engin =============================> Code = ${err.name} MSG = $msg');
},
then you will know the reason
I think this message because rtc token is not true

@laxkarparas1 on dispose add _await engine.release() and see if the error still appear.

https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/issues/1225

await engine.initialize(const RtcEngineContext(       appId: kAgoraAppId,       channelProfile: ChannelProfileType.channelProfileLiveBroadcasting,       logConfig: LogConfig(level: LogLevel.logLevelError)     ));
just change the logLevel to  LogLevel.logLevelError in the log config when initializing the RTC engine

I am getting the same error again which is creating lots of issues. It's literally consuming a lot of memory and no further calls can be received on the device as the incoming call notifications are suppressed as this keeps on printing. The same happens with both dev and release builds.

@jerrypaulsam
I think it's better to raise a new ticket to the agora support for further investigation of this issue.


Revoke Token methods are not working like in documentation

Hi, i'm trying to revoke the jwt token, but the methods showed in adonis documentation (versions 4.0 and 4.1) is not working (The erro said that the auth.scheme(jwt) is not a function), so i access the tokens database directly using lucid methods and remove all the registries inside token table in database, but for some reason the user continue to login successfully with the deleted token, even with the token database empty, i can not explain why, i don't know what information the auth.check() method is using to validate the token cause there is no token in database to validate. Can you help me to solve this?

I hope you are using the jwt scheme. Jwt tokens are never saved in the database, since that's how the JWT protocol works, you can read more about it here https://jwt.io/.
In case of jwt, you can set a smaller expiry and optionally generate a refresh token, which can be used to re-issue a new JWT token.
The refresh token is saved to the database tokens table. So anytime you want to revoke the refresh token, you remove it from the database.
Regarding the code not working, you have to share some code and context for me to help better

Hi @thetutlage, thanks for the answer.
Yes, i'm using the JWT scheme, and i see in the 4.0 and 4.1 documentations that the api schema is no longer accepted, so i do not using api schema, only jwt.
The authentication chapter of the documentation have significant diferentes between 4.0 and 4.1, but any of the versions is working like documentations said, so i think there is a problem with this section.
Bellow is the steps that i'm trying to apply in my code.
1 - Create user:
`async create ({ request }) {
const { name, email, password } = request.all()
const user = new User()

user.name = name
user.email = email
user.password = password

await user.save(user)

}`
2 - Login user ang get jwt token access and refresh:
async login ({ request, auth }) {     const { email, password } = request.all()     await auth.attempt(email, password)     return await auth.withRefreshToken().attempt(email, password)   }
With this i'm able to call protected endpoints in my api using the jwt token.
3 - Revoke the token (This is where i'm having problems. The code bellow is based on 4.1 doc 4.1 doc:
Ps: the example in 4.1 doc is not working, throw error in the .scheme('jtw') "scheme is not a function", so i changed this to a version where not gives me an error:
async revokeTokens ({ request, response, auth }) {     try {       await auth.check()       const token = auth.getAuthHeader()       return await auth.revokeTokens([token])     } catch (err) {       response         .status(404)         .json({ type: 'error', message: err })     }   }
This code do not give me error, but do not revoke token too, cause even when i'm call this revoke method, i continue to login with the same token that i revoked.

I made some tests, and i understand what you said to me, the jwt token is never revoked, only the refresh token, so ok, i understand this now, but how can i revoke the refresh token? I need to send it in the request? or can i revoke the refresh token using the jwt token (that is what i'm doing)? When i call de revokeTokens method, this method receives the jwt token from header and pass this value to auth.revokeTokens([token]), and the answer is bellow:
{
    "n": 0,
    "nModified": 0,
    "ok": 1
}

As you can see, nothing was changed in database, not even the 'is_revoked column', so i don't know how to revoke the refresh token.

So let's understand it from the application flow point of view?
When do you want to revoke the token?

For now i want to be able to create users to have access to my API, and i want to be able to revoke this access any time i want, so the API token that i give to this user needs to be immediately revoked when i put this in blacklist or any other solution that prevents this token to be used again, so the user that have his token revoked will only be able to use my API if i give him another token.

I don't know if this issue is up, but we have something somewhat strange between the actual code and what is documented in the website.
I was able to remove the refresh token with this code (the minimum code shown, Adonis 4.1):
async logout({ auth, request }) {
    await auth.check();
    await auth.revokeTokens([request.input('refresh_token')], true);
}

Like you can see, is different from the documentation that says:
const refreshToken = '' // get it from user

await auth
  .scheme('jwt')
  .revokeTokens([refreshToken], true)

About the app flows:
In my scenario, when user clicks in the "Logout" link, the Angular app sends the refresh token that is associated with that access to logout endpoint.
I'm working in a way to deny access from a valid JWT token when the user request the access for the device in his/her dashboard (like Facebook or any app you see in the wild) or click in a logout link. To achieve this, I was thinking to use the following aproach:

Save anything that identifies the token before to send to user (probably in the /login endpoint);
The user see a list of those "tokens ids" and select "Remove" or "Revoke" (or simply click in a logout link) and send the token id to a black list ;
A middleware check if the request token is blacklisted. If it is, throws a CE.InvalidJwtToken.invoke() like exception.

The problem with this approach is maybe the same that @renatomattos2912 is trapped to: identifying the current token.
Any toughts, @thetutlage?

Closing since issue hasn't been active for a while.
Feel free to create a new one if needed.

It would be nice if we can revoke JWT on server side based on a hashed tokens.
In auth layer the token passed as parameter can be hashed and make a comparison on database hashed token. If token is not revoked and exists on database so user can act with system. If don't exists or is revoked it auth layer throw an AuthException.

JWT aren't stored in the database, therefore you shouldn't and you cannot revoke them. This is how it works and how the spec describe it. If you need to revoke a JWT, maybe you shouldn't use JWT.

What if store a hashed version of token to be able to revoke them and include another infos? Like device info, ip and much more...

Doing this remove completely the goal of JWT.
As said before, if you have the need to revoke the token, you shouldn't use a JWT.


Time out connecting to oauth2-proxy

Is this a request for help?:
Yes
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
BUG REPORT

Version of Helm and Kubernetes:
kubectl version
Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.2", GitCommit:"5fa2db2bd46ac79e5e00a4e6ed24191080aa463b", GitTreeState:"clean", BuildDate:"2018-01-18T10:09:24Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"windows/amd64"}
Server Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.6", GitCommit:"9f8ebd171479bec0ada837d7ee641dec2f8c6dd1", GitTreeState:"clean", BuildDate:"2018-03-21T15:13:31Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}

helm version
Client: &version.Version{SemVer:"v2.9.0", GitCommit:"f6025bb9ee7daf9fee0026541c90a6f557a3e0bc", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.9.0", GitCommit:"f6025bb9ee7daf9fee0026541c90a6f557a3e0bc", GitTreeState:"clean"}

Which chart:
stable/oauth2-proxy
What happened:
Ingress times out while connecting to oauth2-proxy.  This is in an Azure AKS cluster with stable/nginx-ingress installed.  My ingress setup:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: kuard-ingress
  annotations:
    kubernetes.io/tls-acme: "true"
    kubernetes.io/ingress.class: "nginx"
    ingress.kubernetes.io/ssl-redirect: "true"
    ingress.kubernetes.io/secure-backends: "true"
    certmanager.k8s.io/cluster-issuer: letsencrypt-prod
    nginx.ingress.kubernetes.io/auth-url: https://my.cloudapp.azure.com/oauth2/auth
    nginx.ingress.kubernetes.io/auth-signin: https://my.cloudapp.azure.com/oauth2/start
spec:
  tls:
  - hosts:
    - my.cloudapp.azure.com
    secretName: my-cloudapp-prod-tls
  rules:
  - host: my.cloudapp.azure.com
    http:
      paths:
      - path: /
        backend:
          serviceName: kuard-service
          servicePort: 80
---

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: oauth2-proxy
spec:
  rules:
  - host: my.cloudapp.azure.com
    http:
      paths:
      - path: /oauth2
        backend:
          serviceName: oauth2-proxy
          servicePort: 80

My values.yaml used during helm install:
config:
  clientID: <private>
  clientSecret: <private>
  cookieSecret: <private>

extraArgs: {"provider":"github", "cookie-secure":false, "redirect-url":"https://my.cloudapp.azure.com/"}

image:
  repository: "a5huynh/oauth2_proxy"
  tag: "2.2"
  pullPolicy: "IfNotPresent"

When navigating to my app I receive a 500 error.  The logs reveal:
kubectl logs nginx-ingress-controller-79598bb4f6-ctf5r --namespace kube-system --tail 10
<IP_ADDRESS> - [<IP_ADDRESS>] - - [05/Jun/2018:20:45:08 +0000] "GET / HTTP/2.0" 504 0 "-" "Mozilla/5.0 (X11; SunOS sun4u; rv:54.0) Gecko/20100101 Firefox/54.0" 0 60.075 [default-kuard-service-80] <IP_ADDRESS>:443 0 60.000 504
<IP_ADDRESS> - [<IP_ADDRESS>] - - [05/Jun/2018:20:45:08 +0000] "GET / HTTP/2.0" 500 194 "-" "Mozilla/5.0 (X11; SunOS sun4u; rv:54.0) Gecko/20100101 Firefox/54.0" 257 60.075 [default-kuard-service-80] - - - -
2018/06/05 20:45:08 [error] 5754#5754: *30791 upstream timed out (110: Connection timed out) while connecting to upstream, client: <IP_ADDRESS>, server: my.cloudapp.azure.com, request: "GET / HTTP/2.0", subrequest: "/_external-auth-Lw", upstream: "https://my-public-ip:443/oauth2/auth", host: "my.cloudapp.azure.com"
2018/06/05 20:45:08 [error] 5754#5754: *30791 auth request unexpected status: 504 while sending to client, client: <IP_ADDRESS>, server: my.cloudapp.azure.com, request: "GET / HTTP/2.0", host: "my.cloudapp.azure.com"

What you expected to happen:
Navigating directly to https://my.cloudapp.azure.com/oauth2/ping works.
Also navigating to https://my.cloudapp.azure.com/ when the auth-url and auth-signin annotations are removed.

I ended up moving away from the helm chart and deploying from a5huynh/oauth2_proxy manually.  I did have a few issues with my ingress setup though with this line:
nginx.ingress.kubernetes.io/auth-url: https://my.cloudapp.azure.com/oauth2/auth
which should have been:
http://oauth2-proxy.kube-system.svc.cluster.local:4180/oauth2/auth
If you are using Azure AD, my other issue was that the reply URL needed was not .../oauth2/signin-oidc but /oauth2/callback.

Thanks @tdebiasio , http://oauth2-proxy.kube-system.svc.cluster.local:4180/oauth2/auth
works for me even in case of helm chart.

Thanks @tdebiasio  @olegchorny . What ended up working for me with the helm chart was:
OAUTH_CLUSTER_SERVICE=oauth2-proxy
OAUTH_CLUSTER_NAMESPACE=cluster-svc

http://$OAUTH_CLUSTER_SERVICE.$OAUTH_CLUSTER_NAMESPACE.svc.cluster.local:80/oauth2/auth

E.g.
    nginx.ingress.kubernetes.io/auth-url: "http://kibana-ingress-oauth2-proxy.cluster-svc.svc.cluster.local:80/oauth2/auth"

Port 4180 didn't work for me.


[COMMENT] Rotating file handler

Apart from logrotate.conf use RotatingFileHandler.

logrotate can be used with syslog
RotatingFileHandler based rotation when no syslog is setup

logrotate can be used with syslog

Just to clarify that - log rotate can be used with any application which supports writing logs to a file and re-opens a log file on SIGUSR1 :)
It would be ideal if we could also use log rotate for our Python services (one place / config to configure all the log rotation settings), but it might be too big of a PITA to do that so I'm fine with this approach.

Edit: Looks like something like this should work - https://bitbucket.org/cherrypy/cherrypy/issue/679/log-file-handling-with-standard-tools

Actually the issue I want to work out is with the multiple python processes for actionrunner. Also, for dev setup logrotate might be a better approach anyway.

@manasdk We already "manage" multiple action runner processes in st2ctl so sending SIGUSR1 to all the action runner processes should be no different than restarting all the action runner processes.
As far as the dev environment goes - I don't think we really need log rotation there.

@kami When logging via syslog we can use logrotate. When no syslog we can use RotatingFileHandler. This avoid all that restart business entirely.
Anyway, if you guys see this as solved I am ok with abandoning this PR.

@manasdk With the SIGUSR1 approach described in the link above we can avoid restarts and also use logrorate for our Python services.

It'd be awesome to have something where I could send a soft kill (HUP/USR1) to release the lock. The copytruncate in the logrotate is a direct response to not being able to release the lock on the file, and that could very easily land us in some problems down the road (imagine a full log, and lack of disk. In order to cleanup, I need log-size x2 it make the operation happen before compression can occur, and could end up in a bad spot.
As far as solving this... I'm not sure we have. Maybe closer. :)

To clarify it - yes, this does require us adding some code (see the link above) and installing SIGUSR1 handler, but I like this approach since this way our Python services also play nicely with all other tools (user can use arbitrary external tool to handler log rotation) which assume reopening of the log files on SIGUSR1.

About SIGUSR1 approach -
All I care about is no unbounded growth of logfiles.
I am closing this PR. I do not plan to work on any logrotation stuff at this point i.e. assume that someone else will be taking up SIGUSR1

Alright, I've opened an issue so we don't forget to do it - #1342.

:+1:

Will work on https://github.com/StackStorm/st2/issues/1342 as part of this PR.

@jfryman This includes logrotate.conf. Can that be merged in as well?

@manasdk yes sir. we'll need to wire it up to the packaging, so getting it merged is :+1:

right I was just wondering about packaging. Ignoring that for now.


Scan errors for non-CWA QR codes pop up on frontend

From
https://twitter.com/sand2drn/status/1385197350025564163

Exception handling should be improved, meaningful error message shown.

Internal Tracking ID: EXPOSUREAPP-6658

If a user inadvertently tries to scan in a QR code from a PCR test instead of from a check in, then the same error occurs.
Steps to reproduce

Tap Check In
Tap "SCAN QR CODE" and then point to QR code from bottom half of example form 10C form

Expected result
In this special case, a dedicated error message should point users to the correct way of scanning in an PCR test QR code.
For other QR codes, which are not in the format for checking in, then a user-friendly error message should be output.

Oh, you're fast… 😺

@koehntopp @MikeMcC399 Thank you very much for the reports. Internal Tracking ID: EXPOSUREAPP-6658

Corona-Warn-App Open Source Team

@dsarkar
What do you think about the suggestion from @Ein-Tim ?

I suggest that you open a new wishlist item regarding #2909 (comment).

Is wrongly scanning a PCR Test QR code using the Check-in QR code scanner already covered by Internal Tracking ID: EXPOSUREAPP-6658 or does it need a separate wishlist item?

@Ein-Tim
What happens on iOS if you try to scan in the sample PCR test QC code using check-in?

Do you get a user-friendly error message?

@MikeMcC399
iOS shows this message, which i quite good I think:

@MikeMcC399 @Ein-Tim

Is wrongly scanning a PCR Test QR code using the Check-in QR code scanner already covered by Internal Tracking ID: EXPOSUREAPP-6658 or does it need a separate wishlist item?

That would be a new wishlist item.
The alignment of iOS and Android error messages is dealt with in this ticket.

FYI PR https://github.com/corona-warn-app/cwa-app-android/pull/2919

@dsarkar
In https://github.com/corona-warn-app/cwa-app-android/releases/tag/v2.0.4-RC0 which includes PR "Human friendly QR Dialog Message 9002 (EXPOSUREAPP-6658)" https://github.com/corona-warn-app/cwa-app-android/pull/2919
the issue is fixed in the code, however the message is not translated yet. If the locale is set to English (United Kingdom) then the UI is shown in German. The default strings file includes only German, and the specific English strings file is missing the entries.
I assume this is known, however I just wanted to mention it.
https://github.com/corona-warn-app/cwa-app-android/blob/59015a7a14efbcb203254d2698ec9cfbc3dc0ef1/Corona-Warn-App/src/main/res/values/strings.xml#L2004-L2011

@MikeMcC399 Many thanks. Forwarded into internal ticket.

The missing English language strings have been delivered and incorporated into https://github.com/corona-warn-app/cwa-app-android/releases/tag/v2.0.4-RC1.
Scanning the PCR test example QR code, with the device locale set to English (United Kingdom), results in a human-readable error message in English.
It looks like the fix is now good to go!

FYI https://github.com/corona-warn-app/cwa-app-android/releases/tag/v2.0.4

@dsarkar
Google Play Store has already delivered the bug-fix release v2.0.4 to me and I was able to verify that the fix correctly displays a user-friendly error message when scanning the PCR test QR code.
From my point of view this issue can be closed. Perhaps @koehntopp can confirm when he is able to update and check?

@MikeMcC399 Thanks for confirming the fix.

Dear community,
This issue has been fixed in CWA 2.0.4. We will close this issue now.

Corona-Warn-App Open Source Team


Fix Bazel breakage due to magic Cocoapods header search path

Should you merge to release_11 instead of master?


Grid docs: Implementation page > Mixing gutter modes (dev content workstream)

Create content for "mixing gutter modes" section on Grid docs Usage(currently called Implementation) page.
https://www.figma.com/file/ROcIS7OFtP42sXqH7VODhV/Grid_docs?node-id=0-1&t=oQTo2FDDBZFbujKS-0

@jeanservaas I don't have access to edit your Figma file, so docs are here in Box https://ibm.box.com/s/8z4uievidlq3xu7yjhoie32v636l9fec


Extract dependency versions from TRG 5.07 into new TRG

Reason

AC

We need a new TRG to align all postgresql versions to at least major and define a minimum postgresql version (in case of features people are depending on)

Additional information / links
https://eclipse-tractusx.github.io/docs/release/trg-5/trg-5-07/

Might be obsolete https://github.com/eclipse-tractusx/eclipse-tractusx.github.io/pull/400 please revisit perhaps you have another better idea in regard of.
Also minimum version is not included in my pr

in my opinion obsolete, and already merged IMHO would close this issue.


Create custom TreeLayerLegend to control the layers

Create MapboxLegend class to handle adding a React component as a map control.
Remove mapbox-gl-legend library, saving ~450K from the bundle.
Support collapsing and expanding the legend.
Collapse the legend by default.
Show hover state on each control.
Fix default layer visibility being undefined when the map first loads.
Add colored circular checkboxes for each layer.

The mapbox-gl-legend library was including the legend-symbol library, which was huge.  So writing our own React version saves a lot of code.  The colored dots don't scale as the map zooms, and now serve as the checkboxes for the legend.
The legend is shown at the bottom-right, and collapses to a small button:

PR #167 should be merged first.

BTW, the legend is now in the bottom-right, because I figured out why it wasn't showing there before (paren in the wrong place), but it can be moved back to the top-right or wherever.  We can also collapse it by default on small screens, if desired.


Refactored datasets classes

There are a few issues with the current implementations of the dataset interfaces:

There is a lot of duplicated code related to dataframe parsing and processing. We have the same code two times (texts, images) and are going to repeat the same thing 3d time for audio. It's too much, so, the classes have to be refactored.
There is a tricky implementation of IQueryGalleryDataset which also needs to be updated.

This PR has to address all of these issues.
With the proposed changes we also almost avoid inheritance from non-abstract classes. Formally, we still inherit ImageLabeledDataset from LabeledDatasetDF, but it's rather an alternative constructor than meaningful inheritance with some logic on top of that. (I could literally make @classmethod: create_for_images() and create_for_texts() in LabeledDatasetDF, but I need to keep back compatibility).

lgtm!


Unable to use causalimpact due to error with scipy

Hi @mm4793 ,
Could you please share more information? Do you have a code sample? What is the output of your  pip freeze?


DO NOT MERGE! Fast Forward stable to da2917be5b0e88b337a2bb25e6892d7537d2394b.

This PR will be merged automatically once checks are successful.

This change is

Jenkins job mixer/postsubmit passed


Response throwing An operation was attempted on a nonexistent network connection error

Hi,
I have the following code:
Get["/classlist/pdf"] = parameters => {
var response = new Response();
string filename = DateTime.Now.ToString("yyyyMMddhhmm") + " Participants Report.pdf";
response.Headers.Add("Content-Disposition", "attachment; filename=" + filename);
response.ContentType = "application/pdf";
            response.Contents = stream =>
            {
                var writer = new StreamWriter(stream) { AutoFlush = true };
                ViewModel.CreatePDFReport(writer, ViewModel.CourseIdAsInt());
            };

            return response;
        };

But when I try to write to the stream it throws HttpListenerException An operation was attempted on a nonexistent network connection error
I think this is because I am trying to write to the response stream when the request stream is still open. (Thats an educated guess based upon a lot of searching)
Any ideas? I just want to pass a pdf generated dynamically back to the user, not from a file). PS This has worked and I have seen the PDF arrive at the client end, but the above error throws most of the time.
Thanks
Jin

When deployed to the server I get: Nancy.RequestExecutionException: Oh noes! ---> System.Net.WebException: The underlying connection was closed: Could not establish trust relationship
The certificate is signed with SHA-1

Why sha-1

Infrastructure set the servers up. Is it that preventing it? I am guessing so. I am just the Dev. My original question stands though Locally when I try to write to the stream it throws HttpListenerException An operation was attempted on a nonexistent network connection error. Thanks for responding

They aren't supported anymore.
https://blog.qualys.com/ssllabs/2014/09/09/sha1-deprecation-what-you-need-to-know
(first google link I found, but there's lots)
You should issue a new SHA-2 cert. Your error is very similar to 1 I was getting on AWS API Gateway and my phone. Fixed up issuing an SHA-2 cert.

@jinwah are you able to update the cert?